summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/ulp
diff options
context:
space:
mode:
authorKamal Heib <kamalheib1@gmail.com>2019-05-29 09:55:45 -0400
committerJason Gunthorpe <jgg@mellanox.com>2019-06-07 12:35:00 -0400
commit633fbb06cbb34cb37117a298c4316ad9d54a7a63 (patch)
treea6efea1348992e5f80fb65b3cf1262d727eb9173 /drivers/infiniband/ulp
parent97545b10221ad14b046dba135a37f4e98a560697 (diff)
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 <kamalheib1@gmail.com> Reviewed-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/ulp')
-rw-r--r--drivers/infiniband/ulp/ipoib/ipoib_ethtool.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c b/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
index 83429925dfc6..58016532bf86 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 = {
222 .get_strings = ipoib_get_strings, 222 .get_strings = ipoib_get_strings,
223 .get_ethtool_stats = ipoib_get_ethtool_stats, 223 .get_ethtool_stats = ipoib_get_ethtool_stats,
224 .get_sset_count = ipoib_get_sset_count, 224 .get_sset_count = ipoib_get_sset_count,
225 .get_link = ethtool_op_get_link,
225}; 226};
226 227
227void ipoib_set_ethtool_ops(struct net_device *dev) 228void ipoib_set_ethtool_ops(struct net_device *dev)