linux_old1/arch/arm/mach-realview
Russell King 2fb04fdf30 net: smc91x: fix SMC accesses
Commit b70661c708 ("net: smc91x: use run-time configuration on all ARM
machines") broke some ARM platforms through several mistakes.  Firstly,
the access size must correspond to the following rule:

(a) at least one of 16-bit or 8-bit access size must be supported
(b) 32-bit accesses are optional, and may be enabled in addition to
    the above.

Secondly, it provides no emulation of 16-bit accesses, instead blindly
making 16-bit accesses even when the platform specifies that only 8-bit
is supported.

Reorganise smc91x.h so we can make use of the existing 16-bit access
emulation already provided - if 16-bit accesses are supported, use
16-bit accesses directly, otherwise if 8-bit accesses are supported,
use the provided 16-bit access emulation.  If neither, BUG().  This
exactly reflects the driver behaviour prior to the commit being fixed.

Since the conversion incorrectly cut down the available access sizes on
several platforms, we also need to go through every platform and fix up
the overly-restrictive access size: Arnd assumed that if a platform can
perform 32-bit, 16-bit and 8-bit accesses, then only a 32-bit access
size needed to be specified - not so, all available access sizes must
be specified.

This likely fixes some performance regressions in doing this: if a
platform does not support 8-bit accesses, 8-bit accesses have been
emulated by performing a 16-bit read-modify-write access.

Tested on the Intel Assabet/Neponset platform, which supports only 8-bit
accesses, which was broken by the original commit.

Fixes: b70661c708 ("net: smc91x: use run-time configuration on all ARM machines")
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Tested-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-08-28 23:44:55 -04:00
..
Kconfig ARM: realview: use "depends on" instead of "if" after prompt 2016-02-01 12:19:10 -08:00
Makefile ARM: don't include removed directories 2016-08-10 22:42:18 +02:00
board-eb.h ARM: realview: clean up header files 2015-12-18 14:09:45 +01:00
board-pb11mp.h ARM: realview: clean up header files 2015-12-18 14:09:45 +01:00
board-pb1176.h ARM: realview: clean up header files 2015-12-18 14:09:45 +01:00
board-pba8.h ARM: realview: clean up header files 2015-12-18 14:09:45 +01:00
board-pbx.h ARM: realview: clean up header files 2015-12-18 14:09:45 +01:00
core.c net: smc91x: fix SMC accesses 2016-08-28 23:44:55 -04:00
core.h Merge branch 'treewide/cleanup' into next/multiplatform 2015-12-18 17:07:52 +01:00
hardware.h ARM: realview: clean up header files 2015-12-18 14:09:45 +01:00
hotplug.c ARM: Remove __ref on hotplug cpu die path 2015-10-22 09:55:03 -07:00
irqs-eb.h ARM: realview: clean up header files 2015-12-18 14:09:45 +01:00
irqs-pb11mp.h ARM: realview: clean up header files 2015-12-18 14:09:45 +01:00
irqs-pb1176.h ARM: realview: clean up header files 2015-12-18 14:09:45 +01:00
irqs-pba8.h ARM: realview: clean up header files 2015-12-18 14:09:45 +01:00
irqs-pbx.h ARM: realview: clean up header files 2015-12-18 14:09:45 +01:00
platform.h ARM: realview: clean up header files 2015-12-18 14:09:45 +01:00
platsmp-dt.c ARM: realview: use const and __initconst for smp_operations 2016-02-01 12:17:30 -08:00
platsmp.c Merge branch 'treewide/cleanup' into next/multiplatform 2015-12-18 17:07:52 +01:00
realview-dt.c ARM: realview: clean up header files 2015-12-18 14:09:45 +01:00
realview_eb.c ARM: realview: clean up header files 2015-12-18 14:09:45 +01:00
realview_pb11mp.c ARM: realview: clean up header files 2015-12-18 14:09:45 +01:00
realview_pb1176.c ARM: realview: clean up header files 2015-12-18 14:09:45 +01:00
realview_pba8.c ARM: realview: clean up header files 2015-12-18 14:09:45 +01:00
realview_pbx.c ARM: realview: hide unused 'pmu_device' object 2016-04-04 10:58:47 +02:00