Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 194328
b: refs/heads/master
c: ade91f8
h: refs/heads/master
v: v3
  • Loading branch information
Amit Kumar Salecha authored and David S. Miller committed Apr 22, 2010
1 parent cbcda8f commit 8b7860a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 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: 6d2a47241f0f780819c111eaabaae0e86a937a40
refs/heads/master: ade91f8ec92da43b62b0efaa854cfd4b5ec0c0c9
11 changes: 7 additions & 4 deletions trunk/drivers/net/qlcnic/qlcnic_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1949,16 +1949,16 @@ static void qlcnic_poll_controller(struct net_device *netdev)
}
#endif

static void
qlcnic_set_drv_state(struct qlcnic_adapter *adapter, int state)
static int
qlcnic_set_drv_state(struct qlcnic_adapter *adapter, u8 state)
{
u32 val;

WARN_ON(state != QLCNIC_DEV_NEED_RESET &&
state != QLCNIC_DEV_NEED_QUISCENT);

if (qlcnic_api_lock(adapter))
return ;
return -EIO;

val = QLCRD32(adapter, QLCNIC_CRB_DRV_STATE);

Expand All @@ -1970,6 +1970,8 @@ qlcnic_set_drv_state(struct qlcnic_adapter *adapter, int state)
QLCWR32(adapter, QLCNIC_CRB_DRV_STATE, val);

qlcnic_api_unlock(adapter);

return 0;
}

static int
Expand Down Expand Up @@ -2195,7 +2197,8 @@ qlcnic_detach_work(struct work_struct *work)
if (adapter->temp == QLCNIC_TEMP_PANIC)
goto err_ret;

qlcnic_set_drv_state(adapter, adapter->dev_state);
if (qlcnic_set_drv_state(adapter, adapter->dev_state))
goto err_ret;

adapter->fw_wait_cnt = 0;

Expand Down

0 comments on commit 8b7860a

Please sign in to comment.