From: Paolo Bonzini <pbonzini@redhat.com>
To: arei.gonglei@huawei.com, qemu-devel@nongnu.org
Cc: luonengjun@huawei.com, peter.huangpeng@huawei.com,
weidong.huang@huawei.com, kraxel@redhat.com, armbru@redhat.com
Subject: Re: [Qemu-devel] [PATCH v2 12/19] dev-serial: convert init to realize
Date: Thu, 18 Sep 2014 14:58:32 +0200 [thread overview]
Message-ID: <541AD6F8.106@redhat.com> (raw)
In-Reply-To: <1411044447-3124-13-git-send-email-arei.gonglei@huawei.com>
Il 18/09/2014 14:47, arei.gonglei@huawei.com ha scritto:
> if (s->cs->be_open && !dev->attached) {
> - usb_device_attach(dev, &local_err);
> - if (local_err) {
> - qerror_report_err(local_err);
> - error_free(local_err);
> - }
> + usb_device_attach(dev, errp);
> }
> - return 0;
Subtle change: realize now fails if the attach fails, i.e. if the speed
is mismatched. This is a bugfix, but it doesn't happen if the backend
is closed (e.g. for server socket chardevs).
For a follow-up, the speed check could be extracted to a separate
function usb_check_attach, that is called just once at realize time,
even if !s->cs->be_open. Then, I think, all calls to usb_device_attach
in dev-serial can pass &error_abort.
Paolo
next prev parent reply other threads:[~2014-09-18 12:58 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-18 12:47 [Qemu-devel] [PATCH v2 00/19] usb: convert device init to realize arei.gonglei
2014-09-18 12:47 ` [Qemu-devel] [PATCH v2 01/19] usb-storage: fix possible memory leak and missing error message arei.gonglei
2014-09-18 12:47 ` [Qemu-devel] [PATCH v2 02/19] usb-bus: convert USBDeviceClass init to realize arei.gonglei
2014-09-18 12:47 ` [Qemu-devel] [PATCH v2 03/19] usb-net: convert " arei.gonglei
2014-09-18 12:47 ` [Qemu-devel] [PATCH v2 04/19] libusb: " arei.gonglei
2014-09-18 12:47 ` [Qemu-devel] [PATCH v2 05/19] libusb: using error_report instead of fprintf arei.gonglei
2014-09-18 12:47 ` [Qemu-devel] [PATCH v2 06/19] usb-hub: convert init to realize arei.gonglei
2014-09-18 12:47 ` [Qemu-devel] [PATCH v2 07/19] dev-storage: " arei.gonglei
2014-09-18 12:47 ` [Qemu-devel] [PATCH v2 08/19] dev-storage: usring error_report instead of fprintf/printf arei.gonglei
2014-09-18 12:47 ` [Qemu-devel] [PATCH v2 09/19] dev-uas: convert init to realize arei.gonglei
2014-09-18 12:47 ` [Qemu-devel] [PATCH v2 10/19] dev-uas: using error_report instead of fprintf arei.gonglei
2014-09-18 12:47 ` [Qemu-devel] [PATCH v2 11/19] dev-bluetooth: convert init to realize arei.gonglei
2014-09-18 12:47 ` [Qemu-devel] [PATCH v2 12/19] dev-serial: " arei.gonglei
2014-09-18 12:58 ` Paolo Bonzini [this message]
2014-09-18 13:26 ` Gonglei (Arei)
2014-09-18 13:31 ` Paolo Bonzini
2014-09-18 13:35 ` Gonglei (Arei)
2014-09-18 13:37 ` Paolo Bonzini
2014-09-18 13:40 ` Gonglei (Arei)
2014-09-18 12:47 ` [Qemu-devel] [PATCH v2 13/19] usb-ccid: " arei.gonglei
2014-09-18 12:47 ` [Qemu-devel] [PATCH v2 14/19] dev-hid: " arei.gonglei
2014-09-18 12:47 ` [Qemu-devel] [PATCH v2 15/19] dev-wacom: " arei.gonglei
2014-09-19 6:01 ` Gerd Hoffmann
2014-09-19 6:05 ` Gonglei (Arei)
2014-09-18 12:47 ` [Qemu-devel] [PATCH v2 16/19] usb-audio: " arei.gonglei
2014-09-18 12:47 ` [Qemu-devel] [PATCH v2 17/19] usb-redir: " arei.gonglei
2014-09-18 12:47 ` [Qemu-devel] [PATCH v2 18/19] usb-mtp: " arei.gonglei
2014-09-18 12:47 ` [Qemu-devel] [PATCH v2 19/19] usb-bus: remove "init" from USBDeviceClass struct arei.gonglei
2014-09-18 12:58 ` [Qemu-devel] [PATCH v2 00/19] usb: convert device init to realize Paolo Bonzini
2014-09-18 17:15 ` Markus Armbruster
2014-09-18 18:42 ` Paolo Bonzini
2014-09-19 1:49 ` Gonglei (Arei)
2014-09-19 7:07 ` Markus Armbruster
2014-09-19 6:06 ` Gerd Hoffmann
2014-09-19 6:17 ` Gonglei (Arei)
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=541AD6F8.106@redhat.com \
--to=pbonzini@redhat.com \
--cc=arei.gonglei@huawei.com \
--cc=armbru@redhat.com \
--cc=kraxel@redhat.com \
--cc=luonengjun@huawei.com \
--cc=peter.huangpeng@huawei.com \
--cc=qemu-devel@nongnu.org \
--cc=weidong.huang@huawei.com \
/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.