mirror of
https://git.missingno.dev/kolibrios-nvme-driver/
synced 2024-11-14 03:56:09 +01:00
fix: comment out excessive debug lines
Printing too many messages to the screen much causes KolibriOS to crash, so we have to remove them for now
This commit is contained in:
parent
603a48e351
commit
b4d3c82480
@ -179,7 +179,6 @@ proc is_active_namespace stdcall, pci:dword, nsid:dword
|
||||
@@:
|
||||
mov esi, eax
|
||||
invoke GetPhysAddr
|
||||
DEBUGF DBG_INFO, "Identify Namespace: %u\n", [nsid]
|
||||
stdcall nvme_identify, [pci], [nsid], eax, CNS_IDNS
|
||||
xor ecx, ecx
|
||||
|
||||
@ -192,16 +191,13 @@ proc is_active_namespace stdcall, pci:dword, nsid:dword
|
||||
jne @b
|
||||
|
||||
.not_active_nsid:
|
||||
DEBUGF DBG_INFO, "Not an active NSID\n"
|
||||
invoke KernelFree, esi
|
||||
pop edi esi
|
||||
xor eax, eax
|
||||
ret
|
||||
|
||||
.is_active_nsid:
|
||||
;DEBUGF DBG_INFO, "ACTIVE NSID: %u\n", [nsid]
|
||||
;cmp [nsid], 1
|
||||
;jne @b
|
||||
DEBUGF DBG_INFO, "(NVMe) Active NSID: %u\n", [nsid]
|
||||
invoke KernelFree, esi
|
||||
pop edi esi
|
||||
xor eax, eax
|
||||
@ -717,6 +713,8 @@ proc nvme_init stdcall, pci:dword
|
||||
stdcall create_io_submission_queue, [pci], eax, 1, 1
|
||||
|
||||
stdcall determine_active_nsids, [pci]
|
||||
test eax, eax
|
||||
jz .exit_fail ; No active NSIDS
|
||||
|
||||
DEBUGF DBG_INFO, "(NVMe) Successfully initialized driver!\n"
|
||||
xor eax, eax
|
||||
@ -815,7 +813,7 @@ proc cqyhdbl_write stdcall, pci:dword, y:dword, cqh:word
|
||||
lea edi, dword [edi + ecx]
|
||||
mov esi, dword [esi + pcidev.io_addr]
|
||||
mov ax, [cqh]
|
||||
DEBUGF DBG_INFO, "(NVMe) Writing to completion queue doorbell register 0x%x: %u\n", dx, ax
|
||||
;DEBUGF DBG_INFO, "(NVMe) Writing to completion queue doorbell register 0x%x: %u\n", dx, ax
|
||||
mov word [esi + edx], ax ; Write to CQyHDBL
|
||||
mov word [edi + NVM_QUEUE_ENTRY.head], ax
|
||||
pop edi esi
|
||||
@ -858,7 +856,7 @@ proc sqytdbl_write stdcall, pci:dword, y:word, cmd:dword
|
||||
shl dx, cl
|
||||
imul dx, bx
|
||||
add dx, 0x1000
|
||||
DEBUGF DBG_INFO, "(NVMe) Writing to submission queue doorbell register 0x%x: %u\n", dx, ax
|
||||
;DEBUGF DBG_INFO, "(NVMe) Writing to submission queue doorbell register 0x%x: %u\n", dx, ax
|
||||
mov esi, dword [esi + pcidev.io_addr]
|
||||
mov word [esi + edx], ax
|
||||
movzx ecx, [y]
|
||||
@ -948,6 +946,8 @@ proc is_queue_full stdcall, tail:word, head:word
|
||||
|
||||
endp
|
||||
|
||||
;proc consume_cq_entries stdcall,
|
||||
|
||||
proc irq_handler
|
||||
|
||||
push esi edi
|
||||
@ -964,7 +964,7 @@ proc irq_handler
|
||||
mov esi, dword [esi + pcidev.queue_entries]
|
||||
movzx ecx, word [esi + NVM_QUEUE_ENTRY.head]
|
||||
movzx edx, word [esi + NVM_QUEUE_ENTRY.tail]
|
||||
DEBUGF DBG_INFO, "IRQ (head): 0x%x, (tail): 0x%x\n", cx, dx
|
||||
;DEBUGF DBG_INFO, "IRQ (head): 0x%x, (tail): 0x%x\n", cx, dx
|
||||
stdcall is_queue_full, edx, ecx
|
||||
test eax, eax
|
||||
jnz .end
|
||||
@ -975,7 +975,7 @@ proc irq_handler
|
||||
mov esi, dword [esi + NVM_QUEUE_ENTRY.cq_ptr]
|
||||
mov ax, word [esi + edx + CQ_ENTRY.status]
|
||||
and ax, not CQ_PHASE_TAG ; ignore phase tag bit
|
||||
DEBUGF DBG_INFO, "(NVMe) Status: 0x%x\n", ax
|
||||
;DEBUGF DBG_INFO, "(NVMe) Status: 0x%x\n", ax
|
||||
test al, al ; check status code (0 on success)
|
||||
jz .ok
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user