Re: PCI: hotplug: Erroneous removal of hotplug PCI devices

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

 



On Wed, Jan 23, 2019 at 11:44:53AM -0700, Keith Busch wrote:
> On Wed, Jan 23, 2019 at 06:20:57PM +0000, Alex_Gagniuc@xxxxxxxxxxxx wrote:
> > It's obvious that just relying on presence detect state is prone to race 
> > conditions. However, if a device is replaced, we'd expect the data link 
> > layer state to change as well. So I think the best way to proceed is to 
> > skip the SURPRISE!!!_REMOVAL if the following are true:
> >   * presence detect is set
> >   * DLL changed is not set
> >   * presence detect was not previously set
> > 
> > Thoughts?
> 
> What is the value of PDS on the Link up event? If it's still "Slot
> Empty", could we just ignore the Link event instead and wait for the PDC
> event?

Well, usually it's desirable to bring up the slot as quickly as possible,
so once we get any kind of link or presence event, we immediately try to
bring up the slot.

We do allow a 20 + 100 ms delay in pcie_wait_for_link() between link up
and presence detect up, just not 400 ms.

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