]> git.baikalelectronics.ru Git - uboot.git/commit
net: designware: fix PHY reset with DM_MDIO
authorNeil Armstrong <narmstrong@baylibre.com>
Wed, 21 Apr 2021 08:58:01 +0000 (10:58 +0200)
committerNeil Armstrong <narmstrong@baylibre.com>
Wed, 28 Apr 2021 15:45:26 +0000 (17:45 +0200)
commit62699113b6d07f314403c15f7ba1344242911f04
treeab8ef24fcc5ea2b646e42fb48abb5e10257a0ad8
parentab11cc3793447dc0da07b01cb57b85704ddeaf06
net: designware: fix PHY reset with DM_MDIO

The dw_eth_pdata is not accessible from the mdio device, it gets the mdio bus plat
leading to random sleeps (-10174464 on Odroid-HC4).

This moves the dw_mdio_reset function to a common one taking the ethernet
device as parameter and use it from the dw_mdio_reset and dm_mdio variant functions.

Fixes: 1fe99f3b2d ("net: designware: add DM_MDIO support")
Reported-by: Mark Kettenis <mark.kettenis@xs4all.nl>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
drivers/net/designware.c