* tqm5200s phy link toggles between up and down
@ 2012-12-18 9:44 Johannes Braun
2012-12-18 9:57 ` Wolfgang Grandegger
0 siblings, 1 reply; 4+ messages in thread
From: Johannes Braun @ 2012-12-18 9:44 UTC (permalink / raw)
To: linuxppc-dev
Hello,
I hope someone could help me with my problem. Currently I am porting
a new kernel (3.3.8) for a tqm5200s based board.
The previous kernel was 2.6.23. The new kernel version is needed because
of support for a wireless card.
The new kernel has problems with my ethernet PHY. The problem occurs only
with our hardware. Not with the TQ eval board.
The eval board uses a Intel PHY. Our board uses a Marvel 88E6085 PHY.
I have tested the new kernel on the eval board and everything runs fine.
But After booting the kernel on our hardware, the ethernet connection is
going up and down and loops between these two states.
This is the log output:
[ 38.608305] PHY: f0003000:00 - Link is Down
[ 41.708310] PHY: f0003000:00 - Link is Up - 10/Half
[ 43.744304] PHY: f0003000:00 - Link is Down
[ 46.844309] PHY: f0003000:00 - Link is Up - 10/Half
I also had a look inside the driver in
Drivers/net/ethernet/freescale/fec_mpc52xx.c
and made a printk output to the link adjust method,
which is called everytime before the link is going down.
/* based on generic_adjust_link from fs_enet-main.c */
static void
mpc52xx_fec_adjust_link(struct net_device *dev)
{
struct mpc52xx_fec_priv *priv = netdev_priv(dev);
struct phy_device *phydev = priv->phydev;
int new_state = 0;
printk( KERN_INFO "%s->%s: entering...",
__FILE__, __func__ );
if (phydev->link != PHY_DOWN) {
if (phydev->duplex != priv->duplex) {
struct mpc52xx_fec __iomem *fec = priv->fec;
u32 rcntrl;
u32 tcntrl;
...
...
This is the output with the above printk:
[ 35.589485] PHY: f0003000:00 - Link is Down
[ 40.752753] drivers/net/ethernet/freescale/fec_mpc52xx.c
->mpc52xx_fec_adjust_link: entering...
[ 40.761494] PHY: f0003000:00 - Link is Up - 10/Half
[ 42.796746] drivers/net/ethernet/freescale/fec_mpc52xx.c
->mpc52xx_fec_adjust_link: entering...
[ 42.805485] PHY: f0003000:00 - Link is Down
[ 49.000755] drivers/net/ethernet/freescale/fec_mpc52xx.c
->mpc52xx_fec_adjust_link: entering...
[ 49.009497] PHY: f0003000:00 - Link is Up - 10/Half
As I noticed the problem occurs also with a 2.6.24 kernel.
Seems that the driver was rewritten and moved from drivers/net/fec_mpc52xx/
to drivers/net/ethernet/freescale/fec_mpc52xx.c.
I am note shure where to search for the problem. The PHY link seems to be in
some kind of auto-negotiating loop of going up and down? Has anyone had this
problem before, or does someone has a tip to fix this problem?
Best regards
Johannes
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: tqm5200s phy link toggles between up and down
2012-12-18 9:44 tqm5200s phy link toggles between up and down Johannes Braun
@ 2012-12-18 9:57 ` Wolfgang Grandegger
2012-12-18 10:05 ` Wolfgang Grandegger
0 siblings, 1 reply; 4+ messages in thread
From: Wolfgang Grandegger @ 2012-12-18 9:57 UTC (permalink / raw)
To: Johannes Braun; +Cc: linuxppc-dev
On 12/18/2012 10:44 AM, Johannes Braun wrote:
> Hello,
>
> I hope someone could help me with my problem. Currently I am porting
> a new kernel (3.3.8) for a tqm5200s based board.
This is not really a new kernel.
> The previous kernel was 2.6.23. The new kernel version is needed because
> of support for a wireless card.
>
> The new kernel has problems with my ethernet PHY. The problem occurs only
> with our hardware. Not with the TQ eval board.
> The eval board uses a Intel PHY. Our board uses a Marvel 88E6085 PHY.
Is it a PHY or a switch? If is a switch you need to configure a fixed
link to the switch. This can be done via dts file.
Note the the DSA also supports this chip.
Wolfgang.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: tqm5200s phy link toggles between up and down
2012-12-18 9:57 ` Wolfgang Grandegger
@ 2012-12-18 10:05 ` Wolfgang Grandegger
2012-12-18 11:01 ` Johannes Braun
0 siblings, 1 reply; 4+ messages in thread
From: Wolfgang Grandegger @ 2012-12-18 10:05 UTC (permalink / raw)
To: Johannes Braun; +Cc: linuxppc-dev
On 12/18/2012 10:57 AM, Wolfgang Grandegger wrote:
> On 12/18/2012 10:44 AM, Johannes Braun wrote:
>> Hello,
>>
>> I hope someone could help me with my problem. Currently I am porting
>> a new kernel (3.3.8) for a tqm5200s based board.
>
> This is not really a new kernel.
>
>> The previous kernel was 2.6.23. The new kernel version is needed because
>> of support for a wireless card.
>>
>> The new kernel has problems with my ethernet PHY. The problem occurs only
>> with our hardware. Not with the TQ eval board.
>> The eval board uses a Intel PHY. Our board uses a Marvel 88E6085 PHY.
>
> Is it a PHY or a switch? If is a switch you need to configure a fixed
> link to the switch. This can be done via dts file.
Here is an example:
http://lxr.linux.no/#linux+v3.7.1/arch/powerpc/boot/dts/charon.dts#L129
> Note the the DSA also supports this chip.
See http://lwn.net/Articles/302333/. But I think it lacks device tree
support.
Wolfgang.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: tqm5200s phy link toggles between up and down
2012-12-18 10:05 ` Wolfgang Grandegger
@ 2012-12-18 11:01 ` Johannes Braun
0 siblings, 0 replies; 4+ messages in thread
From: Johannes Braun @ 2012-12-18 11:01 UTC (permalink / raw)
Cc: linuxppc-dev
>> This is not really a new kernel.
Yes this is right. But it is the first Kernel which supports our
wireless card without problems.
>> Is it a PHY or a switch? If is a switch you need to configure a fixed
>> link to the switch. This can be done via dts file.
According to the marvell website it is a switch with integrated phy.
> Here is an example:
> http://lxr.linux.no/#linux+v3.7.1/arch/powerpc/boot/dts/charon.dts#L129
I had a look at this example and compared it to my *.dtb file. The
difference was, the fixed-link tag in the section ethernet@3000 { ...
};.
I added "fixed-link = <1 1 100 0 0>;" to my tqm5200.dtb and now it works.
I am new to powerpc development and I hope it is ok to ask what this
fixed-link with the numbers "1 1 100 0 0" does? Is it the address to
the PHY?
2012/12/18 Wolfgang Grandegger <wg@grandegger.com>:
> On 12/18/2012 10:57 AM, Wolfgang Grandegger wrote:
>> On 12/18/2012 10:44 AM, Johannes Braun wrote:
>>> Hello,
>>>
>>> I hope someone could help me with my problem. Currently I am porting
>>> a new kernel (3.3.8) for a tqm5200s based board.
>>
>> This is not really a new kernel.
>>
>>> The previous kernel was 2.6.23. The new kernel version is needed because
>>> of support for a wireless card.
>>>
>>> The new kernel has problems with my ethernet PHY. The problem occurs only
>>> with our hardware. Not with the TQ eval board.
>>> The eval board uses a Intel PHY. Our board uses a Marvel 88E6085 PHY.
>>
>> Is it a PHY or a switch? If is a switch you need to configure a fixed
>> link to the switch. This can be done via dts file.
>
> Here is an example:
>
> http://lxr.linux.no/#linux+v3.7.1/arch/powerpc/boot/dts/charon.dts#L129
>
>> Note the the DSA also supports this chip.
>
> See http://lwn.net/Articles/302333/. But I think it lacks device tree
> support.
>
> Wolfgang.
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-12-18 11:01 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-18 9:44 tqm5200s phy link toggles between up and down Johannes Braun
2012-12-18 9:57 ` Wolfgang Grandegger
2012-12-18 10:05 ` Wolfgang Grandegger
2012-12-18 11:01 ` Johannes Braun
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.