1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 12:38:12 +00:00

Kernel: Use generic string when allocating DMA buffer to NVMeQueue

We don't necessarily create a DMA buffer just for "Admin CQ queue", so
don't hardcode it when allocating such buffer.
This commit is contained in:
Liav A 2022-01-23 20:27:21 +02:00 committed by Linus Groh
parent 0536079ad8
commit 0778043d73

View file

@ -41,7 +41,7 @@ UNMAP_AFTER_INIT NVMeQueue::NVMeQueue(u16 qid, u8 irq, u32 q_depth, OwnPtr<Memor
UNMAP_AFTER_INIT ErrorOr<void> NVMeQueue::create()
{
// DMA region for RW operation. For now the requests don't exceed more than 4096 bytes(Storage device takes of it)
auto buffer = TRY(MM.allocate_dma_buffer_page("Admin CQ queue"sv, Memory::Region::Access::ReadWrite, m_rw_dma_page));
auto buffer = TRY(MM.allocate_dma_buffer_page("NVMe Queue"sv, Memory::Region::Access::ReadWrite, m_rw_dma_page));
m_rw_dma_region = move(buffer);
return {};
}