From: Keith Busch <keith.busch@intel.com>
To: Lukas Wunner <lukas@wunner.de>
Cc: Alex_Gagniuc@Dellteam.com, linux-pci@vger.kernel.org,
bhelgaas@google.com, Austin.Bolen@dell.com
Subject: Re: PCI: hotplug: Erroneous removal of hotplug PCI devices
Date: Wed, 23 Jan 2019 12:07:38 -0700 [thread overview]
Message-ID: <20190123190738.GC6629@localhost.localdomain> (raw)
In-Reply-To: <20190123190204.csjedbvcxkjlr43d@wunner.de>
On Wed, Jan 23, 2019 at 08:02:04PM +0100, Lukas Wunner wrote:
> 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@Dellteam.com 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.
Right, so in Alex's case, it looks like we are observing
pcie_wait_for_link() returning true before the PDC event.
I'm wondering about PDS because if the link is up but Presence reports an
empty slot, does that matter for any implementations? Or is it perfectly
fine to enumerate an active link on an empty slot? An empty slot and
active link doesn't make a lot of sense, but that observation appears to
be what is reported here.
next prev parent reply other threads:[~2019-01-23 19:08 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-23 18:20 PCI: hotplug: Erroneous removal of hotplug PCI devices Alex_Gagniuc
2019-01-23 18:44 ` Keith Busch
2019-01-23 19:02 ` Lukas Wunner
2019-01-23 19:07 ` Keith Busch [this message]
2019-01-23 19:15 ` Lukas Wunner
2019-01-23 19:33 ` Keith Busch
2019-01-24 22:43 ` Austin.Bolen
2019-01-24 22:52 ` Austin.Bolen
[not found] ` <b32e6ca62ae2494f98450df81ca1ee14@AUSX13MPC131.AMER.DELL.COM>
2019-01-24 20:20 ` Keith Busch
2019-01-24 22:00 ` Austin.Bolen
2019-01-25 8:22 ` Lukas Wunner
2019-01-25 22:39 ` Austin.Bolen
2019-01-26 12:12 ` Lukas Wunner
2019-01-30 14:28 ` Austin.Bolen
2019-01-23 18:54 ` Lukas Wunner
2019-01-23 19:07 ` Lukas Wunner
2019-01-23 19:09 ` Keith Busch
2019-01-23 19:28 ` Lukas Wunner
2019-01-23 19:47 ` Keith Busch
2019-01-23 20:10 ` Alex_Gagniuc
2019-01-23 23:50 ` Alex_Gagniuc
2019-01-24 9:25 ` Lukas Wunner
2019-01-24 22:33 ` Austin.Bolen
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=20190123190738.GC6629@localhost.localdomain \
--to=keith.busch@intel.com \
--cc=Alex_Gagniuc@Dellteam.com \
--cc=Austin.Bolen@dell.com \
--cc=bhelgaas@google.com \
--cc=linux-pci@vger.kernel.org \
--cc=lukas@wunner.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.