diff options
author | Jens Osterkamp <jens@de.ibm.com> | 2007-02-20 23:30:50 +0100 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-02-27 10:16:02 +0100 |
commit | eb5b5b2ff96e8f3a42a46378968a166bb56bd900 (patch) | |
tree | 8293f3718c436078af6108e13ffc8d965c5a39ec /drivers/net/sungem_phy.h | |
parent | forcedeth: fix checksum feature in mcp65 (diff) | |
download | linux-eb5b5b2ff96e8f3a42a46378968a166bb56bd900.tar.xz linux-eb5b5b2ff96e8f3a42a46378968a166bb56bd900.zip |
sungem_phy: support bcm5461 phy, autoneg.
This version moves the medium variable to the card specific structure and
changes the GMII_* to BCM54XX_* #defines.
This patch adds improved version of enable_fiber for both the 5421 and
the 5461 phy. It is now possible to specify with these wether you want
autonegotiation or not. This is needed for bladecenter switches where
some expect autonegotiation and some dont seem to like this at all.
Depending on this flag it sets phy->autoneg accordingly for the fiber mode.
More importantly it implements proper read_link and poll_link functions
for both phys which can handle both copper and fiber mode by determining
the medium first and then branching to the required functions. For fiber
they all work fine, for copper they are not tested but return the result
of the genmii_* function anyway which is supposed to work.
The patch moves the genmii_* functions around to avoid foreward declarations.
Signed-off-by: Jens Osterkamp <jens@de.ibm.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/sungem_phy.h')
-rw-r--r-- | drivers/net/sungem_phy.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/net/sungem_phy.h b/drivers/net/sungem_phy.h index 1d70ba6f9f10..af02f9479cbb 100644 --- a/drivers/net/sungem_phy.h +++ b/drivers/net/sungem_phy.h @@ -12,7 +12,7 @@ struct mii_phy_ops int (*setup_forced)(struct mii_phy *phy, int speed, int fd); int (*poll_link)(struct mii_phy *phy); int (*read_link)(struct mii_phy *phy); - int (*enable_fiber)(struct mii_phy *phy); + int (*enable_fiber)(struct mii_phy *phy, int autoneg); }; /* Structure used to statically define an mii/gii based PHY */ @@ -26,6 +26,14 @@ struct mii_phy_def const struct mii_phy_ops* ops; }; +enum { + BCM54XX_COPPER, + BCM54XX_FIBER, + BCM54XX_GBIC, + BCM54XX_SGMII, + BCM54XX_UNKNOWN, +}; + /* An instance of a PHY, partially borrowed from mii_if_info */ struct mii_phy { |