Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp109126rwr; Wed, 19 Apr 2023 18:50:41 -0700 (PDT) X-Google-Smtp-Source: AKy350b/E/jPq+iscwm9iWr9RqIUWLHCaK3c8wboG2UXqCs64X/BE1T+zPeOFDTWJAGD6489byJv X-Received: by 2002:a05:6a20:3d0f:b0:ef:4321:a8a4 with SMTP id y15-20020a056a203d0f00b000ef4321a8a4mr778430pzi.44.1681955440505; Wed, 19 Apr 2023 18:50:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681955440; cv=none; d=google.com; s=arc-20160816; b=rFUUbclAAuDhw4dfJvIREzEGb1EBeEeWeWwVClT35W/gvwuH98Cm/Q71sco4oi3t33 Y1MTcRTC3N8Lqmq5W7nggAR/312EjVuCBoVxZI5qErbLnkHYzL8ctyYL2m7mFO27lDy7 6q+MNbCpydxeYplkpz1/y/N/FruMKBah54DN4GRF1PA9JFnhkgMpy2dSFwWvnradI+BS s5dJqnawHdfRuwjUL2xJGmgaFeeryjM/f2Jegx06/l3jArj3AaS1JR2F56uPibo4v5fe VbBP5rh4OqMxrXYt9crpi3z8DAKp7Fy08arUNNg+0Py5P7AtIHauRHV4QdZNOL+HeY2A oSoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=+5DGYk1wgvb4Wa/982t4viEsRKwA6upUpGrnomuRjmo=; b=0c6KSzws+ogHHDl3nkCgYSEhXE9dquM7/xhpyt9FVbcqaDvhpAILxoOvJUl8u12kDB 11/HBhCK9QMQbg5mx6lVjcE7zKUm6AmpqZ/Qi/WGfL+KEs+leFg1wPToBRHGAifUX6wx UC3YwV3N6idSw7CHU4M5iDiJDfVvppWDrkSEfo47oK9kelhzUDqLMYqQP+64dctYpnyz Nku/TSpFwgrvDexV11p6X6T0fh9HAVZK+mHmECfMxK2tN1Ve4/4QAkMFbfdepg3j221n Qbw8+FiMN4b0jKhUkC+rdTsghPEF+ij+8Q564Uuqf1FVrj3eqxa9Um0WlTWd23etUD1O arbQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y17-20020a17090aa41100b0023f000be67dsi2944548pjp.13.2023.04.19.18.50.28; Wed, 19 Apr 2023 18:50:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231175AbjDTBrG (ORCPT + 99 others); Wed, 19 Apr 2023 21:47:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47634 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229580AbjDTBrC (ORCPT ); Wed, 19 Apr 2023 21:47:02 -0400 X-Greylist: delayed 653 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Wed, 19 Apr 2023 18:47:00 PDT Received: from mx2.zhaoxin.com (mx2.zhaoxin.com [203.110.167.99]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB0F75591 for ; Wed, 19 Apr 2023 18:47:00 -0700 (PDT) X-ASG-Debug-ID: 1681954564-1eb14e63892a7b0001-xx1T2L Received: from ZXSHMBX3.zhaoxin.com (ZXSHMBX3.zhaoxin.com [10.28.252.165]) by mx2.zhaoxin.com with ESMTP id lcfoYTgH1z6X2Wio (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Thu, 20 Apr 2023 09:36:04 +0800 (CST) X-Barracuda-Envelope-From: WeitaoWang-oc@zhaoxin.com X-Barracuda-RBL-Trusted-Forwarder: 10.28.252.165 Received: from zxbjmbx1.zhaoxin.com (10.29.252.163) by ZXSHMBX3.zhaoxin.com (10.28.252.165) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Thu, 20 Apr 2023 09:36:03 +0800 Received: from L440.zhaoxin.com (10.29.8.21) by zxbjmbx1.zhaoxin.com (10.29.252.163) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Thu, 20 Apr 2023 09:36:03 +0800 X-Barracuda-RBL-Trusted-Forwarder: 10.28.252.165 From: Weitao Wang X-Barracuda-RBL-Trusted-Forwarder: 10.29.252.163 To: , , , CC: , Subject: [PATCH] xhci:fix issue with resume from system Sx state in zhaoxin platform Date: Thu, 20 Apr 2023 17:36:03 +0800 X-ASG-Orig-Subj: [PATCH] xhci:fix issue with resume from system Sx state in zhaoxin platform Message-ID: <20230420093603.3344-1-WeitaoWang-oc@zhaoxin.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.29.8.21] X-ClientProxiedBy: zxbjmbx1.zhaoxin.com (10.29.252.163) To zxbjmbx1.zhaoxin.com (10.29.252.163) X-Barracuda-Connect: ZXSHMBX3.zhaoxin.com[10.28.252.165] X-Barracuda-Start-Time: 1681954564 X-Barracuda-Encrypted: ECDHE-RSA-AES128-GCM-SHA256 X-Barracuda-URL: https://10.28.252.36:4443/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at zhaoxin.com X-Barracuda-Scan-Msg-Size: 979 X-Barracuda-BRTS-Status: 1 X-Barracuda-Bayes: INNOCENT GLOBAL 0.0019 1.0000 -2.0084 X-Barracuda-Spam-Score: 1.10 X-Barracuda-Spam-Status: No, SCORE=1.10 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=9.0 tests=DATE_IN_FUTURE_06_12, DATE_IN_FUTURE_06_12_2 X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.107658 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.01 DATE_IN_FUTURE_06_12 Date: is 6 to 12 hours after Received: date 3.10 DATE_IN_FUTURE_06_12_2 DATE_IN_FUTURE_06_12_2 X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_00,DATE_IN_FUTURE_06_12, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Zhaoxin ZX-100 project, xHCI can't work normally after resume from system Sx state. To fix this issue, when resume from system Sx state, reinitialize xHCI instead of restore. Signed-off-by: Weitao Wang --- drivers/usb/host/xhci-pci.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c index 6db07ca419c3..b0f0ed088f81 100644 --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c @@ -334,6 +334,9 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci) pdev->device == PCI_DEVICE_ID_AMD_PROMONTORYA_4)) xhci->quirks |= XHCI_NO_SOFT_RETRY; + if (pdev->vendor == PCI_VENDOR_ID_ZHAOXIN && pdev->device == 0x9202) + xhci->quirks |= XHCI_RESET_ON_RESUME; + /* xHC spec requires PCI devices to support D3hot and D3cold */ if (xhci->hci_version >= 0x120) xhci->quirks |= XHCI_DEFAULT_PM_RUNTIME_ALLOW; -- 2.32.0