Thread: [RTnet-developers] Gigabit driver RTL8169
Brought to you by:
bet-frogger,
kiszka
|
From: Klaus K. <kla...@in...> - 2005-08-22 13:48:12
Attachments:
rtnet-0.8.3-gigabit-v1.diff.gz
|
Hello,
attached you find the first Gigabit Ethernet driver for RTnet.
It is a patch against RTnet-0.8.3 and supports NICs based on the
Realtek RTL-8169 chipset. This driver was developed and tested
using two D-Link DGE-528T cards and a D-Link 5port Gigabit Switch
(have a look at the DGE-910 package from D-Link).
The driver is based on the latest sources from Realtek with some
important backports from the r8169 driver in the 2.6.12 kernel.
Jumbo frames are not yet supported, as the MTU size within the
RTnet core would have to be adjusted for this, but I'm on it. :-)
In the next weeks I'll hopefully present the next GigE driver
(then for Intel chipsets).
If one of you has the possibility to also test this driver or have
a look at it I'd be thankful for your feedback.
Best regards,
Klaus
--
Institut für Informatik
Friedrich-Alexander-Universität Erlangen-Nürnberg
http://www.cs.fau.de
|
|
From: Petr C. <gr...@ce...> - 2006-10-03 12:30:47
|
Hello,
I found a possible error in Realtek 8169 rtnet driver in function rtl8169_rx_interrupt. There are missing braces ('{','}') before and after the lock, i.e. the crc error counter is increased with every error.
if( le32_to_cpu(rxdesc->status) & RxRES ){
rtdm_printk(KERN_INFO "%s: Rx ERROR!!!\n", rtdev->name);
priv->stats.rx_errors++;
if ( le32_to_cpu(rxdesc->status) & (RxRWT|RxRUNT) )
priv->stats.rx_length_errors++;
if ( le32_to_cpu(rxdesc->status) & RxCRC)
-> /* in the rt_via-rhine.c there's a lock around the incrementation... we'll do that also here <kk> */
rtdm_lock_get(&priv->lock); /*** RTnet ***/
priv->stats.rx_crc_errors++;
-> rtdm_lock_put(&priv->lock); /*** RTnet ***/
}
In my oppinion, there is perhaps another more serious problem. the rx descriptor status isn't cleared (and what ever else needs to be done is missing). My computer got stuck after a while. I will try to investigate it more.
Note: This error shows itself only when AcceptErr bit is set in RxConfig register, and some of receiving packets are faulty.
Petr Cervenka
|
|
From: Jan K. <jan...@we...> - 2006-10-03 15:40:31
Attachments:
signature.asc
|
Petr Cervenka wrote:
> Hello,
> I found a possible error in Realtek 8169 rtnet driver in function rtl81=
69_rx_interrupt. There are missing braces ('{','}') before and after the =
lock, i.e. the crc error counter is increased with every error.
>=20
> if( le32_to_cpu(rxdesc->status) & RxRES ){
> rtdm_printk(KERN_INFO "%s: Rx ERROR!!!\n", rtdev->name);
> priv->stats.rx_errors++;
> if ( le32_to_cpu(rxdesc->status) & (RxRWT|RxRUNT) )
> priv->stats.rx_length_errors++;
> if ( le32_to_cpu(rxdesc->status) & RxCRC)
> -> /* in the rt_via-rhine.c there's a lock around the incrementation=
=2E.. we'll do that also here <kk> */
> rtdm_lock_get(&priv->lock); /*** RTnet ***/
> priv->stats.rx_crc_errors++;
> -> rtdm_lock_put(&priv->lock); /*** RTnet ***/
> }
Yes, that's obviously wrong. And it is not needed as we do not evaluate
the stats nor would it be critical to mess them up a bit. If you post a
patch, I will commit (I depend on anyone telling me "the driver works"
anyway).
[And via-rhine needs a cleanup as well, but this is uncritical.]
>=20
> In my oppinion, there is perhaps another more serious problem. the rx d=
escriptor status isn't cleared (and what ever else needs to be done is mi=
ssing). My computer got stuck after a while. I will try to investigate it=
more.
Again, patches are welcome. Also compare with mainstream driver, maybe
fixes were applied meanwhile that are relevant here as well.
>=20
> Note: This error shows itself only when AcceptErr bit is set in RxConfi=
g register, and some of receiving packets are faulty.
I don't think this driver was heavily used yet, that's also why
"experimental". ;)
Jan
|
|
From: Jan K. <ki...@rt...> - 2005-08-22 16:41:55
Attachments:
signature.asc
|
Klaus Keppler wrote: > Hello, > > attached you find the first Gigabit Ethernet driver for RTnet. Really fine work. Thanks for the contribution! > It is a patch against RTnet-0.8.3 and supports NICs based on the > Realtek RTL-8169 chipset. This driver was developed and tested > using two D-Link DGE-528T cards and a D-Link 5port Gigabit Switch > (have a look at the DGE-910 package from D-Link). > The driver is based on the latest sources from Realtek with some > important backports from the r8169 driver in the 2.6.12 kernel. > > Jumbo frames are not yet supported, as the MTU size within the > RTnet core would have to be adjusted for this, but I'm on it. :-) > > In the next weeks I'll hopefully present the next GigE driver > (then for Intel chipsets). > > If one of you has the possibility to also test this driver or have > a look at it I'd be thankful for your feedback. > I was trying to merge your patch into SVN, but I ran into some troubles because the patch contains a rt_r8169_n.c file (instead of plain rt_r8169.c). Just rename it? Jan |
|
From: Klaus K. <kla...@in...> - 2005-08-23 10:18:29
|
Hi Jan,
> I was trying to merge your patch into SVN, but I ran into some troubles
> because the patch contains a rt_r8169_n.c file (instead of plain
> rt_r8169.c). Just rename it?
No problem, that's just a historic issue (Realtek's original driver
is named 'rt_r8169_n.c'). Don't know what the '_n' stands for... :-/
I'll try to continue working with a SVN snapshot the next days...
Klaus
--
Institut für Informatik
Friedrich-Alexander-Universität Erlangen-Nürnberg
http://www.cs.fau.de
|
|
From: Jan K. <ki...@rt...> - 2005-08-23 14:10:24
Attachments:
signature.asc
|
Klaus Keppler wrote: > Hi Jan, > >> I was trying to merge your patch into SVN, but I ran into some troubles >> because the patch contains a rt_r8169_n.c file (instead of plain >> rt_r8169.c). Just rename it? > > > No problem, that's just a historic issue (Realtek's original driver > is named 'rt_r8169_n.c'). Don't know what the '_n' stands for... :-/ > I'm making progress with the merge but I stumbled over a few issues when compiling against a 2.6.12. Some were related to changes in SVN, and most were easy to fix. But this one remained: rt_r8169.c:689: SET_NETDEV_DEV(rtdev, &pdev->dev); This cannot work as the macro addresses a field of net_device rtnet_device does not provide. Are you compiling against 2.4??? Anyway, is disabling of that line ok? > I'll try to continue working with a SVN snapshot the next days... > Ok, but you should note that SVN so far only works with fusion-CVS respectively the soon-to-be-released version 0.9. RTAI/classic support is still searching for a contributor. Jan |
|
From: Jan K. <ki...@rt...> - 2005-08-23 14:18:30
Attachments:
signature.asc
|
Klaus Keppler wrote: > Hello, > > attached you find the first Gigabit Ethernet driver for RTnet. Merged into SVN. Please check if it still works. Jan |