Re: [PATCH 1/3] generic: platform/mikrotik: make soft_config writable without 4K sectors

2022-01-12 Thread Koen Vandeputte


On 12.01.22 10:51, Koen Vandeputte wrote:


On 09.01.22 14:57, Sven Roederer wrote:

Am Dienstag, 21. Dezember 2021, 08:45:59 CET schrieb Oskari Lemmela:

Make soft_config writable in all cases. Performing soft_config commit
will fail if mtd partition is not writable.

Signed-off-by: Oskari Lemmela 
---
  .../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] "

Oskari,

maybe also good to bump version to 0.04 .

Sven



I can do this when grabbing the patches.
I got the "reset key" series also in my staging which was also lacking 
the bump.


So i'll probably bump this one to 0.06 then.


correction: 0.05

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [PATCH 1/3] generic: platform/mikrotik: make soft_config writable without 4K sectors

2022-01-12 Thread Koen Vandeputte



On 09.01.22 14:57, Sven Roederer wrote:

Am Dienstag, 21. Dezember 2021, 08:45:59 CET schrieb Oskari Lemmela:

Make soft_config writable in all cases. Performing soft_config commit
will fail if mtd partition is not writable.

Signed-off-by: Oskari Lemmela 
---
  .../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] "

Oskari,

maybe also good to bump version to 0.04 .

Sven



I can do this when grabbing the patches.
I got the "reset key" series also in my staging which was also lacking 
the bump.


So i'll probably bump this one to 0.06 then.

Thanks!

Koen

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [PATCH 1/3] generic: platform/mikrotik: make soft_config writable without 4K sectors

2022-01-11 Thread Roger Pueyo Centelles | Guifi.net via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
Hi, Oskari,

I could successfully test your patch on a
mikrotik,routerboard-wap-g-5hact2hnd.

Previously:

root@OpenWrt:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 0002 0001 "RouterBoot"
mtd1: e000 0001 "bootloader1"
mtd2: 1000 0001 "hard_config"
mtd3: 1000 0001 "bios"
mtd4: f000 0001 "bootloader2"
mtd5: 1000 0001 "soft_config"
[...]

Your patch:

root@OpenWrt:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 0002 0001 "RouterBoot"
mtd1: e000 0001 "bootloader1"
mtd2: 1000 0001 "hard_config"
mtd3: 1000 0001 "bios"
mtd4: f000 0001 "bootloader2"
mtd5: 1000 1000 "soft_config"
[...]

Then, under /sys/firmware/mikrotik/soft_config, I could configure
cpufreq_index to run at 720, 600 or 500 MHz.

Thanks for your patch!

Roger

El 9/1/22 a les 14:57, Sven Roederer ha escrit:
> Am Dienstag, 21. Dezember 2021, 08:45:59 CET schrieb Oskari Lemmela:
>> Make soft_config writable in all cases. Performing soft_config commit
>> will fail if mtd partition is not writable.
>>
>> Signed-off-by: Oskari Lemmela 
>> ---
>>  .../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] "
> Oskari,
>
> maybe also good to bump version to 0.04 .
>
> Sven
>
>
>
>
>
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
>


--- End Message ---
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [PATCH 1/3] generic: platform/mikrotik: make soft_config writable without 4K sectors

2022-01-09 Thread Sven Roederer
Am Dienstag, 21. Dezember 2021, 08:45:59 CET schrieb Oskari Lemmela:
> Make soft_config writable in all cases. Performing soft_config commit
> will fail if mtd partition is not writable.
> 
> Signed-off-by: Oskari Lemmela 
> ---
>  .../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] "

Oskari,

maybe also good to bump version to 0.04 .

Sven





___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[PATCH 1/3] generic: platform/mikrotik: make soft_config writable without 4K sectors

2021-12-20 Thread Oskari Lemmela
Make soft_config writable in all cases. Performing soft_config commit
will fail if mtd partition is not writable.

Signed-off-by: Oskari Lemmela 
---
 .../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_SUPPORTtrue
+#define RB_SC_WMODES_IWUSR
+#define RB_SC_RMODES_IRUSR
 
 /* ID values for software settings */
 #define RB_SCID_UART_SPEED 0x01// u32*1
-- 
2.25.1


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel