android_kernel_oneplus_msm8998/arch/arm/mach-pxa
Russell King 8c945f5aac net: smc91x: fix SMC accesses
[ Upstream commit 2fb04fdf30192ff1e2b5834e9b7745889ea8bbcb ]

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-30 10:18:37 +02:00
..
include/mach This is the pxa changes for v4.4 cycle. 2015-10-23 10:15:03 -07:00
am200epd.c
am300epd.c
balloon3.c ARM: SoC fixes for v4.3-rc 2015-09-27 06:45:18 -04:00
capc7117.c ARM: pxa: fix dm9000 platform data regression 2015-07-16 22:43:59 +02: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: fix dm9000 platform data regression 2015-07-16 22:43:59 +02:00
cm-x255.c
cm-x270.c
cm-x300.c ARM: pxa: cm-x300: Use PWM lookup table 2015-10-14 23:06:50 +02:00
colibri-evalboard.c
colibri-pxa3xx.c
colibri-pxa270-income.c ARM: pxa: colibri-pxa270-income: Use PWM lookup table 2015-10-05 22:24:03 +02:00
colibri-pxa270.c ARM: pxa: fix dm9000 platform data regression 2015-07-16 22:43:59 +02:00
colibri-pxa300.c
colibri-pxa320.c
corgi.c ARM: pxa: add regulator_has_full_constraints to corgi board file 2014-12-26 18:03:20 +01:00
corgi_pm.c
csb701.c
csb726.c
devices.c ARM: pxa: add resources to pxaficp_ir 2015-09-26 21:12:59 +02:00
devices.h
em-x270.c ARM: pxa: fix dm9000 platform data regression 2015-07-16 22:43:59 +02:00
eseries.c ARM: SoC: platform support for v4.2 2015-06-26 11:34:35 -07:00
ezx.c ARM: pxa: use PWM lookup table for all machines 2015-12-11 00:27:58 +01: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: mach-pxa: Convert pr_warning to pr_warn 2014-11-19 23:53:13 +01:00
h5000.c
himalaya.c
hx4700.c ARM: pxa: hx4700: Remove unused field initializers 2015-10-06 21:05:01 +02:00
icontrol.c ARM: pxa: Remove unused clock_enable field from struct pxa2xx_spi_master 2015-09-20 19:37:20 +02:00
idp.c net: smc91x: fix SMC accesses 2016-09-30 10:18:37 +02:00
irq.c ARM: kill off set_irq_flags usage 2015-07-28 13:58:13 +02:00
Kconfig ARM: pxa: pxa_cplds: add lubbock and mainstone IO 2015-04-30 22:52:12 +02:00
littleton.c
lpd270.c This is the pxa changes for v4.4 cycle. 2015-10-23 10:15:03 -07:00
lubbock.c ARM: SoC: platform support for v4.2 2015-06-26 11:34:35 -07:00
magician.c ARM: pxa: magician: Remove pdata for pasic3-leds 2015-10-14 23:07:02 +02:00
mainstone.c ARM: pxa: mainstone: Use PWM lookup table 2015-10-14 23:06:12 +02:00
Makefile This is the pxa changes for v4.2 cycle. 2015-05-15 17:40:15 +02:00
Makefile.boot
mfp-pxa2xx.c arm: mach-pxa: Convert pr_warning to pr_warn 2014-11-19 23:53:13 +01:00
mfp-pxa3xx.c
mioa701.c ARM: pxa: mioa701: Use PWM lookup table 2015-10-14 23:06:47 +02:00
mioa701_bootresume.S
mp900.c ARM: Show proper respect for Heinrich Hertz by using the correct unit for frequency 2015-05-14 16:22:05 +01:00
mxm8x10.c
palm27x.c ARM: pxa: palm: Fix typos in PWM lookup table code 2015-11-19 16:15:51 +01:00
palmld.c
palmt5.c
palmtc.c ARM: pxa: palm: Fix typos in PWM lookup table code 2015-11-19 16:15:51 +01:00
palmte2.c ARM: pxa: palmte2: Use PWM lookup table 2015-10-14 23:06:48 +02:00
palmtreo.c
palmtx.c
palmz72.c
pcm027.c
pcm990-baseboard.c This is the pxa changes for v4.4 cycle. 2015-10-23 10:15:03 -07:00
pm.c
poodle.c ARM: pxa: add regulator_has_full_constraints to poodle board file 2014-12-26 18:03:20 +01:00
pxa-dt.c ARM: appropriate __init annotation for const data 2015-07-28 13:55:27 +02:00
pxa2xx.c
pxa3xx-ulpi.c Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
pxa3xx.c ARM: pxa: fix pxa3xx DFI lockup hack 2015-10-14 17:13:59 +02:00
pxa25x.c ARM: pxa: transition to dmaengine phase 1 2015-07-18 12:16:33 +02:00
pxa27x.c ARM: pxa: remove incorrect __init annotation on pxa27x_set_pwrmode 2015-10-16 20:52:39 +02:00
pxa300.c ARM: pxa: Transition pxa25x, pxa27x, pxa3xx to clk framework 2015-05-12 23:26:46 +02:00
pxa320.c ARM: pxa: Transition pxa25x, pxa27x, pxa3xx to clk framework 2015-05-12 23:26:46 +02:00
pxa930.c
pxa_cplds_irqs.c ARM: pxa: pxa_cplds: signedness bug in probe 2015-05-22 16:41:20 +02:00
raumfeld.c ARM: pxa: raumfeld: make some variables static 2015-10-16 20:52:33 +02:00
reset.c
saar.c
sharpsl_pm.c ARM: pxa: Use setup_timer 2015-07-18 12:16:43 +02:00
sleep.S
smemc.c
spitz.c ARM: pxa: add regulator_has_full_constraints to spitz board file 2014-12-26 18:04:26 +01:00
spitz_pm.c
standby.S
stargate2.c
tavorevb.c ARM: pxa: tavorevb: Use PWM lookup table 2015-10-14 23:06:51 +02:00
tosa-bt.c ARM: pxa: Use module_platform_driver 2015-07-18 12:16:42 +02:00
tosa.c ARM: SoC: platform support for v4.2 2015-06-26 11:34:35 -07:00
trizeps4.c ARM: pxa: fix dm9000 platform data regression 2015-07-16 22:43:59 +02:00
viper.c This is the pxa changes for v4.4 cycle. 2015-10-23 10:15:03 -07:00
vpac270.c ARM: pxa: fix dm9000 platform data regression 2015-07-16 22:43:59 +02:00
xcep.c net: smc91x: fix SMC accesses 2016-09-30 10:18:37 +02:00
z2.c ARM: pxa: z2: Use PWM lookup table 2015-10-14 23:06:51 +02:00
zeus.c genirq: Remove irq argument from irq flow handlers 2015-09-16 15:47:51 +02:00
zylonite.c ARM: pxa: zylonite: Use PWM lookup table 2015-10-14 23:06:52 +02:00
zylonite_pxa300.c
zylonite_pxa320.c