From: Amit Kumar Salecha Date: Tue, 22 Jun 2010 03:19:04 +0000 (+0000) Subject: qlcnic: mark context state freed after destroy X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=d626ad4d84dba1e5bf176320e19765e6dc539b04;p=linux-beck.git 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 Signed-off-by: David S. Miller --- diff --git a/drivers/net/qlcnic/qlcnic.h b/drivers/net/qlcnic/qlcnic.h index 6ec34a7fba65..7fa761ac15c2 100644 --- a/drivers/net/qlcnic/qlcnic.h +++ b/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 /* diff --git a/drivers/net/qlcnic/qlcnic_ctx.c b/drivers/net/qlcnic/qlcnic_ctx.c index be341c1564b8..941cd0873f87 100644 --- a/drivers/net/qlcnic/qlcnic_ctx.c +++ b/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