Patch "spi: bcm63xx-hsspi: Endianness fix for ARM based SoC" has been added to the 4.19-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: bcm63xx-hsspi: Endianness fix for ARM based SoC

to the 4.19-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-bcm63xx-hsspi-endianness-fix-for-arm-based-soc.patch
and it can be found in the queue-4.19 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit e19b7cbc048e87c72124953619a3b2ea546472ce
Author: William Zhang <william.zhang@xxxxxxxxxxxx>
Date:   Mon Feb 6 22:58:17 2023 -0800

    spi: bcm63xx-hsspi: Endianness fix for ARM based SoC
    
    [ Upstream commit 85a84a61699990db6a025b5073f337f49933a875 ]
    
    HSSPI controller uses big endian for the opcode in the message to the
    controller ping pong buffer. Use cpu_to_be16 to properly handle the
    endianness for both big and little endian host.
    
    Fixes: 142168eba9dc ("spi: bcm63xx-hsspi: add bcm63xx HSSPI driver")
    Signed-off-by: Kursad Oney <kursad.oney@xxxxxxxxxxxx>
    Signed-off-by: William Zhang <william.zhang@xxxxxxxxxxxx>
    Acked-by: Florian Fainelli <f.fainelli@xxxxxxxxx>
    
    Link: https://lore.kernel.org/r/20230207065826.285013-7-william.zhang@xxxxxxxxxxxx
    Signed-off-by: Mark Brown <broonie@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/spi/spi-bcm63xx-hsspi.c b/drivers/spi/spi-bcm63xx-hsspi.c
index 2ad7b3f3666be..443a480767e09 100644
--- a/drivers/spi/spi-bcm63xx-hsspi.c
+++ b/drivers/spi/spi-bcm63xx-hsspi.c
@@ -192,7 +192,7 @@ static int bcm63xx_hsspi_do_txrx(struct spi_device *spi, struct spi_transfer *t)
 			tx += curr_step;
 		}
 
-		__raw_writew(opcode | curr_step, bs->fifo);
+		__raw_writew((u16)cpu_to_be16(opcode | curr_step), bs->fifo);
 
 		/* enable interrupt */
 		__raw_writel(HSSPI_PINGx_CMD_DONE(0),



[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