Patch "soundwire: bus: use sdw_write_no_pm when setting the bus scale registers" 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: bus: use sdw_write_no_pm when setting the bus scale registers

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-bus-use-sdw_write_no_pm-when-setting-the-b.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 0dfac307b1e6b4def3c469bd73c6a9dd732a8f8b
Author: Pierre-Louis Bossart <pierre-louis.bossart@xxxxxxxxxxxxxxx>
Date:   Fri Jan 22 15:06:27 2021 +0800

    soundwire: bus: use sdw_write_no_pm when setting the bus scale registers
    
    [ Upstream commit 299e9780b9196bcb15b26dfdccd3244eb072d560 ]
    
    When a Slave device is resumed, it may resume the bus and restart the
    enumeration. During that process, we absolutely don't want to call
    regular read/write routines which will wait for the resume to
    complete, otherwise a deadlock occurs.
    
    This patch fixes the same problem as the previous one, but is split to
    make the life of linux-stable maintainers less painful.
    
    Fixes: 29d158f90690 ('soundwire: bus: initialize bus clock base and scale registers')
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@xxxxxxxxxxxxxxx>
    Reviewed-by: Rander Wang <rander.wang@xxxxxxxxxxxxxxx>
    Signed-off-by: Bard Liao <yung-chuan.liao@xxxxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20210122070634.12825-3-yung-chuan.liao@xxxxxxxxxxxxxxx
    Signed-off-by: Vinod Koul <vkoul@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/soundwire/bus.c b/drivers/soundwire/bus.c
index 0345f9af6e865..944a4222b2f9d 100644
--- a/drivers/soundwire/bus.c
+++ b/drivers/soundwire/bus.c
@@ -1222,7 +1222,7 @@ static int sdw_slave_set_frequency(struct sdw_slave *slave)
 	}
 	scale_index++;
 
-	ret = sdw_write(slave, SDW_SCP_BUS_CLOCK_BASE, base);
+	ret = sdw_write_no_pm(slave, SDW_SCP_BUS_CLOCK_BASE, base);
 	if (ret < 0) {
 		dev_err(&slave->dev,
 			"SDW_SCP_BUS_CLOCK_BASE write failed:%d\n", ret);
@@ -1230,13 +1230,13 @@ static int sdw_slave_set_frequency(struct sdw_slave *slave)
 	}
 
 	/* initialize scale for both banks */
-	ret = sdw_write(slave, SDW_SCP_BUSCLOCK_SCALE_B0, scale_index);
+	ret = sdw_write_no_pm(slave, SDW_SCP_BUSCLOCK_SCALE_B0, scale_index);
 	if (ret < 0) {
 		dev_err(&slave->dev,
 			"SDW_SCP_BUSCLOCK_SCALE_B0 write failed:%d\n", ret);
 		return ret;
 	}
-	ret = sdw_write(slave, SDW_SCP_BUSCLOCK_SCALE_B1, scale_index);
+	ret = sdw_write_no_pm(slave, SDW_SCP_BUSCLOCK_SCALE_B1, scale_index);
 	if (ret < 0)
 		dev_err(&slave->dev,
 			"SDW_SCP_BUSCLOCK_SCALE_B1 write failed:%d\n", ret);



[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