Skip to contentSkip to conversation

TG3 doesn't work in kernel 2.4.27

DISCUSSION Tetsuo Handa 4 participants 5 messages Aug 17, 2004 – Aug 18, 2004 1 message not in the archive Network drivers

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Hello, David.

Quoted 11 lines · On Mon, 16 Aug 2004 14:38:24 -0700 "David S. Miller" wrote:
Quoted 2 lines · On Mon, 16 Aug 2004 20:51:03 +0900 Tetsuo Handa <[email protected]> wrote:

From 2.4.26 till 2.4.27-rc3 were all OK.
This trouble happens with 2.4.27-rc4 and later.

It's Sun's buggy 5704 Fiber auto-negotiation changes.

Here is a hacky possible fix, can you try it?

===== drivers/net/tg3.c 1.190 vs edited =====

I compiled as a UP kernel but it wasn't the cause. Also, I patched the above fix on 2.4.27-rc4 and compiled as a UP kernel, but didn't work.

Now I would like to mail to Marcelo Tosatti, too.

Current Status:
* The driver is tg3.o
* The problem began with 2.4.27-rc4.
* DHCP fails.
* Static IP assignment shows no error, but network is still unreachable. ('ifconfig' and 'route add default gw' by hand)
* DHCP packets are unreachable to DHCP server.
(I don't know which options are used for tcpdump.

    I hear that 2.4.26 worked but 2.4.27 didn't. PXE's DHCP works. )

* 'arp' at DHCP server shows a line with <incomplete> status.
* Compiling as a UP kernel didn't solve the problem.
(The box is Xeon 3.2 GHz / 1 CPU with hyper-threading)
* Compiling as a UP kernel with the above fix didn't solve.
* The error message "HW autoneg failed" appears.
(But (I think) this message doesn't exist in tg3.c for 2.4.26,
so I don't know autoneg were successful or not in 2.4.26,
if helpful I will insert printk() and try.
The link ups (if 2.4.26) 1000Mbps full duplex, off for TX and off for RX.)

Regards...
---
Tetsuo Handa

#2 lore raw
Quoted 4 lines · Tetsuo Handa

I compiled as a UP kernel but it wasn't the cause. Also, I patched the above fix on 2.4.27-rc4 and compiled as a UP kernel, but didn't work.

Testsuo,

Please send the output of lspci -vv. It might be helpful to know exactly which device is involved.

David,

FWIW, I think I'm seeing the same problem with the BCM5751 built-in to my HP xw4200...

John

#3 lore raw
Quoted 9 lines · On Tue, 17 Aug 2004 10:03:34 -0400 "John W. Linville" <[email protected]>…
Quoted 4 lines · Tetsuo Handa

I compiled as a UP kernel but it wasn't the cause. Also, I patched the above fix on 2.4.27-rc4 and compiled as a UP kernel, but didn't work.

Testsuo,

Quoted 7 lines

Please send the output of lspci -vv. It might be helpful to know exactly which device is involved.

David,

FWIW, I think I'm seeing the same problem with the BCM5751 built-in to my HP xw4200...

This bug can only affect 5704 chips with fiber interfaces.

#4 lore raw
In reply to Tetsuo Handa
Quoted 3 lines · On Tue, 17 Aug 2004 21:30:06 +0900 Tetsuo Handa <[email protected]> wrote:

I compiled as a UP kernel but it wasn't the cause. Also, I patched the above fix on 2.4.27-rc4 and compiled as a UP kernel, but didn't work.

Just add this patch, it will fix the problem but it is not the nicest fix. I'll work on a better one.

It just disables the new Sun code, and uses the old fiber handling for 5704.

===== drivers/net/tg3.c 1.193 vs edited =====

drivers/net/tg3.c +2 -2
@@ -5415,13 +5398,13 @@
 	 * is enabled.
 	 */
 	tw32_f(MAC_LOW_WMARK_MAX_RX_FRAME, 2);
-
+#if 0
 	if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704 &&
 	    (tp->tg3_flags2 & TG3_FLG2_PHY_SERDES)) {
 		/* Use hardware link auto-negotiation */
 		tp->tg3_flags2 |= TG3_FLG2_HW_AUTONEG;
 	}
-
+#endif
 	err = tg3_setup_phy(tp, 1);
 	if (err)
 		return err;
#5 lore raw

Re: TG3 doesn't work in kernel 2.4.27 (Resolved!)

Hello, David.

In message <[email protected]>
"Re: TG3 doesn't work in kernel 2.4.27"

Quoted 7 lines · ""David S. Miller" <[email protected]>" wrote:
Quoted 3 lines · On Tue, 17 Aug 2004 21:30:06 +0900 Tetsuo Handa <[email protected]> wrote:

