diff options
author | oulijun <oulijun@huawei.com> | 2018-02-05 16:14:00 +0300 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2018-02-05 18:48:48 +0300 |
commit | 8b9b8d143b467ec9c65f87b7c2596dc2aabe6737 (patch) | |
tree | e7e8bfd3bbaaf03ee1435cf97c74447b141400c6 /drivers/infiniband/hw/hns/hns_roce_main.c | |
parent | e9d1e389273aac7fc50c53f0d4492dc190185882 (diff) | |
download | linux-8b9b8d143b467ec9c65f87b7c2596dc2aabe6737.tar.xz |
RDMA/hns: Fix the endian problem for hns
The hip06 and hip08 run on a little endian ARM, it needs to
revise the annotations to indicate that the HW uses little
endian data in the various DMA buffers, and flow the necessary
swaps throughout.
The imm_data use big endian mode. The cpu_to_le32/le32_to_cpu
swaps are no-op for this, which makes the only substantive
change the handling of imm_data which is now mandatory swapped.
This also keep match with the userspace hns driver and resolve
the warning by sparse.
Signed-off-by: Lijun Ou <oulijun@huawei.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/hns/hns_roce_main.c')
-rw-r--r-- | drivers/infiniband/hw/hns/hns_roce_main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/hns/hns_roce_main.c b/drivers/infiniband/hw/hns/hns_roce_main.c index 46f065ddd6c0..eb9a69fc7bec 100644 --- a/drivers/infiniband/hw/hns/hns_roce_main.c +++ b/drivers/infiniband/hw/hns/hns_roce_main.c @@ -200,7 +200,7 @@ static int hns_roce_query_device(struct ib_device *ib_dev, memset(props, 0, sizeof(*props)); - props->sys_image_guid = hr_dev->sys_image_guid; + props->sys_image_guid = cpu_to_be32(hr_dev->sys_image_guid); props->max_mr_size = (u64)(~(0ULL)); props->page_size_cap = hr_dev->caps.page_size_cap; props->vendor_id = hr_dev->vendor_id; |