mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dominik Brodowski <linux@dominikbrodowski.net>
To: linux-pcmcia@lists.infradead.org
Cc: linux-kernel@vger.kernel.org, kaustav.majumdar@wipro.com
Subject: [RFC PATCH 3/11] pcmcia: update alloc_io_space for conflict checking for multifunction PC card
Date: Wed, 25 Oct 2006 22:13:22 -0400	[thread overview]
Message-ID: <20061026021322.GD20473@dominikbrodowski.de> (raw)
In-Reply-To: <20061026021027.GA20473@dominikbrodowski.de>

From: Kaustav Majumdar <kaustav.majumdar@wipro.com>
Date: Fri, 20 Oct 2006 14:44:09 -0700
Subject: [PATCH] pcmcia: update alloc_io_space for conflict checking for multifunction PC card

Some PCMCIA cards do not mention specific IO addresses in the CIS.  In that
case, inside the alloc_io_space function, conflicts are detected (the
function returns 1) for the second function of a multifunction card unless
the length of IO address range required is greater than 0x100.

The following patch will remove this conflict checking for a PCMCIA
function which had not mentioned any specific IO address to be mapped from.

The patch is tested for Linux kernel 2.6.15.4 and works fine in the above
case and is as suggested by Dave Hinds.

Signed-off-by: Kaustav Majumdar <kaustav.majumdar@wipro.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
---
 drivers/pcmcia/pcmcia_resource.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/pcmcia/pcmcia_resource.c b/drivers/pcmcia/pcmcia_resource.c
index 74cebd4..b9201c2 100644
--- a/drivers/pcmcia/pcmcia_resource.c
+++ b/drivers/pcmcia/pcmcia_resource.c
@@ -95,7 +95,7 @@ static int alloc_io_space(struct pcmcia_
 	 * potential conflicts, just the most obvious ones.
 	 */
 	for (i = 0; i < MAX_IO_WIN; i++)
-		if ((s->io[i].res) &&
+		if ((s->io[i].res) && *base &&
 		    ((s->io[i].res->start & (align-1)) == *base))
 			return 1;
 	for (i = 0; i < MAX_IO_WIN; i++) {
-- 
1.4.3


  parent reply	other threads:[~2006-10-26  2:20 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-26  2:10 [RFC PATCH 0/11] pcmcia: bugfixes for 2.6.19-rc3 Dominik Brodowski
2006-10-26  2:11 ` [RFC PATCH 1/11] pcmcia: at91_cf update Dominik Brodowski
2006-10-26  2:12 ` [RFC PATCH 2/11] pcmcia: add more IDs to hostap_cs.c Dominik Brodowski
2006-10-26  2:13 ` Dominik Brodowski [this message]
2006-10-26  2:13 ` [RFC PATCH 4/11] pcmcia/ds: driver layer error checking Dominik Brodowski
2006-10-26  2:14 ` [RFC PATCH 5/11] CONFIG_PM=n slim: drivers/pcmcia/* Dominik Brodowski
2006-10-26  2:14 ` [RFC PATCH 6/11] i82092: wire up errors from pci_register_driver() Dominik Brodowski
2006-10-26  2:15 ` [RFC PATCH 7/11] pcmcia: au1000_generic fix Dominik Brodowski
2006-10-26  2:16 ` [RFC PATCH 8/11] ioremap balanced with iounmap for drivers/pcmcia Dominik Brodowski
2006-10-26  2:17 ` [RFC PATCH 9/11] Export soc_common_drv_pcmcia_remove to allow modular PCMCIA Dominik Brodowski
2006-10-26  2:17 ` [RFC PATCH 10/11] PCMCIA: handle sysfs, PCI errors Dominik Brodowski
2006-10-26  2:18 ` [RFC PATCH 11/11] PCMCIA: fix __must_check warnings Dominik Brodowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20061026021322.GD20473@dominikbrodowski.de \
    --to=linux@dominikbrodowski.net \
    --cc=kaustav.majumdar@wipro.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pcmcia@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®