netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [net 0/2][pull request] Intel Wired LAN Driver updates
@ 2012-04-14  8:51 Jeff Kirsher
  2012-04-14  8:51 ` [net 1/2] e1000e: issues in Sx on 82577/8/9 Jeff Kirsher
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Jeff Kirsher @ 2012-04-14  8:51 UTC (permalink / raw)
  To: davem; +Cc: Jeff Kirsher, netdev, gospo, sassmann

This series of patches contains fixes for e1000e and ixgbe.

The following are changes since commit 3c5e979bd037888dd7d722da22da4b43659af485:
  net: smsc911x: fix skb handling in receive path
and are available in the git repository at:
  git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net master

Bruce Allan (1):
  e1000e: issues in Sx on 82577/8/9

Don Skidmore (1):
  ixgbe: fix WoL issue with fiber

 drivers/net/ethernet/intel/e1000e/ich8lan.c   |   15 ++++++++++-----
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c |   10 ++++++++++
 2 files changed, 20 insertions(+), 5 deletions(-)

-- 
1.7.7.6

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

* [net 1/2] e1000e: issues in Sx on 82577/8/9
  2012-04-14  8:51 [net 0/2][pull request] Intel Wired LAN Driver updates Jeff Kirsher
@ 2012-04-14  8:51 ` Jeff Kirsher
  2012-04-14  8:51 ` [net 2/2] ixgbe: fix WoL issue with fiber Jeff Kirsher
  2012-04-14 19:17 ` [net 0/2][pull request] Intel Wired LAN Driver updates David Miller
  2 siblings, 0 replies; 6+ messages in thread
From: Jeff Kirsher @ 2012-04-14  8:51 UTC (permalink / raw)
  To: davem; +Cc: Bruce Allan, netdev, gospo, sassmann, Jeff Kirsher

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

A workaround was previously put in the driver to reset the device when
transitioning to Sx in order to activate the changed settings of the PHY
OEM bits (Low Power Link Up, or LPLU, and GbE disable configuration) for
82577/8/9 devices.  After further review, it was found such a reset can
cause the 82579 to confuse which version of 82579 it actually is and broke
LPLU on all 82577/8/9 devices.  The workaround during an S0->Sx transition
on 82579 (instead of resetting the PHY) is to restart auto-negotiation
after the OEM bits are configured; the restart of auto-negotiation
activates the new OEM bits as does the reset.  With 82577/8, the reset is
changed to a generic reset which fixes the LPLU bits getting set wrong.

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/ich8lan.c |   15 ++++++++++-----
 1 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ethernet/intel/e1000e/ich8lan.c b/drivers/net/ethernet/intel/e1000e/ich8lan.c
index 64c7644..b461c24 100644
--- a/drivers/net/ethernet/intel/e1000e/ich8lan.c
+++ b/drivers/net/ethernet/intel/e1000e/ich8lan.c
@@ -1310,10 +1310,6 @@ static s32 e1000_oem_bits_config_ich8lan(struct e1000_hw *hw, bool d0_state)
 
 		if (mac_reg & E1000_PHY_CTRL_D0A_LPLU)
 			oem_reg |= HV_OEM_BITS_LPLU;
-
-		/* Set Restart auto-neg to activate the bits */
-		if (!hw->phy.ops.check_reset_block(hw))
-			oem_reg |= HV_OEM_BITS_RESTART_AN;
 	} else {
 		if (mac_reg & (E1000_PHY_CTRL_GBE_DISABLE |
 			       E1000_PHY_CTRL_NOND0A_GBE_DISABLE))
@@ -1324,6 +1320,11 @@ static s32 e1000_oem_bits_config_ich8lan(struct e1000_hw *hw, bool d0_state)
 			oem_reg |= HV_OEM_BITS_LPLU;
 	}
 
+	/* Set Restart auto-neg to activate the bits */
+	if ((d0_state || (hw->mac.type != e1000_pchlan)) &&
+	    !hw->phy.ops.check_reset_block(hw))
+		oem_reg |= HV_OEM_BITS_RESTART_AN;
+
 	ret_val = hw->phy.ops.write_reg_locked(hw, HV_OEM_BITS, oem_reg);
 
 release:
