Patch "soundwire: cadence: fix ACK/NAK handling" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    soundwire: cadence: fix ACK/NAK handling

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     soundwire-cadence-fix-ack-nak-handling.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 6fb5681d796e094e448d98d3070c35a9be0c00e2
Author: Pierre-Louis Bossart <pierre-louis.bossart@xxxxxxxxxxxxxxx>
Date:   Fri Jan 15 13:37:37 2021 +0800

    soundwire: cadence: fix ACK/NAK handling
    
    [ Upstream commit db9d9f944f95e7f3aa60ac00cbd502415152c421 ]
    
    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: 956baa1992f9a ('soundwire: cdns: Add sdw_master_ops and IO transfer support')
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@xxxxxxxxxxxxxxx>
    Signed-off-by: Bard Liao <yung-chuan.liao@xxxxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20210115053738.22630-5-yung-chuan.liao@xxxxxxxxxxxxxxx
    Signed-off-by: Vinod Koul <vkoul@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/soundwire/cadence_master.c b/drivers/soundwire/cadence_master.c
index 9fa55164354a2..580660599f461 100644
--- a/drivers/soundwire/cadence_master.c
+++ b/drivers/soundwire/cadence_master.c
@@ -484,10 +484,10 @@ cdns_fill_msg_resp(struct sdw_cdns *cdns,
 		if (!(cdns->response_buf[i] & CDNS_MCP_RESP_ACK)) {
 			no_ack = 1;
 			dev_dbg_ratelimited(cdns->dev, "Msg Ack not received\n");
-			if (cdns->response_buf[i] & CDNS_MCP_RESP_NACK) {
-				nack = 1;
-				dev_err_ratelimited(cdns->dev, "Msg NACK received\n");
-			}
+		}
+		if (cdns->response_buf[i] & CDNS_MCP_RESP_NACK) {
+			nack = 1;
+			dev_err_ratelimited(cdns->dev, "Msg NACK received\n");
 		}
 	}
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux