From patchwork Wed Apr 15 12:30:04 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ding Tianhong X-Patchwork-Id: 6220081 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 0D752BF4A6 for ; Wed, 15 Apr 2015 12:35:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 33D1820173 for ; Wed, 15 Apr 2015 12:35:49 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A2A62200CC for ; Wed, 15 Apr 2015 12:35:43 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YiMVl-000891-Qa; Wed, 15 Apr 2015 12:33:45 +0000 Received: from szxga03-in.huawei.com ([119.145.14.66]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YiMVR-0007eM-DQ for linux-arm-kernel@lists.infradead.org; Wed, 15 Apr 2015 12:33:27 +0000 Received: from 172.24.2.119 (EHLO szxeml430-hub.china.huawei.com) ([172.24.2.119]) by szxrg03-dlp.huawei.com (MOS 4.4.3-GA FastPath queued) with ESMTP id BEM15113; Wed, 15 Apr 2015 20:30:18 +0800 (CST) Received: from localhost (10.177.22.246) by szxeml430-hub.china.huawei.com (10.82.67.185) with Microsoft SMTP Server id 14.3.158.1; Wed, 15 Apr 2015 20:30:11 +0800 From: Ding Tianhong To: , , Subject: [PATCH net-next 2/6] net: hip04: use the big endian for tx and rx desc Date: Wed, 15 Apr 2015 20:30:04 +0800 Message-ID: <1429101008-9464-3-git-send-email-dingtianhong@huawei.com> X-Mailer: git-send-email 1.8.5.2.msysgit.0 In-Reply-To: <1429101008-9464-1-git-send-email-dingtianhong@huawei.com> References: <1429101008-9464-1-git-send-email-dingtianhong@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.177.22.246] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020205.552E59DB.0255, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=0.0.0.0, so=2013-05-26 15:14:31, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 019714b61052893f2040a55448505ce8 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150415_053326_349706_4615EE68 X-CRM114-Status: UNSURE ( 6.52 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.3 (--) Cc: devicetree@vger.kernel.org, linux@arm.linux.org.uk, sergei.shtylyov@cogentembedded.com, eric.dumazet@gmail.com, netdev@vger.kernel.org, joe@perches.com, zhangfei.gao@linaro.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 The hip04 ethernet use the big endian for tx and rx, so set desc to big endian and remove the unused next_addr. Signed-off-by: Ding Tianhong Cc: "David S. Miller" Cc: Eric Dumazet Cc: Arnd Bergmann Cc: Zhangfei Gao Cc: Dan Carpenter Cc: Joe Perches --- drivers/net/ethernet/hisilicon/hip04_eth.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hip04_eth.c b/drivers/net/ethernet/hisilicon/hip04_eth.c index b0a7f03..6473462 100644 --- a/drivers/net/ethernet/hisilicon/hip04_eth.c +++ b/drivers/net/ethernet/hisilicon/hip04_eth.c @@ -132,19 +132,18 @@ #define HIP04_MIN_TX_COALESCE_FRAMES 1 struct tx_desc { - u32 send_addr; - u32 send_size; - u32 next_addr; - u32 cfg; - u32 wb_addr; + __be32 send_addr; + __be32 send_size; + __be32 cfg; + __be32 wb_addr; } __aligned(64); struct rx_desc { - u16 reserved_16; - u16 pkt_len; - u32 reserve1[3]; - u32 pkt_err; - u32 reserve2[4]; + __be16 reserved_16; + __be16 pkt_len; + __be32 reserve1[3]; + __be32 pkt_err; + __be32 reserve2[4]; }; struct hip04_priv {