Commit 9a05f92b authored by Jitendra Kalsaria's avatar Jitendra Kalsaria Committed by David S. Miller

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: default avatarJitendra Kalsaria <jitendra.kalsaria@qlogic.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 58ead415
...@@ -1436,13 +1436,15 @@ int qlcnic_83xx_set_lb_mode(struct qlcnic_adapter *adapter, u8 mode) ...@@ -1436,13 +1436,15 @@ int qlcnic_83xx_set_lb_mode(struct qlcnic_adapter *adapter, u8 mode)
return status; return status;
} }
/* Wait until firmware send IDC Completion AEN */ /* Wait for Link and IDC Completion AEN */
do { do {
msleep(300); msleep(300);
qlcnic_83xx_process_aen(adapter);
if (loop++ > QLCNIC_ILB_MAX_RCV_LOOP) { if (loop++ > QLCNIC_ILB_MAX_RCV_LOOP) {
dev_err(&adapter->pdev->dev, dev_err(&adapter->pdev->dev,
"FW did not generate IDC completion AEN\n"); "FW did not generate IDC completion AEN\n");
clear_bit(QLC_83XX_IDC_COMP_AEN, &ahw->idc.status); clear_bit(QLC_83XX_IDC_COMP_AEN, &ahw->idc.status);
qlcnic_83xx_clear_lb_mode(adapter, mode);
return -EIO; return -EIO;
} }
} while (test_bit(QLC_83XX_IDC_COMP_AEN, &ahw->idc.status)); } 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) ...@@ -1474,9 +1476,10 @@ int qlcnic_83xx_clear_lb_mode(struct qlcnic_adapter *adapter, u8 mode)
return status; return status;
} }
/* Wait until firmware send IDC Completion AEN */ /* Wait for Link and IDC Completion AEN */
do { do {
msleep(300); msleep(300);
qlcnic_83xx_process_aen(adapter);
if (loop++ > QLCNIC_ILB_MAX_RCV_LOOP) { if (loop++ > QLCNIC_ILB_MAX_RCV_LOOP) {
dev_err(&adapter->pdev->dev, dev_err(&adapter->pdev->dev,
"Firmware didn't sent IDC completion AEN\n"); "Firmware didn't sent IDC completion AEN\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment