From patchwork Fri Sep 24 01:01:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Hung X-Patchwork-Id: 1531985 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=s+oEV/RF; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4HFtz42rNHz9t25 for ; Fri, 24 Sep 2021 11:01:52 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1mTZb0-0005TP-Oy; Fri, 24 Sep 2021 01:01:46 +0000 Received: from smtp-relay-internal-1.internal ([10.131.114.114] helo=smtp-relay-internal-1.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1mTZav-0005SO-MB for kernel-team@lists.ubuntu.com; Fri, 24 Sep 2021 01:01:41 +0000 Received: from mail-pl1-f198.google.com (mail-pl1-f198.google.com [209.85.214.198]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 76FDF3F30E for ; Fri, 24 Sep 2021 01:01:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1632445301; bh=fVUrMyed60iAhVWOGw676zlJu89DAjbsdRtG5ReYock=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=s+oEV/RFyUja9aUSsqYQH72fpBixi2Ae3QfN7zb7irtsupVHTxJhLZfINEoWUF0pX 3Yg8cPebE0z0390yYlAsHWBvaDo+k4Pv+9m6cBRQhYmjt5Y7JGgZZ7YDxTPzgkAR3q QMcsFfMDA3tU65mZ7mRtpz4YdIeM+hSNNK08E6KHI9ldeYQUSyLn4lnQvOBu8ZQ18N Rzw5iseoX9PtPl7ayvNhKYOulJO3/NXR1yTW20VmBiT0lTds0iKfaPR5cSYFUMYxg2 CybfbuvA1JszgkqArbZ8TUIqCROWbzU/TJGly2kLfSymRJvjXNE+f6yNEXUmuJm8Wt 70DfC9/GDnimA== Received: by mail-pl1-f198.google.com with SMTP id m5-20020a170902bb8500b0013a2b785187so2289241pls.11 for ; Thu, 23 Sep 2021 18:01:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=fVUrMyed60iAhVWOGw676zlJu89DAjbsdRtG5ReYock=; b=s7iu8qT+CcbxRNLZdTOE0FeGYuQM2WrtRoHbQawBY6sJcHn8L+C7ahG4uReXl7KixB ad++77gbR5sXBzMhjtcwrumLnPhBkOtdGWx2uHpiLlS6Uu4HyV+LZu4x4H6sYovnja1n ekVnxR1KxRLLCodYkkfLbn1rx2a+fpS+TTBX5ldhUEPeImZ4MX1x+exX/nfxhCkxxqrt ImYupb4Q4Tu6utySlbTxPgpvQiE1RnN1W+JJHUBUnxyzTwnMwbjugsgn4XIshXnu5ID8 3hr0E+qQLTbXF5QT3Z435pKbn4XJeko+rZmdoEVuZUq3ti0kOPXc4sVEbP0fwC6VymY8 zSpw== X-Gm-Message-State: AOAM530tee65q1fMgphmRJPJO80ALIO9sNJZhD5jbIE169A7D7Odrcuc 1i8ZZ1yeOtL9+xQvm3EJp82o3LND/imzv2ketbO5dOJW7NBcjfrpnj3wMHgYiPIxOVA7U21PVd3 0CWhFnz2rbx+RuGH/pUWW5T4azR+FbNC49XAWPHEVJQ== X-Received: by 2002:a17:90a:1944:: with SMTP id 4mr8655227pjh.62.1632445299671; Thu, 23 Sep 2021 18:01:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyfRdbUMfkEa9v0QPBu/N/VCMrQKhdDIEA9K5Lj+s5G+spbMbUgzgUiLDTvJExx+/LKQx7L8A== X-Received: by 2002:a17:90a:1944:: with SMTP id 4mr8655208pjh.62.1632445299438; Thu, 23 Sep 2021 18:01:39 -0700 (PDT) Received: from canonical.com (node-1w7jr9yebujeq5th4a1ypmfqh.ipv6.telus.net. [2001:56a:78ed:fb00::a29]) by smtp.gmail.com with ESMTPSA id x16sm7803361pgc.49.2021.09.23.18.01.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Sep 2021 18:01:38 -0700 (PDT) From: Alex Hung To: kernel-team@lists.ubuntu.com Subject: [PATCH][SRU][OEM-5.14] UBUNTU: SAUCE: usb: xhci: Enable runtime-pm by default on AMD Yellow Carp platform Date: Thu, 23 Sep 2021 19:01:36 -0600 Message-Id: <20210924010136.1670194-2-alex.hung@canonical.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210924010136.1670194-1-alex.hung@canonical.com> References: <20210924010136.1670194-1-alex.hung@canonical.com> MIME-Version: 1.0 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: Nehal Bakulchandra Shah BugLink: https://bugs.launchpad.net/bugs/1944382 AMD's Yellow Carp platform supports runtime power management for XHCI Controllers, so enable the same by default for all XHCI Controllers. Signed-off-by: Nehal Bakulchandra Shah Reviewed-by: Shyam Sundar S K Reviewed-by: Mario Limonciello Reviewed-by: Basavaraj Natikar --- drivers/usb/host/xhci-pci.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c index 5e329d3..859c8a7 100644 --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c @@ -69,6 +69,12 @@ #define PCI_DEVICE_ID_ASMEDIA_1142_XHCI 0x1242 #define PCI_DEVICE_ID_ASMEDIA_2142_XHCI 0x2142 #define PCI_DEVICE_ID_ASMEDIA_3242_XHCI 0x3242 +#define PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_1 0x161a +#define PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_2 0x161b +#define PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_3 0x161d +#define PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_4 0x161e +#define PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_5 0x15d6 +#define PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_6 0x15d7 static const char hcd_name[] = "xhci_hcd"; @@ -313,6 +319,15 @@ 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_AMD && + (pdev->device == PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_1 || + pdev->device == PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_2 || + pdev->device == PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_3 || + pdev->device == PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_4 || + pdev->device == PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_5 || + pdev->device == PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_6)) + xhci->quirks |= XHCI_DEFAULT_PM_RUNTIME_ALLOW; + if (xhci->quirks & XHCI_RESET_ON_RESUME) xhci_dbg_trace(xhci, trace_xhci_dbg_quirks, "QUIRK: Resetting on resume");