<feed xmlns='http://www.w3.org/2005/Atom'>
<title>tinyusb.git/test/hil/tinyusb-sudoer, branch worktree-ch569-hydrausb3</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://cgit.235523.xyz/tinyusb.git/atom/test/hil/tinyusb-sudoer?h=worktree-ch569-hydrausb3</id>
<link rel='self' href='http://cgit.235523.xyz/tinyusb.git/atom/test/hil/tinyusb-sudoer?h=worktree-ch569-hydrausb3'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/'/>
<updated>2026-07-07T02:43:50Z</updated>
<entry>
<title>usbtest: negotiated-speed int/iso refill + harden HIL sudoers</title>
<updated>2026-07-07T02:43:50Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-07-07T02:43:50Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=1922a1c3afd018fde09e2c4f66142bc3dbe97d9f'/>
<id>urn:sha1:1922a1c3afd018fde09e2c4f66142bc3dbe97d9f</id>
<content type='text'>
Copilot review:
- tud_vendor_int_tx_cb/iso_tx_cb submitted sizeof(chunk) (the HS-capacity buffer)
  instead of the negotiated-speed mps, diverging from usbtest_pump() on an
  HS-capable build enumerated at full speed. Factor the length into shared
  usbtest_int_len()/usbtest_iso_len() helpers used by the pump and both callbacks.
- Reword the usb_descriptors.h comment that still called the plain mps macro
  'live operating speed' — it is the compile-time capability maximum.

