From patchwork Fri Apr 18 11:59:36 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Byungho An X-Patchwork-Id: 28631 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f200.google.com (mail-ob0-f200.google.com [209.85.214.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id F0AC12013D for ; Fri, 18 Apr 2014 11:59:42 +0000 (UTC) Received: by mail-ob0-f200.google.com with SMTP id vb8sf2439733obc.3 for ; Fri, 18 Apr 2014 04:59:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :mime-version:thread-index:dlp-filter:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe:content-type :content-transfer-encoding:content-language; bh=TED964OYZ58lVZ8My5vzgcJSqhGm3puiPTM7sfd2vnI=; b=bOQF4iTVQOeaFkLQgHmV/RPwziHnHTbE0JzkhBFmq4ZF3zsQM4kbIC1Z4B66wnWhll auXD4B3asWyQhQcS4PJD4KxOh2kTRBz6tclND5UEfdZVb1DGO/86uAY+lqzbAQFdbZ5L ZVcvp/3nOtWyGDuGqF3+qs8jgmBCyi4HygddJko3mk8FcPvb6Nji15jrubFSnrpOeKbZ O/tF+sT6Lb6zWNhotHzAF1/ofRDcQE6+sXVvYNdnLa8l3NNKtSnDz/jmkXkLxgLZWKyt KSjzzTF/O3hgbW5zD81qHiSIyvyBzrzrzq4RUeoP1cR16/RhLv3XL+2Fxa/D5ktTrRno n3Gw== X-Gm-Message-State: ALoCoQkhB9QMy6vwH7Uv6D5jP1o1hCUg49O8M3CJOrG8WFDyF/6d9aIiqgObTvzSxeQxAnPxqkYA X-Received: by 10.182.241.9 with SMTP id we9mr10306693obc.22.1397822381917; Fri, 18 Apr 2014 04:59:41 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.89.70 with SMTP id u64ls1430295qgd.80.gmail; Fri, 18 Apr 2014 04:59:41 -0700 (PDT) X-Received: by 10.58.187.78 with SMTP id fq14mr17038254vec.9.1397822381771; Fri, 18 Apr 2014 04:59:41 -0700 (PDT) Received: from mail-ve0-f169.google.com (mail-ve0-f169.google.com [209.85.128.169]) by mx.google.com with ESMTPS id j5si4925482veb.21.2014.04.18.04.59.41 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 18 Apr 2014 04:59:41 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.169 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.169; Received: by mail-ve0-f169.google.com with SMTP id pa12so2797263veb.28 for ; Fri, 18 Apr 2014 04:59:41 -0700 (PDT) X-Received: by 10.220.69.72 with SMTP id y8mr13080017vci.21.1397822381683; Fri, 18 Apr 2014 04:59:41 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp107220vcb; Fri, 18 Apr 2014 04:59:41 -0700 (PDT) X-Received: by 10.68.100.1 with SMTP id eu1mr21640335pbb.36.1397822380838; Fri, 18 Apr 2014 04:59:40 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b4si16253835pbl.302.2014.04.18.04.59.40; Fri, 18 Apr 2014 04:59:40 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751307AbaDRL7j (ORCPT + 8 others); Fri, 18 Apr 2014 07:59:39 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:20176 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751269AbaDRL7h (ORCPT ); Fri, 18 Apr 2014 07:59:37 -0400 Received: from epcpsbgr3.samsung.com (u143.gpu120.samsung.co.kr [203.254.230.143]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N4800K2H6NCDA30@mailout3.samsung.com>; Fri, 18 Apr 2014 20:59:36 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [203.254.230.50]) by epcpsbgr3.samsung.com (EPCPMTA) with SMTP id 47.AB.10092.8A311535; Fri, 18 Apr 2014 20:59:36 +0900 (KST) X-AuditID: cbfee68f-b7f156d00000276c-73-535113a82b6e Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 2D.2E.28157.8A311535; Fri, 18 Apr 2014 20:59:36 +0900 (KST) Received: from DObh74an01 ([12.36.166.149]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0N4800BB26NC1150@mmp2.samsung.com>; Fri, 18 Apr 2014 20:59:36 +0900 (KST) From: Byungho An To: netdev@vger.kernel.org, linux-samsung-soc@vger.kernel.org Cc: davem@davemloft.net, ks.giri@samsung.com, vipul.pandya@samsung.com Subject: [PATCH] net: sxgbe: rearrange dma descriptor Date: Fri, 18 Apr 2014 20:59:36 +0900 Message-id: <000601cf5afd$ab2e55c0$018b0140$%an@samsung.com> MIME-version: 1.0 X-Mailer: Microsoft Office Outlook 12.0 Thread-index: Ac9a/asOnAutOycqTv2QxLI0L4VOqw== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrJIsWRmVeSWpSXmKPExsVy+t8zI90VwoHBBqtnS1vMOd/CYtG74Cqb xfyjO5gsZpzfx2RxbIGYxbYFF5gd2Dy2rLzJ5NG3ZRWjx+dNcgHMUVw2Kak5mWWpRfp2C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GYt+rbcwQtqDEj8n3WCB6tSTW7zzOBGHLS2xe 8xaohgPoInWJR391IVbpSbzrb4EqF5HY9+Id4wRGgVlIJs1CMmkWkkmzkLQsYGRZxSiaWpBc UJyUnmukV5yYW1yal66XnJ+7iREczc+kdzCuarA4xCjAwajEw7vjYECwEGtiWXFl7iFGCQ5m JRHe3X+BQrwpiZVVqUX58UWlOanFhxiTgR6dyCwlmpwPTDR5JfGGxiZmRpZGZhZGJubmpAkr ifMebLUOFBJITyxJzU5NLUgtgtnCxMEp1cA4h/OOkrBjb9teizfz7j64+/GMlV5RNdfvV8pb nNoebYuW2fMsyrVK6QXHPFGPtafXht05tih1dvmR8AXL5NyaVv07WB65auISlezw9vX3hM1W O3Gt3HOZv/XEj30nwoSmTtisHjh7l/XrjfV1JhLHNph3fhdffc8+6AI/996sjukf97c/WOHw Q4mlOCPRUIu5qDgRAHdgVIQqAwAA DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: bh74.an@samsung.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.169 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit Content-language: ko This patch moves cksum_ctl to tx_rd_des23 from cksum_pktlen for correct checksum offloading and modifies size for Tx/Rx descriptor. Signed-off-by: Byungho An --- drivers/net/ethernet/samsung/sxgbe/sxgbe_desc.c | 4 +-- drivers/net/ethernet/samsung/sxgbe/sxgbe_desc.h | 39 ++++++++++------------- 2 files changed, 19 insertions(+), 24 deletions(-) diff --git a/drivers/net/ethernet/samsung/sxgbe/sxgbe_desc.c b/drivers/net/ethernet/samsung/sxgbe/sxgbe_desc.c index e896dbb..d71691b 100644 --- a/drivers/net/ethernet/samsung/sxgbe/sxgbe_desc.c +++ b/drivers/net/ethernet/samsung/sxgbe/sxgbe_desc.c @@ -45,10 +45,10 @@ static void sxgbe_prepare_tx_desc(struct sxgbe_tx_norm_desc *p, u8 is_fd, p->tdes23.tx_rd_des23.first_desc = is_fd; p->tdes23.tx_rd_des23.buf1_size = buf1_len; - p->tdes23.tx_rd_des23.tx_pkt_len.cksum_pktlen.total_pkt_len = pkt_len; + p->tdes23.tx_rd_des23.tx_pkt_len.pkt_len.total_pkt_len = pkt_len; if (cksum) - p->tdes23.tx_rd_des23.tx_pkt_len.cksum_pktlen.cksum_ctl = cic_full; + p->tdes23.tx_rd_des23.cksum_ctl = cic_full; } /* Set VLAN control information */ diff --git a/drivers/net/ethernet/samsung/sxgbe/sxgbe_desc.h b/drivers/net/ethernet/samsung/sxgbe/sxgbe_desc.h index 838cb9f..0226300 100644 --- a/drivers/net/ethernet/samsung/sxgbe/sxgbe_desc.h +++ b/drivers/net/ethernet/samsung/sxgbe/sxgbe_desc.h @@ -39,22 +39,22 @@ struct sxgbe_tx_norm_desc { u32 int_on_com:1; /* TDES3 */ union { - u32 tcp_payload_len:18; + u16 tcp_payload_len; struct { u32 total_pkt_len:15; u32 reserved1:1; - u32 cksum_ctl:2; - } cksum_pktlen; + } pkt_len; } tx_pkt_len; - u32 tse_bit:1; - u32 tcp_hdr_len:4; - u32 sa_insert_ctl:3; - u32 crc_pad_ctl:2; - u32 last_desc:1; - u32 first_desc:1; - u32 ctxt_bit:1; - u32 own_bit:1; + u16 cksum_ctl:2; + u16 tse_bit:1; + u16 tcp_hdr_len:4; + u16 sa_insert_ctl:3; + u16 crc_pad_ctl:2; + u16 last_desc:1; + u16 first_desc:1; + u16 ctxt_bit:1; + u16 own_bit:1; } tx_rd_des23; /* tx write back Desc 2,3 */ @@ -70,25 +70,20 @@ struct sxgbe_tx_norm_desc { struct sxgbe_rx_norm_desc { union { - u32 rdes0; /* buf1 address */ - struct { + u64 rdes01; /* buf1 address */ + union { u32 out_vlan_tag:16; u32 in_vlan_tag:16; - } wb_rx_des0; - } rd_wb_des0; - - union { - u32 rdes1; /* buf2 address or buf1[63:32] */ - u32 rss_hash; /* Write-back RX */ - } rd_wb_des1; + u32 rss_hash; + } rx_wb_des01; + } rdes01; union { /* RX Read format Desc 2,3 */ struct{ /* RDES2 */ - u32 buf2_addr; + u64 buf2_addr:62; /* RDES3 */ - u32 buf2_hi_addr:30; u32 int_on_com:1; u32 own_bit:1; } rx_rd_des23;