]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
be2net: Fix unnecessary delay in PCI EEH
authorPadmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Sat, 20 Oct 2012 06:03:37 +0000 (06:03 +0000)
committerMaxim Uvarov <maxim.uvarov@oracle.com>
Mon, 17 Dec 2012 08:42:39 +0000 (00:42 -0800)
During PCI EEH, driver waits for all functions in the card.
Wait is needed only once per card. Fix is to wait only for the
first PCI function.

Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/benet/be_main.c

index ecd28752483d4b38dbd7dff536a8c9db13c1285e..34b65d4dd6d20cec80d22e1fe9fe91995e2cb803 100644 (file)
@@ -4217,9 +4217,13 @@ static pci_ers_result_t be_eeh_err_detected(struct pci_dev *pdev,
 
        /* The error could cause the FW to trigger a flash debug dump.
         * Resetting the card while flash dump is in progress
-        * can cause it not to recover; wait for it to finish
+        * can cause it not to recover; wait for it to finish.
+        * Wait only for first function as it is needed only once per
+        * adapter.
         */
-       ssleep(30);
+       if (pdev->devfn == 0)
+               ssleep(30);
+
        return PCI_ERS_RESULT_NEED_RESET;
 }