From: Paolo Bonzini <pbonzini@redhat.com>
To: John Snow <jsnow@redhat.com>, qemu-block@nongnu.org
Cc: kwolf@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com
Subject: Re: [Qemu-devel] [PATCH 1/5] ide: Prohibit RESET on IDE drives
Date: Tue, 19 Jan 2016 12:48:19 +0100 [thread overview]
Message-ID: <569E2283.9070904@redhat.com> (raw)
In-Reply-To: <1453179117-17909-2-git-send-email-jsnow@redhat.com>
On 19/01/2016 05:51, John Snow wrote:
> + /* Only RESET is allowed to an ATAPI device while BSY and/or DRQ are set. */
> + if (s->status & (BUSY_STAT|DRQ_STAT)) {
> + if (!(val == WIN_DEVICE_RESET) && (s->drive_kind == IDE_CD)) {
I was going to complain about Pascal-ish parentheses, but actually I
think there is a bug here; the expression just looks weird.
Did you mean
if (!(val == WIN_DEVICE_RESET && s->drive_kind == IDE_CD))
or equivalently applying de Morgan's law:
if (s->drive_kind != IDE_CD || val != WIN_DEVICE_RESET)
?
Paolo
> + return;
next prev parent reply other threads:[~2016-01-19 11:48 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-19 4:51 [Qemu-devel] [PATCH 0/5] ide: fix atapi software reset John Snow
2016-01-19 4:51 ` [Qemu-devel] [PATCH 1/5] ide: Prohibit RESET on IDE drives John Snow
2016-01-19 11:48 ` Paolo Bonzini [this message]
2016-01-19 17:04 ` John Snow
2016-01-19 17:26 ` Laszlo Ersek
2016-01-19 4:51 ` [Qemu-devel] [PATCH 2/5] ide: code motion John Snow
2016-01-19 4:51 ` [Qemu-devel] [PATCH 3/5] ide: move buffered DMA cancel to core John Snow
2016-01-19 11:50 ` Paolo Bonzini
2016-01-19 4:51 ` [Qemu-devel] [PATCH 4/5] ide: Add silent DRQ cancellation John Snow
2016-01-19 4:51 ` [Qemu-devel] [PATCH 5/5] ide: fix device_reset to not ignore pending AIO John Snow
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=569E2283.9070904@redhat.com \
--to=pbonzini@redhat.com \
--cc=jsnow@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.