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 ee499d94225701780bed453abecc1a9ed6e98cff..69da5dd1ca8ae10f12da99dae92f792b113695cf 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 9f9570ec3c2ee300f828e8275820ca7c25b9e71d..27089032c669111174e072324376c8f72ff25062 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 {