diff --git a/drivers/usb/usbhubd/src/main.rs b/drivers/usb/usbhubd/src/main.rs index 01d15cbbd5..e3775027c9 100644 --- a/drivers/usb/usbhubd/src/main.rs +++ b/drivers/usb/usbhubd/src/main.rs @@ -578,9 +578,12 @@ fn main() { // then 50ms TRSTRCY recovery and C_PORT_RESET clear. if !snap.enabled { log::info!("reset port {port}"); - if let Err(e) = set_feature(&handle, port, usb::HubPortFeature::PortReset) { - log::warn!("usbhubd: SetPortReset failed for port {}: {}", port, e); - continue; + match set_feature(&handle, port, usb::HubPortFeature::PortReset) { + Ok(()) => log::info!("HUBFLOW {port}: PortReset set ok"), + Err(e) => { + log::warn!("usbhubd: SetPortReset failed for port {}: {}", port, e); + continue; + } } state.ensure_attached(false); if let Err(e) = port_ops::wait_for_reset( diff --git a/drivers/usb/usbhubd/src/port_ops.rs b/drivers/usb/usbhubd/src/port_ops.rs index 4197194a53..db761d26e1 100644 --- a/drivers/usb/usbhubd/src/port_ops.rs +++ b/drivers/usb/usbhubd/src/port_ops.rs @@ -183,18 +183,21 @@ pub fn wait_for_reset( let mut delay = HUB_SHORT_RESET_TIME_MS; let mut cur = fetch().map_err(WaitError::Io)?; + log::info!("HUBFLOW wait_for_reset: first fetch resetting={} connected={}", cur.resetting, cur.connected); loop { if !cur.resetting && cur.connected { sleep(RESET_RECOVERY_TIME_MS); if cur.reset_changed { clear_reset_change().map_err(WaitError::Io)?; } + log::info!("HUBFLOW wait_for_reset: complete after {}ms", total_ms); return Ok(cur); } if !cur.connected { return Err(WaitError::Disconnected); } if total_ms >= HUB_RESET_TIMEOUT_MS { + log::info!("HUBFLOW wait_for_reset: timeout, still resetting={}", cur.resetting); return Err(WaitError::Timeout); } sleep(delay);