Changeset 47892


Ignore:
Timestamp:
2015-12-14T21:22:09+01:00 (2 years ago)
Author:
nbd
Message:

ar71xx: clean up ethernet tx queue after reset, wake queues when done - fixes hangs reported in #18922

Signed-off-by: Felix Fietkau <nbd@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c

    r46280 r47892  
    3030 
    3131#define ETH_SWITCH_HEADER_LEN   2 
     32 
     33static int ag71xx_tx_packets(struct ag71xx *ag, bool flush); 
    3234 
    3335static inline unsigned int ag71xx_max_frame_len(unsigned int mtu) 
     
    513515        ag71xx_dma_reset(ag); 
    514516        ag71xx_hw_setup(ag); 
     517        ag71xx_tx_packets(ag, true); 
    515518 
    516519        /* setup max frame length */ 
     
    532535        /* enable interrupts */ 
    533536        ag71xx_wr(ag, AG71XX_REG_INT_ENABLE, AG71XX_INT_INIT); 
     537 
     538        netif_wake_queue(ag->dev); 
    534539} 
    535540 
     
    899904} 
    900905 
    901 static int ag71xx_tx_packets(struct ag71xx *ag) 
     906static int ag71xx_tx_packets(struct ag71xx *ag, bool flush) 
    902907{ 
    903908        struct ag71xx_ring *ring = &ag->tx_ring; 
     
    914919                struct sk_buff *skb = ring->buf[i].skb; 
    915920 
    916                 if (!ag71xx_desc_empty(desc)) { 
     921                if (!flush && !ag71xx_desc_empty(desc)) { 
    917922                        if (pdata->is_ar7240 && 
    918923                            ag71xx_check_dma_stuck(ag, ring->buf[i].timestamp)) 
     
    10401045 
    10411046        pdata->ddr_flush(); 
    1042         tx_done = ag71xx_tx_packets(ag); 
     1047        tx_done = ag71xx_tx_packets(ag, false); 
    10431048 
    10441049        DBG("%s: processing RX ring\n", dev->name); 
Note: See TracChangeset for help on using the changeset viewer.