From 633fbb06cbb34cb37117a298c4316ad9d54a7a63 Mon Sep 17 00:00:00 2001 From: Kamal Heib Date: Wed, 29 May 2019 16:55:45 +0300 Subject: [PATCH] RDMA/ipoib: implement ethtool .get_link() callback Add support for reporting link state for ipoib net devices. $ ip l set dev mlx4_ib0 up $ ethtool mlx4_ib0 | grep Link Link detected: yes $ ip l set dev mlx4_ib0 down $ ethtool mlx4_ib0 | grep Link Link detected: no Signed-off-by: Kamal Heib Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe --- drivers/infiniband/ulp/ipoib/ipoib_ethtool.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c b/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c index 8342992..5801653 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c @@ -222,6 +222,7 @@ static const struct ethtool_ops ipoib_ethtool_ops = { .get_strings = ipoib_get_strings, .get_ethtool_stats = ipoib_get_ethtool_stats, .get_sset_count = ipoib_get_sset_count, + .get_link = ethtool_op_get_link, }; void ipoib_set_ethtool_ops(struct net_device *dev) -- 2.7.4