aboutsummaryrefslogtreecommitdiff
path: root/sys/include/dev/usb/xhcivar.h
diff options
context:
space:
mode:
authorIan Moffett <industrial.reformer@gmail.com>2024-04-03 20:09:19 -0400
committerIan Moffett <ian@osmora.org>2024-04-03 20:10:51 -0400
commitcf7bfde63fca0d904447a82186018ca5cc6498c6 (patch)
tree4013e3bbdb5383b16bdd77def7885637b422fad3 /sys/include/dev/usb/xhcivar.h
parentf0275f1b2364648f26bbfcd58ab6a214d4ab1827 (diff)
kernel: usb: Fix command ring TRB handling
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/include/dev/usb/xhcivar.h')
-rw-r--r--sys/include/dev/usb/xhcivar.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/sys/include/dev/usb/xhcivar.h b/sys/include/dev/usb/xhcivar.h
index 2667e2c..06ed3ee 100644
--- a/sys/include/dev/usb/xhcivar.h
+++ b/sys/include/dev/usb/xhcivar.h
@@ -57,6 +57,12 @@ struct xhci_nop_trb {
struct xhci_trb {
union {
struct xhci_nop_trb nop;
+ struct {
+ uint32_t dword0;
+ uint32_t dword1;
+ uint32_t dword2;
+ uint32_t dword3;
+ };
};
};
@@ -92,10 +98,11 @@ struct xhci_hc {
size_t protocnt;
uintptr_t *dcbaap;
uint8_t cycle : 1;
- uint16_t cmd_ptr; /* Command ring enqueue ptr */
+ uint16_t cmd_ptr; /* Command ring index */
+ uint16_t cmd_count; /* Command ring entry count */
+ uint32_t *cmd_ring;
struct xhci_opregs *opregs;
struct xhci_proto protos[XHCI_MAX_PROTOS];
- struct xhci_trb *cmd_ring;
struct xhci_evring_segment *evring_seg;
};