RDMA/ocrdma: Fix AV_VALID bit position
authorDevesh Sharma <devesh.sharma@emulex.com>
Thu, 5 Dec 2013 10:18:01 +0000 (15:48 +0530)
committerRoland Dreier <roland@purestorage.com>
Mon, 13 Jan 2014 21:14:33 +0000 (13:14 -0800)
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>
drivers/infiniband/hw/ocrdma/ocrdma_ah.c
drivers/infiniband/hw/ocrdma/ocrdma_sli.h

index ee499d9..69da5dd 100644 (file)
@@ -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;
 }
 
index 9f9570e..2708903 100644 (file)
@@ -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 {