On 7/1/2013 4:48 PM, Clemens Ladisch wrote:
It could try to schedule the URB for the next time slot after
>> the last one used by the preceding URB, even if that time slot
>> has already expired.
>
>There is no meaning of submitting an URB for expired time slot.
Of course there is. The HCD cannot exactly know whether the current
slot will expire before the URB is enqueued, so it is not always
possible to label the slot as "expired" or not during submission.
The meaning of an isochronous URB submission is "try to transmit this
data in that frame"; whether the URB actually was transferred will be
reported to the completion callback.
Correct, I understand it. Let me explain with an example what I wanted
to convey:
Lets assume that URB1-8 has been submitted to HCD driver from upper
layer. HCD driver has also further submitted them to the controller
hardware for execution in n to (n+7)th uf respectively. Now URB3 was not
able to be transmitted in time and resulted in missed isoc. This failure
will cause mainly because of two reasons:
1. SW was slow enough in submission of URB to HW. It actually submitted
when timing was already expired. In this case, it is most likely that
following URBs (4-8) will also result in missed isoc. So, if we add
further URB9 for transmission in (n + 8) uf, most likely it may also
result in missed isoc.
2. SW submitted well in time, but HW was slow enough and could not fetch
data in time. (In case HS it may not occur, but in case of SS it may
occur sometime, so this case may not be valid for ehci-hcd). In such
situation, HW will flush current descriptor and most likely will be able
to transmit next URB correctly.
So, What I was proposing, to go for dynamic, something like this... When
an HCD gets an URB request for any isoc pipe, and if there is any
pending missed isoc flag then wait.. do not submit it to controller. May
be just keep them in received list(submitted_list). If during any of the
pending completion callback, SW observes success then submit all from
submitted_list to be scheduled in "very next uf", and clear pending
missed isoc flag.
If none of the submitted URB results in success, then do not submit them
in "very next frame", rather submit for "the first time slot known to be
available".
Regards
Pratyush
--
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