Linux kernel -stable discussions
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: "Dutta, Anurag" <a-dutta@ti.com>
Cc: Nishanth Menon <nm@ti.com>,
	Francesco Dolcini <francesco@dolcini.it>,
	Siddharth Vadapalli <s-vadapalli@ti.com>,
	linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org
Subject: Re: [PATCH] spi: cadence-quadspi: Fix clock enable underflows due to runtime PM
Date: Fri, 5 Dec 2025 13:25:19 +0000	[thread overview]
Message-ID: <f804d7a7-4ffb-4d2a-bbaf-ca0a076a11ab@sirena.org.uk> (raw)
In-Reply-To: <cd95320b-6852-476e-bc8a-2e8d1ac77a9e@ti.com>

[-- Attachment #1: Type: text/plain, Size: 1079 bytes --]

On Fri, Dec 05, 2025 at 06:28:06PM +0530, Dutta, Anurag wrote:

> Hi Mark and Nishanth The below seems to work for me on j721e. Let me know
> your thoughts.

> Also, the error actually comes from :

> if (cqspi->use_direct_mode) {
>     ret = cqspi_request_mmap_dma(cqspi);
>     if (ret == -EPROBE_DEFER)
>     goto probe_setup_failed;
> }

> And not from flash_setup().

Great, thanks for confirming.  We should probably ensure that has some
logging...

> @@ -2024,7 +2024,7 @@ static int cqspi_probe(struct platform_device *pdev)
>  probe_reset_failed:
>         if (cqspi->is_jh7110)
>                 cqspi_jh7110_disable_clk(pdev, cqspi);
> -       clk_disable_unprepare(cqspi->clk);
> +       pm_runtime_force_suspend(dev);
>  probe_clk_failed:

The trouble with that is that in the !CONFIG_PM case
pm_runtime_force_suspend() is defined as:

  static inline int pm_runtime_force_suspend(struct device *dev) { return 0; }

so we'll leak the clock enable.  If we could just require runtime PM
this would be an awful lot easier to deal with.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2025-12-05 13:25 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-02 22:53 [PATCH] spi: cadence-quadspi: Fix clock enable underflows due to runtime PM Mark Brown
2025-12-03 10:42 ` Siddharth Vadapalli
2025-12-03 11:58   ` Mark Brown
2025-12-04  9:13 ` Francesco Dolcini
2025-12-04 13:28   ` Mark Brown
2025-12-04 13:44     ` Mark Brown
2025-12-04 14:05     ` Nishanth Menon
2025-12-04 15:11       ` Mark Brown
2025-12-04 17:05         ` Mark Brown
2025-12-05 12:54           ` Dutta, Anurag
2025-12-05 12:58           ` Dutta, Anurag
2025-12-05 13:25             ` Mark Brown [this message]
2025-12-09  5:43               ` Dutta, Anurag
2025-12-09  9:52                 ` Dutta, Anurag
2025-12-09 10:30                   ` Mark Brown
2025-12-12  4:34                     ` Dutta, Anurag
2025-12-12  6:04                       ` Mark Brown
2025-12-12  6:07                       ` Mark Brown
2025-12-12  7:14                         ` Dutta, Anurag

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=f804d7a7-4ffb-4d2a-bbaf-ca0a076a11ab@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=a-dutta@ti.com \
    --cc=francesco@dolcini.it \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=nm@ti.com \
    --cc=s-vadapalli@ti.com \
    --cc=stable@vger.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