@@ -3682,7 +3683,11 @@ void e1000_suspend_workarounds_ich8lan(struct e1000_hw *hw)
 
 	if (hw->mac.type >= e1000_pchlan) {
 		e1000_oem_bits_config_ich8lan(hw, false);
-		e1000_phy_hw_reset_ich8lan(hw);
+
+		/* Reset PHY to activate OEM bits on 82577/8 */
+		if (hw->mac.type == e1000_pchlan)
+			e1000e_phy_hw_reset_generic(hw);
+
 		ret_val = hw->phy.ops.acquire(hw);
 		if (ret_val)
 			return;
-- 
1.7.7.6

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

* [net 2/2] ixgbe: fix WoL issue with fiber
  2012-04-14  8:51 [net 0/2][pull request] Intel Wired LAN Driver updates Jeff Kirsher
  2012-04-14  8:51 ` [net 1/2] e1000e: issues in Sx on 82577/8/9 Jeff Kirsher
@ 2012-04-14  8:51 ` Jeff Kirsher
  2012-04-14 18:47   ` Jan Ceuleers
  2012-04-14 19:17 ` [net 0/2][pull request] Intel Wired LAN Driver updates David Miller
  2 siblings, 1 reply; 6+ messages in thread
From: Jeff Kirsher @ 2012-04-14  8:51 UTC (permalink / raw)
  To: davem; +Cc: Don Skidmore, netdev, gospo, sassmann, Jeff Kirsher

From: Don Skidmore <donald.c.skidmore@intel.com>

There are times we turn of the laser before shutdown.  This is a bad thing
if we want to wake on lan to work so now we make sure the laser is on
before shutdown if we support WoL.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index 3e26b1f..dac7c01 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -4893,6 +4893,16 @@ static int __ixgbe_shutdown(struct pci_dev *pdev, bool *enable_wake)
 	if (wufc) {
 		ixgbe_set_rx_mode(netdev);
 
+		/*
+		 * enable the optics for both mult-speed fiber and
+		 * 82599 SFP+ fiber as we can WoL.
+		 */
+		if (hw->mac.ops.enable_tx_laser &&
+		    (hw->phy.multispeed_fiber ||
+		    (hw->mac.ops.get_media_type(hw) == ixgbe_media_type_fiber &&
+		     hw->mac.type == ixgbe_mac_82599EB)))
+			hw->mac.ops.enable_tx_laser(hw);
+
 		/* turn on all-multi mode if wake on multicast is enabled */
 		if (wufc & IXGBE_WUFC_MC) {
 			fctrl = IXGBE_READ_REG(hw, IXGBE_FCTRL);
-- 
1.7.7.6

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

* Re: [net 2/2] ixgbe: fix WoL issue with fiber
  2012-04-14  8:51 ` [net 2/2] ixgbe: fix WoL issue with fiber Jeff Kirsher
@ 2012-04-14 18:47   ` Jan Ceuleers
  2012-04-16 13:57     ` Skidmore, Donald C
  0 siblings, 1 reply; 6+ messages in thread
From: Jan Ceuleers @ 2012-04-14 18:47 UTC (permalink / raw)
  To: Jeff Kirsher; +Cc: davem, Don Skidmore, netdev, gospo, sassmann

Jeff Kirsher wrote:
> From: Don Skidmore<donald.c.skidmore@intel.com>
>
> There are times we turn of the laser before shutdown.  This is a bad thing
> if we want to wake on lan to work so now we make sure the laser is on
> before shutdown if we support WoL.

I'm ever-so-sorry if this is a silly question, but:

WOL is receive-only, right? Why does the laser need to be on?

Thanks, Jan

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

* Re: [net 0/2][pull request] Intel Wired LAN Driver updates
  2012-04-14  8:51 [net 0/2][pull request] Intel Wired LAN Driver updates Jeff Kirsher
  2012-04-14  8:51 ` [net 1/2] e1000e: issues in Sx on 82577/8/9 Jeff Kirsher
  2012-04-14  8:51 ` [net 2/2] ixgbe: fix WoL issue with fiber Jeff Kirsher
@ 2012-04-14 19:17 ` David Miller
  2 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2012-04-14 19:17 UTC (permalink / raw)
  To: jeffrey.t.kirsher; +Cc: netdev, gospo, sassmann

From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Sat, 14 Apr 2012 01:51:16 -0700

> This series of patches contains fixes for e1000e and ixgbe.
> 
> The following are changes since commit 3c5e979bd037888dd7d722da22da4b43659af485:
>   net: smsc911x: fix skb handling in receive path
> and are available in the git repository at:
>   git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net master

Pulled, thanks Jeff.

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

* RE: [net 2/2] ixgbe: fix WoL issue with fiber
  2012-04-14 18:47   ` Jan Ceuleers
@ 2012-04-16 13:57     ` Skidmore, Donald C
  0 siblings, 0 replies; 6+ messages in thread
From: Skidmore, Donald C @ 2012-04-16 13:57 UTC (permalink / raw)
  To: Jan Ceuleers, Kirsher, Jeffrey T; +Cc: davem, netdev, gospo, sassmann

>-----Original Message-----
>From: Jan Ceuleers [mailto:jan.ceuleers@computer.org]
>Sent: Saturday, April 14, 2012 11:48 AM
>To: Kirsher, Jeffrey T
>Cc: davem@davemloft.net; Skidmore, Donald C; netdev@vger.kernel.org;
>gospo@redhat.com; sassmann@redhat.com
>Subject: Re: [net 2/2] ixgbe: fix WoL issue with fiber
>
>Jeff Kirsher wrote:
>> From: Don Skidmore<donald.c.skidmore@intel.com>
>>
>> There are times we turn of the laser before shutdown.  This is a bad
>thing
>> if we want to wake on lan to work so now we make sure the laser is on
>> before shutdown if we support WoL.
>
>I'm ever-so-sorry if this is a silly question, but:
>
>WOL is receive-only, right? Why does the laser need to be on?
>
>Thanks, Jan

Without the laser on we can't get link and without link we can't get the magic packet to wake us up.

Thanks,
-Don Skidmore <donald.c.skidmore@intel.com>

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

end of thread, other threads:[~2012-04-16 13:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-14  8:51 [net 0/2][pull request] Intel Wired LAN Driver updates Jeff Kirsher
2012-04-14  8:51 ` [net 1/2] e1000e: issues in Sx on 82577/8/9 Jeff Kirsher
2012-04-14  8:51 ` [net 2/2] ixgbe: fix WoL issue with fiber Jeff Kirsher
2012-04-14 18:47   ` Jan Ceuleers
2012-04-16 13:57     ` Skidmore, Donald C
2012-04-14 19:17 ` [net 0/2][pull request] Intel Wired LAN Driver updates 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).