soc: fsl: cpm1: qmc: Update TRNSYNC only in transparent mode
BugLink: https://bugs.launchpad.net/bugs/2089340 commit c3cc3e69b33fee3d276895e0e2d1a8fb37ea5d0e upstream. The TRNSYNC feature is available (and enabled) only in transparent mode. Since commit7cc9bda9c1("soc: fsl: cpm1: qmc: Handle timeslot entries at channel start() and stop()") TRNSYNC register is updated in transparent and hdlc mode. In hdlc mode, the address of the TRNSYNC register is used by the QMC for other internal purpose. Even if no weird results were observed in hdlc mode, touching this register in this mode is wrong. Update TRNSYNC only in transparent mode. Fixes:7cc9bda9c1("soc: fsl: cpm1: qmc: Handle timeslot entries at channel start() and stop()") 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/20240808071132.149251-2-herve.codina@bootlin.com Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Portia Stephens <portia.stephens@canonical.com> Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
This commit is contained in:
committed by
Mehmet Basaran
parent
e1dac5954a
commit
65b80fc34a
+14
-10
@@ -940,11 +940,13 @@ static int qmc_chan_start_rx(struct qmc_chan *chan)
|
||||
goto end;
|
||||
}
|
||||
|
||||
ret = qmc_setup_chan_trnsync(chan->qmc, chan);
|
||||
if (ret) {
|
||||
dev_err(chan->qmc->dev, "chan %u: setup TRNSYNC failed (%d)\n",
|
||||
chan->id, ret);
|
||||
goto end;
|
||||
if (chan->mode == QMC_TRANSPARENT) {
|
||||
ret = qmc_setup_chan_trnsync(chan->qmc, chan);
|
||||
if (ret) {
|
||||
dev_err(chan->qmc->dev, "chan %u: setup TRNSYNC failed (%d)\n",
|
||||
chan->id, ret);
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
/* Restart the receiver */
|
||||
@@ -982,11 +984,13 @@ static int qmc_chan_start_tx(struct qmc_chan *chan)
|
||||
goto end;
|
||||
}
|
||||
|
||||
ret = qmc_setup_chan_trnsync(chan->qmc, chan);
|
||||
if (ret) {
|
||||
dev_err(chan->qmc->dev, "chan %u: setup TRNSYNC failed (%d)\n",
|
||||
chan->id, ret);
|
||||
goto end;
|
||||
if (chan->mode == QMC_TRANSPARENT) {
|
||||
ret = qmc_setup_chan_trnsync(chan->qmc, chan);
|
||||
if (ret) {
|
||||
dev_err(chan->qmc->dev, "chan %u: setup TRNSYNC failed (%d)\n",
|
||||
chan->id, ret);
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user