[PATCH v2 1/3] generic: platform/mikrotik: allow soft_config writes without 4k sectors
Oskari Lemmela
oskari at lemmela.net
Tue Jan 4 11:41:24 PST 2022
Always allow writing to the soft_config partition. The kernel sets the
partition to read-only mode if the mtd device does not support 4k erase
size.
Signed-off-by: Oskari Lemmela <oskari at lemmela.net>
Tested-by: Stefan Hellermann <stefan at the2masters.de>
---
.../drivers/platform/mikrotik/rb_softconfig.c | 17 +++--------------
1 file changed, 3 insertions(+), 14 deletions(-)
diff --git a/target/linux/generic/files/drivers/platform/mikrotik/rb_softconfig.c b/target/linux/generic/files/drivers/platform/mikrotik/rb_softconfig.c
index 070bd32d5a..31d06c423a 100644
--- a/target/linux/generic/files/drivers/platform/mikrotik/rb_softconfig.c
+++ b/target/linux/generic/files/drivers/platform/mikrotik/rb_softconfig.c
@@ -59,20 +59,9 @@
#define RB_SOFTCONFIG_VER "0.03"
#define RB_SC_PR_PFX "[rb_softconfig] "
-/*
- * mtd operations before 4.17 are asynchronous, not handled by this code
- * Also make the driver act read-only if 4K_SECTORS are not enabled, since they
- * are require to handle partial erasing of the small soft_config partition.
- */
-#if defined(CONFIG_MTD_SPI_NOR_USE_4K_SECTORS)
- #define RB_SC_HAS_WRITE_SUPPORT true
- #define RB_SC_WMODE S_IWUSR
- #define RB_SC_RMODE S_IRUSR
-#else
- #define RB_SC_HAS_WRITE_SUPPORT false
- #define RB_SC_WMODE 0
- #define RB_SC_RMODE S_IRUSR
-#endif
+#define RB_SC_HAS_WRITE_SUPPORT true
+#define RB_SC_WMODE S_IWUSR
+#define RB_SC_RMODE S_IRUSR
/* ID values for software settings */
#define RB_SCID_UART_SPEED 0x01 // u32*1
--
2.25.1
More information about the openwrt-devel
mailing list