Changeset 13365


Ignore:
Timestamp:
12/04/09 02:18:24 (3 years ago)
Author:
BrainSlayer
Message:

fix poll crash problem

Location:
src/linux/pb42/linux-2.6.23/drivers/net
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/linux/pb42/linux-2.6.23/drivers/net/ag7100/ag7100.c

    r13356 r13365  
    12261226        status = 0; 
    12271227#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24) 
    1228         netif_rx_complete(dev, napi); 
     1228        if (work_done < budget) 
     1229                netif_rx_complete(dev, napi); 
    12291230#else 
    12301231        netif_rx_complete(dev); 
     
    12371238    { 
    12381239#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24) 
    1239         netif_rx_complete(dev, napi); 
     1240        spin_lock_irqsave(&mac->mac_lock, flags); 
     1241        if (work_done < budget) 
     1242                __netif_rx_complete(dev, napi); 
    12401243#else 
    12411244        netif_rx_complete(dev); 
    1242 #endif 
    12431245        spin_lock_irqsave(&mac->mac_lock, flags); 
     1246#endif 
    12441247        ag7100_intr_enable_recv(mac); 
    12451248        spin_unlock_irqrestore(&mac->mac_lock, flags); 
     
    12601263        mod_timer(&mac->mac_oom_timer, jiffies+1); 
    12611264#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24) 
    1262         netif_rx_complete(dev, napi); 
     1265        if (work_done < budget) 
     1266                netif_rx_complete(dev, napi); 
    12631267#else 
    12641268        netif_rx_complete(dev); 
  • src/linux/pb42/linux-2.6.23/drivers/net/ag7240/ag7240.c

    r13356 r13365  
    13551355    { 
    13561356#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24) 
    1357         netif_rx_complete(dev, napi); 
     1357        spin_lock_irqsave(&mac->mac_lock, flags); 
     1358        if (work_done < budget) 
     1359                __netif_rx_complete(dev, napi); 
    13581360#else 
    13591361        netif_rx_complete(dev); 
    1360 #endif 
    13611362        spin_lock_irqsave(&mac->mac_lock, flags); 
     1363#endif 
    13621364        ag7240_intr_enable_recv(mac); 
    13631365        spin_unlock_irqrestore(&mac->mac_lock, flags); 
     
    13781380        mod_timer(&mac->mac_oom_timer, jiffies+1); 
    13791381#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24) 
    1380         netif_rx_complete(dev, napi); 
     1382        if (work_done < budget) 
     1383                netif_rx_complete(dev, napi); 
    13811384#else 
    13821385        netif_rx_complete(dev); 
Note: See TracChangeset for help on using the changeset viewer.