qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2 0/3] scsi: replace lsi53c895a_create() and lsi53c810_create() functions
@ 2018-09-07 12:56 Mark Cave-Ayland
  2018-09-07 12:56 ` [Qemu-devel] [PATCH v2 1/3] scsi: add lsi53c8xx_handle_legacy_cmdline() function Mark Cave-Ayland
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: Mark Cave-Ayland @ 2018-09-07 12:56 UTC (permalink / raw)
  To: pbonzini, famz, hpoussin, rth, peter.maydell, thuth, armbru,
	qemu-devel, qemu-ppc

As part of an upcoming 40p patchset I have a requirement to change the PCI
configuration of the LSI SCSI. However since commits a64aa5785d "hw: Deprecate -drive
if=scsi with non-onboard HBAs" and b891538e81 "hw/ppc/prep: Fix implicit creation of
"-drive if=scsi", the lsi53c8*_create() wrapper functions don't return the device
state itself.

This patchset replaces the lsi53c895a_create() and lsi53c810_create() functions
with a single lsi53c8xx_handle_legacy_cmdline() function as suggested by Thomas,
which makes the caller responsible for initing the LSI SCSI device and hence
allowing it to be configured as required.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>

v2:
- Don't split LSIState into separate lsi53c895a.h header but instead use a new
  lsi53c8xx_handle_legacy_cmdline() function as suggested by Thomas


Mark Cave-Ayland (3):
  scsi: add lsi53c8xx_handle_legacy_cmdline() function
  scsi: move lsi53c8xx_create() callers to
    lsi53c8xx_handle_legacy_cmdline()
  scsi: remove unused lsi53c895a_create() and lsi53c810_create()
    functions

 hw/arm/realview.c    |  3 ++-
 hw/arm/versatilepb.c |  3 ++-
 hw/hppa/machine.c    |  4 +++-
 hw/ppc/prep.c        |  4 +++-
 hw/scsi/lsi53c895a.c | 11 ++---------
 include/hw/pci/pci.h |  3 +--
 6 files changed, 13 insertions(+), 15 deletions(-)

-- 
2.11.0

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Qemu-devel] [PATCH v2 1/3] scsi: add lsi53c8xx_handle_legacy_cmdline() function
  2018-09-07 12:56 [Qemu-devel] [PATCH v2 0/3] scsi: replace lsi53c895a_create() and lsi53c810_create() functions Mark Cave-Ayland
@ 2018-09-07 12:56 ` Mark Cave-Ayland
  2018-09-07 13:05   ` Thomas Huth
  2018-09-07 12:56 ` [Qemu-devel] [PATCH v2 2/3] scsi: move lsi53c8xx_create() callers to lsi53c8xx_handle_legacy_cmdline() Mark Cave-Ayland
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 10+ messages in thread
From: Mark Cave-Ayland @ 2018-09-07 12:56 UTC (permalink / raw)
  To: pbonzini, famz, hpoussin, rth, peter.maydell, thuth, armbru,
	qemu-devel, qemu-ppc

This is the function that will soon be used to replace lsi53c895a_create() and
lsi53c810_create().

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
---
 hw/scsi/lsi53c895a.c | 7 +++++++
 include/hw/pci/pci.h | 1 +
 2 files changed, 8 insertions(+)

diff --git a/hw/scsi/lsi53c895a.c b/hw/scsi/lsi53c895a.c
index 955ba94800..8f5ab82d57 100644
--- a/hw/scsi/lsi53c895a.c
+++ b/hw/scsi/lsi53c895a.c
@@ -2290,3 +2290,10 @@ void lsi53c810_create(PCIBus *bus, int devfn)
 
     scsi_bus_legacy_handle_cmdline(&s->bus);
 }
+
+void lsi53c8xx_handle_legacy_cmdline(DeviceState *lsi_dev)
+{
+    LSIState *s = LSI53C895A(lsi_dev);
+
+    scsi_bus_legacy_handle_cmdline(&s->bus);
+}
diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h
index 990d6fcbde..0d907dc084 100644
--- a/include/hw/pci/pci.h
+++ b/include/hw/pci/pci.h
@@ -709,6 +709,7 @@ PCIDevice *pci_create_simple(PCIBus *bus, int devfn, const char *name);
 
 void lsi53c895a_create(PCIBus *bus);
 void lsi53c810_create(PCIBus *bus, int devfn);
