mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH RFC 0/3] PCI: Allow a device more time for its link to return after a reset
@ 2026-12-03  0:43 Brett Creeley
  2026-12-03  0:43 ` [PATCH RFC 1/3] PCI: Add PCI_VENDOR_ID_PENSANDO Brett Creeley
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Brett Creeley @ 2026-12-03  0:43 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: linux-pci, linux-kernel, Lukas Wunner, Ilpo Järvinen,
	Eric Joyner, Nikhil P. Rao, Brett Creeley

When the SoC of an AMD Pensando Vulcano 800 AI NIC is reset, for example
when the card's management controller power-cycles it after a fatal
error, its link stays down for up to ~12 seconds.  The Root Port sees a
Surprise Down and DPC contains the port, but after releasing DPC,
pci_bridge_wait_for_secondary_bus() waits only 1 s for the link to come
back.  Recovery fails and the card is disconnected, even though it would
have returned.  In the power-cycle case the card is unpowered for most
of the outage, so its firmware cannot keep the link up.

PCIe r5.0 sec 6.6.1 requires that, within 1.0 s of a Conventional Reset,
a device can receive a Configuration Request and return a Successful
Completion, independent of how quickly link training completes.  A link
that is still down after ~12 s cannot meet that, so this is handled as a
device erratum.  The Readiness Time Reporting Extended Capability cannot
express it: its times are capped at about 1.006 s and only shorten the
spec-mandated waits.  This follows Lukas' suggestion that hardware which
doesn't meet the spec gets a quirk that raises the timeout for that
device, rather than a blanket increase [1].

Patch 1 adds PCI_VENDOR_ID_PENSANDO to pci_ids.h.

Patch 2 adds pci_dev->link_up_timeout, which a quirk can set.  When
waiting for the secondary bus after a reset, the core uses the largest
value of the devices on that bus.  The value lives in the child's struct
pci_dev, so it is still available while the device's config space is
unreachable during DPC.  Devices without the quirk keep the existing 1 s
timeout.  Ports at or below 5 GT/s, and ports without link active
reporting (which can only sleep, not poll), are unchanged.

This complements d3cold_delay rather than duplicating it: on this path
d3cold_delay is the wait after the link is up, before the device is
accessed, whereas link_up_timeout bounds how long the link may take to
come up in the first place.

Patch 3 sets 20 s for the Vulcano upstream port.

Questions for this RFC:

- Is a device quirk the right place for this, rather than having the
  device's driver set the value at probe?  A quirk covers the card even
  when no driver is bound to its functions, and it is set before any
  driver probes.
- Should the core cap link_up_timeout (e.g. at
  PCIE_RESET_READY_POLL_MS), or is the quirk's value trusted as is?
- Hotplug-capable slots are not handled yet.  Vulcano cards are deployed
  in slots that support hotplug, and there pciehp waits only 4 s in
  pci_dpc_recovered() for DPC recovery before treating the Link Down as
  a removal, so a ~12 s outage still ends in the card being torn down.
  That wait covers the DPC recovery which, with this series, already
  includes link_up_timeout, so one possible approach is to reuse the
  same field: have pci_dpc_recovered() extend its 4 s by the amount a
  quirked device below the port adds to the link-up wait, leaving other
  devices unchanged.  Bjorn has suggested instead that this wait match
  PCIE_RESET_READY_POLL_MS for everyone [2].  Which would you prefer?
  This part is not implemented or tested yet.
- Ports at or below 5 GT/s still use the fixed 1 s budget.  Is it worth
  extending that path too, or is it fine to leave it until a device
  needs it?

Testing: on systems with a Vulcano 800 AI NIC in slots without hotplug,
resetting the card's SoC keeps the link down for ~12 s.  Without this
series, DPC recovery fails and the card is disconnected; with it, the
link returns within the extended wait and DPC recovery succeeds.

[1] https://lore.kernel.org/linux-pci/awIScN3rXFv6v9x2@wunner.de/
[2] https://lore.kernel.org/linux-pci/20250806213409.GA19037@bhelgaas/

Signed-off-by: Brett Creeley <brett.creeley@amd.com>
---
Brett Creeley (3):
      PCI: Add PCI_VENDOR_ID_PENSANDO
      PCI: Allow quirks to extend the link-up wait after reset
      PCI: Extend link-up timeout for AMD Pensando Vulcano upstream port

 drivers/pci/pci.c       | 73 +++++++++++++++++++++++++++++++++++++++++--------
 drivers/pci/quirks.c    | 13 +++++++++
 include/linux/pci.h     |  1 +
 include/linux/pci_ids.h |  2 ++
 4 files changed, 78 insertions(+), 11 deletions(-)
---
base-commit: 85a0cf7926b9e6883cbc515b8b5f77090d3b1889
change-id: 20261202-b4-pci-link-up-timeout-07f7ebc95747

Best regards,
--  
Brett Creeley <brett.creeley@amd.com>


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

* [PATCH RFC 1/3] PCI: Add PCI_VENDOR_ID_PENSANDO
  2026-12-03  0:43 [PATCH RFC 0/3] PCI: Allow a device more time for its link to return after a reset Brett Creeley
@ 2026-12-03  0:43 ` Brett Creeley
  2026-12-03  8:36   ` Lukas Wunner
  2026-12-03  0:43 ` [PATCH RFC 2/3] PCI: Allow quirks to extend the link-up wait after reset Brett Creeley
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 8+ messages in thread
From: Brett Creeley @ 2026-12-03  0:43 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: linux-pci, linux-kernel, Lukas Wunner, Ilpo Järvinen,
	Eric Joyner, Nikhil P. Rao, Brett Creeley

