[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [PATCH 0/3] scsi: remove lsi53c895a_create() and lsi53c81
From: |
Thomas Huth |
Subject: |
Re: [Qemu-ppc] [PATCH 0/3] scsi: remove lsi53c895a_create() and lsi53c810_create() functions |
Date: |
Thu, 6 Sep 2018 14:02:51 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 |
On 2018-09-06 07:57, 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.
>
> Rather than altering these functions to return PCIDevice I simply went ahead
> and split
> the LSIState structure and QOM types into a new lsi53c895a.h file, as is
> fairly
> standard QEMU practice.
>
> Not only does this enable me to change the PCI configuration of the LSI SCSI
> device
> in an upcoming patchset, but it also allows full access to LSIState if
> required
> (which is fairly similar to how the code was arranged before a64aa5785d).
I somehow fail to see that something outside of lsi53c895a.c should
really need to access the internals of LSIState. If there is something
that needs to be configured from the outside, it should be done via QOM
properties instead, shouldn't it? So I think I'd rather prefer if you
could do it the other way round and change the lsi*_create() functions
to return a pointer to PCIDevice instead, if possible.
Thomas
- [Qemu-ppc] [PATCH 0/3] scsi: remove lsi53c895a_create() and lsi53c810_create() functions, Mark Cave-Ayland, 2018/09/06
- [Qemu-ppc] [PATCH 3/3] scsi: remove unused lsi53c895a_create() and lsi53c810_create() functions, Mark Cave-Ayland, 2018/09/06
- [Qemu-ppc] [PATCH 2/3] scsi: move lsi53c895a_create() and lsi53c810_create() callers to pci_create_simple(), Mark Cave-Ayland, 2018/09/06
- [Qemu-ppc] [PATCH 1/3] scsi: move lsi53c895a structures and defines into separate lsi53c895a.h file, Mark Cave-Ayland, 2018/09/06
- Re: [Qemu-ppc] [PATCH 0/3] scsi: remove lsi53c895a_create() and lsi53c810_create() functions,
Thomas Huth <=
- Re: [Qemu-ppc] [PATCH 0/3] scsi: remove lsi53c895a_create() and lsi53c810_create() functions, Peter Maydell, 2018/09/06
- Re: [Qemu-ppc] [PATCH 0/3] scsi: remove lsi53c895a_create() and lsi53c810_create() functions, Thomas Huth, 2018/09/06
- Re: [Qemu-ppc] [PATCH 0/3] scsi: remove lsi53c895a_create() and lsi53c810_create() functions, Peter Maydell, 2018/09/06
- Re: [Qemu-ppc] [Qemu-devel] [PATCH 0/3] scsi: remove lsi53c895a_create() and lsi53c810_create() functions, Mark Cave-Ayland, 2018/09/06
- Re: [Qemu-ppc] [Qemu-devel] [PATCH 0/3] scsi: remove lsi53c895a_create() and lsi53c810_create() functions, Thomas Huth, 2018/09/07
- Re: [Qemu-ppc] [Qemu-devel] [PATCH 0/3] scsi: remove lsi53c895a_create() and lsi53c810_create() functions, Mark Cave-Ayland, 2018/09/07