PATCH: usb-ohci: interrupt out with urb->interval 0

Frode Isaksen (fisaksen@bewan.com)
Wed, 16 Apr 2003 17:45:04 +0200


In the usb-ohci driver, the interrupt out transfer is always
rescheduled, even if the urb->interval is set to 0 to signal a one-shot
transfer.
The other usb drivers (usb-uhci,uhci) allows one-shot interrupt out
transfers.
Tested with kernel 2.4.21 and previous kernels.

Thanks,
Frode

--- drivers/usb/usb-ohci.c.orig 2003-04-16 15:42:46.000000000 +0200
+++ drivers/usb/usb-ohci.c 2003-04-16 15:45:41.000000000 +0200
@@ -490,12 +490,17 @@
usb_pipeout (urb->pipe)
? PCI_DMA_TODEVICE
: PCI_DMA_FROMDEVICE);
- urb->complete (urb);
+ if (urb->interval) {
+ urb->complete (urb);

- /* implicitly requeued */
- urb->actual_length = 0;
- urb->status = -EINPROGRESS;
- td_submit_urb (urb);
+ /* implicitly requeued */
+ urb->actual_length = 0;
+ urb->status = -EINPROGRESS;
+ td_submit_urb (urb);
+ } else {
+ urb_rm_priv(urb);
+ urb->complete (urb);
+ }
break;

case PIPE_ISOCHRONOUS:

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/