Message ID | 1343169246-17636-9-git-send-email-nab@linux-iscsi.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/hw/virtio-scsi.c b/hw/virtio-scsi.c index b0adfde..d854998 100644 --- a/hw/virtio-scsi.c +++ b/hw/virtio-scsi.c @@ -534,7 +534,11 @@ static void virtio_scsi_get_config(VirtIODevice *vdev, stl_raw(&scsiconf->sense_size, s->sense_size); stl_raw(&scsiconf->cdb_size, s->cdb_size); stl_raw(&scsiconf->max_channel, VIRTIO_SCSI_MAX_CHANNEL); - stl_raw(&scsiconf->max_target, VIRTIO_SCSI_MAX_TARGET); + if (s->vhost_scsi) { + stl_raw(&scsiconf->max_target, 0); + } else { + stl_raw(&scsiconf->max_target, VIRTIO_SCSI_MAX_TARGET); + } stl_raw(&scsiconf->max_lun, VIRTIO_SCSI_MAX_LUN); }