soc: fsl: cpm1: qmc: Fix rx channel reset
authorHerve Codina <herve.codina@bootlin.com>
Tue, 5 Dec 2023 15:21:00 +0000 (16:21 +0100)
committerHerve Codina <herve.codina@bootlin.com>
Tue, 12 Dec 2023 09:29:20 +0000 (10:29 +0100)
The qmc_chan_reset_rx() set the is_rx_stopped flag. This leads to an
inconsistent state in the following sequence.
    qmc_chan_stop()
    qmc_chan_reset()
Indeed, after the qmc_chan_reset() call, the channel must still be
stopped. Only a qmc_chan_start() call can move the channel from stopped
state to started state.

Fix the issue removing the is_rx_stopped flag setting from
qmc_chan_reset()

Fixes: 3178d58e0b97 ("soc: fsl: cpm1: Add support for QMC")
Cc: stable@vger.kernel.org
Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Link: https://lore.kernel.org/r/20231205152116.122512-4-herve.codina@bootlin.com
drivers/soc/fsl/qe/qmc.c

index 3f3de1351c9683bebf6aac546fc63f19b5a2d0a2..2312152a44b3ea69e928501301891abb69820026 100644 (file)
@@ -685,7 +685,6 @@ static void qmc_chan_reset_rx(struct qmc_chan *chan)
                    qmc_read16(chan->s_param + QMC_SPE_RBASE));
 
        chan->rx_pending = 0;
-       chan->is_rx_stopped = false;
 
        spin_unlock_irqrestore(&chan->rx_lock, flags);
 }