net: r6040: Check for skb->xmit_more
authorFlorian Fainelli <f.fainelli@gmail.com>
Mon, 4 Jul 2016 21:36:05 +0000 (14:36 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 5 Jul 2016 07:10:29 +0000 (00:10 -0700)
Kick the transmission only if this is the last SKB to transmit or the
queue is not already stopped.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/rdc/r6040.c

index 4bf78f1..96b2d63 100644 (file)
@@ -840,7 +840,8 @@ static netdev_tx_t r6040_start_xmit(struct sk_buff *skb,
        skb_tx_timestamp(skb);
 
        /* Trigger the MAC to check the TX descriptor */
-       iowrite16(TM2TX, ioaddr + MTPR);
+       if (!skb->xmit_more || netif_queue_stopped(dev))
+               iowrite16(TM2TX, ioaddr + MTPR);
        lp->tx_insert_ptr = descptr->vndescp;
 
        /* If no tx resource, stop */