mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 04:10:18 +09:00
bnxt_en: Improve AER slot reset.
[ Upstream commitbae361c54f] Improve the slot reset sequence by disabling the device to prevent bad DMAs if slot reset fails. Return the proper result instead of always PCI_ERS_RESULT_RECOVERED to the caller. Fixes:6316ea6db9("bnxt_en: Enable AER support.") Signed-off-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
7fb0515467
commit
f4bcdb1b3f
@@ -7166,8 +7166,11 @@ static pci_ers_result_t bnxt_io_slot_reset(struct pci_dev *pdev)
|
||||
result = PCI_ERS_RESULT_RECOVERED;
|
||||
}
|
||||
|
||||
if (result != PCI_ERS_RESULT_RECOVERED && netif_running(netdev))
|
||||
dev_close(netdev);
|
||||
if (result != PCI_ERS_RESULT_RECOVERED) {
|
||||
if (netif_running(netdev))
|
||||
dev_close(netdev);
|
||||
pci_disable_device(pdev);
|
||||
}
|
||||
|
||||
rtnl_unlock();
|
||||
|
||||
@@ -7178,7 +7181,7 @@ static pci_ers_result_t bnxt_io_slot_reset(struct pci_dev *pdev)
|
||||
err); /* non-fatal, continue */
|
||||
}
|
||||
|
||||
return PCI_ERS_RESULT_RECOVERED;
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user