Commit 5a0d872c authored by Mika Westerberg's avatar Mika Westerberg Committed by sanglipeng
Browse files

mtd: spi-nor: intel-spi: Disable write protection only if asked

stable inclusion
from stable-v5.10.156
commit 23793518a7523887266769d9345c683e08c590e8
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I7MCG1

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



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

[ Upstream commit cd149eff ]

Currently the driver tries to disable the BIOS write protection
automatically even if this is not what the user wants. For this reason
modify the driver so that by default it does not touch the write
protection. Only if specifically asked by the user (setting writeable=1
command line parameter) the driver tries to disable the BIOS write
protection.

Signed-off-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: default avatarMauro Lima <mauro.lima@eclypsium.com>
Reviewed-by: default avatarTudor Ambarus <tudor.ambarus@microchip.com>
Acked-by: default avatarLee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20220209122706.42439-2-mika.westerberg@linux.intel.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
Stable-dep-of: 92a66cbf ("spi: intel: Use correct mask for flash and protected regions")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent f9079f8d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment