Patch "spi: meson-spicc: do not rely on busy flag in pow2 clk ops" 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

    spi: meson-spicc: do not rely on busy flag in pow2 clk ops

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:
     spi-meson-spicc-do-not-rely-on-busy-flag-in-pow2-clk.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 605fda7bb1935be854bc18114c14e8ffe96cbb03
Author: Neil Armstrong <narmstrong@xxxxxxxxxxxx>
Date:   Thu Sep 8 14:18:03 2022 +0200

    spi: meson-spicc: do not rely on busy flag in pow2 clk ops
    
    [ Upstream commit 36acf80fc0c4b5ebe6fa010b524d442ee7f08fd3 ]
    
    Since [1], controller's busy flag isn't set anymore when the
    __spi_transfer_message_noqueue() is used instead of the
    __spi_pump_transfer_message() logic for spi_sync transfers.
    
    Since the pow2 clock ops were limited to only be available when a
    transfer is ongoing (between prepare_transfer_hardware and
    unprepare_transfer_hardware callbacks), the only way to track this
    down is to check for the controller cur_msg.
    
    [1] ae7d2346dc89 ("spi: Don't use the message queue if possible in spi_sync")
    
    Fixes: 09992025dacd ("spi: meson-spicc: add local pow2 clock ops to preserve rate between messages")
    Fixes: ae7d2346dc89 ("spi: Don't use the message queue if possible in spi_sync")
    Reported-by: Markus Schneider-Pargmann <msp@xxxxxxxxxxxx>
    Signed-off-by: Neil Armstrong <narmstrong@xxxxxxxxxxxx>
    Tested-by: Markus Schneider-Pargmann <msp@xxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20220908121803.919943-1-narmstrong@xxxxxxxxxxxx
    Signed-off-by: Mark Brown <broonie@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/spi/spi-meson-spicc.c b/drivers/spi/spi-meson-spicc.c
index e4cb52e1fe26..6974a1c947aa 100644
--- a/drivers/spi/spi-meson-spicc.c
+++ b/drivers/spi/spi-meson-spicc.c
@@ -537,7 +537,7 @@ static unsigned long meson_spicc_pow2_recalc_rate(struct clk_hw *hw,
 	struct clk_divider *divider = to_clk_divider(hw);
 	struct meson_spicc_device *spicc = pow2_clk_to_spicc(divider);
 
-	if (!spicc->master->cur_msg || !spicc->master->busy)
+	if (!spicc->master->cur_msg)
 		return 0;
 
 	return clk_divider_ops.recalc_rate(hw, parent_rate);
@@ -549,7 +549,7 @@ static int meson_spicc_pow2_determine_rate(struct clk_hw *hw,
 	struct clk_divider *divider = to_clk_divider(hw);
 	struct meson_spicc_device *spicc = pow2_clk_to_spicc(divider);
 
-	if (!spicc->master->cur_msg || !spicc->master->busy)
+	if (!spicc->master->cur_msg)
 		return -EINVAL;
 
 	return clk_divider_ops.determine_rate(hw, req);
@@ -561,7 +561,7 @@ static int meson_spicc_pow2_set_rate(struct clk_hw *hw, unsigned long rate,
 	struct clk_divider *divider = to_clk_divider(hw);
 	struct meson_spicc_device *spicc = pow2_clk_to_spicc(divider);
 
-	if (!spicc->master->cur_msg || !spicc->master->busy)
+	if (!spicc->master->cur_msg)
 		return -EINVAL;
 
 	return clk_divider_ops.set_rate(hw, rate, parent_rate);



[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