public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Michael Walle <michael@walle.cc>
To: Md Sadre Alam <quic_mdalam@quicinc.com>
Cc: tudor.ambarus@linaro.org, pratyush@kernel.org,
	miquel.raynal@bootlin.com, richard@nod.at, vigneshr@ti.com,
	linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org,
	quic_srichara@quicinc.com, quic_varada@quicinc.com
Subject: Re: [PATCH] mtd: spi-nor: Ensure operation completion before shutdown
Date: Thu, 12 Oct 2023 11:11:09 +0200	[thread overview]
Message-ID: <bb12db1205a5d1bfbee341d23defe0be@walle.cc> (raw)
In-Reply-To: <20231012055148.2445303-1-quic_mdalam@quicinc.com>

Hi,

Am 2023-10-12 07:51, schrieb Md Sadre Alam:
> Ensure that there are no pending spi operation inprogress
> when system halts.

What operation might be in progress here? Did you encounter some 
problems?
Please explain it in more detail in the commit message.

Fixes tag?

-michael

> Signed-off-by: Md Sadre Alam <quic_mdalam@quicinc.com>
> ---
>  drivers/mtd/spi-nor/core.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c
> index 1c443fe568cf..adc4d2c68695 100644
> --- a/drivers/mtd/spi-nor/core.c
> +++ b/drivers/mtd/spi-nor/core.c
> @@ -3690,6 +3690,9 @@ static void spi_nor_shutdown(struct spi_mem 
> *spimem)
>  {
>  	struct spi_nor *nor = spi_mem_get_drvdata(spimem);
> 
> +	/* Ensure no pending spi operation in progress */
> +	spi_nor_wait_till_ready(nor);
> +
>  	spi_nor_restore(nor);
>  }

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

  reply	other threads:[~2023-10-12  9:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-12  5:51 [PATCH] mtd: spi-nor: Ensure operation completion before shutdown Md Sadre Alam
2023-10-12  9:11 ` Michael Walle [this message]
2023-10-12 10:06   ` Pratyush Yadav
2023-10-18 11:07     ` Md Sadre Alam
2023-10-18 11:06   ` Md Sadre Alam

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=bb12db1205a5d1bfbee341d23defe0be@walle.cc \
    --to=michael@walle.cc \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=pratyush@kernel.org \
    --cc=quic_mdalam@quicinc.com \
    --cc=quic_srichara@quicinc.com \
    --cc=quic_varada@quicinc.com \
    --cc=richard@nod.at \
    --cc=tudor.ambarus@linaro.org \
    --cc=vigneshr@ti.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