Re: [PATCH] bcm53xx: disable NVMEM driver

2023-08-03 Thread Arınç ÜNAL

On 1.08.2023 15:28, Arınç ÜNAL wrote:

On 1.08.2023 15:16, Rafał Miłecki wrote:

On 2023-08-01 12:42, Arınç ÜNAL wrote:

The NVMEM_BRCM_NVRAM driver won't work properly with NVRAM in NAND. It
causes the devices with NVRAM in NAND, such as ASUS RT-AC88U, to 
bootloop.

Until the driver is fixed, disable it.


Driver works and it useful for non-NAND devices. By disabling it you
regress those devices. Surely this can be handled better.


How about making a subtarget for NAND devices? The kernel config will be 
separate so we can disable NVMEM for that subtarget.


Do you approve this? I don't intend to send another patch for you to 
shoot down.


Arınç

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


bgmac_bcma driver hangs if NVMEM driver is enabled

2023-08-03 Thread Arınç ÜNAL

Hi.

The bgmac_bcma driver will hang trying to retrieve the MAC address if 
NVMEM is enabled without NVMEM_BRCM_NVRAM enabled.


The device bootloops if NVMEM_BRCM_NVRAM is enabled so I can't tell 
whether the bgmac_bcma driver would still hang if NVMEM_BRCM_NVRAM was 
enabled and didn't cause bootloop.


I've attached the kernel log with NVMEM enabled and disabled. Tested on 
ASUS RT-AC88U. An nvram node, the variable that stores the MAC address, 
and the bindings to retrieve the MAC address from the variable for gmac1 
are defined on the bindings for this device.


Arınç[0.00] Booting Linux on physical CPU 0x0
[0.00] Linux version 5.10.176 (arinc9@arinc9-PC) 
(arm-openwrt-linux-muslgnueabi-gcc (OpenWrt GCC 11.2.0 r20028-43d71ad93e) 
11.2.0, GNU ld (GNU Binutils) 2.37) #0 SMP Thu Apr 27 20:28:15 2023
[0.00] CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=10c5387d
[0.00] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing 
instruction cache
[0.00] OF: fdt: Machine model: Asus RT-AC88U
[0.00] earlycon: ns16550 at MMIO 0x18000300 (options '115200n8')
[0.00] printk: bootconsole [ns16550] enabled
[0.00] Memory policy: Data cache writealloc
[0.00] Hit pending asynchronous external abort (FSR=0x1c06) during 
first unmask, this is most likely caused by a firmware/bootloader bug.
[0.00] Zone ranges:
[0.00]   Normal   [mem 0x-0x07ff]
[0.00]   HighMem  [mem 0x0800-0x9fff]
[0.00] Movable zone start for each node
[0.00] Early memory node ranges
[0.00]   node   0: [mem 0x-0x07ff]
[0.00]   node   0: [mem 0x8800-0x9fff]
[0.00] Initmem setup node 0 [mem 0x-0x9fff]
[0.00] On node 0 totalpages: 131072
[0.00]   Normal zone: 288 pages used for memmap
[0.00]   Normal zone: 0 pages reserved
[0.00]   Normal zone: 32768 pages, LIFO batch:7
[0.00]   HighMem zone: 98304 pages, LIFO batch:31
[0.00] percpu: Embedded 14 pages/cpu s27340 r8192 d21812 u57344
[0.00] pcpu-alloc: s27340 r8192 d21812 u57344 alloc=14*4096
[0.00] pcpu-alloc: [0] 0 [0] 1 
[0.00] Built 1 zonelists, mobility grouping on.  Total pages: 130784
[0.00] Kernel command line: earlycon
[0.00] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes, 
linear)
[0.00] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes, 
linear)
[0.00] mem auto-init: stack:off, heap alloc:off, heap free:off
[0.00] Memory: 509296K/524288K available (5993K kernel code, 562K 
rwdata, 1360K rodata, 1024K init, 286K bss, 14992K reserved, 0K cma-reserved, 
393216K highmem)
[0.00] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[0.00] rcu: Hierarchical RCU implementation.
[0.00]  Tracing variant of Tasks RCU enabled.
[0.00] rcu: RCU calculated value of scheduler-enlistment delay is 10 
jiffies.
[0.00] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[0.00] L2C: DT/platform modifies aux control register: 0x0a13 -> 
0x3a53
[0.00] L2C-310 enabling early BRESP for Cortex-A9
[0.00] L2C-310 full line of zeros enabled for Cortex-A9
[0.00] L2C-310 ID prefetch enabled, offset 1 lines
[0.00] L2C-310 dynamic clock gating enabled, standby mode enabled
[0.00] L2C-310 cache controller enabled, 16 ways, 256 kB
[0.00] L2C-310: CACHE_ID 0x41c8, AUX_CTRL 0x7e530001
[0.11] sched_clock: 64 bits at 700MHz, resolution 1ns, wraps every 
4398046511103ns
[0.008081] clocksource: arm_global_timer: mask: 0x 
max_cycles: 0xa17102bcf3, max_idle_ns: 440795224838 ns
[0.019255] Switching to timer-based delay loop, resolution 1ns
[0.025413] Calibrating delay loop (skipped), value calculated using timer 
frequency.. 1400.00 BogoMIPS (lpj=700)
[0.036139] pid_max: default: 32768 minimum: 301
[0.040883] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, 
linear)
[0.048306] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, 
linear)
[0.056654] CPU: Testing write buffer coherency: ok
[0.061607] CPU0: Spectre v2: using BPIALL workaround
[0.066922] CPU0: thread -1, cpu 0, socket 0, mpidr 8000
[0.073127] Setting up static identity map for 0x10 - 0x10003c
[0.079511] rcu: Hierarchical SRCU implementation.
[0.084462] dyndbg: Ignore empty _ddebug table in a 
CONFIG_DYNAMIC_DEBUG_CORE build
[0.092405] smp: Bringing up secondary CPUs ...
[0.097593] CPU1: thread -1, cpu 1, socket 0, mpidr 8001
[0.097600] CPU1: Spectre v2: using BPIALL workaround
[0.108473] smp: Brought up 1 node, 2 CPUs
[0.112594] SMP: Total of 2 processors activated (2800.00 BogoMIPS).
[0.119033] CPU: WARNING: CPU(s) started in w