Claude review (test/hil/tinyusb-sudoer): drop the two grants that bypassed the
file's root-owned-helper boundary and gave uid 1000 passwordless root:
- /sbin/debugfs (unused; permits '!/bin/sh' shell escape + raw root-disk write).
- /home/*/actions-runner/svc.sh (user-writable script). Replace with a root-owned,
  argument-restricted 'systemctl stop/start actions.runner.*' grant. Also tighten
  the dmesg/uhubctl runas from (ALL) to (root).

Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;
Claude-Session: https://claude.ai/code/session_01HeF2gZ1M7GWkz6Av4BpKPg
</content>
</entry>
<entry>
<title>address Codex/Copilot review findings (9 fixed, 3 refuted with evidence)</title>
<updated>2026-07-06T17:30:07Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-07-06T17:30:07Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=f41c1827b2b59d1a0bdfc28bbe6580e5c44ef961'/>
<id>urn:sha1:f41c1827b2b59d1a0bdfc28bbe6580e5c44ef961</id>
<content type='text'>
- dcd(rp2040): rewind IN staging before the clear-halt re-issue. Staging advances
  user_buf/remaining_len when packets are copied into DPRAM, before the host has
  consumed them; aborting and re-issuing from the advanced pointer silently
  skipped the staged-but-unsent bytes.
- dcd(ip3511): dcd_edpt_iso_activate aborts a transfer still armed from the
  previous altsetting (clear Active on both buffer slots) so the hardware can't
  keep servicing the old descriptor against the class's fresh queueing.
- dcd(rusb2): reuse an endpoint's existing pipe in dcd_edpt_open. usbd_edpt_close
  is a no-op on ISO_ALLOC ports, so a class's close/open across SET_INTERFACE
  would allocate a second pipe with the same EPNUM and leak pipes.
- class(vendor): the buffered-mode free-slot check also tests the interrupt
  endpoints, so an interrupt-only vendor interface isn't clobbered as "free".
- bsp(ch32v30x): board_get_unique_id respects max_len and copies bytes
  (alignment-safe) instead of writing 12 bytes through a uint32_t cast.
- test/hil/usbtest.py: treat same-serial multi-matches as ambiguous and retry
  until the dual-port stale node drops (nanoch32v203/ch32v307 variants); reprobe
  a binding that predates the dynamic-id re-registration so a stale capability
  profile can't survive; skip the remove_id/unbind cleanup after an unrecovered
  kernel-side hang (it would join the D-state convoy and deadlock the bus).
- usbtest skip.txt: add the families whose DCD refuses dcd_edpt_iso_alloc
  (CXD56, FT90X, LPC175X_6X, LPC40XX, NUC100/120/505, PIC32MZ, SAMG, SAMX7X,
  VALENTYUSB_EPTRI) — tier 4 cannot enumerate there.
- test/hil/tinyusb-sudoer: note that '#1000' is a sudoers UID specifier, not a
  comment (the review misread the grants as commented out).

Refuted in review threads: nrf5x ISOSPLIT keeps reserve-max per-configuration
allocation semantics (iso_alloc is per-config, not per-alt); the LPC EP-number
claim (default descriptor uses EP1-3; lpcxpresso11u37 passes 30/30 on HW); the
vendor alt-0 "abort" concern (host cannot address endpoints outside the active
altsetting; usbd_edpt_iso_activate resets state on re-entry).

Verified on hardware: raspberry_pi_pico, lpcxpresso11u37, ra4m1_ek all 30/30
through the HIL battery after the changes; builds clean incl. buffered-mode
vendor (webusb_serial).

Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;
Claude-Session: https://claude.ai/code/session_01HeF2gZ1M7GWkz6Av4BpKPg
</content>
</entry>
<entry>
<title>hil: harden rig USB recovery (pci-bind, --force reboot, sudoers)</title>
<updated>2026-07-04T02:17:52Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-07-04T01:51:23Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=4d61c13c67ef4227b1e253d44265262df79b2553'/>
<id>urn:sha1:4d61c13c67ef4227b1e253d44265262df79b2553</id>
<content type='text'>
usb_recover.sh: add `pci-bind &lt;addr&gt; [drv]` to re-attach a driver to a controller
left driverless (e.g. after a pci-rebind whose re-bind hung on an unkillable
D-state URB); auto-tries xhci-pci-renesas then xhci_hcd.

usb-recover skill: document the Renesas uPD720201 pci-reset ENOTTY (no FLR), the
pci-rebind-strands-driverless footgun, and reboot as the last-resort D-state cure
with an @reboot one-shot session auto-resume. Recovery reboot uses
`systemctl reboot --force` -- a graceful reboot stalls in shutdown waiting for the
wedged D-state process to exit; --force reboots immediately.

tinyusb-sudoer: grant `systemctl reboot --force` (and plain reboot), the actions-
runner svc.sh stop/start around manual HW runs, and testusb; grants stay generic-
by-UID (#1000). usb-debug skill: sync the deploy one-liner.

Co-Authored-By: Claude Opus 4.8 &lt;noreply@anthropic.com&gt;
Claude-Session: https://claude.ai/code/session_01HeF2gZ1M7GWkz6Av4BpKPg
</content>
</entry>
<entry>
<title>docs(hil): svc.sh is sudoers-allowed; run it from the runner root</title>
<updated>2026-07-03T05:24:07Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-07-03T05:24:07Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=04e3a6da95e4ef1cca1f6420f2d8dfcddebd0f72'/>
<id>urn:sha1:04e3a6da95e4ef1cca1f6420f2d8dfcddebd0f72</id>
<content type='text'>
Add the actions-runner/svc.sh NOPASSWD grant to test/hil/tinyusb-sudoer and
correct the hil skill: svc.sh must be invoked from ~/actions-runner (cd first)
or it errors 'Must run from runner root'.

Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;
Claude-Session: https://claude.ai/code/session_01HeF2gZ1M7GWkz6Av4BpKPg
</content>
</entry>
<entry>
<title>usbtest: FS-sized ep buffers + host runner hardening</title>
<updated>2026-07-03T01:57:32Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-07-03T01:57:32Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=556e1bf81f8307d2ba2051de2f547844bc10b121'/>
<id>urn:sha1:556e1bf81f8307d2ba2051de2f547844bc10b121</id>
<content type='text'>
- example: interrupt/iso endpoint buffers track the per-speed max packet
  size instead of a fixed 512, saving ~1.6 KB of USB DMA RAM on FS builds.
- test/hil/usbtest.py: re-resolve the device node after a mid-battery
  re-enumeration (stale node was misreported as NOTRUN); reject an
  out-of-range tier (a tier-0 device would run an empty battery and read
  green); validate --tests case numbers; run cleanup in a try/finally so a
  crash can't leave the dynamic id registered to hijack the next device;
  guard set_pattern and the pci-reset placeholder; report a sudo-password
  failure on the testusb fallback instead of a misleading NOTRUN.
- tinyusb-sudoer: allow the foreign-driver unbind path and the testusb
  fallback used by the runner.

Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;
Claude-Session: https://claude.ai/code/session_01HeF2gZ1M7GWkz6Av4BpKPg
</content>
</entry>
<entry>
<title>docs: version HIL rig tooling in-repo with deploy instructions</title>
<updated>2026-07-02T11:12:25Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-07-02T11:12:25Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=7e0568e289b525347476c1900881d61ef3478108'/>
<id>urn:sha1:7e0568e289b525347476c1900881d61ef3478108</id>
<content type='text'>
- test/hil/tinyusb-sudoer: consolidated sudoers grants (deploys to
  /etc/sudoers.d/tinyusb-sudoer), documenting what each grant is for
- usb-recover skill: version usb_recover.sh under scripts/, deploy section
- new usb-debug skill: usb_dyndbg.sh (allowlisted kernel dynamic-debug
  toggle for USB host modules) + workflow and deploy instructions

Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;
Claude-Session: https://claude.ai/code/session_01HeF2gZ1M7GWkz6Av4BpKPg
</content>
</entry>
</feed>
