Skip to content

Commit 857a3d0

Browse files
Dimitris Michailidisdavem330
authored andcommitted
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>
1 parent c5e0636 commit 857a3d0

1 file changed

Lines changed: 12 additions & 3 deletions

File tree

‎drivers/net/cxgb4vf/cxgb4vf_main.c‎

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1352,11 +1352,20 @@ static int cxgb4vf_set_rx_csum(struct net_device *dev, u32 csum)
13521352
/*
13531353
* Identify the port by blinking the port's LED.
13541354
*/
1355-
static int cxgb4vf_phys_id(struct net_device *dev, u32 id)
1355+
static int cxgb4vf_phys_id(struct net_device *dev,
1356+
enum ethtool_phys_id_state state)
13561357
{
1358+
unsigned int val;
13571359
struct port_info *pi = netdev_priv(dev);
13581360

1359-
return t4vf_identify_port(pi->adapter, pi->viid, 5);
1361+
if (state == ETHTOOL_ID_ACTIVE)
1362+
val = 0xffff;
1363+
else if (state == ETHTOOL_ID_INACTIVE)
1364+
val = 0;
1365+
else
1366+
return -EINVAL;
1367+
1368+
return t4vf_identify_port(pi->adapter, pi->viid, val);
13601369
}
13611370

13621371
/*
@@ -1588,7 +1597,7 @@ static struct ethtool_ops cxgb4vf_ethtool_ops = {
15881597
.set_sg = ethtool_op_set_sg,
15891598
.get_link = ethtool_op_get_link,
15901599
.get_strings = cxgb4vf_get_strings,
1591-
.phys_id = cxgb4vf_phys_id,
1600+
.set_phys_id = cxgb4vf_phys_id,
15921601
.get_sset_count = cxgb4vf_get_sset_count,
15931602
.get_ethtool_stats = cxgb4vf_get_ethtool_stats,
15941603
.get_regs_len = cxgb4vf_get_regs_len,

0 commit comments

Comments
 (0)