[PATCH] blockd: restore device_move semantics

2022-04-12 Thread Daniel Golle
Before commit 4963db4 block device were only removed and re-added in
case of device_move() returning a non-zero value. Commit 4963db4 then
(supposedly) accidentally inverted that logic and also (probably to
work-around the problems resulting from the now inverted logic) limited
this behavior to autofs mounts, leaving the autofs codepath in a semi-
broken state.
Restore the original semantics as of before commit 4963db4 to fully
restore functionality for autofs mounts.

Fixes: 4963db4 ("blockd: use uloop_process for calling /sbin/hotplug-call 
mount")
Signed-off-by: Daniel Golle 
---
 blockd.c | 10 --
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/blockd.c b/blockd.c
index 8bb5005..9572fd0 100644
--- a/blockd.c
+++ b/blockd.c
@@ -349,13 +349,11 @@ block_hotplug(struct ubus_context *ctx, struct 
ubus_object *obj,
 
vlist_add(, >node, device->name);
 
-   if (old && !device_move(old, device)) {
-   if (device->autofs) {
-   device_mount_remove(ctx, old);
-   device_mount_add(ctx, device);
-   } else {
+   if (old && device_move(old, device)) {
+   device_mount_remove(ctx, old);
+   device_mount_add(ctx, device);
+   if (!device->autofs)
block("mount", NULL, NULL, 0, NULL);
-   }
} else if (device->autofs) {
device_mount_add(ctx, device);
}
-- 
2.35.1


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


Broken PCI wlan chip on latest firmware

2022-04-12 Thread Enrico Mioso

Hello!!

Unfrotunately, on latest snapshot
bea01fa57f5c9c333138bbbc5c9f83b9d7553fb5

the PCI wlan chip on the device does not appear.

Any hints? I suspect this could be related to latest commits changing 
calibration related things.
Attached list of packages + dmesg.

$ ssh root@192.168.1.240

BusyBox v1.35.0 (2022-04-12 12:02:16 UTC) built-in shell (ash)

  ___ __
 |   |.-.-.-.|  |  |  |..|  |_
 |   -   ||  _  |  -__| ||  |  |  ||   _||   _|
 |___||   __|_|__|__||||__|  ||
  |__| W I R E L E S S   F R E E D O M
 -
 OpenWrt SNAPSHOT, r19428-bea01fa57f
 -
root@ShakoBoard:~# opkg list-installed
ath10k-board-qca4019 - 20220209-1
ath10k-board-qca9888 - 20220209-1
ath10k-firmware-qca4019-ct - 2020-11-08-1
ath10k-firmware-qca9888-ct - 2020-11-08-1
base-files - 1473-r19428-bea01fa57f
busybox - 1.35.0-3
ca-bundle - 20211016-1
dnsmasq - 2.86-12
dropbear - 2022.82-1
e2fsprogs - 1.46.5-1
f2fs-tools - 1.14.0-2
f2fsck - 1.14.0-2
fdisk - 2.37.3-3
firewall4 - 2022-04-02-a3788839-1
fstools - 2021-11-16-77c02889-1
fwtool - 2019-11-12-8f7fe925-1
hostapd-common - 2022-01-16-cff80b4f-8
ipq-wifi-glinet_gl-b2200 - 1
iw - 5.16-1
iwinfo - 2022-03-01-90bfbb9a-1
jansson4 - 2.13.1-2
jshn - 2021-11-20-cce5e351-1
jsonfilter - 2018-02-04-c7e938d6-1
kernel - 5.10.110-1-ad0478b8a14f4e7d09fac79cd5f17637
kmod-ath - 5.10.110+5.15.33-1-1
kmod-ath10k-ct - 5.10.110+2021-11-28-dc350bbf-5
kmod-cfg80211 - 5.10.110+5.15.33-1-1
kmod-crypto-acompress - 5.10.110-1
kmod-crypto-aead - 5.10.110-1
kmod-crypto-ccm - 5.10.110-1
kmod-crypto-cmac - 5.10.110-1
kmod-crypto-crc32 - 5.10.110-1
kmod-crypto-crc32c - 5.10.110-1
kmod-crypto-ctr - 5.10.110-1
kmod-crypto-gcm - 5.10.110-1
kmod-crypto-gf128 - 5.10.110-1
kmod-crypto-ghash - 5.10.110-1
kmod-crypto-hash - 5.10.110-1
kmod-crypto-hmac - 5.10.110-1
kmod-crypto-kpp - 5.10.110-1
kmod-crypto-lib-blake2s - 5.10.110-1
kmod-crypto-lib-chacha20 - 5.10.110-1
kmod-crypto-lib-chacha20poly1305 - 5.10.110-1
kmod-crypto-lib-curve25519 - 5.10.110-1
kmod-crypto-lib-poly1305 - 5.10.110-1
kmod-crypto-manager - 5.10.110-1
kmod-crypto-null - 5.10.110-1
kmod-crypto-rng - 5.10.110-1
kmod-crypto-seqiv - 5.10.110-1
kmod-crypto-sha256 - 5.10.110-1
kmod-fs-ext4 - 5.10.110-1
kmod-fs-f2fs - 5.10.110-1
kmod-gpio-button-hotplug - 5.10.110-3
kmod-hwmon-core - 5.10.110-1
kmod-leds-gpio - 5.10.110-1
kmod-lib-crc-ccitt - 5.10.110-1
kmod-lib-crc16 - 5.10.110-1
kmod-lib-crc32c - 5.10.110-1
kmod-lib-lzo - 5.10.110-1
kmod-mac80211 - 5.10.110+5.15.33-1-1
kmod-mmc - 5.10.110-1
kmod-nf-conntrack - 5.10.110-1
kmod-nf-conntrack6 - 5.10.110-1
kmod-nf-flow - 5.10.110-1
kmod-nf-log - 5.10.110-1
kmod-nf-log6 - 5.10.110-1
kmod-nf-nat - 5.10.110-1
kmod-nf-nat6 - 5.10.110-1
kmod-nf-reject - 5.10.110-1
kmod-nf-reject6 - 5.10.110-1
kmod-nfnetlink - 5.10.110-1
kmod-nft-core - 5.10.110-1
kmod-nft-fib - 5.10.110-1
kmod-nft-nat - 5.10.110-1
kmod-nft-nat6 - 5.10.110-1
kmod-nft-offload - 5.10.110-1
kmod-nls-base - 5.10.110-1
kmod-ppp - 5.10.110-1
kmod-pppoe - 5.10.110-1
kmod-pppox - 5.10.110-1
kmod-slhc - 5.10.110-1
kmod-spi-dev - 5.10.110-1
kmod-udptunnel4 - 5.10.110-1
kmod-udptunnel6 - 5.10.110-1
kmod-usb-core - 5.10.110-1
kmod-usb-dwc3 - 5.10.110-1
kmod-usb-dwc3-qcom - 5.10.110-1
kmod-usb-xhci-hcd - 5.10.110-1
kmod-usb3 - 5.10.110-1
kmod-wireguard - 5.10.110-1
libblkid1 - 2.37.3-3
libblobmsg-json20211120 - 2021-11-20-cce5e351-1
libc - 1.2.3-4
libcomerr0 - 1.46.5-1
libevent2-core7 - 2.1.12-1
libext2fs2 - 1.46.5-1
libf2fs6 - 1.14.0-2
libfdisk1 - 2.37.3-3
libgcc1 - 11.2.0-4
libiwinfo-data - 2022-03-01-90bfbb9a-1
libiwinfo20210430 - 2022-03-01-90bfbb9a-1
libjson-c5 - 0.15-2
libjson-script20211120 - 2021-11-20-cce5e351-1
libmnl0 - 1.0.5-1
libncurses6 - 6.3-1
libnftnl11 - 1.2.1-1
libnl-tiny1 - 2021-11-21-8e0555fb-1
libpthread - 1.2.3-4
librt - 1.2.3-4
libsmartcols1 - 2.37.3-3
libss2 - 1.46.5-1
libubox20211120 - 2021-11-20-cce5e351-1
libubus20220228 - 2022-02-28-584f56a2-2
libuci20130104 - 2021-10-22-f84f49f0-6
libuclient20201210 - 2021-05-14-6a6011df-1
libucode20220322 - 2022-04-07-33f1e0b0-1
libustream-wolfssl20201210 - 2022-01-16-868fd881-1
libuuid1 - 2.37.3-3
libwolfssl5.2.0.31258522 - 5.2.0-stable-1
logd - 2022-01-06-b87a4fdc-2
mkf2fs - 1.14.0-2
mtd - 26
netifd - 2022-02-20-136006b8-1
nftables-json - 1.0.2-2
openwrt-keyring - 2022-03-25-62471e69-2
opkg - 2022-01-09-2edcfad1-1
ppp - 2.4.9.git-2021-01-04-3
ppp-mod-pppoe - 2.4.9.git-2021-01-04-3
procd - 2022-02-19-ad652490-3
procd-seccomp - 2022-02-19-ad652490-3
procd-ujail - 2022-02-19-ad652490-3
procps-ng - 3.3.16-3
procps-ng-ps - 3.3.16-3
strace - 5.16-1
swconfig - 12
terminfo - 6.3-1
tmux - 3.2a-1
ubi-utils - 2.1.4-1
uboot-envtools - 2022.01-17
ubox - 2022-01-06-b87a4fdc-2
ubus - 2022-02-28-584f56a2-2
ubusd - 2022-02-28-584f56a2-2
uci - 2021-10-22-f84f49f0-6
uclient-fetch - 2021-05-14-6a6011df-1
ucode - 

Re: Seperating firmware-utils into seperate repo

2022-04-12 Thread Joseph Mullally
> Most in-house OpenWrt packages are actually stored in their
> own git repo, see https://git.openwrt.org/ down in the
> /project/something_something.git
>
>  -Alberto

Thanks for the good suggestions Alberto. I still think it will be a
messy process for most new device contributors (where a lot of these
PRs will come from) and reviewers alike, as Adrian points out in the
"post-merge" peer review discussion above.

Overall I can't see what the real benefits of this change are. Unless
it really is official OpenWRT policy to release these as generic
firmware tools for use by other projects, and it absolutely has to be
a separate git repo. On many levels that's a good idea but also
nebulous. E.g. for the xiaomifw vacuum example, why not put it in its
own seperate upstream repo.

Anyway, maybe people disagree and are OK with this.

At a minimum to finish out this package split, someone needs to do this?
* Create a GitHub mirror for https://git.openwrt.org/project/firmware-utils.git

To avoid chaos in the future (or even now with 22.03, bugfixes, backports etc):
* Release branches for "firmware-utils.git" matching "openwrt.git"
(unless some versioning strategy like SEMVER is planned, but the
OpenWRT release branches seem the simplest)

Thanks,
- Joe

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


[PATCH v2] build: target: improve UX of CONFIG_TARGET handling

2022-04-12 Thread Petr Štetiar
Make it clear, that for `make kernel_{menu,old}config` it's possible to
use only following values for CONFIG_TARGET variable:

 * env
 * target
 * subtarget
 * subtarget_target

This should prevent misuse like `make kernel_menuconfig
CONFIG_TARGET=bcm2710` etc.

Keep support for obsolete `platform` and `subtarget_platform` targets
with deprecation notice so this compat stuff could be removed in the
future.

Signed-off-by: Petr Štetiar 
---

Changes since v1:

 * added `platform` and `subtarget_platform` compat with deprecation warning 
(pepe2k)

 include/target.mk | 21 ++---
 1 file changed, 14 insertions(+), 7 deletions(-)

diff --git a/include/target.mk b/include/target.mk
index 72fe493776b9..8790b1eeae5c 100644
--- a/include/target.mk
+++ b/include/target.mk
@@ -173,22 +173,29 @@ USE_SUBTARGET_CONFIG = $(if $(wildcard 
$(LINUX_TARGET_CONFIG)),,$(if $(LINUX_SUB
 LINUX_RECONFIG_LIST = $(wildcard $(GENERIC_LINUX_CONFIG) 
$(LINUX_TARGET_CONFIG) $(if $(USE_SUBTARGET_CONFIG),$(LINUX_SUBTARGET_CONFIG)))
 LINUX_RECONFIG_TARGET = $(if 
$(USE_SUBTARGET_CONFIG),$(LINUX_SUBTARGET_CONFIG),$(LINUX_TARGET_CONFIG))
 
-# select the config file to be changed by kernel_menuconfig/kernel_oldconfig
 ifeq ($(CONFIG_TARGET),platform)
+  CONFIG_TARGET=target
+  $(warning Deprecation warning: use CONFIG_TARGET=target instead.)
+else ifeq ($(CONFIG_TARGET),subtarget_platform)
+  CONFIG_TARGET=subtarget_target
+  $(warning Deprecation warning: use CONFIG_TARGET=subtarget_target instead.)
+endif
+
+# select the config file to be changed by kernel_menuconfig/kernel_oldconfig
+ifeq ($(CONFIG_TARGET),target)
   LINUX_RECONFIG_LIST = $(wildcard $(GENERIC_LINUX_CONFIG) 
$(LINUX_TARGET_CONFIG))
   LINUX_RECONFIG_TARGET = $(LINUX_TARGET_CONFIG)
-endif
-ifeq ($(CONFIG_TARGET),subtarget)
+else ifeq ($(CONFIG_TARGET),subtarget)
   LINUX_RECONFIG_LIST = $(wildcard $(GENERIC_LINUX_CONFIG) 
$(LINUX_TARGET_CONFIG) $(LINUX_SUBTARGET_CONFIG))
   LINUX_RECONFIG_TARGET = $(LINUX_SUBTARGET_CONFIG)
-endif
-ifeq ($(CONFIG_TARGET),subtarget_platform)
+else ifeq ($(CONFIG_TARGET),subtarget_target)
   LINUX_RECONFIG_LIST = $(wildcard $(GENERIC_LINUX_CONFIG) 
$(LINUX_SUBTARGET_CONFIG) $(LINUX_TARGET_CONFIG))
   LINUX_RECONFIG_TARGET = $(LINUX_TARGET_CONFIG)
-endif
-ifeq ($(CONFIG_TARGET),env)
+else ifeq ($(CONFIG_TARGET),env)
   LINUX_RECONFIG_LIST = $(LINUX_KCONFIG_LIST)
   LINUX_RECONFIG_TARGET = $(TOPDIR)/env/kernel-config
+else ifneq ($(strip $(CONFIG_TARGET)),)
+ $(error ERROR: CONFIG_TARGET="$(CONFIG_TARGET)" is invalid, use one of 
`target`, `subtarget`, `subtarget_target` or `env`)
 endif
 
 __linux_confcmd = $(2) $(patsubst %,+,$(wordlist 2,,$(1))) $(1)

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


[PATCH 3/5] kernel: usb-net-smsc95xx: fix 5.15 dependency

2022-04-12 Thread Petr Štetiar
armvirt/64 when compiled with ALL_KMODS=y reports following:

 Package kmod-usb-net-smsc95xx is missing dependencies for the following 
libraries:
 libphy.ko

Signed-off-by: Petr Štetiar 
---
 package/kernel/linux/modules/usb.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/kernel/linux/modules/usb.mk 
b/package/kernel/linux/modules/usb.mk
index a52ba745efff..fd7ce412d089 100644
--- a/package/kernel/linux/modules/usb.mk
+++ b/package/kernel/linux/modules/usb.mk
@@ -1266,7 +1266,7 @@ $(eval $(call KernelPackage,usb-net-smsc75xx))
 
 define KernelPackage/usb-net-smsc95xx
   TITLE:=SMSC LAN95XX based USB 2.0 10/100 ethernet devices
-  DEPENDS:=+LINUX_5_10:kmod-libphy
+  DEPENDS:=+(LINUX_5_10||LINUX_5_15):kmod-libphy
   KCONFIG:=CONFIG_USB_NET_SMSC95XX
   FILES:=$(LINUX_DIR)/drivers/$(USBNET_DIR)/smsc95xx.ko
   AUTOLOAD:=$(call AutoProbe,smsc95xx)

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


[PATCH 4/5] kernel: netdevices: add generic selftests module

2022-04-12 Thread Petr Štetiar
Upstream in commit 3e1e58d64c3d ("net: add generic selftest support") in
version 5.13 added generic selftests module and usb-net-asix already
depends on it, in version 5.18 via commit 1710b52d7c13 ("net: usb:
smsc95xx: add generic selftest support") it will be used by
usb-net-smsc95xx as well.

Signed-off-by: Petr Štetiar 
---
 package/kernel/linux/modules/netdevices.mk | 16 
 1 file changed, 16 insertions(+)

diff --git a/package/kernel/linux/modules/netdevices.mk 
b/package/kernel/linux/modules/netdevices.mk
index 18fbf498dd15..ec470be5eeb8 100644
--- a/package/kernel/linux/modules/netdevices.mk
+++ b/package/kernel/linux/modules/netdevices.mk
@@ -1224,6 +1224,22 @@ endef
 $(eval $(call KernelPackage,mlx5-core))
 
 
+define KernelPackage/net-selftests
+  SUBMENU:=$(NETWORK_DEVICES_MENU)
+  DEPENDS:=+kmod-libphy
+  TITLE:=Network generic selftest support
+  KCONFIG:=CONFIG_NET_SELFTESTS
+  FILES:=$(LINUX_DIR)/net/core/selftests.ko
+  AUTOLOAD:=$(call AutoLoad,99,selftests)
+endef
+
+define KernelPackage/net-selftests/description
+  Kernel modules for the generic selftest support
+endef
+
+$(eval $(call KernelPackage,net-selftests))
+
+
 define KernelPackage/qlcnic
   SUBMENU:=$(NETWORK_DEVICES_MENU)
   DEPENDS:=@PCI_SUPPORT +kmod-hwmon-core

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


[PATCH 1/5] kernel: of-mdio: fix 5.15 fwnode_mdio dependency

2022-04-12 Thread Petr Štetiar
Upstream in commit bc1bee3b87ee ("net: mdiobus: Introduce
fwnode_mdiobus_register_phy()") in version 5.14 introduced new
dependency:

 Package kmod-of-mdio is missing dependencies for the following libraries:

  fwnode_mdio.ko

Signed-off-by: Petr Štetiar 
---
 package/kernel/linux/modules/netdevices.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/package/kernel/linux/modules/netdevices.mk 
b/package/kernel/linux/modules/netdevices.mk
index fa1a9e8caa6c..6576b6bae212 100644
--- a/package/kernel/linux/modules/netdevices.mk
+++ b/package/kernel/linux/modules/netdevices.mk
@@ -1057,7 +1057,8 @@ define KernelPackage/of-mdio
   KCONFIG:=CONFIG_OF_MDIO
   FILES:= \
$(LINUX_DIR)/drivers/of/of_mdio.ko@lt5.10 \
-   $(LINUX_DIR)/drivers/net/mdio/of_mdio.ko@ge5.10
+   $(LINUX_DIR)/drivers/net/mdio/of_mdio.ko@ge5.10 \
+   $(LINUX_DIR)/drivers/net/mdio/fwnode_mdio.ko@ge5.15
   AUTOLOAD:=$(call AutoLoad,41,of_mdio)
 endef
 

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