OpenCloudOS-Kernel/arch/arm/mach-pxa
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
..
include/mach ARM: SoC platform updates for v4.6 2016-03-20 14:57:08 -07:00
Kconfig ARM: pxa: activate pinctrl for device-tree machines 2016-04-30 10:27:09 +02:00
Makefile This is the pxa changes for v4.2 cycle. 2015-05-15 17:40:15 +02:00
Makefile.boot ARM: 7022/1: allow to detect conflicting zreladdrs 2011-10-17 09:12:40 +01:00
am200epd.c ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
am300epd.c ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
balloon3.c ARM: SoC multiplatform code changes for v4.5 2016-01-20 18:03:56 -08:00
capc7117.c ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
cm-x2xx-pci.c genirq: Remove irq argument from irq flow handlers 2015-09-16 15:47:51 +02:00
cm-x2xx-pci.h
cm-x2xx.c ARM: pxa: cm-x2xx: avoid duplicate macro warnings 2015-12-15 23:50:00 +01:00
cm-x255.c ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
cm-x270.c rtc: v3020: move rtc-v3020.h to platform_data 2016-07-09 10:24:21 +02:00
cm-x300.c rtc: v3020: move rtc-v3020.h to platform_data 2016-07-09 10:24:21 +02:00
colibri-evalboard.c ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
colibri-pxa3xx.c ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
colibri-pxa270-income.c ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
colibri-pxa270.c ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
colibri-pxa300.c ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
colibri-pxa320.c ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
colibri.h ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
corgi.c Merge tag 'pxa-fixes-v4.8' of https://github.com/rjarzmik/linux into randconfig-4.8 2016-08-11 08:43:03 +02:00
corgi_pm.c ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
csb701.c [ARM] pxa/csb701: do not register devices on non-csb726 boads 2009-04-04 10:26:35 +08:00
csb726.c ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
csb726.h ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
devices.c ARM: pxa: fix the number of DMA requestor lines 2016-03-29 20:59:18 +02:00
devices.h ARM: pxa3xx: provide specific platform_devices for all ssp ports 2014-09-19 01:58:43 +08:00
em-x270.c rtc: v3020: move rtc-v3020.h to platform_data 2016-07-09 10:24:21 +02:00
eseries-irq.h ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
eseries.c ARM: pxa: Remove CLK_IS_ROOT 2016-04-30 10:27:09 +02:00
ezx.c ARM: SoC multiplatform code changes for v4.5 2016-01-20 18:03:56 -08:00
generic.c ARM: pxa: Transition pxa25x, pxa27x, pxa3xx to clk framework 2015-05-12 23:26:46 +02:00
generic.h ARM: pxa: Transition pxa25x, pxa27x, pxa3xx to clk framework 2015-05-12 23:26:46 +02:00
gumstix.c ARM: pxa: define clock registers as __iomem 2016-02-01 21:43:41 +01:00
gumstix.h ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
h5000.c ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
h5000.h ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
himalaya.c ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
hx4700.c ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
icontrol.c ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
idp.c net: smc91x: fix SMC accesses 2016-08-28 23:44:55 -04:00
idp.h ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
irq.c ARM: kill off set_irq_flags usage 2015-07-28 13:58:13 +02:00
littleton.c ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
littleton.h ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
lpd270.c ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
lpd270.h ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
lubbock.c ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
magician.c ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
mainstone.c ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
mfp-pxa2xx.c ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
mfp-pxa2xx.h ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
mfp-pxa3xx.c ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
mfp-pxa3xx.h ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
mfp-pxa25x.h ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
mfp-pxa27x.h ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
mfp-pxa300.h ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
mfp-pxa320.h ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
mfp-pxa930.h ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
mioa701.c ARM: SoC multiplatform code changes for v4.5 2016-01-20 18:03:56 -08:00
mioa701.h ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
mioa701_bootresume.S ARM: convert all "mov.* pc, reg" to "bx reg" for ARMv6+ 2014-07-18 12:29:04 +01:00
mp900.c ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
mxm8x10.c ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
mxm8x10.h ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
palm27x.c ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
palm27x.h ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
palmld.c ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
palmt5.c ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
palmt5.h ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
palmtc.c ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
palmte2.c ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
palmte2.h ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
palmtreo.c ARM: SoC multiplatform code changes for v4.5 2016-01-20 18:03:56 -08:00
palmtreo.h ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
palmtx.c ARM: SoC multiplatform code changes for v4.5 2016-01-20 18:03:56 -08:00
palmz72.c ARM: SoC multiplatform code changes for v4.5 2016-01-20 18:03:56 -08:00
palmz72.h ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
pcm027.c ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
pcm027.h ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
pcm990-baseboard.c ARM: SoC multiplatform code changes for v4.5 2016-01-20 18:03:56 -08:00
pcm990_baseboard.h ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
pm.c ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
pm.h ARM: pxa: move extern declarations to pm.h 2016-02-01 21:44:27 +01:00
poodle.c ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
pxa-dt.c ARM: pxa: pxa3xx device-tree support cleanup 2016-02-20 22:02:55 +01:00
pxa2xx.c ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
pxa3xx-ulpi.c ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
pxa3xx.c ARM: pxa: add the number of DMA requestor lines 2016-02-26 22:57:05 +01:00
pxa3xx.h ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
pxa25x.c ARM: pxa: add the number of DMA requestor lines 2016-02-26 22:57:05 +01:00
pxa25x.h ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
pxa27x-udc.h ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
pxa27x.c ARM: pxa: add the number of DMA requestor lines 2016-02-26 22:57:05 +01:00
pxa27x.h ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
pxa300.c ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
pxa300.h ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
pxa320.c ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
pxa320.h ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
pxa930.c ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
pxa930.h ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
pxa_cplds_irqs.c ARM: pxa: pxa_cplds: signedness bug in probe 2015-05-22 16:41:20 +02:00
raumfeld.c device property: don't bother the drivers with struct property_set 2016-04-09 03:10:50 +02:00
regs-rtc.h ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
regs-u2d.h ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
reset.c ARM: pxa: prevent PXA270 occasional reboot freezes 2013-12-11 16:35:16 -08:00
saar.c ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
sharpsl_pm.c ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
sharpsl_pm.h ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
sleep.S ARM: pxa: correct errata number for PXA270 2014-07-04 20:30:42 +08:00
smemc.c ARM: PXA3xx: program the CSMSADRCFG register 2013-01-23 16:56:32 +08:00
spitz.c Merge tag 'pxa-fixes-v4.8' of https://github.com/rjarzmik/linux into randconfig-4.8 2016-08-11 08:43:03 +02:00
spitz_pm.c ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
standby.S ARM: convert all "mov.* pc, reg" to "bx reg" for ARMv6+ 2014-07-18 12:29:04 +01:00
stargate2.c ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
tavorevb.c ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
tosa-bt.c ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
tosa.c ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
tosa_bt.h ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
trizeps4.c ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
udc.h ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
viper.c ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
viper.h ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
vpac270.c ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
xcep.c net: smc91x: fix SMC accesses 2016-08-28 23:44:55 -04:00
z2.c ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
zeus.c ARM: pxa: define clock registers as __iomem 2016-02-01 21:43:41 +01:00
zeus.h ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
zylonite.c ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
zylonite.h ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
zylonite_pxa300.c ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
zylonite_pxa320.c ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00