From patchwork Thu Dec 5 10:18:01 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Devesh Sharma X-Patchwork-Id: 3287191 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 8E043C0D4A for ; Thu, 5 Dec 2013 10:40:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 647B520222 for ; Thu, 5 Dec 2013 10:40:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B86D0203A8 for ; Thu, 5 Dec 2013 10:40:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754697Ab3LEKkR (ORCPT ); Thu, 5 Dec 2013 05:40:17 -0500 Received: from cmexedge2.ext.emulex.com ([138.239.224.100]:57609 "EHLO CMEXEDGE2.ext.emulex.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752510Ab3LEKkQ (ORCPT ); Thu, 5 Dec 2013 05:40:16 -0500 Received: from CMEXHTCAS2.ad.emulex.com (138.239.115.218) by CMEXEDGE2.ext.emulex.com (138.239.224.100) with Microsoft SMTP Server (TLS) id 14.3.146.0; Thu, 5 Dec 2013 02:40:26 -0800 Received: from neo01.lab.bg.emulex.com (10.192.204.8) by smtp.emulex.com (138.239.115.208) with Microsoft SMTP Server id 14.3.146.2; Thu, 5 Dec 2013 02:39:52 -0800 From: To: CC: , Devesh Sharma Subject: [PATCH] RDMA/ocrdma: AV_VALID bit position fix Date: Thu, 5 Dec 2013 15:48:01 +0530 X-Mailer: git-send-email 1.7.1 MIME-Version: 1.0 Message-ID: <560636d5-99d4-4d65-830f-30a2c0e99973@CMEXHTCAS2.ad.emulex.com> Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Devesh Sharma fixed ah->av->valid bit position and big endian portability. Signed-off-by: Devesh Sharma --- drivers/infiniband/hw/ocrdma/ocrdma_ah.c | 1 + drivers/infiniband/hw/ocrdma/ocrdma_sli.h | 2 +- 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 ee499d9..69da5dd 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 9f9570e..2708903 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 {