Skip to content

Commit

Permalink
be2net: Fix unnecessary delay in PCI EEH
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Padmanabh Ratnakar authored and David S. Miller committed Oct 22, 2012
1 parent aa790db commit c8a5416
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions drivers/net/ethernet/emulex/benet/be_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -4201,9 +4201,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;
}

Expand Down

0 comments on commit c8a5416

Please sign in to comment.