aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ibm_emac/ibm_emac_phy.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.osdl.org>2006-12-29 10:03:54 -0800
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-29 10:03:54 -0800
commit6c722e90d7ede7db2d2b28a3cc69a8545db67ea1 (patch)
tree2473530190795c11f841db37b7d74df9bcc0416b /drivers/net/ibm_emac/ibm_emac_phy.c
parent007fb598b4674de82492a9961e82826875012229 (diff)
parent81f4e6c190a0fa016fd7eecaf76a5f95d121afc2 (diff)
downloadkernel_samsung_smdk4412-6c722e90d7ede7db2d2b28a3cc69a8545db67ea1.zip
kernel_samsung_smdk4412-6c722e90d7ede7db2d2b28a3cc69a8545db67ea1.tar.gz
kernel_samsung_smdk4412-6c722e90d7ede7db2d2b28a3cc69a8545db67ea1.tar.bz2
Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6: (42 commits) r8169: extraneous Cmd{Tx/Rx}Enb write forcedeth: modified comment header NetXen: Reducing ring sizes for IOMMU issue. NetXen: Fix for PPC machines. NetXen: work queue fixes. NetXen: Link status message correction for quad port cards. NetXen: Multiple adapter fix. NetXen: Using correct CHECKSUM flag. NetXen: driver reload fix for newer firmware. NetXen: Adding new device ids. PHY probe not working properly for ibm_emac (PPC4xx) ep93xx: some minor cleanups to the ep93xx eth driver sky2: phy power down needs PCI config write enabled sky2: power management/MSI workaround sky2: dual port NAPI problem via-velocity uses INET interfaces e1000: Do not truncate TSO TCP header with 82544 workaround myri10ge: handle failures in suspend and resume myri10ge: no need to save MSI and PCIe state in the driver myri10ge: make msi configurable at runtime through sysfs ...
Diffstat (limited to 'drivers/net/ibm_emac/ibm_emac_phy.c')
-rw-r--r--drivers/net/ibm_emac/ibm_emac_phy.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/ibm_emac/ibm_emac_phy.c b/drivers/net/ibm_emac/ibm_emac_phy.c
index 4a97024..9074f76 100644
--- a/drivers/net/ibm_emac/ibm_emac_phy.c
+++ b/drivers/net/ibm_emac/ibm_emac_phy.c
@@ -309,7 +309,7 @@ int mii_phy_probe(struct mii_phy *phy, int address)
{
struct mii_phy_def *def;
int i;
- u32 id;
+ int id;
phy->autoneg = AUTONEG_DISABLE;
phy->advertising = 0;
@@ -324,6 +324,8 @@ int mii_phy_probe(struct mii_phy *phy, int address)
/* Read ID and find matching entry */
id = (phy_read(phy, MII_PHYSID1) << 16) | phy_read(phy, MII_PHYSID2);
+ if (id < 0)
+ return -ENODEV;
for (i = 0; (def = mii_phy_table[i]) != NULL; i++)
if ((id & def->phy_id_mask) == def->phy_id)
break;