r8168, 2.6.17 et r8169.c
Subsystems (2)
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Le samedi 9 septembre 2006 13:24, vous avez écrit :
Quoted 15 lines
Corentin CHARY <[email protected]> :
[...]Quoted 6 lines
J'ai vu après qu'il y'avais des patchs plus à jour ici
http://www.fr.zoreil.com/linux/kernel/2.6.x/2.6.18-rc5/r8169/ , mais pour 2.6.18.Je me demande donc si il y'a un moyen de faire marcher le driver
r8169.cpour ma r8168 sur le kernel 2.6.17. Sinon, j'attendrais le 2.6.18 :).Vous appliquez les patchs pour 2.6.8-rc5 a la derniere version 2.6.18-rc disponible, vous modifiez la ligne qui comprend une directive '
request_irq' pour qu'elle soit identique a celle du pilote du noyau 2.6.17 et le pilote obtenu devrait compiler avec votre noyau 2.6.17.
Quoted 8 lines
Si le lien ne se negocie pas bien, forcez une autonegotiation avec l'utilitaire mii-tool (ne s'applique qu'au pilote apres bricolage).
Dans tous les cas un 'lspci -vvx' de votre machine sera le bienvenu.
En cas de probleme, il serait preferable de poursuivre la discussion en anglais en mettant la liste de diffusion '[email protected]' en copie.
Small summary (for the mailing list) :
--
I have a Asus Laptop A6JC, and a r8168 network card. r1000 driver from realtek works, but I want to use r8169.c.
I first tried with
http://www.fr.zoreil.com/linux/kernel/2.6.x/2.6.17-rc6/r8169/ patchs, but it doesn't Work (eth0 is here, I can use ifconfig and route, but ping or dhcpcd doesn't work)
--
Now I tried with http://www.fr.zoreil.com/linux/kernel/2.6.x/2.6.18-rc5/r8169/
I changed :
line 1751
- request_irq(dev->irq, rtl8169_interrupt, IRQF_SHARED, dev->name, dev);
+ request_irq(dev->irq, rtl8169_interrupt, SA_SHIRQ, dev->name, dev); line 2224
- u32 mss = skb_shinfo(skb)->gso_size;
+ u32 mss = skb_shinfo(skb)->tso_size;
to get it compile on 2.6.17
I can load the module, eth0 is here, I can play with ifconfig. But i can't ping other machines on my network. dhcpd doesn't work too.
dmesg output :
r8169 Gigabit Ethernet driver 2.2LK loaded
ACPI: PCI Interrupt 0000:02:00.0[A] -> GSI 16 (level, low) -> IRQ 16
PCI: Setting latency timer of device 0000:02:00.0 to 64
eth0: RTL8168b/8111b at 0xf0fe6000, 00:17:31:c1:8d:ee, IRQ 16
r8169: eth0: link down
r8169: eth0: link down
r8169: eth0: link up
lspci :
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 01)
Subsystem: ASUSTeK Computer Inc. Unknown device 11f5
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-
Interrupt: pin A routed to IRQ 16
Region 0: I/O ports at c800 [size=256]
Region 2: Memory at fe0ff000 (64-bit, non-prefetchable) [size=4K] Expansion ROM at fe0e0000 [disabled] [size=64K]
Capabilities: [40] Power Management version 2
Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=375mAPME(D0-,D1+,D2+,D3hot+,D3cold+)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [48] Vital Product Data
Capabilities: [50] Message Signalled Interrupts: 64bit+ Queue=0/1
Enable-
Address: 0000000000000000 Data: 0000
Capabilities: [60] Express Endpoint IRQ 0
Device: Supported: MaxPayload 1024 bytes, PhantFunc 0, ExtTag-
Device: Latency L0s unlimited, L1 unlimited
Device: AtnBtn+ AtnInd+ PwrInd+
Device: Errors: Correctable- Non-Fatal- Fatal- Unsupported-
Device: RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop+
Device: MaxPayload 128 bytes, MaxReadReq 512 bytes
Link: Supported Speed 2.5Gb/s, Width x4, ASPM L0s L1, Port 0
Link: Latency L0s unlimited, L1 unlimited
Link: ASPM Disabled RCB 64 bytes CommClk+ ExtSynch-
Link: Speed 2.5Gb/s, Width x4
Capabilities: [84] Vendor Specific Information
00: ec 10 68 81 03 00 10 00 01 00 00 02 08 00 00 00
10: 01 c8 00 00 00 00 00 00 04 f0 0f fe 00 00 00 00
20: 00 00 00 00 00 00 00 00 02 01 00 00 43 10 f5 11
30: 00 00 0e fe 40 00 00 00 00 00 00 00 0b 01 00 00
I tried mii-tool (and mii-diag) but I get that :
SCIOCGMIIPHY on eth0 failed: Operation not supported
Thanks
Signature · 3 lines
CHARY 'Iksaif' Corentin [email protected] - [email protected] http://xf.iksaif.net
Corentin CHARY <[email protected]> :
[no need to quote the original part in french]
Quoted 6 lines
I have a Asus Laptop A6JC, and a r8168 network card. r1000 driver from realtek works, but I want to use
r8169.c.
I first tried with
http://www.fr.zoreil.com/linux/kernel/2.6.x/2.6.17-rc6/r8169/ patchs, but it doesn't Work (eth0 is here, I can use ifconfig and route, but ping or dhcpcd doesn't work)
If you still have it at hand, turn NET_IP_ALIGN into NET_IP_ALIGN + 6 and it should work (at least it has been reported to by Boris Zhmurov).
[...]
Quoted 10 lines
Now I tried with http://www.fr.zoreil.com/linux/kernel/2.6.x/2.6.18-rc5/r8169/
I changed :
line 1751
-request_irq(dev->irq, rtl8169_interrupt, IRQF_SHARED, dev->name, dev);
+request_irq(dev->irq, rtl8169_interrupt, SA_SHIRQ, dev->name, dev); line 2224
- u32 mss = skb_shinfo(skb)->gso_size;
+ u32 mss = skb_shinfo(skb)->tso_size;
to get it compile on 2.6.17
Quoted 4 lines
I can load the module, eth0 is here, I can play with ifconfig. But i can't ping other machines on my network. dhcpd doesn't work too.
dmesg output :
[...]
Full story please, no cut.
[...]
Quoted 2 lines
I tried mii-tool (and mii-diag) but I get that :
SCIOCGMIIPHY on eth0 failed: Operation not supported
Huh ?
Are you really sure that you have applied the 11 patches and built the right file ?
Signature · 1 line
Ueimor
With the 2.6.17 Patchs :
xfport /usr/src/linux # insmod drivers/net/r8169.ko xfport /usr/src/linux # dmesg | tail
r8169 Gigabit Ethernet driver 2.2LK loaded
ACPI: PCI Interrupt 0000:02:00.0[A] -> GSI 16 (level, low) -> IRQ 16
PCI: Setting latency timer of device 0000:02:00.0 to 64
eth0: RTL8168b/8111b at 0xf0fe6000, 00:17:31:c1:8d:ee, IRQ 16
r8169: eth0: link down
r8169: eth0: link down
r8169: eth0: link up
xfport /usr/src/linux # ifconfig eth0 up
xfport /usr/src/linux # ifconfig eth0 192.168.0.20
xfport /usr/src/linux # mii-tool eth0
SIOCGMIIPHY on 'eth0' failed: Operation not supported xfport /usr/src/linux # ping 192.168.0.2
PING 192.168.0.2 (192.168.0.2) 56(84) bytes of data.
--- 192.168.0.2 ping statistics ---
2 packets transmitted, 0 received, 100% packet loss, time 999ms xfport /usr/src/linux # ethtool eth0
Settings for eth0:
Supported ports: [ TP ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full 1000baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full 1000baseT/Full
Advertised auto-negotiation: Yes
Speed: 100Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 0
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: pumbg
Wake-on: g
Current message level: 0x00000033 (51)
Link detected: yes
With NET_IP_ALIGN + 6 : It does *exactly* the same thing, *but* it works perfectly !!!
So I now use that, but I test 2.6.18 patchs.
With the 2.6.18 kernel patchs :
same thing as before but mii-tool works (i think i forget patchs 10 and 11 last time, sry).
BUT: i can't ping .. maybe it's just because I don't use mii-tool in the right way :(
(patch, make, insmod, ifconfig, exactly like before)
xfport /usr/src/linux # mii-tool eth0
eth0: negotiated 100baseTx-FD flow-control, link ok
xfport /usr/src/linux # mii-diag
Using the default interface 'eth0'.
Basic registers of MII PHY #32: 1000 796d 001c c912 0de1 45e1 0005 2001.
The autonegotiated capability is 01e0.
The autonegotiated media type is 100baseTx-FD.
Basic mode control register 0x1000: Auto-negotiation enabled. You have link beat, and everything is working OK.
Your link partner advertised 45e1: Flow-control 100baseTx-FD 100baseTx
10baseT-FD 10baseT, w/ 802.3X flow control.
End of basic transceiver information.
xfport /usr/src/linux # ping 192.168.0.2
PING 192.168.0.2 (192.168.0.2) 56(84) bytes of data.
--- 192.168.0.2 ping statistics ---
1 packets transmitted, 0 received, 100% packet loss, time 0ms
Signature · 3 lines
CHARY 'Iksaif' Corentin [email protected] - [email protected] http://xf.iksaif.net
Corentin CHARY <[email protected]> :
Quoted 2 lines
With the 2.6.17 Patchs :
[...]
Quoted 2 lines
xfport
/usr/src/linux# mii-tool eth0 SIOCGMIIPHY on 'eth0' failed: Operation not supported
Expected result.
[...]
Quoted 2 lines
With
NET_IP_ALIGN+ 6 : It does *exactly* the same thing, *but* it works perfectly !!!
Expected result.
[...]
Quoted 7 lines
So I now use that, but I test 2.6.18 patchs.
With the 2.6.18 kernel patchs :
same thing as before but mii-tool works (i think i forget patchs 10 and 11 last time, sry).
BUT: i can't ping .. maybe it's just because I don't use mii-tool in the right way :(
Something went wrong.
Can you try against 2.6.18-rc6:
http://www.fr.zoreil.com/people/francois/misc/20060911-2.6.18-rc6-r8169-test.patch
If the driver does not work, which in itself would be fairly disappointing, revert (patch -R) 0009 found in the 2.6.18-rc5 directory and try again.
If the driver still does not work, revert 0007 found in the 2.6.18-rc5 directory and try again.
If the driver still does not work, send the .c file, send your working 2.6.17-rc6 driver and send the _complete_ dmesg from boot for both kernels because something is badly screwed.
Signature · 1 line
Ueimor
Quoted 8 lines
Can you try against 2.6.18-rc6:
http://www.fr.zoreil.com/people/francois/misc/20060911-2.6.18-rc6-r8169-tes
t.patchIf the driver does not work, which in itself would be fairly disappointing, revert (patch -R) 0009 found in the 2.6.18-rc5 directory and try again.
Quoted 6 lines
If the driver still does not work, revert 0007 found in the 2.6.18-rc5 directory and try again.
If the driver still does not work, send the .c file, send your working 2.6.17-rc6 driver and send the _complete_ dmesg from boot for both kernels because something is badly screwed.
As I Tell you in the first mail, I tested only on 2.6.17 kernels, so I had to modify 2 lines to compile with 2.6.18 patchs.
Today, I tested on a 2.6.18-r6 Kernel, and it work perfectly (without mii-tool !).
On 2.6.17, even with patch -R, nothing to do ..
If you wan't dmesg of 2.6.17, I can send you, but the driver is for 2.6.18, so I don't think it's usefull to get It work on 2.6.17.
Thanks for your help ;)
Signature · 3 lines
CHARY 'Iksaif' Corentin [email protected] - [email protected] http://xf.iksaif.net
Corentin CHARY <[email protected]> :
[...]
Quoted 2 lines
Today, I tested on a 2.6.18-r6 Kernel, and it work perfectly (without mii-tool !).
Let's say I am a bit dense: you tested 20060911-2.6.18-rc6-r8169-test.patch on 2.6.18-rc6 and it worked fine, right ?
(from your previous description, I thought there was a regression in the serie)
Signature · 1 line
Ueimor
Le mardi 12 septembre 2006 18:53, Francois Romieu a écrit :
Quoted 11 lines
Corentin CHARY <[email protected]> :
[...]Quoted 2 lines
Today, I tested on a 2.6.18-r6 Kernel, and it work perfectly (without mii-tool !).
Let's say I am a bit dense: you tested 20060911-2.6.18-rc6-r8169-test.patch on 2.6.18-rc6 and it worked fine, right ?
(from your previous description, I thought there was a regression in the serie)
Yep, it worked fine on 2.6.18-rc6, but not on 2.6.17 :)
Signature · 3 lines
CHARY 'Iksaif' Corentin [email protected] - [email protected] http://xf.iksaif.net