usbip-rs/cli
Davíð Steinn Geirsson 889017be3b fix: correct OUT actual_length, BCD encoding, and silent transfer failures
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>
2026-03-22 11:05:53 +00:00
..
src fix: correct OUT actual_length, BCD encoding, and silent transfer failures 2026-03-22 11:05:53 +00:00
Cargo.toml feat: add isochronous transfer support and fix host passthrough 2026-03-22 10:42:08 +00:00