From 05d03716cbb774345876b49a24d5fd2aa7920b7a Mon Sep 17 00:00:00 2001 From: kamkow1 Date: Thu, 30 Apr 2026 19:10:10 +0200 Subject: [PATCH] XHCI Use named bits in PIC command register config --- kernel/device/pci/pci_xhci.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/kernel/device/pci/pci_xhci.c b/kernel/device/pci/pci_xhci.c index 928de7f..4136b36 100644 --- a/kernel/device/pci/pci_xhci.c +++ b/kernel/device/pci/pci_xhci.c @@ -36,7 +36,10 @@ bool pci_xhci_init(struct proc* proc, struct reschedule_ctx* rctx, struct pci_in uint16_t pci_cmd = pci_read16(pci_info.bus, pci_info.slot, pci_info.func, PCI_COMMAND); - uint16_t new_cmd = (pci_cmd | (1 << 1) | (1 << 2)) & ~(1 << 10); + uint16_t new_cmd = pci_cmd; + new_cmd |= (1 << PCI_CMD_MEMSPACE); + new_cmd |= (1 << PCI_CMD_BUSMASTER); + new_cmd &= (1 << PCI_CMD_INTRDISABLE); if (pci_cmd != new_cmd) { pci_write16(pci_info.bus, pci_info.slot, pci_info.func, PCI_COMMAND, new_cmd);