mirror of
https://github.com/ipxe/ipxe
synced 2026-01-03 02:13:23 +03:00
[mii] Separate concepts of MII interface and MII device
We currently have no generic concept of a PHY address, since all existing implementations simply hardcode the PHY address within the MII access methods. A bit-bashing MII interface will need to be provided with an explicit PHY address in order to generate the correct waveform. Allow for this by separating out the concept of a MII device (i.e. a specific PHY address attached to a particular MII interface). Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -37,10 +37,10 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
|
||||
/**
|
||||
* Restart autonegotiation
|
||||
*
|
||||
* @v mii MII interface
|
||||
* @v mii MII device
|
||||
* @ret rc Return status code
|
||||
*/
|
||||
int mii_restart ( struct mii_interface *mii ) {
|
||||
int mii_restart ( struct mii_device *mii ) {
|
||||
int bmcr;
|
||||
int rc;
|
||||
|
||||
@@ -66,12 +66,12 @@ int mii_restart ( struct mii_interface *mii ) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Reset MII interface
|
||||
* Reset MII device
|
||||
*
|
||||
* @v mii MII interface
|
||||
* @v mii MII device
|
||||
* @ret rc Return status code
|
||||
*/
|
||||
int mii_reset ( struct mii_interface *mii ) {
|
||||
int mii_reset ( struct mii_device *mii ) {
|
||||
unsigned int i;
|
||||
int bmcr;
|
||||
int rc;
|
||||
@@ -119,11 +119,11 @@ int mii_reset ( struct mii_interface *mii ) {
|
||||
/**
|
||||
* Update link status via MII
|
||||
*
|
||||
* @v mii MII interface
|
||||
* @v mii MII device
|
||||
* @v netdev Network device
|
||||
* @ret rc Return status code
|
||||
*/
|
||||
int mii_check_link ( struct mii_interface *mii, struct net_device *netdev ) {
|
||||
int mii_check_link ( struct mii_device *mii, struct net_device *netdev ) {
|
||||
int bmsr;
|
||||
int link;
|
||||
int rc;
|
||||
|
||||
Reference in New Issue
Block a user