Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 247015
b: refs/heads/master
c: 89b4208
h: refs/heads/master
i:
  247013: 9e3b6f4
  247011: 7537511
  247007: 5c078c1
v: v3
  • Loading branch information
Sucheta Chakraborty authored and David S. Miller committed Apr 28, 2011
1 parent 95f0ce9 commit 96bd276
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 63c3a66fe6c827a731dcbdee181158b295626f83
refs/heads/master: 89b4208e2861bc7dc325840b44bae302a4e30add
2 changes: 1 addition & 1 deletion trunk/drivers/net/qlcnic/qlcnic.h
Original file line number Diff line number Diff line change
Expand Up @@ -884,6 +884,7 @@ struct qlcnic_ipaddr {
#define __QLCNIC_RESETTING 2
#define __QLCNIC_START_FW 4
#define __QLCNIC_AER 5
#define __QLCNIC_DIAG_RES_ALLOC 6

#define QLCNIC_INTERRUPT_TEST 1
#define QLCNIC_LOOPBACK_TEST 2
Expand Down Expand Up @@ -913,7 +914,6 @@ struct qlcnic_adapter {
struct net_device *netdev;
struct pci_dev *pdev;

bool blink_was_down;
unsigned long state;
u32 flags;

Expand Down
12 changes: 5 additions & 7 deletions trunk/drivers/net/qlcnic/qlcnic_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -772,7 +772,6 @@ static int qlcnic_set_led(struct net_device *dev,

switch (state) {
case ETHTOOL_ID_ACTIVE:
adapter->blink_was_down = false;
if (!test_bit(__QLCNIC_DEV_UP, &adapter->state)) {
if (test_and_set_bit(__QLCNIC_RESETTING, &adapter->state))
return -EIO;
Expand All @@ -781,7 +780,7 @@ static int qlcnic_set_led(struct net_device *dev,
clear_bit(__QLCNIC_RESETTING, &adapter->state);
return -EIO;
}
adapter->blink_was_down = true;
set_bit(__QLCNIC_DIAG_RES_ALLOC, &adapter->state);
}

if (adapter->nic_ops->config_led(adapter, 1, 0xf) == 0)
Expand All @@ -792,18 +791,17 @@ static int qlcnic_set_led(struct net_device *dev,
break;

case ETHTOOL_ID_INACTIVE:
if (adapter->nic_ops->config_led(adapter, 0, 0xf) == 0)
return 0;
if (adapter->nic_ops->config_led(adapter, 0, 0xf))
dev_err(&adapter->pdev->dev,
"Failed to reset LED blink state.\n");

dev_err(&adapter->pdev->dev,
"Failed to reset LED blink state.\n");
break;

default:
return -EINVAL;
}

if (adapter->blink_was_down) {
if (test_and_clear_bit(__QLCNIC_DIAG_RES_ALLOC, &adapter->state)) {
qlcnic_diag_free_res(dev, max_sds_rings);
clear_bit(__QLCNIC_RESETTING, &adapter->state);
}
Expand Down

0 comments on commit 96bd276

Please sign in to comment.