Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 183815
b: refs/heads/master
c: 4bbd1a1
h: refs/heads/master
i:
  183813: 91162bd
  183811: 67f682a
  183807: 6a6d42c
v: v3
  • Loading branch information
Ron Mercer authored and David S. Miller committed Feb 4, 2010
1 parent 04e0a63 commit 24ff83b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a112fd4ce3ed965dfb8dc6791622cb4f25ba3619
refs/heads/master: 4bbd1a1903639f826215d76af74f4901efc34daa
1 change: 1 addition & 0 deletions trunk/drivers/net/qlge/qlge.h
Original file line number Diff line number Diff line change
Expand Up @@ -2005,6 +2005,7 @@ enum {
QL_SELFTEST = 9,
QL_LB_LINK_UP = 10,
QL_FRC_COREDUMP = 11,
QL_EEH_FATAL = 12,
};

/* link_status bit definitions */
Expand Down
14 changes: 14 additions & 0 deletions trunk/drivers/net/qlge/qlge_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -3929,6 +3929,16 @@ static int qlge_close(struct net_device *ndev)
{
struct ql_adapter *qdev = netdev_priv(ndev);

/* If we hit pci_channel_io_perm_failure
* failure condition, then we already
* brought the adapter down.
*/
if (test_bit(QL_EEH_FATAL, &qdev->flags)) {
QPRINTK(qdev, DRV, ERR, "EEH fatal did unload.\n");
clear_bit(QL_EEH_FATAL, &qdev->flags);
return 0;
}

/*
* Wait for device to recover from a reset.
* (Rarely happens, but possible.)
Expand Down Expand Up @@ -4677,6 +4687,7 @@ static pci_ers_result_t qlge_io_error_detected(struct pci_dev *pdev,
enum pci_channel_state state)
{
struct net_device *ndev = pci_get_drvdata(pdev);
struct ql_adapter *qdev = netdev_priv(ndev);

switch (state) {
case pci_channel_io_normal:
Expand All @@ -4690,6 +4701,8 @@ static pci_ers_result_t qlge_io_error_detected(struct pci_dev *pdev,
case pci_channel_io_perm_failure:
dev_err(&pdev->dev,
"%s: pci_channel_io_perm_failure.\n", __func__);
ql_eeh_close(ndev);
set_bit(QL_EEH_FATAL, &qdev->flags);
return PCI_ERS_RESULT_DISCONNECT;
}

Expand Down Expand Up @@ -4720,6 +4733,7 @@ static pci_ers_result_t qlge_io_slot_reset(struct pci_dev *pdev)

if (ql_adapter_reset(qdev)) {
QPRINTK(qdev, DRV, ERR, "reset FAILED!\n");
set_bit(QL_EEH_FATAL, &qdev->flags);
return PCI_ERS_RESULT_DISCONNECT;
}

Expand Down

0 comments on commit 24ff83b

Please sign in to comment.