mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:07:34 +00:00
Kernel: Fix index calculation in NVMeQueue submit_sync_sqe function
There was a bug while calculating the next index in submit_sync_sqe function. Use the NVMeQueue's class variable m_qdepth instead of the hardcoded IO_QUEUE_SIZE.
This commit is contained in:
parent
67ce9e28a5
commit
4a8a3df975
1 changed files with 1 additions and 1 deletions
|
@ -123,7 +123,7 @@ u16 NVMeQueue::submit_sync_sqe(NVMeSubmission& sub)
|
||||||
SpinlockLocker lock(m_cq_lock);
|
SpinlockLocker lock(m_cq_lock);
|
||||||
index = m_cq_head - 1;
|
index = m_cq_head - 1;
|
||||||
if (index < 0)
|
if (index < 0)
|
||||||
index = IO_QUEUE_SIZE - 1;
|
index = m_qdepth - 1;
|
||||||
}
|
}
|
||||||
cqe_cid = m_cqe_array[index].command_id;
|
cqe_cid = m_cqe_array[index].command_id;
|
||||||
Scheduler::yield();
|
Scheduler::yield();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue