mirror of
https://git.missingno.dev/kolibrios-nvme-driver/
synced 2024-11-10 02:20:27 +01:00
remove CNS byte check in nvme_identify
This commit is contained in:
parent
c9e138d89f
commit
d153c63abb
@ -194,37 +194,6 @@ proc nvme_identify stdcall, pci:dword, nsid:dword, prp1:dword, cns:byte
|
||||
|
||||
LOCK_SPINLOCK
|
||||
sub esp, sizeof.SQ_ENTRY
|
||||
; It's important to check if CNS is a valid value here. In revision 1.0
|
||||
; CNS is a 1 bit field and a two bit field in revision 1.1, using invalid
|
||||
; values results in undefined behavior (see page 162 of NVMe 1.4 spec)
|
||||
if __DEBUG__
|
||||
push esi
|
||||
mov esi, [pci]
|
||||
mov esi, dword [esi + pcidev.io_addr]
|
||||
mov eax, dword [esi + NVME_MMIO.VS]
|
||||
cmp eax, VS110
|
||||
jne @f
|
||||
cmp [cns], 11b
|
||||
jbe .ok
|
||||
DEBUGF DBG_INFO, "(NVMe) FATAL ERROR: INVALID CNS VALUE ON v1.1.0 CONTROLLERS\n"
|
||||
jmp .err
|
||||
|
||||
@@:
|
||||
cmp eax, VS100
|
||||
jne .ok
|
||||
cmp [cns], 1b
|
||||
jbe .ok
|
||||
DEBUGF DBG_INFO, "(NVMe) FATAL ERROR: INVALID CNS VALUE ON v1.0.0 CONTROLLERS\n"
|
||||
jmp .err
|
||||
|
||||
.err:
|
||||
jmp @b
|
||||
|
||||
.ok:
|
||||
pop esi
|
||||
|
||||
end if
|
||||
|
||||
stdcall memsetdz, esp, sizeof.SQ_ENTRY / 4
|
||||
|
||||
mov eax, [nsid]
|
||||
@ -1024,7 +993,7 @@ proc nvme_init stdcall, pci:dword
|
||||
DEBUGF DBG_INFO, "nvme%u: Admin submission queue base address: 0x%x\n", [esi + pcidev.num], eax
|
||||
pop esi
|
||||
mov dword [esi + NVME_MMIO.ASQ], eax
|
||||
mov dword [esi + NVME_MMIO.ASQ + 4], 0
|
||||
;mov dword [esi + NVME_MMIO.ASQ + 4], 0
|
||||
|
||||
mov eax, dword [edi + NVM_QUEUE_ENTRY.cq_ptr]
|
||||
invoke GetPhysAddr
|
||||
@ -1033,7 +1002,7 @@ proc nvme_init stdcall, pci:dword
|
||||
DEBUGF DBG_INFO, "nvme%u: Admin completion queue base address: 0x%x\n", [esi + pcidev.num], eax
|
||||
pop esi
|
||||
mov dword [esi + NVME_MMIO.ACQ], eax
|
||||
mov dword [esi + NVME_MMIO.ACQ + 4], 0
|
||||
;mov dword [esi + NVME_MMIO.ACQ + 4], 0
|
||||
|
||||
; Attach interrupt handler
|
||||
mov esi, [pci]
|
||||
|
Loading…
Reference in New Issue
Block a user