mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/2] fsi: sbefifo: Use specified value of start of response timeout
@ 2021-12-15  0:58 Amitay Isaacs
  2021-12-15  0:58 ` [PATCH 2/2] fsi: sbefifo: implement FSI_SBEFIFO_READ_TIMEOUT ioctl Amitay Isaacs
  0 siblings, 1 reply; 8+ messages in thread
From: Amitay Isaacs @ 2021-12-15  0:58 UTC (permalink / raw)
  To: linux-kernel, linux-fsi, jk, joel, alistair, eajames; +Cc: Amitay Isaacs

For some of the chip-ops where sbe needs to collect trace information,
sbe can take a long time (>30s) to respond.  Currently these chip-ops
will timeout as the start of response timeout defaults to 10s.

Instead of default value, use specified value.  The require timeout
value will be set using ioctl.

Signed-off-by: Amitay Isaacs <amitay@ozlabs.org>
---
 drivers/fsi/fsi-sbefifo.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/fsi/fsi-sbefifo.c b/drivers/fsi/fsi-sbefifo.c
index 52328adef643..9188161f440c 100644
--- a/drivers/fsi/fsi-sbefifo.c
+++ b/drivers/fsi/fsi-sbefifo.c
@@ -125,6 +125,7 @@ struct sbefifo {
 	bool			dead;
 	bool			async_ffdc;
 	bool			timed_out;
+	uint32_t		timeout_start_rsp_ms;
 };
 
 struct sbefifo_user {
@@ -549,7 +550,7 @@ static int sbefifo_read_response(struct sbefifo *sbefifo, struct iov_iter *respo
 
 	dev_vdbg(dev, "reading response, buflen = %zd\n", iov_iter_count(response));
 
-	timeout = msecs_to_jiffies(SBEFIFO_TIMEOUT_START_RSP);
+	timeout = msecs_to_jiffies(sbefifo->timeout_start_rsp_ms);
 	for (;;) {
 		/* Grab FIFO status (this will handle parity errors) */
 		rc = sbefifo_wait(sbefifo, false, &status, timeout);
@@ -972,6 +973,7 @@ static int sbefifo_probe(struct device *dev)
 	sbefifo->fsi_dev = fsi_dev;
 	dev_set_drvdata(dev, sbefifo);
 	mutex_init(&sbefifo->lock);
+	sbefifo->timeout_start_rsp_ms = SBEFIFO_TIMEOUT_START_RSP;
 
 	/*
 	 * Try cleaning up the FIFO. If this fails, we still register the
-- 
2.33.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-12-15  7:42 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-15  0:58 [PATCH 1/2] fsi: sbefifo: Use specified value of start of response timeout Amitay Isaacs
2021-12-15  0:58 ` [PATCH 2/2] fsi: sbefifo: implement FSI_SBEFIFO_READ_TIMEOUT ioctl Amitay Isaacs
2021-12-15  5:30   ` Joel Stanley
2021-12-15  5:43   ` Andrew Jeffery
2021-12-15  6:06     ` Amitay Isaacs
2021-12-15  5:59   ` Greg KH
2021-12-15  6:24     ` Amitay Isaacs
2021-12-15  7:41   ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®