OpenCloudOS-Kernel/arch/blackfin/mach-bf561
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
..
boards net: smc91x: fix SMC accesses 2016-08-28 23:44:55 -04:00
include/mach blackfin: anomaly: add anomaly 16000030 for bf5xx 2012-12-13 15:22:03 +08:00
Kconfig Blackfin: add support for gptimer0 as a tick source 2009-06-12 06:11:37 -04:00
Makefile Blackfin: SMP: add PM/CPU hotplug support 2010-03-09 00:30:48 -05:00
atomic.S locking/atomic, arch/blackfin: Implement atomic_fetch_{add,sub,and,or,xor}() 2016-06-16 10:48:23 +02:00
coreb.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/vapier/blackfin 2010-10-22 21:12:27 -07:00
dma.c Blackfin: dma: constify MMR pointer array 2011-01-10 07:18:05 -05:00
hotplug.c Blackfin: SMP: flush CoreB cache when shutting down 2011-03-22 21:03:16 -04:00
ints-priority.c Blackfin: bf561: rewrite SICA_xxx to just SIC_xxx 2010-10-22 16:30:02 -04:00
secondary.S Blackfin: optimize double fault boot checking 2011-07-23 01:10:43 -04:00
smp.c blackfin: fix up obsolete cpu function usage. 2015-03-05 15:25:08 +10:30