All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Eduardo Habkost <ehabkost@redhat.com>, Gerd Hoffmann <kraxel@redhat.com>
Subject: [Qemu-devel] [PULL 1/9] usb: call reset handler before updating state
Date: Wed, 29 May 2019 08:28:24 +0200	[thread overview]
Message-ID: <20190529062832.26483-2-kraxel@redhat.com> (raw)
In-Reply-To: <20190529062832.26483-1-kraxel@redhat.com>

That way the device reset handler can see what
the before-reset state of the device is.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 20190522094702.17619-2-kraxel@redhat.com
---
 hw/usb/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/usb/core.c b/hw/usb/core.c
index 8fbd9c7d573b..3ab48a16074b 100644
--- a/hw/usb/core.c
+++ b/hw/usb/core.c
@@ -87,10 +87,10 @@ void usb_device_reset(USBDevice *dev)
     if (dev == NULL || !dev->attached) {
         return;
     }
+    usb_device_handle_reset(dev);
     dev->remote_wakeup = 0;
     dev->addr = 0;
     dev->state = USB_STATE_DEFAULT;
-    usb_device_handle_reset(dev);
 }
 
 void usb_wakeup(USBEndpoint *ep, unsigned int stream)
-- 
2.18.1



  reply	other threads:[~2019-05-29  6:30 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-29  6:28 [Qemu-devel] [PULL 0/9] Usb 20190529 patches Gerd Hoffmann
2019-05-29  6:28 ` Gerd Hoffmann [this message]
2019-05-29  6:28 ` [Qemu-devel] [PULL 2/9] usb-host: skip reset for untouched devices Gerd Hoffmann
2019-05-29  6:28 ` [Qemu-devel] [PULL 3/9] usb-host: avoid libusb_set_configuration calls Gerd Hoffmann
2019-05-29  6:28 ` [Qemu-devel] [PULL 4/9] usb-hub: tweak feature names Gerd Hoffmann
2019-05-29  6:28 ` [Qemu-devel] [PULL 5/9] usb-hub: make number of ports runtime-configurable Gerd Hoffmann
2019-05-29  6:28 ` [Qemu-devel] [PULL 6/9] usb-hub: add helpers to update port state Gerd Hoffmann
2019-05-29  6:28 ` [Qemu-devel] [PULL 7/9] usb-hub: add usb_hub_port_update() Gerd Hoffmann
2019-05-29  6:28 ` [Qemu-devel] [PULL 8/9] usb-hub: emulate per port power switching Gerd Hoffmann
2019-05-29  6:28 ` [Qemu-devel] [PULL 9/9] usb-tablet: fix serial compat property Gerd Hoffmann
2019-05-30 14:07 ` [Qemu-devel] [PULL 0/9] Usb 20190529 patches Peter Maydell

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=20190529062832.26483-2-kraxel@redhat.com \
    --to=kraxel@redhat.com \
    --cc=ehabkost@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.