linux-stable/drivers/net/ethernet/cadence
Guenter Roeck 8db3cbc507 net: macb: Fix mdio child node detection
Commit 4d98bb0d7e ("net: macb: Use mdio child node for MDIO bus if it
exists") added code to detect if a 'mdio' child node exists to the macb
driver. Ths added code does, however, not actually check if the child node
exists, but if the parent node exists. This results in errors such as

macb 10090000.ethernet eth0: Could not attach PHY (-19)

if there is no 'mdio' child node. Fix the code to actually check for
the child node.

Fixes: 4d98bb0d7e ("net: macb: Use mdio child node for MDIO bus if it exists")
Cc: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Sean Anderson <sean.anderson@seco.com>
Tested-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Link: https://lore.kernel.org/r/20211026173950.353636-1-linux@roeck-us.net
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-10-27 17:12:18 -07:00
..
Kconfig ethernet: fix PTP_1588_CLOCK dependencies 2021-08-13 17:49:05 -07:00
macb.h net: macb: add support for mii on rgmii 2021-09-18 14:14:39 +01:00
macb_main.c net: macb: Fix mdio child node detection 2021-10-27 17:12:18 -07:00
macb_pci.c net: macb: fix use after free on rmmod 2021-09-09 10:55:44 +01:00
macb_ptp.c net: macb: ptp: Switch to gettimex64() interface 2021-09-30 13:14:26 +01:00
Makefile