From patchwork Tue Oct 20 15:07:09 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Stern X-Patchwork-Id: 54970 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n9KF7sGD002207 for ; Tue, 20 Oct 2009 15:07:54 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752452AbZJTPHK (ORCPT ); Tue, 20 Oct 2009 11:07:10 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752399AbZJTPHI (ORCPT ); Tue, 20 Oct 2009 11:07:08 -0400 Received: from iolanthe.rowland.org ([192.131.102.54]:52425 "HELO iolanthe.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1752373AbZJTPHH (ORCPT ); Tue, 20 Oct 2009 11:07:07 -0400 Received: (qmail 7623 invoked by uid 2102); 20 Oct 2009 11:07:09 -0400 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 20 Oct 2009 11:07:09 -0400 Date: Tue, 20 Oct 2009 11:07:09 -0400 (EDT) From: Alan Stern X-X-Sender: stern@iolanthe.rowland.org To: =?UTF-8?B?T3phbiDDh2HEn2xheWFu?= cc: linux-media@vger.kernel.org, linux-kernel , USB list Subject: Re: uvcvideo causes ehci_hcd to halt In-Reply-To: <4ADD74FE.4040406@pardus.org.tr> Message-ID: MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Index: usb-2.6/drivers/usb/host/ehci-q.c =================================================================== --- usb-2.6.orig/drivers/usb/host/ehci-q.c +++ usb-2.6/drivers/usb/host/ehci-q.c @@ -818,6 +818,9 @@ qh_make ( dbg ("intr period %d uframes, NYET!", urb->interval); goto done; + } else if (qh->period > ehci->periodic_size) { + qh->period = ehci->periodic_size; + urb->interval = qh->period << 3; } } else { int think_time; @@ -840,6 +843,10 @@ qh_make ( usb_calc_bus_time (urb->dev->speed, is_input, 0, max_packet (maxp))); qh->period = urb->interval; + if (qh->period > ehci->periodic_size) { + qh->period = ehci->periodic_size; + urb->interval = qh->period; + } } }