From: Ninad Palsule <ninad@linux.ibm.com>
To: openbmc@lists.ozlabs.org, andrew@codeconstruct.com.au,
joel@jms.id.au, eajames@linux.ibm.com
Cc: Ninad Palsule <ninad@linux.ibm.com>
Subject: [PATCH linux dev-6.18 v1] eeprom: at25: fix read_poll_timeout() arg order
Date: Thu, 15 Oct 2026 12:26:55 -0500 [thread overview]
Message-ID: <20261015172656.2586295-1-ninad@linux.ibm.com> (raw)
The arguments to read_poll_timeout() in at25_wait_ready() are in the
wrong order. "false" is passed as sleep_us, while the macro expects
sleep_us, timeout_us and sleep_before_read in that order.
This makes the loop busy-poll instead of sleeping 1 ms between reads,
and shortens the timeout from EE_TIMEOUT ms to 1 ms, so the wait can
fail early.
Pass USEC_PER_MSEC as sleep_us, USEC_PER_MSEC * EE_TIMEOUT as
timeout_us, and false as sleep_before_read.
Signed-off-by: Ninad Palsule <ninad@linux.ibm.com>
---
drivers/misc/eeprom/at25.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/misc/eeprom/at25.c b/drivers/misc/eeprom/at25.c
index e2868f7bdb03..df8daa40b0e1 100644
--- a/drivers/misc/eeprom/at25.c
+++ b/drivers/misc/eeprom/at25.c
@@ -209,9 +209,9 @@ static int at25_wait_ready(struct at25_data *at25)
SPI_MEM_OP_DATA_IN(1, bounce, 1));
read_poll_timeout(spi_mem_exec_op, status,
- status || !(bounce[0] & AT25_SR_nRDY), false,
+ status || !(bounce[0] & AT25_SR_nRDY),
USEC_PER_MSEC, USEC_PER_MSEC * EE_TIMEOUT,
- at25->spimem, &op);
+ false, at25->spimem, &op);
if (status < 0)
return status;
if (!(bounce[0] & AT25_SR_nRDY))
--
2.53.0
reply other threads:[~2026-10-15 17:27 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20261015172656.2586295-1-ninad@linux.ibm.com \
--to=ninad@linux.ibm.com \
--cc=andrew@codeconstruct.com.au \
--cc=eajames@linux.ibm.com \
--cc=joel@jms.id.au \
--cc=openbmc@lists.ozlabs.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