aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/apm
diff options
context:
space:
mode:
authorIyappan Subramanian <isubramanian@apm.com>2014-10-13 20:05:35 -0400
committerDavid S. Miller <davem@davemloft.net>2014-10-14 16:09:22 -0400
commit5e6a024bebea5bad6b787cf2c0ee28116b4147f0 (patch)
tree411fe9bb6ccca8bc20a60c8c387ea409c223b9e2 /drivers/net/ethernet/apm
parent32f784b50e14c653ad0f010fbd5921a5f8caf846 (diff)
drivers: net: xgene: Add SGMII based 1GbE ethtool support
Signed-off-by: Iyappan Subramanian <isubramanian@apm.com> Signed-off-by: Keyur Chudgar <kchudgar@apm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/apm')
-rw-r--r--drivers/net/ethernet/apm/xgene/xgene_enet_ethtool.c25
1 files changed, 17 insertions, 8 deletions
diff --git a/drivers/net/ethernet/apm/xgene/xgene_enet_ethtool.c b/drivers/net/ethernet/apm/xgene/xgene_enet_ethtool.c
index c1c997b92342..416d6ebfc2ce 100644
--- a/drivers/net/ethernet/apm/xgene/xgene_enet_ethtool.c
+++ b/drivers/net/ethernet/apm/xgene/xgene_enet_ethtool.c
@@ -64,16 +64,25 @@ static int xgene_get_settings(struct net_device *ndev, struct ethtool_cmd *cmd)
64 return -ENODEV; 64 return -ENODEV;
65 65
66 return phy_ethtool_gset(phydev, cmd); 66 return phy_ethtool_gset(phydev, cmd);
67 } else if (pdata->phy_mode == PHY_INTERFACE_MODE_SGMII) {
68 cmd->supported = SUPPORTED_1000baseT_Full |
69 SUPPORTED_Autoneg | SUPPORTED_MII;
70 cmd->advertising = cmd->supported;
71 ethtool_cmd_speed_set(cmd, SPEED_1000);
72 cmd->duplex = DUPLEX_FULL;
73 cmd->port = PORT_MII;
74 cmd->transceiver = XCVR_INTERNAL;
75 cmd->autoneg = AUTONEG_ENABLE;
76 } else {
77 cmd->supported = SUPPORTED_10000baseT_Full | SUPPORTED_FIBRE;
78 cmd->advertising = cmd->supported;
79 ethtool_cmd_speed_set(cmd, SPEED_10000);
80 cmd->duplex = DUPLEX_FULL;
81 cmd->port = PORT_FIBRE;
82 cmd->transceiver = XCVR_INTERNAL;
83 cmd->autoneg = AUTONEG_DISABLE;
67 } 84 }
68 85
69 cmd->supported = SUPPORTED_10000baseT_Full | SUPPORTED_FIBRE;
70 cmd->advertising = cmd->supported;
71 ethtool_cmd_speed_set(cmd, SPEED_10000);
72 cmd->duplex = DUPLEX_FULL;
73 cmd->port = PORT_FIBRE;
74 cmd->transceiver = XCVR_EXTERNAL;
75 cmd->autoneg = AUTONEG_DISABLE;
76
77 return 0; 86 return 0;
78} 87}
79 88