summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c
diff options
context:
space:
mode:
authorSucheta Chakraborty <sucheta.chakraborty@qlogic.com>2011-08-29 12:50:30 +0000
committerDavid S. Miller <davem@davemloft.net>2011-08-29 22:52:50 -0400
commit728a98b831eecada40b36df53420d57e9292c880 (patch)
treee4bac789f65990bc6bcc5e82cd71f6a32ceca732 /drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c
parent9254b751492c7fc08497a5c0e0cd668ddd269ea2 (diff)
downloadblackbird-op-linux-728a98b831eecada40b36df53420d57e9292c880.tar.gz
blackbird-op-linux-728a98b831eecada40b36df53420d57e9292c880.zip
qlcnic: add beacon test support.
Beacon test flashes both port LEDs instead of just 1 LED of a port. Updated driver version to 5.0.23. Signed-off-by: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com> Signed-off-by: Sony Chacko <sony.chacko@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c')
-rw-r--r--drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c
index 2230a62268aa..b127f809421b 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c
@@ -939,6 +939,9 @@ static int qlcnic_set_led(struct net_device *dev,
switch (state) {
case ETHTOOL_ID_ACTIVE:
+ if (test_and_set_bit(__QLCNIC_LED_ENABLE, &adapter->state))
+ return -EBUSY;
+
if (!test_bit(__QLCNIC_DEV_UP, &adapter->state)) {
if (test_and_set_bit(__QLCNIC_RESETTING, &adapter->state))
return -EIO;
@@ -973,6 +976,8 @@ static int qlcnic_set_led(struct net_device *dev,
clear_bit(__QLCNIC_RESETTING, &adapter->state);
}
+ clear_bit(__QLCNIC_LED_ENABLE, &adapter->state);
+
return -EIO;
}
OpenPOWER on IntegriCloud