Linux PCI subsystem development
 help / color / mirror / Atom feed
From: Guixin Liu <kanie@linux.alibaba.com>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: "Bjorn Helgaas" <bhelgaas@google.com>,
	"Uwe Kleine-König" <u.kleine-koenig@baylibre.com>,
	"Jonathan Cameron" <jic23@kernel.org>,
	"Lukas Wunner" <lukas@wunner.de>,
	"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
	"Kees Cook" <kees@kernel.org>,
	"Darshit Shah" <darnshah@amazon.de>,
	"Brian Norris" <briannorris@chromium.org>,
	"Kuppuswamy Sathyanarayanan"
	<sathyanarayanan.kuppuswamy@linux.intel.com>,
	linux-pci@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH] PCI/DPC: Honor "pcie_ports=native" when enabling DPC
Date: Fri, 4 Sep 2026 10:34:05 +0800	[thread overview]
Message-ID: <58ea18fe-6e7d-49ab-b6cf-992db4aae732@linux.alibaba.com> (raw)
In-Reply-To: <20260903230537.GA2273943@bhelgaas>



在 2026/9/4 07:05, Bjorn Helgaas 写道:
> On Tue, Sep 01, 2026 at 02:45:54PM +0800, Guixin Liu wrote:
>> Commit 97ca178c899d ("PCI/DPC: Allow DPC on all Downstream Ports when
>> OS controls AER") replaced the AER service bit with host->native_aer
>> when deciding whether to create a DPC service device.  Unlike the AER
>> service bit, host->native_aer does not reflect the "pcie_ports=native"
>> command-line override.
>>
>> Consequently, if firmware retains AER control, "pcie_ports=native" no
>> longer enables DPC on Root Ports that advertise both AER and DPC, even
>> though the option is documented to force native DPC handling.
>>
>> Check pcie_ports_native explicitly so both command-line overrides
>> continue to work.
>>
>> Fixes: 97ca178c899d ("PCI/DPC: Allow DPC on all Downstream Ports when OS controls AER")
>> Cc: stable@vger.kernel.org
>> Signed-off-by: Guixin Liu <kanie@linux.alibaba.com>
>> ---
>>   drivers/pci/pcie/portdrv.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/pci/pcie/portdrv.c b/drivers/pci/pcie/portdrv.c
>> index a9cbfc1d2bc7..a05ee7980fb2 100644
>> --- a/drivers/pci/pcie/portdrv.c
>> +++ b/drivers/pci/pcie/portdrv.c
>> @@ -264,7 +264,7 @@ static int get_port_device_capability(struct pci_dev *dev)
>>   	 */
>>   	if (pci_find_ext_capability(dev, PCI_EXT_CAP_ID_DPC) &&
>>   	    pci_aer_available() &&
>> -	    (pcie_ports_dpc_native || host->native_aer))
>> +	    (pcie_ports_native || pcie_ports_dpc_native || host->native_aer))
> Oh my goodness.  I think I completely dropped ball on this YEARS ago.
>
> It's crazy that we have "pcie_ports_native" checking littered all
> over.  I think we should instead treat host->native_* as the single
> source of truth, and pay attention to pcie_ports_native when setting
> host->native_*.
>
> Sathy did some great work to do exactly that in 2020, and I never got
> it merged.  I wish I had some great excuse, but I looked at my 2020
> calendar and couldn't find one.  I think I just blew it.
>
> So I think we should resurrect that series and update it as needed and
> solve the problem that way.  I dug out the links just for
> completeness, but we should probably just start with the most recent
> ones (v11 or v12):
>
>    # v2 https://lore.kernel.org/r/cover.1590355211.git.sathyanarayanan.kuppuswamy@linux.intel.com/
>    # v3 https://lore.kernel.org/r/cover.1590355824.git.sathyanarayanan.kuppuswamy@linux.intel.com/
>    # v4 https://lore.kernel.org/r/cover.1590534843.git.sathyanarayanan.kuppuswamy@linux.intel.com/
>    # v5 https://lore.kernel.org/r/cover.1591545462.git.sathyanarayanan.kuppuswamy@linux.intel.com/
>    # v6 https://lore.kernel.org/r/cover.1593195899.git.sathyanarayanan.kuppuswamy@linux.intel.com/
>    # v7 https://lore.kernel.org/r/cover.1595006564.git.sathyanarayanan.kuppuswamy@linux.intel.com/
>    # v8 https://lore.kernel.org/r/cover.1595649348.git.sathyanarayanan.kuppuswamy@linux.intel.com/
>    # v9 https://lore.kernel.org/r/cover.1600457297.git.sathyanarayanan.kuppuswamy@linux.intel.com/
>    # v9 https://lore.kernel.org/r/20200928011131.MI-pJpJNRQw6c35j_O6019flLWHe08C4WvKPmKEbnik@z/
>    # v10 https://lore.kernel.org/r/cover.1603738449.git.sathyanarayanan.kuppuswamy@linux.intel.com/
>    # v11 https://lore.kernel.org/r/cover.1603766889.git.sathyanarayanan.kuppuswamy@linux.intel.com/
>    # v12 https://lore.kernel.org/r/20201126011816.711106-1-helgaas@kernel.org/
Yeah, this series is better than mine, wait for your to recover them.

In addition, we should add "Fixes: 97ca178c899d ("PCI/DPC: Allow DPC on 
all Downstream Ports when OS controls AER")" also.

Best Regards,
Guixin Liu
>>   		services |= PCIE_PORT_SERVICE_DPC;
>>   
>>   	/* Enable bandwidth control if more than one speed is supported. */
>> -- 
>> 2.43.7
>>


      reply	other threads:[~2026-09-04  2:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-01  6:45 [PATCH] PCI/DPC: Honor "pcie_ports=native" when enabling DPC Guixin Liu
2026-09-01  6:57 ` sashiko-bot
2026-09-03 23:05 ` Bjorn Helgaas
2026-09-04  2:34   ` Guixin Liu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=58ea18fe-6e7d-49ab-b6cf-992db4aae732@linux.alibaba.com \
    --to=kanie@linux.alibaba.com \
    --cc=bhelgaas@google.com \
    --cc=briannorris@chromium.org \
    --cc=darnshah@amazon.de \
    --cc=helgaas@kernel.org \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=jic23@kernel.org \
    --cc=kees@kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lukas@wunner.de \
    --cc=sathyanarayanan.kuppuswamy@linux.intel.com \
    --cc=stable@vger.kernel.org \
    --cc=u.kleine-koenig@baylibre.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox