From patchwork Thu Aug 10 17:42:47 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Horia Geanta X-Patchwork-Id: 9894441 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 02B9B60384 for ; Thu, 10 Aug 2017 17:49:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E7537283CF for ; Thu, 10 Aug 2017 17:49:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DC08628405; Thu, 10 Aug 2017 17:49:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 66662285E4 for ; Thu, 10 Aug 2017 17:49:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=BD5hPj/hzlN9+7VE4mHwCJO2BkqIXuOzQ1xf9CMlV84=; b=BteazaOVTjJaWj oFsoFuYdlha3tr/zQnw1ks3nuV7FfAIJWp2F7pZ/VmyTboNcnB5oBbZEzfcL3KYRgejHep+z2JvIy HyKYQEoPmObd1W3HxaN7q+G8i/nO+3zK29pOT+XhZfaZWwIEHgnfNf0uZJOPAI0ek/dUREAkKrDsu rM4q+IVccKMP4m5E0kVZylHtRMRChSTRQQsO1HsswOltXxnOr1xHbQ5D3dQIymNPKPFaP62VzU2H3 OaeMxK4WgZzttWtwHROjukqzn6znwA9jypoTjSoVKSlMIgBzCTE6SQK6LvDrPT3sHkIh7mJ2bf7Wf aWs6CJh/aL2YfnZBKDmQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dfrZr-000701-KV; Thu, 10 Aug 2017 17:48:59 +0000 Received: from mail-by2nam03on0071.outbound.protection.outlook.com ([104.47.42.71] helo=NAM03-BY2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dfrV6-0002zC-9A for linux-arm-kernel@lists.infradead.org; Thu, 10 Aug 2017 17:44:09 +0000 Received: from CY1PR03CA0040.namprd03.prod.outlook.com (10.174.128.50) by BN3PR03MB2259.namprd03.prod.outlook.com (10.166.74.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.1320.16; Thu, 10 Aug 2017 17:43:42 +0000 Received: from BN1AFFO11OLC002.protection.gbl (2a01:111:f400:7c10::149) by CY1PR03CA0040.outlook.office365.com (2603:10b6:600::50) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.1320.16 via Frontend Transport; Thu, 10 Aug 2017 17:43:41 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; driverdev.osuosl.org; dkim=none (message not signed) header.d=none;driverdev.osuosl.org; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BN1AFFO11OLC002.mail.protection.outlook.com (10.58.53.73) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1304.16 via Frontend Transport; Thu, 10 Aug 2017 17:43:40 +0000 Received: from enigma.ea.freescale.net (enigma.ea.freescale.net [10.171.77.120]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id v7AHhN1u012849; Thu, 10 Aug 2017 10:43:37 -0700 From: =?UTF-8?q?Horia=20Geant=C4=83?= To: Herbert Xu , Greg Kroah-Hartman , Stuart Yoder , Laurentiu Tudor , Ioana Radulescu , Catalin Marinas , Will Deacon Subject: [RFC PATCH 04/10] staging: fsl-dpaa2/eth: move generic FD defines to DPIO Date: Thu, 10 Aug 2017 20:42:47 +0300 Message-ID: <20170810174253.20951-5-horia.geanta@nxp.com> X-Mailer: git-send-email 2.12.0.264.gd6db3f216544 In-Reply-To: <20170810174253.20951-1-horia.geanta@nxp.com> References: <20170810174253.20951-1-horia.geanta@nxp.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131468606209233255; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(336005)(39400400002)(39840400002)(39450400003)(39380400002)(39860400002)(39410400002)(39850400002)(2980300002)(1109001)(1110001)(339900001)(189002)(199003)(106466001)(33646002)(6666003)(50986999)(76176999)(2870700001)(2950100002)(77096006)(2906002)(7416002)(105606002)(54906002)(53936002)(50226002)(626005)(47776003)(38730400002)(50466002)(498600001)(85426001)(39060400002)(8936002)(23676002)(5820100001)(1076002)(356003)(81156014)(81166006)(4326008)(8676002)(575784001)(86362001)(36756003)(8656003)(189998001)(97736004)(68736007)(305945005)(104016004)(5660300001)(41533002)(217873001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR03MB2259; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11OLC002; 1:OzlBtcGVFKanp/hbJ2lrPgYovHRGZjUKkjdhz37yu0ZA6RR6XTMOfCsGsTBYt2Oj7r/oNnsY+yuhssKIxrvGIWKyF8c1l4PU1SiAVocqTKqiUloEvpwAIurFOZe4Yp/XrNVsLrWR3l3RRyuMX5+6woX4kLdK+/65sOQXyo4tT/0qRueQia6O54yfYFncBeGAM7iF9xUrshAuBMSz5iNogNfC8XReT4XkO7aj77wTzDdd2c9joC7QImMDbYOUBEbj0S6M2/8Vy/zNI+YSTkbIUyafyGXm0ZhVXtcKpc5mMLyhEko1kQBTcyH6RQpHuq7yPqjIdCaAEjm1YmwYW9KLyodTuSKEtkVDO/JaxCP3qKXY4upRz/S1EZ9kTgSZnxy8mVx92JCO3XWA0gp6EHwEl9D86wrEZGaLxLpND2pcneTo4vWkhfyYjBJzExtxNhy/IW+Pv7zjFgJNq7t2QypE+r/b/uRTNa8DYz3uI99puUF3DzN+Af1ufNcBP+L2o1DsLYJOdmAyGDr+Er00lsqvrm9fPxuAvrcQyZLoJcJBfRGsmpKnJexUPuIaU4lzjWgKmdiwtFAdZ+TtE0gpxp5QOF9hKlAY+2XiSLBckAWEV76pntAj630lwoUh9PoEISVVLr+dK1LMglrgblHWb7hjaI3NstISVZ7hpOt1MP8nQMG3pzrV5AP5WmbCuIeWdIvA+HTdBWZnxUCFiEyicnggzIwOOd1QgWQ9VIxKmVCCe9ZQhaeBTBboAFJIa9b7qUTkLHeCWGNkTRJS2W+T2aW34sLn0bXc1hQ7bLJDh8eTC8Qybg7A0lOlkPhNDzRFDDkIBmUHHXJNm3aAvPfRp/yiaPsnrl0pR+EDzrABFiwC5X+Pp6r/3KXzSbRbPA4w3xEP X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e0b1d24d-4a22-4859-3008-08d4e01756ac X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(300000503095)(300135400095)(2017052603031)(201703131430075)(201703131517081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:BN3PR03MB2259; X-Microsoft-Exchange-Diagnostics: 1; BN3PR03MB2259; 3:BDm6ExpHmkTB3m0FvzH+LJbfE5UFGFUOa8Zu4O/J7JgzAGhEuH/LO3SVnzRTt02bpA4LU2pFB4u/McbimBjHjMu6lghbTX36eA7ho0ALcS6h9chsHJkO5iVUvIR7w6GhIEgzEB3UNDbEjNQloaLgWJcseEqnfHPCBimGDLuqmP3bmPrTwxoEZ5grwuJ5TYAwcpBlSg1zIlbkACQccDTqemm+gD3c0spllqIDxGsl9TOFvq/JkRflIWGFLm1vWaH5i3ibgU9vMOerrRy9t5FW9QcAQAotAwey89CY1ypAnpJKWBssIyozmRyZna4XXnzoZ/y+X97DJSkRLXOBe+4wfSkn/yzKeCNumqgYh5vRXKw=; 25:QSQhvEZBotkUNmIjzobvKwXumY9gtWbGSuoN/UJOdT53qDVRD0sZ6JBkn0nbkKNJKPKpwcx/lb2BwBViq5/cVoDimxSeu+FNQdVhear+zRriyQGIyHaSKF6MK/CGLNW7qAnavXu0pVcakpO6LaFPA9XXSSkf+ZxrUTN+6ME0M5hxYfzUr+HDk5ncoxHXXLF8Ry80ilZbzdFmB7yiB98hi+ww6oOmnYomX+QUXIr558OXdQ5j2wvxa0rp8i5GBuq99uWcSuPKhoITg9pJLftzW3UkSl0fIrErah7Ksr0R0Y25zM56svrI1q4cQH6XUABXa0y/K1wOPto3rSCXvhdWSw== X-MS-TrafficTypeDiagnostic: BN3PR03MB2259: X-Microsoft-Exchange-Diagnostics: 1; BN3PR03MB2259; 31:7Ob9lEnWduaD8EJPYzBpLqP56Zsm0SLZtx7/AZGC/cVaKMH8MJh6yVJD5yxUhXQkJr1u6bBheVSpwUZ+Q8cd75aPJ6CI0AEz4a1/uMQth3QqUmzbVGUYznj1PwcIgdDMp94le0EqJUO3KXqZLFiKpSgNZ/fvW5lYpUwqN/xSV42TUZqmlQTDogrce3QcTjeiB3mdCTXTMLVUd+yfhuABMFW3MI1Xa2wEVQaaMsnKLqE=; 4:Wc4cE5yAuDJ49woMFsSphsn3s4jh9xadx6L1hp6Ofh66U5Eohy4jTnR7lESLbAS9KPd35IygSqP6+LijiwQwgDq9wKYF7yVA5fJNBeF3P77Y9eBj1pO7EH0xX1aI10L8qlj88tkZ5ihoUHxlcjhqGaTG2i03gqrBUk354OUNHBPLu0/cc0bjYo5j4hrB/JSj8ODFz9KeqYJhQKqPLD9EgDq794QW03q73g1R2pJzbWIXJMbw8/+0XjeH/LVajbigaBbwkGo8asOtnXLGyvMZ2u4vi8X7aEImEl2hu3EPCfs= X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6095135)(601004)(2401047)(13016025)(5005006)(13018025)(8121501046)(3002001)(10201501046)(93006095)(93001095)(100000703101)(100105400095)(6055026)(6096035)(20161123559100)(20161123561025)(201703131430075)(201703131448075)(201703131433075)(201703161259150)(201703151042153)(20161123556025)(20161123565025)(20161123563025)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BN3PR03MB2259; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BN3PR03MB2259; X-Forefront-PRVS: 03950F25EC X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtCTjNQUjAzTUIyMjU5OzIzOmVpbk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ime: 10 Aug 2017 17:43:40.6893 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR03MB2259 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170810_104404_870255_1FD01651 X-CRM114-Status: GOOD ( 17.04 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devel@driverdev.osuosl.org, Roy Pledge , Dan Douglass , Radu Alexe , linux-crypto@vger.kernel.org, "David S . Miller" , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Previous commits: 6e2387e8f19e ("staging: fsl-dpaa2/eth: Add Freescale DPAA2 Ethernet driver") 39163c0ce0f4 ("staging: fsl-dpaa2/eth: Errors checking update") have added bits that are not specific to the WRIOP accelerator. Move these where they belong (in DPIO) such that other accelerators can make use of them. While here, fix the values of FD_CTRL_FSE and FD_CTRL_FAERR, which were shifted off by one bit. Signed-off-by: Horia Geantă --- drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 8 +++----- drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h | 19 +++++-------------- drivers/staging/fsl-mc/include/dpaa2-fd.h | 12 ++++++++++++ 3 files changed, 20 insertions(+), 19 deletions(-) diff --git a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c index b9a0a315e6fb..a1d5c371e1c4 100644 --- a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c +++ b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c @@ -410,8 +410,7 @@ static int build_sg_fd(struct dpaa2_eth_priv *priv, dpaa2_fd_set_format(fd, dpaa2_fd_sg); dpaa2_fd_set_addr(fd, addr); dpaa2_fd_set_len(fd, skb->len); - dpaa2_fd_set_ctrl(fd, DPAA2_FD_CTRL_ASAL | DPAA2_FD_CTRL_PTA | - DPAA2_FD_CTRL_PTV1); + dpaa2_fd_set_ctrl(fd, DPAA2_FD_CTRL_ASAL | FD_CTRL_PTA | FD_CTRL_PTV1); return 0; @@ -464,8 +463,7 @@ static int build_single_fd(struct dpaa2_eth_priv *priv, dpaa2_fd_set_offset(fd, (u16)(skb->data - buffer_start)); dpaa2_fd_set_len(fd, skb->len); dpaa2_fd_set_format(fd, dpaa2_fd_single); - dpaa2_fd_set_ctrl(fd, DPAA2_FD_CTRL_ASAL | DPAA2_FD_CTRL_PTA | - DPAA2_FD_CTRL_PTV1); + dpaa2_fd_set_ctrl(fd, DPAA2_FD_CTRL_ASAL | FD_CTRL_PTA | FD_CTRL_PTV1); return 0; } @@ -653,7 +651,7 @@ static void dpaa2_eth_tx_conf(struct dpaa2_eth_priv *priv, /* We only check error bits in the FAS field if corresponding * FAERR bit is set in FD and the FAS field is marked as valid */ - has_fas_errors = (fd_errors & DPAA2_FD_CTRL_FAERR) && + has_fas_errors = (fd_errors & FD_CTRL_FAERR) && !!(dpaa2_fd_get_frc(fd) & DPAA2_FD_FRC_FASV); if (net_ratelimit()) netdev_dbg(priv->net_dev, "TX frame FD error: %x08\n", diff --git a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h index e6d28a249fc1..dfbb60b15555 100644 --- a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h +++ b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h @@ -120,23 +120,14 @@ struct dpaa2_eth_swa { #define DPAA2_FD_FRC_FASWOV 0x0800 #define DPAA2_FD_FRC_FAICFDV 0x0400 -/* Error bits in FD CTRL */ -#define DPAA2_FD_CTRL_UFD 0x00000004 -#define DPAA2_FD_CTRL_SBE 0x00000008 -#define DPAA2_FD_CTRL_FSE 0x00000010 -#define DPAA2_FD_CTRL_FAERR 0x00000020 - -#define DPAA2_FD_RX_ERR_MASK (DPAA2_FD_CTRL_SBE | \ - DPAA2_FD_CTRL_FAERR) -#define DPAA2_FD_TX_ERR_MASK (DPAA2_FD_CTRL_UFD | \ - DPAA2_FD_CTRL_SBE | \ - DPAA2_FD_CTRL_FSE | \ - DPAA2_FD_CTRL_FAERR) +#define DPAA2_FD_RX_ERR_MASK (FD_CTRL_SBE | FD_CTRL_FAERR) +#define DPAA2_FD_TX_ERR_MASK (FD_CTRL_UFD | \ + FD_CTRL_SBE | \ + FD_CTRL_FSE | \ + FD_CTRL_FAERR) /* Annotation bits in FD CTRL */ #define DPAA2_FD_CTRL_ASAL 0x00020000 /* ASAL = 128 */ -#define DPAA2_FD_CTRL_PTA 0x00800000 -#define DPAA2_FD_CTRL_PTV1 0x00400000 /* Frame annotation status */ struct dpaa2_fas { diff --git a/drivers/staging/fsl-mc/include/dpaa2-fd.h b/drivers/staging/fsl-mc/include/dpaa2-fd.h index 992fdc7ba5b8..72328415c26d 100644 --- a/drivers/staging/fsl-mc/include/dpaa2-fd.h +++ b/drivers/staging/fsl-mc/include/dpaa2-fd.h @@ -101,6 +101,18 @@ struct dpaa2_fd { #define FL_FINAL_FLAG_MASK 0x1 #define FL_FINAL_FLAG_SHIFT 15 +/* Error bits in FD CTRL */ +#define FD_CTRL_ERR_MASK 0x000000FF +#define FD_CTRL_UFD 0x00000004 +#define FD_CTRL_SBE 0x00000008 +#define FD_CTRL_FLC 0x00000010 +#define FD_CTRL_FSE 0x00000020 +#define FD_CTRL_FAERR 0x00000040 + +/* Annotation bits in FD CTRL */ +#define FD_CTRL_PTA 0x00800000 +#define FD_CTRL_PTV1 0x00400000 + enum dpaa2_fd_format { dpaa2_fd_single = 0, dpaa2_fd_list,