Commit b8d536d2 authored by Amitay Isaacs's avatar Amitay Isaacs Committed by Joel Stanley

fsi: sbefifo: Use specified value of start of response timeout

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: default avatarAmitay Isaacs <amitay@ozlabs.org>
Signed-off-by: default avatarJoel Stanley <joel@jms.id.au>
Reviewed-by: default avatarEddie James <eajames@linux.ibm.com>
Link: https://lore.kernel.org/r/20220121053816.82253-2-joel@jms.id.auSigned-off-by: default avatarJoel Stanley <joel@jms.id.au>
parent 3dcf3c84
......@@ -125,6 +125,7 @@ struct sbefifo {
bool dead;
bool async_ffdc;
bool timed_out;
u32 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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment