From: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
To: andrzej zaborowski <balrogg@gmail.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [RESEND][PATCH 3/9] microdrive: qdevify
Date: Mon, 16 May 2011 08:54:30 +0400 [thread overview]
Message-ID: <BANLkTi=GDvb_y0xX7CpQ30C+nsQVLi7Qkg@mail.gmail.com> (raw)
In-Reply-To: <BANLkTi=YJNJrHyi5jB0-FKRQ776Jppni=g@mail.gmail.com>
Hello,
On 5/16/11, andrzej zaborowski <balrogg@gmail.com> wrote:
> On 25 April 2011 11:06, Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
> 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.
Reg. hotswap: my intent was to move reuse hotplug/hotswap from QDev layer.
However I could not find a way to trigger device creation/removal at run time,
so I was unable to even try to test this code path. How should I do that?
Cards won´t be hotswitchable (you won´t be able to detach a card from one socket
and then put it back to the other one, however PCMCIA code should be hotplugable
(i.e. you should be able to unplug a card from socket and then plug another one
in).
--
With best wishes
Dmitry
next prev parent reply other threads:[~2011-05-16 4:54 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-25 9:06 [Qemu-devel] [RESEND][PATCH 1/9] pxa2xx_pcmcia: qdevify Dmitry Eremin-Solenikov
2011-04-25 9:06 ` [Qemu-devel] [RESEND][PATCH 2/9] PCMCIA: start qdev'ication Dmitry Eremin-Solenikov
2011-05-16 1:52 ` andrzej zaborowski
2011-05-16 5:10 ` Dmitry Eremin-Solenikov
2011-04-25 9:06 ` [Qemu-devel] [RESEND][PATCH 3/9] microdrive: qdevify Dmitry Eremin-Solenikov
2011-05-16 2:01 ` andrzej zaborowski
2011-05-16 4:54 ` Dmitry Eremin-Solenikov [this message]
2011-05-16 12:26 ` andrzej zaborowski
2011-05-16 13:08 ` Dmitry Eremin-Solenikov
2011-05-17 1:38 ` andrzej zaborowski
2011-05-17 5:44 ` Jan Kiszka
2011-05-17 11:08 ` andrzej zaborowski
2011-05-17 11:33 ` Jan Kiszka
2011-04-25 9:06 ` [Qemu-devel] [RESEND][PATCH 4/9] pcmcia: move all card callbacks to PCMCIACardInfo Dmitry Eremin-Solenikov
2011-04-25 9:06 ` [Qemu-devel] [RESEND][PATCH 5/9] pcmcia: move attach and detach socket methods to PCMCIASocket Dmitry Eremin-Solenikov
2011-04-25 9:06 ` [Qemu-devel] [RESEND][PATCH 6/9] pxa: change order of pcmcia devices instantiation, so that the socket 0 will be default Dmitry Eremin-Solenikov
2011-04-25 9:06 ` [Qemu-devel] [RESEND][PATCH 7/9] ide-core: allocate metadata storage for CFATA drives Dmitry Eremin-Solenikov
2011-04-25 9:06 ` [Qemu-devel] [RESEND][PATCH 8/9] strongarm: add PCMCIA support Dmitry Eremin-Solenikov
2011-04-25 9:06 ` [Qemu-devel] [RESEND][PATCH 9/9] collie: add support for PCMCIA bus Dmitry Eremin-Solenikov
2011-04-29 19:40 ` [Qemu-devel] [RESEND][PATCH 1/9] pxa2xx_pcmcia: qdevify Dmitry Eremin-Solenikov
2011-05-03 9:02 ` Dmitry Eremin-Solenikov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='BANLkTi=GDvb_y0xX7CpQ30C+nsQVLi7Qkg@mail.gmail.com' \
--to=dbaryshkov@gmail.com \
--cc=balrogg@gmail.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).