From: kernelnewbies-bounces@xxxxxxxxxxxxxxxxx [mailto:kernelnewbies-bounces@xxxxxxxxxxxxxxxxx] On Behalf Of bill Sent: Thursday, July 14, 2011 2:09 AM To: kernelnewbies Subject: Puzzled about MDIO issue Hi, All
I've been reading MDIO code, tiny though but it still puzzled me for its usage. MDIO is an hardware interface for the MAC to set/get PHY configuration/status.
Linux manipulates MDIO through: struct net_device ->do_ioctl -> mdio_mii_ioctl -> mdio_read/mdio_write
Question: A: Turn an NIC from cold state to running state, is this ioctl must be used to configure the PHY? If so , how?
B: what's the usage of this net device ioctl? I found an user-space package mii-tool create a socket first and then use the socket handle for ioctl to query lots of PHY information. Is there any other typical usage of it?
thanks bill
mii-tool and the ioctls that go with it are long deprecated. These days they can be useful for debugging, but that’s about it. Modern Linux Ethernet drivers implement support for the ETHTOOL ioctls which are generated using the ethtool application. Usage of mii-tool and its ioctls with modern drivers is likely to cause you problems as mii-tool can put the PHY into a state that is out of sync with how the driver thinks it should be configured. Jeff Haran |
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies