netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [net-next-2.6 PATCH 1/4] ixgbe: handle parameters for tx and rx EITR, no div0
@ 2009-11-25  4:51 Jeff Kirsher
  2009-11-25  4:51 ` [net-next-2.6 PATCH 2/4] ixgbe: Disable Flow Control for certain devices Jeff Kirsher
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Jeff Kirsher @ 2009-11-25  4:51 UTC (permalink / raw)
  To: davem; +Cc: netdev, gospo, Jesse Brandeburg, Shannon Nelson, Jeff Kirsher

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

The driver was doing a divide by zero when adjusting tx-usecs.
This patch removes the divide by zero code and changes the logic slightly
to ignore tx-usecs in the case of shared TxRx vectors.

Cc: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---

 drivers/net/ixgbe/ixgbe_ethtool.c |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_ethtool.c b/drivers/net/ixgbe/ixgbe_ethtool.c
index 84ab4db..a5ca289 100644
--- a/drivers/net/ixgbe/ixgbe_ethtool.c
+++ b/drivers/net/ixgbe/ixgbe_ethtool.c
@@ -1972,6 +1972,10 @@ static int ixgbe_get_coalesce(struct net_device *netdev,
 		break;
 	}
 
+	/* if in mixed tx/rx queues per vector mode, report only rx settings */
+	if (adapter->q_vector[0]->txr_count && adapter->q_vector[0]->rxr_count)
+		return 0;
+
 	/* only valid if in constant ITR mode */
 	switch (adapter->tx_itr_setting) {
 	case 0:
@@ -1997,12 +2001,9 @@ static int ixgbe_set_coalesce(struct net_device *netdev,
 	struct ixgbe_q_vector *q_vector;
 	int i;
 
-	/*
-	 * don't accept tx specific changes if we've got mixed RxTx vectors
-	 * test and jump out here if needed before changing the rx numbers
-	 */
-	if ((1000000/ec->tx_coalesce_usecs) != adapter->tx_eitr_param &&
-	    adapter->q_vector[0]->txr_count && adapter->q_vector[0]->rxr_count)
+	/* don't accept tx specific changes if we've got mixed RxTx vectors */
+	if (adapter->q_vector[0]->txr_count && adapter->q_vector[0]->rxr_count
+	   && ec->tx_coalesce_usecs)
 		return -EINVAL;
 
 	if (ec->tx_max_coalesced_frames_irq)


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

* [net-next-2.6 PATCH 2/4] ixgbe: Disable Flow Control for certain devices
  2009-11-25  4:51 [net-next-2.6 PATCH 1/4] ixgbe: handle parameters for tx and rx EITR, no div0 Jeff Kirsher
@ 2009-11-25  4:51 ` Jeff Kirsher
  2009-11-29  8:34   ` David Miller
  2009-11-25  4:51 ` [net-next-2.6 PATCH 3/4] ixgbe: LINKS2 is not a valid register for 82598 Jeff Kirsher
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 8+ messages in thread
From: Jeff Kirsher @ 2009-11-25  4:51 UTC (permalink / raw)
  To: davem; +Cc: netdev, gospo, Peter P Waskiewicz Jr, Jeff Kirsher

From: PJ Waskiewicz <peter.p.waskiewicz.jr@intel.com>

Flow Control autoneg should be disabled for certain adapters
that don't support autonegotiation of Flow Control at 10 gigabit.
These interfaces are the 10GBASE-T devices, CX4, and SFP+, all
running at 10 gigabit only.  1 gigabit is fine.

Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---

 drivers/net/ixgbe/ixgbe_common.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_common.c b/drivers/net/ixgbe/ixgbe_common.c
index 40ff120..f42a954 100644
--- a/drivers/net/ixgbe/ixgbe_common.c
+++ b/drivers/net/ixgbe/ixgbe_common.c
@@ -1784,6 +1784,20 @@ s32 ixgbe_fc_autoneg(struct ixgbe_hw *hw)
 	}
 
 	/*
+	 * Bail out on
+	 * - copper or CX4 adapters
+	 * - fiber adapters running at 10gig
+	 */
+	if ((hw->phy.media_type == ixgbe_media_type_copper) ||
+	     (hw->phy.media_type == ixgbe_media_type_cx4) ||
+	     ((hw->phy.media_type == ixgbe_media_type_fiber) &&
+	     (speed == IXGBE_LINK_SPEED_10GB_FULL))) {
+		hw->fc.fc_was_autonegged = false;
+		hw->fc.current_mode = hw->fc.requested_mode;
+		goto out;
+	}
+
+	/*
 	 * Read the AN advertisement and LP ability registers and resolve
 	 * local flow control settings accordingly
 	 */


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

