From: Alexander Stein <alexander.stein@ew.tq-group.com>
To: Mark Brown <broonie@kernel.org>, Shawn Guo <shawnguo@kernel.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
Fabio Estevam <festevam@gmail.com>
Cc: Pengutronix Kernel Team <kernel@pengutronix.de>,
NXP Linux Team <linux-imx@nxp.com>,
linux-spi@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 1/1] spi: spi-imx: Use dev_err_probe for failed DMA channel requests
Date: Wed, 31 May 2023 09:26:42 +0200 [thread overview]
Message-ID: <3243730.44csPzL39Z@steina-w> (raw)
In-Reply-To: <20230418083505.466198-1-alexander.stein@ew.tq-group.com>
Hi,
gentle ping.
Alexander
Am Dienstag, 18. April 2023, 10:35:05 CEST schrieb Alexander Stein:
> If dma_request_chan() fails, no error is shown nor any information is
> shown in /sys/kernel/debug/devices_deferred if -EPROBE_DEFER is returned.
> Use dev_err_probe to fix both problems.
>
> Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
> ---
> With this patch applied /sys/kernel/debug/devices_deferred actually
> shows these lines on my platform:
> 30820000.spi spi_imx: can't get the TX DMA channel!
> 30830000.spi spi_imx: can't get the TX DMA channel!
>
> drivers/spi/spi-imx.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/spi/spi-imx.c b/drivers/spi/spi-imx.c
> index 34e5f81ec431e..b23325a3bb667 100644
> --- a/drivers/spi/spi-imx.c
> +++ b/drivers/spi/spi-imx.c
> @@ -1318,7 +1318,7 @@ static int spi_imx_sdma_init(struct device *dev,
> struct spi_imx_data *spi_imx, controller->dma_tx = dma_request_chan(dev,
> "tx");
> if (IS_ERR(controller->dma_tx)) {
> ret = PTR_ERR(controller->dma_tx);
> - dev_dbg(dev, "can't get the TX DMA channel, error %d!\n",
ret);
> + dev_err_probe(dev, ret, "can't get the TX DMA channel!
\n");
> controller->dma_tx = NULL;
> goto err;
> }
> @@ -1327,7 +1327,7 @@ static int spi_imx_sdma_init(struct device *dev,
> struct spi_imx_data *spi_imx, controller->dma_rx = dma_request_chan(dev,
> "rx");
> if (IS_ERR(controller->dma_rx)) {
> ret = PTR_ERR(controller->dma_rx);
> - dev_dbg(dev, "can't get the RX DMA channel, error %d\n",
ret);
> + dev_err_probe(dev, ret, "can't get the RX DMA channel!
\n");
> controller->dma_rx = NULL;
> goto err;
> }
--
TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany
Amtsgericht München, HRB 105018
Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider
http://www.tq-group.com/
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2023-05-31 7:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-18 8:35 [PATCH 1/1] spi: spi-imx: Use dev_err_probe for failed DMA channel requests Alexander Stein
2023-05-31 7:26 ` Alexander Stein [this message]
2023-05-31 11:21 ` Mark Brown
2023-05-31 13:14 ` Fabio Estevam
2023-06-01 12:19 ` Alexander Stein
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=3243730.44csPzL39Z@steina-w \
--to=alexander.stein@ew.tq-group.com \
--cc=broonie@kernel.org \
--cc=festevam@gmail.com \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-imx@nxp.com \
--cc=linux-spi@vger.kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@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