[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <2ef3df08-ffc7-4925-82bf-0813c8b0b439@app.fastmail.com>
Date: Thu, 09 May 2024 22:47:05 +0200
From: "Arnd Bergmann" <arnd@...db.de>
To: "Thorsten Blum" <thorsten.blum@...lux.com>,
"Nicolas Pitre" <nico@...xnic.net>, "David S . Miller" <davem@...emloft.net>,
"Eric Dumazet" <edumazet@...gle.com>, "Jakub Kicinski" <kuba@...nel.org>,
"Paolo Abeni" <pabeni@...hat.com>,
"John Paul Adrian Glaubitz" <glaubitz@...sik.fu-berlin.de>
Cc: Netdev <netdev@...r.kernel.org>, linux-kernel@...r.kernel.org,
"Greg Ungerer" <gerg@...ux-m68k.org>
Subject: Re: [PATCH] net: smc91x: Fix m68k kernel compilation for ColdFire CPU
On Thu, May 9, 2024, at 14:17, Thorsten Blum wrote:
>
> +static inline unsigned short _swapw(volatile unsigned short v)
> +{
> + return ((v << 8) | (v >> 8));
> +}
> +
> #define SMC_inw(a, r) _swapw(readw((a) + (r)))
> #define SMC_outw(lp, v, a, r) writew(_swapw(v), (a) + (r))
> #define SMC_insw(a, r, p, l) mcf_insw(a + r, p, l)
I think you can just use iowrite16_be() and ioread16_be()
here in place of the little-endian access plus swap.
Also, it looks like it's been broken for six years without
anyone noticing the problem, so I wonder if there are even
still any machines that use this driver and get kernel
updates.
Arnd
Powered by blists - more mailing lists