Re: [PATCH 1/2] usb: dwc3: gadget: set xfer resource per endpoint

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

 



On 6/3/2016 3:55 AM, Felipe Balbi wrote:
> 
> Hi,
> 
> John Youn <John.Youn@xxxxxxxxxxxx> writes:
>>>>> This reverts back to the original buggy behavior. This will fail when
>>>>> a SET_INTERFACE occurs multiple times.
>>>>>
>>>>> You can run testusb to see the failure:
>>>>> testusb -t 9 -c 5000 -s 2048 -a
>>>>
>>>> I came up with something else for this. It's still unstable and I need
>>>> to debug further to figure out where we're wrong. But it seems to me
>>>> that we're following databook down to the last comma with patch
>>>> below. Note that we're partially reverting your original changes and
>>>> adding some extra knowledge about current configuration and interface,
>>>> then we only reassign transfer resources if those change. Care to have a
>>>> look?
>>>
>>> here's a version that passes testusb and normal enumeration with g_zero
>>> and g_mass_storage. After some experimenting, it seems like we should
>>> always MODIFY resource allocation, unless we're doing a SetConfiguration
>>> to the same configuration that is already chosen or a SetInterface to
>>> the same interface/alt-setting pair that's already being used. This is
>>> working for me. Can you test on your end too?
>>
>> Hi Felipe,
>>
>> You might be treading down a path we've already visited here :)
> 
> :)
> 
>> It looks like this patch will still fail the case with multiple
>> interfaces, with one or more having alt-settings. You will end up in a
>> situation where multiple endpoints are assigned the same transfer
>> resource which will cause failures.
>>
>> Unfortunately I don't have an easy test outside of our test
>> environment that exposes this.
> 
> oh okay
> 
>> You could try creating a composite device. Interface #1 having a
>> single alt setting, interface #2 with multiple alt-settings. Start
>> traffic to both interfaces, then start setting different alt-settings
>> on interface #2.
>>
>> The problem is the databook does not cover this condition. The
>> documentation will be fixed in 3.20a.
>>
>> Ravi Babu originally reported this and you can see discussion in this
>> thread:
>>
>> http://marc.info/?l=linux-usb&m=145396682025403&w=2
> 
> in that case, I'll just wait for your fix. But we really this fixed
> during this -rc cycle, so I can get my latest improvements (see
> testing/next) merged for v4.8.

The previous fix does have a different issue, but not anything to do
with End Transfer. I will try to reproduce with your testing/next.

Unfortunately I need to work on a different project for the next 2-3
weeks so I don't know if I'll have enough time to look at this for rc.

Regards,
John
--
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