]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mtd: spi-nor: Check bus width while setting QE bit
authorHsin-Yi Wang <hsinyi@chromium.org>
Fri, 18 Aug 2023 06:42:23 +0000 (14:42 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 19 Sep 2023 10:22:49 +0000 (12:22 +0200)
commit679a71b3117938bd94ee02f7fdb5c957ae504ac4
tree2f1a942b3a9ab3f757b604cea357777b0148f1f1
parent8869fd166f23bd594f05b890f53932776cd8f272
mtd: spi-nor: Check bus width while setting QE bit

[ Upstream commit f01d8155a92e33cdaa85d20bfbe6c441907b3c1f ]

spi_nor_write_16bit_sr_and_check() should also check if bus width is
4 before setting QE bit.

Fixes: 39d1e3340c73 ("mtd: spi-nor: Fix clearing of QE bit on lock()/unlock()")
Suggested-by: Michael Walle <michael@walle.cc>
Suggested-by: Tudor Ambarus <tudor.ambarus@linaro.org>
Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org>
Reviewed-by: Michael Walle <michael@walle.cc>
Link: https://lore.kernel.org/r/20230818064524.1229100-2-hsinyi@chromium.org
Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/mtd/spi-nor/core.c