I compiled as a UP kernel but it wasn't the cause. Also, I patched the above fix on 2.4.27-rc4 and compiled as a UP kernel, but didn't work.

Quoted 6 lines

Just add this patch, it will fix the problem but it is not the nicest fix. I'll work on a better one.

It just disables the new Sun code, and uses the old fiber handling for 5704.

It resolved the problem. It works on SMP kernel, too. The line position was different for tg3.c in 2.4.27 .

-----START-----

tg3.c renamed from tg3.c.org +2 -2
@@ -5264,7 +5264,7 @@
 	 * is enabled.
 	 */
 	tw32_f(MAC_LOW_WMARK_MAX_RX_FRAME, 2);
-
+#if 0
 	if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704 &&
 	    tp->phy_id == PHY_ID_SERDES) {
 		/* Enable hardware link auto-negotiation */
@@ -5284,7 +5284,7 @@
 
 		tp->tg3_flags2 |= TG3_FLG2_HW_AUTONEG;
 	}
-
+#endif
 	err = tg3_setup_phy(tp, 1);
 	if (err)
 		return err;

-----END-----

Also, as you have mentioned that this bug can only affect 5704 chips with fiber interfaces, I found that the box has BCM5704S. The following is the result of 'lspci -vv'.

-----START-----
00:00.0 Host bridge: ServerWorks CNB20-HE Host Bridge (rev 33)
Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap- 66Mhz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR-

00:00.1 Host bridge: ServerWorks CNB20-HE Host Bridge
Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap- 66Mhz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR-

00:00.2 Host bridge: ServerWorks CNB20-HE Host Bridge
Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap- 66Mhz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR-

00:01.0 VGA compatible controller: ATI Technologies Inc Rage XL (rev 27) (prog-if 00 [VGA])
Subsystem: IBM: Unknown device 0240
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping+ SERR- FastB2B-
Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 64 (2000ns min), cache line size 08
Interrupt: pin A routed to IRQ 20
Region 0: Memory at fd000000 (32-bit, non-prefetchable) [size=16M]
Region 1: I/O ports at 2200 [size=256]
Region 2: Memory at febff000 (32-bit, non-prefetchable) [size=4K]
Expansion ROM at <unassigned> [disabled] [size=128K]
Capabilities: [5c] Power Management version 2
Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-

00:0f.0 Host bridge: ServerWorks CSB6 South Bridge (rev b0)
Subsystem: ServerWorks: Unknown device 0201
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr+ Stepping- SERR+ FastB2B-
Status: Cap- 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort+ >SERR- <PERR-
Latency: 64

00:0f.1 IDE interface: ServerWorks CSB6 RAID/IDE Controller (rev b0) (prog-if 8a [Master SecP PriP])
Subsystem: ServerWorks: Unknown device 0212
Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV+ VGASnoop- ParErr+ Stepping- SERR+ FastB2B-
Status: Cap- 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 64, cache line size 08
Region 0: I/O ports at <ignored>
Region 1: I/O ports at <ignored>
Region 2: I/O ports at <ignored>
Region 3: I/O ports at <ignored>
Region 4: I/O ports at 0700 [size=16]

00:0f.2 USB Controller: ServerWorks CSB6 OHCI USB Controller (rev 05) (prog-if 10 [OHCI])
Subsystem: ServerWorks: Unknown device 0220
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV+ VGASnoop- ParErr+ Stepping- SERR+ FastB2B-
Status: Cap- 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 64 (20000ns max), cache line size 08
Interrupt: pin A routed to IRQ 7
Region 0: Memory at febfe000 (32-bit, non-prefetchable) [size=4K]

00:0f.3 ISA bridge: ServerWorks GCLE-2 Host Bridge
Subsystem: ServerWorks: Unknown device 0230
Control: I/O- Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr+ Stepping- SERR+ FastB2B-
Status: Cap- 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 0

