From patchwork Thu Feb 16 08:56:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AceLan Kao X-Patchwork-Id: 1743491 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=dLw2QY6K; dkim-atps=neutral Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PHTMP1mY1z240K for ; Thu, 16 Feb 2023 19:56:32 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1pSa42-0006mh-Ny; Thu, 16 Feb 2023 08:56:26 +0000 Received: from mail-pj1-f42.google.com ([209.85.216.42]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1pSa40-0006m3-Co for kernel-team@lists.ubuntu.com; Thu, 16 Feb 2023 08:56:24 +0000 Received: by mail-pj1-f42.google.com with SMTP id x4-20020a17090a388400b002349a303ca5so871199pjb.4 for ; Thu, 16 Feb 2023 00:56:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=ssaOOHNrx3XAN2igMKhbm91txRH2OUfDvPvSOJVIVfo=; b=dLw2QY6Kv4fHOwBpOsER0zg/sA9IqnRAkeUppFdJWNA1A2CwQ/qCosELsUIkKnClXw jKlNWJMuMxZqxMs9uPu+OkSJ0USlgGa3ZEbeWbmK/tXFIUFZcFib5BlTx5TdQhojL5ZG WyoD9mRVMB9kZl1fF3AM+XG81n8LmnMuo4xCnxTqALijXkoz7asn3jvb3FkAYTt3N7Oj wR/MvCjeof99utnYv6vC1SZv1ckPbxFMFenQYEb/PgVvsdYp0Z8BMS0pZ+gEreS4u4Os qBCagW6gTr83jsF+aQk8yGJFecXBYK+L0NxjMP1vKw9jH9jeCL0M3/rHCqyLvPUeVLZv jiXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:sender:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=ssaOOHNrx3XAN2igMKhbm91txRH2OUfDvPvSOJVIVfo=; b=hhzkGR4rJxY2v91sWuqNmcxn2eZvQC3ZY/6anaCk/hfhnxlUeDGgJi592W50YxJHUD mfYeIvxmO8jnxBKRQkVE3X8jXQ+rm99+hocnqt46OXLVaucZm1K0Qu4rw6Gp8iTxu1Hv JF8hyuUrPAhdPIIiJQw7RI477npsuNTNZz0Kte1X/NjUXrrwKRdTuOWnVJq1a434tdC6 D6tZnu2B9U/Enw1UeSjGbi2aEw4fs5S6WssZ9ljWZDnmFlApRa/X9d+rwpC2EVONjgjs Qjan0tolkvF/IqNCjZUTFDpTowrgxZhiMAlecBzV0og5EO8nwCf7gbvNZpbUWC5Tgohw WwRw== X-Gm-Message-State: AO0yUKWn1vWpZm9s7YmmDHv4D4TFPbAoG0QgisGqZkPsoYiT3JFrbK9l lAQbZwEgOCawvl4DzgYIBzuARv7yNOqa/x02 X-Google-Smtp-Source: AK7set8JY8jG8dNuVkRJudL4cnxXaFyFh7symkS/NpdhDpkSEd2GUiYbbM27P1PYp6a3cgrgb88hVg== X-Received: by 2002:a17:90b:3ecc:b0:231:24c1:8025 with SMTP id rm12-20020a17090b3ecc00b0023124c18025mr6323482pjb.34.1676537782389; Thu, 16 Feb 2023 00:56:22 -0800 (PST) Received: from localhost ([2001:67c:1560:8007::aac:c468]) by smtp.gmail.com with ESMTPSA id y26-20020a63b51a000000b004e8f7f23c4bsm717816pge.76.2023.02.16.00.56.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Feb 2023 00:56:22 -0800 (PST) From: AceLan Kao To: kernel-team@lists.ubuntu.com Subject: [PATCH 1/1][SRU][L][OEM-6.1] UBUNTU: SAUCE: usb: xhci: Workaround for runpm issue on AMD xHC Date: Thu, 16 Feb 2023 16:56:06 +0800 Message-Id: <20230216085606.86587-2-acelan.kao@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230216085606.86587-1-acelan.kao@canonical.com> References: <20230216085606.86587-1-acelan.kao@canonical.com> MIME-Version: 1.0 Received-SPF: pass client-ip=209.85.216.42; envelope-from=acelan@gmail.com; helo=mail-pj1-f42.google.com X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: "Chia-Lin Kao (AceLan)" BugLink: https://launchpad.net/bugs/2007530 When the xHC host is runtime suspended, the device connects to it will be disconnected while trying to use it. The quirk in commit 2a632815683d ("usb: xhci: Workaround for S3 issue on AMD SNPS 3.0 xHC") also works for this issue, so added its ID to the quirk, too. 05:00.0 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] Device [1022:1505] (prog-if 30 [XHCI]) Subsystem: Dell Device [1028:0c3f] Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+ Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- SERR- Kernel driver in use: xhci_hcd Kernel modules: xhci_pci [ 20.769275] xhci_hcd 0000:05:00.0: xHCI host not responding to stop endpoint command [ 20.771429] xhci_hcd 0000:05:00.0: xHCI host controller not responding, assume dead [ 20.771444] xhci_hcd 0000:05:00.0: HC died; cleaning up [ 20.771733] usb 5-1: USB disconnect, device number 2 (Cherry picked from commi https://www.spinics.net/lists/kernel/msg4689370.html) Cc: stable@vger.kernel.org #v4.19+ Change-Id: I16f7b53e64c58b094b8050b8adc82d7f91a4d94e Signed-off-by: Chia-Lin Kao (AceLan) --- drivers/usb/host/xhci-pci.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c index f98cf30a3c1a5..493a5daf3bb93 100644 --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c @@ -174,7 +174,9 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci) (pdev->device == 0x15e0 || pdev->device == 0x15e1)) xhci->quirks |= XHCI_SNPS_BROKEN_SUSPEND; - if (pdev->vendor == PCI_VENDOR_ID_AMD && pdev->device == 0x15e5) { + if (pdev->vendor == PCI_VENDOR_ID_AMD && + (pdev->device == 0x15e5 || + pdev->device == 0x1505)) { xhci->quirks |= XHCI_DISABLE_SPARSE; xhci->quirks |= XHCI_RESET_ON_RESUME; }