Skip to content

Commit

Permalink
netxen: fix tx timeout recovery
Browse files Browse the repository at this point in the history
o In case of tx timeout, firmare may be healthy, but some pci-func may
  see no response from it. Force firmware reset, if some pci-func
  explicitly requests so.

Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Amit Kumar Salecha authored and David S. Miller committed Dec 23, 2009
1 parent bc86fcb commit 6a808c6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions drivers/net/netxen/netxen_nic_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -778,6 +778,9 @@ netxen_need_fw_reset(struct netxen_adapter *adapter)
if (NX_IS_REVISION_P2(adapter->ahw.revision_id))
return 1;

if (adapter->need_fw_reset)
return 1;

/* last attempt had failed */
if (NXRD32(adapter, CRB_CMDPEG_STATE) == PHAN_INITIALIZE_FAILED)
return 1;
Expand Down
4 changes: 3 additions & 1 deletion drivers/net/netxen/netxen_nic_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2284,8 +2284,10 @@ netxen_check_health(struct netxen_adapter *adapter)
}

state = NXRD32(adapter, NX_CRB_DEV_STATE);
if (state == NX_DEV_NEED_RESET)
if (state == NX_DEV_NEED_RESET) {
adapter->need_fw_reset = 1;
goto detach;
}

if (NX_IS_REVISION_P2(adapter->ahw.revision_id))
return 0;
Expand Down

0 comments on commit 6a808c6

Please sign in to comment.