diff options
author | Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com> | 2013-05-03 08:11:04 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-05-03 16:10:34 -0400 |
commit | 777c2300865cb9b1b1791862ed23da677abfe6dc (patch) | |
tree | 49d8d38a032addb7160064c8de8bb91b11d781be | |
parent | 88dccf5b344163645d694d74cffc5a7e64a385bb (diff) | |
download | op-kernel-dev-777c2300865cb9b1b1791862ed23da677abfe6dc.zip op-kernel-dev-777c2300865cb9b1b1791862ed23da677abfe6dc.tar.gz |
cxgb4: fix error recovery when t4_fw_hello returns a positive value
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | 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 c59ec3d..3cd397d 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c +++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c @@ -5204,7 +5204,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)) |