The AMD Pensando vendor ID is defined locally by the ionic, pds_core
and pds-vfio-pci drivers.  Add it to pci_ids.h so the PCI core can use
it for a quirk.

Signed-off-by: Brett Creeley <brett.creeley@amd.com>
---
 include/linux/pci_ids.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index 030c86dd6d67..ee8831233bbb 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -2623,6 +2623,8 @@
 
 #define PCI_VENDOR_ID_HXT		0x1dbf
 
+#define PCI_VENDOR_ID_PENSANDO		0x1dd8
+
 #define PCI_VENDOR_ID_TEKRAM		0x1de1
 #define PCI_DEVICE_ID_TEKRAM_DC290	0xdc29
 

-- 
2.43.0


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

* [PATCH RFC 2/3] PCI: Allow quirks to extend the link-up wait after reset
  2026-12-03  0:43 [PATCH RFC 0/3] PCI: Allow a device more time for its link to return after a reset Brett Creeley
  2026-12-03  0:43 ` [PATCH RFC 1/3] PCI: Add PCI_VENDOR_ID_PENSANDO Brett Creeley
@ 2026-12-03  0:43 ` Brett Creeley
  2026-12-03  8:34   ` Lukas Wunner
  2026-12-03  0:43 ` [PATCH RFC 3/3] PCI: Extend link-up timeout for AMD Pensando Vulcano upstream port Brett Creeley
  2026-12-03  8:45 ` [PATCH RFC 0/3] PCI: Allow a device more time for its link to return after a reset Lukas Wunner
  3 siblings, 1 reply; 8+ messages in thread
From: Brett Creeley @ 2026-12-03  0:43 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: linux-pci, linux-kernel, Lukas Wunner, Ilpo Järvinen,
	Eric Joyner, Nikhil P. Rao, Brett Creeley

After a DPC event, Secondary Bus Reset or D3cold->D0 transition,
pci_bridge_wait_for_secondary_bus() waits for the link below the
Downstream Port to become active again.  On ports faster than 5 GT/s,
the wait is bounded by PCIE_LINK_RETRAIN_TIMEOUT_MS (1 s).  If the link
has not trained by then, the device is considered gone and, for DPC,
error recovery fails with PCI_ERS_RESULT_DISCONNECT.

PCIe r5.0 sec 6.6.1 requires that, within 1.0 s of a Conventional Reset,
a device can receive a Configuration Request and return a Successful
Completion, independent of how quickly link training completes, so 1 s
is enough for compliant devices.  Some devices need much longer to bring
the link up, for instance when the reset also restarts embedded firmware
that controls the link.  The Readiness Time Reporting Extended
Capability (sec 7.9.17) cannot describe this: its times are capped at
about 1.006 s and are only meant to shorten the spec-mandated waits.

Add a link_up_timeout member to struct pci_dev that quirks can set for
such devices.  When waiting for the secondary bus, use the largest
value of the devices on that bus, falling back to the existing 1 s, so
devices without the quirk see no change.  The value lives in the
child's struct pci_dev, which persists across DPC recovery and bus
resets, so it remains available even though the device's config space
is inaccessible while the link is down.

The extended timeout is only used where the link can be polled:
Downstream Ports faster than 5 GT/s that report Data Link Layer Link
Active.  Everywhere else the existing waits apply unchanged; ports
without that reporting can only sleep, and would otherwise sleep for
the full extended timeout on every reset.  Where it is used, the
device is waited for even when firmware has zeroed every d3cold_delay
on the bus (e.g. via the ACPI reset delay _DSM), which otherwise skips
the wait entirely: firmware cannot account for a device erratum.  A
separate message reports when the extended wait expires.

Signed-off-by: Brett Creeley <brett.creeley@amd.com>
---
 drivers/pci/pci.c   | 73 +++++++++++++++++++++++++++++++++++++++++++++--------
 include/linux/pci.h |  1 +
 2 files changed, 63 insertions(+), 11 deletions(-)

diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index f89ad49e61e6..c387a564d997 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -4614,12 +4614,14 @@ static int pci_pm_reset(struct pci_dev *dev, bool probe)
  * @pdev: Device whose link to wait for.
  * @use_lt: Use the LT bit if TRUE, or the DLLLA bit if FALSE.
  * @active: Waiting for active or inactive?
+ * @timeout_ms: How long to wait for the status change (in ms)
  *
  * Return 0 if successful, or -ETIMEDOUT if status has not changed within
- * PCIE_LINK_RETRAIN_TIMEOUT_MS milliseconds.
+ * @timeout_ms milliseconds.
  */
 static int pcie_wait_for_link_status(struct pci_dev *pdev,
-				     bool use_lt, bool active)
+				     bool use_lt, bool active,
+				     unsigned int timeout_ms)
 {
 	u16 lnksta_mask, lnksta_match;
 	unsigned long end_jiffies;
@@ -4628,7 +4630,7 @@ static int pcie_wait_for_link_status(struct pci_dev *pdev,
 	lnksta_mask = use_lt ? PCI_EXP_LNKSTA_LT : PCI_EXP_LNKSTA_DLLLA;
 	lnksta_match = active ? lnksta_mask : 0;
 
-	end_jiffies = jiffies + msecs_to_jiffies(PCIE_LINK_RETRAIN_TIMEOUT_MS);
+	end_jiffies = jiffies + msecs_to_jiffies(timeout_ms);
 	do {
 		pcie_capability_read_word(pdev, PCI_EXP_LNKSTA, &lnksta);
 		if ((lnksta & lnksta_mask) == lnksta_match)
@@ -4667,7 +4669,8 @@ int pcie_retrain_link(struct pci_dev *pdev, bool use_lt)
 	 * avoid LTSSM race as recommended in Implementation Note at the end
 	 * of PCIe r6.1 sec 7.5.3.7.
 	 */
-	rc = pcie_wait_for_link_status(pdev, true, false);
+	rc = pcie_wait_for_link_status(pdev, true, false,
+				       PCIE_LINK_RETRAIN_TIMEOUT_MS);
 	if (rc)
 		return rc;
 
@@ -4681,7 +4684,8 @@ int pcie_retrain_link(struct pci_dev *pdev, bool use_lt)
 		pcie_capability_clear_word(pdev, PCI_EXP_LNKCTL, PCI_EXP_LNKCTL_RL);
 	}
 
-	rc = pcie_wait_for_link_status(pdev, use_lt, !use_lt);
+	rc = pcie_wait_for_link_status(pdev, use_lt, !use_lt,
+				       PCIE_LINK_RETRAIN_TIMEOUT_MS);
 
 	/*
 	 * Clear LBMS after a manual retrain so that the bit can be used
@@ -4709,11 +4713,12 @@ int pcie_retrain_link(struct pci_dev *pdev, bool use_lt)
  * @pdev: Bridge device
  * @active: waiting for active or inactive?
  * @delay: Delay to wait after link has become active (in ms)
+ * @timeout_ms: How long to poll for the link to change state (in ms)
  *
  * Use this to wait till link becomes active or inactive.
  */
 static bool pcie_wait_for_link_delay(struct pci_dev *pdev, bool active,
-				     int delay)
+				     int delay, unsigned int timeout_ms)
 {
 	int rc;
 
@@ -4737,7 +4742,7 @@ static bool pcie_wait_for_link_delay(struct pci_dev *pdev, bool active,
 	 */
 	if (active)
 		msleep(20);
-	rc = pcie_wait_for_link_status(pdev, false, active);
+	rc = pcie_wait_for_link_status(pdev, false, active, timeout_ms);
 	if (active) {
 		if (rc)
 			rc = pcie_failed_link_retrain(pdev);
@@ -4763,7 +4768,8 @@ static bool pcie_wait_for_link_delay(struct pci_dev *pdev, bool active,
  */
 bool pcie_wait_for_link(struct pci_dev *pdev, bool active)
 {
-	return pcie_wait_for_link_delay(pdev, active, 100);
+	return pcie_wait_for_link_delay(pdev, active, 100,
+					PCIE_LINK_RETRAIN_TIMEOUT_MS);
 }
 
 /*
@@ -4791,6 +4797,40 @@ static int pci_bus_max_d3cold_delay(const struct pci_bus *bus)
 	return max(min_delay, max_delay);
 }
 
+/*
+ * Find the longest time any device on the bus needs for its link to come
+ * up after reset.  Quirks may extend it for devices whose link takes longer
+ * than the spec allows to train.
+ *
+ * Context: Called with @pci_bus_sem locked for reading.
+ */
+static unsigned int pci_bus_max_link_up_timeout(const struct pci_bus *bus)
+{
+	unsigned int timeout = PCIE_LINK_RETRAIN_TIMEOUT_MS;
+	const struct pci_dev *pdev;
+
+	lockdep_assert_held(&pci_bus_sem);
+
+	list_for_each_entry(pdev, &bus->devices, bus_list)
+		timeout = max(timeout, pdev->link_up_timeout);
+
+	return timeout;
+}
+
+/*
+ * An extended link-up timeout is only used where the link can be polled:
+ * Downstream Ports faster than 5 GT/s that report Data Link Layer Link
+ * Active.  Elsewhere the existing waits apply unchanged.
+ */
+static bool pcie_link_up_timeout_extended(struct pci_dev *bridge,
+					  unsigned int timeout)
+{
+	return timeout > PCIE_LINK_RETRAIN_TIMEOUT_MS &&
+	       pcie_downstream_port(bridge) &&
+	       pcie_get_speed_cap(bridge) > PCIE_SPEED_5_0GT &&
+	       bridge->link_active_reporting;
+}
+
 /**
  * pci_bridge_wait_for_secondary_bus - Wait for secondary bus to be accessible
  * @dev: PCI bridge
@@ -4810,6 +4850,8 @@ static int pci_bus_max_d3cold_delay(const struct pci_bus *bus)
 int pci_bridge_wait_for_secondary_bus(struct pci_dev *dev, char *reset_type)
 {
 	struct pci_dev *child __free(pci_dev_put) = NULL;
+	unsigned int link_up_timeout;
+	bool extended;
 	int delay;
 
 	if (pci_dev_is_disconnected(dev))
@@ -4833,7 +4875,9 @@ int pci_bridge_wait_for_secondary_bus(struct pci_dev *dev, char *reset_type)
 
 	/* Take d3cold_delay requirements into account */
 	delay = pci_bus_max_d3cold_delay(dev->subordinate);
-	if (!delay) {
+	link_up_timeout = pci_bus_max_link_up_timeout(dev->subordinate);
+	extended = pcie_link_up_timeout_extended(dev, link_up_timeout);
+	if (!delay && !extended) {
 		up_read(&pci_bus_sem);
 		return 0;
 	}
@@ -4897,9 +4941,16 @@ int pci_bridge_wait_for_secondary_bus(struct pci_dev *dev, char *reset_type)
 
 	pci_dbg(dev, "waiting %d ms for downstream link, after activation\n",
 		delay);
-	if (!pcie_wait_for_link_delay(dev, true, delay)) {
+	if (extended)
+		pci_dbg(dev, "allowing %u ms for downstream link to come up\n",
+			link_up_timeout);
+	if (!pcie_wait_for_link_delay(dev, true, delay, link_up_timeout)) {
 		/* Did not train, no need to wait any further */
-		pci_info(dev, "Data Link Layer Link Active not set in %d msec\n", delay);
+		if (extended)
+			pci_info(dev, "Data Link Layer Link Active not set in extended %u msec\n",
+				 link_up_timeout);
+		else
+			pci_info(dev, "Data Link Layer Link Active not set in %d msec\n", delay);
 		return -ENOTTY;
 	}
 
diff --git a/include/linux/pci.h b/include/linux/pci.h
index aee6a178a535..33de05d509e4 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -434,6 +434,7 @@ struct pci_dev {
 	unsigned int	no_bw_notif:1;	/* BW notifications may cause issues */
 	unsigned int	d3hot_delay;	/* D3hot->D0 transition time in ms */
 	unsigned int	d3cold_delay;	/* D3cold->D0 transition time in ms */
+	unsigned int	link_up_timeout; /* Link-up wait (ms), >5 GT/s ports */
 
 	u16		l1ss;		/* L1SS Capability pointer */
 #ifdef CONFIG_PCIEASPM

-- 
2.43.0


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

* [PATCH RFC 3/3] PCI: Extend link-up timeout for AMD Pensando Vulcano upstream port
  2026-12-03  0:43 [PATCH RFC 0/3] PCI: Allow a device more time for its link to return after a reset Brett Creeley
  2026-12-03  0:43 ` [PATCH RFC 1/3] PCI: Add PCI_VENDOR_ID_PENSANDO Brett Creeley
  2026-12-03  0:43 ` [PATCH RFC 2/3] PCI: Allow quirks to extend the link-up wait after reset Brett Creeley
@ 2026-12-03  0:43 ` Brett Creeley
  2026-12-03  8:37   ` Lukas Wunner
  2026-12-03  8:45 ` [PATCH RFC 0/3] PCI: Allow a device more time for its link to return after a reset Lukas Wunner
  3 siblings, 1 reply; 8+ messages in thread
