diff options
author | Dimitris Michailidis <dm@chelsio.com> | 2011-04-08 16:06:25 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-04-08 16:06:25 -0400 |
commit | c5e06360317d9c7a91de983749d136c4089e5379 (patch) | |
tree | 8e02b18452fa9e179525adffe1efc89145f33342 /drivers/net/cxgb4 | |
parent | 93ae653491f0a413d5f4d9aa4df45d09ecb55d62 (diff) |
cxgb4: drop phys_id interface and implement the newer set_phys_id
Signed-off-by: Dimitris Michailidis <dm@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/cxgb4')
-rw-r--r-- | drivers/net/cxgb4/cxgb4_main.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/drivers/net/cxgb4/cxgb4_main.c b/drivers/net/cxgb4/cxgb4_main.c index 5352c8a23f4d..0af9c9f0ca78 100644 --- a/drivers/net/cxgb4/cxgb4_main.c +++ b/drivers/net/cxgb4/cxgb4_main.c | |||
@@ -1336,15 +1336,20 @@ static int restart_autoneg(struct net_device *dev) | |||
1336 | return 0; | 1336 | return 0; |
1337 | } | 1337 | } |
1338 | 1338 | ||
1339 | static int identify_port(struct net_device *dev, u32 data) | 1339 | static int identify_port(struct net_device *dev, |
1340 | enum ethtool_phys_id_state state) | ||
1340 | { | 1341 | { |
1342 | unsigned int val; | ||
1341 | struct adapter *adap = netdev2adap(dev); | 1343 | struct adapter *adap = netdev2adap(dev); |
1342 | 1344 | ||
1343 | if (data == 0) | 1345 | if (state == ETHTOOL_ID_ACTIVE) |
1344 | data = 2; /* default to 2 seconds */ | 1346 | val = 0xffff; |
1347 | else if (state == ETHTOOL_ID_INACTIVE) | ||
1348 | val = 0; | ||
1349 | else | ||
1350 | return -EINVAL; | ||
1345 | 1351 | ||
1346 | return t4_identify_port(adap, adap->fn, netdev2pinfo(dev)->viid, | 1352 | return t4_identify_port(adap, adap->fn, netdev2pinfo(dev)->viid, val); |
1347 | data * 5); | ||
1348 | } | 1353 | } |
1349 | 1354 | ||
1350 | static unsigned int from_fw_linkcaps(unsigned int type, unsigned int caps) | 1355 | static unsigned int from_fw_linkcaps(unsigned int type, unsigned int caps) |
@@ -2011,7 +2016,7 @@ static struct ethtool_ops cxgb_ethtool_ops = { | |||
2011 | .set_sg = ethtool_op_set_sg, | 2016 | .set_sg = ethtool_op_set_sg, |
2012 | .get_link = ethtool_op_get_link, | 2017 | .get_link = ethtool_op_get_link, |
2013 | .get_strings = get_strings, | 2018 | .get_strings = get_strings, |
2014 | .phys_id = identify_port, | 2019 | .set_phys_id = identify_port, |
2015 | .nway_reset = restart_autoneg, | 2020 | .nway_reset = restart_autoneg, |
2016 | .get_sset_count = get_sset_count, | 2021 | .get_sset_count = get_sset_count, |
2017 | .get_ethtool_stats = get_stats, | 2022 | .get_ethtool_stats = get_stats, |