aboutsummaryrefslogtreecommitdiff
path: root/hw/lsi53c895a.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2011-08-13 15:44:45 +0200
committerKevin Wolf <kwolf@redhat.com>2011-10-28 19:25:51 +0200
commitafd4030c16d290e460cc93f8f9e353516b5451a2 (patch)
tree230de2da3d036bb6cdc28d940d826856bfdd1606 /hw/lsi53c895a.c
parent3c2f7c12c2e19707cb4e28dd57180f7be3dd4950 (diff)
scsi: move tcq/ndev to SCSIBusOps (now SCSIBusInfo)
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'hw/lsi53c895a.c')
-rw-r--r--hw/lsi53c895a.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/hw/lsi53c895a.c b/hw/lsi53c895a.c
index e077ec07cc..4eeb49632c 100644
--- a/hw/lsi53c895a.c
+++ b/hw/lsi53c895a.c
@@ -1686,7 +1686,7 @@ static void lsi_reg_writeb(LSIState *s, int offset, uint8_t val)
DeviceState *dev;
int id;
- for (id = 0; id < s->bus.ndev; id++) {
+ for (id = 0; id < LSI_MAX_DEVS; id++) {
if (s->bus.devs[id]) {
dev = &s->bus.devs[id]->qdev;
dev->info->reset(dev);
@@ -2091,7 +2091,10 @@ static int lsi_scsi_uninit(PCIDevice *d)
return 0;
}
-static const struct SCSIBusOps lsi_scsi_ops = {
+static const struct SCSIBusInfo lsi_scsi_info = {
+ .tcq = true,
+ .ndev = LSI_MAX_DEVS,
+
.transfer_data = lsi_transfer_data,
.complete = lsi_command_complete,
.cancel = lsi_request_cancelled
@@ -2118,7 +2121,7 @@ static int lsi_scsi_init(PCIDevice *dev)
pci_register_bar(&s->dev, 2, PCI_BASE_ADDRESS_SPACE_MEMORY, &s->ram_io);
QTAILQ_INIT(&s->queue);
- scsi_bus_new(&s->bus, &dev->qdev, 1, LSI_MAX_DEVS, &lsi_scsi_ops);
+ scsi_bus_new(&s->bus, &dev->qdev, &lsi_scsi_info);
if (!dev->qdev.hotplugged) {
return scsi_bus_legacy_handle_cmdline(&s->bus);
}