infiniband-diags/ibportstate.c: Fix PortInfo sets with extended speeds
PATCH 1/1 infiniband-diags/ibportstate.c: Fix PortInfo sets with extended speeds
Attribute Modifier bit 31 should be on (set to 1) in this case
---
src/ibportstate.c +6 -1
@@ -236,7 +236,12 @@ static void show_port_info(ib_portid_t * dest, uint8_t * data, int portnum,static void set_port_info (ib_portid_t * dest,uint8_t * data,int portnum,int espeed_cap,int is_switch) { -if (!smp_set_via (data, dest,IB_ATTR_PORT_INFO , portnum,0 , srcport)) +unsigned mod; + + mod = portnum; +if (espeed_cap) + mod |=1 <<31 ; +if (!smp_set_via (data, dest,IB_ATTR_PORT_INFO , mod,0 , srcport))IBERROR ("smp set portinfo failed" );printf ("\nAfter PortInfo set:\n" );
--
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): 50CB3382.6060106-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org
Ira Weiny
AppliedQuoted 4 lines · On Fri, 14 Dec 2012 09:11:14 -0500 Hal Rosenstock…
Attribute Modifier bit 31 should be on (set to 1) in this case
Applied, thanks,
Ira
Quoted 23 lines
---
src/ibportstate.c +6
-2@@ -236,7 +236,12 @@ static void show_port_info(ib_portid_t * dest, uint8_t * data, int portnum,static void set_port_info (ib_portid_t * dest,uint8_t * data,int portnum,int espeed_cap,int is_switch) { -if (!smp_set_via (data, dest,IB_ATTR_PORT_INFO , portnum,0 , srcport)) +unsigned mod; + + mod = portnum; +if (espeed_cap) + mod |=1 <<31 ; +if (!smp_set_via (data, dest,IB_ATTR_PORT_INFO , mod,0 , srcport))IBERROR ("smp set portinfo failed" );printf ("\nAfter PortInfo set:\n" ); --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
Signature · 9 lines
Ira Weiny Member of Technical Staff Lawrence Livermore National Lab 925-423-8008 [email protected] -- 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