diff options
author | Jitendra Kalsaria <jitendra.kalsaria@qlogic.com> | 2013-02-09 09:29:53 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-02-11 02:04:13 -0500 |
commit | 9a05f92bbb46211b315222f4cf70731a97f932ed (patch) | |
tree | 1f2e4c9dd5d9072f4e23403558516a397ee61f88 /drivers | |
parent | 58ead415a1a7d6800ed4eb3eeed12daedc27ffe6 (diff) |
qlcnic: fix async event handling during diagnostic loopback test
o Handle async events during diagnostic loopback test
o Clear loopback mode on failure to receive async events
Signed-off-by: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c index 36c14748636..51b4340deff 100644 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c @@ -1436,13 +1436,15 @@ int qlcnic_83xx_set_lb_mode(struct qlcnic_adapter *adapter, u8 mode) return status; } - /* Wait until firmware send IDC Completion AEN */ + /* Wait for Link and IDC Completion AEN */ do { msleep(300); + qlcnic_83xx_process_aen(adapter); if (loop++ > QLCNIC_ILB_MAX_RCV_LOOP) { dev_err(&adapter->pdev->dev, "FW did not generate IDC completion AEN\n"); clear_bit(QLC_83XX_IDC_COMP_AEN, &ahw->idc.status); + qlcnic_83xx_clear_lb_mode(adapter, mode); return -EIO; } } while (test_bit(QLC_83XX_IDC_COMP_AEN, &ahw->idc.status)); @@ -1474,9 +1476,10 @@ int qlcnic_83xx_clear_lb_mode(struct qlcnic_adapter *adapter, u8 mode) return status; } - /* Wait until firmware send IDC Completion AEN */ + /* Wait for Link and IDC Completion AEN */ do { msleep(300); + qlcnic_83xx_process_aen(adapter); if (loop++ > QLCNIC_ILB_MAX_RCV_LOOP) { dev_err(&adapter->pdev->dev, "Firmware didn't sent IDC completion AEN\n"); |