]> git.baikalelectronics.ru Git - kernel.git/commitdiff
bcm63xx_enet: add xmit_more support
authorSieng Piaw Liew <liew.s.piaw@gmail.com>
Wed, 6 Jan 2021 14:42:04 +0000 (22:42 +0800)
committerJakub Kicinski <kuba@kernel.org>
Thu, 7 Jan 2021 20:39:53 +0000 (12:39 -0800)
Support bulking hardware TX queue by using netdev_xmit_more().

Signed-off-by: Sieng Piaw Liew <liew.s.piaw@gmail.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/broadcom/bcm63xx_enet.c

index 90f8214b4d2288bdcdac6b4222866a9dbbe0933d..21744dae30cef4168345b5708ef55cf628144d1b 100644 (file)
@@ -634,7 +634,8 @@ bcm_enet_start_xmit(struct sk_buff *skb, struct net_device *dev)
        netdev_sent_queue(dev, skb->len);
 
        /* kick tx dma */
-       enet_dmac_writel(priv, priv->dma_chan_en_mask,
+       if (!netdev_xmit_more() || !priv->tx_desc_count)
+               enet_dmac_writel(priv, priv->dma_chan_en_mask,
                                 ENETDMAC_CHANCFG, priv->tx_chan);
 
        /* stop queue if no more desc available */