Changeset 35952


Ignore:
Timestamp:
2013-03-11T03:29:47+01:00 (5 years ago)
Author:
nbd
Message:

cns3xxx: ethernet - clean the tx ring only in the poll function, not in the xmit handler

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/cns3xxx/files/drivers/net/ethernet/cavium/cns3xxx_eth.c

    r35951 r35952  
    437437} 
    438438 
     439static void eth_schedule_poll(struct sw *sw) 
     440{ 
     441        if (unlikely(!napi_schedule_prep(&sw->napi))) 
     442                return; 
     443 
     444        disable_irq_nosync(IRQ_CNS3XXX_SW_R0RXC); 
     445        __napi_schedule(&sw->napi); 
     446} 
     447 
    439448irqreturn_t eth_rx_irq(int irq, void *pdev) 
    440449{ 
    441450        struct net_device *dev = pdev; 
    442451        struct sw *sw = netdev_priv(dev); 
    443         if (likely(napi_schedule_prep(&sw->napi))) { 
    444                 disable_irq_nosync(IRQ_CNS3XXX_SW_R0RXC); 
    445                 __napi_schedule(&sw->napi); 
    446         } 
     452        eth_schedule_poll(sw); 
    447453        return (IRQ_HANDLED); 
    448454} 
     
    768774                nr_desc++; 
    769775 
     776        eth_schedule_poll(sw); 
    770777        spin_lock_bh(&tx_lock); 
    771  
    772         eth_complete_tx(sw); 
    773778        if ((tx_ring->num_used + nr_desc + 1) >= TX_DESCS) { 
    774779                spin_unlock_bh(&tx_lock); 
Note: See TracChangeset for help on using the changeset viewer.