From b9de7e6eda04cecaff6735a60c7fe7f488fdccf1 Mon Sep 17 00:00:00 2001 From: Christian Iversen Date: Wed, 27 Jan 2021 00:43:51 +0100 Subject: [infiniband] Require drivers to specify the number of ports Require drivers to report the total number of Infiniband ports. This is necessary to report the correct number of ports on devices with dynamic port types. For example, dual-port Mellanox cards configured for (eth, ib) would be rejected by the subnet manager, because they report using "port 2, out of 1". Signed-off-by: Christian Iversen --- src/net/infiniband.c | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'src/net/infiniband.c') diff --git a/src/net/infiniband.c b/src/net/infiniband.c index 3b79a660c..e19e121c1 100644 --- a/src/net/infiniband.c +++ b/src/net/infiniband.c @@ -813,26 +813,6 @@ void ib_mcast_detach ( struct ib_device *ibdev, struct ib_queue_pair *qp, *************************************************************************** */ -/** - * Count Infiniband HCA ports - * - * @v ibdev Infiniband device - * @ret num_ports Number of ports - */ -int ib_count_ports ( struct ib_device *ibdev ) { - struct ib_device *tmp; - int num_ports = 0; - - /* Search for IB devices with the same physical device to - * identify port count. - */ - for_each_ibdev ( tmp ) { - if ( tmp->dev == ibdev->dev ) - num_ports++; - } - return num_ports; -} - /** * Set port information * -- cgit v1.2.3-55-g7522