diff mbox series

[v2] PCI: fix the printed delay amount in info print

Message ID 20250414001505.21243-2-wilfred.opensource@gmail.com (mailing list archive)
State New
Delegated to: Bjorn Helgaas
Headers show
Series [v2] PCI: fix the printed delay amount in info print | expand

Commit Message

Wilfred Mallawa April 14, 2025, 12:15 a.m. UTC
From: Wilfred Mallawa <wilfred.mallawa@wdc.com>

Print the delay amount that pcie_wait_for_link_delay() is invoked with
instead of the hardcoded 1000ms value in the debug info print.

Fixes: 7b3ba09febf4 ("PCI/PM: Shorten pci_bridge_wait_for_secondary_bus() wait time for slow links")
Signed-off-by: Wilfred Mallawa <wilfred.mallawa@wdc.com>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
---
 drivers/pci/pci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Sathyanarayanan Kuppuswamy April 14, 2025, 12:46 a.m. UTC | #1
On 4/13/25 5:15 PM, Wilfred Mallawa wrote:
> From: Wilfred Mallawa <wilfred.mallawa@wdc.com>
>
> Print the delay amount that pcie_wait_for_link_delay() is invoked with
> instead of the hardcoded 1000ms value in the debug info print.
>
> Fixes: 7b3ba09febf4 ("PCI/PM: Shorten pci_bridge_wait_for_secondary_bus() wait time for slow links")
> Signed-off-by: Wilfred Mallawa <wilfred.mallawa@wdc.com>
> Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
> ---

Reviewed-by: Kuppuswamy Sathyanarayanan 
<sathyanarayanan.kuppuswamy@linux.intel.com>

>   drivers/pci/pci.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
> index 869d204a70a3..8139b70cafa9 100644
> --- a/drivers/pci/pci.c
> +++ b/drivers/pci/pci.c
> @@ -4935,7 +4935,7 @@ int pci_bridge_wait_for_secondary_bus(struct pci_dev *dev, char *reset_type)
>   		delay);
>   	if (!pcie_wait_for_link_delay(dev, true, delay)) {
>   		/* Did not train, no need to wait any further */
> -		pci_info(dev, "Data Link Layer Link Active not set in 1000 msec\n");
> +		pci_info(dev, "Data Link Layer Link Active not set in %d msec\n", delay);
>   		return -ENOTTY;
>   	}
>
Mika Westerberg April 14, 2025, 4:40 a.m. UTC | #2
On Mon, Apr 14, 2025 at 10:15:06AM +1000, Wilfred Mallawa wrote:
> From: Wilfred Mallawa <wilfred.mallawa@wdc.com>
> 
> Print the delay amount that pcie_wait_for_link_delay() is invoked with
> instead of the hardcoded 1000ms value in the debug info print.
> 
> Fixes: 7b3ba09febf4 ("PCI/PM: Shorten pci_bridge_wait_for_secondary_bus() wait time for slow links")
> Signed-off-by: Wilfred Mallawa <wilfred.mallawa@wdc.com>
> Reviewed-by: Damien Le Moal <dlemoal@kernel.org>

Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Ilpo Järvinen April 14, 2025, 1:01 p.m. UTC | #3
On Mon, 14 Apr 2025, Wilfred Mallawa wrote:

> From: Wilfred Mallawa <wilfred.mallawa@wdc.com>
> 
> Print the delay amount that pcie_wait_for_link_delay() is invoked with
> instead of the hardcoded 1000ms value in the debug info print.
> 
> Fixes: 7b3ba09febf4 ("PCI/PM: Shorten pci_bridge_wait_for_secondary_bus() wait time for slow links")
> Signed-off-by: Wilfred Mallawa <wilfred.mallawa@wdc.com>
> Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
> ---
>  drivers/pci/pci.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
> index 869d204a70a3..8139b70cafa9 100644
> --- a/drivers/pci/pci.c
> +++ b/drivers/pci/pci.c
> @@ -4935,7 +4935,7 @@ int pci_bridge_wait_for_secondary_bus(struct pci_dev *dev, char *reset_type)
>  		delay);
>  	if (!pcie_wait_for_link_delay(dev, true, delay)) {
>  		/* Did not train, no need to wait any further */
> -		pci_info(dev, "Data Link Layer Link Active not set in 1000 msec\n");
> +		pci_info(dev, "Data Link Layer Link Active not set in %d msec\n", delay);
>  		return -ENOTTY;
>  	}
>  
> 

Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
diff mbox series

Patch

diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 869d204a70a3..8139b70cafa9 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -4935,7 +4935,7 @@  int pci_bridge_wait_for_secondary_bus(struct pci_dev *dev, char *reset_type)
 		delay);
 	if (!pcie_wait_for_link_delay(dev, true, delay)) {
 		/* Did not train, no need to wait any further */
-		pci_info(dev, "Data Link Layer Link Active not set in 1000 msec\n");
+		pci_info(dev, "Data Link Layer Link Active not set in %d msec\n", delay);
 		return -ENOTTY;
 	}