diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2011-07-28 18:02:13 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2011-10-28 19:25:51 +0200 |
commit | f48a7a6e35bb6d50573cfb42f13878c593fb6c0c (patch) | |
tree | 7f867312c0062f25c182f0660ed92aafdc69ef4a /hw/scsi.h | |
parent | d8bb00d6d72eba317f78501434fc37db4968fa31 (diff) | |
download | qemu-f48a7a6e35bb6d50573cfb42f13878c593fb6c0c.zip qemu-f48a7a6e35bb6d50573cfb42f13878c593fb6c0c.tar.gz qemu-f48a7a6e35bb6d50573cfb42f13878c593fb6c0c.tar.bz2 |
scsi: remove devs array from SCSIBus
Change the devs array into a linked list, and add a scsi_device_find
function to navigate the children list instead. This lets the SCSI
bus use more complex addressing, and HBAs can talk to the correct device
when there are multiple LUNs per target.
scsi_device_find may return another LUN on the same target if none is
found that matches exactly.
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.h | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -110,8 +110,6 @@ struct SCSIBus { SCSISense unit_attention; const SCSIBusInfo *info; - - SCSIDevice *devs[MAX_SCSI_DEVS]; }; void scsi_bus_new(SCSIBus *bus, DeviceState *host, const SCSIBusInfo *info); @@ -195,5 +193,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); #endif |