+void lsi53c8xx_handle_legacy_cmdline(DeviceState *lsi_dev);
 
 qemu_irq pci_allocate_irq(PCIDevice *pci_dev);
 void pci_set_irq(PCIDevice *pci_dev, int level);
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [Qemu-devel] [PATCH v2 2/3] scsi: move lsi53c8xx_create() callers to lsi53c8xx_handle_legacy_cmdline()
  2018-09-07 12:56 [Qemu-devel] [PATCH v2 0/3] scsi: replace lsi53c895a_create() and lsi53c810_create() functions Mark Cave-Ayland
  2018-09-07 12:56 ` [Qemu-devel] [PATCH v2 1/3] scsi: add lsi53c8xx_handle_legacy_cmdline() function Mark Cave-Ayland
@ 2018-09-07 12:56 ` Mark Cave-Ayland
  2018-09-07 13:09   ` Thomas Huth
  2018-09-07 12:56 ` [Qemu-devel] [PATCH v2 3/3] scsi: remove unused lsi53c895a_create() and lsi53c810_create() functions Mark Cave-Ayland
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 10+ messages in thread
From: Mark Cave-Ayland @ 2018-09-07 12:56 UTC (permalink / raw)
  To: pbonzini, famz, hpoussin, rth, peter.maydell, thuth, armbru,
	qemu-devel, qemu-ppc

As part of commits a64aa5785d "hw: Deprecate -drive if=scsi with non-onboard
HBAs" and b891538e81 "hw/ppc/prep: Fix implicit creation of "-drive if=scsi"
devices" the lsi53c895a_create() and lsi53c810_create() functions were added
to wrap pci_create_simple() and scsi_bus_legacy_handle_cmdline().

Unfortunately this prevents us from changing qdev properties on the device
and/or changing the PCI configuration. By switching over to using the new
lsi53c8xx_handle_legacy_cmdline() function then the caller can now configure
and realize the LSI SCSI device exactly as required.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
---
 hw/arm/realview.c    | 3 ++-
 hw/arm/versatilepb.c | 3 ++-
 hw/hppa/machine.c    | 4 +++-
 hw/ppc/prep.c        | 4 +++-
 4 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/hw/arm/realview.c b/hw/arm/realview.c
index ab8c14fde3..242f5a87b6 100644
--- a/hw/arm/realview.c
+++ b/hw/arm/realview.c
@@ -257,7 +257,8 @@ static void realview_init(MachineState *machine,
         }
         n = drive_get_max_bus(IF_SCSI);
         while (n >= 0) {
-            lsi53c895a_create(pci_bus);
+            dev = DEVICE(pci_create_simple(pci_bus, -1, "lsi53c895a"));
+            lsi53c8xx_handle_legacy_cmdline(dev);
             n--;
         }
     }
diff --git a/hw/arm/versatilepb.c b/hw/arm/versatilepb.c
index 8b74857059..22b09a1e61 100644
--- a/hw/arm/versatilepb.c
+++ b/hw/arm/versatilepb.c
@@ -278,7 +278,8 @@ static void versatile_init(MachineState *machine, int board_id)
     }
     n = drive_get_max_bus(IF_SCSI);
     while (n >= 0) {
-        lsi53c895a_create(pci_bus);
+        dev = DEVICE(pci_create_simple(pci_bus, -1, "lsi53c895a"));
+        lsi53c8xx_handle_legacy_cmdline(dev);
         n--;
     }
 
diff --git a/hw/hppa/machine.c b/hw/hppa/machine.c
index cf7c61c6cc..0fb8fb877e 100644
--- a/hw/hppa/machine.c
+++ b/hw/hppa/machine.c
@@ -59,6 +59,7 @@ static void machine_hppa_init(MachineState *machine)
     const char *kernel_filename = machine->kernel_filename;
     const char *kernel_cmdline = machine->kernel_cmdline;
     const char *initrd_filename = machine->initrd_filename;
+    DeviceState *dev;
     PCIBus *pci_bus;
     ISABus *isa_bus;
     qemu_irq rtc_irq, serial_irq;
@@ -115,7 +116,8 @@ static void machine_hppa_init(MachineState *machine)
     }
 
     /* SCSI disk setup. */
