Home Home > GIT Browse > openSUSE-15.1
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bogendoerfer <tbogendoerfer@suse.de>2019-06-07 13:27:44 +0200
committerThomas Bogendoerfer <tbogendoerfer@suse.de>2019-06-07 13:30:38 +0200
commit9fb06b8889eb86042e3368ab34ef25484216060c (patch)
tree590c0d042223de6ae750fb2f1b0401d1981c45f6
parent8ee3278b0a07a6ea73fe98da3b756e2dccdf7826 (diff)
RDMA/hns: Fix bad endianess of port_pd variable (bsc#1104427
-rw-r--r--patches.drivers/RDMA-hns-Fix-bad-endianess-of-port_pd-variable.patch36
-rw-r--r--series.conf1
2 files changed, 37 insertions, 0 deletions
diff --git a/patches.drivers/RDMA-hns-Fix-bad-endianess-of-port_pd-variable.patch b/patches.drivers/RDMA-hns-Fix-bad-endianess-of-port_pd-variable.patch
new file mode 100644
index 0000000000..ac01c7524f
--- /dev/null
+++ b/patches.drivers/RDMA-hns-Fix-bad-endianess-of-port_pd-variable.patch
@@ -0,0 +1,36 @@
+From: Leon Romanovsky <leonro@mellanox.com>
+Date: Tue, 19 Mar 2019 11:10:08 +0200
+Subject: RDMA/hns: Fix bad endianess of port_pd variable
+Patch-mainline: v5.2-rc1
+Git-commit: 6734b2973565e36659e97e12ab0d0faf1d9f3fbe
+References: bsc#1104427 FATE#326416
+
+port_pd is treated as le32 in declaration and read, fix assignment to be
+in le32 too. This change fixes the following compilation warnings.
+
+drivers/infiniband/hw/hns/hns_roce_ah.c:67:24: warning: incorrect type
+in assignment (different base types)
+drivers/infiniband/hw/hns/hns_roce_ah.c:67:24: expected restricted __le32 [usertype] port_pd
+drivers/infiniband/hw/hns/hns_roce_ah.c:67:24: got restricted __be32 [usertype]
+
+Fixes: 9a4435375cd1 ("IB/hns: Add driver files for hns RoCE driver")
+Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
+Reviewed-by: Gal Pressman <galpress@amazon.com>
+Reviewed-by: Lijun Ou <ouliun@huawei.com>
+Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
+Acked-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
+---
+ drivers/infiniband/hw/hns/hns_roce_ah.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/infiniband/hw/hns/hns_roce_ah.c
++++ b/drivers/infiniband/hw/hns/hns_roce_ah.c
+@@ -69,7 +69,7 @@ struct ib_ah *hns_roce_create_ah(struct
+ HNS_ROCE_VLAN_SL_BIT_MASK) <<
+ HNS_ROCE_VLAN_SL_SHIFT;
+
+- ah->av.port_pd = cpu_to_be32(to_hr_pd(ibpd)->pdn |
++ ah->av.port_pd = cpu_to_le32(to_hr_pd(ibpd)->pdn |
+ (rdma_ah_get_port_num(ah_attr) <<
+ HNS_ROCE_PORT_NUM_SHIFT));
+ ah->av.gid_index = grh->sgid_index;
diff --git a/series.conf b/series.conf
index 9b12adbc58..276b3312bc 100644
--- a/series.conf
+++ b/series.conf
@@ -46623,6 +46623,7 @@
patches.drivers/IB-hfi1-Fix-two-format-strings.patch
patches.drivers/RDMA-cxbg-Use-correct-sizing-on-buffers-holding-page.patch
patches.drivers/RDMA-rdmavt-Use-correct-sizing-on-buffers-holding-pa.patch
+ patches.drivers/RDMA-hns-Fix-bad-endianess-of-port_pd-variable.patch
patches.drivers/IB-hfi1-Remove-WARN_ON-when-freeing-expected-receive.patch
patches.drivers/RDMA-iw_cxgb4-Always-disconnect-when-QP-is-transitio.patch
patches.drivers/RDMA-cxgb4-Fix-null-pointer-dereference-on-alloc_skb.patch