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

refactor(nvme_init): pass nullptr as parameter to set_features

Getting number of queues doesn't involve DPTR field in any way at all,
so no point in having it there.
This commit is contained in:
Abdur-Rahman Mansoor 2024-06-20 16:29:52 -04:00
parent 528d469ab0
commit 0cb86ee2ab

View File

@ -563,11 +563,8 @@ proc nvme_init stdcall, pci:dword
and al, 0x40 ; maximum completion queue entry size should at least be 16 bytes
jl .exit_fail
invoke GetPhysAddr, esi
mov ebx, eax
mov eax, (NVM_ASQS - 1) or ((NVM_ACQS - 1) shl 16) ; CDW11 (set the number of queues we want)
; TODO: REMOVE EBX WITH NULLPTR
stdcall set_features, [pci], ebx, FID_NUMBER_OF_QUEUES, eax
stdcall set_features, [pci], NULLPTR, FID_NUMBER_OF_QUEUES, eax
mov esi, dword [p_nvme_devices]
stdcall nvme_wait, dword [esi + pcidev.io_addr]
;stdcall nvme_cmd_wait, [pci], 0, 1