netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: Shannon Nelson <shannon.nelson@intel.com>,
	netdev@vger.kernel.org, gospo@redhat.com, sassmann@redhat.com,
	Kamil Krawczyk <kamil.krawczyk@intel.com>,
	Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next 09/15] i40e: move PF ID init from PF reset to SC init
Date: Tue,  7 Jan 2014 01:32:23 -0800	[thread overview]
Message-ID: <1389087149-27962-10-git-send-email-jeffrey.t.kirsher@intel.com> (raw)
In-Reply-To: <1389087149-27962-1-git-send-email-jeffrey.t.kirsher@intel.com>

From: Shannon Nelson <shannon.nelson@intel.com>

Move PF ID initialization code from PF reset routine to earlier driver
initialization function.  There are a few operations which need the
PF ID before the first PF reset is called.

Change-Id: I7e971f7556b46a837149850ec05ce115c35db575
Signed-off-by: Kamil Krawczyk <kamil.krawczyk@intel.com>
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e_common.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_common.c b/drivers/net/ethernet/intel/i40e/i40e_common.c
index 96c8f15..02ad529 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_common.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_common.c
@@ -198,6 +198,13 @@ i40e_status i40e_init_shared_code(struct i40e_hw *hw)
 		break;
 	}
 
+	/* Determine the PF number based on the PCI fn */
+	reg = rd32(hw, I40E_GLPCI_CAPSUP);
+	if (reg & I40E_GLPCI_CAPSUP_ARI_EN_MASK)
+		hw->pf_id = (u8)((hw->bus.device << 3) | hw->bus.func);
+	else
+		hw->pf_id = (u8)hw->bus.func;
+
 	status = i40e_init_nvm(hw);
 	return status;
 }
@@ -375,13 +382,6 @@ i40e_status i40e_pf_reset(struct i40e_hw *hw)
 		return I40E_ERR_RESET_FAILED;
 	}
 
-	/* Determine the PF number based on the PCI fn */
-	reg = rd32(hw, I40E_GLPCI_CAPSUP);
-	if (reg & I40E_GLPCI_CAPSUP_ARI_EN_MASK)
-		hw->pf_id = (u8)((hw->bus.device << 3) | hw->bus.func);
-	else
-		hw->pf_id = (u8)hw->bus.func;
-
 	/* If there was a Global Reset in progress when we got here,
 	 * we don't need to do the PF Reset
 	 */
-- 
1.8.3.1

  parent reply	other threads:[~2014-01-07  9:32 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-07  9:32 [net-next 00/15][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
2014-01-07  9:32 ` [net-next 01/15] i40e: Expose AQ debugfs hooks Jeff Kirsher
2014-01-07 20:34   ` David Miller
2014-01-07  9:32 ` [net-next 02/15] i40e: Do not enable broadcast promiscuous by default Jeff Kirsher
2014-01-07  9:32 ` [net-next 03/15] i40e: Stop accepting any VLAN tag on VLAN 0 filter set Jeff Kirsher
2014-01-07  9:32 ` [net-next 04/15] i40e: Allow VF to set already assigned MAC address Jeff Kirsher
2014-01-07  9:32 ` [net-next 05/15] i40e: Bump version Jeff Kirsher
2014-01-07  9:32 ` [net-next 06/15] i40e: Add code to wait for FW to complete in reset path Jeff Kirsher
2014-01-07  9:32 ` [net-next 07/15] i40e: update firmware api to 1.1 Jeff Kirsher
2014-01-07  9:32 ` [net-next 08/15] i40e: Reduce range of interrupt reg in reg test Jeff Kirsher
2014-01-07  9:32 ` Jeff Kirsher [this message]
2014-01-07  9:32 ` [net-next 10/15] i40e: check MAC type before any REG access Jeff Kirsher
2014-01-07  9:32 ` [net-next 11/15] i40e: rework shadow ram read functions Jeff Kirsher
2014-01-07  9:32 ` [net-next 12/15] i40e: whitespace paren and comment tweaks Jeff Kirsher
2014-01-07  9:32 ` [net-next 13/15] i40e: Enable/Disable PF switch LB on SR-IOV configure changes Jeff Kirsher
2014-01-07  9:32 ` [net-next 14/15] i40e: remove redundant AQ enable Jeff Kirsher
2014-01-07  9:32 ` [net-next 15/15] i40e: correctly setup ARQ descriptors Jeff Kirsher
2014-01-07 20:34   ` David Miller

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=1389087149-27962-10-git-send-email-jeffrey.t.kirsher@intel.com \
    --to=jeffrey.t.kirsher@intel.com \
    --cc=davem@davemloft.net \
    --cc=gospo@redhat.com \
    --cc=kamil.krawczyk@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=sassmann@redhat.com \
    --cc=shannon.nelson@intel.com \
    /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).