]> git.kernelconcepts.de Git - karo-tx-uboot.git/commit
phy: fix create_phy_by_mask for when its given an actual search mask
authorCormier, Jonathan <jcormier@criticallink.com>
Wed, 21 May 2014 17:08:52 +0000 (13:08 -0400)
committerTom Rini <trini@ti.com>
Thu, 5 Jun 2014 18:44:56 +0000 (14:44 -0400)
commit08be2836df0b07aac65fea583b762335569fd47a
tree6b78dc1045b649ed3080b143c466a107bde9e578
parent64375014c499528d9df5ee37f78844823a9d21f2
phy: fix create_phy_by_mask for when its given an actual search mask

get_phy_id returns -EIO when it can't read from a phy at a given addr.  This would cause
create_phy_by_mask to return prematurely before it had tested the other addresses in the provided mask.

Example usage:
Replace
    phydev = phy_connect(bus, phy_addr, dev, phy_if)
with
    phydev = phy_find_by_mask(bus, phy_mask, phy_if)
    if (phydev)
phy_connect_dev(phydev, dev);

Signed-off-by: Cormier, Jonathan <jcormier@criticallink.com>
Cc: Joe Hershberger <joe.hershberger@gmail.com>
drivers/net/phy/phy.c