Question regarding ClearTTBuffer request on closing of USB serial device

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

 



Hi,

I have been analyzing USB traffic with USB 2.0 protocol analyzer. In
my test setup I have a Full-Speed USB serial device connected to
High-Speed hub which is connected to Linux host. The protocol analyzer
is connected between the Linux host and the High-Speed hub. The test
case which I have been analyzing opens the serial device, writes a few
bytes to the device and closes the device. The USB serial device has a
bulk IN endpoint and a bulk OUT endpoint for data transfer.

When the device node of the USB serial device is closed from user
space, I can see that usually the last transaction to the bulk IN
endpoint of the USB serial device is a start-split transaction without
a corresponding complete-split transaction. Sometimes the split
transaction is completed with the corresponding complete-split but
most often not. The transaction translator buffer of the High-Speed
hub is always cleared with ClearTTBuffer request regardless if the
split transaction was completed or not.

I have tested this case with a USB to serial converter (pl2303) using
pl2303 driver and usbserial_generic driver. I also used USB CDC device
with cdc_acm driver. The results are the same with every case.

My question is that why is ClearTTBuffer request always used in this
case? According to the USB 2.0 specification paragraph 11.17.5 (on
page 372), ClearTTBuffer should be used as a part of endpoint halt
processing when split transactions have failed. Wouldn't it be better
to always complete the started split transaction instead of always
send ClearTTBuffer request?

Thanks,

Antti Pulakka
--
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