netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: David Ertman <davidx.m.ertman@intel.com>,
	netdev@vger.kernel.org, gospo@redhat.com, sassmann@redhat.com,
	John Greene <jogreene@redhat.com>,
	Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next 12/15] e1000e: Fix SHRA register access for 82579
Date: Sat,  8 Mar 2014 01:25:38 -0800	[thread overview]
Message-ID: <1394270741-29926-13-git-send-email-jeffrey.t.kirsher@intel.com> (raw)
In-Reply-To: <1394270741-29926-1-git-send-email-jeffrey.t.kirsher@intel.com>

From: David Ertman <davidx.m.ertman@intel.com>

Previous commit c3a0dce35af0 fixed an overrun for the RAR on i218 devices.
This commit also attempted to homogenize the RAR/SHRA access for all parts
accessed by the e1000e driver.  This change introduced an error for
assigning MAC addresses to guest OS's for 82579 devices.

Only RAR[0] is accessible to the driver for 82579 parts, and additional
addresses must be placed into the SHRA[L|H] registers.  The rar_entry_count
was changed in the previous commit to an inaccurate value that accounted
for all RAR and SHRA registers, not just the ones usable by the driver.

This patch fixes the count to the correct value and adjusts the
e1000_rar_set_pch2lan() function to user the correct index.

Cc: John Greene <jogreene@redhat.com>
Signed-off-by: Dave Ertman <davidx.m.ertman@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/e1000e/ich8lan.c | 2 +-
 drivers/net/ethernet/intel/e1000e/ich8lan.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/e1000e/ich8lan.c b/drivers/net/ethernet/intel/e1000e/ich8lan.c
index 1898451..9866f26 100644
--- a/drivers/net/ethernet/intel/e1000e/ich8lan.c
+++ b/drivers/net/ethernet/intel/e1000e/ich8lan.c
@@ -1675,7 +1675,7 @@ static void e1000_rar_set_pch2lan(struct e1000_hw *hw, u8 *addr, u32 index)
 	/* RAR[1-6] are owned by manageability.  Skip those and program the
 	 * next address into the SHRA register array.
 	 */
-	if (index < (u32)(hw->mac.rar_entry_count - 6)) {
+	if (index < (u32)(hw->mac.rar_entry_count)) {
 		s32 ret_val;
 
 		ret_val = e1000_acquire_swflag_ich8lan(hw);
diff --git a/drivers/net/ethernet/intel/e1000e/ich8lan.h b/drivers/net/ethernet/intel/e1000e/ich8lan.h
index 553f05e..bead50f 100644
--- a/drivers/net/ethernet/intel/e1000e/ich8lan.h
+++ b/drivers/net/ethernet/intel/e1000e/ich8lan.h
@@ -101,7 +101,7 @@
 #define PCIE_ICH8_SNOOP_ALL	PCIE_NO_SNOOP_ALL
 
 #define E1000_ICH_RAR_ENTRIES	7
-#define E1000_PCH2_RAR_ENTRIES	11      /* RAR[0-6], SHRA[0-3] */
+#define E1000_PCH2_RAR_ENTRIES	5	/* RAR[0], SHRA[0-3] */
 #define E1000_PCH_LPT_RAR_ENTRIES	12	/* RAR[0], SHRA[0-10] */
 
 #define PHY_PAGE_SHIFT		5
-- 
1.8.3.1

  parent reply	other threads:[~2014-03-08  9:25 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-08  9:25 [net-next 00/15][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
2014-03-08  9:25 ` [net-next 01/15] e1000e: PTP lock in e1000e_phc_adjustfreq Jeff Kirsher
2014-03-08  9:25 ` [net-next 02/15] e1000e: Cleanup unecessary references Jeff Kirsher
2014-03-08  9:25 ` [net-next 03/15] e1000e: Resolve issues with Management Engine (ME) briefly blocking PHY resets Jeff Kirsher
2014-03-08  9:25 ` [net-next 04/15] e1000e: Fix 82579 sets LPI too early Jeff Kirsher
2014-03-08  9:25 ` [net-next 05/15] e1000e: Cleanup - Update GPL header and Copyright Jeff Kirsher
2014-03-08  9:25 ` [net-next 06/15] e1000e: Add missing branding strings in ich8lan.c Jeff Kirsher
2014-03-08  9:25 ` [net-next 07/15] e1000e: Refactor PM flows Jeff Kirsher
2014-03-08  9:25 ` [net-next 08/15] e1000e Refactor of Runtime Power Management Jeff Kirsher
2014-03-08  9:25 ` [net-next 09/15] e1000e: Feature Enable PHY Ultra Low Power Mode (ULP) Jeff Kirsher
2014-03-08  9:25 ` [net-next 10/15] e1000e: Fix not generating an error on invalid load parameter Jeff Kirsher
2014-03-08  9:25 ` [net-next 11/15] e1000e: Fix ethtool offline tests for 82579 parts Jeff Kirsher
2014-03-08  9:25 ` Jeff Kirsher [this message]
2014-03-08  9:25 ` [net-next 13/15] ixgbevf: fix skb->pkt_type checks Jeff Kirsher
2014-03-08  9:25 ` [net-next 14/15] igb: fix array size calculation Jeff Kirsher
2014-03-08  9:25 ` [net-next 15/15] igb: fix warning if !CONFIG_IGB_HWMON Jeff Kirsher
2014-03-08 23:50 ` [net-next 00/15][pull request] Intel Wired LAN Driver Updates David Miller
2014-03-09  0:10   ` David Miller
2014-03-09  1:12     ` Jeff Kirsher

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=1394270741-29926-13-git-send-email-jeffrey.t.kirsher@intel.com \
    --to=jeffrey.t.kirsher@intel.com \
    --cc=davem@davemloft.net \
    --cc=davidx.m.ertman@intel.com \
    --cc=gospo@redhat.com \
    --cc=jogreene@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=sassmann@redhat.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).