Commit d59fa576 authored by Hsin-Yi Wang's avatar Hsin-Yi Wang Committed by sanglipeng
Browse files

mtd: spi-nor: Check bus width while setting QE bit

stable inclusion
from stable-v5.10.195
commit 40d8f9bffed068b9b5f5ccd7bdf64984435a7110
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I95JOC

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=40d8f9bffed068b9b5f5ccd7bdf64984435a7110



--------------------------------

[ Upstream commit f01d8155 ]

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

Fixes: 39d1e334 ("mtd: spi-nor: Fix clearing of QE bit on lock()/unlock()")
Suggested-by: default avatarMichael Walle <michael@walle.cc>
Suggested-by: default avatarTudor Ambarus <tudor.ambarus@linaro.org>
Signed-off-by: default avatarHsin-Yi Wang <hsinyi@chromium.org>
Reviewed-by: default avatarMichael Walle <michael@walle.cc>
Link: https://lore.kernel.org/r/20230818064524.1229100-2-hsinyi@chromium.org


Signed-off-by: default avatarTudor Ambarus <tudor.ambarus@linaro.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent d183c854
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment