diff options
author | 2018-04-27 14:17:52 +0000 | |
---|---|---|
committer | 2018-04-27 14:17:52 +0000 | |
commit | 00356a2d386cff6941d84e143098ff67a4cd40b5 (patch) | |
tree | e333a0b8ac13186ab78b51f4d6abb694c77917cf | |
parent | Fix typo in binary-float example in comment (diff) | |
download | wireguard-openbsd-00356a2d386cff6941d84e143098ff67a4cd40b5.tar.xz wireguard-openbsd-00356a2d386cff6941d84e143098ff67a4cd40b5.zip |
Introduce an helper function to extract endpoint's max burst value.
Use this helper to calculate the Transfer Burst Count (TBC) and Transfer
Last Burst Packet Count (TLBPC) required for isochronous support.
Note that SS companion descriptors are still not read.
While here print the ETE and IST values in debug mode.
-rw-r--r-- | sys/dev/usb/xhcireg.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/dev/usb/xhcireg.h b/sys/dev/usb/xhcireg.h index 94662cce902..5b60d02d5a9 100644 --- a/sys/dev/usb/xhcireg.h +++ b/sys/dev/usb/xhcireg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: xhcireg.h,v 1.12 2017/09/08 10:25:19 stsp Exp $ */ +/* $OpenBSD: xhcireg.h,v 1.13 2018/04/27 14:17:52 mpi Exp $ */ /*- * Copyright (c) 2014 Martin Pieuchot. All rights reserved. @@ -71,10 +71,11 @@ #define XHCI_HCS1_N_PORTS(x) (((x) >> 24) & 0xff) #define XHCI_HCSPARAMS2 0x08 /* RO structual parameters 2 */ -#define XHCI_HCS2_IST(x) ((x) & 0xF) +#define XHCI_HCS2_IST(x) ((x) & 0xf) #define XHCI_HCS2_ERST_MAX(x) (((x) >> 4) & 0xf) -#define XHCI_HCS2_SPR(x) (((x) >> 24) & 0x1) -#define XHCI_HCS2_SPB_MAX(x) (((x) >> 27) & 0x7f) +#define XHCI_HCS2_ETE(x) (((x) >> 8) & 0x1) +#define XHCI_HCS2_SPR(x) (((x) >> 26) & 0x1) +#define XHCI_HCS2_SPB_MAX(x) ((((x) >> 16) & 0x3e0) | (((x) >> 27) & 0x1f)) #define XHCI_HCSPARAMS3 0x0c /* RO structual parameters 3 */ #define XHCI_HCS3_U1_DEL(x) ((x) & 0xff) |