public inbox for dmaengine@vger.kernel.org
 help / color / mirror / Atom feed
From: Vinod Koul <vkoul@kernel.org>
To: Ben Dooks <ben.dooks@sifive.com>
Cc: dmaengine@vger.kernel.org, Eugeniy.Paltsev@synopsys.com,
	linux-kernel@vger.kernel.org,
	Sudip Mukherjee <sudip.mukherjee@sifive.com>,
	Jude Onyenegecha <jude.onyenegecha@sifive.com>
Subject: Re: [PATCH 2/3] dmaengine: dw-axi-dmac: do not print NULL LLI during error
Date: Thu, 21 Jul 2022 18:03:19 +0530	[thread overview]
Message-ID: <YtlHj2f9biaFEK+m@matsya> (raw)
In-Reply-To: <20220708170153.269991-3-ben.dooks@sifive.com>

On 08-07-22, 18:01, Ben Dooks wrote:
> During debugging we have seen an issue where axi_chan_dump_lli()
> is passed a NULL LLI pointer which ends up causing an OOPS due
> to trying to get fields from it. Simply print NULL LLI and exit
> to avoid this.

Applied, thanks

> 
> Signed-off-by: Ben Dooks <ben.dooks@sifive.com>
> ---
>  drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c b/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
> index 75c537153e92..d6ef5f49f281 100644
> --- a/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
> +++ b/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
> @@ -1008,6 +1008,11 @@ static void axi_chan_dump_regs(struct axi_dma_chan *chan)
>  static void axi_chan_dump_lli(struct axi_dma_chan *chan,
>  			      struct axi_dma_hw_desc *desc)
>  {
> +	if (!desc->lli) {
> +		dev_err(dchan2dev(&chan->vc.chan), "NULL LLI\n");
> +		return;
> +	}
> +
>  	dev_err(dchan2dev(&chan->vc.chan),
>  		"SAR: 0x%llx DAR: 0x%llx LLP: 0x%llx BTS 0x%x CTL: 0x%x:%08x",
>  		le64_to_cpu(desc->lli->sar),
> -- 
> 2.35.1

-- 
~Vinod

  reply	other threads:[~2022-07-21 12:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-08 17:01 dw-axi-dmac updates (debug, minor bugfixes) Ben Dooks
2022-07-08 17:01 ` [PATCH 1/3] dmaengine: dw-axi-dmac: dump channel registers on error Ben Dooks
2022-07-21 12:30   ` Vinod Koul
2022-07-21 22:16     ` Ben Dooks
2022-07-08 17:01 ` [PATCH 2/3] dmaengine: dw-axi-dmac: do not print NULL LLI during error Ben Dooks
2022-07-21 12:33   ` Vinod Koul [this message]
2022-07-08 17:01 ` [PATCH 3/3] dmaengine: dw-axi-dmac: ignore interrupt if no descriptor Ben Dooks
2022-07-21 12:33   ` Vinod Koul

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=YtlHj2f9biaFEK+m@matsya \
    --to=vkoul@kernel.org \
    --cc=Eugeniy.Paltsev@synopsys.com \
    --cc=ben.dooks@sifive.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=jude.onyenegecha@sifive.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sudip.mukherjee@sifive.com \
    /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