Skip to contentSkip to conversation

ixgbe: cleanup ethtool autoneg input

PATCH Applied Jeff Kirsher 2 participants 2 messages Apr 27, 2010

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

PATCH 1/1 ixgbe: cleanup ethtool autoneg input

From: Don Skidmore <[email protected]>

The way we were setting autoneg via ethtool was inconstant with that of our other drivers. It will change the following:

If autoneg is off:

Quoted 1 line

ethtool -a eth0

Pause parameters for eth0:

Autonegotiate:  off
RX:             off
TX:             off

Before:

Quoted 2 lines

ethtool -A eth0 autoneg on
ethtool -a eth0

Pause parameters for eth0:

Autonegotiate:  off
RX:             off
TX:             off

Now:

Quoted 2 lines

ethtool -A eth0 autoneg on
ethtool -a eth0

Pause parameters for eth0:

Autonegotiate:  on
RX:             on
TX:             on

---

 drivers/net/ixgbe/ixgbe_ethtool.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/ixgbe/ixgbe_ethtool.c +1 -1
index 5f8c6ab..dfbfe35 100644
@@ -365,7 +365,7 @@ static int ixgbe_set_pauseparam(struct net_device *netdev,
 	else
 		fc.disable_fc_autoneg = false;
 
-	if (pause->rx_pause && pause->tx_pause)
+	if ((pause->rx_pause && pause->tx_pause) || pause->autoneg)
 		fc.requested_mode = ixgbe_fc_full;
 	else if (pause->rx_pause && !pause->tx_pause)
 		fc.requested_mode = ixgbe_fc_rx_pause;