From: Alexander Stein <alexander.stein@ew.tq-group.com>
To: Fabio Estevam <festevam@gmail.com>
Cc: Mark Brown <broonie@kernel.org>, Shawn Guo <shawnguo@kernel.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
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: Thu, 01 Jun 2023 14:19:03 +0200 [thread overview]
Message-ID: <8271423.NyiUUSuA9g@steina-w> (raw)
In-Reply-To: <CAOMZO5CcD5iDkaempdxnQHx1fAgnXAmMq_0MdEq5wNgOLHcMuw@mail.gmail.com>
Hi Fabio,
Am Mittwoch, 31. Mai 2023, 15:14:37 CEST schrieb Fabio Estevam:
> Hi Alexander,
>
> On Tue, Apr 18, 2023 at 5:35 AM Alexander Stein
>
> <alexander.stein@ew.tq-group.com> wrote:
> > 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.
>
> Running spi-imx without SDMA is valid and not an error, right?
That might be true, but this is not what this patch is about.
> I am not sure I understood the real motivation for this patch.
If the call to dma_request_chan() for either DMA channel 'rx' and 'tx' returns
-EPROBE_DEFER, spi-imx will return that error code as well. So far so good.
You can check /sys/kernel/debug/devices_deferred to see which devices got
deferred and not probed yet.
Without this patch spi-imx will be listed without any additional information
about cause of the deferral. Finding the cause with no additional information
is cumbersome, it's hidden in dev_dbg().
Using this patch additional information is provided, e.g. "can't get the TX
DMA channel!". So you know right away spi-imx is not probing because the DMA
channel is not available.
I hope this shows the motivation for this change.
Best regards,
Alexander
--
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
prev parent reply other threads:[~2023-06-01 12:32 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
2023-05-31 11:21 ` Mark Brown
2023-05-31 13:14 ` Fabio Estevam
2023-06-01 12:19 ` Alexander Stein [this message]
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=8271423.NyiUUSuA9g@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