qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: Stefan Hajnoczi <stefanha@redhat.com>
Subject: [Qemu-devel] [PULL 02/20] scsi-disk: fix cmd.mode field typo
Date: Wed, 12 Aug 2015 15:36:55 +0200	[thread overview]
Message-ID: <1439386633-18933-3-git-send-email-pbonzini@redhat.com> (raw)
In-Reply-To: <1439386633-18933-1-git-send-email-pbonzini@redhat.com>

From: Stefan Hajnoczi <stefanha@redhat.com>

The cmd.xfer field is the data length.  The cmd.mode field is the data
transfer direction.

scsi_handle_rw_error() was using the wrong error policy for read
requests.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <1438262173-11546-3-git-send-email-stefanha@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 hw/scsi/scsi-disk.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c
index 64f0694..73fed3f 100644
--- a/hw/scsi/scsi-disk.c
+++ b/hw/scsi/scsi-disk.c
@@ -399,7 +399,7 @@ static void scsi_read_data(SCSIRequest *req)
  */
 static int scsi_handle_rw_error(SCSIDiskReq *r, int error)
 {
-    bool is_read = (r->req.cmd.xfer == SCSI_XFER_FROM_DEV);
+    bool is_read = (r->req.cmd.mode == SCSI_XFER_FROM_DEV);
     SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, r->req.dev);
     BlockErrorAction action = blk_get_error_action(s->qdev.conf.blk,
                                                    is_read, error);
-- 
2.4.3

  parent reply	other threads:[~2015-08-12 13:37 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-12 13:36 [Qemu-devel] [PULL 00/20] SCSI, build, TCG, RCU, misc patches for 2015-08-12 Paolo Bonzini
2015-08-12 13:36 ` [Qemu-devel] [PULL 01/20] virtio-scsi: use virtqueue_map_sg() when loading requests Paolo Bonzini
2015-08-12 13:36 ` Paolo Bonzini [this message]
2015-08-12 13:36 ` [Qemu-devel] [PULL 03/20] tests: virtio-scsi: clear unit attention after reset Paolo Bonzini
2015-08-12 13:36 ` [Qemu-devel] [PULL 04/20] scsi-disk: Fix assertion failure on WRITE SAME Paolo Bonzini
2015-08-12 13:36 ` [Qemu-devel] [PULL 05/20] virtio-scsi-test: Add test case for tail unaligned " Paolo Bonzini
2015-08-12 13:36 ` [Qemu-devel] [PULL 06/20] vhost/scsi: call vhost_dev_cleanup() at unrealize() time Paolo Bonzini
2015-08-12 13:37 ` [Qemu-devel] [PULL 07/20] cpu-exec: Do not invalidate original TB in cpu_exec_nocache() Paolo Bonzini
2015-08-12 13:37 ` [Qemu-devel] [PULL 08/20] cpu_defs: Simplify CPUTLB padding logic Paolo Bonzini
2015-08-12 13:37 ` [Qemu-devel] [PULL 09/20] configure: Default to enable module build Paolo Bonzini
2015-08-12 13:37 ` [Qemu-devel] [PULL 10/20] exec: drop cpu_can_do_io, just read cpu->can_do_io Paolo Bonzini
2015-08-12 13:37 ` [Qemu-devel] [PULL 11/20] rcu: Allow calling rcu_(un)register_thread() during synchronize_rcu() Paolo Bonzini
2015-08-12 13:37 ` [Qemu-devel] [PULL 12/20] exec: use macro ROUND_UP for alignment Paolo Bonzini
2015-08-12 13:37 ` [Qemu-devel] [PULL 13/20] vhost-scsi: Clarify vhost_virtqueue_mask argument Paolo Bonzini
2015-08-12 13:37 ` [Qemu-devel] [PULL 14/20] qemu-nbd: remove unnecessary qemu_notify_event() Paolo Bonzini
2015-08-12 13:37 ` [Qemu-devel] [PULL 15/20] configure: only add CONFIG_RDMA to config-host.h once Paolo Bonzini
2015-08-12 13:37 ` [Qemu-devel] [PULL 16/20] scsi: create restart bottom half in the right AioContext Paolo Bonzini
2015-08-12 13:37 ` [Qemu-devel] [PULL 17/20] scsi-disk: identify AIO callbacks more clearly Paolo Bonzini
2015-08-12 13:37 ` [Qemu-devel] [PULL 18/20] scsi-generic: " Paolo Bonzini
2015-08-12 13:37 ` [Qemu-devel] [PULL 19/20] hw: fix mask for ColdFire UART command register Paolo Bonzini
2015-08-12 13:37 ` [Qemu-devel] [PULL 20/20] disas: Defeature print_target_address Paolo Bonzini
2015-08-13  9:28 ` [Qemu-devel] [PULL 00/20] SCSI, build, TCG, RCU, misc patches for 2015-08-12 Peter Maydell
2015-08-13  9:37   ` Paolo Bonzini
2015-08-13  9:43     ` Peter Maydell

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=1439386633-18933-3-git-send-email-pbonzini@redhat.com \
    --to=pbonzini@redhat.com \
    --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 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).