[RTnet-developers] Gigabit driver RTL8169
Brought to you by:
bet-frogger,
kiszka
|
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
|