Patch "mtd: spi-nor: otp: fix access to security registers in 4 byte mode" has been added to the 5.13-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

    mtd: spi-nor: otp: fix access to security registers in 4 byte mode

to the 5.13-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:
     mtd-spi-nor-otp-fix-access-to-security-registers-in-.patch
and it can be found in the queue-5.13 subdirectory.

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



commit 192f995e1d0e8515b7e185dfe8d0f9eb9989d867
Author: Michael Walle <michael@xxxxxxxx>
Date:   Mon Jun 7 13:27:41 2021 +0200

    mtd: spi-nor: otp: fix access to security registers in 4 byte mode
    
    [ Upstream commit b97b1a769849beb6b40b740817b06f1a50e1c589 ]
    
    The security registers either take a 3 byte or a 4 byte address offset,
    depending on the address mode of the flash. Thus just leave the
    nor->addr_width as is.
    
    Fixes: cad3193fe9d1 ("mtd: spi-nor: implement OTP support for Winbond and similar flashes")
    Signed-off-by: Michael Walle <michael@xxxxxxxx>
    Signed-off-by: Vignesh Raghavendra <vigneshr@xxxxxx>
    Reviewed-by: Tudor Ambarus <tudor.ambarus@xxxxxxxxxxxxx>
    Acked-by: Pratyush Yadav <p.yadav@xxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/mtd/spi-nor/otp.c b/drivers/mtd/spi-nor/otp.c
index fcf38d260345..5c51a2c9be61 100644
--- a/drivers/mtd/spi-nor/otp.c
+++ b/drivers/mtd/spi-nor/otp.c
@@ -40,7 +40,6 @@ int spi_nor_otp_read_secr(struct spi_nor *nor, loff_t addr, size_t len, u8 *buf)
 	rdesc = nor->dirmap.rdesc;
 
 	nor->read_opcode = SPINOR_OP_RSECR;
-	nor->addr_width = 3;
 	nor->read_dummy = 8;
 	nor->read_proto = SNOR_PROTO_1_1_1;
 	nor->dirmap.rdesc = NULL;
@@ -84,7 +83,6 @@ int spi_nor_otp_write_secr(struct spi_nor *nor, loff_t addr, size_t len,
 	wdesc = nor->dirmap.wdesc;
 
 	nor->program_opcode = SPINOR_OP_PSECR;
-	nor->addr_width = 3;
 	nor->write_proto = SNOR_PROTO_1_1_1;
 	nor->dirmap.wdesc = NULL;
 



[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