* [net-next-2.6 PATCH 3/4] ixgbe: LINKS2 is not a valid register for 82598
  2009-11-25  4:51 [net-next-2.6 PATCH 1/4] ixgbe: handle parameters for tx and rx EITR, no div0 Jeff Kirsher
  2009-11-25  4:51 ` [net-next-2.6 PATCH 2/4] ixgbe: Disable Flow Control for certain devices Jeff Kirsher
@ 2009-11-25  4:51 ` Jeff Kirsher
  2009-11-29  8:34   ` David Miller
  2009-11-25  4:52 ` [net-next-2.6 PATCH 4/4] ixgbe: Fix Receive Address Register (RAR) cleaning and accounting Jeff Kirsher
  2009-11-29  8:34 ` [net-next-2.6 PATCH 1/4] ixgbe: handle parameters for tx and rx EITR, no div0 David Miller
  3 siblings, 1 reply; 8+ messages in thread
From: Jeff Kirsher @ 2009-11-25  4:51 UTC (permalink / raw)
  To: davem; +Cc: netdev, gospo, Don Skidmore, Peter P Waskiewicz Jr, Jeff Kirsher

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

82598 shouldn't try and access LINKS2 while configuring
link and flow control.  This is an 82599-only register.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---

 drivers/net/ixgbe/ixgbe_common.c |   15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_common.c b/drivers/net/ixgbe/ixgbe_common.c
index f42a954..79533e2 100644
--- a/drivers/net/ixgbe/ixgbe_common.c
+++ b/drivers/net/ixgbe/ixgbe_common.c
@@ -1755,17 +1755,24 @@ s32 ixgbe_fc_autoneg(struct ixgbe_hw *hw)
 	/*
 	 * On backplane, bail out if
 	 * - backplane autoneg was not completed, or if
-	 * - link partner is not AN enabled
+	 * - we are 82599 and link partner is not AN enabled
 	 */
 	if (hw->phy.media_type == ixgbe_media_type_backplane) {
 		links = IXGBE_READ_REG(hw, IXGBE_LINKS);
-		links2 = IXGBE_READ_REG(hw, IXGBE_LINKS2);
-		if (((links & IXGBE_LINKS_KX_AN_COMP) == 0) ||
-		    ((links2 & IXGBE_LINKS2_AN_SUPPORTED) == 0)) {
+		if ((links & IXGBE_LINKS_KX_AN_COMP) == 0) {
 			hw->fc.fc_was_autonegged = false;
 			hw->fc.current_mode = hw->fc.requested_mode;
 			goto out;
 		}
+
+		if (hw->mac.type == ixgbe_mac_82599EB) {
+			links2 = IXGBE_READ_REG(hw, IXGBE_LINKS2);
+			if ((links2 & IXGBE_LINKS2_AN_SUPPORTED) == 0) {
+				hw->fc.fc_was_autonegged = false;
+				hw->fc.current_mode = hw->fc.requested_mode;
+				goto out;
+			}
+		}
 	}
 
 	/*


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

* [net-next-2.6 PATCH 4/4] ixgbe: Fix Receive Address Register (RAR) cleaning and accounting
  2009-11-25  4:51 [net-next-2.6 PATCH 1/4] ixgbe: handle parameters for tx and rx EITR, no div0 Jeff Kirsher
  2009-11-25  4:51 ` [net-next-2.6 PATCH 2/4] ixgbe: Disable Flow Control for certain devices Jeff Kirsher
  2009-11-25  4:51 ` [net-next-2.6 PATCH 3/4] ixgbe: LINKS2 is not a valid register for 82598 Jeff Kirsher
@ 2009-11-25  4:52 ` Jeff Kirsher
  2009-11-29  8:34   ` David Miller
  2009-11-29  8:34 ` [net-next-2.6 PATCH 1/4] ixgbe: handle parameters for tx and rx EITR, no div0 David Miller
  3 siblings, 1 reply; 8+ messages in thread
From: Jeff Kirsher @ 2009-11-25  4:52 UTC (permalink / raw)
  To: davem; +Cc: netdev, gospo, Shannon Nelson, Peter P Waskiewicz Jr,
	Jeff Kirsher

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

This fixes an issue when clearing out the RAR entries.  If RAR[0]
is the only address in use, don't clear the others.

Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---

 drivers/net/ixgbe/ixgbe_common.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_common.c b/drivers/net/ixgbe/ixgbe_common.c
