lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <200612131201.24274.hynek@swac.cz>
Date:	Wed, 13 Dec 2006 12:01:19 +0100
From:	Hynek Petrak <hynek@...c.cz>
To:	linux-kernel@...r.kernel.org
Subject: PROBLEM: PHY probe not working properly for ibm_emac (PPC4xx)

[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


Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