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>
This commit is contained in:
parent
93ae653491
commit
c5e0636031
|
@ -1336,15 +1336,20 @@ static int restart_autoneg(struct net_device *dev)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int identify_port(struct net_device *dev, u32 data)
|
static int identify_port(struct net_device *dev,
|
||||||
|
enum ethtool_phys_id_state state)
|
||||||
{
|
{
|
||||||
|
unsigned int val;
|
||||||
struct adapter *adap = netdev2adap(dev);
|
struct adapter *adap = netdev2adap(dev);
|
||||||
|
|
||||||
if (data == 0)
|
if (state == ETHTOOL_ID_ACTIVE)
|
||||||
data = 2; /* default to 2 seconds */
|
val = 0xffff;
|
||||||
|
else if (state == ETHTOOL_ID_INACTIVE)
|
||||||
|
val = 0;
|
||||||
|
else
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
return t4_identify_port(adap, adap->fn, netdev2pinfo(dev)->viid,
|
return t4_identify_port(adap, adap->fn, netdev2pinfo(dev)->viid, val);
|
||||||
data * 5);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static unsigned int from_fw_linkcaps(unsigned int type, unsigned int caps)
|
static unsigned int from_fw_linkcaps(unsigned int type, unsigned int caps)
|
||||||
|
@ -2011,7 +2016,7 @@ static struct ethtool_ops cxgb_ethtool_ops = {
|
||||||
.set_sg = ethtool_op_set_sg,
|
.set_sg = ethtool_op_set_sg,
|
||||||
.get_link = ethtool_op_get_link,
|
.get_link = ethtool_op_get_link,
|
||||||
.get_strings = get_strings,
|
.get_strings = get_strings,
|
||||||
.phys_id = identify_port,
|
.set_phys_id = identify_port,
|
||||||
.nway_reset = restart_autoneg,
|
.nway_reset = restart_autoneg,
|
||||||
.get_sset_count = get_sset_count,
|
.get_sset_count = get_sset_count,
|
||||||
.get_ethtool_stats = get_stats,
|
.get_ethtool_stats = get_stats,
|
||||||
|
|
Reference in New Issue