linux-renesas-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marek Vasut <marek.vasut@mailbox.org>
To: Mathias Nyman <mathias.nyman@linux.intel.com>, linux-usb@vger.kernel.org
Cc: Geert Uytterhoeven <geert+renesas@glider.be>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Mathias Nyman <mathias.nyman@intel.com>,
	Vinod Koul <vkoul@kernel.org>,
	stable@vger.kernel.org, linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH] usb: renesas-xhci: Fix External ROM access timeouts
Date: Sun, 3 Aug 2025 00:54:15 +0200	[thread overview]
Message-ID: <7890ba1f-890e-45e5-b0cd-c96a84e3e6f2@mailbox.org> (raw)
In-Reply-To: <c47814bf-85f0-4bd1-bc33-63f06b44d9c9@linux.intel.com>

On 7/29/25 5:20 PM, Mathias Nyman wrote:

Hi,

>> diff --git a/drivers/usb/host/xhci-pci-renesas.c b/drivers/usb/host/ 
>> xhci-pci-renesas.c
>> index 620f8f0febb8..86df80399c9f 100644
>> --- a/drivers/usb/host/xhci-pci-renesas.c
>> +++ b/drivers/usb/host/xhci-pci-renesas.c
>> @@ -47,8 +47,9 @@
>>   #define RENESAS_ROM_ERASE_MAGIC                0x5A65726F
>>   #define RENESAS_ROM_WRITE_MAGIC                0x53524F4D
>> -#define RENESAS_RETRY    10000
>> -#define RENESAS_DELAY    10
>> +#define RENESAS_RETRY            50000    /* 50000 * RENESAS_DELAY ~= 
>> 500ms */
>> +#define RENESAS_CHIP_ERASE_RETRY    500000    /* 500000 * 
>> RENESAS_DELAY ~= 5s */
>> +#define RENESAS_DELAY            10
> 
> No objection, just making sure author is aware that RENESAS_RETRY is 
> used in
> _seven_ for loops, and this change will increase the timeout five-fold for
> all of them.

Yes, I am aware this increases the timeout for all SPI EEPROM status 
polling loops in this driver.

The longer retry count would only have an impact in case something bad 
happened during SPI EEPROM programming. On user system, that should 
happen never -- user hardware should ship with already programmed SPI 
EEPROM, so this programming code is skipped. In factory, this might 
happen, but then it is likely a hardware defect and that hardware never 
reaches users.

-- 
Best regards,
Marek Vasut

      reply	other threads:[~2025-08-02 22:54 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-27 15:44 [PATCH] usb: renesas-xhci: Fix External ROM access timeouts Marek Vasut
2025-07-28  4:18 ` Greg Kroah-Hartman
2025-07-29  3:09   ` Marek Vasut
2025-07-29  5:03     ` Greg Kroah-Hartman
2025-07-29  7:11       ` Geert Uytterhoeven
2025-07-29  7:55         ` Greg Kroah-Hartman
2025-07-29 10:17 ` Michał Pecio
2025-08-02 22:30   ` Marek Vasut
2025-07-29 15:20 ` Mathias Nyman
2025-08-02 22:54   ` Marek Vasut [this message]

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=7890ba1f-890e-45e5-b0cd-c96a84e3e6f2@mailbox.org \
    --to=marek.vasut@mailbox.org \
    --cc=geert+renesas@glider.be \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mathias.nyman@intel.com \
    --cc=mathias.nyman@linux.intel.com \
    --cc=stable@vger.kernel.org \
    --cc=vkoul@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;
as well as URLs for NNTP newsgroup(s).