xhci: add a warning when a device is detached during init

This commit is contained in:
Mark Poliakov 2025-01-27 16:59:48 +02:00
parent 1bc99bc05f
commit abdf53368b

View File

@ -236,7 +236,10 @@ impl Xhci {
let state = &self.port_states[port];
match state.state.swap(PortState::Disconnected, Ordering::Release) {
PortState::Init => todo!(),
PortState::Init => {
log::warn!("USB device detach received while in init state");
Ok(())
}
PortState::Running => {
log::info!("Port {}: device detached", port);
let address = state