CardBus card not recognized

Martin Mares mj at ucw.cz
Thu Jun 2 13:55:55 EDT 2005


Hello, world!\n

I've just tried Linux 2.6.11.11 on my ancient Thinkpad 560X (TI 1250 CardBus
bridge) and it doesn't recognize any CardBus card. After some experimenting
(well, about one afternoon :) ), it turned out that the first access to the
configuration space of the card after configuring the slot returns 0xffffffff.

Waiting for a while doesn't help, but reading the vendor and device ID before
probing the PCI slot, as done by the attached patch, makes the devices
detected correctly.

To be honest, I don't understand why does this happen, so maybe I'm overlooking
a deeper problem.
 
				Have a nice fortnight
-- 
Martin `MJ' Mares   <mj at ucw.cz>   http://atrey.karlin.mff.cuni.cz/~mj/
Faculty of Math and Physics, Charles University, Prague, Czech Rep., Earth
"In accord to UNIX philosophy, PERL gives you enough rope to hang yourself." -- Larry Wall


diff -ru linux-2.6.11/drivers/pcmcia/cardbus.c linux-2.6.11.11-abacus/drivers/pcmcia/cardbus.c
--- linux-2.6.11.11/drivers/pcmcia/cardbus.c	2005-04-22 13:04:52 +0200
+++ linux-2.6.11.11-abacus/drivers/pcmcia/cardbus.c	2005-06-02 19:48:18 +0200
@@ -213,6 +213,10 @@
 	struct pci_dev *dev;
 	unsigned int max, pass;
 
+	/* The first access tends to fail on some bridges, so do something harmless. --MJ */
+	u32 l;
+	pci_bus_read_config_dword(bus, PCI_DEVFN(0, 0), PCI_VENDOR_ID, &l);
+
 	s->functions = pci_scan_slot(bus, PCI_DEVFN(0, 0));
 //	pcibios_fixup_bus(bus);



More information about the linux-pcmcia mailing list