From 0cb86ee2ab0b76ae8612dd59127340a0e3c33ecf Mon Sep 17 00:00:00 2001 From: Abdur-Rahman Mansoor Date: Thu, 20 Jun 2024 16:29:52 -0400 Subject: [PATCH] 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. --- drivers/nvme/nvme.asm | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/nvme/nvme.asm b/drivers/nvme/nvme.asm index 9eaa91a..2aea64d 100644 --- a/drivers/nvme/nvme.asm +++ b/drivers/nvme/nvme.asm @@ -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