Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3798112imm; Sat, 21 Jul 2018 03:32:15 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdXi8bi4FGtotlGeGgTccK09ZJp4vlTIRoFRo3yWmv3YqO69hA4dCvPPdQA6tG2MiIOg2/F X-Received: by 2002:a17:902:d716:: with SMTP id w22-v6mr5368781ply.98.1532169135552; Sat, 21 Jul 2018 03:32:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532169135; cv=none; d=google.com; s=arc-20160816; b=Pa3w0XFs5CPmvXxh32w5uL1AzGhCko1UnGNdIZX4vzkxgi25knpdPCfdBTYJyDshLf gAIqK7sor0jt32XdwGXrgyFwLCTeqHSlpTi6A20Y8jNIL5IPiHpeowzFdh+469/so5W2 MiSyvniPIUCmqteDYVcwMLzYfLp5vpTM0TYUet4HyjtlC9P5OOIgJ6cmuZJpHJm+OVqd kqCAOAdvDk3hxX8i2v9k+r0HRN7jzw5djoeGxfsmyIrS7IzvUPZ/TcG0qem03K2m7H9i M0sKMw6zyXuTxx9a71YiNh3yXy5arXHTszEo7twteZ5htO1cDNZCgGcZHAQD/M71zYTB fiTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:message-id:date:subject:cc:to :from:dkim-signature:arc-authentication-results; bh=bWnRNi4IotDrpPxwcjgBF36pJITK1s+aFrYuuN5nKWg=; b=ZABcKqXiSW843RB8bxhalBnbK+s4sQ5yK6gaoVSzAZ5A9+8UeqBmjz5wx6h9Kp3NZ9 AZ8gawEX8pqi5MEYkwlO4KGMk6iaMVw0j1o5zIbt4J+odLvXHHTlO73VmZVX0yNcrYKi Wm5r6u6wEIAlZfqjgDdmh+QoSCTkk2TNvY+H9prJWpGSa9JOpj+ly59r/mgrnVUZlVjW 9TsImZc8Y689+Uo+UzOVfkR7sB872Y9PU2pPmTad58djInlqJBSWVPQLaZtIpltZHSnb 1csBuWULGTi1Ng9tI4Nxn3JP6aiuWx8/QQl6mELOeCb7/sTQCo0QXE4WgByIyZKOSj5W 0BGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@xilinx.onmicrosoft.com header.s=selector1-xilinx-com header.b=KEpLdMVO; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x23-v6si3854503pfk.25.2018.07.21.03.31.28; Sat, 21 Jul 2018 03:32:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@xilinx.onmicrosoft.com header.s=selector1-xilinx-com header.b=KEpLdMVO; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727549AbeGULVV (ORCPT + 99 others); Sat, 21 Jul 2018 07:21:21 -0400 Received: from mail-bl2nam02on0046.outbound.protection.outlook.com ([104.47.38.46]:20992 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727422AbeGULVU (ORCPT ); Sat, 21 Jul 2018 07:21:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector1-xilinx-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=bWnRNi4IotDrpPxwcjgBF36pJITK1s+aFrYuuN5nKWg=; b=KEpLdMVOcKAKwUhEJ8JIL/NgXGhBo6yI02l7YPKx+CWfSEyiJAK1qFFJ+gLDP+UkpsOPuMKKj91mxqK+ko3pP6ZbL+dBGJ81XxO/P/eZVT7YFGqx8hGLvYz60eh620faUC3qZbVRW7uZabTVGzUP4NcysP5lLWanXeUgNbKMVoI= Received: from MWHPR02CA0059.namprd02.prod.outlook.com (2603:10b6:301:60::48) by BY2PR02MB092.namprd02.prod.outlook.com (2a01:111:e400:2c1c::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.952.20; Sat, 21 Jul 2018 10:29:00 +0000 Received: from SN1NAM02FT036.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e44::207) by MWHPR02CA0059.outlook.office365.com (2603:10b6:301:60::48) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.973.16 via Frontend Transport; Sat, 21 Jul 2018 10:28:59 +0000 Authentication-Results: spf=pass (sender IP is 149.199.60.83) smtp.mailfrom=xilinx.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=bestguesspass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.60.83 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.60.83; helo=xsj-pvapsmtpgw01; Received: from xsj-pvapsmtpgw01 (149.199.60.83) by SN1NAM02FT036.mail.protection.outlook.com (10.152.72.149) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.952.17 via Frontend Transport; Sat, 21 Jul 2018 10:28:59 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66] helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw01 with esmtp (Exim 4.63) (envelope-from ) id 1fgp8E-0007UK-Nx; Sat, 21 Jul 2018 03:28:58 -0700 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1fgp89-0005g0-Kg; Sat, 21 Jul 2018 03:28:53 -0700 Received: from xsj-pvapsmtp01 (xsj-smtp1.xilinx.com [149.199.38.66]) by xsj-smtp-dlp1.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id w6LASgjY026745; Sat, 21 Jul 2018 03:28:42 -0700 Received: from [172.23.64.8] (helo=xhdvnc108.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1fgp7y-0005eL-7i; Sat, 21 Jul 2018 03:28:42 -0700 Received: by xhdvnc108.xilinx.com (Postfix, from userid 15427) id 6788C604CB; Sat, 21 Jul 2018 15:58:41 +0530 (IST) From: Anurag Kumar Vulisha To: , , , CC: , , , , Anurag Kumar Vulisha Subject: [PATCH] usb: dwc3: core: Add quirk for enabling AutoRetry feature in the controller Date: Sat, 21 Jul 2018 15:58:40 +0530 Message-ID: <1532168920-3269-1-git-send-email-anurag.kumar.vulisha@xilinx.com> X-Mailer: git-send-email 2.1.1 X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.2.0.1013-23620.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:149.199.60.83;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(396003)(376002)(346002)(136003)(39860400002)(2980300002)(438002)(199004)(189003)(2616005)(106466001)(356003)(476003)(126002)(551934003)(486006)(186003)(26005)(1857600001)(336012)(51416003)(47776003)(90966002)(305945005)(107886003)(39060400002)(4326008)(6266002)(316002)(5660300001)(50226002)(110136005)(48376002)(54906003)(16586007)(42186006)(2906002)(103686004)(8936002)(478600001)(106002)(50466002)(52956003)(575784001)(63266004)(426003)(36756003)(8676002)(81156014)(81166006)(36386004)(107986001);DIR:OUT;SFP:1101;SCL:1;SRVR:BY2PR02MB092;H:xsj-pvapsmtpgw01;FPR:;SPF:Pass;LANG:en;PTR:unknown-60-83.xilinx.com;A:1;MX:1; X-Microsoft-Exchange-Diagnostics: 1;SN1NAM02FT036;1:mNFYa9v3OBh275SZaOofOvjBAbVMfUXcCvY+NvOFL1rKfTOG7cKgu4DqbMHzg8myHeQL0az4HxPxqYe3e9Wm1P612p7IBAwGq1mveo1LgW1ZsUmHJjjIzJjJr/K4/Fc7 MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 119c013f-5926-4396-b03e-08d5eef4c574 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989117)(5600073)(711020)(4608076)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(2017052603328)(7153060);SRVR:BY2PR02MB092; X-Microsoft-Exchange-Diagnostics: 1;BY2PR02MB092;3:3+7rt/D2hZMc3gOLm/q8Dk3Y711nyaO+uDzlDQ/qyytLXjn9SMuulpqSesEq3w3YveUh7bFMHmjlKQ5n5MW+7HrPugDuswS8cXIchxqKfTvzZnyTjJjU+n4QRogjhvgN/hZdtP/GRoY8h8x/4zrZ+Ou6zJdw2w4oYuy6n4pEuM+oWM67LVPWFAfQyMHeHVSl8Cg3UCtWb9GDTzVNtX4EnCn/Yyf/w/0NYrVdqMc7XHl8rRf/+U+ixexct65/7JJxSMsV+Ym+WwP5KGXlIA3pFl6+9dMx0KcbbXCubLt/bORwul4gzRaenCxg1TeJ/LqjlW7pPfOOve/M4Zz4OvgqcGemFW1FVZtkQ+LqERNdu/s=;25:tg/ALE5+yLgN9JdHexW/R4CoXy5edgAcz7pKsTsaBC0Wc2DI06yoTz1Q64u6lSg4qtJmzTlt0FUXIh338ezb5nW/7yAIB7r2DKECrYEU541zinYzzBf29wJPhq+VFhzw+7vNEniU2NMUU8lHiXFe24i3J/o+gxHbIhFylgdYn1oBUJKBvPYXhxCZvQjQOA2Qgrvi6rcWT2jGidGGMpeVF9ICL6SkNm6YuUCpxmRkbONSQaN1Mpyz+8k46q3LyI8a8F/aStPMmEEs/R3g9NE6RntauoLXg6i1NjYocuJeDPdp0XHcRkzO3qk6EfoUMoGVYSBouwqu0N+ye3J42GdGsLg/8YJvER58njYO6jfEwKo= X-MS-TrafficTypeDiagnostic: BY2PR02MB092: X-Microsoft-Exchange-Diagnostics: 1;BY2PR02MB092;31:+uOLEbuVxRfuDEzXcrO7hsvweh1t7TlUCjIhuWB0zT/EJXa4/ZxCozRILhKxiev0Z0ZE50z4yQJEFR+meORs21uZbeuJhM376SWgnMfk/9Zy7mOBx2oc3gbw6xhBCe1jIahYbbVDa9CdDElJ1DZt1HtVqNyH9FT9D8yOlcedXm5sSa9IeWX/PnlT89K1h8G2gNPIY7fTeOy2x/NCJGdepV3WFcr8KwkCR36P/8QB+is=;20:T3xI8w5XY2M7fS5YwvDTxYBIfS/upbQf/hlOU8EvAOxQD9Q9is3JHrI3t6amTM/jkmDsZTXvuJghE/D8cNsCN+2fB+nAKGjPDGAJE/0pDzFFQxkOM24nLPYYQ0bEtvmPT+8CLHSGmD+RrmC1rpILrC3s46irOyxAYZhPsrVVkk1SJ63OCzrw3EaGoiMy5NZmERrNqexDnxAgT+5wq98BGyOsN9guPcYIs0Ibl7aLdDj8ylA8pHMPcJ9KNrJYMa/lrYF2B2IVnhZ+qxC3XMkCXpdhuVmBtz1Nz7JIBKuSdBN6fKwHUK9VnXq97sQYuO9Jg6nztkh3ijq6Mw09G8nCJpRjx2+mDAjkzPYhnb3vHbWvBOETQYS+0stWi1h0xX7zg8dDmrzXaQRrPvsrsLLYO9Y9c/KP27qiN/U5qdPbB/WrF2DR8/uQ0/Fe86kKRAo7ugvXGWIgYHGxn356qA7zqnU2aWC7dMoJi+xRKX7XF55JuBmi29znAdqtxb2YnEV2 X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(192813158149592); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3231311)(944501410)(52105095)(3002001)(93006095)(93004095)(10201501046)(6055026)(149027)(150027)(6041310)(20161123564045)(20161123558120)(20161123560045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011)(7699016);SRVR:BY2PR02MB092;BCL:0;PCL:0;RULEID:;SRVR:BY2PR02MB092; X-Microsoft-Exchange-Diagnostics: 1;BY2PR02MB092;4:QS2d47NOcPC6qXPBYOTgjdHrlvPR1DkV8EROawlZPJQltcPH02bGQl5mVUXbIE2VcP30kfKTdYETAhLwhH5WBdRd+vcqz7HgN0F0dJOlLPJbO1388YJK8xbyfCQgO9/6i/o0ZzV4+xb/2SbfSxznt18Rb+xgGYkqtcs48M1+cIesH8HQzEegot4dfU7Zc9WFt5VkoYGbU28fMUUKmMGeY2EWSbCPHwj2G0z02LSsokjWEcab1wtdlEPgWF8ws4OjlyvQCTTTlzJUHfHyedpF9t340oFHnjaCwtlXuinQnOeT7MLz8Q2nCKWbHJ3LLQH9 X-Forefront-PRVS: 074040B844 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BY2PR02MB092;23:zVDI/71V69VXemA0S4IUkIUzVxBPS3kIJHApOFiLp1?= =?us-ascii?Q?B199rIIMmYhbHM5tRZROZQsVRM/eGJxP2S3Dlqkx8bIJ2THj8K8lXmboHGWq?= =?us-ascii?Q?Scuf8es/720g6HPW1Gt8pOjcSFp32uLnTYAHHlyEzpYXWEOr+IACP4gswCeq?= =?us-ascii?Q?nYeBfBef6Pjuf9gOrgFpwzld7AT97ao18h4WuypSD8zbAnP2ShVFkmD9L1YW?= =?us-ascii?Q?ieYcfNeDb0SAyj03zhgdrrRYO9GmhY0MBONbDyQ33Dwxbxbvvjv7iqRWcA9K?= =?us-ascii?Q?12IdrCVBWXSwALsdp5f64aRFoFQT32UzlcBFpI0H5k5/81nu4q6k+197AazQ?= =?us-ascii?Q?VETSl7U/nqXzWZqMvn7nWaVUuU0PTPM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rTQaUdrX7RIQMON9PmjpNMKTQ= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;BY2PR02MB092;7:meMuCqgQMSJ7wstX2dDtFGqN2V6OyQLHUnOC0vOgHT3FzsTa7WmO/RXmWXxBqeHrPpESPNprebMLBL+5Zw1ncKCILR0T32mYvZRFL2d/nxmIkmU9hgn3D0ikEcMDt8M4zwr73y+WLJojcgT5vEvYazjzpc9fgmVzGv963cxf4D0nq6uqZ54OWuxfAQWlqrPyIJQYmqfGInHBfcYXIihPQs8Fm+JxCw8hw6cWwvdpUVhv+sCBaOQ0X9l798IFhtK6 X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jul 2018 10:28:59.1389 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 119c013f-5926-4396-b03e-08d5eef4c574 X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c;Ip=[149.199.60.83];Helo=[xsj-pvapsmtpgw01] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR02MB092 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org By default when core sees any transaction error(CRC or overflow) it replies with terminating retry ACK (Retry=1 and Nump == 0). Enabling this Auto Retry feature in controller, on seeing any transaction errors makes the core to send an non-terminating ACK transaction packet (that is, ACK TP with Retry=1 and Nump != 0). Doing so will give controller a chance to recover from the error condition. Signed-off-by: Anurag Kumar Vulisha --- Documentation/devicetree/bindings/usb/dwc3.txt | 5 +++++ drivers/usb/dwc3/core.c | 16 ++++++++++++++++ drivers/usb/dwc3/core.h | 6 ++++++ 3 files changed, 27 insertions(+) diff --git a/Documentation/devicetree/bindings/usb/dwc3.txt b/Documentation/devicetree/bindings/usb/dwc3.txt index 7f13ebe..2ba2bc2 100644 --- a/Documentation/devicetree/bindings/usb/dwc3.txt +++ b/Documentation/devicetree/bindings/usb/dwc3.txt @@ -94,6 +94,11 @@ Optional properties: this and tx-thr-num-pkt-prd to a valid, non-zero value 1-16 (DWC_usb31 programming guide section 1.2.3) to enable periodic ESS TX threshold. + - snps,enable_auto_retry: Set to enable Auto retry Feature to make the + controller operating in Host mode on seeing transaction + errors(CRC errors or internal overrun scenerios) on IN + transfers to reply to the device with a non-terminating + retry ACK (i.e, an ACK TP with Retry=1 & Nump != 0) - tx-fifo-resize: determines if the FIFO *has* to be reallocated. diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index 1038075..1c1ab93 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -883,6 +883,20 @@ static int dwc3_core_init(struct dwc3 *dwc) dwc3_writel(dwc->regs, DWC3_GUCTL1, reg); } + if (dwc->autoretry_enable) { + reg = dwc3_readl(dwc->regs, DWC3_GUCTL); + + /* Enable Auto retry Feature to make the controller operating in + * Host mode on seeing transaction errors(CRC errors or internal + * overrun scenerios) on IN transfers to reply to the device + * with a non-terminating retry ACK (i.e, an ACK transcation + * packet with Retry=1 & Nump != 0) + */ + reg |= DWC3_GUCTL_HSTINAUTORETRY; + + dwc3_writel(dwc->regs, DWC3_GUCTL, reg); + } + /* * Must config both number of packets and max burst settings to enable * RX and/or TX threshold. @@ -1179,6 +1193,8 @@ static void dwc3_get_properties(struct dwc3 *dwc) dwc->dis_metastability_quirk = device_property_read_bool(dev, "snps,dis_metastability_quirk"); + dwc->autoretry_enable = device_property_read_bool(dev, + "snps,enable_auto_retry"); dwc->lpm_nyet_threshold = lpm_nyet_threshold; dwc->tx_de_emphasis = tx_de_emphasis; diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h index 285ce0e..558dfda 100644 --- a/drivers/usb/dwc3/core.h +++ b/drivers/usb/dwc3/core.h @@ -227,6 +227,9 @@ #define DWC3_GCTL_GBLHIBERNATIONEN BIT(1) #define DWC3_GCTL_DSBLCLKGTNG BIT(0) +/* Global User Control Register */ +#define DWC3_GUCTL_HSTINAUTORETRY BIT(14) + /* Global User Control 1 Register */ #define DWC3_GUCTL1_TX_IPGAP_LINECHECK_DIS BIT(28) #define DWC3_GUCTL1_DEV_L1_EXIT_BY_HW BIT(24) @@ -984,6 +987,8 @@ struct dwc3_scratchpad_array { * 2 - No de-emphasis * 3 - Reserved * @dis_metastability_quirk: set to disable metastability quirk. + * @autoretry_enable: set to enable AutoRetry feature in controller to + * give an non terminating retry ACK (Retry=1 & Nump != 0) * @imod_interval: set the interrupt moderation interval in 250ns * increments or 0 to disable. */ @@ -1153,6 +1158,7 @@ struct dwc3 { unsigned tx_de_emphasis:2; unsigned dis_metastability_quirk:1; + unsigned autoretry_enable:1; u16 imod_interval; }; -- 2.1.1