summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorIra Weiny <ira.weiny@intel.com>2015-09-09 01:28:21 -0400
committerDoug Ledford <dledford@redhat.com>2015-09-18 11:28:47 -0400
commitaadfc3b2042d69a6b4b8d719d4221b988d7f31a5 (patch)
treed6e486927ddf5782be5093635fcde49f164eec13 /drivers
parent447e9a4d27484175a84daaa8e03d35c650f443b7 (diff)
IB/hfi1: fix pstateinfo from returning improperly byteswapped value
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@intel.com> Reviewed-by: Christian Gomez <christian.gomez@intel.com> Signed-off-by: Rimmer, Todd <todd.rimmer@intel.com> Signed-off-by: Ira Weiny <ira.weiny@intel.com> Acked-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/rdma/hfi1/mad.c4
1 files changed, 2 insertions, 2 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);