Skip to content

Commit c80b653

Browse files
Thinh Trankuba-moo
authored andcommitted
i40e: Fully suspend and resume IO operations in EEH case
When EEH events occurs, the callback functions in the i40e, which are managed by the EEH driver, will completely suspend and resume all IO operations. - In the PCI error detected callback, replaced i40e_prep_for_reset() with i40e_io_suspend(). The change is to fully suspend all I/O operations - In the PCI error slot reset callback, replaced pci_enable_device_mem() with pci_enable_device(). This change enables both I/O and memory of the device. - In the PCI error resume callback, replaced i40e_handle_reset_warning() with i40e_io_resume(). This change allows the system to resume I/O operations Fixes: a5f3d2c ("powerpc/pseries/pci: Add MSI domains") Reviewed-by: Jacob Keller <[email protected]> Tested-by: Robert Thomas <[email protected]> Signed-off-by: Thinh Tran <[email protected]> Reviewed-by: Simon Horman <[email protected]> Tested-by: Pucha Himasekhar Reddy <[email protected]> Signed-off-by: Jacob Keller <[email protected]> Link: https://lore.kernel.org/r/20240528-net-2024-05-28-intel-net-fixes-v1-3-dc8593d2bbc6@intel.com Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 218ed82 commit c80b653

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

drivers/net/ethernet/intel/i40e/i40e_main.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11171,6 +11171,8 @@ static void i40e_reset_and_rebuild(struct i40e_pf *pf, bool reinit,
1117111171
ret = i40e_reset(pf);
1117211172
if (!ret)
1117311173
i40e_rebuild(pf, reinit, lock_acquired);
11174+
else
11175+
dev_err(&pf->pdev->dev, "%s: i40e_reset() FAILED", __func__);
1117411176
}
1117511177

1117611178
/**
@@ -16491,7 +16493,7 @@ static pci_ers_result_t i40e_pci_error_detected(struct pci_dev *pdev,
1649116493

1649216494
/* shutdown all operations */
1649316495
if (!test_bit(__I40E_SUSPENDED, pf->state))
16494-
i40e_prep_for_reset(pf);
16496+
i40e_io_suspend(pf);
1649516497

1649616498
/* Request a slot reset */
1649716499
return PCI_ERS_RESULT_NEED_RESET;
@@ -16513,7 +16515,8 @@ static pci_ers_result_t i40e_pci_error_slot_reset(struct pci_dev *pdev)
1651316515
u32 reg;
1651416516

1651516517
dev_dbg(&pdev->dev, "%s\n", __func__);
16516-
if (pci_enable_device_mem(pdev)) {
16518+
/* enable I/O and memory of the device */
16519+
if (pci_enable_device(pdev)) {
1651716520
dev_info(&pdev->dev,
1651816521
"Cannot re-enable PCI device after reset.\n");
1651916522
result = PCI_ERS_RESULT_DISCONNECT;
@@ -16576,7 +16579,7 @@ static void i40e_pci_error_resume(struct pci_dev *pdev)
1657616579
if (test_bit(__I40E_SUSPENDED, pf->state))
1657716580
return;
1657816581

16579-
i40e_handle_reset_warning(pf, false);
16582+
i40e_io_resume(pf);
1658016583
}
1658116584

1658216585
/**

0 commit comments

Comments
 (0)