linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Ethernet PHY chip discovery not working on 855T with 971/972 chips
@ 2003-07-09  2:17 Dean Matsen
  2003-07-09  2:29 ` Dean Matsen
  0 siblings, 1 reply; 30+ messages in thread
From: Dean Matsen @ 2003-07-09  2:17 UTC (permalink / raw)
  To: linuxppc-embedded


To whomever maintains the file arch/ppc/8xx_io/fec.c:

I note the following code in mii_discover_phy() :

     fep = dev->priv;

     if ((phytype = (mii_reg & 0xffff)) != 0xffff) {

         /* Got first part of ID, now get remainder.
         */

In our devices, reading the first word with the wrong address yields the
value 0, not 0xFFFF.  This happens even if we play with it by hand.  The
search goes through address 0, 1, 2, .., and our chip is hard-coded at
address 1.  What happens is the kernel panics with something like
"Don't know what chip ID 0000FFFF is".  Anyway, I changed it to the
following, and it finds our PHY correctly now.

     fep = dev->priv;

     phytype = (mii_reg & 0xffff);
     if (phytype != 0xffff && phytype != 0x0000) {

         /* Got first part of ID, now get remainder.
         */

I am guessing that probably most devices have the PHY chip at address
zero, so nobody else has run into this problem because it finds their
chip in the first iteration.

You may also want to note in the file that it supports 972 chips (which
apparently look like 971 chips from the inside, 'cuz that's what the
kernel says it is).  Perhaps the printk() should be updated to say
"971/972" instead of just "971"?


Thanks
Dean Matsen


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2003-07-15 15:04 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-07-09  2:17 Ethernet PHY chip discovery not working on 855T with 971/972 chips Dean Matsen
2003-07-09  2:29 ` Dean Matsen
2003-07-09  2:56   ` Eugene Surovegin
2003-07-09  5:21     ` Dan Malek
2003-07-09  5:50       ` Dean Matsen
2003-07-09 14:37         ` Dan Malek
2003-07-09 16:39           ` Dean Matsen
2003-07-09 20:54           ` Dean Matsen
2003-07-09 21:21             ` Wolfgang Denk
     [not found]               ` <20030711151834.GU17433@ip68-0-152-218.tc.ph.cox.net>
2003-07-11 15:43                 ` Wolfgang Denk
2003-07-11 15:52                   ` Tom Rini
2003-07-11 18:29                     ` Wolfgang Denk
2003-07-11 18:50                       ` Tom Rini
2003-07-11 19:18                         ` Wolfgang Denk
2003-07-11 19:34                           ` Tom Rini
2003-07-11 21:04                             ` Wolfgang Denk
2003-07-14  6:21                         ` Pantelis Antoniou
2003-07-14  7:58                           ` Wolfgang Denk
2003-07-14 14:31                             ` Tom Rini
2003-07-14 19:26                               ` Wolfgang Denk
2003-07-15 15:04                                 ` Tom Rini
2003-07-11 23:21                 ` Dean Matsen
2003-07-12  1:01                   ` Paul Mackerras
2003-07-12 21:13                     ` Dean Matsen
2003-07-12 21:54                       ` Wolfgang Denk
2003-07-14 14:52                       ` Tom Rini
2003-07-13 15:48                     ` Dan Malek
2003-07-13 16:29                       ` Roland Dreier
2003-07-14 20:49                         ` Matt Porter
2003-07-15  5:08                           ` Roland Dreier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).