All of lore.kernel.org
 help / color / mirror / Atom feed
* Accessng phy registers
@ 2007-03-26 20:55 DI BACCO ANTONIO - technolabs
  2007-03-27  8:42 ` Alex Zeffertt
  2007-03-27 16:37 ` Andy Fleming
  0 siblings, 2 replies; 3+ messages in thread
From: DI BACCO ANTONIO - technolabs @ 2007-03-26 20:55 UTC (permalink / raw)
  To: linuxppc-embedded

[-- Attachment #1: Type: text/plain, Size: 233 bytes --]


I saw that both in phy,c and mii.c (linux 2.6.19) there is support to handle ioctls to read PHY registers. Why? And what should be used from a user application? I have both CONFIG_MII and CONFIG_PHYLIB set to y.

Bye,
Antonio.

[-- Attachment #2: Type: text/html, Size: 612 bytes --]

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

* Re: Accessng phy registers
  2007-03-26 20:55 Accessng phy registers DI BACCO ANTONIO - technolabs
@ 2007-03-27  8:42 ` Alex Zeffertt
  2007-03-27 16:37 ` Andy Fleming
  1 sibling, 0 replies; 3+ messages in thread
From: Alex Zeffertt @ 2007-03-27  8:42 UTC (permalink / raw)
  To: DI BACCO ANTONIO - technolabs; +Cc: linuxppc-embedded

DI BACCO ANTONIO - technolabs wrote:
 >
 > I saw that both in phy,c and mii.c (linux 2.6.19) there is support to
 > handle ioctls to read PHY registers. Why? And what should be used =
from a
 > user application? I have both CONFIG_MII and CONFIG_PHYLIB set to y.

Try "mii-tool -vv".  This uses the ioctls to extract the PHY registers.

If your ethernet driver doesn't support mii-tool it may support =
"ethtool"
instead.  Some drivers support both.

Alex

-------------------------------------------------------------------------=
-----=0A=
=0A=
Cambridge Broadband appoints telecoms industry veteran John Cronin as =
chairman <<http://www.cambridgebroadband.com/mi20feb07.htm>=0A=
=0A=
Maxis to upgrade its backhaul network using Cambridge Broadband; =
Alcatel-Lucent selected to manage entire upgrade project =
<http://www.cambridgebroadband.com/mi12feb07.htm>=0A=


-------------------------------------------------------------------------=
-----
Cambridge Broadband Networks Limited
Registered in England and Wales under company number: 03879840
Registered office: Selwyn House, Cambridge Business Park, Cowley Road, =
Cambridge CB4 0WZ, UK
=20
This email and any attachments are private and confidential. If you =
believe you have received this email in error please inform the sender =
and delete it from your mailbox or any other storage mechanism. =
Cambridge Broadband Networks Limited cannot accept liability for any =
statements made which are clearly the individual sender's own and not =
expressly made on behalf of Cambridge Broadband Networks Limited.

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

* Re: Accessng phy registers
  2007-03-26 20:55 Accessng phy registers DI BACCO ANTONIO - technolabs
  2007-03-27  8:42 ` Alex Zeffertt
@ 2007-03-27 16:37 ` Andy Fleming
  1 sibling, 0 replies; 3+ messages in thread
From: Andy Fleming @ 2007-03-27 16:37 UTC (permalink / raw)
  To: DI BACCO ANTONIO - technolabs; +Cc: linuxppc-embedded


On Mar 26, 2007, at 15:55, DI BACCO ANTONIO - technolabs wrote:

>
> I saw that both in phy,c and mii.c (linux 2.6.19) there is support  
> to handle ioctls to read PHY registers. Why? And what should be  
> used from a user application? I have both CONFIG_MII and  
> CONFIG_PHYLIB set to y.


mii.c provides some generic support for reading and writing PHYs and  
reporting their status.  Many drivers provide support for the MII  
ioctl.  The PHY Lib provides somewhat more robust support for PHYs,  
allowing for PHY-specific drivers, and sharing PHY access between  
multiple controllers (useful for embedded applications).  The PHY Lib  
provides its own mii ioctl implementation so that you can support the  
mii ioctl while using the PHY Lib.  The two don't conflict, nor are  
they completely redundant, but there is a lot of overlap.

As for user applications...I'm not sure what's best, here.  The PHY  
Lib doesn't provide its own mechanism, currently, for manipulating  
PHYs from user space.  The mii ioctl provides the necessary  
functionality, and if your ethernet driver supports it, then that  
will work.  The PHY Lib's mii ioctl implementation isn't well tested,  
and if you aren't using the extra functionality, there's no reason to  
use the PHY Lib.

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

end of thread, other threads:[~2007-03-27 16:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-26 20:55 Accessng phy registers DI BACCO ANTONIO - technolabs
2007-03-27  8:42 ` Alex Zeffertt
2007-03-27 16:37 ` Andy Fleming

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.