All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] infiniband-diags/ibportstate.c: Fix PortInfo sets with extended speeds
@ 2012-12-14 14:11 Hal Rosenstock
       [not found] ` <50CB3382.6060106-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Hal Rosenstock @ 2012-12-14 14:11 UTC (permalink / raw)
  To: Ira Weiny; +Cc: linux-rdma (linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org)


Attribute Modifier bit 31 should be on (set to 1) in this case

Signed-off-by: Hal Rosenstock <hal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
diff --git a/src/ibportstate.c b/src/ibportstate.c
index 1d8dc81..053b0a2 100644
--- a/src/ibportstate.c
+++ b/src/ibportstate.c
@@ -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 majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] infiniband-diags/ibportstate.c: Fix PortInfo sets with extended speeds
       [not found] ` <50CB3382.6060106-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
@ 2013-01-04 23:38   ` Ira Weiny
  0 siblings, 0 replies; 2+ messages in thread
From: Ira Weiny @ 2013-01-04 23:38 UTC (permalink / raw)
  To: Hal Rosenstock
  Cc: linux-rdma (linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org)

On Fri, 14 Dec 2012 09:11:14 -0500
Hal Rosenstock <hal-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org> wrote:

> 
> Attribute Modifier bit 31 should be on (set to 1) in this case
> 
> Signed-off-by: Hal Rosenstock <hal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

Applied, thanks,
Ira

> ---
> diff --git a/src/ibportstate.c b/src/ibportstate.c
> index 1d8dc81..053b0a2 100644
> --- a/src/ibportstate.c
> +++ b/src/ibportstate.c
> @@ -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 majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


-- 
Ira Weiny
Member of Technical Staff
Lawrence Livermore National Lab
925-423-8008
weiny2-i2BcT+NCU+M@public.gmane.org
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-01-04 23:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-14 14:11 [PATCH] infiniband-diags/ibportstate.c: Fix PortInfo sets with extended speeds Hal Rosenstock
     [not found] ` <50CB3382.6060106-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2013-01-04 23:38   ` Ira Weiny

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.