summaryrefslogtreecommitdiffstats
path: root/drivers/net/qlcnic/qlcnic_init.c
diff options
context:
space:
mode:
authorAmit Kumar Salecha <amit.salecha@qlogic.com>2011-07-14 03:16:54 +0000
committerDavid S. Miller <davem@davemloft.net>2011-07-14 08:49:44 -0700
commitfef0c0600b265ea5d4b1e39574801e6509a1dae6 (patch)
treefbd9e67f698d17bcfb69ecb47c6f9fca5585a02d /drivers/net/qlcnic/qlcnic_init.c
parentf127f4727f3f60359570b6daa136ac1156e38fbf (diff)
downloadop-kernel-dev-fef0c0600b265ea5d4b1e39574801e6509a1dae6.zip
op-kernel-dev-fef0c0600b265ea5d4b1e39574801e6509a1dae6.tar.gz
qlcnic: define error code for loopback test
o Defined error code such as fw not responding, test already running and cable not connected. o Check Fw capability before performing loopback test. Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/qlcnic/qlcnic_init.c')
-rw-r--r--drivers/net/qlcnic/qlcnic_init.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/qlcnic/qlcnic_init.c b/drivers/net/qlcnic/qlcnic_init.c
index 6ec1baa..ee8a398 100644
--- a/drivers/net/qlcnic/qlcnic_init.c
+++ b/drivers/net/qlcnic/qlcnic_init.c
@@ -1354,10 +1354,16 @@ qlcnic_handle_fw_message(int desc_cnt, int index,
break;
case 1:
dev_info(dev, "loopback already in progress\n");
+ adapter->diag_cnt = -QLCNIC_TEST_IN_PROGRESS;
+ break;
+ case 2:
+ dev_info(dev, "loopback cable is not connected\n");
+ adapter->diag_cnt = -QLCNIC_LB_CABLE_NOT_CONN;
break;
default:
dev_info(dev, "loopback configure request failed,"
" ret %x\n", ret);
+ adapter->diag_cnt = -QLCNIC_UNDEFINED_ERROR;
break;
}
break;
OpenPOWER on IntegriCloud