aboutsummaryrefslogtreecommitdiffstats
path: root/hw/scsi.h
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/scsi.h
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/scsi.h')
-rw-r--r--hw/scsi.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/hw/scsi.h b/hw/scsi.h
index 401d8d321..c8649cfa9 100644
--- a/hw/scsi.h
+++ b/hw/scsi.h
@@ -66,6 +66,7 @@ struct SCSIDevice
uint8_t sense[SCSI_SENSE_BUF_SIZE];
uint32_t sense_len;
QTAILQ_HEAD(, SCSIRequest) requests;
+ uint32_t channel;
uint32_t lun;
int blocksize;
int type;
@@ -99,7 +100,7 @@ struct SCSIDeviceInfo {
struct SCSIBusInfo {
int tcq;
- int max_target, max_lun;
+ int max_channel, max_target, max_lun;
void (*transfer_data)(SCSIRequest *req, uint32_t arg);
void (*complete)(SCSIRequest *req, uint32_t arg);
void (*cancel)(SCSIRequest *req);
@@ -194,6 +195,6 @@ void scsi_req_abort(SCSIRequest *req, int status);
void scsi_req_cancel(SCSIRequest *req);
void scsi_device_purge_requests(SCSIDevice *sdev, SCSISense sense);
int scsi_device_get_sense(SCSIDevice *dev, uint8_t *buf, int len, bool fixed);
-SCSIDevice *scsi_device_find(SCSIBus *bus, int target, int lun);
+SCSIDevice *scsi_device_find(SCSIBus *bus, int channel, int target, int lun);
#endif