]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
PCI/powerpc: support PCIe fundamental reset
authorMike Mason <mmlnx@us.ibm.com>
Thu, 30 Jul 2009 22:42:39 +0000 (15:42 -0700)
committerJesse Barnes <jbarnes@virtuousgeek.org>
Wed, 9 Sep 2009 20:29:41 +0000 (13:29 -0700)
By default, the EEH framework on powerpc does what's known as a "hot
reset" during recovery of a PCI Express device.  We've found a case
where the device needs a "fundamental reset" to recover properly.  The
current PCI error recovery and EEH frameworks do not support this
distinction.

The attached patch makes changes to EEH to utilize the new bit field.

Signed-off-by: Mike Mason <mmlnx@us.ibm.com>
Signed-off-by: Richard Lary <rlary@us.ibm.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
arch/powerpc/kernel/pci_64.c
arch/powerpc/platforms/pseries/eeh.c

index 9e8902fa14c701a8ca21b6cc2434bb20a12a4dce..b6e9ea45a7193af77419af9d871effffa91cb6b8 100644 (file)
@@ -143,6 +143,7 @@ struct pci_dev *of_create_pci_dev(struct device_node *node,
        dev->dev.bus = &pci_bus_type;
        dev->devfn = devfn;
        dev->multifunction = 0;         /* maybe a lie? */
+       dev->needs_freset = 0;       /* pcie fundamental reset required */
 
        dev->vendor = get_int_prop(node, "vendor-id", 0xffff);
        dev->device = get_int_prop(node, "device-id", 0xffff);
index 989d6462c1547f69674b19f9421feeab75111423..ccd8dd03b8c987e701e476fe43a8f84348901d13 100644 (file)
@@ -744,7 +744,15 @@ int pcibios_set_pcie_reset_state(struct pci_dev *dev, enum pcie_reset_state stat
 
 static void __rtas_set_slot_reset(struct pci_dn *pdn)
 {
-       rtas_pci_slot_reset (pdn, 1);
+       struct pci_dev *dev = pdn->pcidev;
+
+       /* Determine type of EEH reset required by device,
+        * default hot reset or fundamental reset
+        */
+       if (dev->needs_freset)
+               rtas_pci_slot_reset(pdn, 3);
+       else
+               rtas_pci_slot_reset(pdn, 1);
 
        /* The PCI bus requires that the reset be held high for at least
         * a 100 milliseconds. We wait a bit longer 'just in case'.  */