Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 265162
b: refs/heads/master
c: 032a13c
h: refs/heads/master
v: v3
  • Loading branch information
Sritej Velaga authored and David S. Miller committed Aug 1, 2011
1 parent 59c3161 commit d12115f
Show file tree
Hide file tree
Showing 4 changed files with 9 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: 3d46512c642248fcb33f3b3ee2b2a80e2b09cd9c
refs/heads/master: 032a13c7d70f3f40877b298e4c62469980f27a1f
1 change: 1 addition & 0 deletions trunk/drivers/net/qlcnic/qlcnic.h
Original file line number Diff line number Diff line change
Expand Up @@ -911,6 +911,7 @@ struct qlcnic_ipaddr {
#define QLCNIC_PROMISC_DISABLED 0x800
#define QLCNIC_NEED_FLR 0x1000
#define QLCNIC_FW_RESET_OWNER 0x2000
#define QLCNIC_FW_HANG 0x4000
#define QLCNIC_IS_MSI_FAMILY(adapter) \
((adapter)->flags & (QLCNIC_MSI_ENABLED | QLCNIC_MSIX_ENABLED))

Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/net/qlcnic/qlcnic_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -1056,7 +1056,8 @@ qlcnic_check_fw_hearbeat(struct qlcnic_adapter *adapter)
int
qlcnic_need_fw_reset(struct qlcnic_adapter *adapter)
{
if (qlcnic_check_fw_hearbeat(adapter)) {
if ((adapter->flags & QLCNIC_FW_HANG) ||
qlcnic_check_fw_hearbeat(adapter)) {
qlcnic_rom_lock_recovery(adapter);
return 1;
}
Expand Down
5 changes: 5 additions & 0 deletions trunk/drivers/net/qlcnic/qlcnic_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2682,6 +2682,7 @@ qlcnic_clr_all_drv_state(struct qlcnic_adapter *adapter, u8 failed)
qlcnic_api_unlock(adapter);
err:
adapter->fw_fail_cnt = 0;
adapter->flags &= ~QLCNIC_FW_HANG;
clear_bit(__QLCNIC_START_FW, &adapter->state);
clear_bit(__QLCNIC_RESETTING, &adapter->state);
}
Expand Down Expand Up @@ -2859,6 +2860,7 @@ qlcnic_fwinit_work(struct work_struct *work)
(adapter->flags & QLCNIC_FW_RESET_OWNER)) {
QLCDB(adapter, DRV, "Take FW dump\n");
qlcnic_dump_fw(adapter);
adapter->flags |= QLCNIC_FW_HANG;
}
rtnl_unlock();

Expand Down Expand Up @@ -3046,6 +3048,7 @@ qlcnic_attach_work(struct work_struct *work)
done:
netif_device_attach(netdev);
adapter->fw_fail_cnt = 0;
adapter->flags &= ~QLCNIC_FW_HANG;
clear_bit(__QLCNIC_RESETTING, &adapter->state);

if (!qlcnic_clr_drv_state(adapter))
Expand Down Expand Up @@ -3090,6 +3093,8 @@ qlcnic_check_health(struct qlcnic_adapter *adapter)
if (++adapter->fw_fail_cnt < FW_FAIL_THRESH)
return 0;

adapter->flags |= QLCNIC_FW_HANG;

qlcnic_dev_request_reset(adapter);

if (auto_fw_reset)
Expand Down

0 comments on commit d12115f

Please sign in to comment.