Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Jun 2026 21:51:33 -0300
From:      Li-Wen Hsu <lwhsu@freebsd.org>
To:        ShengYi Hung <aokblast@freebsd.org>
Cc:        src-committers@freebsd.org, dev-commits-src-all@freebsd.org,  dev-commits-src-main@freebsd.org
Subject:   Re: git: 240330a85e5f - main - libusb: don't treat EINVAL from USB_FS_COMPLETE as device detach
Message-ID:  <CAKBkRUy1zCMZVgfyyxPCyMpry=38vM4gRAAQNTVixYP1mZf68Q@mail.gmail.com>
In-Reply-To: <6a3db409.32d11.15fc5b49@gitrepo.freebsd.org>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
On Thu, Jun 25, 2026 at 20:05 ShengYi Hung <aokblast@freebsd.org> wrote:

> The branch main has been updated by aokblast:
>
> URL:
> https://cgit.FreeBSD.org/src/commit/?id=240330a85e5f7f5d448123902ebee4136ef221fd
>
> commit 240330a85e5f7f5d448123902ebee4136ef221fd
> Author:     ShengYi Hung <aokblast@FreeBSD.org>
> AuthorDate: 2026-06-25 22:38:17 +0000
> Commit:     ShengYi Hung <aokblast@FreeBSD.org>
> CommitDate: 2026-06-25 22:58:23 +0000
>
>     libusb: don't treat EINVAL from USB_FS_COMPLETE as device detach
>
>     ugen20_process() treats any non-EBUSY errno returned by USB_FS_COMPLETE
>     as device detach and returns LIBUSB20_ERROR_OTHER. This causes libusb10
>     to set device_is_gone and fail all subsequent transfer with
>     LIBUSB_ERROR_NO_DEVICE.
>
>     However, USB_FS_COMPLETE can also return EINVAL when a completion
>     references an endpoint that no longer exists, for example after
>     SET_INTERFACE or SET_CONFIG removes and recreates endpoints. This is a
>     transient condition and does not indicate device detach.
>
>     Treat EINVAL the same as EBUSY and stop draining completions. This
>     prevents a guest selecting an isochronous streaming altsetting from
>     permanently breaking the passed-through device.
>
>     Reviewed by:    bapt
>     Event:          Halifax Hackathon 202606
>     Location:       Peggy's Cove Rock


They really push the commit at the cove:

https://p.obiw.ac/s/aokblast-peggy

>

[-- Attachment #2 --]
<div dir="auto">On Thu, Jun 25, 2026 at 20:05 ShengYi Hung &lt;<a href="mailto:aokblast@freebsd.org">aokblast@freebsd.org</a>&gt; wrote:<br></div><div dir="auto"><div class="gmail_quote gmail_quote_container"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)" dir="auto">The branch main has been updated by aokblast:<br>
<br>
URL: <a href="https://cgit.FreeBSD.org/src/commit/?id=240330a85e5f7f5d448123902ebee4136ef221fd" rel="noreferrer" target="_blank">https://cgit.FreeBSD.org/src/commit/?id=240330a85e5f7f5d448123902ebee4136ef221fd</a><br>;
<br>
commit 240330a85e5f7f5d448123902ebee4136ef221fd<br>
Author:     ShengYi Hung &lt;aokblast@FreeBSD.org&gt;<br>
AuthorDate: 2026-06-25 22:38:17 +0000<br>
Commit:     ShengYi Hung &lt;aokblast@FreeBSD.org&gt;<br>
CommitDate: 2026-06-25 22:58:23 +0000<br>
<br>
    libusb: don&#39;t treat EINVAL from USB_FS_COMPLETE as device detach<br>
<br>
    ugen20_process() treats any non-EBUSY errno returned by USB_FS_COMPLETE<br>
    as device detach and returns LIBUSB20_ERROR_OTHER. This causes libusb10<br>
    to set device_is_gone and fail all subsequent transfer with<br>
    LIBUSB_ERROR_NO_DEVICE.<br>
<br>
    However, USB_FS_COMPLETE can also return EINVAL when a completion<br>
    references an endpoint that no longer exists, for example after<br>
    SET_INTERFACE or SET_CONFIG removes and recreates endpoints. This is a<br>
    transient condition and does not indicate device detach.<br>
<br>
    Treat EINVAL the same as EBUSY and stop draining completions. This<br>
    prevents a guest selecting an isochronous streaming altsetting from<br>
    permanently breaking the passed-through device.<br>
<br>
    Reviewed by:    bapt<br>
    Event:          Halifax Hackathon 202606<br>
    Location:       Peggy&#39;s Cove Rock</blockquote><div dir="auto"><br></div><div dir="auto">They really push the commit at the cove:</div><div dir="auto"><br></div><div dir="auto"><div style="font-size:inherit" dir="auto"><a href="https://p.obiw.ac/s/aokblast-peggy" style="font-size:inherit">https://p.obiw.ac/s/aokblast-peggy</a></div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)" dir="auto"></blockquote></div></div>
home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAKBkRUy1zCMZVgfyyxPCyMpry=38vM4gRAAQNTVixYP1mZf68Q>