qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PULL 0/2] usb patch queue
@ 2012-08-07  8:59 Gerd Hoffmann
  2012-08-07 15:36 ` Anthony Liguori
  0 siblings, 1 reply; 6+ messages in thread
From: Gerd Hoffmann @ 2012-08-07  8:59 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann

  Hi,

This is the usb patch queue, pretty small this time,
carrying a little fix for usb-storage.

please pull,
  Gerd

Gerd Hoffmann (2):
  usb-storage: improve debug logging
  usb-storage: fix SYNCHRONIZE_CACHE

 hw/usb/dev-storage.c |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

The following changes since commit 0b8db8fe15d17a529a5ea90614c11e9f031dfee8:

  slirp: fix build on mingw32 (2012-08-06 19:31:55 -0500)

are available in the git repository at:
  git://git.kraxel.org/qemu usb.58

Gerd Hoffmann (2):
      usb-storage: improve debug logging
      usb-storage: fix SYNCHRONIZE_CACHE

 hw/usb/dev-storage.c |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PULL 0/2] usb patch queue
  2012-08-07  8:59 Gerd Hoffmann
@ 2012-08-07 15:36 ` Anthony Liguori
  0 siblings, 0 replies; 6+ messages in thread
From: Anthony Liguori @ 2012-08-07 15:36 UTC (permalink / raw)
  To: Gerd Hoffmann, qemu-devel

Gerd Hoffmann <kraxel@redhat.com> writes:

>   Hi,
>
> This is the usb patch queue, pretty small this time,
> carrying a little fix for usb-storage.
>
> please pull,
>   Gerd

Pulled. Thanks.

Regards,

Anthony Liguori

>
> Gerd Hoffmann (2):
>   usb-storage: improve debug logging
>   usb-storage: fix SYNCHRONIZE_CACHE
>
>  hw/usb/dev-storage.c |   11 +++++++++--
>  1 files changed, 9 insertions(+), 2 deletions(-)
>
> The following changes since commit 0b8db8fe15d17a529a5ea90614c11e9f031dfee8:
>
>   slirp: fix build on mingw32 (2012-08-06 19:31:55 -0500)
>
> are available in the git repository at:
>   git://git.kraxel.org/qemu usb.58
>
> Gerd Hoffmann (2):
>       usb-storage: improve debug logging
>       usb-storage: fix SYNCHRONIZE_CACHE
>
>  hw/usb/dev-storage.c |   11 +++++++++--
>  1 files changed, 9 insertions(+), 2 deletions(-)

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Qemu-devel] [PULL 0/2] usb patch queue
@ 2015-11-03 11:15 Gerd Hoffmann
  2015-11-03 11:15 ` [Qemu-devel] [PULL 1/2] ehci: clear suspend bit on detach Gerd Hoffmann
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Gerd Hoffmann @ 2015-11-03 11:15 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann

  Hi,

Here comes the usb patch queue, with two little bugfixes.

please pull,
   Gerd

The following changes since commit 3d861a01093f8eedfac9889746ccafcfd32039b7:

  Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2015-11-02' into staging (2015-11-02 11:11:39 +0000)

are available in the git repository at:


  git://git.kraxel.org/qemu tags/pull-usb-20151103-1

for you to fetch changes up to a9be4e7c48c4892c836bda1be4d550bb1a6732bd:

  usb-host: fix usb3ep0quirk test (2015-11-03 11:56:23 +0100)

----------------------------------------------------------------
usb: two bugfixes for ehci & usb-host.

----------------------------------------------------------------
Gerd Hoffmann (2):
      ehci: clear suspend bit on detach
      usb-host: fix usb3ep0quirk test

 hw/usb/hcd-ehci.c    | 2 +-
 hw/usb/host-libusb.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Qemu-devel] [PULL 1/2] ehci: clear suspend bit on detach
  2015-11-03 11:15 [Qemu-devel] [PULL 0/2] usb patch queue Gerd Hoffmann
@ 2015-11-03 11:15 ` Gerd Hoffmann
  2015-11-03 11:15 ` [Qemu-devel] [PULL 2/2] usb-host: fix usb3ep0quirk test Gerd Hoffmann
  2015-11-03 14:53 ` [Qemu-devel] [PULL 0/2] usb patch queue Peter Maydell
  2 siblings, 0 replies; 6+ messages in thread
From: Gerd Hoffmann @ 2015-11-03 11:15 UTC (permalink / raw)
  To: qemu-devel; +Cc: Hans de Goede, Gerd Hoffmann

When a device is detached, clear the suspend bit (PORTSC_SUSPEND)
in the port status register.

The specs are not *that* clear what is supposed to happen in case
a suspended device is unplugged.  But the enable bit (PORTSC_PED)
is cleared, and the specs mention setting suspend with enable being
unset is undefined behavior.  So clearing them both looks reasonable,
and it actually fixes the reported bug.

https://bugzilla.redhat.com/show_bug.cgi?id=1268879

