diff options
author | Divy Le Ray <divy@chelsio.com> | 2008-10-09 02:40:28 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-10-09 02:40:28 +0200 |
commit | 0ce2f03bade2046d6eb6184d52d065688382d7bd (patch) | |
tree | 14ed2f39e9d5ebeed655d7bc58c1e22dd6cfaa52 /drivers/net/cxgb3/t3_hw.c | |
parent | cxgb3: Support for Aeluros 2005 PHY (diff) | |
download | linux-0ce2f03bade2046d6eb6184d52d065688382d7bd.tar.xz linux-0ce2f03bade2046d6eb6184d52d065688382d7bd.zip |
cxgb3: Add 1G fiber support
Add support for 1G optical Vitesse PHY.
Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/cxgb3/t3_hw.c')
-rw-r--r-- | drivers/net/cxgb3/t3_hw.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/net/cxgb3/t3_hw.c b/drivers/net/cxgb3/t3_hw.c index 9d9c0bafb5c7..4da5b09b9bc2 100644 --- a/drivers/net/cxgb3/t3_hw.c +++ b/drivers/net/cxgb3/t3_hw.c @@ -408,6 +408,29 @@ int t3_phy_advertise(struct cphy *phy, unsigned int advert) } /** + * t3_phy_advertise_fiber - set fiber PHY advertisement register + * @phy: the PHY to operate on + * @advert: bitmap of capabilities the PHY should advertise + * + * Sets a fiber PHY's advertisement register to advertise the + * requested capabilities. + */ +int t3_phy_advertise_fiber(struct cphy *phy, unsigned int advert) +{ + unsigned int val = 0; + + if (advert & ADVERTISED_1000baseT_Half) + val |= ADVERTISE_1000XHALF; + if (advert & ADVERTISED_1000baseT_Full) + val |= ADVERTISE_1000XFULL; + if (advert & ADVERTISED_Pause) + val |= ADVERTISE_1000XPAUSE; + if (advert & ADVERTISED_Asym_Pause) + val |= ADVERTISE_1000XPSE_ASYM; + return mdio_write(phy, 0, MII_ADVERTISE, val); +} + +/** * t3_set_phy_speed_duplex - force PHY speed and duplex * @phy: the PHY to operate on * @speed: requested PHY speed |