Alan Stern wrote: > (1) Reject the submission with -EXDEV -- this is what we do now. > > (2) Accept the submission, but have the URB complete immediately > with urb->status and all the packet statuses set to -EXDEV. > > (3) Accept the submission, but have the URB complete immediately > with urb->status set to 0 and all the packet statuses set to > -EXDEV. The audio driver currently ignores submission errors (because of a bug: the obvious way to stop the PCM stream would result in a deadlock; the tasklet completion might change this), and checks urb->status only to detect if the stream should be stopped (because of a 'normal' stop or unplugging.) So (2) or (3) (no matter which) is preferrable over (1). > For (1), the only way to recover is to submit an URB with URB_ISO_ASAP > set. This is essentially the same as shutting down the stream and > restarting it. > > For (2) and (3), the stream's "next" time slot value would be updated > in the usual way. For example, if 10 slots had expired and the driver > was submitting URBs containing 4 packets each, then the first and > second URBs would complete right away with errors, and the first two > packets of the third URB would get errors, but the last two packets of > the third URB would be assigned to the two upcoming time slots and > would be treated normally. Thus recovery would be automatic, This is certainly preferrable over (1). > at the cost of "wasting" two URBs. Since we expect underruns to be > rare, maybe this is acceptable. And it's the only recovery mechanism that can preserves the timing/ synchronization of the overall stream. Regards, Clemens -- 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