diff --git a/drivers/nvme/nvme.asm b/drivers/nvme/nvme.asm index c385ea0..ec84093 100644 --- a/drivers/nvme/nvme.asm +++ b/drivers/nvme/nvme.asm @@ -778,26 +778,29 @@ proc nvme_init stdcall, pci:dword cmp ebx, (LAST_QUEUE_ID + 1) * sizeof.NVM_QUEUE_ENTRY jne .init_queues - ; Configure Admin Submission/Completion Queue Base Address + ; Configure Admin Completion Queue Base Address mov esi, [pci] mov esi, dword [esi + pcidev.io_addr] - mov eax, dword [edi + NVM_QUEUE_ENTRY.sq_ptr] - invoke GetPhysAddr - push esi - mov esi, [pci] - DEBUGF DBG_INFO, "nvme%u: Admin submission queue base address: 0x%x\n", [esi + pcidev.num], eax - pop esi - mov dword [esi + NVME_MMIO.ASQ], eax - ;mov dword [esi + NVME_MMIO.ASQ + 4], 0 - mov eax, dword [edi + NVM_QUEUE_ENTRY.cq_ptr] invoke GetPhysAddr - push esi - mov esi, [pci] - DEBUGF DBG_INFO, "nvme%u: Admin completion queue base address: 0x%x\n", [esi + pcidev.num], eax - pop esi mov dword [esi + NVME_MMIO.ACQ], eax - ;mov dword [esi + NVME_MMIO.ACQ + 4], 0 + if __DEBUG__ + push esi + mov esi, [pci] + DEBUGF DBG_INFO, "nvme%u: Admin completion queue base address: 0x%x\n", [esi + pcidev.num], eax + pop esi + end if + + ; Configure Admin Submission Queue Base Address + mov eax, dword [edi + NVM_QUEUE_ENTRY.sq_ptr] + invoke GetPhysAddr + mov dword [esi + NVME_MMIO.ASQ], eax + if __DEBUG__ + push esi + mov esi, [pci] + DEBUGF DBG_INFO, "nvme%u: Admin submission queue base address: 0x%x\n", [esi + pcidev.num], eax + pop esi + end if ; Attach interrupt handler mov esi, [pci]