Kernel: Add timeout to ACHI commands

ACHI commands can now fail from timeouts.
This commit is contained in:
2023-10-24 11:56:25 +03:00
parent fb801044ec
commit 2d0da93ac4
2 changed files with 26 additions and 13 deletions

View File

@@ -30,7 +30,8 @@ namespace Kernel
BAN::Optional<uint32_t> find_free_command_slot();
void handle_irq();
void block_until_irq();
BAN::ErrorOr<void> block_until_command_completed(uint32_t command_slot);
private:
BAN::RefPtr<AHCIController> m_controller;
@@ -41,8 +42,6 @@ namespace Kernel
// TODO: can we read straight to user buffer?
BAN::UniqPtr<DMARegion> m_data_dma_region;
volatile bool m_has_got_irq { false };
friend class AHCIController;
};