Repository navigation
Sdw/ack naks startup - #2559
Sdw/ack naks startup#2559plbossart wants to merge 6 commits into
Conversation
The existing code reports a NAK only when ACK=0 This is not aligned with the SoundWire 1.x specifications. Table 32 in the SoundWire 1.2 specification shows that a Device shall not set NAK=1 if ACK=1. But Table 33 shows the Combined Response may very well be NAK=1/ACK=1, e.g. if another Device than the one addressed reports a parity error. NAK=1 signals a 'Command_Aborted', regardless of the ACK bit value. Move the tests for NAK so that the NAK=1/ACK=1 combination is properly detected according to the specification. Fixes: 956baa1 ('soundwire: cdns: Add sdw_master_ops and IO transfer support') Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
There are too many logs on startup, e.g. [ 8811.851497] cdns_fill_msg_resp: 2 callbacks suppressed [ 8811.851497] intel-sdw intel-sdw.0: Msg Ack not received [ 8811.851498] intel-sdw intel-sdw.0: Msg Ack not received [ 8811.851499] intel-sdw intel-sdw.0: Msg Ack not received [ 8811.851499] intel-sdw intel-sdw.0: Msg Ack not received [ 8811.851500] intel-sdw intel-sdw.0: Msg Ack not received [ 8811.851500] intel-sdw intel-sdw.0: Msg Ack not received [ 8811.851502] intel-sdw intel-sdw.0: Msg ignored for Slave 0 [ 8811.851503] soundwire sdw-master-0: No more devices to enumerate We can skip the 'Msg Ack not received' since it's typical of the enumeration end, and conversely add the information on which command fails. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
We want to make sure the transactions don't start immediately and that Slave events are not reported too early. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Make sure we see ALL events for debug. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
|
We still have an odd error on TGL-Volteer |
Something goes wrong when a device loses sync Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Not sure what happens, add code to get a trace Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
|
@plbossart no multi-link for 98373 on volteer. I doubt we lost one interrupt since two 98373 may trigger interrupt at the same time at rare chance, so it is difficult to reproduce it. |
|
Actually we never did stress test with two slaves on single link case before 98373 coming since we don't have such device without any rework. I tested two 1308s on single link but we need to rework tgl, use external 3-in-1 board and change machine driver, so QA can't test it easily. |
|
I have a interesting idea: what will happen if more than two slaves are on single link ? With Up extreme or tgl rvp (reworked), we can connect one rt711, two rt1308s, one rt715 to one header with 3-in-1 board. Maybe we can get more interrupt to reproduce bug. |
@plbossart It looks like somehow Slave 2 is unattached shortly after attached. I don't even see |
This looks like a real bus conflict/electrical issue:
The bus clash tells us the Slave 2 (device:3) somehow drives bits that are owned by Slave 1 (device :7). That doesn't sound good at all. @RanderWang yes we could try to reproduce the issue by putting two max98373 on the same link with an RVP+eval boards, but keep in mind it would be a different electrical configuration (trace length, damping resistors, etc). SoundWire requires a careful hardware design, it's not expected to work without paying attention to the low-level electrical parameters. |
Thanks. your idea goes far more than mine. I just want to test on tgl-rvp with 3-in-1. I connected 3 slave to link0 today. Good news is everything works well, bad news is the failure rate doesn't increase immediately |
|
I caught one error. Since 1308 is in external board, maybe the connection was unstable, but this error happens rarely |
|
replaced by PR #2565 |
This looks like a complete fail at the electrical level.... Not sure how we can do anything at the software level when commands are NAKed and parity/bus clashes are reported. |
Draft pull request to try and address unexplained suspend-resume issues, with NAKs reported.