linux_dsm_epyc7002/drivers/net/ethernet/renesas
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
..
Kconfig ethernet: renesas: convert to SPDX identifiers 2018-09-10 10:11:53 -07:00
Makefile ethernet: renesas: convert to SPDX identifiers 2018-09-10 10:11:53 -07:00
ravb_main.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2019-05-07 22:03:58 -07:00
ravb_ptp.c drivers: Remove explicit invocations of mmiowb() 2019-04-08 12:01:02 +01:00
ravb.h ravb: Clean up duplex handling 2018-11-23 11:14:47 -08:00
sh_eth.c 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
sh_eth.h sh_eth: RX checksum offload support 2019-02-04 13:31:00 -08:00