XHCI Use named bits in PIC command register config
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user