tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: USB output in ucom
On Wed, Oct 01, 2025 at 07:44:45AM +0100, Nick Hudson wrote:
> > Asynchronous transfers in polling mode panic in usbd_transfer() here:
> > while (!xfer->ux_done) {
> > if (pipe->up_dev->ud_bus->ub_usepolling)
> > panic("usbd_transfer: not done");
>
> Err, think that's for synchronous transfers
Yes, sorry, I meant synchronous, but you fixed it on your own.
In polling mode, I use async transfer because it is required otherwise
we panic.
In normal mode, in ucom_cnlwp(), I use sync transfer because it
makes the code simplier. Since I use a single struct usbd_xfer,
I must wait for output completion before reusing it, otherwise
I corrupt the output queue by queing the same struct usbd_xfer
twice. Synchronous transfer enforces that without the need for
extra code.
--
Emmanuel Dreyfus
manu%netbsd.org@localhost
Home |
Main Index |
Thread Index |
Old Index