From 7e0380b9bbf7c40361e06e6e0d8675a55bd0dea0 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Sat, 13 Aug 2011 18:55:17 +0200 Subject: scsi: allow arbitrary LUNs This only requires changes in two places: in SCSIBus, we need to look for a free LUN if somebody creates a device with a pre-existing scsi-id but the default LUN (-1, meaning "search for a free spot"); in vSCSI, we need to actually parse the LUN according to the SCSI spec. For vSCSI, max_target/max_lun are set according to the logical unit addressing format in SAM. Signed-off-by: Paolo Bonzini Signed-off-by: Kevin Wolf --- hw/usb-msd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'hw/usb-msd.c') diff --git a/hw/usb-msd.c b/hw/usb-msd.c index 2c047fab39..1a0815a136 100644 --- a/hw/usb-msd.c +++ b/hw/usb-msd.c @@ -497,7 +497,8 @@ static void usb_msd_password_cb(void *opaque, int err) static const struct SCSIBusInfo usb_msd_scsi_info = { .tcq = false, - .ndev = 1, + .max_target = 0, + .max_lun = 0, .transfer_data = usb_msd_transfer_data, .complete = usb_msd_command_complete, -- cgit v1.2.1