Yes.  Though some devices cope with such host-side
API issues by letting you null out the rest of the buffer,
which makes things easier.  (I'm told the Lego USB
brick is friendly in that way ... though garbage in the
rest of the buffer causes trouble.)

Some more issues to remember in this case:

    - Same thing applies when you have no data
      at all to transmit (vs a zero byte packet) ...
      cancel, then resubmit later.

    - The cancel/resubmit procedure can botch up
      the polling/transfer interval.  Some devices
      won't care, but ...

And of course, if the polling rate is "fast" (1/msec
for full/lowspeed, or 8x faster for high speed) it
gets more likely that IRQ latencies will keep the
completions from happening quickly enough to
keep up the transfer rate.  More reasons to be
adopting a queuing model ... :)

Worth fixing in the 2.5 series, since such fixes mean
API changes, but IMO not in the 2.4 series (until a
backport).

- Dave

----- Original Message ----- 
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, May 07, 2002 8:58 AM
Subject: Re: [linux-usb-devel] Using interrupt URBs


> Hi,
> 
> >> OK, thanks for that info. Following on from it - which fields
> >> can I/need I set up again in the completion routine ?
> > 
> > None of them.  After you submit any URB, they're all
> > read-only from the perspective of the driver.  Yes, that
> > is part of what makes the automagic resubmit model
> > awkward for writing data with interrupt transfers.
> 
> Hmm, so if the completion routine finds that the data waiting
> to be sent is insufficient to fill the current urb buffer, is the
> correct procedure to cancel the urb and resubmit a new one with a
> smaller buffer ?
> 
> Cheers,
> Richard
> 
> 
> 
> 
> _______________________________________________
> [EMAIL PROTECTED]
> To unsubscribe, use the last form field at:
> https://lists.sourceforge.net/lists/listinfo/linux-usb-devel


_______________________________________________________________

Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: [EMAIL PROTECTED]
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to