netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC] micrel KSZ8041 disable auto negotiation with fiber
@ 2012-06-19 14:45 Aníbal Almeida Pinto
  2012-06-19 17:08 ` Ben Hutchings
  0 siblings, 1 reply; 4+ messages in thread
From: Aníbal Almeida Pinto @ 2012-06-19 14:45 UTC (permalink / raw)
  To: netdev

Hi,

I am working on a custom board based on a OMAP L138 with a KSZ8041TL-FTL 
phy that have fibber and copper support.

When using with fibber the board can't connect to a switch, only after 
exec :

	ethtool -s eth1 speed 100 duplex full autoneg off

the phy get link and start working.

On some switches it appears that autoneg don't work well with fibber, 
ethtool reports that its at 10MB/s after exec

	ethtool -s eth1 autoneg on

The auto negotiation bit on phy register is disable on start when using 
the fibber but Linux don't appear to look at it.

Found a thread [1] that solve the problem but don't appear to be fully 
accepted.

The problem is modifying the phy code without interfere with ethtool use.

Any official/accepted solution to this problem ?

Thanks.

[1] - http://marc.info/?l=linuxppc-embedded&m=131107263711714

Aníbal

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

* Re: [RFC] micrel KSZ8041 disable auto negotiation with fiber
  2012-06-19 14:45 [RFC] micrel KSZ8041 disable auto negotiation with fiber Aníbal Almeida Pinto
@ 2012-06-19 17:08 ` Ben Hutchings
  2012-06-19 17:53   ` Aníbal Almeida Pinto
  0 siblings, 1 reply; 4+ messages in thread
From: Ben Hutchings @ 2012-06-19 17:08 UTC (permalink / raw)
  To: Aníbal Almeida Pinto; +Cc: netdev

On Tue, 2012-06-19 at 15:45 +0100, Aníbal Almeida Pinto wrote:
> Hi,
> 
> I am working on a custom board based on a OMAP L138 with a KSZ8041TL-FTL 
> phy that have fibber and copper support.
> 
> When using with fibber the board can't connect to a switch, only after 
> exec :
> 
> 	ethtool -s eth1 speed 100 duplex full autoneg off
> 
> the phy get link and start working.
> 
> On some switches it appears that autoneg don't work well with fibber, 
> ethtool reports that its at 10MB/s after exec
> 
> 	ethtool -s eth1 autoneg on

I'm not aware of any specification for autoneg over fibre, so I imagine
the PHY is being programmed with an invalid configuration and sending
weird signals.

> The auto negotiation bit on phy register is disable on start when using 
> the fibber but Linux don't appear to look at it.
> 
> Found a thread [1] that solve the problem but don't appear to be fully 
> accepted.
> 
> The problem is modifying the phy code without interfere with ethtool use.
> 
> Any official/accepted solution to this problem ?

The net driver or PHY driver needs to disable autoneg by default when
connected to fibre, and reject attempts to turn it on.

As for *how* the driver is supposed to know whether that's the case, I
have no idea...

> [1] - http://marc.info/?l=linuxppc-embedded&m=131107263711714

...which seems to be where the previous discussion ended.

Ben.

-- 
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.

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

* Re: [RFC] micrel KSZ8041 disable auto negotiation with fiber
  2012-06-19 17:08 ` Ben Hutchings
@ 2012-06-19 17:53   ` Aníbal Almeida Pinto
  2012-06-19 18:45     ` Ben Hutchings
  0 siblings, 1 reply; 4+ messages in thread
From: Aníbal Almeida Pinto @ 2012-06-19 17:53 UTC (permalink / raw)
  To: Ben Hutchings; +Cc: netdev

Em Ter 19 Jun 2012 18:08:29 WEST, Ben Hutchings escreveu:
> On Tue, 2012-06-19 at 15:45 +0100, Aníbal Almeida Pinto wrote:
>> Hi,
>>
>> I am working on a custom board based on a OMAP L138 with a KSZ8041TL-FTL
>> phy that have fibber and copper support.
>>
>> When using with fibber the board can't connect to a switch, only after
>> exec :
>>
>> 	ethtool -s eth1 speed 100 duplex full autoneg off
>>
>> the phy get link and start working.
>>
>> On some switches it appears that autoneg don't work well with fibber,
>> ethtool reports that its at 10MB/s after exec
>>
>> 	ethtool -s eth1 autoneg on
>
> I'm not aware of any specification for autoneg over fibre, so I imagine
> the PHY is being programmed with an invalid configuration and sending
> weird signals.
>
>> The auto negotiation bit on phy register is disable on start when using
>> the fibber but Linux don't appear to look at it.
>>
>> Found a thread [1] that solve the problem but don't appear to be fully
>> accepted.
>>
>> The problem is modifying the phy code without interfere with ethtool use.
>>
>> Any official/accepted solution to this problem ?
>
> The net driver or PHY driver needs to disable autoneg by default when
> connected to fibre, and reject attempts to turn it on.
>
> As for *how* the driver is supposed to know whether that's the case, I
> have no idea...

On this chip you have a pin where you can specify if is fibber or 
copper, at power up it cleat/set the bit of auto negotiation.

The driver can save the bit state after phy power up or reset, and with 
that validate if is copper or fibber.

In the case of fibber shouldn't allow change the auto negotiation.

>
>> [1] - http://marc.info/?l=linuxppc-embedded&m=131107263711714
>
> ...which seems to be where the previous discussion ended.
>
> Ben.
>

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

* Re: [RFC] micrel KSZ8041 disable auto negotiation with fiber
  2012-06-19 17:53   ` Aníbal Almeida Pinto
@ 2012-06-19 18:45     ` Ben Hutchings
  0 siblings, 0 replies; 4+ messages in thread
From: Ben Hutchings @ 2012-06-19 18:45 UTC (permalink / raw)
  To: Aníbal Almeida Pinto; +Cc: netdev

On Tue, 2012-06-19 at 18:53 +0100, Aníbal Almeida Pinto wrote:
> Em Ter 19 Jun 2012 18:08:29 WEST, Ben Hutchings escreveu:
> > On Tue, 2012-06-19 at 15:45 +0100, Aníbal Almeida Pinto wrote:
> >> Hi,
> >>
> >> I am working on a custom board based on a OMAP L138 with a KSZ8041TL-FTL
> >> phy that have fibber and copper support.
[...]
> > The net driver or PHY driver needs to disable autoneg by default when
> > connected to fibre, and reject attempts to turn it on.
> >
> > As for *how* the driver is supposed to know whether that's the case, I
> > have no idea...
> 
> On this chip you have a pin where you can specify if is fibber or 
> copper, at power up it cleat/set the bit of auto negotiation.
> 
> The driver can save the bit state after phy power up or reset, and with 
> that validate if is copper or fibber.
>
> In the case of fibber shouldn't allow change the auto negotiation.

So presumably the problem is where to put this logic?

It looks like you'll be using the davinci_emac net driver, which uses
phylib (i.e. separate PHY drivers) so you need to change ks8041_driver
and related functions in drivers/net/phy/micrel.c.

Ben.

-- 
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.

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

end of thread, other threads:[~2012-06-19 18:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-19 14:45 [RFC] micrel KSZ8041 disable auto negotiation with fiber Aníbal Almeida Pinto
2012-06-19 17:08 ` Ben Hutchings
2012-06-19 17:53   ` Aníbal Almeida Pinto
2012-06-19 18:45     ` Ben Hutchings

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).