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

chore: remove write_admin_cmd

This commit is contained in:
Abdur-Rahman Mansoor 2024-06-21 13:54:40 -04:00
parent 38b93a8240
commit a1a24073c3

View File

@ -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