Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp1158697lqb; Thu, 30 May 2024 01:53:26 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWufVYDvFANsX+CunzOeEOyqtOF2dOClJgzc/mubQCvyYnaJXjMonvlAlSXyTtfT3G/CmywsgkLLRArnbY9RhoNDlBG7nmvwle6esejmA== X-Google-Smtp-Source: AGHT+IGc7uoF7bm8sxqdb9pGmJUs9p/tFNVsmb71f3I7F450HVFhy17d+gi73m/WXL5BtXsCnjkR X-Received: by 2002:a05:6214:5245:b0:6ad:9df2:4837 with SMTP id 6a1803df08f44-6ae0cb1ebf2mr17450786d6.25.1717059205664; Thu, 30 May 2024 01:53:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717059205; cv=pass; d=google.com; s=arc-20160816; b=EV9fVrxqjRO3Y+UMC9ev39EzzvlMpTeWAHXAzyrpSbwaRi2EAk1l+d6RUOQ9aIh/y2 qgGmQ+qUgXiMYk079WwGkaawANi1gFWRpkUqDBB24n6uXdh9UYkBc21/LLp442UKkq1k CsHM0zGuQ012DZkV9PoFwTamEQ0w3RGgff72KeoV2tIfgNZKtCfgwrm/MOgUJdOYK/ve qFuUi4DDXC1Z0e1iulMHi2r3WvH5cTSV8GZhJmuGnL6OkBJmBNqFYMhfrkspZdjfEm5f 5j9yinncJR410hFI0X2ZnNG5Dc02lm/hvmRtV0vJN6mVDoJvd0g/gDA3vH5SZafgxoOL u7Fg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=4vdjuyTFJSa1yvWPwCMbJNz87HxC5Wp+l/buNmOANr4=; fh=cyRTCLi2jrhBQpd4YvrHMIdqtbGJEMIBXDxqKhwvmVM=; b=VZRYiBybrG6R/UfKeCS/T1W1gvs6BaEriDjU6T/q5sRyF5OzUaH2T5bVlfFFyB1crU qMTC5NsXEN3qrNxrA2s+X5fpAj8dQoxPl704vSigvi4OhQvdo2/ryzPKjuwyrXIWe88D vv8mlQF+1RlIbNWww3Gh/cLXC1dC/roCsufMxCvznyh8vIcJiymWLZiMruHCeof8dZ3P 1x9Jo7upMAhCz7Yg3+l9vDU6+/O6JlOvG70o9R1Zyror7Zpzs0R8WVVcV7B7XHu9Epot 5+tpsqZ+MiOO8u+GciVRi96zamf/W9Juj6VLJFygHd6oiluQ6g37hcmrEGEj6tO79YwL WMGw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=pEI9ecVH; arc=pass (i=1 spf=pass spfdomain=canonical.com dkim=pass dkdomain=canonical.com dmarc=pass fromdomain=canonical.com); spf=pass (google.com: domain of linux-kernel+bounces-195096-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-195096-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id 6a1803df08f44-6ae11e42d3esi6478366d6.611.2024.05.30.01.53.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 May 2024 01:53:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-195096-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=pEI9ecVH; arc=pass (i=1 spf=pass spfdomain=canonical.com dkim=pass dkdomain=canonical.com dmarc=pass fromdomain=canonical.com); spf=pass (google.com: domain of linux-kernel+bounces-195096-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-195096-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 5D05D1C21197 for ; Thu, 30 May 2024 08:53:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7D9FC14B084; Thu, 30 May 2024 08:53:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=canonical.com header.i=@canonical.com header.b="pEI9ecVH" Received: from smtp-relay-canonical-0.canonical.com (smtp-relay-canonical-0.canonical.com [185.125.188.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A19AA6F30A; Thu, 30 May 2024 08:53:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.125.188.120 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717059184; cv=none; b=NvnQaa48Wq7HmNSCVLiU8pM863oOxUj+wdRFksxmpIXFvL+UgCLkv7z46q5XfQI0AMulwicBm4sOIzhnYRDQRkww4csU6zthdl3B2Ti2RhjZYZSc0/hMoWWEDlo2ha0BFfLT71UNEepI5Ns4iahhp7pxXyf86XSxKUmPvIgRBo0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717059184; c=relaxed/simple; bh=zcF8ynwfqox6lFxPsAnNwptrPXvGztX8lAU2EObi2J8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=dcKzY1yxF1ndTZS9uz4dpQxbsvucjKka+k7gep+mQxhBsEEdkj4kYKRqXPtAGTir20uwXuLV2b54VTpmqYrK5kFW294YWFo+WMS6kDzXXPI8Go3vETl64c1x+vw0MoyTBvyMXqDX/vxuoSAAZjFtvVfv8GA8MaIR4M9nO2ztbHk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=canonical.com; spf=pass smtp.mailfrom=canonical.com; dkim=pass (2048-bit key) header.d=canonical.com header.i=@canonical.com header.b=pEI9ecVH; arc=none smtp.client-ip=185.125.188.120 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=canonical.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=canonical.com Received: from localhost.localdomain (1.general.khfeng.us.vpn [10.172.68.174]) (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-canonical-0.canonical.com (Postfix) with ESMTPSA id BE5F940F62; Thu, 30 May 2024 08:52:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1717059180; bh=4vdjuyTFJSa1yvWPwCMbJNz87HxC5Wp+l/buNmOANr4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=pEI9ecVHNzV6y71mg4De+Vrswoxdj0S4+0ENDn0XxEDAVz80hj8K5CnUIjnkheY1D vjXOftX0sKOISXQ101kPgGL6w1kbw3kk+93JbU8AVUuQnj7Uxy1EbsPnb913iqJVrh bRirUCTT6g5rz+eftvlSDce0jK+1rZt802WbSlRTg18eeWVJ1XwTVtVBdv/DotwP1O xkvxUvsQp6E7+2pTBHi/Qmy7OCXurvzIOxDJrPiXRAisjz8VhfyFQiggqP16lM696R w9lSzo/klwhK+w/oOimobujvmWoVd6eJa2ZxkSLZ8dQn4Ckw5IXDF25DWeZx030YRI wgkLAgavYaFOw== From: Kai-Heng Feng To: bhelgaas@google.com Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, nirmal.patel@linux.intel.com, jonathan.derrick@linux.dev, ilpo.jarvinen@linux.intel.com, david.e.box@linux.intel.com, Kai-Heng Feng Subject: [PATCH 2/2] PCI: vmd: Let OS control ASPM for devices under VMD domain Date: Thu, 30 May 2024 16:52:27 +0800 Message-ID: <20240530085227.91168-2-kai.heng.feng@canonical.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240530085227.91168-1-kai.heng.feng@canonical.com> References: <20240530085227.91168-1-kai.heng.feng@canonical.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Intel SoC cannot reach lower power states when mapped VMD PCIe bridges and NVMe devices don't have ASPM configured. So set aspm_os_control attribute to let OS really enable ASPM for those devices. Fixes: f492edb40b54 ("PCI: vmd: Add quirk to configure PCIe ASPM and LTR") Link: https://lore.kernel.org/linux-pm/218aa81f-9c6-5929-578d-8dc15f83dd48@panix.com/ Signed-off-by: Kai-Heng Feng --- drivers/pci/controller/vmd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/pci/controller/vmd.c b/drivers/pci/controller/vmd.c index 87b7856f375a..1dbc525c473f 100644 --- a/drivers/pci/controller/vmd.c +++ b/drivers/pci/controller/vmd.c @@ -751,6 +751,8 @@ static int vmd_pm_enable_quirk(struct pci_dev *pdev, void *userdata) if (!(features & VMD_FEAT_BIOS_PM_QUIRK)) return 0; + pdev->aspm_os_control = 1; + pci_enable_link_state_locked(pdev, PCIE_LINK_STATE_ALL); pos = pci_find_ext_capability(pdev, PCI_EXT_CAP_ID_LTR); -- 2.43.0