-    lsi53c895a_create(pci_bus);
+    dev = DEVICE(pci_create_simple(pci_bus, -1, "lsi53c895a"));
+    lsi53c8xx_handle_legacy_cmdline(dev);
 
     /* Network setup.  e1000 is good enough, failing Tulip support.  */
     for (i = 0; i < nb_nics; i++) {
diff --git a/hw/ppc/prep.c b/hw/ppc/prep.c
index 162b27a3b8..b0ea20416e 100644
--- a/hw/ppc/prep.c
+++ b/hw/ppc/prep.c
@@ -702,7 +702,9 @@ static void ibm_40p_init(MachineState *machine)
         qdev_prop_set_uint32(dev, "equipment", 0xc0);
         qdev_init_nofail(dev);
 
-        lsi53c810_create(pci_bus, PCI_DEVFN(1, 0));
+        dev = DEVICE(pci_create_simple(pci_bus, PCI_DEVFN(1, 0),
+                                       "lsi53c810"));
+        lsi53c8xx_handle_legacy_cmdline(dev);
 
         /* XXX: s3-trio at PCI_DEVFN(2, 0) */
         pci_vga_init(pci_bus);
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [Qemu-devel] [PATCH v2 3/3] scsi: remove unused lsi53c895a_create() and lsi53c810_create() functions
  2018-09-07 12:56 [Qemu-devel] [PATCH v2 0/3] scsi: replace lsi53c895a_create() and lsi53c810_create() functions Mark Cave-Ayland
  2018-09-07 12:56 ` [Qemu-devel] [PATCH v2 1/3] scsi: add lsi53c8xx_handle_legacy_cmdline() function Mark Cave-Ayland
  2018-09-07 12:56 ` [Qemu-devel] [PATCH v2 2/3] scsi: move lsi53c8xx_create() callers to lsi53c8xx_handle_legacy_cmdline() Mark Cave-Ayland
@ 2018-09-07 12:56 ` Mark Cave-Ayland
  2018-09-07 13:09   ` Thomas Huth
  2018-09-08  6:30 ` [Qemu-devel] [PATCH v2 0/3] scsi: replace " Hervé Poussineau
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 10+ messages in thread
From: Mark Cave-Ayland @ 2018-09-07 12:56 UTC (permalink / raw)
  To: pbonzini, famz, hpoussin, rth, peter.maydell, thuth, armbru,
	qemu-devel, qemu-ppc

Now that these functions are no longer required they can be removed.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
---
 hw/scsi/lsi53c895a.c | 14 --------------
 include/hw/pci/pci.h |  2 --
 2 files changed, 16 deletions(-)

diff --git a/hw/scsi/lsi53c895a.c b/hw/scsi/lsi53c895a.c
index 8f5ab82d57..f5cbbf653c 100644
--- a/hw/scsi/lsi53c895a.c
+++ b/hw/scsi/lsi53c895a.c
@@ -2277,20 +2277,6 @@ static void lsi53c895a_register_types(void)
 
 type_init(lsi53c895a_register_types)
 
-void lsi53c895a_create(PCIBus *bus)
-{
-    LSIState *s = LSI53C895A(pci_create_simple(bus, -1, "lsi53c895a"));
-
-    scsi_bus_legacy_handle_cmdline(&s->bus);
-}
-
-void lsi53c810_create(PCIBus *bus, int devfn)
-{
-    LSIState *s = LSI53C895A(pci_create_simple(bus, devfn, "lsi53c810"));
-
-    scsi_bus_legacy_handle_cmdline(&s->bus);
-}
-
 void lsi53c8xx_handle_legacy_cmdline(DeviceState *lsi_dev)
 {
     LSIState *s = LSI53C895A(lsi_dev);
diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h
index 0d907dc084..e6514bba23 100644
--- a/include/hw/pci/pci.h
+++ b/include/hw/pci/pci.h
@@ -707,8 +707,6 @@ PCIDevice *pci_create_simple_multifunction(PCIBus *bus, int devfn,
 PCIDevice *pci_create(PCIBus *bus, int devfn, const char *name);
 PCIDevice *pci_create_simple(PCIBus *bus, int devfn, const char *name);
 
-void lsi53c895a_create(PCIBus *bus);
-void lsi53c810_create(PCIBus *bus, int devfn);
 void lsi53c8xx_handle_legacy_cmdline(DeviceState *lsi_dev);
 
 qemu_irq pci_allocate_irq(PCIDevice *pci_dev);
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [Qemu-devel] [PATCH v2 1/3] scsi: add lsi53c8xx_handle_legacy_cmdline() function
  2018-09-07 12:56 ` [Qemu-devel] [PATCH v2 1/3] scsi: add lsi53c8xx_handle_legacy_cmdline() function Mark Cave-Ayland
@ 2018-09-07 13:05   ` Thomas Huth
  0 siblings, 0 replies; 10+ messages in thread
From: Thomas Huth @ 2018-09-07 13:05 UTC (permalink / raw)
  To: Mark Cave-Ayland, pbonzini, famz, hpoussin, rth, peter.maydell,
	armbru, qemu-devel, qemu-ppc

On 2018-09-07 14:56, Mark Cave-Ayland wrote:
> This is the function that will soon be used to replace lsi53c895a_create() and
> lsi53c810_create().
> 
> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
> ---
>  hw/scsi/lsi53c895a.c | 7 +++++++
>  include/hw/pci/pci.h | 1 +
>  2 files changed, 8 insertions(+)

Reviewed-by: Thomas Huth <thuth@redhat.com>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Qemu-devel] [PATCH v2 2/3] scsi: move lsi53c8xx_create() callers to lsi53c8xx_handle_legacy_cmdline()
  2018-09-07 12:56 ` [Qemu-devel] [PATCH v2 2/3] scsi: move lsi53c8xx_create() callers to lsi53c8xx_handle_legacy_cmdline() Mark Cave-Ayland
@ 2018-09-07 13:09   ` Thomas Huth
  0 siblings, 0 replies; 10+ messages in thread
From: Thomas Huth @ 2018-09-07 13:09 UTC (permalink / raw)
  To: Mark Cave-Ayland, pbonzini, famz, hpoussin, rth, peter.maydell,
	armbru, qemu-devel, qemu-ppc

On 2018-09-07 14:56, Mark Cave-Ayland wrote:
> As part of commits a64aa5785d "hw: Deprecate -drive if=scsi with non-onboard
> HBAs" and b891538e81 "hw/ppc/prep: Fix implicit creation of "-drive if=scsi"
> devices" the lsi53c895a_create() and lsi53c810_create() functions were added
> to wrap pci_create_simple() and scsi_bus_legacy_handle_cmdline().
> 
> Unfortunately this prevents us from changing qdev properties on the device
> and/or changing the PCI configuration. By switching over to using the new
> lsi53c8xx_handle_legacy_cmdline() function then the caller can now configure
> and realize the LSI SCSI device exactly as required.
> 
> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
> ---
>  hw/arm/realview.c    | 3 ++-
>  hw/arm/versatilepb.c | 3 ++-
>  hw/hppa/machine.c    | 4 +++-
>  hw/ppc/prep.c        | 4 +++-
>  4 files changed, 10 insertions(+), 4 deletions(-)

Reviewed-by: Thomas Huth <thuth@redhat.com>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Qemu-devel] [PATCH v2 3/3] scsi: remove unused lsi53c895a_create() and lsi53c810_create() functions
  2018-09-07 12:56 ` [Qemu-devel] [PATCH v2 3/3] scsi: remove unused lsi53c895a_create() and lsi53c810_create() functions Mark Cave-Ayland
@ 2018-09-07 13:09   ` Thomas Huth
  0 siblings, 0 replies; 10+ messages in thread
From: Thomas Huth @ 2018-09-07 13:09 UTC (permalink / raw)
  To: Mark Cave-Ayland, pbonzini, famz, hpoussin, rth, peter.maydell,
	armbru, qemu-devel, qemu-ppc

On 2018-09-07 14:56, Mark Cave-Ayland wrote:
> Now that these functions are no longer required they can be removed.
> 
> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
> ---
>  hw/scsi/lsi53c895a.c | 14 --------------
>  include/hw/pci/pci.h |  2 --
>  2 files changed, 16 deletions(-)

Reviewed-by: Thomas Huth <thuth@redhat.com>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Qemu-devel] [PATCH v2 0/3] scsi: replace lsi53c895a_create() and lsi53c810_create() functions
  2018-09-07 12:56 [Qemu-devel] [PATCH v2 0/3] scsi: replace lsi53c895a_create() and lsi53c810_create() functions Mark Cave-Ayland
                   ` (2 preceding siblings ...)
  2018-09-07 12:56 ` [Qemu-devel] [PATCH v2 3/3] scsi: remove unused lsi53c895a_create() and lsi53c810_create() functions Mark Cave-Ayland
@ 2018-09-08  6:30 ` Hervé Poussineau
  2018-09-08 11:08 ` Philippe Mathieu-Daudé
  2018-09-11 13:04 ` Paolo Bonzini
  5 siblings, 0 replies; 10+ messages in thread
From: Hervé Poussineau @ 2018-09-08  6:30 UTC (permalink / raw)
  To: Mark Cave-Ayland, pbonzini, famz, rth, peter.maydell, thuth,
	armbru, qemu-devel, qemu-ppc

Le 07/09/2018 à 14:56, Mark Cave-Ayland a écrit :
> As part of an upcoming 40p patchset I have a requirement to change the PCI
> configuration of the LSI SCSI. However since commits a64aa5785d "hw: Deprecate -drive
> if=scsi with non-onboard HBAs" and b891538e81 "hw/ppc/prep: Fix implicit creation of
> "-drive if=scsi", the lsi53c8*_create() wrapper functions don't return the device
> state itself.
> 
> This patchset replaces the lsi53c895a_create() and lsi53c810_create() functions
> with a single lsi53c8xx_handle_legacy_cmdline() function as suggested by Thomas,
> which makes the caller responsible for initing the LSI SCSI device and hence
> allowing it to be configured as required.
> 
> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
> 
> v2:
> - Don't split LSIState into separate lsi53c895a.h header but instead use a new
>    lsi53c8xx_handle_legacy_cmdline() function as suggested by Thomas
> 
> 
> Mark Cave-Ayland (3):
>    scsi: add lsi53c8xx_handle_legacy_cmdline() function
>    scsi: move lsi53c8xx_create() callers to
>      lsi53c8xx_handle_legacy_cmdline()
>    scsi: remove unused lsi53c895a_create() and lsi53c810_create()
>      functions
> 
>   hw/arm/realview.c    |  3 ++-
>   hw/arm/versatilepb.c |  3 ++-
>   hw/hppa/machine.c    |  4 +++-
>   hw/ppc/prep.c        |  4 +++-
>   hw/scsi/lsi53c895a.c | 11 ++---------
>   include/hw/pci/pci.h |  3 +--
>   6 files changed, 13 insertions(+), 15 deletions(-)
> 

Reviewed-by: Hervé Poussineau <hpoussin@reactos.org>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Qemu-devel] [PATCH v2 0/3] scsi: replace lsi53c895a_create() and lsi53c810_create() functions
  2018-09-07 12:56 [Qemu-devel] [PATCH v2 0/3] scsi: replace lsi53c895a_create() and lsi53c810_create() functions Mark Cave-Ayland
                   ` (3 preceding siblings ...)
  2018-09-08  6:30 ` [Qemu-devel] [PATCH v2 0/3] scsi: replace " Hervé Poussineau
