qlcnic: mark context state freed after destroy
authorAmit Kumar Salecha <amit.salecha@qlogic.com>
Tue, 22 Jun 2010 03:19:04 +0000 (03:19 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 23 Jun 2010 20:16:31 +0000 (13:16 -0700)
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>
drivers/net/qlcnic/qlcnic.h
drivers/net/qlcnic/qlcnic_ctx.c

index 6ec34a7fba655848d951d1bf12618ea5ef358549..7fa761ac15c21f9a328acab267bc732ea4f1cd32 100644 (file)
@@ -573,7 +573,7 @@ struct qlcnic_recv_context {
 /*
  * Context state
  */
-
+#define QLCNIC_HOST_CTX_STATE_FREED    0
 #define QLCNIC_HOST_CTX_STATE_ACTIVE   2
 
 /*
index be341c1564b82992f0b898d97f959186f79f0e77..941cd0873f87d5f2cc5ab04e1fcef5e2900dcd71 100644 (file)
@@ -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