netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [net-next 0/4][pull request] Intel Wired LAN Driver Updates
@ 2012-05-05 12:38 Jeff Kirsher
  2012-05-05 12:38 ` [net-next 1/4] e1000e: enable forced master/slave on 82577 Jeff Kirsher
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Jeff Kirsher @ 2012-05-05 12:38 UTC (permalink / raw)
  To: davem; +Cc: Jeff Kirsher, netdev, gospo, sassmann

This series of patches contains updates for e1000e and ixgbe.

NOTE- The ixgbe patch can and probably should be applied to
David Miller's net tree as well.

The following are changes since commit bd14b1b2e29bd6812597f896dde06eaf7c6d2f24:
  tcp: be more strict before accepting ECN negociation
and are available in the git repository at:
  git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next master

Bruce Allan (2):
  e1000e: enable forced master/slave on 82577
  e1000e: increase version number

John Fastabend (1):
  ixgbe: dcb: IEEE PFC stats and reset logic incorrect

Richard Alpe (1):
  e1000e: clear REQ and GNT in EECD (82571 && 82572)

 drivers/net/ethernet/intel/e1000e/82571.c       |   12 ++++-
 drivers/net/ethernet/intel/e1000e/netdev.c      |    2 +-
 drivers/net/ethernet/intel/e1000e/phy.c         |   71 ++++++++++++++--------
 drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_nl.c |    7 ++
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c   |    6 ++-
 5 files changed, 69 insertions(+), 29 deletions(-)

-- 
1.7.7.6

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [net-next 1/4] e1000e: enable forced master/slave on 82577
  2012-05-05 12:38 [net-next 0/4][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
@ 2012-05-05 12:38 ` Jeff Kirsher
  2012-05-05 12:38 ` [net-next 2/4] e1000e: clear REQ and GNT in EECD (82571 && 82572) Jeff Kirsher
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: Jeff Kirsher @ 2012-05-05 12:38 UTC (permalink / raw)
  To: davem; +Cc: Bruce Allan, netdev, gospo, sassmann, Jeff Kirsher

From: Bruce Allan <bruce.w.allan@intel.com>

Like other supported (igp) PHYs, the driver needs to be able to force the
master/slave mode on 82577.  Since the code is the same as what already
exists in the code flow for igp PHYs, move it to a new function to be
called for both flows.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/e1000e/phy.c |   71 +++++++++++++++++++-----------
 1 files changed, 45 insertions(+), 26 deletions(-)

diff --git a/drivers/net/ethernet/intel/e1000e/phy.c b/drivers/net/ethernet/intel/e1000e/phy.c
index ada7133..0334d01 100644
--- a/drivers/net/ethernet/intel/e1000e/phy.c
+++ b/drivers/net/ethernet/intel/e1000e/phy.c
@@ -639,6 +639,45 @@ s32 e1000e_write_kmrn_reg_locked(struct e1000_hw *hw, u32 offset, u16 data)
 }
 
 /**
+ *  e1000_set_master_slave_mode - Setup PHY for Master/slave mode
+ *  @hw: pointer to the HW structure
+ *
+ *  Sets up Master/slave mode
+ **/
+static s32 e1000_set_master_slave_mode(struct e1000_hw *hw)
+{
+	s32 ret_val;
+	u16 phy_data;
+
+	/* Resolve Master/Slave mode */
+	ret_val = e1e_rphy(hw, PHY_1000T_CTRL, &phy_data);
+	if (ret_val)
+		return ret_val;
+
+	/* load defaults for future use */
+	hw->phy.original_ms_type = (phy_data & CR_1000T_MS_ENABLE) ?
+	    ((phy_data & CR_1000T_MS_VALUE) ?
+	     e1000_ms_force_master : e1000_ms_force_slave) : e1000_ms_auto;
+
+	switch (hw->phy.ms_type) {
+	case e1000_ms_force_master:
+		phy_data |= (CR_1000T_MS_ENABLE | CR_1000T_MS_VALUE);
+		break;
+	case e1000_ms_force_slave:
+		phy_data |= CR_1000T_MS_ENABLE;
+		phy_data &= ~(CR_1000T_MS_VALUE);
+		break;
+	case e1000_ms_auto:
+		phy_data &= ~CR_1000T_MS_ENABLE;
+		/* fall-through */
+	default:
+		break;
+	}
+
+	return e1e_wphy(hw, PHY_1000T_CTRL, phy_data);
+}
+
+/**
  *  e1000_copper_link_setup_82577 - Setup 82577 PHY for copper link
  *  @hw: pointer to the HW structure
  *
@@ -659,7 +698,11 @@ s32 e1000_copper_link_setup_82577(struct e1000_hw *hw)
 	/* Enable downshift */
 	phy_data |= I82577_CFG_ENABLE_DOWNSHIFT;
 
-	return e1e_wphy(hw, I82577_CFG_REG, phy_data);
+	ret_val = e1e_wphy(hw, I82577_CFG_REG, phy_data);
+	if (ret_val)
+		return ret_val;
+
+	return e1000_set_master_slave_mode(hw);
 }
 
 /**
@@ -895,31 +938,7 @@ s32 e1000e_copper_link_setup_igp(struct e1000_hw *hw)
 				return ret_val;
 		}
 
-		ret_val = e1e_rphy(hw, PHY_1000T_CTRL, &data);
-		if (ret_val)
-			return ret_val;
-
-		/* load defaults for future use */
-		phy->original_ms_type = (data & CR_1000T_MS_ENABLE) ?
-			((data & CR_1000T_MS_VALUE) ?
-			e1000_ms_force_master :
-			e1000_ms_force_slave) :
-			e1000_ms_auto;
-
-		switch (phy->ms_type) {
-		case e1000_ms_force_master:
-			data |= (CR_1000T_MS_ENABLE | CR_1000T_MS_VALUE);
-			break;
-		case e1000_ms_force_slave:
-			data |= CR_1000T_MS_ENABLE;
-			data &= ~(CR_1000T_MS_VALUE);
-			break;
-		case e1000_ms_auto:
-			data &= ~CR_1000T_MS_ENABLE;
-		default:
-			break;
-		}
-		ret_val = e1e_wphy(hw, PHY_1000T_CTRL, data);
+		ret_val = e1000_set_master_slave_mode(hw);
 	}
 
 	return ret_val;
-- 
1.7.7.6

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [net-next 2/4] e1000e: clear REQ and GNT in EECD (82571 && 82572)
  2012-05-05 12:38 [net-next 0/4][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
  2012-05-05 12:38 ` [net-next 1/4] e1000e: enable forced master/slave on 82577 Jeff Kirsher
