[1.] One line summary of the problem: PHY probe not working properly for ibm_emac (PPC4xx) [2.] Full description of the problem/report: I have a system with AMCC PowerPC 405EP and PHY Intel LXT971A. Linux 2.6.18.3 is not able to detect the PHY ID correctly. The PHY ID detected is 0, but should be 0x1d. This is because phy_read() (__emac_mdio_read() resp.) from drivers/net/ibm_emac/ibm_emac_core.c might return -ETIMEDOUT or -EREMOTEIO on error. This is ignored inside the int mii_phy_probe(struct mii_phy *phy, int address) from drivers/net/ibm_emac/ibm_emac_phy.c as the return value is assigned to an u32 variable. Please consider the patch below ... [3.] Keywords: networking, kernel, problem, ibm_emac, ppc4xx, phy [4.] Kernel version (from /proc/version): 2.6.18.3 [5.] Output of Oops.. message (if applicable) with symbolic information resolved (see Documentation/oops-tracing.txt) doesn't oops [6.] A small shell script or example program which triggers the problem (if possible) none required [7.] Environment [7.1.] Software (add the output of the ver_linux script here) ELDK 3.1.1 from www.denx.org [7.2.] Processor information (from /proc/cpuinfo): AMCC' PowerPC 405EP PHY Intel LXT971A [X.] Patch: Index: drivers/net/ibm_emac/ibm_emac_phy.c =================================================================== --- drivers/net/ibm_emac/ibm_emac_phy.c (revision 67) +++ drivers/net/ibm_emac/ibm_emac_phy.c (revision 69) @@ -309,7 +309,7 @@ { struct mii_phy_def *def; int i; - u32 id; + int id; phy->autoneg = AUTONEG_DISABLE; phy->advertising = 0; @@ -324,6 +324,8 @@ /* 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; -- Mgr. Hynek Petrak ----------------- S.W.A.C. Bohemia spol. s r.o. Heydukova 314, 38601 Strakonice tel: +420 3834181-36 or +49 (89) 613866-51 PGP key: http://www.swac.cz/~hynek/hp.pgp 5CAC 7712 CFFD D076 0D74 A134 1EFD 728C 84CB 94CF
Attachment:
pgpNXfyvz4Pm2.pgp
Description: PGP signature
- Prev by Date: [PATCH 7/12] pid: Use struct pid for talking about process groups in exit.c
- Next by Date: Re: [PATCH 2.6.19-rc1] Toshiba TC86C001 IDE driver
- Previous by thread: [PATCH 0/12] tty layer and misc struct pid conversions
- Next by thread: tg3 + BCM5721 : eth1 detected yet 'No such device'
- Index(es):