Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp1457342lqd; Thu, 25 Apr 2024 17:01:52 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUau3HB6oGaAS2956aQrc9CWsY7cQ3rEgRXwE4LuSiSG+xhA+0UXUvTlTaH7F+b58vVzpCFrcp2TM47eVADn+S8B/37/iIBoFGBxSY6Vg== X-Google-Smtp-Source: AGHT+IHUP2k5RRFuLUYFwVdVuQ0sZZkqOQlNVZnp0X2L99fRQzou4qOUd+T7U9zQLoR7jZk9H1U8 X-Received: by 2002:a50:f688:0:b0:571:fd86:5a00 with SMTP id d8-20020a50f688000000b00571fd865a00mr659239edn.21.1714089712006; Thu, 25 Apr 2024 17:01:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714089711; cv=pass; d=google.com; s=arc-20160816; b=xTpt8vWUMjX+5KawN5wq4HXXLrMgAq0dmCSQuoBhtclfQMzlaL9qjde1uDp1MzobOq 745U47qe/GNEB9E2nOwKEjZ0VQRSHT6ZS72+wpQuE8NOh03t3zox9xFBnqCvIvHoLglc xj1vsunVqMLhY6YkIYhhddLXhT225rzXhfqU+wf93AYOUW894Egs3+8P8XsPPGCoYGf3 GmnzXCBXY6Y6T9LTlaOs5KIHH369IH5GqvxHt9eVr/fTb4xVvBIlms11zgTBMVsgs+Lx rhe7mBtjJ45aaD6+r5P4OXlGaQIk3oeUs4wDwqUa6OeU6M8E0aX5g8OaMaj+LRMyVWbH 3kZA== 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 :subject:cc:to:from:date:dkim-signature; bh=ZtTRscjINCLfn/Yrl2z6XWgTyETkhZgEgkE49K0CqtU=; fh=XgEqsxcf6UJuVOPGPdwiHMv3n+lgaA0P66gUTTCznRQ=; b=sOY7JhOPzENNj45GPOBJGerfkw3OcPX8shVCTiuI4ksfiys76NuHh0H50Zjw9rOg5g w0AMHqWo3oag/LsaOV+eiYTxCgbBGwmfm1MF0t5r+/L4zEloNHDF3rj7ETj/ydJeCs97 EHBH43TvvlZhirgAZL+eSnrLC3xVS+98dPzaSVMBfcgGneg5LCOzYQg29tPa3hcb3yzG 3JZ6VpopOcFuqQj6Glxlmxi9YjgiYCeojrpmB4Ekv5icGNFFbPIzxjfHO0CRTNdyJ1aP 0pEn8fh5isB0UnoEPf8rdX10e7fSu3vBq1qDcSNnnJRm0RnOdiBzFcx5a5LFRqsBmQ6t 1/MQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=RnEhW8Ui; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-159181-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-159181-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id if1-20020a0564025d8100b0057210a7f085si365270edb.605.2024.04.25.17.01.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Apr 2024 17:01:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-159181-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=RnEhW8Ui; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-159181-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-159181-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.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 am.mirrors.kernel.org (Postfix) with ESMTPS id 346451F21CAF for ; Thu, 25 Apr 2024 21:01:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9609C15533B; Thu, 25 Apr 2024 21:01:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="RnEhW8Ui" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.16]) (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 17966153BC7; Thu, 25 Apr 2024 21:01:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.16 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714078911; cv=none; b=sdH8irzn8Kq2BROPwdcfYuGQ8zxGTOJSLhQSj+LM86F3axHa9E62jkN8w1Y3IsUTzw/bb6jO+j6LJ3ofvl9BYocokf/U7tktJtA/97sFz4lZNnYP8hBp+hSIoIdp8gtoo4T9obOKV7JvQA/45WbnX46bChXCG/gdY0WSzYZswyU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714078911; c=relaxed/simple; bh=A2dKCGsB/Ici8fMlijpabSHqnvQKwWrWdSSIk88w2yQ=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=jxTIzHgyV0iTFBqVI+wrB4hs1/ZP2Q1ffr/pc3kl4vxQoPU/e8QGlHcH6hpWE+DFwP1fotU/0tqswgzcZiqgKALT52gvGInq5HGF/cNQmaYIz3PeZ1M+mnxWcg1gh/VJxbFMJInn+ecPxDwYqeyIAYo2+VPiduUj16bJzWD4cIA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=RnEhW8Ui; arc=none smtp.client-ip=192.198.163.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1714078910; x=1745614910; h=date:from:to:cc:subject:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=A2dKCGsB/Ici8fMlijpabSHqnvQKwWrWdSSIk88w2yQ=; b=RnEhW8UiwHrjJaj+FzhOLpIdVMRRVtWVA38AOgAU4igwYbksPWWcFUsK 0y69nqX2sAheOVypXYMcMvc0PTRAUX2ubaAQdpCftjvKIFSrKqunILsz8 Ar/RF6ghKV8nuY+DP8k9YZStlVabQKfAPCT3Xlb8BtnYYRn8XKQY02YeT cwCOgeldNga/mQyTorTK196bAEtH/Z6+/Y6QG/Al+n9auWw0K5Pg+XBso D5JzbH6WquMgS2qajBImc4LWxXmYoxL93g2eyPY0x8xYvlxBUSckX6S7a nZYvKS4CE9mzCCefl793fCv0S+aBFNa3dSfra0iKdnGc92EBmUznHI+3j A==; X-CSE-ConnectionGUID: ZqN86O9vQM2KbSJxDo5AfA== X-CSE-MsgGUID: ibPDEImPSqmvjMbACHEb7w== X-IronPort-AV: E=McAfee;i="6600,9927,11055"; a="10331472" X-IronPort-AV: E=Sophos;i="6.07,230,1708416000"; d="scan'208";a="10331472" Received: from fmviesa007.fm.intel.com ([10.60.135.147]) by fmvoesa110.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Apr 2024 14:01:49 -0700 X-CSE-ConnectionGUID: SijPsIOcSD6JjPyqCYF1fg== X-CSE-MsgGUID: JrO6dyC7TOasSciPvgFpvw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,230,1708416000"; d="scan'208";a="25209874" Received: from patelni-desk.amr.corp.intel.com (HELO localhost) ([10.2.132.135]) by fmviesa007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Apr 2024 14:01:48 -0700 Date: Thu, 25 Apr 2024 14:01:44 -0700 From: Nirmal Patel To: Jian-Hong Pan Cc: Bjorn Helgaas , Johan Hovold , David Box , Ilpo =?ISO-8859-1?Q?J=E4rvinen?= , Kuppuswamy Sathyanarayanan , Mika Westerberg , Damien Le Moal , Jonathan Derrick , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Subject: Re: [PATCH v5 0/4] PCI: vmd: Enable PCI PM's L1 substates of remapped PCIe Root Port and NVMe Message-ID: <20240425140144.000049a4@linux.intel.com> In-Reply-To: <20240424105814.21690-2-jhp@endlessos.org> References: <20240424105814.21690-2-jhp@endlessos.org> X-Mailer: Claws Mail 4.2.0 (GTK 3.24.41; x86_64-w64-mingw32) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Wed, 24 Apr 2024 18:58:15 +0800 Jian-Hong Pan wrote: > Re-send for the version information. > > Notice the VMD remapped PCIe Root Port and NVMe have PCI PM L1 > substates capability, but they are disabled originally. > > Here is a failed example on ASUS B1400CEAE with enabled VMD: > > 10000:e0:06.0 PCI bridge: Intel Corporation 11th Gen Core Processor > PCIe Controller (rev 01) (prog-if 00 [Normal decode]) ... > Capabilities: [200 v1] L1 PM Substates > L1SubCap: PCI-PM_L1.2+ PCI-PM_L1.1+ ASPM_L1.2+ ASPM_L1.1+ > L1_PM_Substates+ PortCommonModeRestoreTime=45us PortTPowerOnTime=50us > L1SubCtl1: PCI-PM_L1.2- PCI-PM_L1.1- ASPM_L1.2+ ASPM_L1.1- > T_CommonMode=45us LTR1.2_Threshold=101376ns > L1SubCtl2: T_PwrOn=50us > > 10000:e1:00.0 Non-Volatile memory controller: Sandisk Corp WD Blue > SN550 NVMe SSD (rev 01) (prog-if 02 [NVM Express]) ... > Capabilities: [900 v1] L1 PM Substates > L1SubCap: PCI-PM_L1.2+ PCI-PM_L1.1- ASPM_L1.2+ ASPM_L1.1- > L1_PM_Substates+ PortCommonModeRestoreTime=32us PortTPowerOnTime=10us > L1SubCtl1: PCI-PM_L1.2- PCI-PM_L1.1- ASPM_L1.2+ ASPM_L1.1- > T_CommonMode=0us LTR1.2_Threshold=0ns > L1SubCtl2: T_PwrOn=10us > > According to "PCIe r6.0, sec 5.5.4", to config the link between the > PCIe Root Port and the child device correctly: > * Ensure both devices are in D0 before enabling PCI-PM L1 PM > Substates. > * Ensure L1.2 parameters: Common_Mode_Restore_Times, T_POWER_ON and > LTR_L1.2_THRESHOLD are programmed properly on both devices before > enable bits for L1.2. > > Prepare this series to fix that. > > Jian-Hong Pan (4): > PCI: vmd: Set PCI devices to D0 before enable PCI PM's L1 substates > PCI/ASPM: Add notes about enabling PCI-PM L1SS to > pci_enable_link_state(_locked) PCI/ASPM: Introduce aspm_get_l1ss_cap() > PCI/ASPM: Fix L1.2 parameters when enable link state > > drivers/pci/controller/vmd.c | 13 ++++++++---- > drivers/pci/pcie/aspm.c | 41 > ++++++++++++++++++++++++++++-------- 2 files changed, 41 > insertions(+), 13 deletions(-) > Hi, We are running some tests to make sure we dont have issue with other platforms and trying to avoid another hotplug scenario. Please wait for our Ack before merging this patch. Thanks. -nirmal