Kernel: Make sure USB class driver is deinitialized before xhci device

This commit is contained in:
2025-02-06 22:00:26 +02:00
parent 6a5367dbe3
commit a2a7302964
3 changed files with 19 additions and 6 deletions

View File

@@ -61,6 +61,9 @@ namespace Kernel
{}
virtual ~USBDevice() = default;
// Class drivers have to be destroyed before derived class destructor is called
void destroy() { m_class_drivers.clear(); }
BAN::ErrorOr<void> initialize();
const BAN::Vector<ConfigurationDescriptor>& configurations() { return m_descriptor.configurations; }

View File

@@ -46,7 +46,8 @@ namespace Kernel
void port_updater_task();
BAN::ErrorOr<void> initialize_slot(int port_index);
BAN::ErrorOr<uint8_t> initialize_slot(int port_index);
void deinitialize_slot(uint8_t slot_id);
BAN::ErrorOr<XHCI::TRB> send_command(const XHCI::TRB&);
void advance_command_enqueue();