Linux PCI subsystem development
 help / color / mirror / Atom feed
From: Hans Zhang <18255117159@163.com>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: bhelgaas@google.com, linux-pci@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 2/4] PCI: Add macro for link status check delay
Date: Wed, 5 Nov 2025 23:54:40 +0800	[thread overview]
Message-ID: <8497a7c8-cd2b-4718-9ca5-69b21cde667b@163.com> (raw)
In-Reply-To: <20251103153922.GA1806421@bhelgaas>



On 2025/11/3 23:39, Bjorn Helgaas wrote:
> On Sun, Nov 02, 2025 at 12:05:36AM +0800, Hans Zhang wrote:
>> Add PCIE_LINK_STATUS_CHECK_MS macro for link status check delay.
>>
>> Signed-off-by: Hans Zhang <18255117159@163.com>
>> ---
>>   drivers/pci/pci.c | 4 +++-
>>   1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
>> index 86449f2d627b..b57d8e4c3a48 100644
>> --- a/drivers/pci/pci.c
>> +++ b/drivers/pci/pci.c
>> @@ -77,6 +77,8 @@ struct pci_pme_device {
>>    */
>>   #define PCIE_RESET_READY_POLL_MS 60000 /* msec */
>>   
>> +#define PCIE_LINK_STATUS_CHECK_MS 1
>> +
>>   static void pci_dev_d3_sleep(struct pci_dev *dev)
>>   {
>>   	unsigned int delay_ms = max(dev->d3hot_delay, pci_pm_d3hot_delay);
>> @@ -4632,7 +4634,7 @@ static int pcie_wait_for_link_status(struct pci_dev *pdev,
>>   		pcie_capability_read_word(pdev, PCI_EXP_LNKSTA, &lnksta);
>>   		if ((lnksta & lnksta_mask) == lnksta_match)
>>   			return 0;
>> -		msleep(1);
>> +		msleep(PCIE_LINK_STATUS_CHECK_MS);
> 
> Doesn't seem worth it to me.

Hi Bjorn,

Please drop this patch.

Best regards,
Hans

> 
>>   	} while (time_before(jiffies, end_jiffies));
>>   
>>   	return -ETIMEDOUT;
>> -- 
>> 2.34.1
>>


  reply	other threads:[~2025-11-05 15:55 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-01 16:05 [PATCH v4 0/4] PCI: Add delay macros for better code readability and maintainability Hans Zhang
2025-11-01 16:05 ` [PATCH v4 1/4] PCI: Add macro for secondary bus reset delay Hans Zhang
2025-11-05 15:56   ` Hans Zhang
2025-11-01 16:05 ` [PATCH v4 2/4] PCI: Add macro for link status check delay Hans Zhang
2025-11-03 15:39   ` Bjorn Helgaas
2025-11-05 15:54     ` Hans Zhang [this message]
2025-11-01 16:05 ` [PATCH v4 3/4] PCI: pciehp: Add macros for hotplug operation delays Hans Zhang
2025-11-01 16:13   ` Christophe JAILLET
2025-11-01 16:16     ` Hans Zhang
2025-11-03 15:37   ` Bjorn Helgaas
2025-11-03 17:24     ` Lukas Wunner
2025-11-05 15:54       ` Hans Zhang
2025-11-01 16:05 ` [PATCH v4 4/4] PCI/DPC: Add macro for RP busy check delay Hans Zhang

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=8497a7c8-cd2b-4718-9ca5-69b21cde667b@163.com \
    --to=18255117159@163.com \
    --cc=bhelgaas@google.com \
    --cc=helgaas@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox