From: Francisco Iglesias <frasse.iglesias@gmail.com>
To: Bin Meng <bmeng.cn@gmail.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
qemu-block@nongnu.org, Bin Meng <bin.meng@windriver.com>,
qemu-devel@nongnu.org, Max Reitz <mreitz@redhat.com>,
Alistair Francis <alistair.francis@wdc.com>
Subject: Re: [PATCH v4 1/2] hw/block: m25p80: Don't write to flash if write is disabled
Date: Tue, 22 Dec 2020 16:55:34 +0100 [thread overview]
Message-ID: <20201222155533.GB26555@fralle-msi> (raw)
In-Reply-To: <1608619520-62782-1-git-send-email-bmeng.cn@gmail.com>
On [2020 Dec 22] Tue 14:45:19, Bin Meng wrote:
> From: Bin Meng <bin.meng@windriver.com>
>
> When write is disabled, the write to flash should be avoided
> in flash_write8().
>
> Fixes: 82a2499011a7 ("m25p80: Initial implementation of SPI flash device")
> Signed-off-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Francisco Iglesias <frasse.iglesias@gmail.com>
>
> ---
>
> (no changes since v2)
>
> Changes in v2:
> - new patch: honor write enable flag in flash write
>
> hw/block/m25p80.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/hw/block/m25p80.c b/hw/block/m25p80.c
> index 483925f..236e1b4 100644
> --- a/hw/block/m25p80.c
> +++ b/hw/block/m25p80.c
> @@ -594,6 +594,7 @@ void flash_write8(Flash *s, uint32_t addr, uint8_t data)
>
> if (!s->write_enable) {
> qemu_log_mask(LOG_GUEST_ERROR, "M25P80: write with write protect!\n");
> + return;
> }
>
> if ((prev ^ data) & data) {
> --
> 2.7.4
>
next prev parent reply other threads:[~2020-12-22 15:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-22 6:45 [PATCH v4 1/2] hw/block: m25p80: Don't write to flash if write is disabled Bin Meng
2020-12-22 6:45 ` [PATCH v4 2/2] hw/block: m25p80: Implement AAI-WP command support for SST flashes Bin Meng
2020-12-22 15:43 ` Francisco Iglesias
2020-12-22 15:51 ` Bin Meng
2020-12-22 14:25 ` [PATCH v4 1/2] hw/block: m25p80: Don't write to flash if write is disabled Philippe Mathieu-Daudé
2020-12-22 15:55 ` Francisco Iglesias [this message]
2021-01-05 3:46 ` Bin Meng
2021-01-05 3:49 ` Bin Meng
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=20201222155533.GB26555@fralle-msi \
--to=frasse.iglesias@gmail.com \
--cc=alistair.francis@wdc.com \
--cc=bin.meng@windriver.com \
--cc=bmeng.cn@gmail.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.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;
as well as URLs for NNTP newsgroup(s).