Netdev List
 help / color / mirror / Atom feed
* Extend smc911x to support LAN921x chips - differences?
@ 2008-09-09 14:00 Guennadi Liakhovetski
  2008-09-09 14:45 ` Guennadi Liakhovetski
  0 siblings, 1 reply; 5+ messages in thread
From: Guennadi Liakhovetski @ 2008-09-09 14:00 UTC (permalink / raw)
  To: netdev

Hi,

I have to support the LAN9215 chip from SMSC under Linux. Of course, there 
is the manufacturer provided smsc911x driver, that supports both chip 
families, but I would prefer to extend the mainline smc911x driver to also 
support 921x. I have both datasheets, they are freely downloadable from 
SMSC site, and I have both drivers, but they are absolutely different. To 
make my decision and the work easier - maybe someone knows from the top of 
their head, what the relevant differences between the chips are?

The vendor driver does not really differentiate between the chips. It does 
read the chip version, and sets the "generation" variable, but then that 
variable is only used once to rule out the oldest chips, which anyway are 
not supported by smc911x. So I tried the in-kernel driver with only added 
chip IDs added, it can access registers, read and write the MAC-address, 
interrupts are generated too, but so far I see nothing on the wire, and 
the PHY reports "link down".

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer

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

* Re: Extend smc911x to support LAN921x chips - differences?
  2008-09-09 14:00 Extend smc911x to support LAN921x chips - differences? Guennadi Liakhovetski
@ 2008-09-09 14:45 ` Guennadi Liakhovetski
  0 siblings, 0 replies; 5+ messages in thread
From: Guennadi Liakhovetski @ 2008-09-09 14:45 UTC (permalink / raw)
  To: netdev

On Tue, 9 Sep 2008, Guennadi Liakhovetski wrote:

> Hi,
> 
> I have to support the LAN9215 chip from SMSC under Linux. Of course, there 
> is the manufacturer provided smsc911x driver, that supports both chip 
> families, but I would prefer to extend the mainline smc911x driver to also 
> support 921x. I have both datasheets, they are freely downloadable from 
> SMSC site, and I have both drivers, but they are absolutely different. To 
> make my decision and the work easier - maybe someone knows from the top of 
> their head, what the relevant differences between the chips are?
> 
> The vendor driver does not really differentiate between the chips. It does 
> read the chip version, and sets the "generation" variable, but then that 
> variable is only used once to rule out the oldest chips, which anyway are 
> not supported by smc911x. So I tried the in-kernel driver with only added 
> chip IDs added, it can access registers, read and write the MAC-address, 
> interrupts are generated too, but so far I see nothing on the wire, and 
> the PHY reports "link down".

No, I was wrong here, it does detect the link and performs 
autonegotiation, that doesn't seem to be the problem... Still, no clue 
what's wrong though:-(

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer

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

* Re: Extend smc911x to support LAN921x chips - differences?
@ 2008-09-09 15:26 Steve.Glendinning
  2008-09-09 16:18 ` Guennadi Liakhovetski
  2008-09-09 20:08 ` Peter Korsgaard
  0 siblings, 2 replies; 5+ messages in thread
From: Steve.Glendinning @ 2008-09-09 15:26 UTC (permalink / raw)
  To: Guennadi Liakhovetski; +Cc: netdev, Ian.Saturley

Hi Guennadi,

> I have to support the LAN9215 chip from SMSC under Linux. Of course, 
there 
> is the manufacturer provided smsc911x driver, that supports both chip 
> families, but I would prefer to extend the mainline smc911x driver to 
also 
> support 921x. I have both datasheets, they are freely downloadable from 
> SMSC site, and I have both drivers, but they are absolutely different. 
To 
> make my decision and the work easier - maybe someone knows from the top 
of 
> their head, what the relevant differences between the chips are?
> 
> The vendor driver does not really differentiate between the chips. It 
does 
> read the chip version, and sets the "generation" variable, but then that 

> variable is only used once to rule out the oldest chips, which anyway 
are 
> not supported by smc911x. So I tried the in-kernel driver with only 
added 
> chip IDs added, it can access registers, read and write the MAC-address, 

> interrupts are generated too, but so far I see nothing on the wire, and 
> the PHY reports "link down".

Did you have the in-tree driver succesfully working with LAN9115?

The only hardware difference between the two is that LAN921[5678] has an
Auto-MDIX PHY.  This adds a configuration bit in one of the 
vendor-specific
PHY registers to force the feature off, but it defaults to Auto-MDIX 
enabled.
All of the SCR and MAC registers (and the remaining PHY registers) are 
*identical*, so any working driver should just need the ID register
changing to recognise the newer part.

