diff options
author | Anton Vorontsov <avorontsov@ru.mvista.com> | 2009-01-14 17:38:02 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-01-14 17:38:02 -0500 |
commit | f0d44ae310bc8eb0b6694e257015d8b24e1a357c (patch) | |
tree | 5687fbe1f5c7e2eeaa55de384b58f0764fae6ab8 /drivers/net/phy | |
parent | f17f5c91ae3bfeb5cfc37fa132a5fdfceb8927be (diff) |
phylib: Fix Freescale TBI PHY detection
Freescale on-chip TBI PHYs reports PHY ID as 0x0, but as of
commit 3ee82383f0098a2e13acc8cf1be8e47512f41e5a
Author: Giulio Benetti <giulio.benetti@micronovasrl.com>
Date: Thu Nov 13 21:53:13 2008 +0000
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.
phy_device.c treats PHY ID == 0x0 as bogus IDs, and that results in
gianfar driver failure to see the TBI PHYs. This code snippet triggers:
if (!priv->tbiphy) {
printk(KERN_WARNING "SGMII mode requires that the device "
"tree specify a tbi-handle\n");
return;
}
Although tbi-handle is specified in the device tree.
Btw, technically PHY ID == 0x0 is a valid ID (if we ever see a PHY
manufactured by Xerox :-).
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Acked-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy')
-rw-r--r-- | drivers/net/phy/phy_device.c | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c index e35460165bf7..0a06e4fd37d9 100644 --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c | |||
@@ -231,15 +231,6 @@ struct phy_device * get_phy_device(struct mii_bus *bus, int addr) | |||
231 | if ((phy_id & 0x1fffffff) == 0x1fffffff) | 231 | if ((phy_id & 0x1fffffff) == 0x1fffffff) |
232 | return NULL; | 232 | return NULL; |
233 | 233 | ||
234 | /* | ||
235 | * Broken hardware is sometimes missing the pull-up resistor on the | ||
236 | * MDIO line, which results in reads to non-existent devices returning | ||
237 | * 0 rather than 0xffff. Catch this here and treat 0 as a non-existent | ||
238 | * device as well. | ||
239 | */ | ||
240 | if (phy_id == 0) | ||
241 | return NULL; | ||
242 | |||
243 | dev = phy_device_create(bus, addr, phy_id); | 234 | dev = phy_device_create(bus, addr, phy_id); |
244 | 235 | ||
245 | return dev; | 236 | return dev; |