index 79533e2..688b8ca 100644
--- a/drivers/net/ixgbe/ixgbe_common.c
+++ b/drivers/net/ixgbe/ixgbe_common.c
@@ -1382,10 +1382,10 @@ s32 ixgbe_update_uc_addr_list_generic(struct ixgbe_hw *hw,
 	hw->addr_ctrl.overflow_promisc = 0;
 
 	/* Zero out the other receive addresses */
-	hw_dbg(hw, "Clearing RAR[1-%d]\n", uc_addr_in_use);
-	for (i = 1; i <= uc_addr_in_use; i++) {
-		IXGBE_WRITE_REG(hw, IXGBE_RAL(i), 0);
-		IXGBE_WRITE_REG(hw, IXGBE_RAH(i), 0);
+	hw_dbg(hw, "Clearing RAR[1-%d]\n", uc_addr_in_use + 1);
+	for (i = 0; i < uc_addr_in_use; i++) {
+		IXGBE_WRITE_REG(hw, IXGBE_RAL(1+i), 0);
+		IXGBE_WRITE_REG(hw, IXGBE_RAH(1+i), 0);
 	}
 
 	/* Add the new addresses */


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

* Re: [net-next-2.6 PATCH 1/4] ixgbe: handle parameters for tx and rx EITR, no div0
  2009-11-25  4:51 [net-next-2.6 PATCH 1/4] ixgbe: handle parameters for tx and rx EITR, no div0 Jeff Kirsher
                   ` (2 preceding siblings ...)
  2009-11-25  4:52 ` [net-next-2.6 PATCH 4/4] ixgbe: Fix Receive Address Register (RAR) cleaning and accounting Jeff Kirsher
@ 2009-11-29  8:34 ` David Miller
  3 siblings, 0 replies; 8+ messages in thread
From: David Miller @ 2009-11-29  8:34 UTC (permalink / raw)
  To: jeffrey.t.kirsher; +Cc: netdev, gospo, jesse.brandeburg, shannon.nelson

From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Tue, 24 Nov 2009 20:51:06 -0800

> From: Shannon Nelson <shannon.nelson@intel.com>
> 
> The driver was doing a divide by zero when adjusting tx-usecs.
> This patch removes the divide by zero code and changes the logic slightly
> to ignore tx-usecs in the case of shared TxRx vectors.
> 
> Cc: Jesse Brandeburg <jesse.brandeburg@intel.com>
> Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>

Applied.

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

* Re: [net-next-2.6 PATCH 2/4] ixgbe: Disable Flow Control for certain devices
  2009-11-25  4:51 ` [net-next-2.6 PATCH 2/4] ixgbe: Disable Flow Control for certain devices Jeff Kirsher
@ 2009-11-29  8:34   ` David Miller
  0 siblings, 0 replies; 8+ messages in thread
From: David Miller @ 2009-11-29  8:34 UTC (permalink / raw)
  To: jeffrey.t.kirsher; +Cc: netdev, gospo, peter.p.waskiewicz.jr

From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Tue, 24 Nov 2009 20:51:28 -0800

> From: PJ Waskiewicz <peter.p.waskiewicz.jr@intel.com>
> 
> Flow Control autoneg should be disabled for certain adapters
> that don't support autonegotiation of Flow Control at 10 gigabit.
> These interfaces are the 10GBASE-T devices, CX4, and SFP+, all
> running at 10 gigabit only.  1 gigabit is fine.
> 
> Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>

Applied.

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

* Re: [net-next-2.6 PATCH 3/4] ixgbe: LINKS2 is not a valid register for 82598
  2009-11-25  4:51 ` [net-next-2.6 PATCH 3/4] ixgbe: LINKS2 is not a valid register for 82598 Jeff Kirsher
@ 2009-11-29  8:34   ` David Miller
  0 siblings, 0 replies; 8+ messages in thread
From: David Miller @ 2009-11-29  8:34 UTC (permalink / raw)
  To: jeffrey.t.kirsher; +Cc: netdev, gospo, donald.c.skidmore, peter.p.waskiewicz.jr

From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Tue, 24 Nov 2009 20:51:48 -0800

> From: Don Skidmore <donald.c.skidmore@intel.com>
> 
> 82598 shouldn't try and access LINKS2 while configuring
> link and flow control.  This is an 82599-only register.
> 
> Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
> Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>

Applied.

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

* Re: [net-next-2.6 PATCH 4/4] ixgbe: Fix Receive Address Register (RAR) cleaning and accounting
  2009-11-25  4:52 ` [net-next-2.6 PATCH 4/4] ixgbe: Fix Receive Address Register (RAR) cleaning and accounting Jeff Kirsher
@ 2009-11-29  8:34   ` David Miller
  0 siblings, 0 replies; 8+ messages in thread
From: David Miller @ 2009-11-29  8:34 UTC (permalink / raw)
  To: jeffrey.t.kirsher; +Cc: netdev, gospo, shannon.nelson, peter.p.waskiewicz.jr

From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Tue, 24 Nov 2009 20:52:10 -0800

> From: Shannon Nelson <shannon.nelson@intel.com>
> 
> This fixes an issue when clearing out the RAR entries.  If RAR[0]
> is the only address in use, don't clear the others.
> 
> Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
> Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>

Applied.

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

end of thread, other threads:[~2009-11-29  8:34 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-25  4:51 [net-next-2.6 PATCH 1/4] ixgbe: handle parameters for tx and rx EITR, no div0 Jeff Kirsher
2009-11-25  4:51 ` [net-next-2.6 PATCH 2/4] ixgbe: Disable Flow Control for certain devices Jeff Kirsher
2009-11-29  8:34   ` David Miller
2009-11-25  4:51 ` [net-next-2.6 PATCH 3/4] ixgbe: LINKS2 is not a valid register for 82598 Jeff Kirsher
2009-11-29  8:34   ` David Miller
2009-11-25  4:52 ` [net-next-2.6 PATCH 4/4] ixgbe: Fix Receive Address Register (RAR) cleaning and accounting Jeff Kirsher
2009-11-29  8:34   ` David Miller
2009-11-29  8:34 ` [net-next-2.6 PATCH 1/4] ixgbe: handle parameters for tx and rx EITR, no div0 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).