]> git.baikalelectronics.ru Git - kernel.git/commit
RDMA/hns: Fix the endian problem for hns
authoroulijun <oulijun@huawei.com>
Mon, 5 Feb 2018 13:14:00 +0000 (21:14 +0800)
committerDoug Ledford <dledford@redhat.com>
Mon, 5 Feb 2018 15:48:48 +0000 (10:48 -0500)
commit96c2bd40e1c260ede466de87985d03345cc5d9c8
treee7e8bfd3bbaaf03ee1435cf97c74447b141400c6
parent5d41d2ce47ad31582f3d1d198809a3c5095a864b
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>
drivers/infiniband/hw/hns/hns_roce_common.h
drivers/infiniband/hw/hns/hns_roce_device.h
drivers/infiniband/hw/hns/hns_roce_hw_v1.c
drivers/infiniband/hw/hns/hns_roce_hw_v1.h
drivers/infiniband/hw/hns/hns_roce_hw_v2.c
drivers/infiniband/hw/hns/hns_roce_hw_v2.h
drivers/infiniband/hw/hns/hns_roce_main.c
drivers/infiniband/hw/hns/hns_roce_qp.c