]> git.proxmox.com Git - mirror_qemu.git/commitdiff
uas: fix super speed bMaxPacketSize0
authorGerd Hoffmann <kraxel@redhat.com>
Fri, 17 Jan 2020 07:37:16 +0000 (08:37 +0100)
committerGerd Hoffmann <kraxel@redhat.com>
Wed, 12 Feb 2020 16:20:41 +0000 (17:20 +0100)
For usb2 bMaxPacketSize0 is "n", for usb3 it is "1 << n",
so it must be 9 not 64 ...

rom "Universal Serial Bus 3.1 Specification":

   If the device is operating at Gen X speed, the bMaxPacketSize0
   field shall be set to 09H indicating a 512-byte maximum packet.
   An Enhanced SuperSpeed device shall not support any other maximum
   packet sizes for the default control pipe (endpoint 0) control
   endpoint.

We now announce a 512-byte maximum packet.

Fixes: 89a453d4a5c ("uas-uas: usb3 streams")
Reported-by: Benjamin David Lunt <fys@fysnet.net>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 20200117073716.31335-1-kraxel@redhat.com

hw/usb/dev-uas.c

index 9825ec37d09c3f6015558a182f3e33f16b77555d..11a8684cc2ab9efe4fc11e59b4513833a9822963 100644 (file)
@@ -303,7 +303,7 @@ static const USBDescDevice desc_device_high = {
 
 static const USBDescDevice desc_device_super = {
     .bcdUSB                        = 0x0300,
-    .bMaxPacketSize0               = 64,
+    .bMaxPacketSize0               = 9,
     .bNumConfigurations            = 1,
     .confs = (USBDescConfig[]) {
         {