kernel_samsung_a53x/drivers/net/ethernet/smsc
Thorsten Blum 37909bcd9c net: smc91x: Fix m68k kernel compilation for ColdFire CPU
commit 5eefb477d21a26183bc3499aeefa991198315a2d upstream.

Compiling the m68k kernel with support for the ColdFire CPU family fails
with the following error:

In file included from drivers/net/ethernet/smsc/smc91x.c:80:
drivers/net/ethernet/smsc/smc91x.c: In function ‘smc_reset’:
drivers/net/ethernet/smsc/smc91x.h:160:40: error: implicit declaration of function ‘_swapw’; did you mean ‘swap’? [-Werror=implicit-function-declaration]
  160 | #define SMC_outw(lp, v, a, r)   writew(_swapw(v), (a) + (r))
      |                                        ^~~~~~
drivers/net/ethernet/smsc/smc91x.h:904:25: note: in expansion of macro ‘SMC_outw’
  904 |                         SMC_outw(lp, x, ioaddr, BANK_SELECT);           \
      |                         ^~~~~~~~
drivers/net/ethernet/smsc/smc91x.c:250:9: note: in expansion of macro ‘SMC_SELECT_BANK’
  250 |         SMC_SELECT_BANK(lp, 2);
      |         ^~~~~~~~~~~~~~~
cc1: some warnings being treated as errors

The function _swapw() was removed in commit d97cf70af097 ("m68k: use
asm-generic/io.h for non-MMU io access functions"), but is still used in
drivers/net/ethernet/smsc/smc91x.h.

Use ioread16be() and iowrite16be() to resolve the error.

Cc: stable@vger.kernel.org
Fixes: d97cf70af097 ("m68k: use asm-generic/io.h for non-MMU io access functions")
Signed-off-by: Thorsten Blum <thorsten.blum@toblux.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://lore.kernel.org/r/20240510113054.186648-2-thorsten.blum@toblux.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-19 12:26:51 +01:00
..
epic100.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
smc91c92_cs.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
smc91x.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
smc91x.h net: smc91x: Fix m68k kernel compilation for ColdFire CPU 2024-11-19 12:26:51 +01:00
smc911x.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
smc911x.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
smc9194.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
smc9194.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
smsc911x.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
smsc911x.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
smsc9420.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
smsc9420.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00