Changeset 13529


Ignore:
Timestamp:
2008-12-06T11:03:36+01:00 (8 years ago)
Author:
juhosg
Message:

[ar71xx] ag71xx driver: always use NAPI to transmit packets

Location:
trunk/target/linux/ar71xx/files/drivers/net/ag71xx
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx.h

    r13525 r13529  
    3838 
    3939#define AG71XX_DRV_NAME         "ag71xx" 
    40 #define AG71XX_DRV_VERSION      "0.5.9" 
    41  
    42 #define AG71XX_NAPI_TX          1 
     40#define AG71XX_DRV_VERSION      "0.5.10" 
    4341 
    4442#define AG71XX_NAPI_WEIGHT      64 
     
    4846#define AG71XX_INT_RX   (AG71XX_INT_RX_PR | AG71XX_INT_RX_OF) 
    4947 
    50 #ifdef AG71XX_NAPI_TX 
    5148#define AG71XX_INT_POLL (AG71XX_INT_RX | AG71XX_INT_TX) 
    5249#define AG71XX_INT_INIT (AG71XX_INT_ERR | AG71XX_INT_POLL) 
    53 #else 
    54 #define AG71XX_INT_POLL (AG71XX_INT_RX) 
    55 #define AG71XX_INT_INIT (AG71XX_INT_ERR | AG71XX_INT_POLL | AG71XX_INT_TX) 
    56 #endif 
    5750 
    5851#define AG71XX_TX_FIFO_LEN      2048 
  • trunk/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_main.c

    r13525 r13529  
    554554static void ag71xx_tx_packets(struct ag71xx *ag) 
    555555{ 
    556         struct ag71xx_platform_data *pdata = ag71xx_get_pdata(ag); 
    557556        struct ag71xx_ring *ring = &ag->tx_ring; 
    558557        unsigned int sent; 
    559558 
    560559        DBG("%s: processing TX ring\n", ag->dev->name); 
    561  
    562 #ifdef AG71XX_NAPI_TX 
    563         pdata->ddr_flush(); 
    564 #endif 
    565560 
    566561        sent = 0; 
     
    596591        struct net_device *dev = ag->dev; 
    597592        struct ag71xx_ring *ring = &ag->rx_ring; 
    598 #ifndef AG71XX_NAPI_TX 
    599         struct ag71xx_platform_data *pdata = ag71xx_get_pdata(ag); 
    600         unsigned long flags; 
    601 #endif 
    602593        int done = 0; 
    603  
    604 #ifndef AG71XX_NAPI_TX 
    605         spin_lock_irqsave(&ag->lock, flags); 
    606         pdata->ddr_flush(); 
    607         spin_unlock_irqrestore(&ag->lock, flags); 
    608 #endif 
    609594 
    610595        DBG("%s: rx packets, limit=%d, curr=%u, dirty=%u\n", 
     
    662647{ 
    663648        struct ag71xx *ag = container_of(napi, struct ag71xx, napi); 
    664 #ifdef AG71XX_NAPI_TX 
    665649        struct ag71xx_platform_data *pdata = ag71xx_get_pdata(ag); 
    666 #endif 
    667650        struct net_device *dev = ag->dev; 
    668651        unsigned long flags; 
     
    670653        int done; 
    671654 
    672 #ifdef AG71XX_NAPI_TX 
    673655        pdata->ddr_flush(); 
    674656        ag71xx_tx_packets(ag); 
    675 #endif 
    676657 
    677658        DBG("%s: processing RX ring\n", dev->name); 
     
    737718                DBG("%s: TX underrun\n", dev->name); 
    738719        } 
    739 #endif 
    740  
    741 #ifndef AG71XX_NAPI_TX 
    742         if (likely(status & AG71XX_INT_TX_PS)) 
    743                 ag71xx_tx_packets(ag); 
    744720#endif 
    745721 
Note: See TracChangeset for help on using the changeset viewer.