From: Brett Creeley @ 2026-12-03  0:43 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: linux-pci, linux-kernel, Lukas Wunner, Ilpo Järvinen,
	Eric Joyner, Nikhil P. Rao, Brett Creeley

AMD Pensando cards present a PCIe switch upstream port directly below
the host Downstream Port, with the card's endpoints behind it.

When the SoC of an AMD Pensando Vulcano 800 AI NIC is reset, for
example when the card's management controller power-cycles it after a
fatal error, the link stays down for up to ~12 seconds.  The Root Port
sees a Surprise Down and DPC contains the port, but after releasing DPC
the kernel waits only 1 s for the link to return, so recovery fails and
the card is disconnected even though it would have come back.

Allow the Vulcano upstream port 20 seconds for the link to come up.

Signed-off-by: Brett Creeley <brett.creeley@amd.com>
---
 drivers/pci/quirks.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index 6038b35d4a2d..281eaeae7055 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -6615,6 +6615,19 @@ static void pci_fixup_d3cold_delay_1sec(struct pci_dev *pdev)
 }
 DECLARE_PCI_FIXUP_FINAL(0x5555, 0x0004, pci_fixup_d3cold_delay_1sec);
 
+/*
+ * The AMD Pensando Vulcano 800 AI NIC's link can stay down for up to ~12
+ * seconds after the card's SoC is reset.
+ */
+static void pci_fixup_pensando_link_up_timeout(struct pci_dev *pdev)
+{
+	pdev->link_up_timeout = 20000;
+	pci_dbg(pdev, "extending link-up timeout to %u ms\n",
+		pdev->link_up_timeout);
+}
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_PENSANDO, 0x1478,
+			pci_fixup_pensando_link_up_timeout);
+
 #ifdef CONFIG_PCIEAER
 static void pci_mask_replay_timer_timeout(struct pci_dev *pdev)
 {

-- 
2.43.0


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

* Re: [PATCH RFC 2/3] PCI: Allow quirks to extend the link-up wait after reset
  2026-12-03  0:43 ` [PATCH RFC 2/3] PCI: Allow quirks to extend the link-up wait after reset Brett Creeley
@ 2026-12-03  8:34   ` Lukas Wunner
  0 siblings, 0 replies; 8+ messages in thread
From: Lukas Wunner @ 2026-12-03  8:34 UTC (permalink / raw)
  To: Brett Creeley
  Cc: Bjorn Helgaas, linux-pci, linux-kernel, Ilpo Järvinen,
	Eric Joyner, Nikhil P. Rao

On Wed, Dec 02, 2026 at 04:43:27PM -0800, Brett Creeley wrote:
> +++ b/drivers/pci/pci.c
> @@ -4614,12 +4614,14 @@ static int pci_pm_reset(struct pci_dev *dev, bool probe)
>   * @pdev: Device whose link to wait for.
>   * @use_lt: Use the LT bit if TRUE, or the DLLLA bit if FALSE.
>   * @active: Waiting for active or inactive?
> + * @timeout_ms: How long to wait for the status change (in ms)
>   *
>   * Return 0 if successful, or -ETIMEDOUT if status has not changed within
> - * PCIE_LINK_RETRAIN_TIMEOUT_MS milliseconds.
> + * @timeout_ms milliseconds.
>   */
>  static int pcie_wait_for_link_status(struct pci_dev *pdev,
> -				     bool use_lt, bool active)
> +				     bool use_lt, bool active,
> +				     unsigned int timeout_ms)
>  {

Can you make it so that pcie_wait_for_link_status() doesn't take
an extra parameter, but uses pdev->link_up_timeout in lieu of
PCIE_LINK_RETRAIN_TIMEOUT_MS if it is non-zero?

That would simplify the patch considerably.  Patches that deal
with non-conforming hardware should be minimally intrusive.

> @@ -4833,7 +4875,9 @@ int pci_bridge_wait_for_secondary_bus(struct pci_dev *dev, char *reset_type)
>  
>  	/* Take d3cold_delay requirements into account */
>  	delay = pci_bus_max_d3cold_delay(dev->subordinate);
> -	if (!delay) {
> +	link_up_timeout = pci_bus_max_link_up_timeout(dev->subordinate);
> +	extended = pcie_link_up_timeout_extended(dev, link_up_timeout);
> +	if (!delay && !extended) {
>  		up_read(&pci_bus_sem);
>  		return 0;
>  	}

Why is this needed?  I'd expect the control flow to just fall through
to the !pcie_wait_for_link_delay() at the end of
pci_bridge_wait_for_secondary_bus()?

> +++ b/include/linux/pci.h
> @@ -434,6 +434,7 @@ struct pci_dev {
>  	unsigned int	no_bw_notif:1;	/* BW notifications may cause issues */
>  	unsigned int	d3hot_delay;	/* D3hot->D0 transition time in ms */
>  	unsigned int	d3cold_delay;	/* D3cold->D0 transition time in ms */
> +	unsigned int	link_up_timeout; /* Link-up wait (ms), >5 GT/s ports */
>

I'd preer link_up_delay for consistency with the other fields
in the struct.  I'm not sure the >5 GT/s limitation needs to
be mentioned.

Thanks,

Lukas

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

* Re: [PATCH RFC 1/3] PCI: Add PCI_VENDOR_ID_PENSANDO
  2026-12-03  0:43 ` [PATCH RFC 1/3] PCI: Add PCI_VENDOR_ID_PENSANDO Brett Creeley
@ 2026-12-03  8:36   ` Lukas Wunner
  0 siblings, 0 replies; 8+ messages in thread
From: Lukas Wunner @ 2026-12-03  8:36 UTC (permalink / raw)
  To: Brett Creeley
  Cc: Bjorn Helgaas, linux-pci, linux-kernel, Ilpo Järvinen,
	Eric Joyner, Nikhil P. Rao

On Wed, Dec 02, 2026 at 04:43:26PM -0800, Brett Creeley wrote:
> The AMD Pensando vendor ID is defined locally by the ionic, pds_core
> and pds-vfio-pci drivers.  Add it to pci_ids.h so the PCI core can use
> it for a quirk.

Please delete it from drivers/net/ethernet/pensando/ionic/ionic.h
and drivers/vfio/pci/pds/pci_drv.c as part of this patch.

Thanks,

Lukas

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

* Re: [PATCH RFC 3/3] PCI: Extend link-up timeout for AMD Pensando Vulcano upstream port
  2026-12-03  0:43 ` [PATCH RFC 3/3] PCI: Extend link-up timeout for AMD Pensando Vulcano upstream port Brett Creeley
@ 2026-12-03  8:37   ` Lukas Wunner
  0 siblings, 0 replies; 8+ messages in thread
From: Lukas Wunner @ 2026-12-03  8:37 UTC (permalink / raw)
  To: Brett Creeley
  Cc: Bjorn Helgaas, linux-pci, linux-kernel, Ilpo Järvinen,
	Eric Joyner, Nikhil P. Rao

On Wed, Dec 02, 2026 at 04:43:28PM -0800, Brett Creeley wrote:
> +/*
> + * The AMD Pensando Vulcano 800 AI NIC's link can stay down for up to ~12
> + * seconds after the card's SoC is reset.
> + */
> +static void pci_fixup_pensando_link_up_timeout(struct pci_dev *pdev)
> +{
> +	pdev->link_up_timeout = 20000;

Why 20 sec if only ~12 are needed?

Thanks,

Lukas

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

* Re: [PATCH RFC 0/3] PCI: Allow a device more time for its link to return after a reset
  2026-12-03  0:43 [PATCH RFC 0/3] PCI: Allow a device more time for its link to return after a reset Brett Creeley
                   ` (2 preceding siblings ...)
  2026-12-03  0:43 ` [PATCH RFC 3/3] PCI: Extend link-up timeout for AMD Pensando Vulcano upstream port Brett Creeley
@ 2026-12-03  8:45 ` Lukas Wunner
  3 siblings, 0 replies; 8+ messages in thread
From: Lukas Wunner @ 2026-12-03  8:45 UTC (permalink / raw)
  To: Brett Creeley
  Cc: Bjorn Helgaas, linux-pci, linux-kernel, Ilpo Järvinen,
	Eric Joyner, Nikhil P. Rao

On Wed, Dec 02, 2026 at 04:43:25PM -0800, Brett Creeley wrote:
> - Is a device quirk the right place for this, rather than having the
>   device's driver set the value at probe?  A quirk covers the card even
>   when no driver is bound to its functions, and it is set before any
>   driver probes.

It's the right place.

> - Should the core cap link_up_timeout (e.g. at
>   PCIE_RESET_READY_POLL_MS), or is the quirk's value trusted as is?

It's trusted.

> - Hotplug-capable slots are not handled yet.  Vulcano cards are deployed
>   in slots that support hotplug, and there pciehp waits only 4 s in
>   pci_dpc_recovered() for DPC recovery before treating the Link Down as
>   a removal, so a ~12 s outage still ends in the card being torn down.
>   That wait covers the DPC recovery which, with this series, already
>   includes link_up_timeout, so one possible approach is to reuse the
>   same field: have pci_dpc_recovered() extend its 4 s by the amount a
>   quirked device below the port adds to the link-up wait, leaving other
>   devices unchanged.  Bjorn has suggested instead that this wait match
>   PCIE_RESET_READY_POLL_MS for everyone [2].  Which would you prefer?
>   This part is not implemented or tested yet.

I don't really know.

> - Ports at or below 5 GT/s still use the fixed 1 s budget.  Is it worth
>   extending that path too, or is it fine to leave it until a device
>   needs it?

Leave it until a need arises.

I'm wondering if it would be possible to detect in the driver's
->error_detected() callback that the card is undergoing a power cycle,
wait 12 sec if so, then when dpc_reset_link() brings the port out of
containment, the link comes back quicker?  Maybe the ->error_detected()
callback has a way to talk to some OOB management controller on the card
to detect a power cycle?

Thanks,

Lukas

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

end of thread, other threads:[~2026-12-03  8:45 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-12-03  0:43 [PATCH RFC 0/3] PCI: Allow a device more time for its link to return after a reset Brett Creeley
2026-12-03  0:43 ` [PATCH RFC 1/3] PCI: Add PCI_VENDOR_ID_PENSANDO Brett Creeley
2026-12-03  8:36   ` Lukas Wunner
2026-12-03  0:43 ` [PATCH RFC 2/3] PCI: Allow quirks to extend the link-up wait after reset Brett Creeley
2026-12-03  8:34   ` Lukas Wunner
2026-12-03  0:43 ` [PATCH RFC 3/3] PCI: Extend link-up timeout for AMD Pensando Vulcano upstream port Brett Creeley
2026-12-03  8:37   ` Lukas Wunner
2026-12-03  8:45 ` [PATCH RFC 0/3] PCI: Allow a device more time for its link to return after a reset Lukas Wunner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®