From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B2393606A31A for ; Wed, 2 Dec 2026 16:19:13 +0000 (UTC) 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=m6AJ5OXm Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4jfjcw3FD7z30WT; Thu, 03 Dec 2026 03:19:12 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip=192.198.163.7 ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1796228352; cv=none; b=hVEbr57Nn+1Vm/+ajTYUzZrUaENBsHaEKw4Ctuzr3HD/sI8WIErYalzRPc9VjmhQ4B9pH6c4KIVfbws9sU6hgL8TxE/WtZTeCYkv3e5g73C4X+8lbzfBvpUD4Qem38nQtJXtMYq/A0Ch5RS//jsu/UUwllV9DkiVfyVChXJU7hAb/WOcQqqaHfBV/7oOja6K59IEmioKWot48LxBBqgJIU1DkmFAqQGKWPjfLiqqlE7o9LYNQwgvueQVlO75hy0L/q2Oe9nJBvaGqq53m6HLNRf9e9MFnhQAdHtgkUngAEs8hw5lA/T+VsRIOUwJyIRvm++I7tWHDzoAya2anWhTVQ== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1796228352; c=relaxed/relaxed; bh=82Z5WQJ6i13NDUwm2kNzIbAIFbYy+jrQywfSIkQ/chs=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=ideL5IvOA9zlbiBAC2wD1e+/v2ytmqXG/RLtEe90qUq3vZO7sTKemt9umci8x6fNSVqip9ws3/SCs59uaXFnksYL4Qe8AEv3vajI82QIiePTAV5w1mWscgpAtoSK+lRJGMix35lIqSKogdbDwfEhYSkraWRmW8dGYO47+OFrnv7hGgRQ3Y20CxK4EOifSwPBI8gTGY/pINpfHQ0PNNsvyk18n59Xe83knT7+6NkW5zz4ytVTikIKKtnyzxbZFTCnRnG3GP62OuRcJd801cvddT5XZxLoxSBl06P6SrgnYXUe8VGo3CsqgsWbmLlkzqNcUjEUHEkSNcjqpLrBAgWRiw== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=m6AJ5OXm; dkim-atps=neutral; spf=pass (client-ip=192.198.163.7; helo=mgamail.intel.com; envelope-from=sathyanarayanan.kuppuswamy@linux.intel.com; receiver=lists.ozlabs.org) smtp.mailfrom=linux.intel.com Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=m6AJ5OXm; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=linux.intel.com (client-ip=192.198.163.7; helo=mgamail.intel.com; envelope-from=sathyanarayanan.kuppuswamy@linux.intel.com; receiver=lists.ozlabs.org) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4jfjct26Yhz30WS for ; Thu, 03 Dec 2026 03:19:08 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1796228351; x=1827764351; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=82Z5WQJ6i13NDUwm2kNzIbAIFbYy+jrQywfSIkQ/chs=; b=m6AJ5OXmpUoCVO0M5Tabvwha55fu2YyiG+MY6bLm+TWE23cCrE8nC0z9 xYg3kfPPI2s+lteDpoGrhcoZsLEdMqrjWW15n5gu5cIN9XEHeia5Z8Dl9 CbyLmZdXFm+yMPXE1i5dGJQWFZxDuMHzthlsJTT0j0GHlns2w/5O0Nm0g tmLmdBGgB5ylsXU36m+uPt4+j6tO2zL1uF/n1c4sVV48Z5tPs/f3VuN/H U2U26pu9qN+1XxW/8LOi2U/Qiy42fIx1FNQEREjprQd+yszyhjoubnCe6 swRya8Zjl+Rrfci4SvrN7ordpXnyhcYP9WymOAx7puQhp9b0MjSZm/1sr g==; X-CSE-ConnectionGUID: UQ5v8a/CSQ+INzk8DuqM3w== X-CSE-MsgGUID: tVVCkwa5SqquijaZPoizeA== X-IronPort-AV: E=McAfee;i="6800,10657,11984"; a="5004700" X-IronPort-AV: E=Sophos;i="6.27,247,1787036400"; d="scan'208";a="5004700" 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: linuxppc-dev@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , Precedence: list X-Archived-By: 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 X-Spam-Status: No, score=-15.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_PASS, SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 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