diff options
author | Giulio Benetti <giulio.benetti@micronovasrl.com> | 2008-11-13 21:53:13 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-11-16 01:49:41 -0800 |
commit | 3ee82383f0098a2e13acc8cf1be8e47512f41e5a (patch) | |
tree | ed87a022c71e68543a73a3e6840a63e8cf015513 /drivers/net/phy/phy_device.c | |
parent | 773c9c1f77174429ad2feb1735a3beb33ff3b6c0 (diff) | |
download | blackbird-op-linux-3ee82383f0098a2e13acc8cf1be8e47512f41e5a.tar.gz blackbird-op-linux-3ee82383f0098a2e13acc8cf1be8e47512f41e5a.zip |
phy: fix phy address bug
PHYID returns 0xffff and not 0xffffffff when not found and in some
case(at91sam9263) 0x0. Maybe this patch could be useful.
Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy/phy_device.c')
-rw-r--r-- | drivers/net/phy/phy_device.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c index e11b03b2b25a..8fb1faca883a 100644 --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c @@ -227,8 +227,8 @@ struct phy_device * get_phy_device(struct mii_bus *bus, int addr) if (r) return ERR_PTR(r); - /* If the phy_id is all Fs, there is no device there */ - if (0xffffffff == phy_id) + /* If the phy_id is all Fs or all 0s, there is no device there */ + if ((0xffff == phy_id) || (0x00 == phy_id)) return NULL; dev = phy_device_create(bus, addr, phy_id); |