aboutsummaryrefslogtreecommitdiffstats
path: root/hw/spapr_vscsi.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2011-07-27 23:24:50 +0200
committerKevin Wolf <kwolf@redhat.com>2011-10-28 19:25:51 +0200
commit0d3545e76c856be4cce26cf1c96981b26cafb6b1 (patch)
tree9882e28d6a168fe77753f0e5a1490669f067cb2a /hw/spapr_vscsi.c
parent7e0380b9bbf7c40361e06e6e0d8675a55bd0dea0 (diff)
scsi: add channel to addressing
This also requires little more than adding the new argument to scsi_device_find, and the qdev property. All devices by default end up on channel 0. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'hw/spapr_vscsi.c')
-rw-r--r--hw/spapr_vscsi.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/hw/spapr_vscsi.c b/hw/spapr_vscsi.c
index e6c3581ab..00e2d2d5d 100644
--- a/hw/spapr_vscsi.c
+++ b/hw/spapr_vscsi.c
@@ -160,11 +160,7 @@ retry:
abort();
}
- if (channel) {
- *lun = -1;
- return NULL;
- }
- return scsi_device_find(bus, id, *lun);
+ return scsi_device_find(bus, channel, id, *lun);
}
static int vscsi_send_iu(VSCSIState *s, vscsi_req *req,
@@ -892,7 +888,8 @@ static int vscsi_do_crq(struct VIOsPAPRDevice *dev, uint8_t *crq_data)
static const struct SCSIBusInfo vscsi_scsi_info = {
.tcq = true,
- .max_target = 63, /* logical unit addressing format */
+ .max_channel = 7, /* logical unit addressing format */
+ .max_target = 63,
.max_lun = 31,
.transfer_data = vscsi_transfer_data,