linux/drivers/net/ethernet
Yoshihiro Shimoda 315ca92dd8 net: sh_eth: fix mdio access in sh_eth_close() for R-Car Gen2 and RZ/A1 SoCs
The sh_eth_close() resets the MAC and then calls phy_stop()
so that mdio read access result is incorrect without any error
according to kernel trace like below:

ifconfig-216   [003] .n..   109.133124: mdio_access: ee700000.ethernet-ffffffff read  phy:0x01 reg:0x00 val:0xffff

According to the hardware manual, the RMII mode should be set to 1
before operation the Ethernet MAC. However, the previous code was not
set to 1 after the driver issued the soft_reset in sh_eth_dev_exit()
so that the mdio read access result seemed incorrect. To fix the issue,
this patch adds a condition and set the RMII mode register in
sh_eth_dev_exit() for R-Car Gen2 and RZ/A1 SoCs.

Note that when I have tried to move the sh_eth_dev_exit() calling
after phy_stop() on sh_eth_close(), but it gets worse (kernel panic
happened and it seems that a register is accessed while the clock is
off).

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-05-29 13:24:54 -07:00
..
3com treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
8390 treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
adaptec treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
aeroflex treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
agere treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
alacritech treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
allwinner treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
alteon treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
altera treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
amazon treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
amd treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 13 2019-05-21 11:28:45 +02:00
apm treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 13 2019-05-21 11:28:45 +02:00
apple treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
aquantia net: aquantia: tcp checksum 0xffff being handled incorrectly 2019-05-27 10:24:14 -07:00
arc treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
atheros treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
aurora treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
broadcom bnxt_en: Device serial number is supported only for PFs. 2019-05-22 18:02:14 -07:00
brocade treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
cadence net: macb: save/restore the remaining registers and features 2019-05-22 17:21:21 -07:00
calxeda treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
cavium treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
chelsio cxgb4: Revert "cxgb4: Remove SGE_HOST_PAGE_SIZE dependency on page size" 2019-05-24 13:17:32 -07:00
cirrus treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
cisco treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
cortina net: gemini: remove unnecessary assert 2019-04-18 17:06:15 -07:00
davicom treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
dec net: tulip: de4x5: Drop redundant MODULE_DEVICE_TABLE() 2019-05-26 21:50:11 -07:00
dlink treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
emulex treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
ezchip treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
faraday treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
freescale dpaa_eth: use only online CPU portals 2019-05-28 11:19:55 -07:00
fujitsu treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
hisilicon treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 13 2019-05-21 11:28:45 +02:00
hp treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
huawei treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
i825xx treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
ibm treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 13 2019-05-21 11:28:45 +02:00
intel treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
marvell net: mvneta: Fix err code path of probe 2019-05-28 11:05:00 -07:00
mediatek treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
mellanox Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-05-22 08:28:16 -07:00
micrel treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
microchip treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
moxa treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
mscc ocelot: Dont allocate another multicast list, use __dev_mc_sync 2019-05-22 12:08:43 -07:00
myricom treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
natsemi treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 13 2019-05-21 11:28:45 +02:00
neterion treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
netronome SPDX update for 5.2-rc2, round 1 2019-05-21 12:33:38 -07:00
ni treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
nuvoton treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
nvidia treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 13 2019-05-21 11:28:45 +02:00
nxp treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
oki-semi treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
packetengines treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
pasemi treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
qlogic treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 15 2019-05-21 11:28:46 +02:00
qualcomm treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
rdc treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 1 2019-05-21 11:28:39 +02:00
realtek treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
renesas net: sh_eth: fix mdio access in sh_eth_close() for R-Car Gen2 and RZ/A1 SoCs 2019-05-29 13:24:54 -07:00
rocker treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
samsung treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
seeq treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
sfc treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
sgi treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
silan treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
sis treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
smsc treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 13 2019-05-21 11:28:45 +02:00
socionext treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
stmicro net: stmmac: Do not output error on deferred probe 2019-05-28 11:00:09 -07:00
sun net: remove 'fallback' argument from dev->ndo_select_queue() 2019-03-20 11:18:55 -07:00
synopsys treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
tehuti treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
ti treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
toshiba treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
tundra treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 13 2019-05-21 11:28:45 +02:00
via treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 23 2019-05-21 11:52:38 +02:00
wiznet treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
xilinx Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-05-22 08:28:16 -07:00
xircom treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
xscale treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
dnet.c
dnet.h
ec_bhf.c
ethoc.c net: ethernet: support of_get_mac_address new ERR_PTR error 2019-05-07 12:22:47 -07:00
fealnx.c net: fealnx: replace dev_kfree_skb_irq by dev_consume_skb_irq for drop profiles 2019-02-13 20:50:42 -08:00
jme.c net: jme: fix indentation issues 2019-01-18 14:02:55 -08:00
jme.h
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
korina.c
lantiq_etop.c lantiq_etop: pass struct device to DMA API functions 2019-02-12 12:09:23 -05:00
lantiq_xrx200.c net: ethernet: support of_get_mac_address new ERR_PTR error 2019-05-07 12:22:47 -07:00
Makefile
netx-eth.c