* [PATCH v2] uas: fix super speed bMaxPacketSize0
@ 2020-01-17 7:37 Gerd Hoffmann
2020-01-17 7:44 ` Philippe Mathieu-Daudé
2020-01-17 20:05 ` fys
0 siblings, 2 replies; 3+ messages in thread
From: Gerd Hoffmann @ 2020-01-17 7:37 UTC (permalink / raw)
To: qemu-devel; +Cc: fys, Gerd Hoffmann
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>
---
hw/usb/dev-uas.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/usb/dev-uas.c b/hw/usb/dev-uas.c
index 6d6d1073b907..1bc4dd4fafb8 100644
--- a/hw/usb/dev-uas.c
+++ b/hw/usb/dev-uas.c
@@ -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[]) {
{
--
2.18.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] uas: fix super speed bMaxPacketSize0
2020-01-17 7:37 [PATCH v2] uas: fix super speed bMaxPacketSize0 Gerd Hoffmann
@ 2020-01-17 7:44 ` Philippe Mathieu-Daudé
2020-01-17 20:05 ` fys
1 sibling, 0 replies; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-01-17 7:44 UTC (permalink / raw)
To: Gerd Hoffmann, qemu-devel; +Cc: fys
On 1/17/20 8:37 AM, Gerd Hoffmann wrote:
> 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":
Oops typo "From" ;) You can obviously fix that directly on your tree, no
need for v3.
Thanks for the v2!
>
> 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>
> ---
> hw/usb/dev-uas.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/usb/dev-uas.c b/hw/usb/dev-uas.c
> index 6d6d1073b907..1bc4dd4fafb8 100644
> --- a/hw/usb/dev-uas.c
> +++ b/hw/usb/dev-uas.c
> @@ -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[]) {
> {
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH v2] uas: fix super speed bMaxPacketSize0
2020-01-17 7:37 [PATCH v2] uas: fix super speed bMaxPacketSize0 Gerd Hoffmann
2020-01-17 7:44 ` Philippe Mathieu-Daudé
@ 2020-01-17 20:05 ` fys
1 sibling, 0 replies; 3+ messages in thread
From: fys @ 2020-01-17 20:05 UTC (permalink / raw)
To: 'Gerd Hoffmann', qemu-devel
I am okay with this patch. Thank you.
Ben
> -----Original Message-----
> From: Gerd Hoffmann <kraxel@redhat.com>
> Sent: Friday, January 17, 2020 12:37 AM
> To: qemu-devel@nongnu.org
> Cc: fys@fysnet.net; Gerd Hoffmann <kraxel@redhat.com>
> Subject: [PATCH v2] uas: fix super speed bMaxPacketSize0
>
> 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>
> ---
> hw/usb/dev-uas.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/usb/dev-uas.c b/hw/usb/dev-uas.c index
> 6d6d1073b907..1bc4dd4fafb8 100644
> --- a/hw/usb/dev-uas.c
> +++ b/hw/usb/dev-uas.c
> @@ -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[]) {
> {
> --
> 2.18.1
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-01-17 20:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-17 7:37 [PATCH v2] uas: fix super speed bMaxPacketSize0 Gerd Hoffmann
2020-01-17 7:44 ` Philippe Mathieu-Daudé
2020-01-17 20:05 ` fys
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).