diff --git a/drivers/usb/xhcid/src/xhci/mod.rs b/drivers/usb/xhcid/src/xhci/mod.rs index 71eca86f7e..9f8b39d74b 100644 --- a/drivers/usb/xhcid/src/xhci/mod.rs +++ b/drivers/usb/xhcid/src/xhci/mod.rs @@ -1141,6 +1141,7 @@ impl Xhci { } pub async fn attach_device(&self, port_id: PortId) -> syscall::Result<()> { + log::info!("ATTACH {}: begin", port_id); if self.port_states.contains_key(&port_id) { debug!("Already contains port {}", port_id); return Err(syscall::Error::new(EAGAIN)); @@ -1203,6 +1204,7 @@ impl Xhci { }; debug!("Enabled port {}, which the xHC mapped to {}", port_id, slot); + log::info!("ATTACH {}: slot {}", port_id, slot); //TODO: get correct speed for child devices let protocol_speed = self @@ -1224,6 +1226,7 @@ impl Xhci { }; debug!("Addressed device"); + log::info!("ATTACH {}: addressed", port_id); // TODO: Should the descriptors be cached in PortState, or refetched? @@ -1280,9 +1283,11 @@ impl Xhci { } debug!("Got the 8 byte dev descriptor: {:X?}", dev_desc_8_byte); + log::info!("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); self.port_states.get_mut(&port_id).ok_or(Error::new(EBADFD))?.dev_desc = Some(dev_desc); debug!("Got the port states again!"); @@ -1300,7 +1305,10 @@ impl Xhci { debug!("Updated the default control pipe"); match self.spawn_drivers(port_id) { - Ok(()) => (), + Ok(()) => { + log::info!("ATTACH {}: drivers spawned", port_id); + () + }, Err(err) => { error!("Failed to spawn driver for port {}: `{}`", port_id, err) }