Re: [PATCH] usb: usbtest: Add TEST 29, toggle sync, Clear toggle between bulk writes

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

 



Hi,

Mathias Nyman <mathias.nyman@xxxxxxxxxxxxxxx> writes:
> On 14.12.2017 20:12, Alan Stern wrote:
>> On Thu, 14 Dec 2017, Mathias Nyman wrote:
>> 
>>> Clear Feature Endpoint Halt should reset the data toggle even if the
>>> endpoint isn't halted. Host should manage to clear the host side data
>>> toggle to keep in sync with the device.
>>>
>>> Test by sending a "3 data packet URB" before and after clearing the halt.
>>> this should create a toggle sequence with two consecutive DATA0 packets.
>>>
>>> A successful test sequence looks like this
>>>      ClearFeature(ENDPOINT_HALT) - initial toggle clear
>>>    DATA0 (max packet sized)
>>>    DATA1 (max packet sized)
>>>    DATA0 (zero length packet)
>>>      ClearFeature(ENDPOINT_HALT) - resets toggle
>>>    DATA0 (max packet sized), if clear halt fails then toggle is DATA1
>>>    DATA1 (max packet sized)
>>>    DATA0 (zero length packet)
>>>
>>> Signed-off-by: Mathias Nyman <mathias.nyman@xxxxxxxxxxxxxxx>
>> 
>> This test is a little unusual in that it doesn't contain a way to
>> detect failures.  That is, you can't tell from the test results whether
>> the device and the host behaved the way they are supposed to (in the
>> case of the host, you could use a USB analyzer to find out).
>> 
>> Also, some devices don't handle Clear-Halt requests properly if the
>> endpoint isn't already halted.  Presumably people wouldn't use one of
>> those devices for this test!  :-)
>
> I was hoping that the device (dwc3 with zero gadget in my case) would
> somehow react if the host sends a DATA1 packet right after
> ClearFeature(ENDPOINT_HALT), but turns out this device accepts it and
> continues to work just fine. So I ended up looking at the traffic with

that's because we prevent clear halt when endpoint is not halted. That
was changed when a problem was found when enumerating against macOS. It
may be that we're actually hiding an IP bug by doing that, however I
never got an argument strong enough to revert the commit.

This, may just be the strong argument I need :-)

-- 
balbi

Attachment: signature.asc
Description: PGP signature


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

  Powered by Linux