Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Hermann Lauer and committed by
David S. Miller
fbf0229e 8d3a564d

+15
+15
drivers/net/sungem.c
··· 2697 2697 cmd->speed = 0; 2698 2698 cmd->duplex = cmd->port = cmd->phy_address = 2699 2699 cmd->transceiver = cmd->autoneg = 0; 2700 + 2701 + /* serdes means usually a Fibre connector, with most fixed */ 2702 + if (gp->phy_type == phy_serdes) { 2703 + cmd->port = PORT_FIBRE; 2704 + cmd->supported = (SUPPORTED_1000baseT_Half | 2705 + SUPPORTED_1000baseT_Full | 2706 + SUPPORTED_FIBRE | SUPPORTED_Autoneg | 2707 + SUPPORTED_Pause | SUPPORTED_Asym_Pause); 2708 + cmd->advertising = cmd->supported; 2709 + cmd->transceiver = XCVR_INTERNAL; 2710 + if (gp->lstate == link_up) 2711 + cmd->speed = SPEED_1000; 2712 + cmd->duplex = DUPLEX_FULL; 2713 + cmd->autoneg = 1; 2714 + } 2700 2715 } 2701 2716 cmd->maxtxpkt = cmd->maxrxpkt = 0; 2702 2717