[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4e4a5bc4-a027-8585-4e16-39fd2aeb066a@gmail.com>
Date: Tue, 24 Sep 2019 09:49:32 -0700
From: Florian Fainelli <f.fainelli@...il.com>
To: Stephen Hemminger <stephen@...workplumber.org>, davem@...emloft.net
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH net] skge: fix checksum byte order
On 9/20/19 9:18 AM, Stephen Hemminger wrote:
> From: Stephen Hemminger <stephen@...workplumber.org>
>
> Running old skge driver on PowerPC causes checksum errors
> because hardware reported 1's complement checksum is in little-endian
> byte order.
>
> Reported-by: Benoit <benoit.sansoni@...il.com>
> Signed-off-by: Stephen Hemminger <stephen@...workplumber.org>
Fixes: 383181ac7e59 ("[PATCH] skge: check length from PHY")
> ---
> drivers/net/ethernet/marvell/skge.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/marvell/skge.c b/drivers/net/ethernet/marvell/skge.c
> index 0a2ec387a482..095f6c71b4fa 100644
> --- a/drivers/net/ethernet/marvell/skge.c
> +++ b/drivers/net/ethernet/marvell/skge.c
> @@ -3108,7 +3108,7 @@ static struct sk_buff *skge_rx_get(struct net_device *dev,
> skb_put(skb, len);
>
> if (dev->features & NETIF_F_RXCSUM) {
> - skb->csum = csum;
> + skb->csum = le16_to_cpu(csum);
> skb->ip_summed = CHECKSUM_COMPLETE;
> }
>
>
--
Florian
Powered by blists - more mailing lists