android_kernel_oneplus_msm8998/drivers/net/ethernet
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
..
3com
8390
adaptec
adi
aeroflex
agere
allwinner
alteon
altera
amd amd-xgbe: fix a couple timeout loops 2015-12-15 12:43:01 -05:00
apm drivers: net: xgene: fix Tx flow control 2015-12-17 15:45:53 -05:00
apple
arc
atheros net: alx: Work around the DMA RX overflow issue 2016-07-11 09:31:12 -07:00
aurora ethernet: aurora: AURORA_NB8800 should depend on HAS_DMA 2015-12-07 13:54:35 -05:00
broadcom net: bgmac: Fix infinite loop in bgmac_dma_tx_add() 2016-08-16 09:30:47 +02:00
brocade
cadence net: macb: fix default configuration for GMAC on AT91 2016-07-11 09:31:12 -07:00
calxeda
cavium net: thunderx: Fix OOPs with ethtool --register-dump 2016-09-24 10:07:39 +02:00
chelsio cxgb4: correctly handling failed allocation 2016-01-04 17:18:42 -05:00
cirrus
cisco enic: increment devcmd2 result ring in case of timeout 2016-03-03 15:07:05 -08:00
davicom
dec net: tulip: turn compile-time warning into dev_warn() 2015-11-20 11:02:48 -05:00
dlink dl2k: Add support for IP1000A-based cards 2015-11-16 17:11:31 -05:00
emulex Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-12-31 14:40:43 -08:00
ezchip net: ezchip: fix address space confusion in nps_enet.c 2015-12-08 22:58:01 -05:00
faraday
freescale net: fec: only clear a queue's work bit if the queue was emptied 2016-05-18 17:06:40 -07:00
fujitsu
hisilicon net:hns: print MAC with %pM 2015-12-13 23:36:55 -05:00
hp
i825xx
ibm
intel i40e/i40evf: Fix RSS rx-flow-hash configuration through ethtool 2016-09-15 08:27:43 +02:00
marvell net: mvneta: set real interrupt per packet for tx_done 2016-08-10 11:49:29 +02:00
mellanox net/mlx5: Added missing check of msg length in verifying its signature 2016-09-30 10:18:36 +02:00
micrel Merge remote-tracking branches 'spi/topic/omap-100k', 'spi/topic/omap-uwire', 'spi/topic/owner', 'spi/topic/pxa' and 'spi/topic/pxa2xx' into spi-next 2015-11-04 11:02:12 +00:00
microchip spi: Updates for v4.4 2015-11-05 13:15:12 -08:00
moxa
myricom
natsemi natsemi: add checks for dma mapping errors 2015-12-19 12:58:46 -05:00
neterion
nuvoton
nvidia forcedeth: fix unilateral interrupt disabling in netpoll path 2015-10-27 19:45:23 -07:00
nxp net: lpc_eth: remove irq > NR_IRQS check from probe() 2015-12-03 15:02:24 -05:00
octeon
oki-semi
packetengines
pasemi
qlogic qed: Fix setting/clearing bit in completion bitmap 2016-08-16 09:30:48 +02:00
qualcomm net: qca_spi: clear IFF_TX_SKB_SHARING 2016-04-20 15:41:57 +09:00
rdc
realtek r8169: fix kasan reported skb use-after-free. 2015-11-12 13:51:01 -05:00
renesas sh_eth: advance 'rxdesc' later in sh_eth_ring_format() 2016-04-20 15:42:01 +09:00
rocker switchdev: pass pointer to fib_info instead of copy 2016-06-24 10:18:16 -07:00
samsung
seeq
sfc sfc: on MC reset, clear PIO buffer linkage in TXQs 2016-06-24 10:18:17 -07:00
sgi
silan
sis
smsc net: smc91x: fix SMC accesses 2016-09-30 10:18:37 +02:00
stmicro stmmac: dwmac-sunxi: Call exit cleanup function in probe error path 2015-12-14 16:11:59 -05:00
sun
synopsys dwc_eth_qos: Fix dma address for multi-fragment skbs 2016-01-31 11:29:00 -08:00
tehuti
ti drivers: net: cpsw: fix error return code 2015-12-29 15:31:10 -05:00
tile
toshiba
tundra
via via-velocity: unconditionally drop frames with bad l2 length 2015-11-17 14:37:16 -05:00
wiznet
xilinx
xircom
xscale
dnet.c
dnet.h
ec_bhf.c
ethoc.c
fealnx.c
jme.c jme: Fix device PM wakeup API usage 2016-05-04 14:48:54 -07:00
jme.h
Kconfig net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller 2015-11-20 11:47:02 -05:00
korina.c
lantiq_etop.c
Makefile net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller 2015-11-20 11:47:02 -05:00
netx-eth.c