Some ULPI transfer aborts are not correctly handled
miek opened this issue · 0 comments
We've been having some intermittent failures of the sideband PHY tests in the interactive-test applet, and I narrowed that down to failure during the write to the PHY register (patching the test to perform the write twice made all test runs pass).
A good transaction looks like this:
and a failing one looks like this:
According to the spec, the PHY can abort the transfer by asserting dir
:
3.8.4.1
Link aborted by PHY
When the Link is transferring data on the ULPI bus, the PHY can abort the Link by asserting dir. ULPI does
not specify any conditions that will cause this to happen.
but it isn't very clear about when that can happen during the transfer.
However, another section suggests that if dir
is asserted in the same cycle as stp
, then stp
will be ignored:
The Link cannot abort the PHY in the same cycle that dir is asserted, and the PHY must ignore stp in the
same cycle that it first asserts dir.
Currently we check for dir
being asserted when we pulse stp
, but I think we also need to check again in the next cycle in case they were asserted at the same time (as in the bad trace above).