mirror of
https://git.missingno.dev/kolibrios-nvme-driver/
synced 2024-11-14 03:56:09 +01:00
style: remove comments and unused code
This commit is contained in:
parent
3c3bd6bd6f
commit
29f04eb37b
@ -652,16 +652,6 @@ proc nvme_init stdcall, pci:dword
|
||||
|
||||
.end_cap_parse:
|
||||
mov edi, dword [esi + pcidev.io_addr]
|
||||
if 0
|
||||
mov eax, dword [edi + NVME_MMIO.CAP]
|
||||
DEBUGF DBG_INFO, "(NVMe) CAP (0-31): 0x%x\n", eax
|
||||
mov eax, dword [edi + NVME_MMIO.CAP + 4]
|
||||
DEBUGF DBG_INFO, "(NVMe) CAP (32-63): 0x%x\n", eax
|
||||
mov eax, dword [edi + NVME_MMIO.CC]
|
||||
DEBUGF DBG_INFO, "(NVMe) CC: 0x%x\n", eax
|
||||
mov eax, dword [edi + NVME_MMIO.CSTS]
|
||||
DEBUGF DBG_INFO, "(NVMe) CSTS: 0x%x\n", eax
|
||||
end if
|
||||
|
||||
; check maximum queue entries supported
|
||||
mov eax, dword [edi + NVME_MMIO.CAP]
|
||||
@ -675,25 +665,19 @@ proc nvme_init stdcall, pci:dword
|
||||
DEBUGF DBG_INFO, "nvme%u: Contiguous queues required: %u\n", [esi + pcidev.num], al
|
||||
end if
|
||||
|
||||
; For some reason, bit 7 (No I/O command set supported) is also set to 1 despite bit 0 (NVM command set)
|
||||
; being set to 1.. so I am not sure if bit 7 should be checked at all.. investigate later.
|
||||
; Check if NVM command set is supported
|
||||
mov eax, dword [edi + NVME_MMIO.CAP + 4]
|
||||
test eax, CAP_CSS_NVM_CMDSET
|
||||
jz .exit_fail
|
||||
DEBUGF DBG_INFO, "nvme%u: OK... NVM command set supported\n", [esi + pcidev.num]
|
||||
|
||||
; Reset controller before we configure it
|
||||
test dword [edi + NVME_MMIO.CC], CC_EN
|
||||
jz @f
|
||||
stdcall nvme_disable_ctrl, esi
|
||||
|
||||
@@:
|
||||
mov eax, dword [edi + NVME_MMIO.CAP + 4]
|
||||
and eax, CAP_MPSMIN
|
||||
shr eax, 16
|
||||
cmp eax, NVM_MPS
|
||||
mov edx, eax
|
||||
and edx, CAP_MPSMIN
|
||||
shr edx, 16
|
||||
cmp edx, NVM_MPS
|
||||
ja .exit_fail
|
||||
mov eax, dword [edi + NVME_MMIO.CAP + 4]
|
||||
and eax, CAP_MPSMAX
|
||||
shr eax, 20
|
||||
cmp eax, NVM_MPS
|
||||
|
Loading…
Reference in New Issue
Block a user