Message ID | Pine.LNX.4.44L0.0905251121370.23874-100000@netrider.rowland.org (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
Alan Stern wrote: > 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 > > > 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; > > > No luck I'm afraid (although there now appear to be 2 timeouts, not one). I'm going to follow up on the laptop and get a USB log. [ 118.017016] usb 1-10: new high speed USB device using ehci_hcd and address 5 [ 118.148589] usb 1-10: configuration #1 chosen from 1 choice [ 118.452964] dvb-usb: found a 'Technotrend TT-connect S-2400' in cold state, will try to load a firmware [ 118.452972] usb 1-10: firmware: requesting dvb-usb-tt-s2400-01.fw [ 118.488474] dvb-usb: downloading firmware from file 'dvb-usb-tt-s2400-01.fw' [ 118.550946] usbcore: registered new interface driver dvb_usb_ttusb2 [ 118.552553] usb 1-10: USB disconnect, address 5 [ 118.561083] dvb-usb: generic DVB-USB module successfully deinitialized and disconnected. [ 120.313020] usb 1-10: new high speed USB device using ehci_hcd and address 6 [ 120.444942] usb 1-10: configuration #1 chosen from 1 choice [ 120.445886] dvb-usb: found a 'Technotrend TT-connect S-2400' in warm state. [ 120.446672] dvb-usb: will pass the complete MPEG2 transport stream to the software demuxer. [ 120.447014] DVB: registering new adapter (Technotrend TT-connect S-2400) [ 120.455026] DVB: registering adapter 0 frontend 129197120 (Philips TDA10086 DVB-S)... [ 120.458383] LNBx2x attached on addr=8<3>dvb-usb: recv bulk message failed: -110 [ 122.457126] ttusb2: there might have been an error during control message transfer. (rlen = 0, was 0) [ 124.456109] dvb-usb: recv bulk message failed: -110 [ 124.456117] ttusb2: there might have been an error during control message transfer. (rlen = 0, was 0) [ 124.456122] dvb-usb: Technotrend TT-connect S-2400 successfully initialized and connected. David -- 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
David wrote: > Alan Stern wrote: > >> 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 >> >> >> 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; >> >> >> >> > No luck I'm afraid (although there now appear to be 2 timeouts, not > one). I'm going to follow up on the laptop and get a USB log. > USB log post-patch attached. Thanks for all the effort so far! David
On Mon, 25 May 2009, David wrote: > David wrote: > > Alan Stern wrote: > > > >> 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 > >> > >> > >> 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; > >> > >> > >> > >> > > No luck I'm afraid (although there now appear to be 2 timeouts, not > > one). I'm going to follow up on the laptop and get a USB log. > > > USB log post-patch attached. Thanks for all the effort so far! Yes, the log shows two timeouts. Maybe I misunderstood something and the patch only made the situation worse! We may have to try a debugging patch to find out what's really happening here. I'll get back to you on that... 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;