Patch "spi: npcm-fiu: Fix UMA reads when dummy.nbytes == 0" 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: npcm-fiu: Fix UMA reads when dummy.nbytes == 0

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-npcm-fiu-fix-uma-reads-when-dummy.nbytes-0.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 8898f6645924b7c9089046340e9e8d03c1db2546
Author: William A. Kennington III <william@xxxxxxxxxxxxxxx>
Date:   Fri Sep 22 11:28:12 2023 -0700

    spi: npcm-fiu: Fix UMA reads when dummy.nbytes == 0
    
    [ Upstream commit 2ec8b010979036c2fe79a64adb6ecc0bd11e91d1 ]
    
    We don't want to use the value of ilog2(0) as dummy.buswidth is 0 when
    dummy.nbytes is 0. Since we have no dummy bytes, we don't need to
    configure the dummy byte bits per clock register value anyway.
    
    Signed-off-by: "William A. Kennington III" <william@xxxxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20230922182812.2728066-1-william@xxxxxxxxxxxxxxx
    Signed-off-by: Mark Brown <broonie@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/spi/spi-npcm-fiu.c b/drivers/spi/spi-npcm-fiu.c
index b62471ab6d7f2..1edaf22e265bf 100644
--- a/drivers/spi/spi-npcm-fiu.c
+++ b/drivers/spi/spi-npcm-fiu.c
@@ -334,8 +334,9 @@ static int npcm_fiu_uma_read(struct spi_mem *mem,
 		uma_cfg |= ilog2(op->cmd.buswidth);
 		uma_cfg |= ilog2(op->addr.buswidth)
 			<< NPCM_FIU_UMA_CFG_ADBPCK_SHIFT;
-		uma_cfg |= ilog2(op->dummy.buswidth)
-			<< NPCM_FIU_UMA_CFG_DBPCK_SHIFT;
+		if (op->dummy.nbytes)
+			uma_cfg |= ilog2(op->dummy.buswidth)
+				<< NPCM_FIU_UMA_CFG_DBPCK_SHIFT;
 		uma_cfg |= ilog2(op->data.buswidth)
 			<< NPCM_FIU_UMA_CFG_RDBPCK_SHIFT;
 		uma_cfg |= op->dummy.nbytes << NPCM_FIU_UMA_CFG_DBSIZ_SHIFT;



[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