All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: Alon Levy <alevy@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 1/7] usb-ccid: add CCID bus
Date: Tue, 22 Feb 2011 10:03:45 -0600	[thread overview]
Message-ID: <4D63DE61.6050502@codemonkey.ws> (raw)
In-Reply-To: <1297096503-12007-2-git-send-email-alevy@redhat.com>

On 02/07/2011 10:34 AM, Alon Levy wrote:
> +static int ccid_post_load(void *opaque, int version_id)
> +{
> +    USBCCIDState *s = opaque;
> +
> +    // This must be done after usb_device_attach, which sets state to ATTACHED,
> +    // while it must be DEFAULT in order to accept packets (like it is after
> +    // reset, but reset will reset our addr and call our reset handler which
> +    // may change state, and we don't want to do that when migrating).
> +    s->dev.state = s->state_vmstate;
> +    return 0;
> +}
> +
> +static void ccid_pre_save(void *opaque)
> +{
> +    USBCCIDState *s = opaque;
> +
> +    s->state_vmstate = s->dev.state;
> +    if (s->dev.attached) {
> +        // migrating an open device, ignore reconnection CHR_EVENT to avoid an
> +        // erronous detach.
> +        s->migration_state = MIGRATION_MIGRATED;
> +    }
>    


Still using C99 comments, should be C89.

Regards,

Anthony Liguori

  reply	other threads:[~2011-02-22 16:03 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-07 16:34 [Qemu-devel] [PATCH 0/7] usb-ccid (v19) Alon Levy
2011-02-07 16:34 ` [Qemu-devel] [PATCH 1/7] usb-ccid: add CCID bus Alon Levy
2011-02-22 16:03   ` Anthony Liguori [this message]
2011-02-23 15:10     ` Alon Levy
2011-02-07 16:34 ` [Qemu-devel] [PATCH 2/7] introduce libcacard/vscard_common.h Alon Levy
2011-02-07 16:34 ` [Qemu-devel] [PATCH 3/7] ccid: add passthru card device Alon Levy
2011-02-07 16:35 ` [Qemu-devel] [PATCH 4/7] libcacard: initial commit Alon Levy
2011-02-07 16:35 ` [Qemu-devel] [PATCH 5/7] ccid: add ccid-card-emulated device Alon Levy
2011-02-07 16:35 ` [Qemu-devel] [PATCH 6/7] ccid: add docs Alon Levy
2011-02-07 16:35 ` [Qemu-devel] [PATCH 7/7] ccid: configure: improve --enable-smartcard flags Alon Levy
2011-02-20 15:49 ` [Qemu-devel] [PATCH 0/7] usb-ccid (v19) Alon Levy
  -- strict thread matches above, loose matches on Subject: below --
2011-02-23 11:20 [Qemu-devel] [PATCH v20 0/7] usb-ccid Alon Levy
2011-02-23 11:20 ` [Qemu-devel] [PATCH 1/7] usb-ccid: add CCID bus Alon Levy
2011-03-14 13:54   ` Jes Sorensen
2011-03-14 14:07     ` Daniel P. Berrange
2011-03-14 14:12       ` Anthony Liguori
2011-03-16  9:15     ` Alon Levy
2011-03-16  9:26       ` Jes Sorensen
2011-01-11  8:42 [Qemu-devel] [PATCH 0/7] usb-ccid (v15) Alon Levy
2011-01-11  8:42 ` [Qemu-devel] [PATCH 1/7] usb-ccid: add CCID bus Alon Levy
2011-01-11  8:38 [Qemu-devel] [PATCH 0/7] usb-ccid (v14) Alon Levy
2011-01-11  8:38 ` [Qemu-devel] [PATCH 1/7] usb-ccid: add CCID bus Alon Levy
2011-01-25 14:10   ` Anthony Liguori
2011-01-25 16:10     ` Alon Levy

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=4D63DE61.6050502@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=alevy@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.