Hello supporters
We want to execute USB 2.0 High Speed electrical conformance tests by menas of the PIDVID test fixture (see https://fixturesolution.com/product/pidvid/).
We run a vanilla Linux realtime kernel v5.4.69-rt39 on a AM335x based custom platform. We configured the USB part according to the document below:
https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=&ved=2ahUKEwjUsePloPHuAhXBwAIHHZMiDCYQFjAAegQIARAC&url=https%3A%2F%2Fprocessors.wiki.ti.com%2Findex.php%2FMUSB_Linux_Driver_Configuration&usg=AOvVaw2FwTzrO7Lz4PRRNbZ6jgbg
Furthermore we activate the CONFIG_USB_TEST=y and the CONFIG_USB_EHSET_TEST_FIXTURE=y kernel configuration options.
When we select the Test_PACKET test on the PIDVID test fixture, we see the following messages:
[ 60.152701] 000: usb 1-1: new high-speed USB device number 2 using musb-hdrc
[ 60.333575] 000: usb 1-1: New USB device found, idVendor=1a0a, idProduct=0104, bcdDevice= 1.00
[ 60.333608] 000: usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 60.333622] 000: usb 1-1: Product: USB EHOST TESTER
[ 60.333633] 000: usb 1-1: Manufacturer: USB EHOST TESTER
[ 60.333643] 000: usb 1-1: SerialNumber: IOV3
[ 60.337037] 000: usb_ehset_test: probe of 1-1:1.0 failed with error -32
I found some requests in mailing lists describing similar symptoms, see
https://lore.kernel.org/linux-usb/BYAPR20MB25012D076C3D44E07BA32C89CCB60@BYAPR20MB2501.namprd20.prod.outlook.com/
https://www.mail-archive.com/linux-usb@vger.kernel.org/msg114173.html
However the measures proposed there did not help in our case. We played arount a lot with different kernel configuration options without any success.
Finally we started a debug session and found, that the error (-EPIPE) is generated inside the musb_hub_control() function when probing the ehset kernel
module. Call chain:
... -> ehset_probe() -> usb_control_msg() -> usb_internal_control_msg() -> usb_start_wait_urb -> usb_submit_urb() -> usb_hcd_submit_urb -> rh_urb_enqueue() -> rh_call_control() -> musb_hub_control()
Here the following code snipped produces the error:
case USB_PORT_FEAT_TEST:
if (unlikely(is_host_active(musb)))
goto error;
The macro is_host_active() equals musb->is_host.
This looks very stange to me. The DUT is of course host and the PIDVID test fixture takes the gadget role.
Any help is very much appreciated.