diff options
author | Dimitris Michailidis <dm@chelsio.com> | 2011-04-08 13:07:08 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-04-08 13:07:08 -0700 |
commit | 857a3d0fb648b450de4a87cc2df9055774cafd2d (patch) | |
tree | a2eb6baa4e7c762dc730ba7b060307e09fc5a31e /drivers | |
parent | c5e06360317d9c7a91de983749d136c4089e5379 (diff) | |
download | kernel-common-857a3d0fb648b450de4a87cc2df9055774cafd2d.tar.gz kernel-common-857a3d0fb648b450de4a87cc2df9055774cafd2d.tar.bz2 kernel-common-857a3d0fb648b450de4a87cc2df9055774cafd2d.zip |
cxgb4vf: 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')
-rw-r--r-- | drivers/net/cxgb4vf/cxgb4vf_main.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/drivers/net/cxgb4vf/cxgb4vf_main.c b/drivers/net/cxgb4vf/cxgb4vf_main.c index 6aad64df4dcb..b0d037ea367d 100644 --- a/drivers/net/cxgb4vf/cxgb4vf_main.c +++ b/drivers/net/cxgb4vf/cxgb4vf_main.c @@ -1352,11 +1352,20 @@ static int cxgb4vf_set_rx_csum(struct net_device *dev, u32 csum) /* * Identify the port by blinking the port's LED. */ -static int cxgb4vf_phys_id(struct net_device *dev, u32 id) +static int cxgb4vf_phys_id(struct net_device *dev, + enum ethtool_phys_id_state state) { + unsigned int val; struct port_info *pi = netdev_priv(dev); - return t4vf_identify_port(pi->adapter, pi->viid, 5); + if (state == ETHTOOL_ID_ACTIVE) + val = 0xffff; + else if (state == ETHTOOL_ID_INACTIVE) + val = 0; + else + return -EINVAL; + + return t4vf_identify_port(pi->adapter, pi->viid, val); } /* @@ -1588,7 +1597,7 @@ static struct ethtool_ops cxgb4vf_ethtool_ops = { .set_sg = ethtool_op_set_sg, .get_link = ethtool_op_get_link, .get_strings = cxgb4vf_get_strings, - .phys_id = cxgb4vf_phys_id, + .set_phys_id = cxgb4vf_phys_id, .get_sset_count = cxgb4vf_get_sset_count, .get_ethtool_stats = cxgb4vf_get_ethtool_stats, .get_regs_len = cxgb4vf_get_regs_len, |