Re: Tigon3 auto-negotiation

From: David S. Miller (davem@redhat.com)
Date: Thu Nov 06 2003 - 12:30:23 EST


On Thu, 6 Nov 2003 08:48:47 -0800
Simon Kirby <sim@xxxxxxxxxxxx> wrote:

> Did anything change recently with this? I'm unable to turn off autoneg
> with "ethtool -s eth0 autoneg off" anymore, and this used to work with
> 2.4.21 or so. It does not appear to work with 2.4.23-pre8 or even with
> 2.6.0-test9 (5701 and 5702 chips tested).

Known bug, I fixed it yesterday.

# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
# ChangeSet 1.1188 -> 1.1189
# drivers/net/tg3.c 1.99 -> 1.100
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/11/05 davem@xxxxxxxxxxxxxx 1.1189
# [TG3]: Fix bugs in ETHTOOL_SSET introduced by ethtool_ops conversion.
# - Missing spin_lock*() calls before tp->link_config twiddling.
# - Missing assignment to tp->link_config.autoneg
# --------------------------------------------
#
diff -Nru a/drivers/net/tg3.c b/drivers/net/tg3.c
--- a/drivers/net/tg3.c Wed Nov 5 14:39:10 2003
+++ b/drivers/net/tg3.c Wed Nov 5 14:39:10 2003
@@ -5934,6 +5934,10 @@
tp->link_config.phy_is_low_power)
return -EAGAIN;

+ spin_lock_irq(&tp->lock);
+ spin_lock(&tp->tx_lock);
+
+ tp->link_config.autoneg = cmd->autoneg;
if (cmd->autoneg == AUTONEG_ENABLE) {
tp->link_config.advertising = cmd->advertising;
tp->link_config.speed = SPEED_INVALID;
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html