Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp4338995rwr; Mon, 8 May 2023 06:28:01 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7lMgUnLzauh1vEQGkuMNlcpmM28GgbjtrQLa1HdiqG/op13GR3bSxAK0V212BmuzcrQBBs X-Received: by 2002:a17:90a:608f:b0:250:2384:120d with SMTP id z15-20020a17090a608f00b002502384120dmr9964811pji.19.1683552481528; Mon, 08 May 2023 06:28:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683552481; cv=none; d=google.com; s=arc-20160816; b=kvH1G1kJrdsCvP5QALDnwNVwkTzZZL9v6dcbM9kxkzmT+wGI2eJknIj5dodvV7qlTK W5YRlaIb3bAzfuyBiTkxz2V0sHEfVW6W3AtphIrx7hZvTG2hflSsiDwXX+H0aHvRhCRl 6UiHByY1VMuHY+rHwfF+bBdsRx4nYhw8g31b1hhK+saDuTPfd4Xbpini1OvbELFo36fF M2lfXjJXdbviGZUumgfgUl7CpEFjnb6Yd1aJts1MAM1GEc2u8+xUoLRi9SE+4rzZnFH8 JUYOuF2oJ3UbsXyxun60VXpq6x/3huh+cCHQiraOWpbfmc9XvPKlpY2pDS57Ql3X5eek ut/w== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=oR0ux02cTKCMPN51pvi7thJZwOWgPNuI2QEnagT1mkw=; b=SDZLANwTioLi2WUAnSK32GiFi5YZ0Vf3F9iKOtpUV5cNKB2c1KgM81DhDkCEbtjyEo +N55GlC7qVYp5IjtJZXxCFx0a2PFMUs/iL3S95BYb+1qnLhM2KNfReOa0V9h+SIfHt4q ZY2TShCKHKlSTexCc/X+SUcd/nbmWXtDo8v9HFNQhW/Iidz4jjwi1qtgNDQTDmeix9+L uretDB9h2zbYZuR+kJkwMl0GPGWK9OIox6QXnCXsXwqQSk8QxwLkzlYeBIzv3XtcHnhq al64PZPjcwS4D+2QOQllBWaf3+7V6z5nVZjf/9uTnSulyAClms+zWJNmi6mKEvsZ8AYh 87Xw== 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 v69-20020a638948000000b00524f1f0d020si8689838pgd.465.2023.05.08.06.27.47; Mon, 08 May 2023 06:28:01 -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 S232166AbjEHNVX (ORCPT + 99 others); Mon, 8 May 2023 09:21:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39524 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234079AbjEHNVQ (ORCPT ); Mon, 8 May 2023 09:21:16 -0400 Received: from mx1.zhaoxin.com (MX1.ZHAOXIN.COM [210.0.225.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 506B73C1F2 for ; Mon, 8 May 2023 06:21:03 -0700 (PDT) X-ASG-Debug-ID: 1683552059-086e237e536e4c0002-xx1T2L Received: from ZXSHMBX1.zhaoxin.com (ZXSHMBX1.zhaoxin.com [10.28.252.163]) by mx1.zhaoxin.com with ESMTP id 9h1FKH5Gja8TH081 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Mon, 08 May 2023 21:20:59 +0800 (CST) X-Barracuda-Envelope-From: WeitaoWang-oc@zhaoxin.com X-Barracuda-RBL-Trusted-Forwarder: 10.28.252.163 Received: from zxbjmbx1.zhaoxin.com (10.29.252.163) by ZXSHMBX1.zhaoxin.com (10.28.252.163) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Mon, 8 May 2023 21:20:59 +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; Mon, 8 May 2023 21:20:58 +0800 X-Barracuda-RBL-Trusted-Forwarder: 10.28.252.163 From: Weitao Wang X-Barracuda-RBL-Trusted-Forwarder: 10.29.252.163 To: , , , CC: , Subject: [PATCH v4 1/4] xhci: Fix resume issue of some ZHAOXIN hosts Date: Tue, 9 May 2023 05:20:55 +0800 X-ASG-Orig-Subj: [PATCH v4 1/4] xhci: Fix resume issue of some ZHAOXIN hosts Message-ID: <20230508212058.6307-2-WeitaoWang-oc@zhaoxin.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20230508212058.6307-1-WeitaoWang-oc@zhaoxin.com> References: <20230508212058.6307-1-WeitaoWang-oc@zhaoxin.com> 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: ZXSHMBX1.zhaoxin.com[10.28.252.163] X-Barracuda-Start-Time: 1683552059 X-Barracuda-Encrypted: ECDHE-RSA-AES128-GCM-SHA256 X-Barracuda-URL: https://10.28.252.35:4443/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at zhaoxin.com X-Barracuda-Scan-Msg-Size: 1239 X-Barracuda-BRTS-Status: 1 X-Barracuda-Bayes: INNOCENT GLOBAL 0.0001 1.0000 -2.0205 X-Barracuda-Spam-Score: 1.09 X-Barracuda-Spam-Status: No, SCORE=1.09 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.108487 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. So, Add XHCI_RESET_ON_RESUME quirk for ZX-100 to fix issue of resuming from system Sx state. Cc: stable@vger.kernel.org Signed-off-by: Weitao Wang --- v3->v4 - Add xHCI quirks for ZHAOXIN to every independent patch. - Modify some description of this patch series. drivers/usb/host/xhci-pci.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c index ddb79f23fb3b..46d4d642c9bd 100644 --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c @@ -527,6 +527,11 @@ 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) { + if (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