linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "tiejun.chen" <tiejun.chen@windriver.com>
To: Shawn Jin <shawnxjin@gmail.com>
Cc: Scott Wood <scottwood@freescale.com>, ppcdev <linuxppc-dev@ozlabs.org>
Subject: Re: CONFIG_FEC is not good for mpc8xx ethernet?
Date: Mon, 25 Oct 2010 16:21:44 +0800	[thread overview]
Message-ID: <4CC53E18.3050204@windriver.com> (raw)
In-Reply-To: <AANLkTimW1_Hc3kQ2Wbn6zDMUSJvRCxn0XdGw4wB-mm0D@mail.gmail.com>

Shawn Jin wrote:
>> The problem for me is that the PHY failed to be probed. The related
>> error messages are shown below. I even tried the patch Tiejun pointed
>> out. But that doesn't help. The phy ID read from the bus was all Fs.
>>
>> FEC MII Bus: probed
>> mdio_bus fa200e00: error probing PHY at address 0
> 
> I think I figured out the probing failure. My board uses PortD bit8 as
> an input pin from phy's MDC. I didn't set up this pin assignment.
> 
> When probing the PHY the fs_enet_fec_mii_read() is called to get phy
> id. The correct phy id was returned. However when I tried to set up
> the ip address using the command "ifconfig eth0 192.168.0.4". The same
> function was called again. But this time the fecp->fec_r_cntrl
> mysteriously became 0 so the kernel reported bug for that.

Sorry for this delay response since I'm a bit busying recently:)

If you're sure that work well at the first time it may be issued from PIN. Are
the PINs used to MDIO bus multiplexed? Maybe you miss something to re-configure
PIN with the appropriate mode, OUT direction and some GPIO REGs to bind your PHY
PINs. I means maybe other drivers also use same PINs and re-configure them, so
they don't work properly as the first time. So you can try adding some codes to
re-initial PINs as PHY expect on here to check this again.

Tiejun

> 
> # ifconfig eth0 192.168.0.4
> ------------[ cut here ]------------
> kernel BUG at drivers/net/fs_enet/mii-fec.c:58!
> Oops: Exception in kernel mode, sig: 5 [#1]
> MyMPC870
> NIP: c012b79c LR: c012963c CTR: c012b77c
> REGS: c7457c60 TRAP: 0700   Not tainted  (2.6.33.5)
> MSR: 00029032 <EE,ME,CE,IR,DR>  CR: 24020042  XER: 20000000
> TASK = c7840000[236] 'ifconfig' THREAD: c7456000
> GPR00: 00000001 c7457d10 c7840000 c7845400 00000000 00000001 ffffffff 00000000
> GPR08: c77c44fc c906ce00 c784806c 00000b9f 84020042 100b986c 10096042 1009604f
> GPR16: 1009603b 10096030 10096001 100b188e c7457e18 ffff8914 c742430c c740b000
> GPR24: c7424300 c78443c0 00000001 00000000 c7845428 c7845400 c7845600 c7845600
> NIP [c012b79c] fs_enet_fec_mii_read+0x20/0x90
> LR [c012963c] mdiobus_read+0x50/0x74
> Call Trace:
> [c7457d10] [c0115744] driver_bound+0x60/0xa0 (unreliable)
> [c7457d30] [c0129094] genphy_config_init+0x24/0xd4
> [c7457d40] [c0128920] phy_init_hw+0x4c/0x78
> [c7457d50] [c0128a40] phy_connect_direct+0x24/0x88
> [c7457d70] [c0133e50] of_phy_connect+0x48/0x6c
> [c7457d90] [c012ae10] fs_enet_open+0xf0/0x2cc
> [c7457db0] [c0148a54] dev_open+0x100/0x138
> [c7457dd0] [c0146ca0] dev_change_flags+0x80/0x1a8
> [c7457df0] [c018e104] devinet_ioctl+0x630/0x750
> [c7457e60] [c018eb5c] inet_ioctl+0xcc/0xf8
> [c7457e70] [c01370d8] sock_ioctl+0x60/0x28c
> [c7457e90] [c007dbcc] vfs_ioctl+0x38/0x9c
> [c7457ea0] [c007ddf0] do_vfs_ioctl+0x84/0x708
> [c7457f10] [c007e4b4] sys_ioctl+0x40/0x74
> [c7457f40] [c000de60] ret_from_syscall+0x0/0x38
> Instruction dump:
> 80010014 7c0803a6 38210010 4e800020 81230018 81290000 7c0004ac 80090144
> 0c000000 4c00012c 68000004 5400f7fe <0f000000> 5484b810 64846002 54a5925a
> ---[ end trace 41bf95259a68372e ]---
> Trace/breakpoint trap
> 
> I cannot find where the fec_r_cntrl would be reset to 0 after
> fs_enet_mdio_probe() sets it to FEC_RCNTRL_MII_MODE. Odd?
> 
> Thanks,
> -Shawn.
> 

  reply	other threads:[~2010-10-25  8:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-18  8:13 CONFIG_FEC is not good for mpc8xx ethernet? Shawn Jin
2010-10-18  8:40 ` tiejun.chen
2010-10-18 16:42   ` Scott Wood
2010-10-19  2:03     ` tiejun.chen
2010-10-20  7:03       ` Shawn Jin
2010-10-20  7:46         ` tiejun.chen
2010-10-20  9:19         ` Shawn Jin
2010-10-25  8:21           ` tiejun.chen [this message]
2010-10-26  1:00             ` Shawn Jin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4CC53E18.3050204@windriver.com \
    --to=tiejun.chen@windriver.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=scottwood@freescale.com \
    --cc=shawnxjin@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).