@ 2018-09-08 11:08 ` Philippe Mathieu-Daudé
  2018-09-11 13:04 ` Paolo Bonzini
  5 siblings, 0 replies; 10+ messages in thread
From: Philippe Mathieu-Daudé @ 2018-09-08 11:08 UTC (permalink / raw)
  To: Mark Cave-Ayland, pbonzini, famz, hpoussin, rth, peter.maydell,
	thuth, armbru, qemu-devel, qemu-ppc

On 9/7/18 9:56 AM, Mark Cave-Ayland wrote:
> As part of an upcoming 40p patchset I have a requirement to change the PCI
> configuration of the LSI SCSI. However since commits a64aa5785d "hw: Deprecate -drive
> if=scsi with non-onboard HBAs" and b891538e81 "hw/ppc/prep: Fix implicit creation of
> "-drive if=scsi", the lsi53c8*_create() wrapper functions don't return the device
> state itself.
> 
> This patchset replaces the lsi53c895a_create() and lsi53c810_create() functions
> with a single lsi53c8xx_handle_legacy_cmdline() function as suggested by Thomas,
> which makes the caller responsible for initing the LSI SCSI device and hence
> allowing it to be configured as required.
> 
> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

> 
> v2:
> - Don't split LSIState into separate lsi53c895a.h header but instead use a new
>   lsi53c8xx_handle_legacy_cmdline() function as suggested by Thomas
> 
> 
> Mark Cave-Ayland (3):
>   scsi: add lsi53c8xx_handle_legacy_cmdline() function
>   scsi: move lsi53c8xx_create() callers to
>     lsi53c8xx_handle_legacy_cmdline()
>   scsi: remove unused lsi53c895a_create() and lsi53c810_create()
>     functions
> 
>  hw/arm/realview.c    |  3 ++-
>  hw/arm/versatilepb.c |  3 ++-
>  hw/hppa/machine.c    |  4 +++-
>  hw/ppc/prep.c        |  4 +++-
>  hw/scsi/lsi53c895a.c | 11 ++---------
>  include/hw/pci/pci.h |  3 +--
>  6 files changed, 13 insertions(+), 15 deletions(-)
> 

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Qemu-devel] [PATCH v2 0/3] scsi: replace lsi53c895a_create() and lsi53c810_create() functions
  2018-09-07 12:56 [Qemu-devel] [PATCH v2 0/3] scsi: replace lsi53c895a_create() and lsi53c810_create() functions Mark Cave-Ayland
                   ` (4 preceding siblings ...)
  2018-09-08 11:08 ` Philippe Mathieu-Daudé
