linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* PATCH: usb-ohci: interrupt out with urb->interval 0
@ 2003-04-16 15:45 Frode Isaksen
  2003-04-18  7:39 ` Greg KH
  0 siblings, 1 reply; 3+ messages in thread
From: Frode Isaksen @ 2003-04-16 15:45 UTC (permalink / raw)
  To: weissg; +Cc: linux-kernel

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:


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: PATCH: usb-ohci: interrupt out with urb->interval 0
  2003-04-16 15:45 PATCH: usb-ohci: interrupt out with urb->interval 0 Frode Isaksen
@ 2003-04-18  7:39 ` Greg KH
  0 siblings, 0 replies; 3+ messages in thread
From: Greg KH @ 2003-04-18  7:39 UTC (permalink / raw)
  To: Frode Isaksen; +Cc: weissg, linux-kernel

On Wed, Apr 16, 2003 at 05:45:04PM +0200, Frode Isaksen wrote:
> 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.

Again, there is no 2.4.21, and your patch doesn't apply against the
latest 2.4.21-pre7 tree.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: PATCH: usb-ohci: interrupt out with urb->interval  0
@ 2003-04-21  8:07 David Glance
  0 siblings, 0 replies; 3+ messages in thread
From: David Glance @ 2003-04-21  8:07 UTC (permalink / raw)
  To: linux-kernel, Greg KH

corrected patch for 2.4.21-pre7

--- usb-ohci.c  2003-04-21 15:53:19.000000000 +0800
+++ usb-ohci.patch.c    2003-04-21 16:03:51.000000000 +0800
@@ -490,6 +490,13 @@
                                usb_pipeout (urb->pipe)
                                        ? PCI_DMA_TODEVICE
                                        : PCI_DMA_FROMDEVICE);
+
+                        if (urb->interval == 0) {
+                               urb_rm_priv (urb);
+                               urb->complete (urb);
+                               break;
+                        }
+
                        urb->complete (urb);
 
                        /* implicitly requeued */



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-04-21  7:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-16 15:45 PATCH: usb-ohci: interrupt out with urb->interval 0 Frode Isaksen
2003-04-18  7:39 ` Greg KH
2003-04-21  8:07 David Glance

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).