[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200210193540.2nfui5gbistqszcm@wunner.de>
Date: Mon, 10 Feb 2020 20:35:40 +0100
From: Lukas Wunner <lukas@...ner.de>
To: Marek Vasut <marex@...x.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 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().
Thanks,
Lukas
Powered by blists - more mailing lists