Re: PATCH 2.4.0.9.4: Fix Cardbus

From: Jeff Garzik (jgarzik@mandrakesoft.com)
Date: Tue Sep 19 2000 - 23:50:39 EST


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.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Sep 23 2000 - 21:00:22 EST