Browse Source

qlcnic: mark context state freed after destroy

After destroying recv ctx, context state remain same.
Fix it by marking as FREED.

Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Amit Kumar Salecha 15 years ago
parent
commit
d626ad4d84
2 changed files with 3 additions and 1 deletions
  1. 1 1
      drivers/net/qlcnic/qlcnic.h
  2. 2 0
      drivers/net/qlcnic/qlcnic_ctx.c

+ 1 - 1
drivers/net/qlcnic/qlcnic.h

@@ -573,7 +573,7 @@ struct qlcnic_recv_context {
 /*
  * Context state
  */
-
+#define QLCNIC_HOST_CTX_STATE_FREED	0
 #define QLCNIC_HOST_CTX_STATE_ACTIVE	2
 
 /*

+ 2 - 0
drivers/net/qlcnic/qlcnic_ctx.c

@@ -280,6 +280,8 @@ qlcnic_fw_cmd_destroy_rx_ctx(struct qlcnic_adapter *adapter)
 		dev_err(&adapter->pdev->dev,
 			"Failed to destroy rx ctx in firmware\n");
 	}
+
+	recv_ctx->state = QLCNIC_HOST_CTX_STATE_FREED;
 }
 
 static int