Message ID | 20201112084833.21842-1-vincent.stehle@laposte.net (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | net: ethernet: mtk-star-emac: return ok when xmit drops | expand |
On Thu, Nov 12, 2020 at 12:35 PM Vincent Stehlé <vincent.stehle@laposte.net> wrote: > > The ndo_start_xmit() method must return NETDEV_TX_OK if the DMA mapping > fails, after freeing the socket buffer. > Fix the mtk_star_netdev_start_xmit() function accordingly. > > Fixes: 8c7bd5a454ff ("net: ethernet: mtk-star-emac: new driver") > Signed-off-by: Vincent Stehlé <vincent.stehle@laposte.net> > Cc: David S. Miller <davem@davemloft.net> > Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com> > --- > drivers/net/ethernet/mediatek/mtk_star_emac.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/ethernet/mediatek/mtk_star_emac.c b/drivers/net/ethernet/mediatek/mtk_star_emac.c > index 13250553263b5..e56a26f797f28 100644 > --- a/drivers/net/ethernet/mediatek/mtk_star_emac.c > +++ b/drivers/net/ethernet/mediatek/mtk_star_emac.c > @@ -1053,7 +1053,7 @@ static int mtk_star_netdev_start_xmit(struct sk_buff *skb, > err_drop_packet: > dev_kfree_skb(skb); > ndev->stats.tx_dropped++; > - return NETDEV_TX_BUSY; > + return NETDEV_TX_OK; > } > > /* Returns the number of bytes sent or a negative number on the first > -- > 2.28.0 > Good catch, thanks! Acked-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
diff --git a/drivers/net/ethernet/mediatek/mtk_star_emac.c b/drivers/net/ethernet/mediatek/mtk_star_emac.c index 13250553263b5..e56a26f797f28 100644 --- a/drivers/net/ethernet/mediatek/mtk_star_emac.c +++ b/drivers/net/ethernet/mediatek/mtk_star_emac.c @@ -1053,7 +1053,7 @@ static int mtk_star_netdev_start_xmit(struct sk_buff *skb, err_drop_packet: dev_kfree_skb(skb); ndev->stats.tx_dropped++; - return NETDEV_TX_BUSY; + return NETDEV_TX_OK; } /* Returns the number of bytes sent or a negative number on the first
The ndo_start_xmit() method must return NETDEV_TX_OK if the DMA mapping fails, after freeing the socket buffer. Fix the mtk_star_netdev_start_xmit() function accordingly. Fixes: 8c7bd5a454ff ("net: ethernet: mtk-star-emac: new driver") Signed-off-by: Vincent Stehlé <vincent.stehle@laposte.net> Cc: David S. Miller <davem@davemloft.net> Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com> --- drivers/net/ethernet/mediatek/mtk_star_emac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)