trouble with hostapd

2023-08-03 Thread e9hack

I've trouble with 5GHz since the last changes related to hostapd. After boot or 
after a sequence 'wifi down; sleep 30; wifi' the 2GHz starts only. The 5GHz 
doesn't start. It looks like, that ACS isn't started. If I modify a value in 
the config related to 5GHz and execute 'wifi reload', sometimes 5GHz starts.

If I remove ACS and set a fixed channel, 5GHz starts only, if the channel 
doesn't need DFS because DFS is never finished successful.

If I revert mac80211.sh and hostapd.sh back to the older versions, ACS and 
fixed channel with DFS does work again.

Regards,
Hartmut

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


[fstools] mount_root: support compression on F2FS rootfs

2023-08-03 Thread Robert Marko 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 ---
Some devices dont utilize overlay but rather use F2FS backed RW rootfs
on eMMC and like.

F2FS does not provide space savings with compression but rather uses
compression to reduce writes and offer some small performance increases.

So, in order to prolong the eMMC life lets add a compile time option to
enable F2FS compression on rootfs mount.

Signed-off-by: Robert Marko 
---
 CMakeLists.txt | 16 
 mount_root.c   | 14 +-
 2 files changed, 29 insertions(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3421fec..eb605cb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -66,6 +66,22 @@ IF(DEFINED CMAKE_OVL_MOUNT_FULL_ACCESS_TIME)
ADD_DEFINITIONS(-DOVL_MOUNT_FULL_ACCESS_TIME)
 ENDIF(DEFINED CMAKE_OVL_MOUNT_FULL_ACCESS_TIME)
 
+IF(DEFINED CMAKE_F2FS_ROOTFS_MOUNT_COMPRESS_LZO)
+   ADD_DEFINITIONS(-DF2FS_ROOTFS_MOUNT_COMPRESS_LZO)
+ENDIF(DEFINED CMAKE_F2FS_ROOTFS_MOUNT_COMPRESS_LZO)
+
+IF(DEFINED CMAKE_F2FS_ROOTFS_MOUNT_COMPRESS_LZO_RLE)
+   ADD_DEFINITIONS(-DF2FS_ROOTFS_MOUNT_COMPRESS_LZO_RLE)
+ENDIF(DEFINED CMAKE_F2FS_ROOTFS_MOUNT_COMPRESS_LZO_RLE)
+
+IF(DEFINED CMAKE_F2FS_ROOTFS_MOUNT_COMPRESS_LZ4)
+   ADD_DEFINITIONS(-DF2FS_ROOTFS_MOUNT_COMPRESS_LZ4)
+ENDIF(DEFINED CMAKE_F2FS_ROOTFS_MOUNT_COMPRESS_LZ4)
+
+IF(DEFINED CMAKE_F2FS_ROOTFS_MOUNT_COMPRESS_ZSTD)
+   ADD_DEFINITIONS(-DF2FS_ROOTFS_MOUNT_COMPRESS_ZSTD)
+ENDIF(DEFINED CMAKE_F2FS_ROOTFS_MOUNT_COMPRESS_ZSTD)
+
 ADD_EXECUTABLE(mount_root mount_root.c)
 TARGET_LINK_LIBRARIES(mount_root fstools)
 INSTALL(TARGETS mount_root RUNTIME DESTINATION sbin)
diff --git a/mount_root.c b/mount_root.c
index d343909..912ac1c 100644
--- a/mount_root.c
+++ b/mount_root.c
@@ -41,7 +41,19 @@ start(int argc, char *argv[1])
root = volume_find("rootfs");
volume_init(root);
ULOG_NOTE("mounting /dev/root\n");
-   mount("/dev/root", "/", NULL, MS_NOATIME | MS_REMOUNT, 0);
+   mount("/dev/root", "/", NULL, MS_NOATIME | MS_REMOUNT,
+#ifdef F2FS_ROOTFS_MOUNT_COMPRESS_LZO
+ "compress_algorithm=lzo"
+#elif defined F2FS_ROOTFS_MOUNT_COMPRESS_LZO_RLE
+ "compress_algorithm=lzo-rle"
+#elif defined F2FS_ROOTFS_MOUNT_COMPRESS_LZ4
+ "compress_algorithm=lz4"
+#elif defined F2FS_ROOTFS_MOUNT_COMPRESS_ZSTD
+ "compress_algorithm=zstd"
+#else
+ 0
+#endif
+ );
}
 
