* [PATCH] IB/hfi1: fix pstateinfo from returning improperly byteswapped value
@ 2015-09-09 5:28 ira.weiny-ral2JQCrhuEAvxtiuMwx3w
[not found] ` <1441776501-5881-1-git-send-email-ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: ira.weiny-ral2JQCrhuEAvxtiuMwx3w @ 2015-09-09 5:28 UTC (permalink / raw)
To: doug Ledford
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA,
dennis.dalessandro-ral2JQCrhuEAvxtiuMwx3w,
christian.gomez-ral2JQCrhuEAvxtiuMwx3w,
todd.rimmer-ral2JQCrhuEAvxtiuMwx3w, Ira Weiny
From: Ira Weiny <ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Byteswap link_width_downgrade_*_active values before sending on the wire. In
addition properly define the Port State Info structure.
Reviewed-by: Dennis Dalessandro <dennis.dalessandro-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Reviewed-by: Christian Gomez <christian.gomez-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Signed-off-by: Rimmer, Todd <todd.rimmer-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Signed-off-by: Ira Weiny <ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
drivers/staging/rdma/hfi1/mad.c | 4 ++--
include/rdma/opa_port_info.h | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/rdma/hfi1/mad.c b/drivers/staging/rdma/hfi1/mad.c
index 37269eb90c34..b2c1b72d38ce 100644
--- a/drivers/staging/rdma/hfi1/mad.c
+++ b/drivers/staging/rdma/hfi1/mad.c
@@ -1717,9 +1717,9 @@ static int __subn_get_opa_psi(struct opa_smp *smp, u32 am, u8 *data,
psi->port_states.portphysstate_portstate =
(hfi1_ibphys_portstate(ppd) << 4) | (lstate & 0xf);
psi->link_width_downgrade_tx_active =
- ppd->link_width_downgrade_tx_active;
+ cpu_to_be16(ppd->link_width_downgrade_tx_active);
psi->link_width_downgrade_rx_active =
- ppd->link_width_downgrade_rx_active;
+ cpu_to_be16(ppd->link_width_downgrade_rx_active);
if (resp_len)
*resp_len += sizeof(struct opa_port_state_info);
diff --git a/include/rdma/opa_port_info.h b/include/rdma/opa_port_info.h
index 391dae1931c0..a0fa975cd1c1 100644
--- a/include/rdma/opa_port_info.h
+++ b/include/rdma/opa_port_info.h
@@ -294,8 +294,8 @@ struct opa_port_states {
struct opa_port_state_info {
struct opa_port_states port_states;
- u16 link_width_downgrade_tx_active;
- u16 link_width_downgrade_rx_active;
+ __be16 link_width_downgrade_tx_active;
+ __be16 link_width_downgrade_rx_active;
};
struct opa_port_info {
--
1.8.2
--
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] 3+ messages in thread
* RE: [PATCH] IB/hfi1: fix pstateinfo from returning improperly byteswapped value
[not found] ` <1441776501-5881-1-git-send-email-ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
@ 2015-09-09 14:38 ` Marciniszyn, Mike
2015-09-18 15:41 ` Doug Ledford
1 sibling, 0 replies; 3+ messages in thread
From: Marciniszyn, Mike @ 2015-09-09 14:38 UTC (permalink / raw)
To: doug Ledford
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Dalessandro, Dennis, Gomez,
Christian, Rimmer, Todd, Weiny, Ira
> Subject: [PATCH] IB/hfi1: fix pstateinfo from returning improperly
> byteswapped value
>
> From: Ira Weiny <ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
>
> Byteswap link_width_downgrade_*_active values before sending on the
> wire. In addition properly define the Port State Info structure.
>
> Reviewed-by: Dennis Dalessandro <dennis.dalessandro-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> Reviewed-by: Christian Gomez <christian.gomez-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> Signed-off-by: Rimmer, Todd <todd.rimmer-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> Signed-off-by: Ira Weiny <ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> ---
Acked-by: Mike Marciniszyn <mike.marciniszyn-ral2JQCrhuEAvxtiuMwx3w@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] 3+ messages in thread
* Re: [PATCH] IB/hfi1: fix pstateinfo from returning improperly byteswapped value
[not found] ` <1441776501-5881-1-git-send-email-ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-09-09 14:38 ` Marciniszyn, Mike
@ 2015-09-18 15:41 ` Doug Ledford
1 sibling, 0 replies; 3+ messages in thread
From: Doug Ledford @ 2015-09-18 15:41 UTC (permalink / raw)
To: ira.weiny-ral2JQCrhuEAvxtiuMwx3w
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA,
dennis.dalessandro-ral2JQCrhuEAvxtiuMwx3w,
christian.gomez-ral2JQCrhuEAvxtiuMwx3w,
todd.rimmer-ral2JQCrhuEAvxtiuMwx3w
[-- Attachment #1: Type: text/plain, Size: 785 bytes --]
On 09/09/2015 01:28 AM, ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org wrote:
> From: Ira Weiny <ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
>
> Byteswap link_width_downgrade_*_active values before sending on the wire. In
> addition properly define the Port State Info structure.
>
> Reviewed-by: Dennis Dalessandro <dennis.dalessandro-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> Reviewed-by: Christian Gomez <christian.gomez-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> Signed-off-by: Rimmer, Todd <todd.rimmer-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> Signed-off-by: Ira Weiny <ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Applied, thanks.
--
Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
GPG KeyID: 0E572FDD
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 884 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-09-18 15:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-09 5:28 [PATCH] IB/hfi1: fix pstateinfo from returning improperly byteswapped value ira.weiny-ral2JQCrhuEAvxtiuMwx3w
[not found] ` <1441776501-5881-1-git-send-email-ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-09-09 14:38 ` Marciniszyn, Mike
2015-09-18 15:41 ` Doug Ledford
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).