Skip to contentSkip to conversation

Gigabit Ethernet support for forcedeth

PATCH Tim Waugh 2 participants 6 messages Jul 30, 2004 – Aug 2, 2004 1 message not in the archive

lore
Share & tools
lore

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

author
#2 lore raw
Quoted 9 lines · Manfred Spraul
Quoted 4 lines · Tim Waugh

Works fine if I back out that patch.

The patch rewrites the phy initialization. Backing it out is not really a solution: I have one report that it fixes the link detection, without the patch no link is detected.

I wasn't suggesting it as a solution, just trying to provide data. Now you have a report that it breaks link detection. :-)

Quoted 2 lines

Which phy is used by your board? Could you enable dprintk (near line
115) and reload the driver?

I've enabled dprintk and captured *.debug syslog output from a normal boot. Here is the result:

http://cyberelk.net/tim/tmp/forcedeth-debug

Hope you can make some sense of it. Let me know what else I can try.

Tim.
*/

#3 lore raw
Quoted 11 lines · Tim Waugh
Quoted 3 lines

Which phy is used by your board? Could you enable dprintk (near line 115) and reload the driver?

I've enabled dprintk and captured *.debug syslog output from a normal boot. Here is the result:

http://cyberelk.net/tim/tmp/forcedeth-debug

The log is very odd - why are there two lines with

Quoted 1 line

forcedeth.c: Reverse Engineered nForce ethernet driver. Version 0.28.

Did you rmmod/insmod the driver twice?

Could you manually insmod the driver, wait for two seconds and then call ifup? The new driver
- resets the phy during _probe. The result is no link for a few seconds, until autonegotiation has completed.
- check if there is a link during _open(). If there is a link, it's used. If there is no link, then it relies on the link irq to detect it.

I frequently see the "no link" messages during ifup, but on my system the driver recovers as soon as the autonegotiation is completed. Perhaps I must add a link handling timer that polls for link changes.

If a delay before ifup is not enough: manually call nv_link_irq even if NVREG_IRQ_LINK is not set. If this is not enough: comment out the NVREG_MIISTAT_LINKCHANGE test in nv_link_irq.

--
Manfred
--
Manfred

author
#4 lore raw
Quoted 5 lines · Manfred Spraul

The log is very odd - why are there two lines with

Quoted 1 line

forcedeth.c: Reverse Engineered nForce ethernet driver. Version 0.28.

Did you rmmod/insmod the driver twice?

I think it's just the way that ifup works. I'm not entirely sure why the line appears twice.

Quoted 2 lines

Could you manually insmod the driver, wait for two seconds and then call ifup?

Aha. That works fine.

So here is how to make it fail:

/sbin/modprobe forcedeth; \
/sbin/ip link set dev eth0 up

All subsequent runs of 'ethtool eth0' show:

Settings for eth0:
Supports Wake-on: g
Wake-on: d
Link detected: no

regardless of how long I leave it.

So is this a driver problem or a problem with the way /sbin/ifup works?

Tim.
*/

#5 lore raw
Quoted 38 lines · Tim Waugh
Quoted 10 lines · Manfred Spraul

The log is very odd - why are there two lines with

Quoted 3 lines

forcedeth.c: Reverse Engineered nForce ethernet driver. Version 0.28.

Did you rmmod/insmod the driver twice?

I think it's just the way that ifup works. I'm not entirely sure why the line appears twice.

Quoted 3 lines

Could you manually insmod the driver, wait for two seconds and then call ifup?

Aha. That works fine.

So here is how to make it fail:

/sbin/modprobe forcedeth; \
/sbin/ip link set dev eth0 up

All subsequent runs of 'ethtool eth0' show:

Settings for eth0:
Supports Wake-on: g
Wake-on: d
Link detected: no

Quoted 7 lines

regardless of how long I leave it.

So is this a driver problem or a problem with the way /sbin/ifup works?

Driver problem.
The driver assumes that the nic generates an NVREG_IRQ_LINK interrupt with NvRegMIIStatus & NVREG_MIISTAT_LINKCHANGE on a link change. It seems your nic doesn't generate that.

Could you try modprobe forcedeth;sleep 5;ip link set dev eth0 up. Then pull out the network cable and check if the driver noticed that with ethtool. Plug in back in and check again. With dprintk enabled. Then send me the kernel log and the ethtool output.

And add the lspci -vxx -s 00:05.0. Probably I'll make the timer dependant on nForce 1-3 and exclude the nForce 3 Gb nics: they don't need it.

--
Manfred

author
#6 lore raw
Quoted 1 line · Manfred Spraul

Could you try modprobe forcedeth;sleep 5;ip link set dev eth0 up.

Link was detected.

Quoted 3 lines

Then
pull out the network cable and check if the driver noticed that with ethtool.

It didn't. It still thought there was a link.

Quoted 2 lines

Plug in back in and check again. With dprintk enabled. Then send me the kernel log and the ethtool output.

Done: http://cyberelk.net/tim/tmp/debug.gz

Quoted 3 lines

And add the lspci -vxx -s 00:05.0. Probably I'll make the timer dependant on nForce 1-3 and exclude the nForce 3 Gb nics: they don't need it.

# lspci -vxx -s 00:05.0
00:05.0 Ethernet controller: nVidia Corporation nForce3 Ethernet (rev a5)
        Subsystem: Asustek Computer, Inc.: Unknown device 80c5
        Flags: bus master, 66Mhz, fast devsel, latency 0, IRQ 10
        Memory at ff6fc000 (32-bit, non-prefetchable)
        I/O ports at eff0 [size=8]
        Capabilities: [44] Power Management version 2
00: de 10 d6 00 07 00 b0 00 a5 00 00 02 00 00 00 00
10: 00 c0 6f ff f1 ef 00 00 00 00 00 00 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 43 10 c5 80
30: 00 00 00 00 44 00 00 00 00 00 00 00 0a 01 01 14

Thanks,
Tim.
*/