Ticket #12254 (closed defect: fixed)

Opened 22 months ago

Last modified 21 months ago

test-all fails on USB test

Reported by: Quozl Owned by: Quozl
Priority: low Milestone: Not Triaged
Component: ofw - open firmware Version: not specified
Keywords: Cc:
Action Needed: no action Verified: no
Deployments affected: Blocked By:


The old test-all command in Open Firmware is failing on the USB hub test on XO-1.75 and XO-4 using svn head r3344.

Testing /usb@d4208000/hub@0,0
Failed to get hub descriptor
Failed to get port status for port 3 
Get-port-status failed for hub port 3 

Only occurs if the SoC USB port is tested first, which is normal when using test-all. Can be reproduced outside test-all with:

ok test /usb@d4208000             \ the SoC port attached to the hub
ok test /usb@d4208000/hub@0,0     \ the USB hub chip

Can be prevented by defining selftest as a false noop in cpu/arm/olpc/usb.fth .

hub-id returns -1 0 in the failing case, showing that the assigned-address property has changed.

assigned-address is 00000001 on first .properties after a select of the hub. But after a test of the SoC port, the hub assigned-address is 00000002. It is incremented by each test of the SoC port.

reuse-node is responsible for changing the assigned-address, the call chain above is reuse-old-node?, (make-device-node), make-device-node, make-root-hub-node, make-port-node, probe-root-hub-port, wait-connect, sagacity, selftest.

The test of the SoC USB port leads to a probe, and the probe leads to a change of address for the hub?

It would seem the simplest solution is to disable the port self test.

Not critical for manufacturing, as test-all is no longer used, instead the devices to be tested are selected by autorun-mfg-tests.

Change History

Changed 22 months ago by wmb@…

  • next_action changed from never set to test in build

The root cause of this problem is the way that #11845 was fixed. That change (svn 3004) caused ports to be reprobed, even if there was a device attached that had been successfully probed and was working; reprobing could cause it to stop working, particularly in the case of built-in hubs.

The fix to this ticket is in svn 3444, which modifies the selftest logic so that devices that are already present prior to selftest execution are not reprobed, but rather their identification information is displayed. With this change, execution of USB selftest is stable in any order, whether in diag mode or not.

svn 3444 add the additional feature of making it easy to invoke the old fisheye test, which svn 3004 hid under the hood. To invoke fisheye:

   ok false to diag-switch?    \ diag-switch? is usually already false ...
   ok test /usb:fisheye        \ Fisheye pattern to unpopulated USB root ports
   ok test /usb:fisheye/hub    \ Fisheye pattern to unpopulated USB hub ports

Changed 21 months ago by Quozl

  • status changed from new to closed
  • next_action changed from test in build to no action
  • resolution set to fixed

Works for me.

Changed 21 months ago by Quozl

Is in Q4D25 for XO-1.75.

Changed 21 months ago by Quozl

Is in Q7B08 for XO-4.

Note: See TracTickets for help on using tickets.