Re: [PATCH v6 01/13] PCI: tegra194: Fix polling delay for L2 state
From: Bjorn Helgaas
Date: Mon Mar 02 2026 - 18:17:57 EST
On Tue, Feb 24, 2026 at 12:11:39AM +0530, Manikanta Maddireddy wrote:
> From: Vidya Sagar <vidyas@xxxxxxxxxx>
>
> As per PCIe spec r6.0, sec 5.3.3.2.1, after sending PME_Turn_Off message,
> Root port should wait for 1~10 msec for PME_TO_Ack message. Currently,
> driver is polling for 10 msec with 1 usec delay which is aggressive.
> Change it to 10 msec polling with 100 usec delay. Since this function
> is used in non-atomic context only, use non-atomic poll function.
>
> Fixes: 56e15a238d92 ("PCI: tegra: Add Tegra194 PCIe support")
> Signed-off-by: Vidya Sagar <vidyas@xxxxxxxxxx>
> Signed-off-by: Manikanta Maddireddy <mmaddireddy@xxxxxxxxxx>
> ---
> Changes V1 -> V6: None
>
> drivers/pci/controller/dwc/pcie-tegra194.c | 9 +++++----
> 1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/pci/controller/dwc/pcie-tegra194.c b/drivers/pci/controller/dwc/pcie-tegra194.c
> index 0ddeef70726d..96d38571a7e7 100644
> --- a/drivers/pci/controller/dwc/pcie-tegra194.c
> +++ b/drivers/pci/controller/dwc/pcie-tegra194.c
> @@ -198,7 +198,8 @@
> #define CAP_SPCIE_CAP_OFF_USP_TX_PRESET0_MASK GENMASK(11, 8)
> #define CAP_SPCIE_CAP_OFF_USP_TX_PRESET0_SHIFT 8
>
> -#define PME_ACK_TIMEOUT 10000
> +#define PME_ACK_DELAY 100 /* 100 us */
> +#define PME_ACK_TIMEOUT 10000 /* 10 ms */
Can you add "_US" and "_MS" suffixes to these to indicate the units?
Unless they are something specific to tegra194, the #defines should
probably go in drivers/pci/pci.h so they can be shared.
It'd be nice to update the PCIe spec citation to r7.0.