summaryrefslogtreecommitdiff
path: root/sys/dev/usb/xhcivar.h
diff options
context:
space:
mode:
authorMarcus Glocker <mglocker@cvs.openbsd.org>2020-12-24 14:11:39 +0000
committerMarcus Glocker <mglocker@cvs.openbsd.org>2020-12-24 14:11:39 +0000
commitf9799f5bcfdecb0bb8b977e1fb6d611ca0146472 (patch)
tree32d2aba42898f5e0619b0d5a1b0361f5468839e7 /sys/dev/usb/xhcivar.h
parent2d4daa46fbbbee2808b6881d3a96f45eb2249f26 (diff)
Do proper accounting of zero length TDs. Currently a specific number
of zero length TDs can cause our free TRBs to run out, causing xhci(4) to return USBD_NOMEM to the USB stack. The issue was reported by Jonathon Fletcher <jonathon.fletcher () gmail ! com> -- Thanks! Reviewed/suggestions by patrick@. ok mpi@
Diffstat (limited to 'sys/dev/usb/xhcivar.h')
-rw-r--r--sys/dev/usb/xhcivar.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/usb/xhcivar.h b/sys/dev/usb/xhcivar.h
index dc2e86da335..533032ae9c7 100644
--- a/sys/dev/usb/xhcivar.h
+++ b/sys/dev/usb/xhcivar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: xhcivar.h,v 1.11 2019/10/06 17:30:00 mpi Exp $ */
+/* $OpenBSD: xhcivar.h,v 1.12 2020/12/24 14:11:38 mglocker Exp $ */
/*
* Copyright (c) 2014 Martin Pieuchot
@@ -40,6 +40,7 @@ struct xhci_xfer {
struct usbd_xfer xfer;
int index; /* Index of the last TRB */
size_t ntrb; /* Number of associated TRBs */
+ size_t zerotd; /* Is zero len TD required? */
};
struct xhci_ring {