diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2016-09-19 10:20:18 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2016-09-19 10:20:18 +0000 |
commit | e9b9ed7ec5babf49bdf90f3f138d919873ad486c (patch) | |
tree | f286fd6d4d646b3c54580ab109c906b79468c713 | |
parent | bd71a3dc8881b693bad8330f91142b53a263cba4 (diff) |
``bMaxPacketSize'' is reported as a power of 2 for super speed devices
as per section 4.8.2.1 of xHCI specification.
Note that we never got this correctly.
Spotted by and ok jsg@
-rw-r--r-- | sys/dev/usb/usb_subr.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/dev/usb/usb_subr.c b/sys/dev/usb/usb_subr.c index 5b5a14fd119..21a98a7d2a4 100644 --- a/sys/dev/usb/usb_subr.c +++ b/sys/dev/usb/usb_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: usb_subr.c,v 1.129 2016/09/18 09:51:24 mpi Exp $ */ +/* $OpenBSD: usb_subr.c,v 1.130 2016/09/19 10:20:17 mpi Exp $ */ /* $NetBSD: usb_subr.c,v 1.103 2003/01/10 11:19:13 augustss Exp $ */ /* $FreeBSD: src/sys/dev/usb/usb_subr.c,v 1.18 1999/11/17 22:33:47 n_hibma Exp $ */ @@ -1175,8 +1175,12 @@ usbd_new_device(struct device *parent, struct usbd_bus *bus, int depth, } mps = dd->bMaxPacketSize; - if (speed == USB_SPEED_SUPER && mps == 0xff) - mps = 512; + if (speed == USB_SPEED_SUPER) { + if (mps == 0xff) + mps = 9; + /* xHCI Section 4.8.2.1 */ + mps = (1 << mps); + } if (mps != mps0) { if ((speed == USB_SPEED_LOW) || |