Cc: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Message-id: 1445413462-18004-1-git-send-email-kraxel@redhat.com
---
 hw/usb/hcd-ehci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c
index 64a54c6..4e2161b 100644
--- a/hw/usb/hcd-ehci.c
+++ b/hw/usb/hcd-ehci.c
@@ -726,7 +726,7 @@ static void ehci_detach(USBPort *port)
     ehci_queues_rip_device(s, port->dev, 0);
     ehci_queues_rip_device(s, port->dev, 1);
 
-    *portsc &= ~(PORTSC_CONNECT|PORTSC_PED);
+    *portsc &= ~(PORTSC_CONNECT|PORTSC_PED|PORTSC_SUSPEND);
     *portsc |= PORTSC_CSC;
 
     ehci_raise_irq(s, USBSTS_PCD);
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Qemu-devel] [PULL 2/2] usb-host: fix usb3ep0quirk test
  2015-11-03 11:15 [Qemu-devel] [PULL 0/2] usb patch queue Gerd Hoffmann
  2015-11-03 11:15 ` [Qemu-devel] [PULL 1/2] ehci: clear suspend bit on detach Gerd Hoffmann
@ 2015-11-03 11:15 ` Gerd Hoffmann
  2015-11-03 14:53 ` [Qemu-devel] [PULL 0/2] usb patch queue Peter Maydell
  2 siblings, 0 replies; 6+ messages in thread
From: Gerd Hoffmann @ 2015-11-03 11:15 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann

usb->speed is the usb speed the device is actually running on in the
qemu emulation (i.e. from the guests point of view).  So when plugging
usb3 devices into ehci hostadapter this is HIGH not SUPER.

To figure whenever the host talks to the device with superspeed we
have to check speedmask instead and see whenever the superspeed bit
is set there.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 1445603230-11840-1-git-send-email-kraxel@redhat.com
---
 hw/usb/host-libusb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c
index 7695a97..3f8e540 100644
--- a/hw/usb/host-libusb.c
+++ b/hw/usb/host-libusb.c
@@ -1240,7 +1240,7 @@ static void usb_host_handle_control(USBDevice *udev, USBPacket *p,
 
     /* Fix up USB-3 ep0 maxpacket size to allow superspeed connected devices
      * to work redirected to a not superspeed capable hcd */
-    if (udev->speed == USB_SPEED_SUPER &&
+    if ((udev->speedmask & USB_SPEED_MASK_SUPER) &&
         !(udev->port->speedmask & USB_SPEED_MASK_SUPER) &&
         request == 0x8006 && value == 0x100 && index == 0) {
         r->usb3ep0quirk = true;
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PULL 0/2] usb patch queue
  2015-11-03 11:15 [Qemu-devel] [PULL 0/2] usb patch queue Gerd Hoffmann
  2015-11-03 11:15 ` [Qemu-devel] [PULL 1/2] ehci: clear suspend bit on detach Gerd Hoffmann
  2015-11-03 11:15 ` [Qemu-devel] [PULL 2/2] usb-host: fix usb3ep0quirk test Gerd Hoffmann
@ 2015-11-03 14:53 ` Peter Maydell
  2 siblings, 0 replies; 6+ messages in thread
From: Peter Maydell @ 2015-11-03 14:53 UTC (permalink / raw)
  To: Gerd Hoffmann; +Cc: QEMU Developers

On 3 November 2015 at 11:15, Gerd Hoffmann <kraxel@redhat.com> wrote:
>   Hi,
>
> Here comes the usb patch queue, with two little bugfixes.
>
> please pull,
>    Gerd
>
> The following changes since commit 3d861a01093f8eedfac9889746ccafcfd32039b7:
>
>   Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2015-11-02' into staging (2015-11-02 11:11:39 +0000)
>
> are available in the git repository at:
>
>
>   git://git.kraxel.org/qemu tags/pull-usb-20151103-1
>
> for you to fetch changes up to a9be4e7c48c4892c836bda1be4d550bb1a6732bd:
>
>   usb-host: fix usb3ep0quirk test (2015-11-03 11:56:23 +0100)
>
> ----------------------------------------------------------------
> usb: two bugfixes for ehci & usb-host.
>

Applied, thanks.

-- PMM

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-11-03 14:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-03 11:15 [Qemu-devel] [PULL 0/2] usb patch queue Gerd Hoffmann
2015-11-03 11:15 ` [Qemu-devel] [PULL 1/2] ehci: clear suspend bit on detach Gerd Hoffmann
2015-11-03 11:15 ` [Qemu-devel] [PULL 2/2] usb-host: fix usb3ep0quirk test Gerd Hoffmann
2015-11-03 14:53 ` [Qemu-devel] [PULL 0/2] usb patch queue Peter Maydell
  -- strict thread matches above, loose matches on Subject: below --
2012-08-07  8:59 Gerd Hoffmann
2012-08-07 15:36 ` Anthony Liguori

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).