diff options
Diffstat (limited to 'include/linux/phy.h')
-rw-r--r-- | include/linux/phy.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/include/linux/phy.h b/include/linux/phy.h index 14d7fdf6a90a..d9bce4b526b4 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h | |||
@@ -81,6 +81,10 @@ typedef enum { | |||
81 | */ | 81 | */ |
82 | #define MII_BUS_ID_SIZE (20 - 3) | 82 | #define MII_BUS_ID_SIZE (20 - 3) |
83 | 83 | ||
84 | /* Or MII_ADDR_C45 into regnum for read/write on mii_bus to enable the 21 bit | ||
85 | IEEE 802.3ae clause 45 addressing mode used by 10GIGE phy chips. */ | ||
86 | #define MII_ADDR_C45 (1<<30) | ||
87 | |||
84 | /* | 88 | /* |
85 | * The Bus class for PHYs. Devices which provide access to | 89 | * The Bus class for PHYs. Devices which provide access to |
86 | * PHYs should register using this structure | 90 | * PHYs should register using this structure |
@@ -127,8 +131,8 @@ int mdiobus_register(struct mii_bus *bus); | |||
127 | void mdiobus_unregister(struct mii_bus *bus); | 131 | void mdiobus_unregister(struct mii_bus *bus); |
128 | void mdiobus_free(struct mii_bus *bus); | 132 | void mdiobus_free(struct mii_bus *bus); |
129 | struct phy_device *mdiobus_scan(struct mii_bus *bus, int addr); | 133 | struct phy_device *mdiobus_scan(struct mii_bus *bus, int addr); |
130 | int mdiobus_read(struct mii_bus *bus, int addr, u16 regnum); | 134 | int mdiobus_read(struct mii_bus *bus, int addr, u32 regnum); |
131 | int mdiobus_write(struct mii_bus *bus, int addr, u16 regnum, u16 val); | 135 | int mdiobus_write(struct mii_bus *bus, int addr, u32 regnum, u16 val); |
132 | 136 | ||
133 | 137 | ||
134 | #define PHY_INTERRUPT_DISABLED 0x0 | 138 | #define PHY_INTERRUPT_DISABLED 0x0 |
@@ -422,7 +426,7 @@ struct phy_fixup { | |||
422 | * because the bus read/write functions may wait for an interrupt | 426 | * because the bus read/write functions may wait for an interrupt |
423 | * to conclude the operation. | 427 | * to conclude the operation. |
424 | */ | 428 | */ |
425 | static inline int phy_read(struct phy_device *phydev, u16 regnum) | 429 | static inline int phy_read(struct phy_device *phydev, u32 regnum) |
426 | { | 430 | { |
427 | return mdiobus_read(phydev->bus, phydev->addr, regnum); | 431 | return mdiobus_read(phydev->bus, phydev->addr, regnum); |
428 | } | 432 | } |
@@ -437,7 +441,7 @@ static inline int phy_read(struct phy_device *phydev, u16 regnum) | |||
437 | * because the bus read/write functions may wait for an interrupt | 441 | * because the bus read/write functions may wait for an interrupt |
438 | * to conclude the operation. | 442 | * to conclude the operation. |
439 | */ | 443 | */ |
440 | static inline int phy_write(struct phy_device *phydev, u16 regnum, u16 val) | 444 | static inline int phy_write(struct phy_device *phydev, u32 regnum, u16 val) |
441 | { | 445 | { |
442 | return mdiobus_write(phydev->bus, phydev->addr, regnum, val); | 446 | return mdiobus_write(phydev->bus, phydev->addr, regnum, val); |
443 | } | 447 | } |