Skip to content

Commit ddd0ca5

Browse files
ffainellidavem330
authored andcommitted
net: bcmgenet: add support for xmit_more
Delay the update of the TDMA producer index unless this is the last SKB in a batch, or the queue is already stopped. Move the check for whether the queue should be stopped before the xmit_more check to avoid locking the transmit queue in case there was a SKB submitted which has xmit_more set. Signed-off-by: Florian Fainelli <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent ae67bf0 commit ddd0ca5

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

drivers/net/ethernet/broadcom/genet/bcmgenet.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1316,12 +1316,13 @@ static netdev_tx_t bcmgenet_xmit(struct sk_buff *skb, struct net_device *dev)
13161316
ring->prod_index += nr_frags + 1;
13171317
ring->prod_index &= DMA_P_INDEX_MASK;
13181318

1319-
bcmgenet_tdma_ring_writel(priv, ring->index,
1320-
ring->prod_index, TDMA_PROD_INDEX);
1321-
13221319
if (ring->free_bds <= (MAX_SKB_FRAGS + 1))
13231320
netif_tx_stop_queue(txq);
13241321

1322+
if (!skb->xmit_more || netif_xmit_stopped(txq))
1323+
/* Packets are ready, update producer index */
1324+
bcmgenet_tdma_ring_writel(priv, ring->index,
1325+
ring->prod_index, TDMA_PROD_INDEX);
13251326
out:
13261327
spin_unlock_irqrestore(&ring->lock, flags);
13271328

0 commit comments

Comments
 (0)