[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b107da56-27c9-f7b0-8458-4ca5cefbfe93@denx.de>
Date: Mon, 10 Feb 2020 20:40:31 +0100
From: Marek Vasut <marex@...x.de>
To: Lukas Wunner <lukas@...ner.de>
Cc: netdev@...r.kernel.org, "David S . Miller" <davem@...emloft.net>,
Petr Stetiar <ynezz@...e.cz>,
YueHaibing <yuehaibing@...wei.com>
Subject: Re: [PATCH 2/3] net: ks8851-ml: Fix 16-bit data access
On 2/10/20 8:35 PM, Lukas Wunner wrote:
> On Mon, Feb 10, 2020 at 07:41:38PM +0100, Marek Vasut wrote:
>> The packet data written to and read from Micrel KSZ8851-16MLLI must be
>> byte-swapped in 16-bit mode, add this byte-swapping.
> [...]
>> - *wptr++ = (u16)ioread16(ks->hw_addr);
>> + *wptr++ = swab16(ioread16(ks->hw_addr));
>
> Um, doesn't this depend on the endianness of the CPU architecture?
> I'd expect be16_to_cpu() or le16_to_cpu() here instead of swab16().
I don't really know in this case, this is a bus IO accessor, so I would
expect the answer is no. But I can only test this on ARMv7a.
Powered by blists - more mailing lists