From: Amit Kumar Salecha Date: Tue, 8 Dec 2009 20:40:55 +0000 (+0000) Subject: netxen: fix tx timeout recovery X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6a808c6c02fb9f0ffa24ac7cca6cfc323cf98b21;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git netxen: fix tx timeout recovery 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 Signed-off-by: David S. Miller --- diff --git a/drivers/net/netxen/netxen_nic_init.c b/drivers/net/netxen/netxen_nic_init.c index 02f8d4b4db63..ba62411f3532 100644 --- a/drivers/net/netxen/netxen_nic_init.c +++ b/drivers/net/netxen/netxen_nic_init.c @@ -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; diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c index 41cb0af4b556..1aca6260909a 100644 --- a/drivers/net/netxen/netxen_nic_main.c +++ b/drivers/net/netxen/netxen_nic_main.c @@ -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;