linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] PCI: pciehp: Do not turn off slot if presence comes up after link
@ 2019-10-01 21:14 Stuart Hayes
  2019-10-01 21:14 ` [PATCH 1/3] PCI: pciehp: Add support for disabling in-band presence Stuart Hayes
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Stuart Hayes @ 2019-10-01 21:14 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: Austin Bolen, keith.busch, Alexandru Gagniuc, Rafael J . Wysocki,
	Mika Westerberg, Andy Shevchenko, Gustavo A . R . Silva,
	Sinan Kaya, Oza Pawandeep, linux-pci, linux-kernel, lukas,
	Stuart Hayes

In older PCIe specs, PDS (presence detect) would come up when the
"in-band" presence detect pin connected, and would be up before DLLLA
(link active).

In PCIe 4.0 (as an ECN) and in PCIe 5.0, there is a new bit to show if
in-band presence detection can be disabled for the slot, and another bit
that disables it--and a recommendation that it should be disabled if it
can be. In addition, certain OEMs disable in-band presence detection
without implementing these bits.

This means it is possible to get a "card present" interrupt after the
link is up and the driver is loaded.  This causes an erroneous removal
of the device driver, followed by an immediate re-probing.

This patch set defines these new bits, uses them to disable in-band
presence detection if it can be, waits for PDS to go up if in-band
presence detection is disabled, and adds a DMI table that will let us
know if we should assume in-band presence is disabled on a system.

This patch set is based on a patch set [1] submitted many months ago by
Alexandru Gagniuc, who is no longer working on it.

[1] https://patchwork.kernel.org/cover/10909167/
    [v3,0/4] PCI: pciehp: Do not turn off slot if presence comes up after link

Stuart Hayes (3):
  PCI: pciehp: Add support for disabling in-band presence
  PCI: pciehp: Wait for PDS when in-band presence is disabled
  PCI: pciehp: Add dmi table for systems with in-band presence disabled

 drivers/pci/hotplug/pciehp.h     |  1 +
 drivers/pci/hotplug/pciehp_hpc.c | 45 +++++++++++++++++++++++++++++++-
 include/uapi/linux/pci_regs.h    |  2 ++
 3 files changed, 47 insertions(+), 1 deletion(-)

-- 
2.18.1


^ permalink raw reply	[flat|nested] 11+ messages in thread
* [PATCH 0/3] PCI: pciehp: Do not turn off slot if presence comes up after link
@ 2019-10-09 20:05 Stuart Hayes
  0 siblings, 0 replies; 11+ messages in thread
From: Stuart Hayes @ 2019-10-09 20:05 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: Austin Bolen, keith.busch, Alexandru Gagniuc, Rafael J . Wysocki,
	Mika Westerberg, Andy Shevchenko, Gustavo A . R . Silva,
	Sinan Kaya, Oza Pawandeep, linux-pci, linux-kernel, lukas,
	Stuart Hayes

In older PCIe specs, PDS (presence detect) would come up when the
"in-band" presence detect pin connected, and would be up before DLLLA
(link active).

In PCIe 4.0 (as an ECN) and in PCIe 5.0, there is a new bit to show if
in-band presence detection can be disabled for the slot, and another bit
that disables it--and a recommendation that it should be disabled if it
can be. In addition, certain OEMs disable in-band presence detection
without implementing these bits.

This means it is possible to get a "card present" interrupt after the
link is up and the driver is loaded.  This causes an erroneous removal
of the device driver, followed by an immediate re-probing.

This patch set defines these new bits, uses them to disable in-band
presence detection if it can be, waits for PDS to go up if in-band
presence detection is disabled, and adds a DMI table that will let us
know if we should assume in-band presence is disabled on a system.

The first two patches in this set come from a patch set that was
submitted but not accepted many months ago by Alexandru Gagniuc [1].
The first is unmodified, the second has the commit message and timeout 
modified.

[1] https://patchwork.kernel.org/cover/10909167/
    [v3,0/4] PCI: pciehp: Do not turn off slot if presence comes up after link

Alexandru Gagniuc (2):
  PCI: pciehp: Add support for disabling in-band presence
  PCI: pciehp: Wait for PDS if in-band presence is disabled

Stuart Hayes (1):
  PCI: pciehp: Add dmi table for in-band presence disabled

 drivers/pci/hotplug/pciehp.h     |  1 +
 drivers/pci/hotplug/pciehp_hpc.c | 45 +++++++++++++++++++++++++++++++-
 include/uapi/linux/pci_regs.h    |  2 ++
 3 files changed, 47 insertions(+), 1 deletion(-)

-- 
2.18.1


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2019-10-09 20:05 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-01 21:14 [PATCH 0/3] PCI: pciehp: Do not turn off slot if presence comes up after link Stuart Hayes
2019-10-01 21:14 ` [PATCH 1/3] PCI: pciehp: Add support for disabling in-band presence Stuart Hayes
2019-10-01 21:14 ` [PATCH 2/3] PCI: pciehp: Wait for PDS if in-band presence is disabled Stuart Hayes
2019-10-01 21:14 ` [PATCH 3/3] PCI: pciehp: Add dmi table for in-band presence disabled Stuart Hayes
2019-10-01 21:36   ` Alex G.
2019-10-01 23:06     ` Stuart Hayes
2019-10-02  4:13 ` [PATCH 0/3] PCI: pciehp: Do not turn off slot if presence comes up after link Lukas Wunner
2019-10-02  4:31   ` Stuart Hayes
2019-10-02 22:13   ` Alex G.
2019-10-03  3:33     ` Lukas Wunner
2019-10-09 20:05 Stuart Hayes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).