Skip to contentSkip to conversation

infiniband-diags: move is_mlnx_ext_port_info_supported to common code

PATCH New Ira Weiny 1 participant 1 message Dec 2, 2011 InfiniBand

lore
Share & tools
lore

Ira Weiny

author
#0 lore raw

PATCH 1/3 infiniband-diags: move is_mlnx_ext_port_info_supported to common code

---
 include/ibdiag_common.h |    2 ++
 src/ibdiag_common.c     |    9 +++++++++
 src/ibportstate.c       |    9 ---------
 3 files changed, 11 insertions(+), 9 deletions(-)
include/ibdiag_common.h +2 -0
index 6586cc6..1d8cdc7 100644
@@ -93,6 +93,8 @@ extern void iberror(const char *fn, char *msg, ...);
  */
 extern char *conv_cnt_human_readable(uint64_t val64, float *val, int data);
 
+int is_mlnx_ext_port_info_supported(uint32_t devid);
+
 /* define an SA query structure to be common
  * This is by no means optimal but it moves the saquery functionality out of
  * the saquery tool and provides it to other utilities.
src/ibdiag_common.c +9 -0
index 81d7878..e7c514a 100644
@@ -455,6 +455,15 @@ conv_cnt_human_readable(uint64_t val64, float *val, int data)
 	return ("");
 }
 
+int is_mlnx_ext_port_info_supported(uint32_t devid)
+{
+	if (devid == 0xc738)
+		return 1;
+	if (devid >= 0x1003 && devid <= 0x1010)
+		return 1;
+	return 0;
+}
+
 /* define a common SA query structure
  * This is by no means optimal but it moves the saquery functionality out of
  * the saquery tool and provides it to other utilities.
src/ibportstate.c +0 -9
index daa8514..ec6b823 100644
@@ -121,15 +121,6 @@ static int get_node_info(ib_portid_t * dest, uint8_t * data)
 		return 0;
 }
 
-static int is_mlnx_ext_port_info_supported(uint32_t devid)
-{
-	if (devid == 0xc738)
-		return 1;
-	if (devid >= 0x1003 && devid <= 0x1010)
-		return 1;
-	return 0;
-}
-
 static int get_port_info(ib_portid_t * dest, uint8_t * data, int portnum,
 			 int is_switch)
 {
Signature · 6 lines
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html