Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 183786
b: refs/heads/master
c: 1b95a83
h: refs/heads/master
v: v3
  • Loading branch information
Amit Kumar Salecha authored and David S. Miller committed Feb 2, 2010
1 parent 0640fa6 commit 27cbf7b
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 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: 02420be6fc5fc63526aca43b5bfc571547a1c926
refs/heads/master: 1b95a839587f40abab2f9cb3e5254dc821b9829b
22 changes: 21 additions & 1 deletion trunk/drivers/net/qlcnic/qlcnic_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1866,6 +1866,23 @@ qlcnic_set_drv_state(struct qlcnic_adapter *adapter, int state)
qlcnic_api_unlock(adapter);
}

static int
qlcnic_clr_drv_state(struct qlcnic_adapter *adapter)
{
u32 val;

if (qlcnic_api_lock(adapter))
return -EBUSY;

val = QLCRD32(adapter, QLCNIC_CRB_DRV_STATE);
val &= ~((u32)0x3 << (adapter->portnum * 4));
QLCWR32(adapter, QLCNIC_CRB_DRV_STATE, val);

qlcnic_api_unlock(adapter);

return 0;
}

static void
qlcnic_clr_all_drv_state(struct qlcnic_adapter *adapter)
{
Expand Down Expand Up @@ -2119,7 +2136,10 @@ qlcnic_attach_work(struct work_struct *work)
done:
adapter->fw_fail_cnt = 0;
clear_bit(__QLCNIC_RESETTING, &adapter->state);
qlcnic_schedule_work(adapter, qlcnic_fw_poll_work, FW_POLL_DELAY);

if (!qlcnic_clr_drv_state(adapter))
qlcnic_schedule_work(adapter, qlcnic_fw_poll_work,
FW_POLL_DELAY);
}

static int
Expand Down

0 comments on commit 27cbf7b

Please sign in to comment.