linux_dsm_epyc7002/drivers/net/ethernet
Doug Berger 3a55402c93 net: bcmgenet: use RGMII loopback for MAC reset
As noted in commit 28c2d1a7a0 ("net: bcmgenet: enable loopback
during UniMAC sw_reset") the UniMAC must be clocked while sw_reset
is asserted for its state machines to reset cleanly.

The transmit and receive clocks used by the UniMAC are derived from
the signals used on its PHY interface. The bcmgenet MAC can be
configured to work with different PHY interfaces including MII,
GMII, RGMII, and Reverse MII on internal and external interfaces.
Unfortunately for the UniMAC, when configured for MII the Tx clock
is always driven from the PHY which places it outside of the direct
control of the MAC.

The earlier commit enabled a local loopback mode within the UniMAC
so that the receive clock would be derived from the transmit clock
which addressed the observed issue with an external GPHY disabling
it's Rx clock. However, when a Tx clock is not available this
loopback is insufficient.

This commit implements a workaround that leverages the fact that
the MAC can reliably generate all of its necessary clocking by
enterring the external GPHY RGMII interface mode with the UniMAC in
local loopback during the sw_reset interval. Unfortunately, this
has the undesirable side efect of the RGMII GTXCLK signal being
driven during the same window.

In most configurations this is a benign side effect as the signal
is either not routed to a pin or is already expected to drive the
pin. The one exception is when an external MII PHY is expected to
drive the same pin with its TX_CLK output creating output driver
contention.

This commit exploits the IEEE 802.3 clause 22 standard defined
isolate mode to force an external MII PHY to present a high
impedance on its TX_CLK output during the window to prevent any
contention at the pin.

The MII interface is used internally with the 40nm internal EPHY
which agressively disables its clocks for power savings leading to
incomplete resets of the UniMAC and many instabilities observed
over the years. The workaround of this commit is expected to put
an end to those problems.

Fixes: 1c1008c793 ("net: bcmgenet: add main driver file")
Signed-off-by: Doug Berger <opendmb@gmail.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-11-06 10:46:21 -08:00
..
3com
8390
adaptec
aeroflex
agere
alacritech
allwinner drivers: net: Fix Kconfig indentation 2019-09-26 08:56:17 +02:00
alteon
altera
amazon net: ena: clean up indentation issue 2019-09-27 20:32:02 +02:00
amd Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2019-09-02 11:20:17 -07:00
apm
apple
aquantia net: aquantia: add an error handling in aq_nic_set_multicast_list 2019-10-19 12:16:38 -07:00
arc net: ethernet: arc: add the missed clk_disable_unprepare 2019-11-01 10:25:39 -07:00
atheros net: ag71xx: fix mdio subnode support 2019-10-01 10:19:19 -07:00
aurora
broadcom net: bcmgenet: use RGMII loopback for MAC reset 2019-11-06 10:46:21 -08:00
brocade
cadence macb: propagate errors when getting optional clocks 2019-10-19 11:58:39 -07:00
calxeda
cavium net: cavium: Use the correct style for SPDX License Identifier 2019-10-15 15:00:56 -07:00
chelsio cxgb4: fix panic when attaching to ULD fail 2019-10-30 18:11:13 -07:00
cirrus cirrus: cs89x0: remove set but not used variable 'lp' 2019-08-25 19:48:59 -07:00
cisco
cortina net: ethernet: Use the correct style for SPDX License Identifier 2019-10-25 19:30:31 -07:00
davicom
dec
dlink
emulex drivers: net: Fix Kconfig indentation 2019-09-26 08:56:17 +02:00
ezchip ezchip: nps_enet: use devm_platform_ioremap_resource() to simplify code 2019-08-21 13:42:13 -07:00
faraday net: ethernet: ftgmac100: Fix DMA coherency issue with SW checksum 2019-10-28 16:22:50 -07:00
freescale net: fec: add missed clk_disable_unprepare in remove 2019-11-04 11:35:21 -08:00
fujitsu
google gve: Fixes DMA synchronization. 2019-11-01 15:00:05 -07:00
hisilicon net: hns3: Use the correct style for SPDX License Identifier 2019-11-05 17:45:38 -08:00
hp
huawei
i825xx net: i82596: fix dma_alloc_attr for sni_82596 2019-10-15 20:50:05 -07:00
ibm net/ibmvnic: Fix EOI when running in XIVE mode. 2019-10-13 11:18:56 -07:00
intel ixgbe: Remove duplicate clear_bit() call 2019-11-01 13:20:50 -07:00
marvell net: mvneta: make stub functions static inline 2019-10-25 16:21:48 -07:00
mediatek net: ethernet: mediatek: Fix MT7629 missing GMII mode support 2019-10-15 18:03:35 -07:00
mellanox mlx4_core: fix wrong comment about the reason of subtract one from the max_cqes 2019-11-05 18:01:01 -08:00
micrel Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next 2019-09-18 12:34:53 -07:00
microchip lan743x: remove redundant assignment to variable rx_process_result 2019-09-06 16:47:07 +02:00
moxa
mscc net: mscc: ocelot: refuse to overwrite the port's native vlan 2019-10-29 16:22:07 -07:00
myricom Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2019-08-19 11:54:03 -07:00
natsemi net: sonic: replace dev_kfree_skb in sonic_send_packet 2019-09-11 09:14:01 +01:00
neterion
netronome net: core: add generic lockdep keys 2019-10-24 14:53:48 -07:00
ni net: nixge: Fix a signedness bug in nixge_probe() 2019-09-27 10:20:36 +02:00
nvidia Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2019-09-15 14:17:27 +02:00
nxp net: lpc_eth: avoid resetting twice 2019-10-13 11:15:25 -07:00
oki-semi
packetengines ethernet: Delete unnecessary checks before the macro call “dev_kfree_skb” 2019-08-22 16:22:04 -07:00
pasemi
pensando dynamic_debug: provide dynamic_hex_dump stub 2019-10-22 12:54:44 -07:00
qlogic qed: Optimize execution time for nvm attributes configuration. 2019-10-30 11:57:14 -07:00
qualcomm net: qualcomm: rmnet: Fix potential UAF when unregistering 2019-11-05 18:18:03 -08:00
rdc
realtek r8169: fix wrong PHY ID issue with RTL8168dp 2019-11-01 15:09:40 -07:00
renesas ravb: TROCR register is only present on R-Car Gen3 2019-09-06 16:46:10 +02:00
rocker rocker: add missing init_net check in FIB notifier 2019-09-05 12:14:10 +02:00
samsung net: sxgbe: use devm_platform_ioremap_resource() to simplify code 2019-08-21 13:42:12 -07:00
seeq net: seeq: Fix the function used to release some memory in an error handling path 2019-09-01 12:10:11 -07:00
sfc
sgi net: sgi: ioc3-eth: no need to stop queue set_multicast_list 2019-08-30 13:54:36 -07:00
silan
sis
smsc ethernet: Delete unnecessary checks before the macro call “dev_kfree_skb” 2019-08-22 16:22:04 -07:00
socionext net: socionext: netsec: always grab descriptor lock 2019-10-01 09:07:47 -07:00
stmicro net: stmmac: Fix the problem of tso_xmit 2019-10-22 13:04:16 -07:00
sun ethernet: Delete unnecessary checks before the macro call “dev_kfree_skb” 2019-08-22 16:22:04 -07:00
synopsys
tehuti
ti davinci_cpdma: make cpdma_chan_split_pool static 2019-10-15 20:56:14 -07:00
toshiba net: spider_net: Use struct_size() helper 2019-08-29 17:53:59 -07:00
tundra
via via-rhine: use devm_platform_ioremap_resource() to simplify code 2019-08-21 13:42:12 -07:00
wiznet
xilinx net: axienet: fix a signedness bug in probe 2019-09-27 10:17:22 +02:00
xircom
xscale
dnet.c
dnet.h
ec_bhf.c
ethoc.c
fealnx.c
jme.c pci-v5.4-changes 2019-09-23 19:16:01 -07:00
jme.h
Kconfig net: remove netx ethernet driver 2019-09-21 19:08:31 -07:00
korina.c
lantiq_etop.c
lantiq_xrx200.c
Makefile net: remove netx ethernet driver 2019-09-21 19:08:31 -07:00