summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorDevesh Sharma <devesh.sharma@emulex.com>2013-12-05 14:18:01 +0400
committerRoland Dreier <roland@purestorage.com>2014-01-14 01:14:33 +0400
commitfe5e8a1acc7fd877b6706053cf88c418c33fe7a3 (patch)
treee31cf1a44daf8aae36f683a151fec120e9e90052 /drivers
parent7e22e91102c6b9df7c4ae2168910e19d2bb14cd6 (diff)
downloadlinux-fe5e8a1acc7fd877b6706053cf88c418c33fe7a3.tar.xz
RDMA/ocrdma: Fix AV_VALID bit position
Fix ah->av->valid bit position and big endian portability. Signed-off-by: Devesh Sharma <devesh.sharma@emulex.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/infiniband/hw/ocrdma/ocrdma_ah.c1
-rw-r--r--drivers/infiniband/hw/ocrdma/ocrdma_sli.h2
2 files changed, 2 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_ah.c b/drivers/infiniband/hw/ocrdma/ocrdma_ah.c
index ee499d942257..69da5dd1ca8a 100644
--- a/drivers/infiniband/hw/ocrdma/ocrdma_ah.c
+++ b/drivers/infiniband/hw/ocrdma/ocrdma_ah.c
@@ -84,6 +84,7 @@ static inline int set_av_attr(struct ocrdma_dev *dev, struct ocrdma_ah *ah,
memcpy((u8 *)ah->av + eth_sz, &grh, sizeof(struct ocrdma_grh));
if (vlan_enabled)
ah->av->valid |= OCRDMA_AV_VLAN_VALID;
+ ah->av->valid = cpu_to_le32(ah->av->valid);
return status;
}
diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_sli.h b/drivers/infiniband/hw/ocrdma/ocrdma_sli.h
index 9f9570ec3c2e..27089032c669 100644
--- a/drivers/infiniband/hw/ocrdma/ocrdma_sli.h
+++ b/drivers/infiniband/hw/ocrdma/ocrdma_sli.h
@@ -1694,7 +1694,7 @@ struct ocrdma_grh {
u16 rsvd;
} __packed;
-#define OCRDMA_AV_VALID Bit(0)
+#define OCRDMA_AV_VALID Bit(7)
#define OCRDMA_AV_VLAN_VALID Bit(1)
struct ocrdma_av {