diff options
author | Divy Le Ray <divy@chelsio.com> | 2008-10-08 20:40:07 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-10-08 20:40:07 -0400 |
commit | 1e8820256f9921370cd7423396871e2d850e0323 (patch) | |
tree | 903d42f7d83b2b90ff7fd42523231a0e1862a797 /drivers/net/cxgb3/cxgb3_main.c | |
parent | 9b1e36566c5fafbcc732c971acfcf8580332931a (diff) |
cxgb3: Support for Aeluros 2005 PHY
Add support for SR PHY.
Auto-detect phy module type, and report type changes.
Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/cxgb3/cxgb3_main.c')
-rw-r--r-- | drivers/net/cxgb3/cxgb3_main.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/drivers/net/cxgb3/cxgb3_main.c b/drivers/net/cxgb3/cxgb3_main.c index bddcf945d6bb..f31985df0bb9 100644 --- a/drivers/net/cxgb3/cxgb3_main.c +++ b/drivers/net/cxgb3/cxgb3_main.c | |||
@@ -208,6 +208,31 @@ void t3_os_link_changed(struct adapter *adapter, int port_id, int link_stat, | |||
208 | } | 208 | } |
209 | } | 209 | } |
210 | 210 | ||
211 | /** | ||
212 | * t3_os_phymod_changed - handle PHY module changes | ||
213 | * @phy: the PHY reporting the module change | ||
214 | * @mod_type: new module type | ||
215 | * | ||
216 | * This is the OS-dependent handler for PHY module changes. It is | ||
217 | * invoked when a PHY module is removed or inserted for any OS-specific | ||
218 | * processing. | ||
219 | */ | ||
220 | void t3_os_phymod_changed(struct adapter *adap, int port_id) | ||
221 | { | ||
222 | static const char *mod_str[] = { | ||
223 | NULL, "SR", "LR", "LRM", "TWINAX", "TWINAX", "unknown" | ||
224 | }; | ||
225 | |||
226 | const struct net_device *dev = adap->port[port_id]; | ||
227 | const struct port_info *pi = netdev_priv(dev); | ||
228 | |||
229 | if (pi->phy.modtype == phy_modtype_none) | ||
230 | printk(KERN_INFO "%s: PHY module unplugged\n", dev->name); | ||
231 | else | ||
232 | printk(KERN_INFO "%s: %s PHY module inserted\n", dev->name, | ||
233 | mod_str[pi->phy.modtype]); | ||
234 | } | ||
235 | |||
211 | static void cxgb_set_rxmode(struct net_device *dev) | 236 | static void cxgb_set_rxmode(struct net_device *dev) |
212 | { | 237 | { |
213 | struct t3_rx_mode rm; | 238 | struct t3_rx_mode rm; |