diff --git a/drivers/usb/xhcid/src/xhci/device_enumerator.rs b/drivers/usb/xhcid/src/xhci/device_enumerator.rs index 8cd0ca3a3e..867575d404 100644 --- a/drivers/usb/xhcid/src/xhci/device_enumerator.rs +++ b/drivers/usb/xhcid/src/xhci/device_enumerator.rs @@ -28,7 +28,8 @@ impl DeviceEnumerator { let request = match self.request_queue.recv() { Ok(req) => req, Err(err) => { - panic!("Failed to received an enumeration request! error: {}", err) + log::error!("Device enumerator channel disconnected: {} — exiting", err); + return; } }; @@ -68,10 +69,11 @@ impl DeviceEnumerator { && !flags.contains(PortFlags::PR); if !disabled_state { - panic!( - "Port {} isn't in the disabled state! Current flags: {:?}", + warn!( + "Port {} isn't in the disabled state! Current flags: {:?} — skipping enumeration", port_id, flags ); + continue; } else { debug!("Port {} has entered the disabled state.", port_id); }