LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Ethan Zhao <ethan.zhao@oracle.com>
To: jeffrey.t.kirsher@intel.com, jesse.brandeburg@intel.com,
	bruce.w.allan@intel.com, carolyn.wyborny@intel.com,
	donald.c.skidmore@intel.com, gregory.v.rose@intel.com,
	matthew.vick@intel.com, john.ronciak@intel.com,
	mitch.a.williams@intel.com
Cc: linux.nics@intel.com, e1000-devel@lists.sourceforge.net,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	ethan.kernel@gmail.com, brian.maly@oracle.com,
	Ethan Zhao <ethan.zhao@oracle.com>
Subject: [PATCH] i40e: don't enable and init FCOE by default when do PF reset
Date: Sat, 10 Jan 2015 01:37:46 +0900	[thread overview]
Message-ID: <1420821466-5747-1-git-send-email-ethan.zhao@oracle.com> (raw)

While do PF reset with function i40e_reset_and_rebuild(), it will
call i40e_init_pf_fcoe() by default if FCOE is defined, thus if the
PF is resetted, FCOE will be enabled whatever it was - enabled or
not.

Such bug might be hit when PF resumes from suspend, run diagnostic
test with ethtool, setup VLAN etc.

Passed building with v3.19-rc3.

Signed-off-by: Ethan Zhao <ethan.zhao@oracle.com>
---
 drivers/net/ethernet/intel/i40e/i40e_main.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index a5f2660..a2572cc 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -6180,9 +6180,12 @@ static void i40e_reset_and_rebuild(struct i40e_pf *pf, bool reinit)
 	}
 #endif /* CONFIG_I40E_DCB */
 #ifdef I40E_FCOE
-	ret = i40e_init_pf_fcoe(pf);
-	if (ret)
-		dev_info(&pf->pdev->dev, "init_pf_fcoe failed: %d\n", ret);
+	if (pf->flags & I40E_FLAG_FCOE_ENABLED) {
+		ret = i40e_init_pf_fcoe(pf);
+		if (ret)
+			dev_info(&pf->pdev->dev,
+				 "init_pf_fcoe failed: %d\n", ret);
+	}
 
 #endif
 	/* do basic switch setup */
-- 
1.8.3.1


             reply	other threads:[~2015-01-09 16:37 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-09 16:37 Ethan Zhao [this message]
2015-01-09 16:41 ` Ronciak, John
2015-01-09 18:18   ` Dev, Vasu
2015-01-13  2:56     ` Ethan Zhao
2015-01-13 19:38       ` Dev, Vasu
2015-01-14  2:40         ` ethan zhao
2015-01-15 23:45 Dev, Vasu
2015-01-16  1:48 ` ethan zhao
2015-01-16 14:47   ` Jeff Kirsher
2015-01-17  3:01     ` ethan zhao
2015-01-19 21:10       ` Dev, Vasu
2015-01-20  2:05         ` ethan zhao
2015-01-26 22:38           ` Dev, Vasu

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=1420821466-5747-1-git-send-email-ethan.zhao@oracle.com \
    --to=ethan.zhao@oracle.com \
    --cc=brian.maly@oracle.com \
    --cc=bruce.w.allan@intel.com \
    --cc=carolyn.wyborny@intel.com \
    --cc=donald.c.skidmore@intel.com \
    --cc=e1000-devel@lists.sourceforge.net \
    --cc=ethan.kernel@gmail.com \
    --cc=gregory.v.rose@intel.com \
    --cc=jeffrey.t.kirsher@intel.com \
    --cc=jesse.brandeburg@intel.com \
    --cc=john.ronciak@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux.nics@intel.com \
    --cc=matthew.vick@intel.com \
    --cc=mitch.a.williams@intel.com \
    --cc=netdev@vger.kernel.org \
    --subject='Re: [PATCH] i40e: don'\''t enable and init FCOE by default when do PF reset' \
    /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

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).