Skip to contentSkip to conversation

Align infiniband-diags MLNX device IDs with OpenSM

PATCH Applied Hal Rosenstock 2 participants 2 messages Jan 28, 2015 – Feb 7, 2015 1 message not in the archive InfiniBand

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Align infiniband-diags MLNX device IDs with OpenSM

Same device IDs as in opensm/osm_subnet.c:is_mlnx_ext_port_info_supported

Switch-IB is device ID 0xcb20 rather than 0xcb84

---

libibnetdisc/src/ibnetdisc.c +1 -1
index f3c6000..e346905 100644
@@ -203,7 +203,7 @@ static int is_mlnx_ext_port_info_supported(ibnd_port_t * port)
 {
 	uint16_t devid = (uint16_t) mad_get_field(port->node->info, 0, IB_NODE_DEVID_F);
 
-	if (devid == 0xc738 || devid == 0xcb84)
+	if ((devid >= 0xc738 && devid <= 0xc73b) || devid == 0xcb20)
 		return 1;
 	if (devid >= 0x1003 && devid <= 0x1016)
 		return 1;
src/ibdiag_common.c +1 -1
index 666edbc..e09623d 100644
@@ -530,7 +530,7 @@ int is_port_info_extended_supported(ib_portid_t * dest, int port,
 int is_mlnx_ext_port_info_supported(uint32_t devid)
 {
 	if (ibd_ibnetdisc_flags & IBND_CONFIG_MLX_EPI) {
-		if (devid == 0xc738 || devid == 0xcb84)
+		if ((devid >= 0xc738 && devid <= 0xc73b) || devid == 0xcb20)
 			return 1;
 		if (devid >= 0x1003 && devid <= 0x1016)
 			return 1;
src/vendstat.c +2 -2
index 7fc4a11..11ee73e 100644
@@ -144,8 +144,8 @@ typedef struct {
 
 static uint16_t ext_fw_info_device[][2] = {
 	{0x0245, 0x0245},	/* Switch-X */
-	{0xc738, 0xc738},	/* Switch-X */
-	{0xcb84, 0xcb84},	/* Switch-IB */
+	{0xc738, 0xc73b},	/* Switch-X */
+	{0xcb20, 0xcb20},	/* Switch-IB */
 	{0x01b3, 0x01b3},	/* IS-4 */
 	{0x1003, 0x1016},	/* Connect-X */
 	{0x0000, 0x0000}};

--
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

A message that is not in the archive (sent off-list or not yet received): [email protected]

Applied
#2 lore raw
Quoted 7 lines

Same device IDs as in opensm/osm_subnet.c:is_mlnx_ext_port_info_supported

Switch-IB is device ID 0xcb20 rather than 0xcb84

Thanks applied,
Ira

Quoted 31 lines

---

libibnetdisc/src/ibnetdisc.c index renamed from libibnetdisc/src/ibnetdisc.c +0 -0

f3c6000..e346905 100644

libibnetdisc/src/ibnetdisc.c +1 -1
@@ -203,7 +203,7 @@ static int is_mlnx_ext_port_info_supported(ibnd_port_t
 * port)  {
 	uint16_t devid = (uint16_t) mad_get_field(port->node->info, 0,
 IB_NODE_DEVID_F);
 
-	if (devid == 0xc738 || devid == 0xcb84)
+	if ((devid >= 0xc738 && devid <= 0xc73b) || devid == 0xcb20)
 		return 1;
 	if (devid >= 0x1003 && devid <= 0x1016)
libibnetdisc/src/ibnetdisc.c +0 -0
 		return 1;
src/ibdiag_common.c index renamed from src/ibdiag_common.c +0 -0

666edbc..e09623d 100644

src/ibdiag_common.c +1 -1
@@ -530,7 +530,7 @@ int is_port_info_extended_supported(ib_portid_t *
 dest, int port,  int is_mlnx_ext_port_info_supported(uint32_t devid)  {
 	if (ibd_ibnetdisc_flags & IBND_CONFIG_MLX_EPI) {
-		if (devid == 0xc738 || devid == 0xcb84)
+		if ((devid >= 0xc738 && devid <= 0xc73b) || devid == 0xcb20)
 			return 1;
 		if (devid >= 0x1003 && devid <= 0x1016)
 			return 1;

src/vendstat.c typedef struct { · line 151

Quoted 10 lines
src/vendstat.c +2 -2
@@ -144,8 +144,8 @@ typedef struct {
 
 static uint16_t ext_fw_info_device[][2] = {
 	{0x0245, 0x0245},	/* Switch-X */
-	{0xc738, 0xc738},	/* Switch-X */
-	{0xcb84, 0xcb84},	/* Switch-IB */
+	{0xc738, 0xc73b},	/* Switch-X */
+	{0xcb20, 0xcb20},	/* Switch-IB */
 	{0x01b3, 0x01b3},	/* IS-4 */
 	{0x1003, 0x1016},	/* Connect-X */
 	{0x0000, 0x0000}};

--
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