00:10.0 Host bridge: ServerWorks: Unknown device 0110 (rev 12)
Control: I/O- Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr+ Stepping- SERR+ FastB2B-
Status: Cap+ 66Mhz+ UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort+ >SERR- <PERR-
Capabilities: [60] PCI-X non-bridge device.
Command: DPERE- ERO- RBC=0 OST=4
Status: Bus=0 Dev=0 Func=0 64bit- 133MHz- SCD- USC-, DC=simple, DMMRBC=0, DMOST=0, DMCRS=0, RSCEM-
00:10.2 Host bridge: ServerWorks: Unknown device 0110 (rev 12)
Control: I/O- Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr+ Stepping- SERR+ FastB2B-
Status: Cap+ 66Mhz+ UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort+ >SERR- <PERR-
Capabilities: [60] PCI-X non-bridge device.
Command: DPERE- ERO- RBC=0 OST=4
Status: Bus=0 Dev=0 Func=0 64bit- 133MHz- SCD- USC-, DC=simple, DMMRBC=0, DMOST=0, DMCRS=0, RSCEM-
01:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5704S Gigabit Ethernet (rev 02)
Subsystem: IBM: Unknown device 029c
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr+ Stepping- SERR+ FastB2B-
Status: Cap+ 66Mhz+ UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 64 (16000ns min), cache line size 08
Interrupt: pin A routed to IRQ 16
Region 0: Memory at fbff0000 (64-bit, non-prefetchable) [size=64K]
Region 2: Memory at fbfe0000 (64-bit, non-prefetchable) [size=64K]
Capabilities: [40] PCI-X non-bridge device.
Command: DPERE- ERO- RBC=2 OST=0
Status: Bus=0 Dev=0 Func=0 64bit- 133MHz- SCD- USC-, DC=simple, DMMRBC=0, DMOST=0, DMCRS=0, RSCEM- Capabilities: [48] Power Management version 2
Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot+,D3cold+)
Status: D0 PME-Enable+ DSel=0 DScale=1 PME-
Capabilities: [50] Vital Product Data
Capabilities: [58] Message Signalled Interrupts: 64bit+ Queue=0/3 Enable-
Address: 0000000100000000 Data: c065

01:00.1 Ethernet controller: Broadcom Corporation NetXtreme BCM5704S Gigabit Ethernet (rev 02)
Subsystem: IBM: Unknown device 029c
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr+ Stepping- SERR+ FastB2B-
Status: Cap+ 66Mhz+ UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 64 (16000ns min), cache line size 08
Interrupt: pin B routed to IRQ 17
Region 0: Memory at fbfd0000 (64-bit, non-prefetchable) [size=64K]
Region 2: Memory at fbfc0000 (64-bit, non-prefetchable) [size=64K]
Capabilities: [40] PCI-X non-bridge device.
Command: DPERE- ERO- RBC=2 OST=0
Status: Bus=0 Dev=0 Func=0 64bit- 133MHz- SCD- USC-, DC=simple, DMMRBC=0, DMOST=0, DMCRS=0, RSCEM- Capabilities: [48] Power Management version 2
Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot+,D3cold+)
Status: D0 PME-Enable+ DSel=0 DScale=1 PME-
Capabilities: [50] Vital Product Data
Capabilities: [58] Message Signalled Interrupts: 64bit+ Queue=0/3 Enable-
Address: 0000000100000000 Data: bef5

02:02.0 Fibre Channel: QLogic Corp. QLA2312 Fibre Channel Adapter (rev 02)
Subsystem: IBM: Unknown device 027d
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV+ VGASnoop- ParErr+ Stepping- SERR+ FastB2B-
Status: Cap+ 66Mhz+ UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 64 (16000ns min), cache line size 08
Interrupt: pin A routed to IRQ 18
Region 0: I/O ports at 2400 [size=256]
Region 1: Memory at f9ffe000 (64-bit, non-prefetchable) [size=4K]
Expansion ROM at <unassigned> [disabled] [size=128K]
Capabilities: [44] Power Management version 2
Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [4c] PCI-X non-bridge device.
Command: DPERE- ERO+ RBC=0 OST=2
Status: Bus=0 Dev=0 Func=0 64bit- 133MHz- SCD- USC-, DC=simple, DMMRBC=0, DMOST=0, DMCRS=0, RSCEM- Capabilities: [54] Message Signalled Interrupts: 64bit+ Queue=0/3 Enable-
Address: 0000000000000000 Data: 0000
Capabilities: [64] #06 [0080]

02:02.1 Fibre Channel: QLogic Corp. QLA2312 Fibre Channel Adapter (rev 02)
Subsystem: IBM: Unknown device 027d
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV+ VGASnoop- ParErr+ Stepping- SERR+ FastB2B-
Status: Cap+ 66Mhz+ UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 64 (16000ns min), cache line size 08
Interrupt: pin B routed to IRQ 19
Region 0: I/O ports at 2600 [size=256]
Region 1: Memory at f9ffc000 (64-bit, non-prefetchable) [size=4K]
Expansion ROM at <unassigned> [disabled] [size=128K]
Capabilities: [44] Power Management version 2
Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [4c] PCI-X non-bridge device.
Command: DPERE- ERO+ RBC=0 OST=2
Status: Bus=0 Dev=0 Func=0 64bit- 133MHz- SCD- USC-, DC=simple, DMMRBC=0, DMOST=0, DMCRS=0, RSCEM- Capabilities: [54] Message Signalled Interrupts: 64bit+ Queue=0/3 Enable-
Address: 0000000000000000 Data: 0000
Capabilities: [64] #06 [0080]

-----END-----

Thank you very much.
-----
Tetsuo Handa