* [Qemu-devel] [PULL 0/3] usb patch queue
@ 2012-10-11 11:40 Gerd Hoffmann
2012-10-11 11:40 ` [Qemu-devel] [PATCH 1/3] usb-redir: Change usbredir_open_chardev into usbredir_create_parser Gerd Hoffmann
` (3 more replies)
0 siblings, 4 replies; 11+ messages in thread
From: Gerd Hoffmann @ 2012-10-11 11:40 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann
Hi,
Pretty small this time with just a few bugfixes.
please pull,
Gerd
The following changes since commit b4ae3cfa57b8c1bdbbd7b7d420971e9171203ade:
ssi: Add slave autoconnect helper (2012-10-10 11:13:32 +1000)
are available in the git repository at:
git://git.kraxel.org/qemu usb.67
Hans de Goede (3):
usb-redir: Change usbredir_open_chardev into usbredir_create_parser
usb-redir: Don't make migration fail in none seamless case
uhci: Raise interrupt when requested even for non active tds
hw/usb/hcd-uhci.c | 10 +++++++++-
hw/usb/redirect.c | 24 ++++++++++++++----------
2 files changed, 23 insertions(+), 11 deletions(-)
^ permalink raw reply [flat|nested] 11+ messages in thread* [Qemu-devel] [PATCH 1/3] usb-redir: Change usbredir_open_chardev into usbredir_create_parser
2012-10-11 11:40 [Qemu-devel] [PULL 0/3] usb patch queue Gerd Hoffmann
@ 2012-10-11 11:40 ` Gerd Hoffmann
2012-10-11 11:40 ` [Qemu-devel] [PATCH 2/3] usb-redir: Don't make migration fail in none seamless case Gerd Hoffmann
` (2 subsequent siblings)
3 siblings, 0 replies; 11+ messages in thread
From: Gerd Hoffmann @ 2012-10-11 11:40 UTC (permalink / raw)
To: qemu-devel; +Cc: Hans de Goede, Gerd Hoffmann
From: Hans de Goede <hdegoede@redhat.com>
As we need to create the parser at more places.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
hw/usb/redirect.c | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c
index b10241a..5e0f98d 100644
--- a/hw/usb/redirect.c
+++ b/hw/usb/redirect.c
@@ -862,15 +862,11 @@ static void usbredir_chardev_close_bh(void *opaque)
}
}
-static void usbredir_chardev_open(USBRedirDevice *dev)
+static void usbredir_create_parser(USBRedirDevice *dev)
{
uint32_t caps[USB_REDIR_CAPS_SIZE] = { 0, };
int flags = 0;
- /* Make sure any pending closes are handled (no-op if none pending) */
- usbredir_chardev_close_bh(dev);
- qemu_bh_cancel(dev->chardev_close_bh);
-
DPRINTF("creating usbredirparser\n");
dev->parser = qemu_oom_check(usbredirparser_create());
@@ -982,7 +978,10 @@ static void usbredir_chardev_event(void *opaque, int event)
switch (event) {
case CHR_EVENT_OPENED:
DPRINTF("chardev open\n");
- usbredir_chardev_open(dev);
+ /* Make sure any pending closes are handled (no-op if none pending) */
+ usbredir_chardev_close_bh(dev);
+ qemu_bh_cancel(dev->chardev_close_bh);
+ usbredir_create_parser(dev);
break;
case CHR_EVENT_CLOSED:
DPRINTF("chardev close\n");
--
1.7.1
^ permalink raw reply related [flat|nested] 11+ messages in thread* [Qemu-devel] [PATCH 2/3] usb-redir: Don't make migration fail in none seamless case
2012-10-11 11:40 [Qemu-devel] [PULL 0/3] usb patch queue Gerd Hoffmann
2012-10-11 11:40 ` [Qemu-devel] [PATCH 1/3] usb-redir: Change usbredir_open_chardev into usbredir_create_parser Gerd Hoffmann
@ 2012-10-11 11:40 ` Gerd Hoffmann
2012-10-11 11:40 ` [Qemu-devel] [PATCH 3/3] uhci: Raise interrupt when requested even for non active tds Gerd Hoffmann
2012-10-12 16:17 ` [Qemu-devel] [PULL 0/3] usb patch queue Anthony Liguori
3 siblings, 0 replies; 11+ messages in thread
From: Gerd Hoffmann @ 2012-10-11 11:40 UTC (permalink / raw)
To: qemu-devel; +Cc: Hans de Goede, Gerd Hoffmann
From: Hans de Goede <hdegoede@redhat.com>
Instead simple disconnect the device like host redirection does on
migration.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
hw/usb/redirect.c | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c
index 5e0f98d..2283565 100644
--- a/hw/usb/redirect.c
+++ b/hw/usb/redirect.c
@@ -1614,12 +1614,17 @@ static int usbredir_get_parser(QEMUFile *f, void *priv, size_t unused)
}
/*
- * Our chardev should be open already at this point, otherwise
- * the usbredir channel will be broken (ie spice without seamless)
+ * If our chardev is not open already at this point the usbredir connection
+ * has been broken (non seamless migration, or restore from disk).
+ *
+ * In this case create a temporary parser to receive the migration data,
+ * and schedule the close_bh to report the device as disconnected to the
+ * guest and to destroy the parser again.
*/
if (dev->parser == NULL) {
- ERROR("get_parser called with closed chardev, failing migration\n");
- return -1;
+ WARNING("usb-redir connection broken during migration\n");
+ usbredir_create_parser(dev);
+ qemu_bh_schedule(dev->chardev_close_bh);
}
data = g_malloc(len);
--
1.7.1
^ permalink raw reply related [flat|nested] 11+ messages in thread* [Qemu-devel] [PATCH 3/3] uhci: Raise interrupt when requested even for non active tds
2012-10-11 11:40 [Qemu-devel] [PULL 0/3] usb patch queue Gerd Hoffmann
2012-10-11 11:40 ` [Qemu-devel] [PATCH 1/3] usb-redir: Change usbredir_open_chardev into usbredir_create_parser Gerd Hoffmann
2012-10-11 11:40 ` [Qemu-devel] [PATCH 2/3] usb-redir: Don't make migration fail in none seamless case Gerd Hoffmann
@ 2012-10-11 11:40 ` Gerd Hoffmann
2012-10-12 16:17 ` [Qemu-devel] [PULL 0/3] usb patch queue Anthony Liguori
3 siblings, 0 replies; 11+ messages in thread
From: Gerd Hoffmann @ 2012-10-11 11:40 UTC (permalink / raw)
To: qemu-devel; +Cc: Hans de Goede, Gerd Hoffmann
From: Hans de Goede <hdegoede@redhat.com>
According to the spec we must raise an interrupt when one is requested
even for non active tds.
Linux depends on this, for bulk transfers it runs an inactivity timer
to work around a bug in early uhci revisions, when we take longer then
200 ms to process a packet, this timer goes of, and as part of the
handling Linux then unlinks the qh, and relinks it after the frindex
has increased by atleast 1, the problem is Linux only checks for the
frindex increases on an interrupt, and we don't send that, causing
the qh to go inactive for more then 32 frames, at which point we
consider the packet cancelled.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
hw/usb/hcd-uhci.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/hw/usb/hcd-uhci.c b/hw/usb/hcd-uhci.c
index cdc8bc3..c2f08e3 100644
--- a/hw/usb/hcd-uhci.c
+++ b/hw/usb/hcd-uhci.c
@@ -826,8 +826,16 @@ static int uhci_handle_td(UHCIState *s, uint32_t addr, UHCI_TD *td,
USBEndpoint *ep;
/* Is active ? */
- if (!(td->ctrl & TD_CTRL_ACTIVE))
+ if (!(td->ctrl & TD_CTRL_ACTIVE)) {
+ /*
+ * ehci11d spec page 22: "Even if the Active bit in the TD is already
+ * cleared when the TD is fetched ... an IOC interrupt is generated"
+ */
+ if (td->ctrl & TD_CTRL_IOC) {
+ *int_mask |= 0x01;
+ }
return TD_RESULT_NEXT_QH;
+ }
async = uhci_async_find_td(s, addr, td);
if (async) {
--
1.7.1
^ permalink raw reply related [flat|nested] 11+ messages in thread* Re: [Qemu-devel] [PULL 0/3] usb patch queue
2012-10-11 11:40 [Qemu-devel] [PULL 0/3] usb patch queue Gerd Hoffmann
` (2 preceding siblings ...)
2012-10-11 11:40 ` [Qemu-devel] [PATCH 3/3] uhci: Raise interrupt when requested even for non active tds Gerd Hoffmann
@ 2012-10-12 16:17 ` Anthony Liguori
3 siblings, 0 replies; 11+ messages in thread
From: Anthony Liguori @ 2012-10-12 16:17 UTC (permalink / raw)
To: Gerd Hoffmann, qemu-devel
Gerd Hoffmann <kraxel@redhat.com> writes:
> Hi,
>
> Pretty small this time with just a few bugfixes.
>
> please pull,
> Gerd
>
Pulled. Thanks.
Regards,
Anthony Liguori
> The following changes since commit b4ae3cfa57b8c1bdbbd7b7d420971e9171203ade:
>
> ssi: Add slave autoconnect helper (2012-10-10 11:13:32 +1000)
>
> are available in the git repository at:
> git://git.kraxel.org/qemu usb.67
>
> Hans de Goede (3):
> usb-redir: Change usbredir_open_chardev into usbredir_create_parser
> usb-redir: Don't make migration fail in none seamless case
> uhci: Raise interrupt when requested even for non active tds
>
> hw/usb/hcd-uhci.c | 10 +++++++++-
> hw/usb/redirect.c | 24 ++++++++++++++----------
> 2 files changed, 23 insertions(+), 11 deletions(-)
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Qemu-devel] [PULL 0/3] usb patch queue
@ 2015-10-20 7:25 Gerd Hoffmann
2015-10-20 10:45 ` Peter Maydell
0 siblings, 1 reply; 11+ messages in thread
From: Gerd Hoffmann @ 2015-10-20 7:25 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann
Hi,
Here is the usb patch queue with some small tweaks.
please pull,
Gerd
The following changes since commit 26c7be842637ee65a79cd77f96a99c23ddcd90ad:
Merge remote-tracking branch 'remotes/sstabellini/tags/2015-10-19-tag' into staging (2015-10-19 12:13:27 +0100)
are available in the git repository at:
git://git.kraxel.org/qemu tags/pull-usb-20151020-1
for you to fetch changes up to 37bc43f7fbfb38003550b327002e59d21b80a3e4:
usb-audio: increate default buffer size (2015-10-20 09:15:23 +0200)
----------------------------------------------------------------
usb: misc small tweaks.
----------------------------------------------------------------
Gerd Hoffmann (3):
usb-host: add wakeup call for iso xfers
usb: print device id in "info usb" monitor command
usb-audio: increate default buffer size
hw/usb/bus.c | 9 ++++++---
hw/usb/dev-audio.c | 2 +-
hw/usb/host-libusb.c | 1 +
3 files changed, 8 insertions(+), 4 deletions(-)
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: [Qemu-devel] [PULL 0/3] usb patch queue
2015-10-20 7:25 Gerd Hoffmann
@ 2015-10-20 10:45 ` Peter Maydell
0 siblings, 0 replies; 11+ messages in thread
From: Peter Maydell @ 2015-10-20 10:45 UTC (permalink / raw)
To: Gerd Hoffmann; +Cc: QEMU Developers
On 20 October 2015 at 08:25, Gerd Hoffmann <kraxel@redhat.com> wrote:
> Hi,
>
> Here is the usb patch queue with some small tweaks.
>
> please pull,
> Gerd
>
> The following changes since commit 26c7be842637ee65a79cd77f96a99c23ddcd90ad:
>
> Merge remote-tracking branch 'remotes/sstabellini/tags/2015-10-19-tag' into staging (2015-10-19 12:13:27 +0100)
>
> are available in the git repository at:
>
>
> git://git.kraxel.org/qemu tags/pull-usb-20151020-1
>
> for you to fetch changes up to 37bc43f7fbfb38003550b327002e59d21b80a3e4:
>
> usb-audio: increate default buffer size (2015-10-20 09:15:23 +0200)
>
> ----------------------------------------------------------------
> usb: misc small tweaks.
Applied, thanks.
-- PMM
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Qemu-devel] [PULL 0/3] usb patch queue
@ 2016-05-11 11:19 Gerd Hoffmann
2016-05-12 14:06 ` Peter Maydell
0 siblings, 1 reply; 11+ messages in thread
From: Gerd Hoffmann @ 2016-05-11 11:19 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann
Hi,
Three fixes accumulated during the freeze.
please pull,
Gerd
The following changes since commit 860a3b34854d8abe9af9f1eb584691de926ce897:
Update version for v2.6.0-rc5 release (2016-05-09 14:08:12 +0100)
are available in the git repository at:
git://git.kraxel.org/qemu tags/pull-usb-20160511-1
for you to fetch changes up to a277c3e094d5e9f653ccc861f59e07c94c7fe6c7:
usb: Support compilation without poll.h (2016-05-11 10:37:39 +0200)
----------------------------------------------------------------
usb: misc fixes
----------------------------------------------------------------
Isaac Lozano (1):
usb-mtp: fix usb_mtp_get_device_info so that libmtp on the guest doesn't complain
Roman Kagan (1):
usb:xhci: no DMA on HC reset
Stefan Weil (1):
usb: Support compilation without poll.h
hw/usb/dev-mtp.c | 4 ++--
hw/usb/hcd-xhci.c | 5 ++++-
hw/usb/host-libusb.c | 13 ++++++++++++-
3 files changed, 18 insertions(+), 4 deletions(-)
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: [Qemu-devel] [PULL 0/3] usb patch queue
2016-05-11 11:19 Gerd Hoffmann
@ 2016-05-12 14:06 ` Peter Maydell
0 siblings, 0 replies; 11+ messages in thread
From: Peter Maydell @ 2016-05-12 14:06 UTC (permalink / raw)
To: Gerd Hoffmann; +Cc: QEMU Developers
On 11 May 2016 at 12:19, Gerd Hoffmann <kraxel@redhat.com> wrote:
> Hi,
>
> Three fixes accumulated during the freeze.
>
> please pull,
> Gerd
>
> The following changes since commit 860a3b34854d8abe9af9f1eb584691de926ce897:
>
> Update version for v2.6.0-rc5 release (2016-05-09 14:08:12 +0100)
>
> are available in the git repository at:
>
> git://git.kraxel.org/qemu tags/pull-usb-20160511-1
>
> for you to fetch changes up to a277c3e094d5e9f653ccc861f59e07c94c7fe6c7:
>
> usb: Support compilation without poll.h (2016-05-11 10:37:39 +0200)
>
> ----------------------------------------------------------------
> usb: misc fixes
>
> ----------------------------------------------------------------
> Isaac Lozano (1):
> usb-mtp: fix usb_mtp_get_device_info so that libmtp on the guest doesn't complain
>
> Roman Kagan (1):
> usb:xhci: no DMA on HC reset
>
> Stefan Weil (1):
> usb: Support compilation without poll.h
Applied, thanks.
-- PMM
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Qemu-devel] [PULL 0/3] usb patch queue
@ 2017-02-23 15:40 Gerd Hoffmann
2017-02-24 13:55 ` Peter Maydell
0 siblings, 1 reply; 11+ messages in thread
From: Gerd Hoffmann @ 2017-02-23 15:40 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann
Hi,
usb patch queue, with cleanups and a ohci fix.
please pull,
Gerd
The following changes since commit 796b288f7be875045670f963ce99991b3c8e96ac:
Merge remote-tracking branch 'remotes/cody/tags/block-pull-request' into staging (2017-02-21 15:48:22 +0000)
are available in the git repository at:
git://git.kraxel.org/qemu tags/pull-usb-20170223-1
for you to fetch changes up to 4f72b8d2a6f5777fa1af2cf5184843e4cb06f182:
xhci: properties cleanup (2017-02-23 16:18:03 +0100)
----------------------------------------------------------------
usb: ohci bugfix, switch core to unrealize, xhci property cleanup
----------------------------------------------------------------
Gerd Hoffmann (1):
xhci: properties cleanup
Li Qiang (1):
usb: ohci: fix error return code in servicing td
Marc-André Lureau (1):
usb: replace handle_destroy with unrealize
hw/usb/bus.c | 9 +++++----
hw/usb/dev-audio.c | 4 ++--
hw/usb/dev-bluetooth.c | 4 ++--
hw/usb/dev-hid.c | 4 ++--
hw/usb/dev-hub.c | 4 ++--
hw/usb/dev-network.c | 4 ++--
hw/usb/dev-smartcard-reader.c | 4 ++--
hw/usb/dev-uas.c | 4 ++--
hw/usb/dev-wacom.c | 4 ++--
hw/usb/hcd-ohci.c | 2 +-
hw/usb/hcd-xhci.c | 29 ++++++++++++++++++++++++++---
hw/usb/host-libusb.c | 4 ++--
hw/usb/redirect.c | 4 ++--
include/hw/usb.h | 5 -----
14 files changed, 52 insertions(+), 33 deletions(-)
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: [Qemu-devel] [PULL 0/3] usb patch queue
2017-02-23 15:40 Gerd Hoffmann
@ 2017-02-24 13:55 ` Peter Maydell
0 siblings, 0 replies; 11+ messages in thread
From: Peter Maydell @ 2017-02-24 13:55 UTC (permalink / raw)
To: Gerd Hoffmann; +Cc: QEMU Developers
On 23 February 2017 at 15:40, Gerd Hoffmann <kraxel@redhat.com> wrote:
> Hi,
>
> usb patch queue, with cleanups and a ohci fix.
>
> please pull,
> Gerd
>
> The following changes since commit 796b288f7be875045670f963ce99991b3c8e96ac:
>
> Merge remote-tracking branch 'remotes/cody/tags/block-pull-request' into staging (2017-02-21 15:48:22 +0000)
>
> are available in the git repository at:
>
>
> git://git.kraxel.org/qemu tags/pull-usb-20170223-1
>
> for you to fetch changes up to 4f72b8d2a6f5777fa1af2cf5184843e4cb06f182:
>
> xhci: properties cleanup (2017-02-23 16:18:03 +0100)
>
> ----------------------------------------------------------------
> usb: ohci bugfix, switch core to unrealize, xhci property cleanup
>
> ----------------------------------------------------------------
> Gerd Hoffmann (1):
> xhci: properties cleanup
>
> Li Qiang (1):
> usb: ohci: fix error return code in servicing td
>
> Marc-André Lureau (1):
> usb: replace handle_destroy with unrealize
Applied, thanks.
-- PMM
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2017-02-24 13:55 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-11 11:40 [Qemu-devel] [PULL 0/3] usb patch queue Gerd Hoffmann
2012-10-11 11:40 ` [Qemu-devel] [PATCH 1/3] usb-redir: Change usbredir_open_chardev into usbredir_create_parser Gerd Hoffmann
2012-10-11 11:40 ` [Qemu-devel] [PATCH 2/3] usb-redir: Don't make migration fail in none seamless case Gerd Hoffmann
2012-10-11 11:40 ` [Qemu-devel] [PATCH 3/3] uhci: Raise interrupt when requested even for non active tds Gerd Hoffmann
2012-10-12 16:17 ` [Qemu-devel] [PULL 0/3] usb patch queue Anthony Liguori
-- strict thread matches above, loose matches on Subject: below --
2015-10-20 7:25 Gerd Hoffmann
2015-10-20 10:45 ` Peter Maydell
2016-05-11 11:19 Gerd Hoffmann
2016-05-12 14:06 ` Peter Maydell
2017-02-23 15:40 Gerd Hoffmann
2017-02-24 13:55 ` Peter Maydell
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.