net: PHYLIB mdio fixes #2
The PHYLIB mdio code has more problems in error paths: - mdiobus_release can be called before bus->state is set to MDIOBUS_REGISTERED - mdiobus_scan allocates resources which need to be freed - the comment is wrong, the resistors used are actually pull-ups. Signed-off-by: Krzysztof Halasa <khc@pm.waw.pl> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
f7d1b9f5aa
commit
161c8d2f50
@@ -232,7 +232,7 @@ struct phy_device * get_phy_device(struct mii_bus *bus, int addr)
|
||||
return NULL;
|
||||
|
||||
/*
|
||||
* Broken hardware is sometimes missing the pull down resistor on the
|
||||
* Broken hardware is sometimes missing the pull-up resistor on the
|
||||
* MDIO line, which results in reads to non-existent devices returning
|
||||
* 0 rather than 0xffff. Catch this here and treat 0 as a non-existent
|
||||
* device as well.
|
||||
|
Reference in New Issue
Block a user