]> git.baikalelectronics.ru Git - kernel.git/commit
net: macb: Properly handle phylink on at91sam9x
authorStefan Roese <sr@denx.de>
Tue, 4 Aug 2020 12:17:16 +0000 (14:17 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 4 Aug 2020 23:04:17 +0000 (16:04 -0700)
commit8a72ae0dd2118968fbc5bb5e917f62f0e1bc42f5
tree658135a84fee1c88c26e23904e87d3eb8684a603
parentd844a20f1bcc570a1c808b650a26d16983e1dc1b
net: macb: Properly handle phylink on at91sam9x

I just recently noticed that ethernet does not work anymore since v5.5
on the GARDENA smart Gateway, which is based on the AT91SAM9G25.
Debugging showed that the "GEM bits" in the NCFGR register are now
unconditionally accessed, which is incorrect for the !macb_is_gem()
case.

This patch adds the macb_is_gem() checks back to the code
(in macb_mac_config() & macb_mac_link_up()), so that the GEM register
bits are not accessed in this case any more.

Fixes: 46e1536937ee ("net: macb: convert to phylink")
Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Reto Schneider <reto.schneider@husqvarnagroup.com>
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
Cc: Nicolas Ferre <nicolas.ferre@microchip.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/cadence/macb_main.c