netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Shahed Shaikh <shahed.shaikh@qlogic.com>
To: <davem@davemloft.net>
Cc: <netdev@vger.kernel.org>, <Dept_NX_Linux_NIC_Driver@qlogic.com>,
	Manish Chopra <manish.chopra@qlogic.com>
Subject: [PATCH net-next 6/8] qlcnic: Fix SR-IOV cleanup code path
Date: Fri, 10 Jan 2014 11:48:57 -0500	[thread overview]
Message-ID: <1389372539-13753-7-git-send-email-shahed.shaikh@qlogic.com> (raw)
In-Reply-To: <1389372539-13753-1-git-send-email-shahed.shaikh@qlogic.com>

From: Manish Chopra <manish.chopra@qlogic.com>

o Add __QLCNIC_SRIOV_ENABLE bit check before doing SRIOV cleanup

Signed-off-by: Manish Chopra <manish.chopra@qlogic.com>
---
 drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c
index bf8fca7..f998fdc 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c
@@ -277,9 +277,7 @@ static void qlcnic_sriov_vf_cleanup(struct qlcnic_adapter *adapter)
 
 void qlcnic_sriov_cleanup(struct qlcnic_adapter *adapter)
 {
-	struct qlcnic_sriov *sriov = adapter->ahw->sriov;
-
-	if (!sriov)
+	if (!test_bit(__QLCNIC_SRIOV_ENABLE, &adapter->state))
 		return;
 
 	qlcnic_sriov_free_vlans(adapter);
-- 
1.8.3.1

  parent reply	other threads:[~2014-01-10 17:23 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-10 16:48 [PATCH net-next 0/8] qlcnic driver updates Shahed Shaikh
2014-01-10 16:48 ` [PATCH net-next 1/8] qlcnic: Restrict VF from configuring any VLAN mode Shahed Shaikh
2014-01-10 16:48 ` [PATCH net-next 2/8] qlcnic: Enable VF flood bit on PF Shahed Shaikh
2014-01-10 16:48 ` [PATCH net-next 3/8] qlcnic: Turn on promiscous mode for SRIOV PF Shahed Shaikh
2014-01-10 16:48 ` [PATCH net-next 4/8] qlcnic: Do MAC learning " Shahed Shaikh
2014-01-10 16:48 ` [PATCH net-next 5/8] qlcnic: Enable beaconing for 83xx/84xx Series adapter Shahed Shaikh
2014-01-10 16:48 ` Shahed Shaikh [this message]
2014-01-10 16:48 ` [PATCH net-next 7/8] qlcnic: Enable IPv6 LRO even if IP address is not programmed Shahed Shaikh
2014-01-10 16:48 ` [PATCH net-next 8/8] qlcnic: Update version to 5.3.54 Shahed Shaikh
2014-01-13 23:32 ` [PATCH net-next 0/8] qlcnic driver updates David Miller
2014-01-14  5:25   ` Shahed Shaikh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1389372539-13753-7-git-send-email-shahed.shaikh@qlogic.com \
    --to=shahed.shaikh@qlogic.com \
    --cc=Dept_NX_Linux_NIC_Driver@qlogic.com \
    --cc=davem@davemloft.net \
    --cc=manish.chopra@qlogic.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).