Petr Cervenka wrote:
> 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 ***/
> }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.] > > 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. Again, patches are welcome. Also compare with mainstream driver, maybe fixes were applied meanwhile that are relevant here as well. > > Note: This error shows itself only when AcceptErr bit is set in RxConfig > register, and some of receiving packets are faulty. I don't think this driver was heavily used yet, that's also why "experimental". ;) Jan
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________ RTnet-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/rtnet-developers

