mirror of
https://git.missingno.dev/kolibrios-nvme-driver/
synced 2025-01-21 20:58:13 +01:00
delete I/O queues when cleanup is called
This commit is contained in:
parent
f502f3cfaa
commit
7be08b3e44
@ -1254,6 +1254,7 @@ endp
|
||||
|
||||
proc nvme_cleanup
|
||||
|
||||
DEBUGF DBG_INFO, "nvme_cleanup called\n"
|
||||
mov esi, dword [p_nvme_devices]
|
||||
test esi, esi
|
||||
jnz @f
|
||||
@ -1276,10 +1277,19 @@ proc nvme_cleanup
|
||||
.get_queue:
|
||||
add edi, sizeof.NVM_QUEUE_ENTRY
|
||||
|
||||
; TODO: Delete the I/O completion and submission queue
|
||||
; Remember, we have to free the completion queue before
|
||||
; the submission queue
|
||||
; TODO: Check if I/O completion and submission queue exist
|
||||
; before deleting?
|
||||
push ecx
|
||||
test ecx, ecx
|
||||
jz @f ; we don't want to delete the admin queue
|
||||
push ecx
|
||||
stdcall delete_io_completion_queue, esi, ecx
|
||||
pop ecx
|
||||
push ecx
|
||||
stdcall delete_io_submission_queue, esi, ecx
|
||||
pop ecx
|
||||
|
||||
@@:
|
||||
invoke KernelFree, dword [edi + NVM_QUEUE_ENTRY.cq_ptr]
|
||||
invoke KernelFree, dword [edi + NVM_QUEUE_ENTRY.sq_ptr]
|
||||
pop ecx
|
||||
|
Loading…
Reference in New Issue
Block a user