"> > " == Roland King
"> " ==  Vojtech Pavlik

> > This is a little similar to the discussion we were having last
> > week about how to do interrupt transfers on the usbdevfs
> > interface. The answer seemed to end up being that you should
> > just do bulk transfers.

"Seemed" -- if you can arrange that nothing is going to
ever be able to remember the endpoint being used in
a different transfer mode.  I've tripped over problems
trying to use that approach.  (No, I wasn't using UHCI.)


> > What is an interrupt transfer really? Is it just a transfer which is
> > sent again and again by the driver, ...?

By the host controller driver.  It's a "periodic" transfer,
which _by design_ is going to be happening over and
over and over again.


> > How is that supposed to work with output transfers then? If you
> > schedule an interrupt transfer and the driver continues to resubmit
> > it, doesn't that just mean that, as the initial writer in this thread
> > noted, you get the same data sent to the endpoint again and again?

Yes, which is why an interrupt OUT transfer has to modify the buffer.

And why there's that issue I mentioned (reported in Janary by
Wolfgang Mües) about changing the _length_ of an OUT transfer.
I've some comments I hope to send out, but can't do so much before
Wednesday.


> > What are interrupt outputs supposed to do? If you have just one
> > thing to send are you better off always just sending a bulk one even
> > to an interrupt endpoint?

"Better off" is a tradeoff.  One factor is guaranteed bandwidth:

> As far as I know the only difference between one-shot out interrupt

(which is a UHCI-ism :)

>     and
> an out bulk is that the interrupt should have guaranteed bandwidth - the
> USB core should allocate enough bandwidth on the bus to allow it to go
> through immediately or fail with a 'not enough bandwidth' error if it
> isn't possible. With bulk it simply waits until the bandwidth is
> available and then sends it.

Another factor is when the transfer happens ... if your device is
only able to handle data every 16 msec, you're not doing anyone
a favor by trying to send/recv it more often, it'll just choke.  So use
interrupt transfers, not bulk transfers.

Then there's the fact that the transfer sizes are different.  For
high speed (480 MBit/sec) interrupts max out at 64 bytes by
default, but single transfers go up to 1KByte and there's also
a "high bandwidth" mode where one endpoint can do 3KBytes
in each microframe (12 KByte/msec, 12 MByte/sec).  Bulk
maxpacketsize at High speed is fixed at 512 bytes.

- Dave






_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to