[kernel 2.6.34-rc2] cs: IO port probe 0x100-0x3af: excluding 0x378-0x37f

Dominik Brodowski linux at dominikbrodowski.net
Thu Apr 8 13:29:01 EDT 2010


Hey,

> So I think this is a pcmcia_core problem not _CRS / ACPI.
> 
> It was reliably detected by io_probe before.

I think we got hit by the same issue as at commit
7a96e87d6e58a07235a2bc3eff9b093af4937a72 . Could you test this patch,
please?

Best,
	Dominik


Author: Dominik Brodowski <linux at dominikbrodowski.net>
Date:   Thu Apr 8 19:23:07 2010 +0200

    pcmcia: fix io_probe due to parent (PCI) resources
    
    Similar to commit 7a96e87d, we need to be aware of any parent PCI
    device when requesting IO regions, even only for testing
    ("probing").
    
    Reported-by: Komuro <komurojun-mbn at nifty.com>
    Signed-off-by: Dominik Brodowski <linux at dominikbrodowski.net>

diff --git a/drivers/pcmcia/rsrc_nonstatic.c b/drivers/pcmcia/rsrc_nonstatic.c
index 559069a..1178a82 100644
--- a/drivers/pcmcia/rsrc_nonstatic.c
+++ b/drivers/pcmcia/rsrc_nonstatic.c
@@ -214,7 +214,7 @@ static void do_io_probe(struct pcmcia_socket *s, unsigned int base,
 		return;
 	}
 	for (i = base, most = 0; i < base+num; i += 8) {
-		res = claim_region(NULL, i, 8, IORESOURCE_IO, "PCMCIA ioprobe");
+		res = claim_region(s, i, 8, IORESOURCE_IO, "PCMCIA ioprobe");
 		if (!res)
 			continue;
 		hole = inb(i);
@@ -231,9 +231,14 @@ static void do_io_probe(struct pcmcia_socket *s, unsigned int base,
 
 	bad = any = 0;
 	for (i = base; i < base+num; i += 8) {
-		res = claim_region(NULL, i, 8, IORESOURCE_IO, "PCMCIA ioprobe");
-		if (!res)
+		res = claim_region(s, i, 8, IORESOURCE_IO, "PCMCIA ioprobe");
+		if (!res) {
+			if (!any)
+				printk(" excluding");
+			if (!bad)
+				bad = any = i;
 			continue;
+		}
 		for (j = 0; j < 8; j++)
 			if (inb(i+j) != most)
 				break;
@@ -253,6 +258,7 @@ static void do_io_probe(struct pcmcia_socket *s, unsigned int base,
 	}
 	if (bad) {
 		if ((num > 16) && (bad == base) && (i == base+num)) {
+			sub_interval(&s_data->io_db, bad, i-bad);
 			printk(" nothing: probe failed.\n");
 			return;
 		} else {



More information about the linux-pcmcia mailing list