public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Arnd Bergmann" <arnd@arndb.de>
To: "Thorsten Blum" <thorsten.blum@toblux.com>,
	"Nicolas Pitre" <nico@fluxnic.net>,
	"David S . Miller" <davem@davemloft.net>,
	"Eric Dumazet" <edumazet@google.com>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"Paolo Abeni" <pabeni@redhat.com>,
	"John Paul Adrian Glaubitz" <glaubitz@physik.fu-berlin.de>
Cc: Netdev <netdev@vger.kernel.org>,
	linux-kernel@vger.kernel.org,
	"Greg Ungerer" <gerg@linux-m68k.org>
Subject: Re: [PATCH] net: smc91x: Fix m68k kernel compilation for ColdFire CPU
Date: Thu, 09 May 2024 22:47:05 +0200	[thread overview]
Message-ID: <2ef3df08-ffc7-4925-82bf-0813c8b0b439@app.fastmail.com> (raw)
In-Reply-To: <20240509121713.190076-2-thorsten.blum@toblux.com>

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

  parent reply	other threads:[~2024-05-09 20:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-09 12:17 [PATCH] net: smc91x: Fix m68k kernel compilation for ColdFire CPU Thorsten Blum
2024-05-09 20:36 ` Andrew Lunn
2024-05-09 21:26   ` Thorsten Blum
2024-05-09 20:47 ` Arnd Bergmann [this message]
2024-05-09 21:37   ` [PATCH v2] " Thorsten Blum
2024-05-10 11:30     ` [PATCH v3] " Thorsten Blum
2024-05-10 16:21       ` Andrew Lunn
2024-05-13 22:50       ` patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2ef3df08-ffc7-4925-82bf-0813c8b0b439@app.fastmail.com \
    --to=arnd@arndb.de \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gerg@linux-m68k.org \
    --cc=glaubitz@physik.fu-berlin.de \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nico@fluxnic.net \
    --cc=pabeni@redhat.com \
    --cc=thorsten.blum@toblux.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox