2
0
mirror of https://git.missingno.dev/kolibrios-nvme-driver/ synced 2024-12-22 13:58:47 +01:00

fix: initialize NSINFO.nsid in nvme_init

This commit is contained in:
Abdur-Rahman Mansoor 2024-07-25 18:50:01 -04:00
parent 4b9fe7f4c0
commit 7c4626b5f1

View File

@ -149,7 +149,7 @@ proc add_nvme_disk stdcall, pci:dword
ret
@@:
DEBUGF DBG_INFO, "nvme%un%u: Failed to register disk\n", [esi + pcidev.num], [esi + pcidev.nsid]
DEBUGF DBG_INFO, "nvme%u: Failed to register disk\n", [esi + pcidev.num]
xor eax, eax
pop esi
ret
@ -1091,6 +1091,8 @@ proc nvme_init stdcall, pci:dword
mov al, byte [edi + IDENTN.nsfeat]
mov byte [ebx + NSINFO.features], al
;DEBUGF DBG_INFO, "nvme%un%u: Namespace Features: 0x%x\n", [esi + pcidev.num], [esi + pcidev.nsid], al
mov eax, dword [esi + pcidev.nsid]
mov dword [ebx + NSINFO.nsid], eax
mov dword [ebx + NSINFO.pci], esi
mov eax, dword [edi + IDENTN.nsze]
mov dword [ebx + NSINFO.size], eax
@ -1377,7 +1379,7 @@ proc consume_cq_entries stdcall, pci:dword, queue:dword
mov edx, ecx
imul edx, sizeof.CQ_ENTRY
mov ax, word [edi + edx + CQ_ENTRY.status]
DEBUGF DBG_INFO, "Status: 0x%x\n", ax
;DEBUGF DBG_INFO, "Status: 0x%x\n", ax
inc cx
push ecx
stdcall cqyhdbl_write, [pci], [queue], ecx