@ 2012-05-05 12:38 ` Jeff Kirsher
  2012-05-05 12:38 ` [net-next 3/4] e1000e: increase version number Jeff Kirsher
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: Jeff Kirsher @ 2012-05-05 12:38 UTC (permalink / raw)
  To: davem; +Cc: Richard Alpe, netdev, gospo, sassmann, Jeff Kirsher

From: Richard Alpe <richard.alpe@ericsson.com>

Clear the REQ and GNT bit in the eeprom control register (EECD).
This is required if the eeprom is to be accessed with auto read
EERD register.

After a cold reset this doesn't matter but if PBIST MAC test was
executed before booting, the register was left in a dirty state
(the 2 bits where set), which caused the read operation to time out
and returning 0.

Reference (page 312):
http://download.intel.com/design/network/manuals/316080.pdf

Reported-by: Aleksandar Igic <aleksandar.igic@dektech.com.au>
Signed-off-by: Richard Alpe <richard.alpe@ericsson.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/e1000e/82571.c |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/drivers/net/ethernet/intel/e1000e/82571.c b/drivers/net/ethernet/intel/e1000e/82571.c
index 6a8a908..36db4df 100644
--- a/drivers/net/ethernet/intel/e1000e/82571.c
+++ b/drivers/net/ethernet/intel/e1000e/82571.c
@@ -999,7 +999,7 @@ static s32 e1000_set_d0_lplu_state_82571(struct e1000_hw *hw, bool active)
  **/
 static s32 e1000_reset_hw_82571(struct e1000_hw *hw)
 {
-	u32 ctrl, ctrl_ext;
+	u32 ctrl, ctrl_ext, eecd;
 	s32 ret_val;
 
 	/*
@@ -1072,6 +1072,16 @@ static s32 e1000_reset_hw_82571(struct e1000_hw *hw)
 	 */
 
 	switch (hw->mac.type) {
+	case e1000_82571:
+	case e1000_82572:
+		/*
+		 * REQ and GNT bits need to be cleared when using AUTO_RD
+		 * to access the EEPROM.
+		 */
+		eecd = er32(EECD);
+		eecd &= ~(E1000_EECD_REQ | E1000_EECD_GNT);
+		ew32(EECD, eecd);
+		break;
 	case e1000_82573:
 	case e1000_82574:
 	case e1000_82583:
-- 
1.7.7.6

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [net-next 3/4] e1000e: increase version number
  2012-05-05 12:38 [net-next 0/4][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
  2012-05-05 12:38 ` [net-next 1/4] e1000e: enable forced master/slave on 82577 Jeff Kirsher
  2012-05-05 12:38 ` [net-next 2/4] e1000e: clear REQ and GNT in EECD (82571 && 82572) Jeff Kirsher
@ 2012-05-05 12:38 ` Jeff Kirsher
  2012-05-05 12:38 ` [net-next 4/4] ixgbe: dcb: IEEE PFC stats and reset logic incorrect Jeff Kirsher
  2012-05-06 17:25 ` [net-next 0/4][pull request] Intel Wired LAN Driver Updates David Miller
  4 siblings, 0 replies; 8+ messages in thread
From: Jeff Kirsher @ 2012-05-05 12:38 UTC (permalink / raw)
  To: davem; +Cc: Bruce Allan, netdev, gospo, sassmann, Jeff Kirsher

From: Bruce Allan <bruce.w.allan@intel.com>

Signed-off-by: Bruce Allan <bruce.w.allan@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/netdev.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
index b53ea83..f648299 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -56,7 +56,7 @@
 
 #define DRV_EXTRAVERSION "-k"
 
-#define DRV_VERSION "1.11.3" DRV_EXTRAVERSION
+#define DRV_VERSION "2.0.0" DRV_EXTRAVERSION
 char e1000e_driver_name[] = "e1000e";
 const char e1000e_driver_version[] = DRV_VERSION;
 
-- 
1.7.7.6

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [net-next 4/4] ixgbe: dcb: IEEE PFC stats and reset logic incorrect
  2012-05-05 12:38 [net-next 0/4][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
                   ` (2 preceding siblings ...)
  2012-05-05 12:38 ` [net-next 3/4] e1000e: increase version number Jeff Kirsher
@ 2012-05-05 12:38 ` Jeff Kirsher
  2012-05-06 17:25 ` [net-next 0/4][pull request] Intel Wired LAN Driver Updates David Miller
  4 siblings, 0 replies; 8+ messages in thread
From: Jeff Kirsher @ 2012-05-05 12:38 UTC (permalink / raw)
  To: davem; +Cc: John Fastabend, netdev, gospo, sassmann, Jeff Kirsher

From: John Fastabend <john.r.fastabend@intel.com>

PFC stats are only tabulated when PFC is enabled. However in IEEE
mode the ieee_pfc pfc_tc bits were not checked and the calculation
was aborted.

This results in statistics not being reported through ethtool and
possible a false Tx hang occurring when receiving pause frames.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_nl.c |    7 +++++++
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c   |    6 +++++-
 2 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_nl.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_nl.c
index 652e4b0..2feacf6 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_nl.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_nl.c
@@ -662,6 +662,13 @@ static int ixgbe_dcbnl_ieee_setpfc(struct net_device *dev,
 			return -ENOMEM;
 	}
 
+	if (pfc->pfc_en) {
+		adapter->last_lfc_mode = adapter->hw.fc.current_mode;
+		adapter->hw.fc.current_mode = ixgbe_fc_pfc;
+	} else {
+		adapter->hw.fc.current_mode = adapter->last_lfc_mode;
+	}
+
 	prio_tc = adapter->ixgbe_ieee_ets->prio_tc;
 	memcpy(adapter->ixgbe_ieee_pfc, pfc, sizeof(*adapter->ixgbe_ieee_pfc));
 	return ixgbe_dcb_hw_pfc_config(&adapter->hw, pfc->pfc_en, prio_tc);
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index b2daff3..4048c9d 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -637,7 +637,11 @@ static void ixgbe_update_xoff_received(struct ixgbe_adapter *adapter)
 			clear_bit(__IXGBE_HANG_CHECK_ARMED,
 				  &adapter->tx_ring[i]->state);
 		return;
-	} else if (!(adapter->dcb_cfg.pfc_mode_enable))
+	} else if (((adapter->dcbx_cap & DCB_CAP_DCBX_VER_CEE) &&
+		    !(adapter->dcb_cfg.pfc_mode_enable)) ||
+		   ((adapter->dcbx_cap & DCB_CAP_DCBX_VER_IEEE) &&
+		    adapter->ixgbe_ieee_pfc &&
+		    !(adapter->ixgbe_ieee_pfc->pfc_en)))
 		return;
 
 	/* update stats for each tc, only valid with PFC enabled */
-- 
1.7.7.6

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [net-next 0/4][pull request] Intel Wired LAN Driver Updates
  2012-05-05 12:38 [net-next 0/4][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
                   ` (3 preceding siblings ...)
  2012-05-05 12:38 ` [net-next 4/4] ixgbe: dcb: IEEE PFC stats and reset logic incorrect Jeff Kirsher
@ 2012-05-06 17:25 ` David Miller
  2012-05-07  7:12   ` Jeff Kirsher
  4 siblings, 1 reply; 8+ messages in thread
From: David Miller @ 2012-05-06 17:25 UTC (permalink / raw)
  To: jeffrey.t.kirsher; +Cc: netdev, gospo, sassmann

From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Sat,  5 May 2012 05:38:09 -0700

> This series of patches contains updates for e1000e and ixgbe.
> 
> NOTE- The ixgbe patch can and probably should be applied to
> David Miller's net tree as well.
> 
> The following are changes since commit bd14b1b2e29bd6812597f896dde06eaf7c6d2f24:
>   tcp: be more strict before accepting ECN negociation
> and are available in the git repository at:
>   git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next master

No new changes there?

[davem@drr net-next]$ git pull git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next master
>From git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next
 * branch            master     -> FETCH_HEAD
Already up-to-date.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [net-next 0/4][pull request] Intel Wired LAN Driver Updates
  2012-05-06 17:25 ` [net-next 0/4][pull request] Intel Wired LAN Driver Updates David Miller
@ 2012-05-07  7:12   ` Jeff Kirsher
  2012-05-07 16:33     ` David Miller
  0 siblings, 1 reply; 8+ messages in thread
From: Jeff Kirsher @ 2012-05-07  7:12 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, gospo, sassmann

[-- Attachment #1: Type: text/plain, Size: 1042 bytes --]

On Sun, 2012-05-06 at 13:25 -0400, David Miller wrote:
> From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Date: Sat,  5 May 2012 05:38:09 -0700
> 
> > This series of patches contains updates for e1000e and ixgbe.
> > 
> > NOTE- The ixgbe patch can and probably should be applied to
> > David Miller's net tree as well.
> > 
> > The following are changes since commit bd14b1b2e29bd6812597f896dde06eaf7c6d2f24:
> >   tcp: be more strict before accepting ECN negociation
> > and are available in the git repository at:
> >   git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next master
> 
> No new changes there?
> 
> [davem@drr net-next]$ git pull git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next master
> From git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next
>  * branch            master     -> FETCH_HEAD
> Already up-to-date.

Sorry Dave, I thought I had pushed the changes but it appears I did not.
I have rectified that and now my net-next tree contains the four
patches.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [net-next 0/4][pull request] Intel Wired LAN Driver Updates
  2012-05-07  7:12   ` Jeff Kirsher
@ 2012-05-07 16:33     ` David Miller
  0 siblings, 0 replies; 8+ messages in thread
From: David Miller @ 2012-05-07 16:33 UTC (permalink / raw)
  To: jeffrey.t.kirsher; +Cc: netdev, gospo, sassmann

From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Mon, 07 May 2012 00:12:58 -0700

> On Sun, 2012-05-06 at 13:25 -0400, David Miller wrote:
>> From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>> Date: Sat,  5 May 2012 05:38:09 -0700
>> 
>> > This series of patches contains updates for e1000e and ixgbe.
>> > 
>> > NOTE- The ixgbe patch can and probably should be applied to
>> > David Miller's net tree as well.
>> > 
>> > The following are changes since commit bd14b1b2e29bd6812597f896dde06eaf7c6d2f24:
>> >   tcp: be more strict before accepting ECN negociation
>> > and are available in the git repository at:
>> >   git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next master
>> 
>> No new changes there?
>> 
>> [davem@drr net-next]$ git pull git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next master
>> From git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next
>>  * branch            master     -> FETCH_HEAD
>> Already up-to-date.
> 
> Sorry Dave, I thought I had pushed the changes but it appears I did not.
> I have rectified that and now my net-next tree contains the four
> patches.

That looks better, pulled, thanks Jeff.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-05-07 16:33 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-05 12:38 [net-next 0/4][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
2012-05-05 12:38 ` [net-next 1/4] e1000e: enable forced master/slave on 82577 Jeff Kirsher
2012-05-05 12:38 ` [net-next 2/4] e1000e: clear REQ and GNT in EECD (82571 && 82572) Jeff Kirsher
2012-05-05 12:38 ` [net-next 3/4] e1000e: increase version number Jeff Kirsher
2012-05-05 12:38 ` [net-next 4/4] ixgbe: dcb: IEEE PFC stats and reset logic incorrect Jeff Kirsher
2012-05-06 17:25 ` [net-next 0/4][pull request] Intel Wired LAN Driver Updates David Miller
2012-05-07  7:12   ` Jeff Kirsher
2012-05-07 16:33     ` David Miller

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