summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorHermann Lauer <Hermann.Lauer@iwr.uni-heidelberg.de>2008-12-09 15:39:14 -0800
committerDavid S. Miller <davem@davemloft.net>2008-12-09 15:39:14 -0800
commitfbf0229e946deb9e6c711f9eaa5c8d670c3a28fd (patch)
tree37f75559c8dab1e16d3659d3023235043338c7d5 /drivers
parent8d3a564da34e5844aca4f991b73f8ca512246b23 (diff)
downloadop-kernel-dev-fbf0229e946deb9e6c711f9eaa5c8d670c3a28fd.zip
op-kernel-dev-fbf0229e946deb9e6c711f9eaa5c8d670c3a28fd.tar.gz
sungem: improve ethtool output with internal pcs and serdes
From: Hermann Lauer <Hermann.Lauer@iwr.uni-heidelberg.de> Attached is a patch which improves the output of ethtool (see below) to some sensefull values with a sungem fibre card which uses the sungem interal pcs connected to a serdes chip. The seriallink case in the driver is untouched. Most values are hardcoded, because gigabit fibre autoneg is anyways limited and the driver don't really support much at the moment with that hardware. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/sungem.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/net/sungem.c b/drivers/net/sungem.c
index bb7a478..fed7eba 100644
--- a/drivers/net/sungem.c
+++ b/drivers/net/sungem.c
@@ -2697,6 +2697,21 @@ static int gem_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
cmd->speed = 0;
cmd->duplex = cmd->port = cmd->phy_address =
cmd->transceiver = cmd->autoneg = 0;
+
+ /* serdes means usually a Fibre connector, with most fixed */
+ if (gp->phy_type == phy_serdes) {
+ cmd->port = PORT_FIBRE;
+ cmd->supported = (SUPPORTED_1000baseT_Half |
+ SUPPORTED_1000baseT_Full |
+ SUPPORTED_FIBRE | SUPPORTED_Autoneg |
+ SUPPORTED_Pause | SUPPORTED_Asym_Pause);
+ cmd->advertising = cmd->supported;
+ cmd->transceiver = XCVR_INTERNAL;
+ if (gp->lstate == link_up)
+ cmd->speed = SPEED_1000;
+ cmd->duplex = DUPLEX_FULL;
+ cmd->autoneg = 1;
+ }
}
cmd->maxtxpkt = cmd->maxrxpkt = 0;
OpenPOWER on IntegriCloud