diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2011-08-13 18:55:17 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2011-10-28 19:25:51 +0200 |
commit | 7e0380b9bbf7c40361e06e6e0d8675a55bd0dea0 (patch) | |
tree | 47c51c55182c17aaf6cdfc461ace0ef497c1a664 /hw/esp.c | |
parent | ba74307c5a3c2ff87d4596a10828faf7560d4552 (diff) | |
download | qemu-7e0380b9bbf7c40361e06e6e0d8675a55bd0dea0.zip qemu-7e0380b9bbf7c40361e06e6e0d8675a55bd0dea0.tar.gz qemu-7e0380b9bbf7c40361e06e6e0d8675a55bd0dea0.tar.bz2 |
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 <pbonzini@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'hw/esp.c')
-rw-r--r-- | hw/esp.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -724,7 +724,8 @@ void esp_init(target_phys_addr_t espaddr, int it_shift, static const struct SCSIBusInfo esp_scsi_info = { .tcq = false, - .ndev = ESP_MAX_DEVS, + .max_target = ESP_MAX_DEVS, + .max_lun = 7, .transfer_data = esp_transfer_data, .complete = esp_command_complete, |