Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp6250061rdb; Thu, 14 Dec 2023 12:29:09 -0800 (PST) X-Google-Smtp-Source: AGHT+IFw8nCrqsnAk0HJ22DPSwe3LOZE1chgcccp2BUJsNG0+WK21yX/98BVnX3uH1Cf0j8jIAN2 X-Received: by 2002:a2e:bcc9:0:b0:2cc:2af3:5edb with SMTP id z9-20020a2ebcc9000000b002cc2af35edbmr4220654ljp.14.1702585749392; Thu, 14 Dec 2023 12:29:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702585749; cv=none; d=google.com; s=arc-20160816; b=N5HQHizGRflFpiaDiiWXI7oYnBwnKjRNbi8ROzHSu1OrIxaCHuiQ53i6YH2+UpLxHP AWQS5fDGbUZ3Jc2slcXIA037ZEYye7LqcLHrIcg4pGdz6WSGx/VcluktcXgptRUwIN+y rzrbC1fj81p4q28kgIzf5FRDn98MyEkrnRueaHLjHiIlUPMjPG9wsWaTmJYY4HigH/K3 fuc+G7aAATvxnmHpVbrvR7lCxdpE8gqUMOboACX9mbaWwOgRkX8nG/EGkWgpWAFbxEqY lfckZ5PkNaVeq7l+BAEF8vGoGhmatCuCMjGsgrs6BoU3wCE/K3a0i/wTzvuRmXlBDW0s O5ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:subject:cc:to:from :date:dkim-signature; bh=vtElniQKU4FjtlubFAv/9ixcc+6hkGDEkM0SmBqA7zU=; fh=ubN7tFkCUJZIvJQarTb9ZquhB2IOy5dzVj1Y0DOWKpI=; b=P2pMKow6cicNgwjAZR2s30vDTT88jckKRgH7+MC7yh7aBfOEe56ElRPuFgehL0o9/7 tuE+bpZdj7BbMj92JORQAj9KjPNroV/DRPaJ5lUeC9yq6qrXdLYxzs8NhQjshNrIfBrO 7kO2h3tNIuuHIhyZO5iSWOiBDF6Bb6Ne3G7NYmjX4VLuocml+QbKKpF2iAHkRytd12zA 67W5ytUazRrTlIjw9skP7SaCCI677+DjLOsdf2Af5FD4o90xoxb9uR9U7TEtpqrHlq2p MdyK4sGG3gjBC26NCFJPjyP+wyaii3wECX6Je2VJqcoeAftwQQAzSIbcLSN3ETW/kTPv 5WMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=N33HgyIL; spf=pass (google.com: domain of linux-kernel+bounces-66-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-66-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id z40-20020a509e2b000000b00550f35cd09fsi4788278ede.521.2023.12.14.12.29.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 12:29:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-66-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=N33HgyIL; spf=pass (google.com: domain of linux-kernel+bounces-66-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-66-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 0EAAD1F2244A for ; Thu, 14 Dec 2023 20:29:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A9AED6A348; Thu, 14 Dec 2023 20:29:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="N33HgyIL" X-Original-To: linux-kernel@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 A91133399F; Thu, 14 Dec 2023 20:28:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 02A21C433C9; Thu, 14 Dec 2023 20:28:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1702585738; bh=OaiTbbrvZXCtjfNH5fz9wg1DzywuRnjlIJFtRbNr8AU=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=N33HgyILK6ugvQdbWmmacvvP0QbZZPodEK4aqwKSO++CMA2t9be3pHegxU27A/3P8 ME0JcW1ZCX/lVM7T/WILas734s5Ql/DmCWO0Z7NdlR28npx5SqYtKSVNMLcM12JDVL gpBwUyAHb8OVeQtrNIqLjySek5k7p1kdDXRUwUDCVB+8CdS6WaxJMkcm9DX5AY9ZYv 3qZWRBVt/BQ3GotHU7Pf53CHfCyWHmVGquNQsvDnh5sMfou5PeRmcPD9CZe00n0rJ3 xaNHK3WveWjraWXLvuNZpoB+uZyeB9vepWDB21Fio53sLvm6wdF1TOfnmeES87ooa6 FS3B2T9nGzMxw== Date: Thu, 14 Dec 2023 14:28:56 -0600 From: Bjorn Helgaas To: Matthew W Carlis Cc: bhelgaas@google.com, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, mika.westerberg@linux.intel.com, sathyanarayanan.kuppuswamy@linux.intel.com Subject: Re: [PATCH v3] PCI/portdrv: Allow AER service only for Root Ports & RCECs Message-ID: <20231214202856.GA1101963@bhelgaas> 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-Disposition: inline In-Reply-To: <20231214063717.992-1-mattc@purestorage.com> On Wed, Dec 13, 2023 at 11:37:17PM -0700, Matthew W Carlis wrote: > Hello Any Interested > > Recently found that this patch had the affect of requiring us to set > pcie_ports_dpc_native in order to use the kernel DPC driver with PCIe switch > downstream ports. The kernel check for the DPC capability in portdrv.c has; > if pci_aer_available() and (dpc-native or using AER port service driver on > the device). I wonder if we couldn't do away with the requirement of the > AER service being used on the port if pci_aer_available() & host->native_aer > don't lie. I'm still trying to decide exactly what the condition ought to > look like, but it might draw from the AER service check above it. For example: > > if (pci_find_ext_capability(dev, PCI_EXT_CAP_ID_DPC) && > - pci_aer_available() && > - (pcie_ports_dpc_native || (services & PCIE_PORT_SERVICE_AER))) > + dev->aer_cap && pci_aer_available() && > + (pcie_ports_dpc_native || host->native_aer)) > services |= PCIE_PORT_SERVICE_DPC; This sounds like it might be a regression report for d8d2b65a940b ("PCI/portdrv: Allow AER service only for Root Ports & RCECs"), which appeared in v6.2. Is that true? If d8d2b65a940b requires you to use the "pcie_ports=dpc-native" kernel parameter when you didn't need it before, that sounds like a regression. Looking at the code, that "services & PCIE_PORT_SERVICE_AER" definitely looks like a problem. We added that with https://git.kernel.org/linus/4e5fad429bd1 ("PCI/DPC: Do not enable DPC if AER control is not allowed by the BIOS"), but I think your suggestion of checking host->native_aer is better. Do you want to post a formal patch for it? Bjorn