All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org, Hannes Reinecke <hare@suse.de>,
	Hannes Reinecke <hare@suse.com>
Subject: [Qemu-devel] [PATCH 4/4] scsi: support REPORT_LUNS for LUNs != 0
Date: Thu, 14 Dec 2017 11:14:35 +0100	[thread overview]
Message-ID: <20171214101435.26265-5-hare@suse.de> (raw)
In-Reply-To: <20171214101435.26265-1-hare@suse.de>

SPC doesn't restrict the use of REPORT LUNS to LUN 0, so we
shouldn't be doing so, either.

Signed-off-by: Hannes Reinecke <hare@suse.com>
---
 hw/scsi/scsi-bus.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/scsi/scsi-bus.c b/hw/scsi/scsi-bus.c
index 83497ac916..67ac472c14 100644
--- a/hw/scsi/scsi-bus.c
+++ b/hw/scsi/scsi-bus.c
@@ -548,7 +548,7 @@ static int32_t scsi_target_send_command(SCSIRequest *req, uint8_t *buf)
     int fixed_sense = (req->cmd.buf[1] & 1) == 0;
 
     if (req->lun != 0 &&
-        buf[0] != INQUIRY && buf[0] != REQUEST_SENSE) {
+        buf[0] != INQUIRY && buf[0] != REQUEST_SENSE && buf[0] != REPORT_LUNS) {
         scsi_req_build_sense(req, SENSE_CODE(LUN_NOT_SUPPORTED));
         scsi_req_complete(req, CHECK_CONDITION);
         return 0;
-- 
2.12.3

  parent reply	other threads:[~2017-12-14 10:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-14 10:14 [Qemu-devel] [PATCH 0/4] virtio-vfc implementation Hannes Reinecke
2017-12-14 10:14 ` [Qemu-devel] [PATCH 1/4] scsi: use 64-bit LUN Hannes Reinecke
2017-12-14 10:14 ` [Qemu-devel] [PATCH 2/4] virtio-scsi: implement target rescan Hannes Reinecke
2017-12-14 10:14 ` [Qemu-devel] [PATCH 3/4] virtio-scsi: Implement 'native LUN' feature Hannes Reinecke
2017-12-14 10:14 ` Hannes Reinecke [this message]
2017-12-14 10:25 ` [Qemu-devel] [PATCH 0/4] virtio-vfc implementation no-reply
2017-12-14 13:49 ` no-reply
2017-12-14 17:25 ` no-reply

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=20171214101435.26265-5-hare@suse.de \
    --to=hare@suse.de \
    --cc=hare@suse.com \
    --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 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.