/* Check for extroot config in rootfs before even trying rootfs_data */
-- 
2.41.0


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


Re: trouble with hostapd

2023-08-03 Thread Felix Fietkau

Hi,

On 03.08.23 11:17, e9hack wrote:

I've trouble with 5GHz since the last changes related to hostapd. After boot or 
after a sequence 'wifi down; sleep 30; wifi' the 2GHz starts only. The 5GHz 
doesn't start. It looks like, that ACS isn't started. If I modify a value in 
the config related to 5GHz and execute 'wifi reload', sometimes 5GHz starts.

If I remove ACS and set a fixed channel, 5GHz starts only, if the channel 
doesn't need DFS because DFS is never finished successful.

If I revert mac80211.sh and hostapd.sh back to the older versions, ACS and 
fixed channel with DFS does work again.


thanks for reporting this. Unfortunately I can't reproduce it myself 
based on your description.
Can you please let me know what device you are using, and send me the 
config that reproduces this issue?


Thanks,

- Felix

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


Re: trouble with hostapd

2023-08-03 Thread Felix Fietkau

On 03.08.23 15:34, e9hack wrote:

Am 03.08.2023 um 14:35 schrieb Felix Fietkau:

thanks for reporting this. Unfortunately I can't reproduce it myself based on 
your description.
Can you please let me know what device you are using, and send me the config 
that reproduces this issue?


I'm using an ASUS RT-AX53U. Hostapd has the radius server compiled in.


Fixed in b8be20c7e81de2894df8fa2b361c39bc723e4cb5, thanks.

- Felix


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


Re: trouble with hostapd

2023-08-03 Thread e9hack

Am 03.08.2023 um 18:51 schrieb Felix Fietkau:

On 03.08.23 15:34, e9hack wrote:

Am 03.08.2023 um 14:35 schrieb Felix Fietkau:

thanks for reporting this. Unfortunately I can't reproduce it myself based on 
your description.
Can you please let me know what device you are using, and send me the config 
that reproduces this issue?


I'm using an ASUS RT-AX53U. Hostapd has the radius server compiled in.


Fixed in b8be20c7e81de2894df8fa2b361c39bc723e4cb5, thanks.


This does fix the issue, thanks!

Now I see some errors, which I've never seen before:

Thu Aug  3 19:59:19 2023 daemon.err hostapd: Failed to set beacon parameters
Thu Aug  3 19:59:23 2023 daemon.err hostapd: nl80211: kernel reports: integer 
out of range
Thu Aug  3 19:59:23 2023 daemon.err hostapd: Failed to set beacon parameters
Thu Aug  3 19:59:23 2023 daemon.err hostapd: nl80211: kernel reports: integer 
out of range
Thu Aug  3 19:59:23 2023 daemon.err hostapd: Failed to set beacon parameters
Thu Aug  3 19:59:23 2023 daemon.err hostapd: nl80211: kernel reports: integer 
out of range
Thu Aug  3 19:59:23 2023 daemon.err hostapd: Failed to set beacon parameters
Thu Aug  3 19:59:23 2023 daemon.err hostapd: nl80211: kernel reports: integer 
out of range
Thu Aug  3 19:59:23 2023 daemon.err hostapd: Failed to set beacon parameters
Thu Aug  3 19:59:23 2023 daemon.err hostapd: nl80211: kernel reports: integer 
out of range
Thu Aug  3 19:59:23 2023 daemon.err hostapd: Failed to set beacon parameters
Thu Aug  3 19:59:24 2023 daemon.err hostapd: nl80211: kernel reports: integer 
out of range
Thu Aug  3 19:59:24 2023 daemon.err hostapd: Failed to set beacon parameters
Thu Aug  3 19:59:25 2023 daemon.err hostapd: nl80211: kernel reports: integer 
out of range
Thu Aug  3 20:00:35 2023 daemon.err hostapd: nl80211: kernel reports: integer 
out of range
Thu Aug  3 20:00:36 2023 daemon.err hostapd: nl80211: kernel reports: integer 
out of range
Thu Aug  3 20:00:47 2023 daemon.err hostapd: nl80211: kernel reports: integer 
out of range
Thu Aug  3 20:03:23 2023 daemon.err hostapd: nl80211: kernel reports: integer 
out of range


Regards,
Hartmut



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