diff options
author | Greg KH <greg@press.(none)> | 2005-10-28 13:13:16 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2005-10-28 13:13:16 -0400 |
commit | 6fbfddcb52d8d9fa2cd209f5ac2a1c87497d55b5 (patch) | |
tree | c0414e89678fcef7ce3493e048d855bde781ae8d /drivers/net/mii.c | |
parent | 1a222bca26ca691e83be1b08f5e96ae96d0d8cae (diff) | |
parent | 27d1097d39509494706eaa2620ef3b1e780a3224 (diff) |
Merge ../bleed-2.6
Diffstat (limited to 'drivers/net/mii.c')
-rw-r--r-- | drivers/net/mii.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/net/mii.c b/drivers/net/mii.c index c33cb3dc942b..e42aa797f08b 100644 --- a/drivers/net/mii.c +++ b/drivers/net/mii.c | |||
@@ -207,6 +207,20 @@ int mii_ethtool_sset(struct mii_if_info *mii, struct ethtool_cmd *ecmd) | |||
207 | return 0; | 207 | return 0; |
208 | } | 208 | } |
209 | 209 | ||
210 | int mii_check_gmii_support(struct mii_if_info *mii) | ||
211 | { | ||
212 | int reg; | ||
213 | |||
214 | reg = mii->mdio_read(mii->dev, mii->phy_id, MII_BMSR); | ||
215 | if (reg & BMSR_ESTATEN) { | ||
216 | reg = mii->mdio_read(mii->dev, mii->phy_id, MII_ESTATUS); | ||
217 | if (reg & (ESTATUS_1000_TFULL | ESTATUS_1000_THALF)) | ||
218 | return 1; | ||
219 | } | ||
220 | |||
221 | return 0; | ||
222 | } | ||
223 | |||
210 | int mii_link_ok (struct mii_if_info *mii) | 224 | int mii_link_ok (struct mii_if_info *mii) |
211 | { | 225 | { |
212 | /* first, a dummy read, needed to latch some MII phys */ | 226 | /* first, a dummy read, needed to latch some MII phys */ |
@@ -394,5 +408,6 @@ EXPORT_SYMBOL(mii_ethtool_gset); | |||
394 | EXPORT_SYMBOL(mii_ethtool_sset); | 408 | EXPORT_SYMBOL(mii_ethtool_sset); |
395 | EXPORT_SYMBOL(mii_check_link); | 409 | EXPORT_SYMBOL(mii_check_link); |
396 | EXPORT_SYMBOL(mii_check_media); | 410 | EXPORT_SYMBOL(mii_check_media); |
411 | EXPORT_SYMBOL(mii_check_gmii_support); | ||
397 | EXPORT_SYMBOL(generic_mii_ioctl); | 412 | EXPORT_SYMBOL(generic_mii_ioctl); |
398 | 413 | ||