Re: [patch 2.6.29] usb: ehci-sched.c: EHCI SITD scheduling bugfix (resend)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2009/4/9 David Brownell <david-b@xxxxxxxxxxx>:
> On Wednesday 08 April 2009, Dan Streetman wrote:
>>
>> This is a resend of this patch, I previously sent an email on 3/27 but got no
>> response.  James Kung pointed out this bug to me.
>>
>> The -1 appears to be a bug that prevents checking the last fully used uframe for
>> a split isoc transfer.  The code currently does not check the last fully used
>> uframe of a multi-uframe fullspeed isoc transfer.  This patch changes it to
>> check each fully used uframe of a multi-uframe fullspeed isoc transfer.
>>
>> David, Greg, I believe this patch should be applied, do you agree?
>
> Seems plausible to me.  Do we have confirmation that it fixes
> anything, or is this "theoretical" in that sense?
>
> I don't have time to dig back into the TT scheduling morass,
> so I don't recall why the "-1" is there.

Actually, this bug really cause some problem.

I plug an USB mouse and an USB sound card in to USB2.0 HUB.
When I play music with the 192 byte data in every frame, the mouse will be
port reset by kernel. Because the start split of QH of intr. IN
endpoint is scheduled
at the first micro frame, and the SITD of isoc. OUT endpoint is scheduled
at the first and the second micro frame. At the first micro frame, the
HUB need to execute 188 byte start split isoc. OUT transaction and a start split
intr. IN transaction. Some HUBs can successfully execute the two split
transaction
at the first micro frame, but some HUBs (e.g. NEC µPD720114) can not.

>
>> Signed-off-by: Dan Streetman <ddstreet@xxxxxxxx>
>>
>>
>> --- linux-2.6.29/drivers/usb/host/ehci-sched.c        2009-03-23 19:12:14.000000000 -0400
>> +++ b/drivers/usb/host/ehci-sched.c   2009-03-27 17:11:07.000000000 -0400
>> @@ -323,7 +323,7 @@ static int tt_available (
>>                * already scheduled transactions
>>                */
>>               if (125 < usecs) {
>> -                     int ufs = (usecs / 125) - 1;
>> +                     int ufs = (usecs / 125);
>>                       int i;
>>                       for (i = uframe; i < (uframe + ufs) && i < 8; i++)
>>                               if (0 < tt_usecs[i]) {
>>
>>
>>
>>
>
>
>
>
--
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

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux