Re: [RTnet-developers] Gigabit driver RTL8169
Brought to you by:
bet-frogger,
kiszka
|
From: Jan K. <jan...@we...> - 2006-10-03 15:40:31
|
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
|