Messages in this thread Patch in this message |  | | Date | Wed, 20 Sep 2000 00:50:39 -0400 | From | Jeff Garzik <> | Subject | Re: PATCH 2.4.0.9.4: Fix Cardbus |
| |
Jeff Garzik wrote: > With the attached tested patch against 2.4.0-test9-pre4, CardBus is > working again for me. This patch makes the logic match that of the old > code.
-ENOSLEEP. Here is the patch.Index: drivers/pci/pci.c =================================================================== RCS file: /g/cvslan/linux_2_3/drivers/pci/pci.c,v retrieving revision 1.1.1.30 diff -u -r1.1.1.30 pci.c --- drivers/pci/pci.c 2000/09/17 19:44:33 1.1.1.30 +++ drivers/pci/pci.c 2000/09/20 04:45:26 @@ -693,6 +693,10 @@ if (!is_cardbus) { unsigned int cmax = pci_do_scan_bus(child); if (cmax > max) max = cmax; + } else { + int i; + for (i = 0; i < 4; i++) + child->resource[i] = &dev->resource[PCI_BRIDGE_RESOURCES+i]; } } else { /* @@ -718,12 +722,15 @@ /* Now we can scan all subordinate buses... */ max = pci_do_scan_bus(child); } else { + int i; /* * For CardBus bridges, we leave 4 bus numbers * as cards with a PCI-to-PCI bridge can be * inserted later. */ max += 3; + for (i = 0; i < 4; i++) + child->resource[i] = &dev->resource[PCI_BRIDGE_RESOURCES+i]; } /* * Set the subordinate bus number to its real value. |  |