diff options
author | Ian Moffett <ian@osmora.org> | 2025-08-08 22:42:56 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2025-08-08 22:42:56 -0400 |
commit | 55d02c0550b4111624c98d68ef53f0a33803cb2d (patch) | |
tree | f1707ab1fea13bc9a1b021cf0f090a21a9684458 /sys/dev | |
parent | 38c85464a7afce2f159debccc644b3f3f3af61d4 (diff) |
kernel: xhci: Fix off-by-one bug
The DCBAA has indexing that starts at zero so 1 must be added to make it
correct.
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/usb/xhci.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/usb/xhci.c b/sys/dev/usb/xhci.c index 0ccb7a0..f18e1a9 100644 --- a/sys/dev/usb/xhci.c +++ b/sys/dev/usb/xhci.c @@ -221,7 +221,7 @@ xhci_alloc_dcbaa(struct xhci_hc *hc) { size_t size; - size = sizeof(uintptr_t) * hc->maxslots; + size = sizeof(uintptr_t) * (hc->maxslots + 1); hc->dcbaap = dynalloc_memalign(size, 0x1000); __assert(hc->dcbaap != NULL); return VIRT_TO_PHYS(hc->dcbaap); |