2
0
mirror of https://git.missingno.dev/kolibrios-nvme-driver/ synced 2025-01-22 05:08:16 +01:00

make sure interrupts are enabled in PCI header

This commit is contained in:
Abdur-Rahman Mansoor 2024-07-26 13:14:50 -04:00
parent 18b76f70b2
commit 3d78f22409

View File

@ -875,6 +875,13 @@ proc nvme_init stdcall, pci:dword
push ebx esi edi
mov esi, dword [pci]
; Check the PCI header to see if interrupts are disabled, if so
; we have to re-enable them
invoke PciRead16, dword [esi + pcidev.bus], dword [esi + pcidev.devfn], PCI_header00.command
and eax, not (1 shl 10)
invoke PciWrite16, dword [esi + pcidev.bus], dword [esi + pcidev.devfn], PCI_header00.command, eax
mov edi, dword [esi + pcidev.io_addr]
if 0