[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RESEND][PATCH 3/9] microdrive: qdevify
From: |
andrzej zaborowski |
Subject: |
Re: [Qemu-devel] [RESEND][PATCH 3/9] microdrive: qdevify |
Date: |
Mon, 16 May 2011 14:26:15 +0200 |
On 16 May 2011 06:54, Dmitry Eremin-Solenikov <address@hidden> wrote:
> Hello,
>
> On 5/16/11, andrzej zaborowski <address@hidden> wrote:
>> On 25 April 2011 11:06, Dmitry Eremin-Solenikov <address@hidden>
>> wrote:
>>> Switch dscm1xxxx microdrive driver to use qdev infrastructure.
>>> ---
>>> hw/ide/microdrive.c | 49
>>> +++++++++++++++++++++++++++++++++++++++----------
>>> hw/pcmcia.h | 2 +-
>>> hw/spitz.c | 5 ++++-
>>> hw/tosa.c | 5 ++++-
>>> 4 files changed, 48 insertions(+), 13 deletions(-)
>>>
>>> diff --git a/hw/ide/microdrive.c b/hw/ide/microdrive.c
>>> index 9fbbf0e..7692603 100644
>>> --- a/hw/ide/microdrive.c
>>> +++ b/hw/ide/microdrive.c
>>> @@ -38,8 +38,8 @@
>>>
>>> /* DSCM-1XXXX Microdrive hard disk with CF+ II / PCMCIA interface. */
>>> typedef struct {
>>> - IDEBus bus;
>>> PCMCIACardState card;
>>> + IDEBus bus;
>>> uint32_t attr_base;
>>> uint32_t io_base;
>>>
>>> @@ -529,22 +529,51 @@ static int dscm1xxxx_detach(void *opaque)
>>> return 0;
>>> }
>>>
>>> -PCMCIACardState *dscm1xxxx_init(DriveInfo *bdrv)
>>> +PCMCIACardState *dscm1xxxx_init(PCMCIASocket *socket, DriveInfo *bdrv)
>>
>> This looks like a regression that you have to pass the socket when
>> creating a PCMCIA card. I consider it an advantage of the current
>> code that pcmcia cards are hotswappable. Can we keep that with
>> qdevification? Otherwise is there a gain from the qdevification?
>
> Socket is required, as we have to know the QBus before creating the
> device on it.
Let's skip the qbusification then. It seems that qbus is a wrong
choice for pcmcia and there are no new features or bugs fixed by the
conversion, it's code motion? I also don't see why the socket
structure should be needed at the creation time of a PCI device for
example, the BusInfo should be enough logically.
Cheers
- Re: [Qemu-devel] [RESEND][PATCH 3/9] microdrive: qdevify, andrzej zaborowski, 2011/05/15
- Re: [Qemu-devel] [RESEND][PATCH 3/9] microdrive: qdevify, Dmitry Eremin-Solenikov, 2011/05/16
- Re: [Qemu-devel] [RESEND][PATCH 3/9] microdrive: qdevify,
andrzej zaborowski <=
- Re: [Qemu-devel] [RESEND][PATCH 3/9] microdrive: qdevify, Dmitry Eremin-Solenikov, 2011/05/16
- Re: [Qemu-devel] [RESEND][PATCH 3/9] microdrive: qdevify, andrzej zaborowski, 2011/05/16
- Re: [Qemu-devel] [RESEND][PATCH 3/9] microdrive: qdevify, Jan Kiszka, 2011/05/17
- Re: [Qemu-devel] [RESEND][PATCH 3/9] microdrive: qdevify, andrzej zaborowski, 2011/05/17
- Re: [Qemu-devel] [RESEND][PATCH 3/9] microdrive: qdevify, Jan Kiszka, 2011/05/17