--- a/sys/bus/u4b/serial/umoscom.c (production, verbatim) +++ b/umoscom_prod_guarded.c (harness copy) @@ -44,6 +44,23 @@ #include #include + +#ifdef UMOSCOM_HARNESS +/* + * DF-5455 HARNESS GUARD, the ONLY change to production (see + * prod_guard.diff): reroute + * the EP0 control-request macro to a shim that reproduces the traced + * usbd_do_request_flags() failure semantics (usb_request.c:642-650 timeout + * breaks out BEFORE the usbd_copy_out at :680-681; a zero-length data + * stage copies nothing at :666-683) so the caller's buffer stays + * untouched, exactly like a silent/stalling/short-replying evil MCS7703. + * All production call sites stay byte-identical. + */ +void mo_shim_request(struct usb_device_request *, void *, int); +#undef ucom_cfg_do_request +#define ucom_cfg_do_request(udev, com, req, ptr, flags, timo) \ + mo_shim_request((req), (ptr), (timo)) +#endif #ifdef USB_DEBUG static int umoscom_debug = 0;