Re: How to be notified of endpoint requests when writing a userspace gadget driver?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 15 September 2018 at 21:11, Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote:
> On Sat, 15 Sep 2018, Alistair Buxton wrote:

> Wrong -- bInterval is a maximum value only and the host is free to poll
> more quickly.

I can only say that real world testing contradicts this. Our device
sets bInterval to 5. Linux polls it every 4 milliseconds, another host
running a proprietary operating system polls it every 8 milliseconds.
So it seems that in the real world the interval can be higher or lower
than what you asked for.

> It is not possible to know when the host has asked for data until after
> the data has been sent.  This is true for kernel drivers as well as for
> userspace drivers.

Okay so this makes everything clearer. I checked the docs for some
microcontroller implementations and even there you receive an
interrupt after the host reads and clears the IN endpoint, not before.
So this seems to be standard for USB implementations generally.

Thanks,

-- 
Alistair Buxton
a.j.buxton@xxxxxxxxx



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux