Re: [PATCH v2] PCI: pciehp: Ignore Link Down/Up caused by DPC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jun 16, 2021 at 05:19:45PM -0500, Bjorn Helgaas wrote:
> On Sat, May 01, 2021 at 10:29:00AM +0200, Lukas Wunner wrote:
> > Downstream Port Containment (PCIe Base Spec, sec. 6.2.10) disables the
> > link upon an error and attempts to re-enable it when instructed by the
> > DPC driver.
> > 
> > A slot which is both DPC- and hotplug-capable is currently brought down
> > by pciehp once DPC is triggered (due to the link change) and brought up
> > on successful recovery.  That's undesirable, the slot should remain up
> > so that the hotplugged device remains bound to its driver.
> 
> I think the slot being "brought down" means slot power is turned off,
> right?
> 
> I reworded it along those lines and applied this to pci/hotplug for
> v5.14, thanks!

Thanks, the reworded commit message LGTM and is more readable.

"Being brought down" is just a colloquial term for pciehp_disable_slot(),
i.e. unbinding and removal of the pci_dev's below the hotplug port,
removing slot power, turning off the power LED and setting the slot's
state to OFF_STATE.

Indeed, turning off slot power concurrently to DPC recovery is wrong
and likely the biggest contributor to the problems seen.

Another issue is that after bringing down the slot due to the Link Change
event, pciehp will notice that Presence Detect State is set and will try
to bring the slot up again, even though DPC recovery may not have completed
yet.

The commit should solve all those synchronization issues between pciehp
and DPC.

Thanks,

Lukas



[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux