forcedeth: fixed missing call in napi poll
Subsystems (2)
PATCH 1/3 forcedeth: fixed missing call in napi poll
The napi poll routine was missing the call to the optimized rx process routine. This patch adds the missing call for the optimized path.
drivers/net/forcedeth.c +7 -3
@@ -3104,13 +3104,17 @@struct fe_priv *np =netdev_priv (dev);u8 __iomem *base =get_hwbase (dev);unsigned long flags; +u32 retcode; -if (np->desc_ver ==DESC_VER_1 || np->desc_ver ==DESC_VER_2 ) +if (np->desc_ver ==DESC_VER_1 || np->desc_ver ==DESC_VER_2 ) { pkts =nv_rx_process (dev, limit); -else + retcode =nv_alloc_rx (dev); + }else { pkts =nv_rx_process_optimized (dev, limit); + retcode =nv_alloc_rx_optimized (dev); + } -if (nv_alloc_rx (dev)) { +if (retcode) {spin_lock_irqsave (&np->lock, flags);if (!np->in_shutdown)mod_timer (&np->oom_kick, jiffies +OOM_REFILL );
Quoted 17 lines · Ayaz Abdulla
The napi poll routine was missing the call to the optimized rx process routine. This patch adds the missing call for the optimized path.
Signed-off-by Ayaz Abdulla <[email protected]>------------------------------------------------------------------------
drivers/net/forcedeth.c +2
-1@@ -3104,13 +3104,17 @@struct fe_priv *np =netdev_priv (dev);u8 __iomem *base =get_hwbase (dev);unsigned long flags; +u32 retcode; -if (np->desc_ver ==DESC_VER_1 || np->desc_ver ==DESC_VER_2 ) +if (np->desc_ver ==DESC_VER_1 || np->desc_ver ==DESC_VER_2 ) {
drivers/net/forcedeth.c line 3117
Quoted 10 lines
drivers/net/forcedeth.c +5
-2pkts =nv_rx_process (dev, limit); - else + retcode =nv_alloc_rx (dev); + }else { pkts =nv_rx_process_optimized (dev, limit); + retcode =nv_alloc_rx_optimized (dev); + } -if (nv_alloc_rx (dev)) { +if (retcode) {
You should update this patch to change the return values of the above two functions from 'int' to 'u32', to match the code usage. Both nv_rx_process() and nv_alloc_rx_optimized() return int, but you use them as if they return u32.
Or alternately, use the Linux kernel standard of negative values indicating failure, zero (or perhaps >=0) indicates success.
Otherwise, ACK.
Jeff