summaryrefslogtreecommitdiff
path: root/sys/dev/usb
diff options
context:
space:
mode:
authorPatrick Wildt <patrick@cvs.openbsd.org>2019-03-15 23:09:24 +0000
committerPatrick Wildt <patrick@cvs.openbsd.org>2019-03-15 23:09:24 +0000
commitce47359e8bd501f5785490e68c2013ac6a117628 (patch)
tree1e62d832aad5b0016eb2519c15b2138045f32e1d /sys/dev/usb
parent6407a0ad36daae69202ef2e7ac58369a0d17e701 (diff)
The max burst size that is encoded in wMaxPacketSize is zero based,
as in: Since there's always one transfer, 0 means 1. Thus we have to add 1 (not OR) to get to the desired number. ok mglocker@ mpi@ stsp@
Diffstat (limited to 'sys/dev/usb')
-rw-r--r--sys/dev/usb/xhci.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/usb/xhci.c b/sys/dev/usb/xhci.c
index 60ea85afc98..f234c7617f1 100644
--- a/sys/dev/usb/xhci.c
+++ b/sys/dev/usb/xhci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: xhci.c,v 1.95 2019/03/12 18:13:40 patrick Exp $ */
+/* $OpenBSD: xhci.c,v 1.96 2019/03/15 23:09:23 patrick Exp $ */
/*
* Copyright (c) 2014-2015 Martin Pieuchot
@@ -1083,8 +1083,8 @@ xhci_get_txinfo(struct xhci_softc *sc, struct usbd_pipe *pipe)
/* XXX Read the companion descriptor */
}
- mep = (UE_GET_TRANS(mps) | 0x1) * UE_GET_SIZE(mps);
- atl = min(sc->sc_pagesize, mep);
+ mep = (UE_GET_TRANS(mps) + 1) * UE_GET_SIZE(mps);
+ atl = mep;
break;
case UE_BULK:
default: