Re: [PATCH v2 1/2] PCI/portdrv: Add necessary wait for disabling hotplug events
From: Feng Tang
Date: Wed Feb 19 2025 - 06:13:12 EST
On Wed, Feb 19, 2025 at 10:53:44AM +0800, Feng Tang wrote:
[...]
> >
> > And IIUC this will add a one second delay for ports that don't need
> > command completed events. I don't think that's fair to those ports.
>
> Good catch! So we should add a read of PCI_EXP_SLTCAP register and
> check if PCI_EXP_SLTCAP_HPC bit is set.
Maybe something like this?
if (slot_cap & PCI_EXP_SLTCAP_HPC &&
!(slot_cap & PCI_EXP_SLTCAP_NCCS) &&
!pdev->broken_cmd_compl)
do_the_wait();
Thanks,
Feng