diff options
Diffstat (limited to 'drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c')
-rw-r--r-- | drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c | 5 |
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 2230a62268a..b127f809421 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; } |