From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 362DDC7EE21 for ; Wed, 3 May 2023 01:17:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229479AbjECBRe (ORCPT ); Tue, 2 May 2023 21:17:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55592 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229449AbjECBRd (ORCPT ); Tue, 2 May 2023 21:17:33 -0400 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 914BF26A9 for ; Tue, 2 May 2023 18:17:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1683076652; x=1714612652; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=qmHmFFe8wRBBKR5BT2kOJA1ftG8QxJsXeHsLaeG1+dk=; b=hAeWTo3iB8CGtIUcPwgpxTPBXJpMtiKHvP6Bppi7ofqvaQUgZbvxxxPy /OZXo08QEKWpq+LKNhYPB83SWGvdXbzQf0n7WoImdfRwfu/lkDGXdCUcO 6vBtteE/DGORYM3FGXiuuWaBdYy+8fPbo4zyYra8R/hcII6jH6+rvobff XZcGJyIy4BYO6wIQGBXMR0QTNaDp/FEcoflZGuI32WH33oMGBcubPpKka dd7+XXMHDONopZyZCVzvjyHs1aQJ6PJVZgFSyZZozVrBh1zLiuFZmPbGT XggXP07znDwiL5gmHsgxn9vIFtgftzjDde4nOXROczKVZuqVbQDi0hRjv w==; X-IronPort-AV: E=McAfee;i="6600,9927,10698"; a="337677927" X-IronPort-AV: E=Sophos;i="5.99,245,1677571200"; d="scan'208";a="337677927" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 May 2023 18:17:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10698"; a="726970866" X-IronPort-AV: E=Sophos;i="5.99,245,1677571200"; d="scan'208";a="726970866" Received: from leeliche-mobl.amr.corp.intel.com (HELO [10.209.114.176]) ([10.209.114.176]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 May 2023 18:17:31 -0700 Message-ID: <156efde9-06e5-bb5a-d9e3-8a29ade0a719@linux.intel.com> Date: Tue, 2 May 2023 18:17:31 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0 Thunderbird/102.10.0 Subject: Re: [PATCH v2 2/5] PCI/ASPM: Set ASPM_STATE_L1 only when driver enables L1.0 Content-Language: en-US To: Ajay Agarwal , Bjorn Helgaas , Vidya Sagar , Nikhil Devshatwar , Manu Gautam , "David E. Box" , Kai-Heng Feng , Michael Bottini Cc: linux-pci@vger.kernel.org References: <20230502193140.1062470-1-ajayagarwal@google.com> <20230502193140.1062470-3-ajayagarwal@google.com> From: Sathyanarayanan Kuppuswamy In-Reply-To: <20230502193140.1062470-3-ajayagarwal@google.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org On 5/2/23 12:31 PM, Ajay Agarwal wrote: > Currently the core driver sets ASPM_STATE_L1 as well as I think you can use the term ASPM driver uniformly. > ASPM_STATE_L1SS when the caller wants to enable just L1.0. L1? > This is incorrect. Fix this by setting the ASPM_STATE_L1 bit > only when the caller wishes to enable L1.0. > > Signed-off-by: Ajay Agarwal > --- Otherwise, looks fine. Reviewed-by: Kuppuswamy Sathyanarayanan > Changelog since v1: > - Break down the L1 and L1ss handling into separate patches > > drivers/pci/pcie/aspm.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c > index 5765b226102a..4ad0bf5d5838 100644 > --- a/drivers/pci/pcie/aspm.c > +++ b/drivers/pci/pcie/aspm.c > @@ -1170,8 +1170,7 @@ int pci_enable_link_state(struct pci_dev *pdev, int state) > if (state & PCIE_LINK_STATE_L0S) > link->aspm_default |= ASPM_STATE_L0S; > if (state & PCIE_LINK_STATE_L1) > - /* L1 PM substates require L1 */ > - link->aspm_default |= ASPM_STATE_L1 | ASPM_STATE_L1SS; > + link->aspm_default |= ASPM_STATE_L1; > if (state & PCIE_LINK_STATE_L1_1) > link->aspm_default |= ASPM_STATE_L1_1; > if (state & PCIE_LINK_STATE_L1_2) -- Sathyanarayanan Kuppuswamy Linux Kernel Developer