diff options
author | Hannes Reinecke <hare@suse.de> | 2010-11-24 12:15:56 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2010-11-25 11:57:32 +0100 |
commit | 622b520fb4ca50b5028485f1d225317ece0a42b9 (patch) | |
tree | 400a49cd64d71ef0ed550ea9838341d308e312c0 /hw/scsi-bus.c | |
parent | 80465c5016f23d8b39efb36db2ca77a35f67eaef (diff) |
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-bus.c')
-rw-r--r-- | hw/scsi-bus.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/scsi-bus.c b/hw/scsi-bus.c index 5a3fd4b7ac..74a08b7da6 100644 --- a/hw/scsi-bus.c +++ b/hw/scsi-bus.c @@ -108,7 +108,7 @@ int scsi_bus_legacy_handle_cmdline(SCSIBus *bus) int res = 0, unit; loc_push_none(&loc); - for (unit = 0; unit < MAX_SCSI_DEVS; unit++) { + for (unit = 0; unit < bus->ndev; unit++) { dinfo = drive_get(IF_SCSI, bus->busnr, unit); if (dinfo == NULL) { continue; |