From: Douglas Anderson <dianders@chromium.org>
To: Mark Brown <broonie@kernel.org>
Cc: msavaliy@qti.qualcomm.com, akashast@codeaurora.org,
Stephen Boyd <swboyd@chromium.org>,
Roja Rani Yarubandi <rojay@codeaurora.org>,
Douglas Anderson <dianders@chromium.org>,
Andy Gross <agross@kernel.org>,
Bjorn Andersson <bjorn.andersson@linaro.org>,
linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-spi@vger.kernel.org
Subject: [PATCH v2 4/4] spi: spi-geni-qcom: Print an error when we timeout setting the CS
Date: Wed, 16 Dec 2020 14:41:52 -0800 [thread overview]
Message-ID: <20201216144114.v2.4.I666b37646de9652cef438ac7c2c6c2053367fc6b@changeid> (raw)
In-Reply-To: <20201216144114.v2.1.I99ee04f0cb823415df59bd4f550d6ff5756e43d6@changeid>
If we're using geni to manage the chip select line (don't do it--use a
GPIO!) and we happen to get a timeout waiting for the chip select
command to be completed, no errors are printed even though things
might not be in the best shape. Let's add a print.
Signed-off-by: Douglas Anderson <dianders@chromium.org>
---
Changes in v2:
- ("spi: spi-geni-qcom: Print an error when we timeout setting the CS") new for v2
drivers/spi/spi-geni-qcom.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/spi/spi-geni-qcom.c b/drivers/spi/spi-geni-qcom.c
index 0e4fa52ac017..744009875762 100644
--- a/drivers/spi/spi-geni-qcom.c
+++ b/drivers/spi/spi-geni-qcom.c
@@ -220,8 +220,10 @@ static void spi_geni_set_cs(struct spi_device *slv, bool set_flag)
spin_unlock_irq(&mas->lock);
time_left = wait_for_completion_timeout(&mas->cs_done, HZ);
- if (!time_left)
+ if (!time_left) {
+ dev_warn(mas->dev, "Timeout setting chip select\n");
handle_fifo_timeout(spi, NULL);
+ }
exit:
pm_runtime_put(mas->dev);
--
2.29.2.684.gfbc64c5ab5-goog
next prev parent reply other threads:[~2020-12-16 22:43 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-16 22:41 [PATCH v2 1/4] spi: spi-geni-qcom: Fix geni_spi_isr() NULL dereference in timeout case Douglas Anderson
2020-12-16 22:41 ` [PATCH v2 2/4] spi: spi-geni-qcom: Fail new xfers if xfer/cancel/abort pending Douglas Anderson
2020-12-17 4:21 ` Stephen Boyd
2020-12-17 21:45 ` Doug Anderson
2020-12-18 2:53 ` Stephen Boyd
2020-12-16 22:41 ` [PATCH v2 3/4] spi: spi-geni-qcom: Don't try to set CS if an xfer is pending Douglas Anderson
2020-12-17 4:25 ` Stephen Boyd
2020-12-17 13:25 ` Mark Brown
2020-12-17 21:21 ` Doug Anderson
2020-12-17 4:29 ` Stephen Boyd
2020-12-17 21:35 ` Doug Anderson
2020-12-18 2:51 ` Stephen Boyd
2020-12-16 22:41 ` Douglas Anderson [this message]
2020-12-17 3:41 ` [PATCH v2 1/4] spi: spi-geni-qcom: Fix geni_spi_isr() NULL dereference in timeout case Stephen Boyd
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=20201216144114.v2.4.I666b37646de9652cef438ac7c2c6c2053367fc6b@changeid \
--to=dianders@chromium.org \
--cc=agross@kernel.org \
--cc=akashast@codeaurora.org \
--cc=bjorn.andersson@linaro.org \
--cc=broonie@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=msavaliy@qti.qualcomm.com \
--cc=rojay@codeaurora.org \
--cc=swboyd@chromium.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).