Skip to content

SoundWire/improve transfer failed detection - #2565

Merged
plbossart merged 3 commits into
thesofproject:topic/sof-devfrom
plbossart:sdw/improve-transfer-failed-detection
Nov 17, 2020
Merged

plbossart merged 3 commits into
thesofproject:topic/sof-devfrom
plbossart:sdw/improve-transfer-failed-detection

Conversation

@plbossart

Copy link
Copy Markdown
Member

Contributions from @bardliao and @plbossart combined in one PR.
This replaces PR #2559 and PR #2564

bardliao and others added 3 commits November 17, 2020 10:02
The current error log does not provide details on the type of
transfers and which address/count was requested. All this information
can help locate in which parts of the configuration process an error
occurred.

Co-developed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
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>
@plbossart
plbossart force-pushed the sdw/improve-transfer-failed-detection branch from 3e6b2f5 to 7f6b86d Compare November 17, 2020 16:03
@plbossart

Copy link
Copy Markdown
Member Author

I am going to take a calculated risk and use my superpowers to merge this PR without reviews, so that we can have better reports in daily tests. That will leave us 3 working days until the Thanksgiving break to figure out what happened.
Worst case we can always revert this.

@plbossart
plbossart merged commit cfa9a86 into thesofproject:topic/sof-dev Nov 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants