Skip to content

Commit

Permalink
net/tg3: Release IRQs on permanent error
Browse files Browse the repository at this point in the history
When having permanent EEH error, the PCI device will be removed
from the system. For this case, we shouldn't set pcierr_recovery
to true wrongly, which blocks the driver to release the allocated
interrupts and their handlers. Eventually, we can't disable MSI
or MSIx successfully because of the MSI or MSIx interrupts still
have associated interrupt actions, which is turned into following
stack dump.

Oops: Exception in kernel mode, sig: 5 [#1]
        :
[c0000000003b76a8] .free_msi_irqs+0x80/0x1a0 (unreliable)
[c00000000039f388] .pci_remove_bus_device+0x98/0x110
[c0000000000790f4] .pcibios_remove_pci_devices+0x9c/0x128
[c000000000077b98] .handle_eeh_events+0x2d8/0x4b0
[c0000000000782d0] .eeh_event_handler+0x130/0x1c0
[c000000000022bd4] .kernel_thread+0x54/0x70

Signed-off-by: Gavin Shan <[email protected]>
Acked-by: Prashant Sreedharan <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Gavin Shan authored and davem330 committed Apr 25, 2015
1 parent 2d6c909 commit dfc8f37
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/net/ethernet/broadcom/tg3.c
Original file line number Diff line number Diff line change
Expand Up @@ -18129,7 +18129,9 @@ static pci_ers_result_t tg3_io_error_detected(struct pci_dev *pdev,

rtnl_lock();

tp->pcierr_recovery = true;
/* We needn't recover from permanent error */
if (state == pci_channel_io_frozen)
tp->pcierr_recovery = true;

/* We probably don't have netdev yet */
if (!netdev || !netif_running(netdev))
Expand Down

0 comments on commit dfc8f37

Please sign in to comment.