summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/emulex/benet/be.h
diff options
context:
space:
mode:
authorKalesh AP <kalesh.purayil@emulex.com>2014-04-14 16:12:41 +0530
committerDavid S. Miller <davem@davemloft.net>2014-04-14 13:41:37 -0400
commite1ad8e33d2e57ca64d9862b63d986fc296a7b876 (patch)
tree37889e4b5e71892beadcd3fcff25da9033d81c3a /drivers/net/ethernet/emulex/benet/be.h
parent1a3d0717f68345730ae939b74b952200fb165f45 (diff)
be2net: Fix invocation of be_close() after be_clear()
In the EEH error recovery path, when a permanent failure occurs, we clean up adapter structure (i.e. destroy queues etc) by calling be_clear() and return PCI_ERS_RESULT_DISCONNECT. After this the stack tries to remove device from bus and calls be_remove() which invokes netdev_unregister()->be_close(). be_close() operating on destroyed queues results in a NULL dereference. This patch fixes this problem by introducing a flag to keep track of the setup state. Signed-off-by: Kalesh AP <kalesh.purayil@emulex.com> Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/emulex/benet/be.h')
-rw-r--r--drivers/net/ethernet/emulex/benet/be.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/emulex/benet/be.h b/drivers/net/ethernet/emulex/benet/be.h
index 8ccaa2520dc..97db5a7179d 100644
--- a/drivers/net/ethernet/emulex/benet/be.h
+++ b/drivers/net/ethernet/emulex/benet/be.h
@@ -374,6 +374,7 @@ enum vf_state {
#define BE_FLAGS_NAPI_ENABLED (1 << 9)
#define BE_FLAGS_QNQ_ASYNC_EVT_RCVD (1 << 11)
#define BE_FLAGS_VXLAN_OFFLOADS (1 << 12)
+#define BE_FLAGS_SETUP_DONE (1 << 13)
#define BE_UC_PMAC_COUNT 30
#define BE_VF_UC_PMAC_COUNT 2