@ 2018-09-11 13:04 ` Paolo Bonzini
  5 siblings, 0 replies; 10+ messages in thread
From: Paolo Bonzini @ 2018-09-11 13:04 UTC (permalink / raw)
  To: Mark Cave-Ayland, famz, hpoussin, rth, peter.maydell, thuth,
	armbru, qemu-devel, qemu-ppc

On 07/09/2018 14:56, Mark Cave-Ayland wrote:
> As part of an upcoming 40p patchset I have a requirement to change the PCI
> configuration of the LSI SCSI. However since commits a64aa5785d "hw: Deprecate -drive
> if=scsi with non-onboard HBAs" and b891538e81 "hw/ppc/prep: Fix implicit creation of
> "-drive if=scsi", the lsi53c8*_create() wrapper functions don't return the device
> state itself.
> 
> This patchset replaces the lsi53c895a_create() and lsi53c810_create() functions
> with a single lsi53c8xx_handle_legacy_cmdline() function as suggested by Thomas,
> which makes the caller responsible for initing the LSI SCSI device and hence
> allowing it to be configured as required.
> 
> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
> 
> v2:
> - Don't split LSIState into separate lsi53c895a.h header but instead use a new
>   lsi53c8xx_handle_legacy_cmdline() function as suggested by Thomas
> 
> 
> Mark Cave-Ayland (3):
>   scsi: add lsi53c8xx_handle_legacy_cmdline() function
>   scsi: move lsi53c8xx_create() callers to
>     lsi53c8xx_handle_legacy_cmdline()
>   scsi: remove unused lsi53c895a_create() and lsi53c810_create()
>     functions
> 
>  hw/arm/realview.c    |  3 ++-
>  hw/arm/versatilepb.c |  3 ++-
>  hw/hppa/machine.c    |  4 +++-
>  hw/ppc/prep.c        |  4 +++-
>  hw/scsi/lsi53c895a.c | 11 ++---------
>  include/hw/pci/pci.h |  3 +--
>  6 files changed, 13 insertions(+), 15 deletions(-)
> 

Queued, thanks.

Paolo

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2018-09-11 13:04 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-07 12:56 [Qemu-devel] [PATCH v2 0/3] scsi: replace lsi53c895a_create() and lsi53c810_create() functions Mark Cave-Ayland
2018-09-07 12:56 ` [Qemu-devel] [PATCH v2 1/3] scsi: add lsi53c8xx_handle_legacy_cmdline() function Mark Cave-Ayland
2018-09-07 13:05   ` Thomas Huth
2018-09-07 12:56 ` [Qemu-devel] [PATCH v2 2/3] scsi: move lsi53c8xx_create() callers to lsi53c8xx_handle_legacy_cmdline() Mark Cave-Ayland
2018-09-07 13:09   ` Thomas Huth
2018-09-07 12:56 ` [Qemu-devel] [PATCH v2 3/3] scsi: remove unused lsi53c895a_create() and lsi53c810_create() functions Mark Cave-Ayland
2018-09-07 13:09   ` Thomas Huth
2018-09-08  6:30 ` [Qemu-devel] [PATCH v2 0/3] scsi: replace " Hervé Poussineau
2018-09-08 11:08 ` Philippe Mathieu-Daudé
2018-09-11 13:04 ` Paolo Bonzini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).