From a1a24073c34bf91f362e9096897bf755ea1e54b9 Mon Sep 17 00:00:00 2001 From: Abdur-Rahman Mansoor Date: Fri, 21 Jun 2024 13:54:40 -0400 Subject: [PATCH] chore: remove `write_admin_cmd` --- drivers/nvme/nvme.asm | 31 ------------------------------- 1 file changed, 31 deletions(-) diff --git a/drivers/nvme/nvme.asm b/drivers/nvme/nvme.asm index 100e29f..06a05f8 100644 --- a/drivers/nvme/nvme.asm +++ b/drivers/nvme/nvme.asm @@ -806,37 +806,6 @@ proc sqytdbl_write stdcall, pci:dword, y:word, cmd:dword endp -proc write_admin_cmd stdcall, pci:dword, cmd:dword - - push esi edi - mov edi, [pci] - mov esi, [cmd] - mov ecx, dword [esi + SQ_ENTRY.cdw0] - shr ecx, 16 ; Get CID - imul ecx, sizeof.SQ_ENTRY - mov edi, dword [edi + pcidev.queue_entries] - mov edi, dword [edi + NVM_QUEUE_ENTRY.sq_ptr] - lea edi, [edi + ecx] - stdcall memcpy, edi, esi, sizeof.SQ_ENTRY - - mov edi, [pci] - mov esi, dword [edi + pcidev.io_addr] - mov edi, dword [edi + pcidev.queue_entries] - mov ax, word [edi + NVM_QUEUE_ENTRY.tail] - cmp ax, NVM_ASQS - jl @f - xor ax, ax - -@@: - inc ax - DEBUGF DBG_INFO, "(NVMe) Writing to Admin Submission Queue: %u\n", ax - mov word [esi + 0x1000], ax - mov word [edi + NVM_QUEUE_ENTRY.tail], ax - pop edi esi - ret - -endp - ; Calculates 2^x proc pow2 stdcall, x:byte