
13 Jul
2019
13 Jul
'19
2:07 a.m.
On Fri, Jul 12, 2019 at 2:07 PM Simon Goldschmidt simon.k.r.goldschmidt@gmail.com wrote:
The designware eth driver registers an mdio bus during probe, but if no PHY is found, this bus is never removed although probe failes and the driver is shown as not probed in the dm tree.
This later leads to errors when e.g. the mii or mdio commands try to use available mdio buses because the mdio bus is still registered but all corresponding data structures are invalid because probe failed.
Fix this by unregistering the mdio bus on probe failure (just as it is unregistered in the .remove callback, too).
Signed-off-by: Simon Goldschmidt simon.k.r.goldschmidt@gmail.com
Acked-by: Joe Hershberger joe.hershberger@ni.com