[PATCH 2.4] fix tg3 mtu settings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The tg3 driver has had broken MTU handling since lk 2.4.21-pre5.  After
initially bringing the interface up with a MTU of 9000, or after
changing the MTU setting, there is no RX activity until "ifconfig eth0
down; ifconfig eth0 up" is done.  I reported this problem on the mailing
list and to the maintainers more than a year ago and again a few months
ago, only to be completely ignored.  Maybe my message just didn't get
through.

Below is the patch to fix it.  A better fix is probably possible, but I
am not familiar with network driver programming.

This is what happens without the patch:

modprobe tg3
ifconfig eth0 192.168.1.2 netmask 255.255.255.0 mtu 1500 up
ping 192.168.1.1 (ok)
ifconfig eth0 mtu 9000
ping 192.168.1.1 (no response)
ifconfig eth0 down
ifconfig eth0 up
ping 192.168.1.1 (ok)
ifconfig eth0 down
modprobe -r tg3
modprobe tg3
ifconfig eth0 192.168.1.2 netmask 255.255.255.0 mtu 9000 up
ping 192.168.1.1 (no response)
ifconfig eth0 down
ifconfig eth0 up
ping 192.168.1.1 (ok)
ifconfig eth0 mtu 1500
ping 192.168.1.1 (no response)
ifconfig eth0 down
ifconfig eth0 up
ping 192.168.1.1 (ok)

This is what happens with the patch:

modprobe tg3
ifconfig eth0 192.168.1.2 netmask 255.255.255.0 mtu 1500 up
ping 192.168.1.1 (ok)
ifconfig eth0 mtu 9000
ping 192.168.1.1 (ok)
ifconfig eth0 down
modprobe -r tg3
modprobe tg3
ifconfig eth0 192.168.1.2 netmask 255.255.255.0 mtu 9000 up
ping 192.168.1.1 (ok)
ifconfig eth0 mtu 1500
ping 192.168.1.1 (ok)

The NIC I am using is a 3Com 3C996BT.

Anthony J. Battersby
Cybernetics

diff -urN linux-2.4.27-vanilla/drivers/net/tg3.c linux-2.4.27-tg3/drivers/net/tg3.c
--- linux-2.4.27-vanilla/drivers/net/tg3.c	Sat Aug  7 19:26:05 2004
+++ linux-2.4.27-tg3/drivers/net/tg3.c	Fri Aug 13 13:52:06 2004
@@ -3090,7 +3090,6 @@
 		return 0;
 	}
 
-	tg3_netif_stop(tp);
 	spin_lock_irq(&tp->lock);
 	spin_lock(&tp->tx_lock);
 
@@ -3102,7 +3101,6 @@
 
 	spin_unlock(&tp->tx_lock);
 	spin_unlock_irq(&tp->lock);
-	tg3_netif_start(tp);
 
 	return 0;
 }
-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux