From patchwork Mon May 25 15:23:00 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Stern X-Patchwork-Id: 25846 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 n4PFN3T7020438 for ; Mon, 25 May 2009 15:23:04 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751582AbZEYPW7 (ORCPT ); Mon, 25 May 2009 11:22:59 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751975AbZEYPW7 (ORCPT ); Mon, 25 May 2009 11:22:59 -0400 Received: from netrider.rowland.org ([192.131.102.5]:58666 "HELO netrider.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1751582AbZEYPW6 (ORCPT ); Mon, 25 May 2009 11:22:58 -0400 Received: (qmail 24144 invoked by uid 500); 25 May 2009 11:23:00 -0400 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 25 May 2009 11:23:00 -0400 Date: Mon, 25 May 2009 11:23:00 -0400 (EDT) From: Alan Stern X-X-Sender: stern@netrider.rowland.org To: David cc: Pekka Enberg , , Linux Kernel Mailing List , , , Greg KH , Andrew Morton , "Rafael J. Wysocki" Subject: Re: USB/DVB - Old Technotrend TT-connect S-2400 regression tracked down In-Reply-To: <4A189187.4020407@unsolicited.net> 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 On Sun, 24 May 2009, David wrote: > Alan Stern wrote: > > It's not obvious what could be causing this, so let's start out easy. > > Try collecting two usbmon traces (instructions are in > > Documentation/usb/usbmon.txt), showing what happens with and without > > the reversion. Maybe some difference will stick ou > > > Traces attached. Took a while as my quad core hangs solid when 0u is > piped to a file (I had to compile on a laptop and take the logs there). Okay, here's a patch for you to try. It refreshes the toggle setting in a linked but otherwise idle QH when a new URB is queued. Alan Stern --- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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 @@ -88,7 +88,7 @@ static inline void qh_update (struct ehci_hcd *ehci, struct ehci_qh *qh, struct ehci_qtd *qtd) { /* writes to an active overlay are unsafe */ - BUG_ON(qh->qh_state != QH_STATE_IDLE); + BUG_ON(qh->qh_state != QH_STATE_IDLE && !list_empty(&qh->qtd_list)); qh->hw_qtd_next = QTD_NEXT(ehci, qtd->qtd_dma); qh->hw_alt_next = EHCI_LIST_END(ehci); @@ -971,7 +971,13 @@ static struct ehci_qh *qh_append_tds ( /* can't sleep here, we have ehci->lock... */ qh = qh_make (ehci, urb, GFP_ATOMIC); *ptr = qh; + } else if (list_empty(&qh->qtd_list)) { + /* There might have been a Clear-Halt while the QH + * was linked but empty. + */ + qh_refresh(ehci, qh); } + if (likely (qh != NULL)) { struct ehci_qtd *qtd;