diff --git a/hw/i386/pc.c b/hw/i386/pc.c index c2c75e23da74..60b0946be3e9 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1650,9 +1650,15 @@ void pc_pci_device_init(PCIBus *pci_bus) int max_bus; int bus; + /* Note: if=scsi is deprecated with PC machine types */ max_bus = drive_get_max_bus(IF_SCSI); for (bus = 0; bus <= max_bus; bus++) { - lsi53c895a_create(pci_bus); + pci_create_simple(pci_bus, -1, "lsi53c895a"); + /* + * By not creating frontends here, we make + * scsi_legacy_handle_cmdline() create them, and warn that + * this usage is deprecated. + */ } } diff --git a/qemu-options.hx b/qemu-options.hx index 809b2b0d8c2a..1e815ef52050 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -654,11 +654,6 @@ If you don't specify the "file=" argument, you define an empty drive: qemu-system-i386 -drive if=ide,index=1,media=cdrom @end example -You can connect a SCSI disk with unit ID 6 on the bus #0: -@example -qemu-system-i386 -drive file=file,if=scsi,bus=0,unit=6 -@end example - Instead of @option{-fda}, @option{-fdb}, you can use: @example qemu-system-i386 -drive file=file,index=0,if=floppy diff --git a/tests/qemu-iotests/051.pc.out b/tests/qemu-iotests/051.pc.out index 603bb768d6a0..f8047a2e4582 100644 --- a/tests/qemu-iotests/051.pc.out +++ b/tests/qemu-iotests/051.pc.out @@ -118,7 +118,8 @@ QEMU X.Y.Z monitor - type 'help' for more information Testing: -drive if=scsi,media=cdrom QEMU X.Y.Z monitor - type 'help' for more information -(qemu) qququiquit +(qemu) QEMU_PROG: -drive if=scsi,media=cdrom: warning: bus=0,unit=0 is deprecated with this machine type +qququiquit Testing: -drive if=ide QEMU X.Y.Z monitor - type 'help' for more information @@ -127,7 +128,8 @@ QEMU_PROG: Initialization of device ide-hd failed: Device initialization failed. Testing: -drive if=scsi QEMU X.Y.Z monitor - type 'help' for more information -(qemu) QEMU_PROG: Initialization of device lsi53c895a failed: Device needs media, but drive is empty +(qemu) QEMU_PROG: -drive if=scsi: warning: bus=0,unit=0 is deprecated with this machine type +QEMU_PROG: -drive if=scsi: Device needs media, but drive is empty Testing: -drive if=virtio QEMU X.Y.Z monitor - type 'help' for more information @@ -172,7 +174,8 @@ QEMU X.Y.Z monitor - type 'help' for more information Testing: -drive file=TEST_DIR/t.qcow2,if=scsi,media=cdrom,readonly=on QEMU X.Y.Z monitor - type 'help' for more information -(qemu) qququiquit +(qemu) QEMU_PROG: -drive file=TEST_DIR/t.qcow2,if=scsi,media=cdrom,readonly=on: warning: bus=0,unit=0 is deprecated with this machine type +qququiquit Testing: -drive file=TEST_DIR/t.qcow2,if=ide,readonly=on QEMU X.Y.Z monitor - type 'help' for more information @@ -181,7 +184,8 @@ QEMU_PROG: Initialization of device ide-hd failed: Device initialization failed. Testing: -drive file=TEST_DIR/t.qcow2,if=scsi,readonly=on QEMU X.Y.Z monitor - type 'help' for more information -(qemu) qququiquit +(qemu) QEMU_PROG: -drive file=TEST_DIR/t.qcow2,if=scsi,readonly=on: warning: bus=0,unit=0 is deprecated with this machine type +qququiquit Testing: -drive file=TEST_DIR/t.qcow2,if=virtio,readonly=on QEMU X.Y.Z monitor - type 'help' for more information