* [PATCH] cxgb4: fix error recovery when t4_fw_hello returns a positive value
@ 2013-05-03 18:11 Thadeu Lima de Souza Cascardo
2013-05-03 20:13 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Thadeu Lima de Souza Cascardo @ 2013-05-03 18:11 UTC (permalink / raw)
To: netdev; +Cc: dm, linux-kernel, Thadeu Lima de Souza Cascardo
Since commit 636f9d371f70f22961fd598fe18380057518ca31 ("cxgb4: Add
support for T4 configuration file"), t4_fw_hello may return a positive
value instead of 0 for success. The recovery code tests only for zero
and fails recovery for any other value.
This fix tests for negative error values and fails only on those cases.
Error recovery after an error injection works after this change.
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
---
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
index c306df7..bb4ad38 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
@@ -4538,7 +4538,7 @@ static pci_ers_result_t eeh_slot_reset(struct pci_dev *pdev)
if (t4_wait_dev_ready(adap) < 0)
return PCI_ERS_RESULT_DISCONNECT;
- if (t4_fw_hello(adap, adap->fn, adap->fn, MASTER_MUST, NULL))
+ if (t4_fw_hello(adap, adap->fn, adap->fn, MASTER_MUST, NULL) < 0)
return PCI_ERS_RESULT_DISCONNECT;
adap->flags |= FW_OK;
if (adap_init1(adap, &c))
--
1.7.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] cxgb4: fix error recovery when t4_fw_hello returns a positive value
2013-05-03 18:11 [PATCH] cxgb4: fix error recovery when t4_fw_hello returns a positive value Thadeu Lima de Souza Cascardo
@ 2013-05-03 20:13 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2013-05-03 20:13 UTC (permalink / raw)
To: cascardo; +Cc: netdev, dm, linux-kernel
From: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
Date: Fri, 3 May 2013 15:11:04 -0300
> Since commit 636f9d371f70f22961fd598fe18380057518ca31 ("cxgb4: Add
> support for T4 configuration file"), t4_fw_hello may return a positive
> value instead of 0 for success. The recovery code tests only for zero
> and fails recovery for any other value.
>
> This fix tests for negative error values and fails only on those cases.
> Error recovery after an error injection works after this change.
>
> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-05-03 20:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-03 18:11 [PATCH] cxgb4: fix error recovery when t4_fw_hello returns a positive value Thadeu Lima de Souza Cascardo
2013-05-03 20:13 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®