ixgbe: handle parameters for tx and rx EITR, no div0
Subsystems (2)
PATCH 1/4 ixgbe: handle parameters for tx and rx EITR, no div0
From: Shannon Nelson <[email protected]>
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.
---
drivers/net/ixgbe/ixgbe_ethtool.c | 13 +++++++------ 1 files changed, 7 insertions(+), 6 deletions(-)
drivers/net/ixgbe/ixgbe_ethtool.c +7 -6
@@ -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)
PATCH 2/4 ixgbe: Disable Flow Control for certain devices
From: PJ Waskiewicz <[email protected]>
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.
---
drivers/net/ixgbe/ixgbe_common.c | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-)
drivers/net/ixgbe/ixgbe_common.c +14 -0
@@ -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 */
Re: [net-next-2.6 PATCH 2/4] ixgbe: Disable Flow Control for certain devices
From: Jeff Kirsher <[email protected]>
Date: Tue, 24 Nov 2009 20:51:28 -0800
Quoted 9 lines
From: PJ Waskiewicz <[email protected]>
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 <[email protected]>Signed-off-by Jeff Kirsher <[email protected]>
Applied.
PATCH 3/4 ixgbe: LINKS2 is not a valid register for 82598
In reply to Jeff KirsherFrom: Don Skidmore <[email protected]>
82598 shouldn't try and access LINKS2 while configuring link and flow control. This is an 82599-only register.
---
drivers/net/ixgbe/ixgbe_common.c | 15 +++++++++++---- 1 files changed, 11 insertions(+), 4 deletions(-)
drivers/net/ixgbe/ixgbe_common.c +11 -4
@@ -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; + } + } }/*
Re: [net-next-2.6 PATCH 3/4] ixgbe: LINKS2 is not a valid register for 82598
From: Jeff Kirsher <[email protected]>
Date: Tue, 24 Nov 2009 20:51:48 -0800
Quoted 8 lines
From: Don Skidmore <[email protected]>
82598 shouldn't try and access LINKS2 while configuring link and flow control. This is an 82599-only register.
Signed-off-by Don Skidmore <[email protected]>Signed-off-by Peter P Waskiewicz Jr <[email protected]>Signed-off-by Jeff Kirsher <[email protected]>
Applied.
PATCH 4/4 ixgbe: Fix Receive Address Register (RAR) cleaning and accounting
In reply to Jeff KirsherFrom: Shannon Nelson <[email protected]>
This fixes an issue when clearing out the RAR entries. If RAR[0] is the only address in use, don't clear the others.
---
drivers/net/ixgbe/ixgbe_common.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
drivers/net/ixgbe/ixgbe_common.c +4 -4
@@ -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 */
Re: [net-next-2.6 PATCH 4/4] ixgbe: Fix Receive Address Register (RAR) cleaning and accounting
From: Jeff Kirsher <[email protected]>
Date: Tue, 24 Nov 2009 20:52:10 -0800
Quoted 8 lines
From: Shannon Nelson <[email protected]>
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 <[email protected]>Signed-off-by Peter P Waskiewicz Jr <[email protected]>Signed-off-by Jeff Kirsher <[email protected]>
Applied.
From: Jeff Kirsher <[email protected]>
Date: Tue, 24 Nov 2009 20:51:06 -0800
Quoted 9 lines
From: Shannon Nelson <[email protected]>
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 <[email protected]>Signed-off-by Shannon Nelson <[email protected]>Signed-off-by Jeff Kirsher <[email protected]>
Applied.