On Tue, Sep 03, 2013 at 02:26:33PM -0400, Alan Stern wrote: > On Tue, 3 Sep 2013, Greg KH wrote: > > > On Tue, Sep 03, 2013 at 01:58:23PM -0400, Alan Stern wrote: > > > Greg: > > > > > > This series of three patches modifies the isochronous scheduling > > > routine in ehci-hcd, adding changes that we need for proper operation > > > with tasklets (with a new inline routine needed in usbcore). > > > > > > The problem is that we have to maintain the existing API guarantee that > > > URBs submitted in a completion handler will keep an isochronous stream > > > alive, maintaining synchronization with the device. Until recently > > > this wasn't an issue; URBs submitted by a completion handler would be > > > processed while the giveback operation was in progress, so the endpoint > > > queue would never appear to be empty. > > > > > > But now completion handlers run in a separate tasklet context. The > > > giveback operation will end before the completion handler runs and > > > submits any URBs. Therefore we need a way to tell whether a particular > > > URB submission was made by a completion handler, and we need to handle > > > the case where the endpoint queue does empty out temporarily. > > > > > > That's what these patches do. The first one adds a mechanism to > > > usbcore for determining whether an endpoint's completion handler is > > > running. The other two modify ehci-hcd to do the right thing when the > > > queue gets an underrun. > > > > > > These changes are intended to avoid bad side effects in the USB audio > > > driver when interrupt latency causes a delay in the isochronous stream. > > > Since the tasklet changes have already been accepted, I think these > > > patches will also need to go to Linus before the current merge window > > > closes. > > > > It's really late in the merge window cycle (i.e. it's already started) > > to be taking patches that mess with the EHCI scheduling code. > > > > I'd rather just revert the tasklet changes if they are causing the > > problem here, and then hold off for all of this until 3.13, would that > > be ok? > > That's understandable. > > It's not necessary to revert all the tasklet changes. The only one > that matters is commit 428aac8a8105 (USB: EHCI: support running URB > giveback in tasklet context). Without that one, the tasklet mechanism > will be present but not used. > > It's also okay to keep Ming Lei's other changes to ehci-hcd; they are > compatible with operation either with or without tasklets. Ok, I'll revert that after 3.12-rc1 and reapply it to my -next branch, along with these patches for 3.13. thanks, greg k-h -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html