|
@@ -1316,12 +1316,13 @@ static netdev_tx_t bcmgenet_xmit(struct sk_buff *skb, struct net_device *dev)
|
|
ring->prod_index += nr_frags + 1;
|
|
ring->prod_index += nr_frags + 1;
|
|
ring->prod_index &= DMA_P_INDEX_MASK;
|
|
ring->prod_index &= DMA_P_INDEX_MASK;
|
|
|
|
|
|
- bcmgenet_tdma_ring_writel(priv, ring->index,
|
|
|
|
- ring->prod_index, TDMA_PROD_INDEX);
|
|
|
|
-
|
|
|
|
if (ring->free_bds <= (MAX_SKB_FRAGS + 1))
|
|
if (ring->free_bds <= (MAX_SKB_FRAGS + 1))
|
|
netif_tx_stop_queue(txq);
|
|
netif_tx_stop_queue(txq);
|
|
|
|
|
|
|
|
+ if (!skb->xmit_more || netif_xmit_stopped(txq))
|
|
|
|
+ /* Packets are ready, update producer index */
|
|
|
|
+ bcmgenet_tdma_ring_writel(priv, ring->index,
|
|
|
|
+ ring->prod_index, TDMA_PROD_INDEX);
|
|
out:
|
|
out:
|
|
spin_unlock_irqrestore(&ring->lock, flags);
|
|
spin_unlock_irqrestore(&ring->lock, flags);
|
|
|
|
|