Early revisions of LAN911X had a hardware bug which is most commonly
experienced when joining/leaving multicast groups.  The smsc911x driver
contains a workaround for this, but the in-tree driver does not.  LAN921X
came after this was fixed in hardware, so this workaround is not 
necessary.

The vast majority of users i've worked with have ended up using the
out-of-tree smsc911x driver, as it "just works" on many platforms.
I'll be re-submitting another candidate when I've finished working on the
LAN9500 USB ethernet driver, but for now the latest submission:

http://marc.info/?l=linux-netdev&m=121240395122475&w=2

Regards,
--
Steve Glendinning
SMSC GmbH
m: +44 777 933 9124
e: steve.glendinning@smsc.com


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

* Re: Extend smc911x to support LAN921x chips - differences?
  2008-09-09 15:26 Steve.Glendinning
@ 2008-09-09 16:18 ` Guennadi Liakhovetski
  2008-09-09 20:08 ` Peter Korsgaard
  1 sibling, 0 replies; 5+ messages in thread
From: Guennadi Liakhovetski @ 2008-09-09 16:18 UTC (permalink / raw)
  To: Steve.Glendinning; +Cc: netdev, Ian.Saturley

Hi Steve,

On Tue, 9 Sep 2008, Steve.Glendinning@smsc.com wrote:

> Did you have the in-tree driver succesfully working with LAN9115?

I haven't used smc911x for a while, but last time I used it (around 
2.6.21, I think), I think, it worked. Was a completely different hardware 
though.

> The only hardware difference between the two is that LAN921[5678] has an
> Auto-MDIX PHY.  This adds a configuration bit in one of the 
> vendor-specific
> PHY registers to force the feature off, but it defaults to Auto-MDIX 
> enabled.
> All of the SCR and MAC registers (and the remaining PHY registers) are 
> *identical*, so any working driver should just need the ID register
> changing to recognise the newer part.

It works now! Just chose a wrong bus-width.

> Early revisions of LAN911X had a hardware bug which is most commonly
> experienced when joining/leaving multicast groups.  The smsc911x driver
> contains a workaround for this, but the in-tree driver does not.  LAN921X
> came after this was fixed in hardware, so this workaround is not 
> necessary.
> 
> The vast majority of users i've worked with have ended up using the
> out-of-tree smsc911x driver, as it "just works" on many platforms.
> I'll be re-submitting another candidate when I've finished working on the
> LAN9500 USB ethernet driver, but for now the latest submission:
> 
> http://marc.info/?l=linux-netdev&m=121240395122475&w=2

Thanks, I was about to try yours, was the last attempt to use the stock 
driver, and, perhaps, unfortunately for you, it worked:-)

Thanks again
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer

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

* Re: Extend smc911x to support LAN921x chips - differences?
  2008-09-09 15:26 Steve.Glendinning
  2008-09-09 16:18 ` Guennadi Liakhovetski
@ 2008-09-09 20:08 ` Peter Korsgaard
  1 sibling, 0 replies; 5+ messages in thread
From: Peter Korsgaard @ 2008-09-09 20:08 UTC (permalink / raw)
  To: Steve.Glendinning; +Cc: Guennadi Liakhovetski, netdev, Ian.Saturley

>>>>> "Steve" == Steve Glendinning <Steve.Glendinning@smsc.com> writes:

Hi,

 Steve> Did you have the in-tree driver succesfully working with LAN9115?

I've used the mainline driver without problems on various PPC boards
with LAN9117 devices..

 Steve> The vast majority of users i've worked with have ended up
 Steve> using the out-of-tree smsc911x driver, as it "just works" on
 Steve> many platforms.  I'll be re-submitting another candidate when
 Steve> I've finished working on the LAN9500 USB ethernet driver, but
 Steve> for now the latest submission:

I've said a few times already, but couldn't you fix the existing
driver instead of adding a completely new one?

-- 
Bye, Peter Korsgaard

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

end of thread, other threads:[~2008-09-09 20:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-09 14:00 Extend smc911x to support LAN921x chips - differences? Guennadi Liakhovetski
2008-09-09 14:45 ` Guennadi Liakhovetski
  -- strict thread matches above, loose matches on Subject: below --
2008-09-09 15:26 Steve.Glendinning
2008-09-09 16:18 ` Guennadi Liakhovetski
2008-09-09 20:08 ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox