diff --git a/drivers/usb/usbhubd/src/main.rs b/drivers/usb/usbhubd/src/main.rs index 9eadf1e0ff..2732abdad3 100644 --- a/drivers/usb/usbhubd/src/main.rs +++ b/drivers/usb/usbhubd/src/main.rs @@ -349,7 +349,7 @@ fn main() { if attached { match self.handle.attach() { Ok(()) => { - log::info!("HUBFLOW {}: attach() ok", self.port_id); + log::debug!("HUBFLOW {}: attach() ok", self.port_id); } Err(e) => { log::warn!("usbhubd: attach failed for port {}: {}", self.port_id, e); @@ -575,7 +575,7 @@ fn main() { state.ensure_attached(false); continue; } - log::info!("HUBFLOW {}: debounced conn={} en={} att={}", port, snap.connected, snap.enabled, state.attached); + log::debug!("HUBFLOW {}: debounced conn={} en={} att={}", port, snap.connected, snap.enabled, state.attached); } // Ensure port is enabled. @@ -586,7 +586,7 @@ fn main() { if !snap.enabled { log::info!("reset port {port}"); match set_feature(&handle, port, usb::HubPortFeature::PortReset) { - Ok(()) => log::info!("HUBFLOW {port}: PortReset set ok"), + Ok(()) => log::debug!("HUBFLOW {port}: PortReset set ok"), Err(e) => { log::warn!("usbhubd: SetPortReset failed for port {}: {}", port, e); continue; @@ -609,7 +609,7 @@ fn main() { } let was_attached = state.attached; - log::info!("HUBFLOW {}: pre-attach conn={} en={} rst={} att={}", port, snap.connected, snap.enabled, snap.resetting, state.attached); + log::debug!("HUBFLOW {}: pre-attach conn={} en={} rst={} att={}", port, snap.connected, snap.enabled, snap.resetting, state.attached); state.ensure_attached(true); if !was_attached && state.attached { // The connection-change bit was ignored during the debounce diff --git a/drivers/usb/usbhubd/src/port_ops.rs b/drivers/usb/usbhubd/src/port_ops.rs index db761d26e1..4af4e7829e 100644 --- a/drivers/usb/usbhubd/src/port_ops.rs +++ b/drivers/usb/usbhubd/src/port_ops.rs @@ -183,21 +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); + log::debug!("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); + log::debug!("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); + log::debug!("HUBFLOW wait_for_reset: timeout, still resetting={}", cur.resetting); return Err(WaitError::Timeout); } sleep(delay); diff --git a/drivers/usb/xhcid/src/xhci/device_enumerator.rs b/drivers/usb/xhcid/src/xhci/device_enumerator.rs index f8f8c734b8..a980cca158 100644 --- a/drivers/usb/xhcid/src/xhci/device_enumerator.rs +++ b/drivers/usb/xhcid/src/xhci/device_enumerator.rs @@ -33,7 +33,7 @@ impl DeviceEnumerator { return; } }; - log::info!("ENUMERATOR: request for port {}", request.port_id); + debug!("ENUMERATOR: request for port {}", request.port_id); let port_id = request.port_id; let port_array_index = match port_id.root_hub_port_index() { diff --git a/drivers/usb/xhcid/src/xhci/mod.rs b/drivers/usb/xhcid/src/xhci/mod.rs index 9f8b39d74b..dd3c0edd0e 100644 --- a/drivers/usb/xhcid/src/xhci/mod.rs +++ b/drivers/usb/xhcid/src/xhci/mod.rs @@ -1141,7 +1141,7 @@ impl Xhci { } pub async fn attach_device(&self, port_id: PortId) -> syscall::Result<()> { - log::info!("ATTACH {}: begin", port_id); + debug!("ATTACH {}: begin", port_id); if self.port_states.contains_key(&port_id) { debug!("Already contains port {}", port_id); return Err(syscall::Error::new(EAGAIN)); @@ -1204,7 +1204,7 @@ impl Xhci { }; debug!("Enabled port {}, which the xHC mapped to {}", port_id, slot); - log::info!("ATTACH {}: slot {}", port_id, slot); + debug!("ATTACH {}: slot {}", port_id, slot); //TODO: get correct speed for child devices let protocol_speed = self @@ -1226,7 +1226,7 @@ impl Xhci { }; debug!("Addressed device"); - log::info!("ATTACH {}: addressed", port_id); + debug!("ATTACH {}: addressed", port_id); // TODO: Should the descriptors be cached in PortState, or refetched? @@ -1283,11 +1283,11 @@ impl Xhci { } debug!("Got the 8 byte dev descriptor: {:X?}", dev_desc_8_byte); - log::info!("ATTACH {}: desc8 ok", port_id); + debug!("ATTACH {}: desc8 ok", port_id); let dev_desc = self.get_desc(port_id, slot).await?; debug!("Got the full device descriptor!"); - log::info!("ATTACH {}: desc full ok", port_id); + debug!("ATTACH {}: desc full ok", port_id); self.port_states.get_mut(&port_id).ok_or(Error::new(EBADFD))?.dev_desc = Some(dev_desc); debug!("Got the port states again!"); @@ -1306,7 +1306,7 @@ impl Xhci { match self.spawn_drivers(port_id) { Ok(()) => { - log::info!("ATTACH {}: drivers spawned", port_id); + debug!("ATTACH {}: drivers spawned", port_id); () }, Err(err) => {