From: Hannes Reinecke <hare@suse.de>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] esp: Do not overwrite ESP_TCHI after reset
Date: Mon, 10 Nov 2014 16:49:36 +0100 [thread overview]
Message-ID: <5460DE90.9040501@suse.de> (raw)
In-Reply-To: <1415633843-4130-1-git-send-email-hare@suse.de>
On 11/10/2014 04:37 PM, Hannes Reinecke wrote:
> After a reset ESP_TCHI should contain the unique ID
> of the chip. This value will be overwritten with the
> current tranfer count if the transfer count has
> previously been set.
> The code never checks if the transfer count has
> been set, so the unique ID will always be overwritten
> if the driver sends a DMA NOP after reset.
>
> Signed-off-by: Hannes Reinecke <hare@suse.de>
> ---
> hw/scsi/esp.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/hw/scsi/esp.c b/hw/scsi/esp.c
> index 5ab44d8..9798180 100644
> --- a/hw/scsi/esp.c
> +++ b/hw/scsi/esp.c
> @@ -454,7 +454,9 @@ void esp_reg_write(ESPState *s, uint32_t saddr, uint64_t val)
> /* Reload DMA counter. */
> s->rregs[ESP_TCLO] = s->wregs[ESP_TCLO];
> s->rregs[ESP_TCMID] = s->wregs[ESP_TCMID];
> - s->rregs[ESP_TCHI] = s->wregs[ESP_TCHI];
> + if (s->wregs[ESP_TCHI]) {
> + s->rregs[ESP_TCHI] = s->wregs[ESP_TCHI];
> + }
> } else {
> s->dma = 0;
> }
>
Hmm.
This is actually not quite correct.
I'll be sending an updated patch.
Cheers,
Hannes
--
Dr. Hannes Reinecke zSeries & Storage
hare@suse.de +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: J. Hawn, J. Guild, F. Imendörffer, HRB 21284 (AG Nürnberg)
prev parent reply other threads:[~2014-11-10 15:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-10 15:37 [Qemu-devel] [PATCH] esp: Do not overwrite ESP_TCHI after reset Hannes Reinecke
2014-11-10 15:49 ` Hannes Reinecke [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=5460DE90.9040501@suse.de \
--to=hare@suse.de \
--cc=pbonzini@redhat.com \
--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).