Three fixes for host device passthrough: 1. OUT transfers now report actual_length = transfer_buffer_length instead of 0. The kernel needs to know how many bytes were consumed; returning 0 caused bulk writes (critical for mass storage) to appear as failures. 2. BCD version encoding (bcdUSB, bcdDevice) now properly reconstructs the full 2-byte BCD value from the Version struct's nibble fields. Previously, the minor field (a single nibble) was written as a full byte, corrupting values like USB 1.1 (0x0110 → 0x0101). 3. USB transfer handlers (nusb) now propagate errors instead of silently returning empty success responses. Failed control_in, bulk, and interrupt transfers were falling through to Ok(UrbResponse::default()), making the kernel think transfers succeeded with 0 bytes of data. Also sets usb_version and dev_num from the actual device in build_usb_device. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| client.rs | ||
| host.rs | ||
| main.rs | ||
| test_hid.rs | ||
| transport.rs | ||
| vhci.rs | ||