From: Petr Cervenka <[email protected]> This patch adds missing brackets, which were forgotten during porting of rt8169 driver to rtnet. It could possibly lead to deadlock when corrupted packets were received. Patch also disables unnecessary debug messages.
Signed-off-by: Petr Cervenka <[email protected]> --- Changes: * commented out RTL8169_DEBUG * added missing brackets --- diff --git a/drivers/experimental/rt_r8169.c b/drivers/experimental/rt_r8169.c index 484a658..b716c53 100644 --- a/drivers/experimental/rt_r8169.c +++ b/drivers/experimental/rt_r8169.c @@ -85,7 +85,7 @@ RTL8169_VERSION "2.2" <2004/08/09> #define RTL8169_DRIVER_NAME MODULENAME " RTnet Gigabit Ethernet driver " RTL8169_VERSION #define PFX MODULENAME ": " -#define RTL8169_DEBUG +//#define RTL8169_DEBUG #undef RTL8169_JUMBO_FRAME_SUPPORT /*** RTnet: no not enable! ***/ #undef RTL8169_HW_FLOW_CONTROL_SUPPORT @@ -1711,11 +1711,12 @@ static void rtl8169_rx_interrupt (struct rtnet_device *rtdev, struct rtl8169_pri priv->stats.rx_errors++; if ( le32_to_cpu(rxdesc->status) & (RxRWT|RxRUNT) ) priv->stats.rx_length_errors++; - if ( le32_to_cpu(rxdesc->status) & RxCRC) + 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 ***/ + } } else{ pkt_size=(int)(le32_to_cpu(rxdesc->status) & 0x00001FFF)-4; ------------------------------------------------------------------------------ Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d _______________________________________________ RTnet-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/rtnet-developers

