summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/broadcom/cnic_defs.h
diff options
context:
space:
mode:
authorMichael Chan <mchan@broadcom.com>2012-01-04 13:12:28 +0100
committerDavid S. Miller <davem@davemloft.net>2012-01-05 20:01:21 +0100
commit23021c21055f88a428b6deb6f803fa0d659e023f (patch)
treeb4f68704f88dc918d411662dd18c3e6c5b51d313 /drivers/net/ethernet/broadcom/cnic_defs.h
parentcnic: Re-init dev->stats_addr after chip reset (diff)
downloadlinux-23021c21055f88a428b6deb6f803fa0d659e023f.tar.xz
linux-23021c21055f88a428b6deb6f803fa0d659e023f.zip
cnic: Improve error recovery on bnx2x devices
When a bnx2x device encounters parity errors, it will not respond to all SPQ messages. As a result, the shutdown sequence before reset can take a long time as the ulp drivers (bnx2i/bnx2fc) have to wait for timeout of all such messages. To improve this scenario, when bnx2x returns error on the SPQ, we'll send an immediate response to the ulp drivers to avoid such lengthy timeouts. Adjust the return code of relevant functions to return error only if the message cannot be sent on the SPQ so that we'll generate an error completion to the ulp drivers. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom/cnic_defs.h')
-rw-r--r--drivers/net/ethernet/broadcom/cnic_defs.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/broadcom/cnic_defs.h b/drivers/net/ethernet/broadcom/cnic_defs.h
index 239de898f071..86936f6b6dbc 100644
--- a/drivers/net/ethernet/broadcom/cnic_defs.h
+++ b/drivers/net/ethernet/broadcom/cnic_defs.h
@@ -85,6 +85,7 @@
/* KCQ (kernel completion queue) completion status */
#define L4_KCQE_COMPLETION_STATUS_SUCCESS (0)
+#define L4_KCQE_COMPLETION_STATUS_NIC_ERROR (4)
#define L4_KCQE_COMPLETION_STATUS_TIMEOUT (0x93)
#define L4_KCQE_COMPLETION_STATUS_CTX_ALLOC_FAIL (0x83)