From 1bdabe693f38b0a5a36f1506323a9c92b32cffd5 Mon Sep 17 00:00:00 2001 From: Bananymous Date: Fri, 22 Nov 2024 22:18:09 +0200 Subject: [PATCH] Kernel: Preserve RsvdP bits in xHCI controller initialization --- kernel/kernel/USB/XHCI/Controller.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/kernel/USB/XHCI/Controller.cpp b/kernel/kernel/USB/XHCI/Controller.cpp index cf3ac24a..032ea543 100644 --- a/kernel/kernel/USB/XHCI/Controller.cpp +++ b/kernel/kernel/USB/XHCI/Controller.cpp @@ -230,8 +230,8 @@ namespace Kernel event_ring_table_entry.rsz = m_event_ring_trb_count; auto& primary_interrupter = runtime.irs[0]; - primary_interrupter.erstsz = 1; - primary_interrupter.erdp = m_event_ring_region->paddr(); + primary_interrupter.erstsz = (primary_interrupter.erstsz & 0xFFFF0000) | 1; + primary_interrupter.erdp = m_event_ring_region->paddr() | XHCI::ERDP::EventHandlerBusy; primary_interrupter.erstba = m_event_ring_region->paddr() + event_ring_table_offset; auto& operational = operational_regs();