[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAMpxmJWVSfZwukjWGMwBvPxcrWUeeMyyh+SpLAg6bNJdEiga7g@mail.gmail.com>
Date: Thu, 12 Nov 2020 12:40:32 +0100
From: Bartosz Golaszewski <bgolaszewski@...libre.com>
To: Vincent Stehlé <vincent.stehle@...oste.net>
Cc: netdev <netdev@...r.kernel.org>,
arm-soc <linux-arm-kernel@...ts.infradead.org>,
"moderated list:ARM/Mediatek SoC..."
<linux-mediatek@...ts.infradead.org>,
LKML <linux-kernel@...r.kernel.org>,
"David S . Miller" <davem@...emloft.net>
Subject: Re: [PATCH] net: ethernet: mtk-star-emac: return ok when xmit drops
On Thu, Nov 12, 2020 at 12:35 PM Vincent Stehlé
<vincent.stehle@...oste.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@...oste.net>
> Cc: David S. Miller <davem@...emloft.net>
> Cc: Bartosz Golaszewski <bgolaszewski@...libre.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@...libre.com>
Powered by blists - more mailing lists