From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=192.198.163.7 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796228347; b=PdIePeImCL0p/eT5VwZXbAdbk8YLbpuQ17A/T/SaQd3906OZy1FzKsRN7eeW0AkHci59 fAhwsj8YfjOsNvNITMGdZU/G+lADVibB7JK8nJRDbpaIIA6YRzlCHgL7OcES4zOH3jMjM 2OMKbp8OxNOQbcxEmsbZdq90dB0JnacH97ucX+ei3RJ+ftrW5Z8pF6fojnC5TIsO5oBTO Xp+gxZ+aCy1hNEGc0KWfVcY6iNoqL/m/PEfIRJKrdR8RkNzG+YYon4oYIdyoOkvnc7RcO rwiep2jDEiPDBlvwQ0KxsTqJSitaHDU2oUGjF6Q70n3w/A0fyQPVs9xWnCoe30AErrg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796228347; h=DMARC-Filter:DKIM-Signature:X-CSE-ConnectionGUID:X-CSE-MsgGUID: X-IronPort-AV:X-IronPort-AV:Received:X-CSE-ConnectionGUID: X-CSE-MsgGUID:X-ExtLoop1:X-IronPort-AV:Received:Message-ID:Date: MIME-Version:User-Agent:Subject:To:Cc:References:Content-Language: From:In-Reply-To:Content-Type:Content-Transfer-Encoding; bh=82Z5WQJ6i13NDUwm2kNzIbAIFbYy+jrQywfSIkQ/chs=; b=3K75Iv/z0Mmr6jpJbSC4x23FZklHAlHOPT48HmGmcQz1koKOFNZUz6vdVcGG3ljJ2c8W RmYAM20hZoHbKC2zQHddmVdUBeXGFOXoHS7fvPhNFDm6Pv8KRgFzu2Nt+YBbyyP5nskKA iNuo0YhdbeZUsCt1k9hZUN0m/5yQlF6BK90y4WubaID4spOAnKjhv6jjsRxDk2eVkKoi6 Pb/+uYwEGsY63Qm+F5YlJRQYwoFFstwS2yfLr37coVijA7H7QZY2zVF6PSJ5LFaBFsAvw 3KF0If56VCmRcKQHNmPBBtdqOQlu12LK4S1kyF9u1Hi+ruTPjVUpDjBAF7a6l7DLsUA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linux.intel.com; spf=pass smtp.mailfrom=linux.intel.com; dkim=pass header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=jDY2zrJ0; arc=none smtp.remote-ip=192.198.163.7 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E7F07606A322 for ; Wed, 2 Dec 2026 16:19:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org E7F07606A322 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=jDY2zrJ0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1796228347; x=1827764347; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=82Z5WQJ6i13NDUwm2kNzIbAIFbYy+jrQywfSIkQ/chs=; b=jDY2zrJ0sbMsHvhdJ1xU67D94bDarA5U9DpGU/JKzH5P6zcqAWrZWhpD vnHpgZkfQLN3pK6fiO2jPF96YLGzYxLg7/tknIkCsOhhjZmBVjrn51pfE 71d41sCWErl0rz+LBabeYcEBj3EbjxsxAwY7m6aD+98IvTJouluTe3pn9 ksgWXxEkOQ1kEe7AkxwjifKKi8gldmbK0zbHmDUohdwKJZvJD6yua+4pc EBIIly8qAaCrTRvbWHY+rPeyaNu/aPosD5PcS/RyVSNXu0jOJztMke+KD 6YRMWSwgB8HzSS44oXgQmggBK7YGC2jD5ogAb4dewIiMArIjNUzrpF1IY A==; X-CSE-ConnectionGUID: A9SgFDNPR5OxG8Dob90xIw== X-CSE-MsgGUID: nTf1bUGJQ++JAnQL82jcAg== X-IronPort-AV: E=McAfee;i="6800,10657,11984"; a="5004698" X-IronPort-AV: E=Sophos;i="6.27,247,1787036400"; d="scan'208";a="5004698" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Dec 2026 08:19:06 -0800 X-CSE-ConnectionGUID: B/EaEWZKTsGBsa3Zuu9Iqw== X-CSE-MsgGUID: fr9fsISkTvi96obPtXLCOw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.27,247,1787036400"; d="scan'208";a="13389129" Received: from skuppusw-desk1.jf.intel.com (HELO [10.24.80.125]) ([10.24.80.125]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Dec 2026 08:19:05 -0800 Message-ID: Date: Wed, 2 Dec 2026 08:19:04 -0800 X-Mailing-List: linux-pci@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] PCI/DPC: Document spec update on Surprise Down errors To: Lukas Wunner , Bjorn Helgaas , linux-pci@vger.kernel.org Cc: Smita Koralahalli , Yazen Ghannam , Keith Busch , Maciej Grochowski , Sizhe Liu , Yicong Yang , Sourabh Jain , Oliver OHalloran , linuxppc-dev@lists.ozlabs.org References: Content-Language: en-US From: Kuppuswamy Sathyanarayanan In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 12/2/26 04:04, Lukas Wunner wrote: > When PCIe r1.1 introduced hotplug support in 2005, sec 3.2.1 was amended > to state that a transition from DL_Active to DL_Inactive must not cause a > Surprise Down error on hotplug ports capable of surprise removal. > > But when PCIe r3.1 introduced DPC support in 2014, sec 6.7.6 was added > which states that: > > "Async removal may result in a transition from DL_Active to DL_Down in > the Downstream Port. This transition may result in a Surprise Down > error." > > I raised this contradiction with our representative at the PCISIG Protocol > Working Group. He noted that DL_Down is likewise nonsensical because it > is a Status Output, not a State (sec 3.2). The PWG recently approved the > following new language for sec 6.7.6 as erratum B157, which will appear in > the next revision, either r7.1.1 or r7.2: > > "Async removal may result in a transition from DL_Active to DL_Inactive > in the Downstream Port. Error handling for this transition is defined > in Section 3.2.1." > > Commit 2ae8fbbe1cd4 ("PCI/DPC: Ignore Surprise Down error on hot removal") > changed the DPC driver to handle Surprise Down errors per the old language > in sec 6.7.6. This was needed for AMD Epyc systems. No Intel system is > affected. > > Document the spec update in the code comment introduced by the commit to > make it clear that the old spec language should not be followed by new > hardware implementations. > > The functionality introduced by the commit might still be useful beyond > systems which adhere to the legacy behavior of sec 6.7.6: Sec 3.2.1 does > allow Surprise Down errors on non-surprise-capable hotplug ports. pciehp > binds to such ports and handles removal on Surprise Down. It makes sense > for the DPC driver not to interfere with pciehp in such cases. > > Fixes: 2ae8fbbe1cd4 ("PCI/DPC: Ignore Surprise Down error on hot removal") > Signed-off-by: Lukas Wunner > Cc: stable@vger.kernel.org # v6.9+ > --- Reviewed-by: Kuppuswamy Sathyanarayanan > drivers/pci/pcie/dpc.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/drivers/pci/pcie/dpc.c b/drivers/pci/pcie/dpc.c > index e030811..5538dde 100644 > --- a/drivers/pci/pcie/dpc.c > +++ b/drivers/pci/pcie/dpc.c > @@ -374,8 +374,10 @@ static irqreturn_t dpc_handler(int irq, void *context) > struct pci_dev *pdev = context; > > /* > - * According to PCIe r6.0 sec 6.7.6, errors are an expected side effect > - * of async removal and should be ignored by software. > + * From PCIe r3.1 to r7.1, sec 6.7.6 allowed Surprise Down errors as > + * a side effect of async removal which should be ignored by software. > + * Newer revisions point to sec 3.2.1 instead, whereby Surprise Down > + * errors are blocked on hotplug ports capable of surprise removal. > */ > if (dpc_is_surprise_removal(pdev)) { > dpc_handle_surprise_removal(pdev); -- Sathyanarayanan Kuppuswamy Linux Kernel Developer