debug: log endpoint model at build time and URB dispatch details
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
e5f1d0599e
commit
329a7aa37f
2 changed files with 19 additions and 0 deletions
|
|
@ -164,6 +164,23 @@ fn build_usb_device(dev: nusb::Device, dev_info: nusb::DeviceInfo) -> Result<Usb
|
|||
alt_settings[0].interface_protocol,
|
||||
alt_settings.len()
|
||||
);
|
||||
for (alt_idx, alt) in alt_settings.iter().enumerate() {
|
||||
for ep in &alt.endpoints {
|
||||
debug!(
|
||||
" intf {intf_num} alt {alt_idx}: ep {:02x} type={} mps={} interval={}",
|
||||
ep.address,
|
||||
match ep.transfer_type() {
|
||||
Some(EndpointAttributes::Control) => "control",
|
||||
Some(EndpointAttributes::Isochronous) => "iso",
|
||||
Some(EndpointAttributes::Bulk) => "bulk",
|
||||
Some(EndpointAttributes::Interrupt) => "interrupt",
|
||||
None => "unknown",
|
||||
},
|
||||
ep.max_packet_size,
|
||||
ep.interval,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
interface_states.push(InterfaceState::with_alt_settings(alt_settings));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -441,6 +441,8 @@ pub async fn handle_urb_loop<T: AsyncReadExt + AsyncWriteExt + Unpin + Send + 's
|
|||
UsbIpResponse::usbip_ret_submit_fail(&header)
|
||||
}
|
||||
Some((ep, intf_idx)) => {
|
||||
debug!("URB seqnum={seqnum} ep={:02x} type={:?} dir={} intf={intf_idx:?} len={transfer_buffer_length}",
|
||||
ep.address, ep.transfer_type(), if out { "OUT" } else { "IN" });
|
||||
let urb_request = UrbRequest {
|
||||
ep,
|
||||
transfer_buffer_length,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue