Hmm.. What would happen if I try to send a URB with 0 data size ?
thanks Vladimir Dergachev On Mon, 18 Feb 2002, David Brownell wrote: > Right now the only portable solution is rather awkward. > That is: > > (a) make sure urb->interval is long enough that it's > probably not going to suffer interrupt/scheduling > latency problems (causing extra transfers), and > submit the URB > (b) have your completion handler signal the thread > doing initialization, say using"struct completion" > and calling complete() on it; > (c) have that initialization thread wait for that, using > wait_for_completion() perhaps; > (d) when that thead wakes up after one transfer, > may a synchronous usb_unlink_urb() call. > (e) you'll get one more completion call, with a > special call saying it's unlinked. > (f) now it's unlinked. > > (Normally the unlink would be done in disconnect > processing, not device open... which has its own > set of portability issues, being fixed in 2.5.) > > Less portable solutions involve making an async > usb_unlink_urb() call in the completion handler, > which works now for EHCI and OHCI (bugfix for > UHCI will be forthcoming, says Johannes). > > Or the UHCI drivers support a "one shot" mode, > with urb->interval of zero having special meaning. > > - Dave > > > > ----- Original Message ----- > From: "Vladimir Dergachev" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Monday, February 18, 2002 10:44 AM > Subject: [linux-usb-devel] stopping interrupt transfers.. > > > > > > Stupid question: > > > > I have a device that has two interrupt endpoints - in and out. > > During initialization I need to transfer two small packets to the devices. > > The problem is that USB seems to keep transferring the last packet.. > > How do I stop this ? (usb_unlink_urb does not seem to help). > > > > thanks ! > > > > Vladimir Dergachev > > > > _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel