aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ath79/patches-5.4/450-fix-block-protection-clearing.patch
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/ath79/patches-5.4/450-fix-block-protection-clearing.patch')
-rw-r--r--target/linux/ath79/patches-5.4/450-fix-block-protection-clearing.patch6
1 files changed, 3 insertions, 3 deletions
diff --git a/target/linux/ath79/patches-5.4/450-fix-block-protection-clearing.patch b/target/linux/ath79/patches-5.4/450-fix-block-protection-clearing.patch
index a7ed62302d..dc76161892 100644
--- a/target/linux/ath79/patches-5.4/450-fix-block-protection-clearing.patch
+++ b/target/linux/ath79/patches-5.4/450-fix-block-protection-clearing.patch
@@ -17,12 +17,12 @@ Signed-off-by: Nick Hainke <vincent@systemli.org>
--- a/drivers/mtd/spi-nor/spi-nor.c
+++ b/drivers/mtd/spi-nor/spi-nor.c
-@@ -1981,7 +1981,7 @@ static int sr2_bit7_quad_enable(struct s
+@@ -1985,7 +1985,7 @@ static int sr2_bit7_quad_enable(struct s
static int spi_nor_clear_sr_bp(struct spi_nor *nor)
{
int ret;
- u8 mask = SR_BP2 | SR_BP1 | SR_BP0;
+ u8 mask = SR_TB | SR_BP2 | SR_BP1 | SR_BP0;
- ret = read_sr(nor);
- if (ret < 0) {
+ if (nor->flags & SNOR_F_HAS_4BIT_BP)
+ mask |= SR_BP3;