/* * Copyright (c) 2022, Pankaj R * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include namespace Kernel { class NVMeInterruptQueue : public NVMeQueue , public IRQHandler { public: NVMeInterruptQueue(NonnullOwnPtr rw_dma_region, Memory::PhysicalPage const& rw_dma_page, u16 qid, u8 irq, u32 q_depth, OwnPtr cq_dma_region, NonnullRefPtrVector cq_dma_page, OwnPtr sq_dma_region, NonnullRefPtrVector sq_dma_page, Memory::TypedMapping db_regs); void submit_sqe(NVMeSubmission& submission) override; virtual ~NVMeInterruptQueue() override {}; private: virtual void complete_current_request(u16 status) override; bool handle_irq(RegisterState const&) override; }; }