Re: usb full speed isochronous bug ?

Greg KH <[email protected]>
Newsgroups gmane.linux.usb.devel
Message-ID <[email protected]>
On Wed, Oct 10, 2007 at 07:30:35PM -0700, Philip Rakity wrote:
> We have a full speed usb camera attached to an embedded linux solution.
>  the usb core can support full speed devices without a HS hub even
> though it is echi.  (note: using a full speed hub did not solve the
> problem) We found that when we plugged the camera in we could get one
> stream working (video or audio) but not both.
> 
> We saw similar problem with usb sound cards -- we could record or play
> back but NOT both.
> 
> We talked to our IP provider and they gave us a patch (below) that
> works.  We are NOT usb experts so it is possible there are issues with
> the patch but we thought it a good idea to pass it on so.
> 
> We needed to make one addition to the patch.  the goto next is needed !

David, what do you think about the patch below?

thanks,

greg k-h

> --- ehci-sched.c        2007-09-26 11:03:01.000000000 -0700
> +++ /Users/philipr/Desktop/ehci-sched.2.6.22.9.c        2007-10-08
> 22:27:06.000000000 -0700
> @@ -1265,7 +1265,7 @@
>                  */
>                 if (!tt_no_collision (ehci, period_uframes << 3,
>                                 stream->udev, frame, mask))
> -                       return 0;
> +                       goto next;
>  #endif
>  
>                 /* check starts (OUT uses more than one) */
> @@ -2078,6 +2078,7 @@
>  {
>         unsigned        frame, clock, now_uframe, mod;
>         unsigned        modified;
> +               u8      uncompleted_td = 0;
>  
>         mod = ehci->periodic_size << 3;
>  
> @@ -2157,8 +2158,10 @@
>                                         break;
>                                 }
>                                 if (uf != 8)
> +                               {
> +                                       uncompleted_td = 1;
>                                         break;
> -
> +                               }
>                                 /* this one's ready ... HC won't cache
> the
>                                  * pointer for much longer, if at all.
>                                  */
> @@ -2176,6 +2179,7 @@
>                                         hw_p = &q.sitd->hw_next;
>                                         type = Q_NEXT_TYPE
> (q.sitd->hw_next);
>                                         q = *q_p;
> +                                       uncompleted_td = 1;
>                                         break;
>                                 }
>                                 *q_p = q.sitd->sitd_next;
> @@ -2207,12 +2211,15 @@
>  
>                 // FIXME:  likewise assumes HC doesn't halt mid-scan
>  
> +                       if((!uncompleted_td) && (HC_IS_RUNNING
> (ehci_to_hcd(ehci)->state)))
> +                               ehci->next_uframe = now_uframe;
> +
>                 if (now_uframe == clock) {
>                         unsigned        now;
>  
>                         if (!HC_IS_RUNNING (ehci_to_hcd(ehci)->state))
>                                 break;
> -                       ehci->next_uframe = now_uframe;
> +
>                         now = ehci_readl(ehci,
> &ehci->regs->frame_index) % mod;
>                         if (now_uframe == now)
>                                 break;
> 
> 
> 
> 
>        
> ____________________________________________________________________________________
> Yahoo! oneSearch: Finally, mobile search 
> that gives answers, not web links. 
> http://mobile.yahoo.com/mobileweb/onesearch?refer=1ONXIC
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?  Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> [email protected]
> To unsubscribe, use the last form field at:
> https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.