Skip to contentSkip to conversation

igb: do not force pcs link when in KX mode

PATCH Applied Jeff Kirsher 2 participants 8 messages Dec 23, 2009 – Dec 24, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/4 igb: do not force pcs link when in KX mode

From: Alexander Duyck <[email protected]>

We were forcing the PCS link up in error when we are in KX mode. We should only be disabling autoneg, not forcing the link up.

---

 drivers/net/igb/e1000_82575.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
drivers/net/igb/e1000_82575.c +1 -3
index e8e9e91..c505b50 100644
@@ -1096,9 +1096,7 @@ static s32 igb_setup_serdes_link_82575(struct e1000_hw *hw)
 		hw_dbg("Configuring Autoneg:PCS_LCTL=0x%08X\n", reg);
 	} else {
 		/* Set PCS register for forced link */
-		reg |= E1000_PCS_LCTL_FSD |        /* Force Speed */
-		       E1000_PCS_LCTL_FORCE_LINK | /* Force Link */
-		       E1000_PCS_LCTL_FLV_LINK_UP; /* Force link value up */
+		reg |= E1000_PCS_LCTL_FSD;        /* Force Speed */
 
 		hw_dbg("Configuring Forced Link:PCS_LCTL=0x%08X\n", reg);
 	}
#1 lore raw

PATCH 2/4 igb: do not force retry count to 1 on 82580 phy

From: Alexander Duyck <[email protected]>

This change resolves an issue seen in some configurations where the link may drop to 100Mb/s even though the link itself supports 1000Mb/s. The issue was root caused to the fact that we were only trying the link once. Now instead we will try up to 5 attempts on a faulty cable before downshifting to 100Mb/s.

---

 drivers/net/igb/e1000_phy.c |    9 ---------
 1 files changed, 0 insertions(+), 9 deletions(-)
drivers/net/igb/e1000_phy.c +0 -9
index 5c9d73e..3670a66 100644
@@ -457,15 +457,6 @@ s32 igb_copper_link_setup_82580(struct e1000_hw *hw)
 	phy_data |= I82580_CFG_ENABLE_DOWNSHIFT;
 
 	ret_val = phy->ops.write_reg(hw, I82580_CFG_REG, phy_data);
-	if (ret_val)
-		goto out;
-
-	/* Set number of link attempts before downshift */
-	ret_val = phy->ops.read_reg(hw, I82580_CTRL_REG, &phy_data);
-	if (ret_val)
-		goto out;
-	phy_data &= ~I82580_CTRL_DOWNSHIFT_MASK;
-	ret_val = phy->ops.write_reg(hw, I82580_CTRL_REG, phy_data);
 
 out:
 	return ret_val;
maintainer Applied
#2 lore raw

Re: [net-2.6 PATCH 2/4] igb: do not force retry count to 1 on 82580 phy

From: Jeff Kirsher <[email protected]>
Date: Wed, 23 Dec 2009 15:21:07 -0800

Quoted 10 lines

From: Alexander Duyck <[email protected]>

This change resolves an issue seen in some configurations where the link may drop to 100Mb/s even though the link itself supports 1000Mb/s. The issue was root caused to the fact that we were only trying the link once. Now instead we will try up to 5 attempts on a faulty cable before downshifting to 100Mb/s.

Applied.

#3 lore raw

PATCH 3/4 igb: correctly offset 82575 flow control watermarks by 16 bytes

In reply to Jeff Kirsher

From: Alexander Duyck <[email protected]>

The watermark values for the 82575 were not being set correctly. As a result the high and low watermark values were set to the same value which can lead to excess xon/xoff packets being generated.

---

 drivers/net/igb/igb_main.c |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)
drivers/net/igb/igb_main.c +2 -7
index 78963a0..933c64f 100644
@@ -1306,13 +1306,8 @@ void igb_reset(struct igb_adapter *adapter)
 	hwm = min(((pba << 10) * 9 / 10),
 			((pba << 10) - 2 * adapter->max_frame_size));
 
-	if (mac->type < e1000_82576) {
-		fc->high_water = hwm & 0xFFF8;	/* 8-byte granularity */
-		fc->low_water = fc->high_water - 8;
-	} else {
-		fc->high_water = hwm & 0xFFF0;	/* 16-byte granularity */
-		fc->low_water = fc->high_water - 16;
-	}
+	fc->high_water = hwm & 0xFFF0;	/* 16-byte granularity */
+	fc->low_water = fc->high_water - 16;
 	fc->pause_time = 0xFFFF;
 	fc->send_xon = 1;
 	fc->current_mode = fc->requested_mode;
maintainer Applied
#4 lore raw

Re: [net-2.6 PATCH 3/4] igb: correctly offset 82575 flow control watermarks by 16 bytes

From: Jeff Kirsher <[email protected]>
Date: Wed, 23 Dec 2009 15:21:27 -0800

Quoted 8 lines

From: Alexander Duyck <[email protected]>

The watermark values for the 82575 were not being set correctly. As a result the high and low watermark values were set to the same value which can lead to excess xon/xoff packets being generated.

Applied.

#5 lore raw

PATCH 4/4 igb: check both function bits in status register in wol exception

In reply to Jeff Kirsher

From: Alexander Duyck <[email protected]>

The ethtool code for enabling Wake on Lan was not correctly checking the status register bits so as a result ports 0 and 2 were both being allowed to set WOL to enabled even though it is only supported on the first port for our adapters.

---

 drivers/net/igb/igb_ethtool.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/igb/igb_ethtool.c +1 -1
index ac9d527..f771a6c 100644
@@ -1795,7 +1795,7 @@ static int igb_wol_exclusion(struct igb_adapter *adapter,
 		/* dual port cards only support WoL on port A from now on
 		 * unless it was enabled in the eeprom for port B
 		 * so exclude FUNC_1 ports from having WoL enabled */
-		if (rd32(E1000_STATUS) & E1000_STATUS_FUNC_1 &&
+		if ((rd32(E1000_STATUS) & E1000_STATUS_FUNC_MASK) &&
 		    !adapter->eeprom_wol) {
 			wol->supported = 0;
 			break;
maintainer Applied
#6 lore raw

Re: [net-2.6 PATCH 4/4] igb: check both function bits in status register in wol exception

From: Jeff Kirsher <[email protected]>
Date: Wed, 23 Dec 2009 15:21:46 -0800

Quoted 9 lines

From: Alexander Duyck <[email protected]>

The ethtool code for enabling Wake on Lan was not correctly checking the status register bits so as a result ports 0 and 2 were both being allowed to set WOL to enabled even though it is only supported on the first port for our adapters.

Applied.