summary refs log tree commit diff stats
path: root/hw/scsi.h
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2010-11-24 12:15:56 +0100
committerKevin Wolf <kwolf@redhat.com>2010-11-25 11:57:32 +0100
commit622b520fb4ca50b5028485f1d225317ece0a42b9 (patch)
tree400a49cd64d71ef0ed550ea9838341d308e312c0 /hw/scsi.h
parent80465c5016f23d8b39efb36db2ca77a35f67eaef (diff)
downloadfocaccia-qemu-622b520fb4ca50b5028485f1d225317ece0a42b9.tar.gz
focaccia-qemu-622b520fb4ca50b5028485f1d225317ece0a42b9.zip
scsi: Increase the number of possible devices
The SCSI parallel interface has a limit of 8 devices, but
not the SCSI stack in general. So we should be removing the
hard-coded limit and use MAX_SCSI_DEVS instead.
And we only need to scan those devices which are allocated
by the bus.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Acked-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'hw/scsi.h')
-rw-r--r--hw/scsi.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/scsi.h b/hw/scsi.h
index cb06d6d824..9c798ae795 100644
--- a/hw/scsi.h
+++ b/hw/scsi.h
@@ -3,6 +3,7 @@
 
 #include "qdev.h"
 #include "block.h"
+#include "blockdev.h"
 #include "block_int.h"
 
 #define SCSI_CMD_BUF_SIZE     16
@@ -86,7 +87,7 @@ struct SCSIBus {
     int tcq, ndev;
     scsi_completionfn complete;
 
-    SCSIDevice *devs[8];
+    SCSIDevice *devs[MAX_SCSI_DEVS];
 };
 
 void scsi_bus_new(SCSIBus *bus, DeviceState *host, int tcq, int ndev,