get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/816107/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 816107,
    "url": "http://patchwork.ozlabs.org/api/patches/816107/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-imx/patch/20170920092441.21292-1-yinbo.zhu@nxp.com/",
    "project": {
        "id": 19,
        "url": "http://patchwork.ozlabs.org/api/projects/19/?format=api",
        "name": "Linux IMX development",
        "link_name": "linux-imx",
        "list_id": "linux-imx-kernel.lists.patchwork.ozlabs.org",
        "list_email": "linux-imx-kernel@lists.patchwork.ozlabs.org",
        "web_url": null,
        "scm_url": null,
        "webscm_url": null,
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20170920092441.21292-1-yinbo.zhu@nxp.com>",
    "list_archive_url": null,
    "date": "2017-09-20T09:24:41",
    "name": "[v1] usb: host: Implement workaround for Erratum A-007463",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "e11df0bf7ebc53c98e498a9b5c6c2b4ba90162b7",
    "submitter": {
        "id": 71513,
        "url": "http://patchwork.ozlabs.org/api/people/71513/?format=api",
        "name": "Yinbo Zhu",
        "email": "yinbo.zhu@nxp.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linux-imx/patch/20170920092441.21292-1-yinbo.zhu@nxp.com/mbox/",
    "series": [
        {
            "id": 4064,
            "url": "http://patchwork.ozlabs.org/api/series/4064/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linux-imx/list/?series=4064",
            "date": "2017-09-20T09:24:41",
            "name": "[v1] usb: host: Implement workaround for Erratum A-007463",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/4064/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/816107/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/816107/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>",
        "X-Original-To": "incoming-imx@patchwork.ozlabs.org",
        "Delivered-To": "patchwork-incoming-imx@bilbo.ozlabs.org",
        "Authentication-Results": [
            "ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)",
            "ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org\n\theader.b=\"VGvOW4VJ\"; dkim-atps=neutral",
            "spf=fail (sender IP is 192.88.168.50)\n\tsmtp.mailfrom=nxp.com; vger.kernel.org; dkim=none (message not signed)\n\theader.d=none; vger.kernel.org;\n\tdmarc=fail action=none header.from=nxp.com; "
        ],
        "Received": [
            "from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xxvtD4QY0z9sPs\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tWed, 20 Sep 2017 19:42:44 +1000 (AEST)",
            "from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dubWg-0001Ow-5t; Wed, 20 Sep 2017 09:42:38 +0000",
            "from mail-by2nam01on0085.outbound.protection.outlook.com\n\t([104.47.34.85] helo=NAM01-BY2-obe.outbound.protection.outlook.com)\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dubWb-0001J3-0N for linux-arm-kernel@lists.infradead.org;\n\tWed, 20 Sep 2017 09:42:35 +0000",
            "from BN6PR03CA0055.namprd03.prod.outlook.com (10.173.137.17) by\n\tBN6PR03MB2689.namprd03.prod.outlook.com (10.173.144.8) with Microsoft\n\tSMTP Server (version=TLS1_2,\n\tcipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id\n\t15.20.56.11; Wed, 20 Sep 2017 09:42:08 +0000",
            "from BL2FFO11FD026.protection.gbl (2a01:111:f400:7c09::155) by\n\tBN6PR03CA0055.outlook.office365.com (2603:10b6:404:4c::17) with\n\tMicrosoft SMTP Server (version=TLS1_2,\n\tcipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.56.8 via\n\tFrontend Transport; Wed, 20 Sep 2017 09:42:08 +0000",
            "from tx30smr01.am.freescale.net (192.88.168.50) by\n\tBL2FFO11FD026.mail.protection.outlook.com (10.173.161.105) with\n\tMicrosoft\n\tSMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id\n\t15.20.35.14 via Frontend Transport; Wed, 20 Sep 2017 09:42:08 +0000",
            "from titan.ap.freescale.net ([10.192.208.233])\n\tby tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id\n\tv8K9g3RH018134; Wed, 20 Sep 2017 02:42:04 -0700"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:To\n\t:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:\n\tResent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:\n\tList-Owner; bh=+21h6ghWYG6dntC71eUkEeJ+6sR1AAvGDiLQQhjt23s=;\n\tb=VGvOW4VJJL3Y3+\n\tOZ8+ubeISEHY49C0xlENX4qiStnKCKk1wly9WG0zTZ9OOsAV9Iw61hgPHqunQ5skmcT3LTlkUFwC4\n\tbghs9bMNHTCFqjz8CiBT68Q+IkH9BvzGiNh5mUjyjqHESNNefIs6+LqSrYa+dxMjcqpX+w2zjWtil\n\tkVlDJhaEadVY3g61fV3OlNeEAfybEi7yDrgg4x5ch31x3osS/VRS8bsihQXu4AdywKTpe+YQ49rqP\n\tdL1AXbEBouTFvrfhHgt0G8M4OtzD2HUJPCakB8uzkH2Fpy3bDaomQomOV8YOpgKoysTwONm6XtCvM\n\tjjrHC3noP9jL8nDV0Y1A==;",
        "Received-SPF": "Fail (protection.outlook.com: domain of nxp.com does not\n\tdesignate 192.88.168.50 as permitted sender)\n\treceiver=protection.outlook.com; \n\tclient-ip=192.88.168.50; helo=tx30smr01.am.freescale.net;",
        "From": "<yinbo.zhu@nxp.com>",
        "To": "<yinbo.zhu@nxp.com>, Rob Herring <robh+dt@kernel.org>, Mark Rutland\n\t<mark.rutland@arm.com>, Russell King <linux@armlinux.org.uk>,\n\tFelipe Balbi <balbi@kernel.org>",
        "Subject": "[PATCH v1] usb: host: Implement workaround for Erratum A-007463",
        "Date": "Wed, 20 Sep 2017 17:24:41 +0800",
        "Message-ID": "<20170920092441.21292-1-yinbo.zhu@nxp.com>",
        "X-Mailer": "git-send-email 2.14.1",
        "MIME-Version": "1.0",
        "X-EOPAttributedMessage": "0",
        "X-Matching-Connectors": "131503741286363605;\n\t(91ab9b29-cfa4-454e-5278-08d120cd25b8); ()",
        "X-Forefront-Antispam-Report": "CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI;\n\tSFV:NSPM;\n\tSFS:(10009020)(6009001)(7966004)(336005)(39380400002)(376002)(346002)(39860400002)(2980300002)(1110001)(1109001)(339900001)(199003)(189002)(68736007)(47776003)(551934003)(105606002)(50986999)(36756003)(4326008)(77096006)(1076002)(2876002)(50226002)(189998001)(33646002)(53936002)(6666003)(2870700001)(2906002)(86152003)(81166006)(7416002)(81156014)(8676002)(8936002)(356003)(5820100001)(23676002)(305945005)(50466002)(8656003)(110136005)(5660300001)(54906003)(97736004)(316002)(498600001)(85426001)(104016004)(106466001)(86362001)(575784001);\n\tDIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR03MB2689;\n\tH:tx30smr01.am.freescale.net; \n\tFPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; ",
        "X-Microsoft-Exchange-Diagnostics": [
            "1; BL2FFO11FD026;\n\t1:5ITSnHfHfN6crVJKQL1DBBz8utrI33kzS2qWDJXEojQcuYBhXRIsGwQqFyqZJoGEXpqtqEGetqdY70pUuff/qr3tf2p5ol+L0Vl2+x/isj+2SYFVeqIoMANHdYiXVPox",
            "1; BN6PR03MB2689;\n\t3:7ASQFTLpvXCNXs0SLNZ17kfBgEQg4COvDCGGU0ao5+6Ua7fJ2FPy87/r477grdA2NPGIMF6iQ4Q+2eC5z1MmN7ATpikpxDxn1WrXvh7GGO5IPWCnRwF39a4w5NnJi1Ca2Js9+ZUNynCnevRp5M9eiWUXEl7xu5mV5ADoMWr2/82t5UZlgJa/GTsLaESX2rR5mubYFpcNXF0/oJsNtj8n5/232yDjv1CFDC+iBYY1TDimu1yTQ3pFCdNMgR4+WtausHoO5GnvnU5wOUfRPQvXLVghAGsP+OHkYZdC8UN/36qGNeqB32W9Bk8BsVZn8egk6HripA0TaWQLRuo3vh0UzLIuSVOTGW+kOM7iLdqN0Ys=;\n\t25:ah8GOAcx1DyzPXKGqwmR1NWiGzi3fTTsHPVMd1EKdKy3aBQDIIRnV2rpVC5tLkAp7Q64cEfJam7wPi5X0kFHUoc2ypDfHNQ7CFH6jhraL7oQCJ5bsjP37cWyG/9QsCvetPqJ8U5lpw6qIMo26bn5FIXEm/XaSGQ3U2+krGB2VGi9MWp5NBaZVzdeXWqhrKuBqEstZYd7x3csDR3whUhWzSMtxXpI48xi5GWlwvidxPjfjQkYxEW/ljZgIS1beDPK8JqEb1Wega4JhgAdn81NNPI9WFaApZqs3HK1eI58OCD8YEe+8hhIRYFQh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        "X-MS-Office365-Filtering-Correlation-Id": "6a6663fc-6342-4f2b-31d5-08d5000bdc79",
        "X-Microsoft-Antispam": "UriScan:; BCL:0; PCL:0;\n\tRULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(300000503095)(300135400095)(2017052603199)(201703131430075)(201703131517081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);\n\tSRVR:BN6PR03MB2689; ",
        "X-MS-TrafficTypeDiagnostic": "BN6PR03MB2689:",
        "X-Exchange-Antispam-Report-Test": "UriScan:(20558992708506)(185117386973197);",
        "X-Microsoft-Antispam-PRVS": "<BN6PR03MB2689F13533F2B1BE15A7EE50E9610@BN6PR03MB2689.namprd03.prod.outlook.com>",
        "X-Exchange-Antispam-Report-CFA-Test": "BCL:0; PCL:0;\n\tRULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6095135)(2401047)(8121501046)(5005006)(100000703101)(100105400095)(10201501046)(3002001)(93006095)(93001095)(6055026)(6096035)(20161123563025)(20161123559100)(20161123556025)(20161123561025)(20161123565025)(201703131430075)(201703131433075)(201703131441075)(201703131448075)(201703161259150)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);\n\tSRVR:BN6PR03MB2689; BCL:0; PCL:0;\n\tRULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095);\n\tSRVR:BN6PR03MB2689; ",
        "X-Forefront-PRVS": "04362AC73B",
        "SpamDiagnosticOutput": "1:99",
        "SpamDiagnosticMetadata": "NSPM",
        "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "20 Sep 2017 09:42:08.4023\n\t(UTC)",
        "X-MS-Exchange-CrossTenant-Id": "5afe0b00-7697-4969-b663-5eab37d5f47e",
        "X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp": "TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e;\n\tIp=[192.88.168.50]; \n\tHelo=[tx30smr01.am.freescale.net]",
        "X-MS-Exchange-CrossTenant-FromEntityHeader": "HybridOnPrem",
        "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "BN6PR03MB2689",
        "X-CRM114-Version": "20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ",
        "X-CRM114-CacheID": "sfid-20170920_024233_215045_CC661883 ",
        "X-CRM114-Status": "GOOD (  22.93  )",
        "X-Spam-Score": "-1.9 (-)",
        "X-Spam-Report": "SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-1.9 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/,\n\tno trust [104.47.34.85 listed in list.dnswl.org]\n\t-0.0 RCVD_IN_MSPIKE_H3      RBL: Good reputation (+3)\n\t[104.47.34.85 listed in wl.mailspike.net]\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t-0.0 SPF_HELO_PASS          SPF: HELO matches SPF record\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]\n\t-0.0 RCVD_IN_MSPIKE_WL      Mailspike good senders",
        "X-BeenThere": "linux-arm-kernel@lists.infradead.org",
        "X-Mailman-Version": "2.1.21",
        "Precedence": "list",
        "List-Unsubscribe": "<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.infradead.org/pipermail/linux-arm-kernel/>",
        "List-Post": "<mailto:linux-arm-kernel@lists.infradead.org>",
        "List-Help": "<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>",
        "List-Subscribe": "<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>",
        "Cc": "\"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE\n\tBINDINGS\" <devicetree@vger.kernel.org>,\n\tMathias Nyman <mathias.nyman@intel.com>, \n\tGreg Kroah-Hartman <gregkh@linuxfoundation.org>,\n\t\"open list:DESIGNWARE USB3 DRD IP DRIVER\" <linux-usb@vger.kernel.org>,\n\topen list <linux-kernel@vger.kernel.org>,\n\t\"moderated list:ARM PORT\" <linux-arm-kernel@lists.infradead.org>",
        "Content-Type": "text/plain; charset=\"utf-8\"",
        "Content-Transfer-Encoding": "base64",
        "Sender": "\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>",
        "Errors-To": "linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org",
        "List-Id": "linux-imx-kernel.lists.patchwork.ozlabs.org"
    },
    "content": "From: \"yinbo.zhu\" <yinbo.zhu@nxp.com>\n\nWhen a transaction error (defined in Section 4.10.2.3, \"USB\nTransaction Error\" of the xHCI Specification) occurs on the\nUSB, the host controller reports this through a transfer\nevent with the completion code \"USB Transaction Error\". When\nthis happens, the endpoint is placed in the Halted state.\nIn response, software must issue a Reset Endpoint command to\ntransition the endpoint to the Stopped state. In order to\nrestart the transfer, the driver can perform either of the\nfollowing:\n• Ring the doorbell again, which restarts the transfer from\n  where it stopped, or\n• Issue a Set TR (Transfer Ring) Dequeue Pointer command for\n  the endpoint to start the transfer from a different\n  Transfer Ring pointer Consider the following scenario:\n1. The xHCI driver prepares a control transfer read to one\n   of the device's control endpoints;\n2. During the IN data stage, a transaction error occurs on\n   the USB, causing a transfer event with the completion\n   code \"USB Transaction Error\";\n3. The driver issues a Reset Endpoint command;\n4. The driver rings the doorbell of the control endpoint to\n   resume the transfer. In this scenario, the controller\n   may reverse the direction of the data stage from IN to OUT.\n   Instead of sending an ACK to the endpoint to poll for read\n   data, it sends a Data Packet (DP) to the endpoint. It\n   fetches the data from the data stage Transfer Request Block\n   (TRB) that is being resumed, even though the data buffer is\n   setup to receive data and not transmit it.\nNOTE\nThis issue occurs only if the transaction error happens during\nan IN data stage. There is no issue if the transaction error\nhappens during an OUT data stage.\n\nImpact: When this issue occurs, the device likely responds in\none of the following ways:\n• The device responds with a STALL because the data stage has\nunexpectedly changed directions. The controller then generates\na Stall Error transfer event, to which software must issue a\nReset Endpoint command followed by a Set TR Dequeue Pointer\ncommand pointing to a new Setup TRB to clear the STALL condition.\n• The device does not respond to the inverted data stage and the\ntransaction times out. The controller generates another USB\nTransaction Error transfer event, to which software likely\nperforms a USB Reset to the device because it is unresponsive.\nIt is not expected that any of these recovery steps will cause\ninstability in the system because this recovery is part of a\nstandard xHCI driver and could happen regardless of the defect.\nAnother possible system-level impact is that the controller\nattempts to read from the memory location pointed at by the Data\nStage TRB or a Normal TRB chained to it. associated with this\nTRB is intended to be written by the controller, but the\ncontroller reads from it instead. Normally, this does not cause\na problem. However, if the system has some type of memory\nprotection where this unexpected read is treated as a bus error,\nit may cause the system to become unstable or to crash.\n\nWorkaround: If a USB Transaction Error occurs during the IN\ndata phase of a control transfer, the driver must use the\nSet TR Dequeue Pointer command to either restart the data\nphase or restart the entire control transfer from the\nSetup phase.\n\nConfigs Affected:\nLS1021-20-22A-R1.0, LS1021-20-22A-R2.007463\n\nSigned-off-by: yinbo.zhu <yinbo.zhu@nxp.com>\n---\n arch/arm/boot/dts/ls1021a.dtsi |  1 +\n drivers/usb/dwc3/core.c        |  2 ++\n drivers/usb/dwc3/core.h        |  2 ++\n drivers/usb/dwc3/host.c        |  2 ++\n drivers/usb/host/xhci-plat.c   |  3 +++\n drivers/usb/host/xhci-ring.c   | 28 +++++++++++++++++++++++-----\n drivers/usb/host/xhci.h        |  3 ++-\n 7 files changed, 35 insertions(+), 6 deletions(-)",
    "diff": "diff --git a/arch/arm/boot/dts/ls1021a.dtsi b/arch/arm/boot/dts/ls1021a.dtsi\nindex 7bb9df2c1460..9f76b2b82dce 100644\n--- a/arch/arm/boot/dts/ls1021a.dtsi\n+++ b/arch/arm/boot/dts/ls1021a.dtsi\n@@ -683,6 +683,7 @@\n \t\t\tdr_mode = \"host\";\n \t\t\tsnps,quirk-frame-length-adjustment = <0x20>;\n \t\t\tsnps,dis_rxdet_inp3_quirk;\n+\t\t\tsnps,quirk_reverse_in_out;\n \t\t};\n \n \t\tpcie@3400000 {\ndiff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c\nindex 03474d3575ab..e6a3be9280b1 100644\n--- a/drivers/usb/dwc3/core.c\n+++ b/drivers/usb/dwc3/core.c\n@@ -1031,6 +1031,8 @@ static void dwc3_get_properties(struct dwc3 *dwc)\n \t\t\t\t&hird_threshold);\n \tdwc->usb3_lpm_capable = device_property_read_bool(dev,\n \t\t\t\t\"snps,usb3_lpm_capable\");\n+\tdwc->quirk_reverse_in_out = device_property_read_bool(dev,\n+\t\t\t\t\"snps,quirk_reverse_in_out\");\n \n \tdwc->disable_scramble_quirk = device_property_read_bool(dev,\n \t\t\t\t\"snps,disable_scramble_quirk\");\ndiff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h\nindex ea910acb4bb0..d4b5d8e87672 100644\n--- a/drivers/usb/dwc3/core.h\n+++ b/drivers/usb/dwc3/core.h\n@@ -1016,6 +1016,8 @@ struct dwc3 {\n \tunsigned\t\ttx_de_emphasis_quirk:1;\n \tunsigned\t\ttx_de_emphasis:2;\n \n+\tunsigned\t\tquirk_reverse_in_out:1;\n+\n \tu16\t\t\timod_interval;\n };\n \ndiff --git a/drivers/usb/dwc3/host.c b/drivers/usb/dwc3/host.c\nindex 76f0b0df37c1..1d412390b3c9 100644\n--- a/drivers/usb/dwc3/host.c\n+++ b/drivers/usb/dwc3/host.c\n@@ -101,6 +101,8 @@ int dwc3_host_init(struct dwc3 *dwc)\n \tif (dwc->usb3_lpm_capable)\n \t\tprops[prop_idx++].name = \"usb3-lpm-capable\";\n \n+\tif (dwc->quirk_reverse_in_out)\n+\t\tprops[prop_idx++].name = \"quirk-reverse-in-out\";\n \t/**\n \t * WORKAROUND: dwc3 revisions <=3.00a have a limitation\n \t * where Port Disable command doesn't work.\ndiff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c\nindex c04144b25a67..a55dcb1a476b 100644\n--- a/drivers/usb/host/xhci-plat.c\n+++ b/drivers/usb/host/xhci-plat.c\n@@ -273,6 +273,9 @@ static int xhci_plat_probe(struct platform_device *pdev)\n \tif (device_property_read_bool(&pdev->dev, \"quirk-broken-port-ped\"))\n \t\txhci->quirks |= XHCI_BROKEN_PORT_PED;\n \n+\tif (device_property_read_bool(&pdev->dev, \"quirk-reverse-in-out\"))\n+\t\txhci->quirks |= XHCI_REVERSE_IN_OUT;\n+\n \thcd->usb_phy = devm_usb_get_phy_by_phandle(sysdev, \"usb-phy\", 0);\n \tif (IS_ERR(hcd->usb_phy)) {\n \t\tret = PTR_ERR(hcd->usb_phy);\ndiff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c\nindex cc368ad2b51e..02505ace0a2e 100644\n--- a/drivers/usb/host/xhci-ring.c\n+++ b/drivers/usb/host/xhci-ring.c\n@@ -1933,11 +1933,13 @@ static int finish_td(struct xhci_hcd *xhci, struct xhci_td *td,\n \tunion xhci_trb *ep_trb, struct xhci_transfer_event *event,\n \tstruct xhci_virt_ep *ep, int *status)\n {\n+\tstruct xhci_dequeue_state deq_state;\n \tstruct xhci_virt_device *xdev;\n \tstruct xhci_ep_ctx *ep_ctx;\n \tstruct xhci_ring *ep_ring;\n \tunsigned int slot_id;\n \tu32 trb_comp_code;\n+\tu32 remaining;\n \tint ep_index;\n \n \tslot_id = TRB_TO_SLOT_ID(le32_to_cpu(event->flags));\n@@ -1959,14 +1961,30 @@ static int finish_td(struct xhci_hcd *xhci, struct xhci_td *td,\n \tif (trb_comp_code == COMP_STALL_ERROR ||\n \t\txhci_requires_manual_halt_cleanup(xhci, ep_ctx,\n \t\t\t\t\t\ttrb_comp_code)) {\n-\t\t/* Issue a reset endpoint command to clear the host side\n-\t\t * halt, followed by a set dequeue command to move the\n-\t\t * dequeue pointer past the TD.\n-\t\t * The class driver clears the device side halt later.\n+\t\t/*\n+\t\t * A-007463: After transaction error, controller switches\n+\t\t * control transfer data stage from IN to OUT direction.\n \t\t */\n-\t\txhci_cleanup_halted_endpoint(xhci, slot_id, ep_index,\n+\t\tremaining = EVENT_TRB_LEN(le32_to_cpu(event->transfer_len));\n+\t\tif (remaining && xhci_requires_manual_halt_cleanup(xhci, ep_ctx,\n+\t\t\t\t\ttrb_comp_code) &&\n+\t\t\t\t\t(xhci->quirks & XHCI_REVERSE_IN_OUT)) {\n+\t\t\tmemset(&deq_state, 0, sizeof(deq_state));\n+\t\t\txhci_find_new_dequeue_state(xhci, slot_id,\n+\t\t\t\tep_index, td->urb->stream_id, td, &deq_state);\n+\t\t\txhci_queue_new_dequeue_state(xhci, slot_id, ep_index,\n+\t\t\t\t\t\t     &deq_state);\n+\t\t\txhci_ring_cmd_db(xhci);\n+\t\t} else {\n+\t\t\t/* Issue a reset endpoint command to clear the host side\n+\t\t\t * halt, followed by a set dequeue command to move the\n+\t\t\t * dequeue pointer past the TD.\n+\t\t\t * The class driver clears the device side halt later.\n+\t\t\t */\n+\t\t\txhci_cleanup_halted_endpoint(xhci, slot_id, ep_index,\n \t\t\t\t\tep_ring->stream_id, td, ep_trb,\n \t\t\t\t\tEP_HARD_RESET);\n+\t\t}\n \t} else {\n \t\t/* Update ring dequeue pointer */\n \t\twhile (ep_ring->dequeue != td->last_trb)\ndiff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h\nindex e3e935291ed6..0109965616d6 100644\n--- a/drivers/usb/host/xhci.h\n+++ b/drivers/usb/host/xhci.h\n@@ -1780,7 +1780,7 @@ struct xhci_hcd {\n #define XHCI_STATE_DYING\t(1 << 0)\n #define XHCI_STATE_HALTED\t(1 << 1)\n #define XHCI_STATE_REMOVING\t(1 << 2)\n-\tunsigned int\t\tquirks;\n+\tu64            quirks;\n #define\tXHCI_LINK_TRB_QUIRK\t(1 << 0)\n #define XHCI_RESET_EP_QUIRK\t(1 << 1)\n #define XHCI_NEC_HOST\t\t(1 << 2)\n@@ -1821,6 +1821,7 @@ struct xhci_hcd {\n #define XHCI_LIMIT_ENDPOINT_INTERVAL_7\t(1 << 26)\n #define XHCI_U2_DISABLE_WAKE\t(1 << 27)\n #define XHCI_ASMEDIA_MODIFY_FLOWCONTROL\t(1 << 28)\n+#define XHCI_REVERSE_IN_OUT\t(1 << 29)\n \n \tunsigned int\t\tnum_active_eps;\n \tunsigned int\t\tlimit_active_eps;\n",
    "prefixes": [
        "v1"
    ]
}