diff options
author | Divy Le Ray <divy@chelsio.com> | 2008-10-08 17:40:07 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-10-08 17:40:07 -0700 |
commit | 1e8820256f9921370cd7423396871e2d850e0323 (patch) | |
tree | 903d42f7d83b2b90ff7fd42523231a0e1862a797 /drivers/net/cxgb3/cxgb3_main.c | |
parent | 9b1e36566c5fafbcc732c971acfcf8580332931a (diff) | |
download | op-kernel-dev-1e8820256f9921370cd7423396871e2d850e0323.zip op-kernel-dev-1e8820256f9921370cd7423396871e2d850e0323.tar.gz |
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 bddcf94..f31985d 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, } } +/** + * t3_os_phymod_changed - handle PHY module changes + * @phy: the PHY reporting the module change + * @mod_type: new module type + * + * This is the OS-dependent handler for PHY module changes. It is + * invoked when a PHY module is removed or inserted for any OS-specific + * processing. + */ +void t3_os_phymod_changed(struct adapter *adap, int port_id) +{ + static const char *mod_str[] = { + NULL, "SR", "LR", "LRM", "TWINAX", "TWINAX", "unknown" + }; + + const struct net_device *dev = adap->port[port_id]; + const struct port_info *pi = netdev_priv(dev); + + if (pi->phy.modtype == phy_modtype_none) + printk(KERN_INFO "%s: PHY module unplugged\n", dev->name); + else + printk(KERN_INFO "%s: %s PHY module inserted\n", dev->name, + mod_str[pi->phy.modtype]); +} + static void cxgb_set_rxmode(struct net_device *dev) { struct t3_rx_mode rm; |