From zefir.kurtisi at neratec.com  Sun Jul  1 05:47:45 2018
From: zefir.kurtisi at neratec.com (Zefir Kurtisi)
Date: Sun, 1 Jul 2018 11:47:45 +0200
Subject: [OpenWrt-Devel] Q: musl: ether_aton() behaves differently than
 in glibc
In-Reply-To: <CAKxU2N-4DZue-O31zCLcMitKMZw8JqoiXMoAoH7d2JiU1xcYVw@mail.gmail.com>
References: <38f4981c-b267-adf7-b474-a2238bc45858@neratec.com>
 <CAKxU2N-4DZue-O31zCLcMitKMZw8JqoiXMoAoH7d2JiU1xcYVw@mail.gmail.com>
Message-ID: <12ba81fa-4ced-96a4-602c-b2b621524d04@neratec.com>

On 06/30/2018 08:56 PM, Rosen Penev wrote:
> On Wed, Jun 27, 2018 at 7:55 AM Zefir Kurtisi <zefir.kurtisi at neratec.com> wrote:
>>
>> Hi,
>>
>> I found a proprietary package stopped working after moving from glibc to musl and
>> ended up identifying a difference in processing of ether_aton().
>>
>> In musl, the ether_addr string is expected to be NULL terminated (see
>> https://git.musl-libc.org/cgit/musl/tree/src/network/ether.c#n20), while other
>> libc implementations are less strict (i.e. only evaluate the leading ether_addr
>> and ignoring subsequent chars).
>>
>> Tried to search the net for a reliable spec on whether it must be NULL terminated
>> or not, but found nothing specific.
>>
>>
>> What do you guys think, is musl just more strict here and therefore correct, or is
>> the less strict behaviour of the other implementations the way to go?
> Probably the musl behavior is correct.

Was my impression, too. Means need to double check whichever package uses that
function and ensure it provides a NULL terminated string.

Cheers

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From bjorn at mork.no  Sun Jul  1 07:34:11 2018
From: bjorn at mork.no (=?utf-8?Q?Bj=C3=B8rn_Mork?=)
Date: Sun, 01 Jul 2018 13:34:11 +0200
Subject: [OpenWrt-Devel] Build currently broken when using usbutils
In-Reply-To: <6eafd03cbe151d376a67ad8b196ff135e18ee459.camel@gmail.com> (Jon
 Burgess's message of "Fri, 29 Jun 2018 22:12:23 +0100")
References: <a4eb321d-1eec-1782-5caf-37b905dc59c9@ncentric.com>
 <87d0w92306.fsf@miraculix.mork.no>
 <ca0b1a5f-d49b-cbc4-e232-fb6c9b5ed507@ncentric.com>
 <877emh1whz.fsf@miraculix.mork.no>
 <6eafd03cbe151d376a67ad8b196ff135e18ee459.camel@gmail.com>
Message-ID: <87a7rbyyto.fsf@miraculix.mork.no>

Jon Burgess <jburgess777 at gmail.com> writes:
> On Fri, 2018-06-29 at 16:46 +0200, Bj?rn Mork wrote:
>> Koen Vandeputte <koen.vandeputte at ncentric.com> writes:
>> 
>> > This looks like a good up-to-date candidate to replace it (or to
>> > replace the mirror contents on OpenWrt with the contents of this
>> > one)
>> > http://www.linux-usb.org/usb.ids
>> > 
>> > 
>> > Anyone with objections?
>> 
>> I believe the problem with that one is that there is the same as with
>> the mirrors: No version info in the path.  So the build will break
>> every
>> time the database is updated.
>
> Fedora gets the usb.ids from its hwdata package which uses files from:
>
> Source: https://github.com/vcrhonek/hwdata/archive/v%{version}.tar.gz
> URL:    https://github.com/vcrhonek/hwdata
>
> Where version is currently 0.312

Forgive the possibly stupid question: Why not simply copy this file into
the usbutils package?  It's not like the file can be updated without
changing the package anyway, so I fail to see the advantage of pointing
to some other arbitrary site doing periodical downloads.


Bj?rn

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From mrkiko.rs at gmail.com  Sun Jul  1 16:46:05 2018
From: mrkiko.rs at gmail.com (Enrico Mioso)
Date: Sun,  1 Jul 2018 22:46:05 +0200
Subject: [OpenWrt-Devel] [PATCH] libconfig: update to version 1.7.2
Message-ID: <20180701204605.15369-1-mrkiko.rs@gmail.com>

The previous link did not work here.

Compile-tested on: bcm47xx
Runtime-tested on: bcm47xx

Signed-off-by: Enrico Mioso <mrkiko.rs at gmail.com>
---
 package/libs/libconfig/Makefile | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/package/libs/libconfig/Makefile b/package/libs/libconfig/Makefile
index fea00e2ef4..84ded21725 100644
--- a/package/libs/libconfig/Makefile
+++ b/package/libs/libconfig/Makefile
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libconfig
-PKG_VERSION:=1.5
+PKG_VERSION:=1.7.2
 PKG_RELEASE:=1
 
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://www.hyperrealm.com/libconfig
-PKG_HASH:=e31daa390d8e4461c8830512fe2e13ba1a3d6a02a2305a02429eec61e68703f6
+PKG_SOURCE:=v$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://github.com/hyperrealm/libconfig/archive/
+PKG_HASH:=f67ac44099916ae260a6c9e290a90809e7d782d96cdd462cac656ebc5b685726
 
 PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
-- 
2.18.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From devel-sven at geroedel.de  Sun Jul  1 17:20:12 2018
From: devel-sven at geroedel.de (Sven Roederer)
Date: Sun, 01 Jul 2018 23:20:12 +0200
Subject: [OpenWrt-Devel] ar71xx-mikrotik: Imagebuilder fails with
 "VERSIONOPT=y"
Message-ID: <6487018.CeAL7n5l3G@strike>

Hi,

since long time our buildbot hat problems creating images for ar71xx-mikrotik 
with openwrt-master. I'm not sure anymore when it started after branching 
17.01, as I did not look for this target for long.

By default we are using the following config-options:
CONFIG_VERSIONOPT=y
CONFIG_VERSION_FILENAMES=y
CONFIG_VERSION_CODE_FILENAMES=y
CONFIG_VERSION_DIST="Freifunk Berlin"
CONFIG_VERSION_HWREV=""
CONFIG_VERSION_MANUFACTURER=""
CONFIG_VERSION_NICK="Dev"
CONFIG_VERSION_NUMBER="2018-alpha"
CONFIG_VERSION_CODE=""
CONFIG_VERSION_PRODUCT=""
CONFIG_VERSION_REPO="http://buildbot.berlin.freifunk.net/buildbot/stable/%V/
%T/packages"

which fails when we use the imagebuilder to create our firmware. The 
regular compile, by using "make" will work.
All other targets (e.g. ar71xx-generic, ramips-mt7620) we build for do not 
show this problem.

This is the error from calling the imagebuilder
> Building images for ar71xx - Default Profile
> Packages: wpad community-profiles mtr ip iperf tmux vnstat ethtool 
> dnsmasq qos-scripts firewall iwinfo libiwinfo-lua tcpdump uhttpd 
> uhttpd-mod-ubus px5g-mbedtls libustream-mbedtls luci-app-olsr 
> luci-app-firewall luci-app-olsr-services luci-theme-bootstrap luci-i18n-base-
de 
> luci-i18n-base-en luci-i18n-firewall-de luci-i18n-firewall-en luci-i18n-olsr-
de 
> luci-i18n-olsr-en luci-i18n-statistics-de luci-i18n-statistics-en olsrd 
> olsrd-mod-arprefresh olsrd-mod-dyn-gw olsrd-mod-jsoninfo olsrd-mod-txtinfo 
> olsrd-mod-nameservice olsrd-mod-watchdog kmod-ipip kmod-batman-adv 
> alfred batctl luci-app-statistics collectd collectd-mod-interface 
> collectd-mod-iwinfo collectd-mod-network collectd-mod-olsrd 
> collectd-mod-rrdtool collectd-mod-ping collectd-mod-uptime 
> collectd-mod-memory base-files busybox dnsmasq dropbear firewall fstools 
> ip6tables iptables kernel kmod-ath9k kmod-gpio-button-hotplug 
> kmod-usb-core kmod-usb-ledtrig-usbport kmod-usb-ohci kmod-usb2 libc 
> libgcc logd mtd nand-utils netifd odhcp6c odhcpd-ipv6only opkg swconfig 
> uboot-envtools uci uclient-fetch
> 
> ...
> 
> Parallel mksquashfs: Using 1 processor
> Creating 4.0 filesystem on /var/lib/buildbot/slaves/slave/ar71xx-mikrotik/
build/firmware/imgQGH2jj/openwrt-imagebuilder-SNAPSHOT-ar71xx-mikrotik.Linux-
x86_64/build_dir/target-mips_24kc_musl/linux-ar71xx_mikrotik/root.squashfs, 
block size 262144.
> 
> [|                                                             ]    0/1324   
0%
> [====/                                                         ]  100/1324   
7%
> [=========/                                                    ]  200/1324  
15%
> [=============|                                                ]  300/1324  
22%
> [==================|                                           ]  400/1324  
30%
> [================================/                             ]  700/1324  
52%
> [=======================================================/      ] 1200/1324  
90%
> [=============================================================|] 1324/1324 
100%
> Exportable Squashfs 4.0 filesystem, xz compressed, data block size 262144
> 	compressed data, compressed metadata, compressed fragments, no xattrs
> 	duplicates are removed
> Filesystem size 4145.19 Kbytes (4.05 Mbytes)
> 	34.40% of uncompressed filesystem size (12051.00 Kbytes)
> Inode table size 11690 bytes (11.42 Kbytes)
> 	21.38% of uncompressed inode table size (54688 bytes)
> Directory table size 16702 bytes (16.31 Kbytes)
> 	46.46% of uncompressed directory table size (35951 bytes)
> Number of duplicate files found 174
> Number of inodes 1664
> Number of files 1317
> Number of fragments 38
> Number of symbolic links  225
> Number of device nodes 1
> Number of fifo nodes 0
> Number of socket nodes 0
> Number of directories 121
> Number of ids (unique uids + gids) 1
> Number of uids 1
> 	unknown (0)
> Number of gids 1
> 	unknown (0)
> sysupgrade-routerboard/
> sysupgrade-routerboard/CONTROL
> sysupgrade-routerboard/root
> sysupgrade-routerboard/kernel
> sysupgrade-routerboard/
> sysupgrade-routerboard/CONTROL
> sysupgrade-routerboard/root
> sysupgrade-routerboard/kernel
> sysupgrade-routerboard/
> sysupgrade-routerboard/CONTROL
> sysupgrade-routerboard/root
> sysupgrade-routerboard/kernel
> 2645+1 records in
> 2645+1 records out
> 1354744 bytes (1.4 MB) copied, 0.0227269 s, 59.6 MB/s
> Can't get lstat from kernel file!: No such file or directory
> make[4]: *** [/var/lib/buildbot/slaves/slave/ar71xx-mikrotik/build/firmware/
imgQGH2jj/openwrt-imagebuilder-SNAPSHOT-ar71xx-mikrotik.Linux-x86_64/
build_dir/target-mips_24kc_musl/linux-ar71xx_mikrotik/tmp/openwrt-snapshot-
bd98d38-ar71xx-mikrotik-rb-nor-flash-16M-squashfs-sysupgrade.bin] Error 255
> make[3]: *** [build_image] Error 2
> make[2]: *** [_call_image] Error 2
> make[1]: *** [image] Error 2
> make[1]: Leaving directory `/var/lib/buildbot/slaves/slave/ar71xx-mikrotik/
build/firmware/imgQGH2jj/openwrt-imagebuilder-SNAPSHOT-ar71xx-mikrotik.Linux-
x86_64'
> make: *** [.stamp-images] Error 2


When I change the following options, it will not fail:
CONFIG_VERSION_FILENAMES=n
CONFIG_VERSION_DIST="OpenWrt"
CONFIG_VERSION_NUMBER="SNAPSHOT"

I looked around in the Makefiles, but was not able to find the relavant code.


Any ideas?

Sven

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From john at phrozen.org  Mon Jul  2 00:58:31 2018
From: john at phrozen.org (John Crispin)
Date: Mon, 2 Jul 2018 06:58:31 +0200
Subject: [OpenWrt-Devel] [PATCH] hostapd: announce utf8 encoding of ssid
In-Reply-To: <20180628204729.GA6458@Mindship-03>
References: <20180628204729.GA6458@Mindship-03>
Message-ID: <c3e54c08-fc66-cf09-aa3d-33bcff0da8fe@phrozen.org>



On 28/06/18 22:47, Jouke Witteveen wrote:
> +	set_default utf8_ssid 1

does this not make it use utf8 by default ?

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From j.witteveen at gmail.com  Mon Jul  2 04:08:14 2018
From: j.witteveen at gmail.com (Jouke Witteveen)
Date: Mon, 2 Jul 2018 10:08:14 +0200
Subject: [OpenWrt-Devel] [PATCH] hostapd: announce utf8 encoding of ssid
In-Reply-To: <c3e54c08-fc66-cf09-aa3d-33bcff0da8fe@phrozen.org>
References: <20180628204729.GA6458@Mindship-03>
 <c3e54c08-fc66-cf09-aa3d-33bcff0da8fe@phrozen.org>
Message-ID: <CAJ2ouaxLFH00rQYiFBUvopyzW44-54r4_CE02a4mpSQHES0KWg@mail.gmail.com>

On Mon, Jul 2, 2018 at 6:58 AM John Crispin <john at phrozen.org> wrote:
>
>
>
> On 28/06/18 22:47, Jouke Witteveen wrote:
> > +     set_default utf8_ssid 1
>
> does this not make it use utf8 by default ?

Yes, it does. I argued that it is utf8 anyway, unless we do some
manual tinkering. An SSID set via LuCI is almost guaranteed to be utf8
an encoded string.

In the end, setting the bit or not should me more or less
inconsequential. It is only there to tell the client how to display
the SSID. Most clients seem to assume utf8 encoding anyway, but it
would be good practice to use this bit. Without the bit, the SSID
should really be treated as a meaningless (non human-readable) byte
string.

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From koen.vandeputte at ncentric.com  Mon Jul  2 04:23:44 2018
From: koen.vandeputte at ncentric.com (Koen Vandeputte)
Date: Mon,  2 Jul 2018 10:23:44 +0200
Subject: [OpenWrt-Devel] [PATCH] ath9k: Expose support for Dynack
Message-ID: <1530519824-12631-1-git-send-email-koen.vandeputte@ncentric.com>

Enables support for Dynack feature.

When a remote station is far away, we need to compensate for the distance
by allowing more time for an ACK to arrive back before issueing a retransmission.
Currently, it needs to be set fixed to indicate the maximum distance the remote
station will ever be.

While this mostly works for static antennae, it introduces 2 issues:
- If the actual distance is less, speed is reduced due to a lot of wates wait-time
- If the distance becomes greater, retries start to occur and comms can get lost.

Allowing to set it dynamically using dynack ensures the best possible tradeoff
between speed vs distance.

This feature is currently only supported in ath9k.
it is also disabled by default.

Enabling it can be done in 2 ways:
- issue cmd:  iw phy0 set distance auto
- sending the NL80211_ATTR_WIPHY_DYN_ACK flag to mac80211 driver using netlink

Disabling it can be done by providing a valid fixed value.

To give an idea of a practical example:

In my usecase, we have mesh wifi device installed on ships/platforms.
Currently, the coverage class is set at 12000m fixed.

When a vessel moved closer (ex. 1500m), the measured link capacity was a lot
lower compared to setting the coverage class fixed to 1500m

Dynack completely solved this, nearly providing double the bandwidth at closer range
compared to the fixed setting of 12000m being used.

Also when a vessel sailed to a distance greater than the fixed setting,
communication was lost as the ACK's never arrived within the max allowed timeframe.

Actual distance: 6010m
iperf 60s run avg

Fixed 12150m:  31 Mbit/s
Dynack:        58 Mbit/s

Fixed 6300m:   51 Mbit/s
Dynack:        59 Mbit/s

Fixed 3000m:   13 Mbit/s  (lots of retries)
Dynack:        58 Mbit/s

Actual distance: 1504m
iperf 60s run avg

Fixed 12150m:  31 Mbit/s
Dynack:        86 Mbit/s

Fixed 6300m:   55 Mbit/s
Dynack:        87 Mbit/s

Fixed 3000m:   67 Mbit/s
Dynack:        87 Mbit/s

Signed-off-by: Koen Vandeputte <koen.vandeputte at ncentric.com>
---
 package/kernel/mac80211/Makefile | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/package/kernel/mac80211/Makefile b/package/kernel/mac80211/Makefile
index 3c88e451f1e2..611d5a73d89b 100644
--- a/package/kernel/mac80211/Makefile
+++ b/package/kernel/mac80211/Makefile
@@ -57,6 +57,7 @@ PKG_CONFIG_DEPENDS:= \
 	CONFIG_PACKAGE_ATH_DEBUG \
 	CONFIG_PACKAGE_ATH_DFS \
 	CONFIG_PACKAGE_ATH_SPECTRAL \
+	CONFIG_PACKAGE_ATH_DYNACK \
 	CONFIG_PACKAGE_B43_DEBUG \
 	CONFIG_PACKAGE_B43_PIO \
 	CONFIG_PACKAGE_B43_PHY_G \
@@ -199,6 +200,17 @@ define KernelPackage/ath/config
 		help
 		  Say Y to enable access to the FFT/spectral data via debugfs.
 
+	config PACKAGE_ATH_DYNACK
+		bool "Enable Dynack support"
+		depends on PACKAGE_kmod-ath9k-common
+		help
+		  Enables support for Dynamic ACK estimation, which allows the fastest possible speed
+		  at any distance automatically by increasing/decreasing the max frame ACK time for
+		  the most remote station detected.  It can be enabled by using iw (iw phy0 set distance auto),
+		  or by sending the NL80211_ATTR_WIPHY_DYN_ACK flag to mac80211 driver using netlink.
+
+		  Select this option if you want to enable this feature
+
   endif
 endef
 
@@ -1630,7 +1642,7 @@ config-$(call config_package,ath) += ATH_CARDS ATH_COMMON ATH_REG_DYNAMIC_USER_R
 config-$(CONFIG_PACKAGE_ATH_DEBUG) += ATH_DEBUG ATH10K_DEBUG ATH9K_STATION_STATISTICS
 config-$(CONFIG_PACKAGE_ATH_DFS) += ATH9K_DFS_CERTIFIED ATH10K_DFS_CERTIFIED
 config-$(CONFIG_PACKAGE_ATH_SPECTRAL) += ATH9K_COMMON_SPECTRAL ATH10K_SPECTRAL
-
+config-$(CONFIG_PACKAGE_ATH_DYNACK) += ATH9K_DYNACK
 config-$(call config_package,ath9k) += ATH9K
 config-$(call config_package,ath9k-common) += ATH9K_COMMON
 config-$(CONFIG_TARGET_ar71xx) += ATH9K_AHB
-- 
2.7.4


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From Evgeniy.Didin at synopsys.com  Mon Jul  2 04:26:11 2018
From: Evgeniy.Didin at synopsys.com (Evgeniy Didin)
Date: Mon,  2 Jul 2018 11:26:11 +0300
Subject: [OpenWrt-Devel] [PATCH] arc: Update variables substitutions in
 u-boot env files
Message-ID: <20180702082611.14525-1-Evgeniy.Didin@synopsys.com>

From: Evgeniy Didin <didin at synopsys.com>

In the latest version of u-boot (2018.05) there was a swith to 
Hush shell for ARC AXS10x boards(arc770/archs38):
commit 9249d74781e1 ("ARC: AXS10x: Enable hush shell").
In Hush shell using "$()" to declare envitonment variables is forbidden,
instead of this "${}" need to be used.

---
 target/linux/arc770/image/uEnv.txt  | 6 +++---
 target/linux/archs38/image/uEnv.txt | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/target/linux/arc770/image/uEnv.txt b/target/linux/arc770/image/uEnv.txt
index 35549cb1c4..53632e8bb6 100644
--- a/target/linux/arc770/image/uEnv.txt
+++ b/target/linux/arc770/image/uEnv.txt
@@ -1,7 +1,7 @@
 setenv kernel_addr_r 0x82000000
 setenv fdt_addr_r 0x83000000
-setenv loadkernel fatload mmc 0 \$(kernel_addr_r) uImage
-setenv loaddtb fatload mmc 0 \$(fdt_addr_r) \$(dts)
+setenv loadkernel fatload mmc 0 \${kernel_addr_r} uImage
+setenv loaddtb fatload mmc 0 \${fdt_addr_r} \${dts}
 setenv bootargs earlycon=uart8250,mmio32,0xe0022000,115200n8 console=ttyS3,115200n8 root=/dev/mmcblk0p2 rootwait print-fatal-signals=1
-setenv uenvcmd run loadkernel\; run loaddtb\; bootm \$(kernel_addr_r) - \$(fdt_addr_r)
+setenv uenvcmd run loadkernel\; run loaddtb\; bootm \${kernel_addr_r} - \${fdt_addr_r}
 run uenvcmd
diff --git a/target/linux/archs38/image/uEnv.txt b/target/linux/archs38/image/uEnv.txt
index 35549cb1c4..53632e8bb6 100644
--- a/target/linux/archs38/image/uEnv.txt
+++ b/target/linux/archs38/image/uEnv.txt
@@ -1,7 +1,7 @@
 setenv kernel_addr_r 0x82000000
 setenv fdt_addr_r 0x83000000
-setenv loadkernel fatload mmc 0 \$(kernel_addr_r) uImage
-setenv loaddtb fatload mmc 0 \$(fdt_addr_r) \$(dts)
+setenv loadkernel fatload mmc 0 \${kernel_addr_r} uImage
+setenv loaddtb fatload mmc 0 \${fdt_addr_r} \${dts}
 setenv bootargs earlycon=uart8250,mmio32,0xe0022000,115200n8 console=ttyS3,115200n8 root=/dev/mmcblk0p2 rootwait print-fatal-signals=1
-setenv uenvcmd run loadkernel\; run loaddtb\; bootm \$(kernel_addr_r) - \$(fdt_addr_r)
+setenv uenvcmd run loadkernel\; run loaddtb\; bootm \${kernel_addr_r} - \${fdt_addr_r}
 run uenvcmd
-- 
2.17.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From chunkeey at gmail.com  Mon Jul  2 07:42:39 2018
From: chunkeey at gmail.com (Christian Lamparter)
Date: Mon, 02 Jul 2018 13:42:39 +0200
Subject: [OpenWrt-Devel] MR24 sysupgrade seems to be broken
In-Reply-To: <CAHP3WfNteb82UN5w6LExop91VbcK7s5dus0nnr9RHreYvqYr6Q@mail.gmail.com>
References: <CAHP3WfMShPWeWuXsKFyJt6GnTW9dG+cKQf6o=to5De=nf1jiPw@mail.gmail.com>
 <12151040.9edgLA9F3G@debian64>
 <CAHP3WfNteb82UN5w6LExop91VbcK7s5dus0nnr9RHreYvqYr6Q@mail.gmail.com>
Message-ID: <20412478.juhasRM312@debian64>

On Sunday, July 1, 2018 2:26:35 AM CEST Russell Senior wrote:
> Here is what shows during sysupgrade:
> 
> https://pastebin.com/YfbQZ5fB
>
Have you tried the aforementioned fix for the buggy mtd-utils on
your old/existing installation or not?

> On Sat, Jun 30, 2018 at 6:49 AM, Christian Lamparter <chunkeey at gmail.com>
> wrote:
> > On Saturday, June 30, 2018 10:06:21 AM CEST Russell Senior wrote:
> > > I just tried updating a Meraki MR24 to current master, from an image a
> > few
> > > months old and it broke.  I get a new kernel, but an old rootfs.  I have
> > > some of these deployed where a serial connection is awkward.  It would be
> > > nice if sysupgrade worked.
> > >
> > Any idea what broke it? From your description "new kernel, old rootfs" it
> > could be the mtd-utils update to 2.0.2 that broke it:
> >
> > <https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=
> > f37f63f38ccb706b196fe4934d0d9d92537eb832>
> >
> > and this was fixed by me just this month:
> >
> > <https://git.openwrt.org/?p=openwrt/openwrt.git;a=commitdiff;h=
> > daf19649dbf101ce7ae17abf84eeed7a30b41275>
> > (also upstream <http://git.infradead.org/mtd-utils.git/commit/
> > 0f833ac73ad631248826386e2918d8571ecf0347>)
> >
> > so I think you would need to somehow update the mtd-utils
> > package (ubinfo, ubimkvol, ubirmvol, ...)  on your old routers
> > before performing sysupgrading in order to fix this.




_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From fe at dev.tdt.de  Mon Jul  2 08:52:09 2018
From: fe at dev.tdt.de (Florian Eckert)
Date: Mon,  2 Jul 2018 14:52:09 +0200
Subject: [OpenWrt-Devel] [PATCH 1/2] services/uhttpd: add -M option for
 Last-Modified header sending
Message-ID: <20180702125210.9749-1-fe@dev.tdt.de>

If uhttpd is started with the option -M then Last-Modified header is not
send during ok respond. We have already an ETag header set which is more
accurate.

See URL:
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Etag

So make sending of Last-Modified header optional with a config option.
If the option is not set then the behaviour is as before this option was
added.

Signed-off-by: Florian Eckert <fe at dev.tdt.de>
---
 ...ct-if-last-modified-header-should-be-send.patch | 46 ++++++++++++++++++++++
 1 file changed, 46 insertions(+)
 create mode 100644 package/network/services/uhttpd/patches/0001-add-a-M-option-to-select-if-last-modified-header-should-be-send.patch

diff --git a/package/network/services/uhttpd/patches/0001-add-a-M-option-to-select-if-last-modified-header-should-be-send.patch b/package/network/services/uhttpd/patches/0001-add-a-M-option-to-select-if-last-modified-header-should-be-send.patch
new file mode 100644
index 0000000000..9835ca8cfd
--- /dev/null
+++ b/package/network/services/uhttpd/patches/0001-add-a-M-option-to-select-if-last-modified-header-should-be-send.patch
@@ -0,0 +1,46 @@
+--- a/file.c
++++ b/file.c
+@@ -337,8 +337,9 @@ static void uh_file_response_ok_hdrs(str
+ 
+ 	if (s) {
+ 		ustream_printf(cl->us, "ETag: %s\r\n", uh_file_mktag(s, buf, sizeof(buf)));
+-		ustream_printf(cl->us, "Last-Modified: %s\r\n",
+-			       uh_file_unix2date(s->st_mtime, buf, sizeof(buf)));
++		if(!conf.no_last_modified_header)
++			ustream_printf(cl->us, "Last-Modified: %s\r\n",
++				       uh_file_unix2date(s->st_mtime, buf, sizeof(buf)));
+ 	}
+ 	ustream_printf(cl->us, "Date: %s\r\n",
+ 		       uh_file_unix2date(time(NULL), buf, sizeof(buf)));
+--- a/main.c
++++ b/main.c
+@@ -232,7 +232,7 @@ int main(int argc, char **argv)
+ 	init_defaults_pre();
+ 	signal(SIGPIPE, SIG_IGN);
+ 
+-	while ((ch = getopt(argc, argv, "A:aC:c:Dd:E:fh:H:I:i:K:k:L:l:m:N:n:p:qRr:Ss:T:t:U:u:Xx:y:")) != -1) {
++	while ((ch = getopt(argc, argv, "A:aC:c:Dd:E:fh:H:I:i:K:k:L:l:Mm:N:n:p:qRr:Ss:T:t:U:u:Xx:y:")) != -1) {
+ 		switch(ch) {
+ #ifdef HAVE_TLS
+ 		case 'C':
+@@ -311,6 +311,10 @@ int main(int argc, char **argv)
+ 			conf.rfc1918_filter = 1;
+ 			break;
+ 
++		case 'M':
++			conf.no_last_modified_header = 1;
++			break;
++
+ 		case 'n':
+ 			conf.max_script_requests = atoi(optarg);
+ 			break;
+--- a/uhttpd.h
++++ b/uhttpd.h
+@@ -77,6 +77,7 @@ struct config {
+ 	int ubus_noauth;
+ 	int ubus_cors;
+ 	int cgi_prefix_len;
++	int no_last_modified_header;
+ 	struct list_head cgi_alias;
+ };
+ 
-- 
2.11.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From fe at dev.tdt.de  Mon Jul  2 08:52:10 2018
From: fe at dev.tdt.de (Florian Eckert)
Date: Mon,  2 Jul 2018 14:52:10 +0200
Subject: [OpenWrt-Devel] [PATCH 2/2] services/uhttpd: Disable option -M for
 Last-Modified header
In-Reply-To: <20180702125210.9749-1-fe@dev.tdt.de>
References: <20180702125210.9749-1-fe@dev.tdt.de>
Message-ID: <20180702125210.9749-2-fe@dev.tdt.de>

Make Last-Modified header configurable over uci.
If option is not set then send Last-Modified header.
This is the equal to the behaviour as before this option was added.

Signed-off-by: Florian Eckert <fe at dev.tdt.de>
---
 package/network/services/uhttpd/files/uhttpd.init | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/network/services/uhttpd/files/uhttpd.init b/package/network/services/uhttpd/files/uhttpd.init
index 47270bcc15..2367ac137f 100755
--- a/package/network/services/uhttpd/files/uhttpd.init
+++ b/package/network/services/uhttpd/files/uhttpd.init
@@ -127,6 +127,7 @@ start_instance()
 	append_bool "$cfg" no_symlinks "-S" 0
 	append_bool "$cfg" no_dirlists "-D" 0
 	append_bool "$cfg" rfc1918_filter "-R" 0
+	append_bool "$cfg" no_last_modified_header "-M" 0
 
 	config_get alias_list "$cfg" alias
 	for alias in $alias_list; do
-- 
2.11.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From devel-sven at geroedel.de  Mon Jul  2 10:25:26 2018
From: devel-sven at geroedel.de (Sven Roederer)
Date: Mon, 02 Jul 2018 16:25:26 +0200
Subject: [OpenWrt-Devel] turris onmia - broken uboot-env
Message-ID: <3190836.ufv1y0dHpV@strike>

Hi,

it's a bit off-topic, but probably someone can share the correct uboot-env of 
a Turris-Omnia 2G.
Mine is not bootingafter somehow damaging the settings.

A simple printenv would be great.


Thanks Sven

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From pud at nerdpunx.net  Mon Jul  2 10:49:30 2018
From: pud at nerdpunx.net (Mirko Langisch)
Date: Mon, 2 Jul 2018 16:49:30 +0200
Subject: [OpenWrt-Devel] turris onmia - broken uboot-env
In-Reply-To: <3190836.ufv1y0dHpV@strike>
References: <3190836.ufv1y0dHpV@strike>
Message-ID: <20180702144930.GA3040@sama32.org>

On Mon, 02 Jul 2018, Sven Roederer wrote:

> it's a bit off-topic, but probably someone can share the correct uboot-env of 
> a Turris-Omnia 2G.
> Mine is not bootingafter somehow damaging the settings.
> 
> A simple printenv would be great.

does 

    env default -a
    saveenv

help?

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From alin.nastac at gmail.com  Mon Jul  2 11:29:11 2018
From: alin.nastac at gmail.com (Alin Nastac)
Date: Mon,  2 Jul 2018 17:29:11 +0200
Subject: [OpenWrt-Devel] [PATCH] firewall3: make reject types selectable by
 user
Message-ID: <1530545351-24848-1-git-send-email-alin.nastac@technicolor.com>

From: Alin Nastac <alin.nastac at gmail.com>

RFC 6092 recommends in section 3.3.1 that an IPv6 CPE must respond to
unsolicited inbound SYNs with an ICMPv6 Destination Unreachable error
code 1 (Communication with destination administratively prohibited).

Signed-off-by: Alin Nastac <alin.nastac at gmail.com>
---
 defaults.c | 21 ++++++++++++++++-----
 options.h  |  2 ++
 2 files changed, 18 insertions(+), 5 deletions(-)

diff --git a/defaults.c b/defaults.c
index 11fbf0d..6565ca2 100644
--- a/defaults.c
+++ b/defaults.c
@@ -41,6 +41,8 @@ const struct fw3_option fw3_flag_opts[] = {
 	FW3_OPT("output",              target,   defaults, policy_output),
 
 	FW3_OPT("drop_invalid",        bool,     defaults, drop_invalid),
+	FW3_OPT("tcp_reset_rejects",   bool,     defaults, tcp_reset_rejects),
+	FW3_OPT("admin_prohib_rejects",bool,     defaults, admin_prohib_rejects),
 
 	FW3_OPT("syn_flood",           bool,     defaults, syn_flood),
 	FW3_OPT("synflood_protect",    bool,     defaults, syn_flood),
@@ -113,6 +115,7 @@ fw3_load_defaults(struct fw3_state *state, struct uci_package *p)
 
 	defs->syn_flood_rate.rate  = 25;
 	defs->syn_flood_rate.burst = 50;
+	defs->tcp_reset_rejects    = true;
 	defs->tcp_syncookies       = true;
 	defs->tcp_window_scaling   = true;
 	defs->custom_chains        = true;
@@ -276,14 +279,22 @@ fw3_print_default_head_rules(struct fw3_ipt_handle *handle,
 			fw3_ipt_rule_append(r, "INPUT");
 		}
 
-		r = fw3_ipt_rule_create(handle, &tcp, NULL, NULL, NULL, NULL);
-		fw3_ipt_rule_target(r, "REJECT");
-		fw3_ipt_rule_addarg(r, false, "--reject-with", "tcp-reset");
-		fw3_ipt_rule_append(r, "reject");
+		if (defs->tcp_reset_rejects)
+		{
+			r = fw3_ipt_rule_create(handle, &tcp, NULL, NULL, NULL, NULL);
+			fw3_ipt_rule_target(r, "REJECT");
+			fw3_ipt_rule_addarg(r, false, "--reject-with", "tcp-reset");
+			fw3_ipt_rule_append(r, "reject");
+		}
 
 		r = fw3_ipt_rule_new(handle);
 		fw3_ipt_rule_target(r, "REJECT");
-		fw3_ipt_rule_addarg(r, false, "--reject-with", "port-unreach");
+		fw3_ipt_rule_addarg(r, false, "--reject-with",
+			defs->admin_prohib_rejects ?
+				(handle->family == FW3_FAMILY_V6 ?
+					"adm-prohibited" :
+					"admin-prohib") :
+				"port-unreach");
 		fw3_ipt_rule_append(r, "reject");
 
 		break;
diff --git a/options.h b/options.h
index 08fecf6..e3ba99c 100644
--- a/options.h
+++ b/options.h
@@ -276,6 +276,8 @@ struct fw3_defaults
 	enum fw3_flag policy_forward;
 
 	bool drop_invalid;
+	bool tcp_reset_rejects;
+	bool admin_prohib_rejects;
 
 	bool syn_flood;
 	struct fw3_limit syn_flood_rate;
-- 
2.7.4


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From russell at personaltelco.net  Mon Jul  2 16:10:44 2018
From: russell at personaltelco.net (Russell Senior)
Date: Mon, 2 Jul 2018 13:10:44 -0700
Subject: [OpenWrt-Devel] MR24 sysupgrade seems to be broken
In-Reply-To: <20412478.juhasRM312@debian64>
References: <CAHP3WfMShPWeWuXsKFyJt6GnTW9dG+cKQf6o=to5De=nf1jiPw@mail.gmail.com>
 <12151040.9edgLA9F3G@debian64>
 <CAHP3WfNteb82UN5w6LExop91VbcK7s5dus0nnr9RHreYvqYr6Q@mail.gmail.com>
 <20412478.juhasRM312@debian64>
Message-ID: <CAHP3WfPFgzLU=yvx-wDxRsNvp3xo5ZySn9xmFAwfW4SaXCD48Q@mail.gmail.com>

Updating to a current ubi-utils seems to fix it.  It looks like the version
number didn't change with the fix though, so I needed to use
--force-reinstall to overwrite ubi-info 2.0.2-1.

On Mon, Jul 2, 2018 at 4:42 AM, Christian Lamparter <chunkeey at gmail.com>
wrote:

> On Sunday, July 1, 2018 2:26:35 AM CEST Russell Senior wrote:
> > Here is what shows during sysupgrade:
> >
> > https://pastebin.com/YfbQZ5fB
> >
> Have you tried the aforementioned fix for the buggy mtd-utils on
> your old/existing installation or not?
>
> > On Sat, Jun 30, 2018 at 6:49 AM, Christian Lamparter <chunkeey at gmail.com
> >
> > wrote:
> > > On Saturday, June 30, 2018 10:06:21 AM CEST Russell Senior wrote:
> > > > I just tried updating a Meraki MR24 to current master, from an image
> a
> > > few
> > > > months old and it broke.  I get a new kernel, but an old rootfs.  I
> have
> > > > some of these deployed where a serial connection is awkward.  It
> would be
> > > > nice if sysupgrade worked.
> > > >
> > > Any idea what broke it? From your description "new kernel, old rootfs"
> it
> > > could be the mtd-utils update to 2.0.2 that broke it:
> > >
> > > <https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=
> > > f37f63f38ccb706b196fe4934d0d9d92537eb832>
> > >
> > > and this was fixed by me just this month:
> > >
> > > <https://git.openwrt.org/?p=openwrt/openwrt.git;a=commitdiff;h=
> > > daf19649dbf101ce7ae17abf84eeed7a30b41275>
> > > (also upstream <http://git.infradead.org/mtd-utils.git/commit/
> > > 0f833ac73ad631248826386e2918d8571ecf0347>)
> > >
> > > so I think you would need to somehow update the mtd-utils
> > > package (ubinfo, ubimkvol, ubirmvol, ...)  on your old routers
> > > before performing sysupgrading in order to fix this.
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20180702/5f1a8fa7/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From luaraneda at gmail.com  Mon Jul  2 22:54:11 2018
From: luaraneda at gmail.com (Luis Araneda)
Date: Mon,  2 Jul 2018 22:54:11 -0400
Subject: [OpenWrt-Devel] [PATCH] kernel: remove DEVMEM and DEVKMEM from
 target's config
Message-ID: <20180703025411.3013-1-luaraneda@gmail.com>

These options are handled by generic configuration

Targets that need these options should select KERNEL_DEVMEM
and/or KERNEL_DEVKMEM options on OpenWRT's config

Signed-off-by: Luis Araneda <luaraneda at gmail.com>
---
 target/linux/at91/config-4.9                 | 2 --
 target/linux/gemini/config-4.14              | 1 -
 target/linux/layerscape/armv8_32b/config-4.9 | 2 --
 target/linux/layerscape/armv8_64b/config-4.9 | 2 --
 target/linux/oxnas/config-4.14               | 1 -
 5 files changed, 8 deletions(-)

diff --git a/target/linux/at91/config-4.9 b/target/linux/at91/config-4.9
index e483d0f76d..6ccc34b957 100644
--- a/target/linux/at91/config-4.9
+++ b/target/linux/at91/config-4.9
@@ -131,8 +131,6 @@ CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S"
 CONFIG_DEBUG_USER=y
 CONFIG_DEFAULT_IOSCHED="noop"
 CONFIG_DEFAULT_NOOP=y
-CONFIG_DEVKMEM=y
-CONFIG_DEVMEM=y
 CONFIG_DEVTMPFS=y
 CONFIG_DEVTMPFS_MOUNT=y
 CONFIG_DMADEVICES=y
diff --git a/target/linux/gemini/config-4.14 b/target/linux/gemini/config-4.14
index 7f093ae977..95e6b0c2c6 100644
--- a/target/linux/gemini/config-4.14
+++ b/target/linux/gemini/config-4.14
@@ -130,7 +130,6 @@ CONFIG_DECOMPRESS_XZ=y
 CONFIG_DEFAULT_CFQ=y
 # CONFIG_DEFAULT_DEADLINE is not set
 CONFIG_DEFAULT_IOSCHED="cfq"
-CONFIG_DEVMEM=y
 CONFIG_DMADEVICES=y
 CONFIG_DMATEST=y
 CONFIG_DMA_ENGINE=y
diff --git a/target/linux/layerscape/armv8_32b/config-4.9 b/target/linux/layerscape/armv8_32b/config-4.9
index 1ee8fdb0d7..6f8ef627f7 100644
--- a/target/linux/layerscape/armv8_32b/config-4.9
+++ b/target/linux/layerscape/armv8_32b/config-4.9
@@ -297,8 +297,6 @@ CONFIG_DETECT_HUNG_TASK=y
 # CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND is not set
 # CONFIG_DEVFREQ_GOV_USERSPACE is not set
 # CONFIG_DEVFREQ_THERMAL is not set
-CONFIG_DEVKMEM=y
-CONFIG_DEVMEM=y
 CONFIG_DEVTMPFS=y
 CONFIG_DEVTMPFS_MOUNT=y
 CONFIG_DMADEVICES=y
diff --git a/target/linux/layerscape/armv8_64b/config-4.9 b/target/linux/layerscape/armv8_64b/config-4.9
index c4c325acfb..0873b2a8c1 100644
--- a/target/linux/layerscape/armv8_64b/config-4.9
+++ b/target/linux/layerscape/armv8_64b/config-4.9
@@ -322,8 +322,6 @@ CONFIG_DEFAULT_CFQ=y
 CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=120
 CONFIG_DEFAULT_IOSCHED="cfq"
 CONFIG_DETECT_HUNG_TASK=y
-CONFIG_DEVKMEM=y
-CONFIG_DEVMEM=y
 CONFIG_DEVTMPFS=y
 CONFIG_DEVTMPFS_MOUNT=y
 # CONFIG_DEV_DAX is not set
diff --git a/target/linux/oxnas/config-4.14 b/target/linux/oxnas/config-4.14
index 4d6943aea5..1bf7d0c072 100644
--- a/target/linux/oxnas/config-4.14
+++ b/target/linux/oxnas/config-4.14
@@ -103,7 +103,6 @@ CONFIG_DECOMPRESS_XZ=y
 CONFIG_DEFAULT_CFQ=y
 # CONFIG_DEFAULT_DEADLINE is not set
 CONFIG_DEFAULT_IOSCHED="cfq"
-CONFIG_DEVMEM=y
 CONFIG_DEVTMPFS=y
 CONFIG_DEVTMPFS_MOUNT=y
 CONFIG_DMA_CMA=y
-- 
2.18.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From knaack.h at gmx.de  Tue Jul  3 06:08:15 2018
From: knaack.h at gmx.de (Hartmut Knaack)
Date: Tue, 3 Jul 2018 12:08:15 +0200
Subject: [OpenWrt-Devel] Multipurpose pins not locked on WRT3200ACM
Message-ID: <9e91ebab-05db-55b0-2386-06e765112d29@gmx.de>

Hi,
I was curious if there are some GPIOs exposed on the Linksys WRT3200ACM, so
I started exporting them in /sys/class/gpio. I realized, that some are
locked against exporting (those claimed by gpio-leds and gpio-keys, power
regulator), while others exposed more or less problematic side effects.
Less critical are GPIOs 2 and 3, which seem to be used by the I2C bus,
where a LED driver controls some of the front LEDs.
A number of other GPIOs (22, 23, 25, 28, 30, 32, 33, 35, 56, 38, 40, 41,
42) however had an effect on the NAND-flash in the range of just not being
able to access it for the moment up to corrupt firmware partition (with the
need to unbrick from the boot loader) and even to the point, that it
requested bootloader code on the uart. It seems, GPIO 33 does major
corruption and GPIO 36 can be really nasty.
There are two more GPIOs, which are quite interesting: when GPIO 26 is
exported and set to output, setting its value to 1 causes all LAN LEDs to
light up constantly. May it be connected to the switch chip?
GPIO 52, when exported and set to output, also causes the LED driver on I2C
to not respond any more. What is the reason (connected to a reset line?)
The basic conclusion is: those multipurpose pins in use need to be locked,
just like the gpio-leds and gpio-keys modules do.
The question remaining is: which multipurpose pins are already in use by
NAND-flash, I2C bus, UART0, SATA(?), PCIe(?), some ethernet MII(?) or
something else?

@Imre Kaloz: From what I remember, you had a closer relationship to Linksys
and brought in support for this device (family). I hope you can shed some
light on this issue.

Thanks,

Hartmut
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0x03684A18FAC89148.asc
Type: application/pgp-keys
Size: 3086 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20180703/e9980de6/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20180703/e9980de6/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From yszhou4tech at gmail.com  Tue Jul  3 06:12:03 2018
From: yszhou4tech at gmail.com (Yousong Zhou)
Date: Tue,  3 Jul 2018 18:12:03 +0800
Subject: [OpenWrt-Devel] [PATCH 1/4] fixup-makefile.pl: fixup when
 PKG_SOURCE is defined elsewhere
Message-ID: <20180703101206.53097-1-yszhou4tech@gmail.com>

Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
---
 scripts/fixup-makefile.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/fixup-makefile.pl b/scripts/fixup-makefile.pl
index 9026ddcce4..b6f1c74738 100755
--- a/scripts/fixup-makefile.pl
+++ b/scripts/fixup-makefile.pl
@@ -26,7 +26,7 @@ sub set_var($) {
 		$state{related_var} = "URL";
 	} else {
 		$state{context} = 1;
-		$state{related_var} = "PKG_SOURCE";
+		$state{related_var} = "PKG_SOURCE_URL";
 	}
 }
 

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From yszhou4tech at gmail.com  Tue Jul  3 06:12:04 2018
From: yszhou4tech at gmail.com (Yousong Zhou)
Date: Tue,  3 Jul 2018 18:12:04 +0800
Subject: [OpenWrt-Devel] [PATCH 2/4] download.mk: add more comments
In-Reply-To: <20180703101206.53097-1-yszhou4tech@gmail.com>
References: <20180703101206.53097-1-yszhou4tech@gmail.com>
Message-ID: <20180703101206.53097-2-yszhou4tech@gmail.com>

Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
---
 include/download.mk | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/include/download.mk b/include/download.mk
index 3634e777c9..5cfc542042 100644
--- a/include/download.mk
+++ b/include/download.mk
@@ -59,7 +59,7 @@ check_escape=$(subst ','\'',$(1))
 # $(1): suffix of the F_, C_ variables, e.g. hash_deprecated, hash_mismatch, etc.
 # $(2): filename
 # $(3): expected hash value
-# $(4): hash var name: MD5SUM, HASH
+# $(4): var name of the the form: {PKG_,Download/<name>:}{,MIRROR_}{HASH,MIRROR_HASH}
 check_warn_nofix = $(info $(shell printf "$(_R)WARNING: %s$(_N)" '$(call check_escape,$(call C_$(1),$(2),$(3),$(4)))'))
 ifndef FIXUP
   check_warn = $(check_warn_nofix)
@@ -77,12 +77,15 @@ endif
 
 # $(1): filename
 # $(2): expected hash value
-# $(3): hash var name: MD5SUM, HASH
+# $(3): var name of the the form: {PKG_,Download/<name>:}{,MIRROR_}{HASH,MIRROR_HASH}
 C_download_missing = $(1) is missing, please run make download before re-running this check
 C_hash_mismatch = $(3) does not match $(1) hash $(call gen_sha256sum,$(1))
 C_hash_deprecated = $(3) uses deprecated hash, set to $(call gen_sha256sum,$(1))
 C_hash_missing = $(3) is missing, set to $(call gen_sha256sum,$(1))
 
+# $(1): filename
+# $(2): expected hash value
+# $(3): var name of the the form: {PKG_,Download/<name>:}{,MIRROR_}{HASH,MIRROR_HASH}
 check_hash = \
   $(if $(wildcard $(DL_DIR)/$(1)), \
     $(if $(filter-out x,$(2)), \

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From yszhou4tech at gmail.com  Tue Jul  3 06:12:05 2018
From: yszhou4tech at gmail.com (Yousong Zhou)
Date: Tue,  3 Jul 2018 18:12:05 +0800
Subject: [OpenWrt-Devel] [PATCH 3/4] scripts/dl_github_archive.py: rename
 from download.py
In-Reply-To: <20180703101206.53097-1-yszhou4tech@gmail.com>
References: <20180703101206.53097-1-yszhou4tech@gmail.com>
Message-ID: <20180703101206.53097-3-yszhou4tech@gmail.com>

 - Make the code more GitHub-specific
 - Requires mirror hash to work with .gitattributes
 - Use different API depending on whether PKG_SOURCE_VERSION is a
   complete commit id or other ref types like tags
 - Fix removing symbolic link
 - pre-clean dir_untar for possible leftovers from previous run

Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
---
 include/download.mk                           |   8 +-
 scripts/{download.py => dl_github_archive.py} | 241 +++++++++++++-------------
 2 files changed, 127 insertions(+), 122 deletions(-)
 rename scripts/{download.py => dl_github_archive.py} (64%)

diff --git a/include/download.mk b/include/download.mk
index 5cfc542042..3851f6c98a 100644
--- a/include/download.mk
+++ b/include/download.mk
@@ -176,15 +176,15 @@ define DownloadMethod/git
 	)
 endef
 
-define DownloadMethod/github-tarball
+define DownloadMethod/github_archive
 	$(call wrap_mirror,$(1),$(2), \
-		$(SCRIPT_DIR)/download.py dl \
+		$(SCRIPT_DIR)/dl_github_archive.py \
 			--dl-dir="$(DL_DIR)" \
-			--url $(foreach url,$(URL),"$(url)") \
-			--proto="$(PROTO)" \
+			--url="$(URL)" \
 			--version="$(VERSION)" \
 			--subdir="$(SUBDIR)" \
 			--source="$(FILE)" \
+			--hash="$(MIRROR_HASH)" \
 		|| ( $(call DownloadMethod/git-raw) ); \
 	)
 endef
diff --git a/scripts/download.py b/scripts/dl_github_archive.py
similarity index 64%
rename from scripts/download.py
rename to scripts/dl_github_archive.py
index 779d7b3de2..5a5a016e37 100755
--- a/scripts/download.py
+++ b/scripts/dl_github_archive.py
@@ -10,6 +10,7 @@ import calendar
 import datetime
 import errno
 import fcntl
+import hashlib
 import json
 import os
 import os.path
@@ -23,26 +24,31 @@ import urllib2
 
 TMPDIR = os.environ.get('TMP_DIR') or '/tmp'
 TMPDIR_DL = os.path.join(TMPDIR, 'dl')
-DOWNLOAD_METHODS = []
+
 
 class PathException(Exception): pass
-class DownloadException(Exception): pass
+class DownloadGitHubError(Exception): pass
 
 
 class Path(object):
     """Context class for preparing and cleaning up directories.
 
+    If ```preclean` is ``False``, ``path`` will NOT be removed on context enter
+
     If ``path`` ``isdir``, then it will be created on context enter.
 
     If ``keep`` is True, then ``path`` will NOT be removed on context exit
     """
 
-    def __init__(self, path, isdir=True, keep=False):
+    def __init__(self, path, isdir=True, preclean=False, keep=False):
         self.path = path
         self.isdir = isdir
+        self.preclean = preclean
         self.keep = keep
 
     def __enter__(self):
+        if self.preclean:
+            self.rm_all(self.path)
         if self.isdir:
             self.mkdir_all(self.path)
         return self
@@ -61,14 +67,11 @@ class Path(object):
             Path._mkdir(p)
 
     @staticmethod
-    def _rmdir_all(dir_):
+    def _rmdir_dir(dir_):
         names = Path._listdir(dir_)
         for name in names:
             p = os.path.join(dir_, name)
-            if os.path.isdir(p):
-                Path._rmdir_all(p)
-            else:
-                Path._remove(p)
+            Path.rm_all(p)
         Path._rmdir(dir_)
 
     @staticmethod
@@ -105,8 +108,10 @@ class Path(object):
     @staticmethod
     def rm_all(path):
         """Same as rm -r."""
-        if os.path.isdir(path):
-            Path._rmdir_all(path)
+        if os.path.islink(path):
+            Path._remove(path)
+        elif os.path.isdir(path):
+            Path._rmdir_dir(path)
         else:
             Path._remove(path)
 
@@ -201,60 +206,47 @@ class GitHubCommitTsCache(object):
             fout.write(line)
 
 
-class DownloadMethod(object):
-    """Base class of all download method."""
+class DownloadGitHubTarball(object):
+    """Download and repack archive tarabll from GitHub.
 
-    def __init__(self, args):
-        self.args = args
-        self.urls = args.urls
-        self.url = self.urls[0]
-        self.dl_dir = args.dl_dir
+    Compared with the method of packing after cloning the whole repo, this
+    method is more friendly to users with fragile internet connection.
 
-    @classmethod
-    def resolve(cls, args):
-        """Resolve download method to use.
+    However, there are limitations with this method
 
-        return instance of subclass of DownloadMethod
-        """
-        for c in DOWNLOAD_METHODS:
-            if c.match(args):
-                return c(args)
+     - GitHub imposes a 60 reqs/hour limit for unauthenticated API access.
+       This affects fetching commit date for reproducible tarballs.  Download
+       through the archive link is not affected.
 
-    @staticmethod
-    def match(args):
-        """Return True if it can do the download."""
-        return NotImplemented
+     - GitHub archives do not contain source codes for submodules.
 
-    def download(self):
-        """Do the download and put it into the download dir."""
-        return NotImplemented
+     - GitHub archives seem to respect .gitattributes and ignore pathes with
+       export-ignore attributes.
 
+    For the first two issues, the method will fail loudly to allow fallback to
+    clone-then-pack method.
 
-class DownloadMethodGitHubTarball(DownloadMethod):
-    """Download and repack archive tarabll from GitHub."""
+    As for the 3rd issue, to make sure that this method only produces identical
+    tarballs as the fallback method, we require the expected hash value to be
+    supplied.  That means the first tarball will need to be prepared by the
+    clone-then-pack method
+    """
 
     __repo_url_regex = re.compile(r'^(?:https|git)://github.com/(?P<owner>[^/]+)/(?P<repo>[^/]+)')
 
     def __init__(self, args):
-        super(DownloadMethodGitHubTarball, self).__init__(args)
-        self._init_owner_repo()
+        self.dl_dir = args.dl_dir
         self.version = args.version
         self.subdir = args.subdir
         self.source = args.source
+        self.url = args.url
+        self._init_owner_repo()
+        self.xhash = args.hash
+        self._init_hasher()
         self.commit_ts = None           # lazy load commit timestamp
         self.commit_ts_cache = GitHubCommitTsCache()
         self.name = 'github-tarball'
 
-    @staticmethod
-    def match(args):
-        """Match if it's a GitHub clone url."""
-        url = args.urls[0]
-        proto = args.proto
-        if proto == 'git' and isinstance(url, basestring) \
-                and (url.startswith('https://github.com/') or url.startswith('git://github.com/')):
-            return True
-        return False
-
     def download(self):
         """Download and repack GitHub archive tarball."""
         self._init_commit_ts()
@@ -265,18 +257,23 @@ class DownloadMethodGitHubTarball(DownloadMethod):
                 self._fetch(tarball_path)
                 # unpack
                 d = os.path.join(dir_dl.path, self.subdir + '.untar')
-                with Path(d) as dir_untar:
+                with Path(d, preclean=True) as dir_untar:
                     tarball_prefix = Path.untar(tarball_path, into=dir_untar.path)
                     dir0 = os.path.join(dir_untar.path, tarball_prefix)
                     dir1 = os.path.join(dir_untar.path, self.subdir)
                     # submodules check
                     if self._has_submodule(dir0):
-                        raise DownloadException('unable to fetch submodules\' source code')
+                        raise self._error('Fetching submodules is not yet supported')
                     # rename subdir
                     os.rename(dir0, dir1)
                     # repack
                     into=os.path.join(TMPDIR_DL, self.source)
                     Path.tar(dir_untar.path, self.subdir, into=into, ts=self.commit_ts)
+                    try:
+                        self._hash_check(into)
+                    except Exception:
+                        Path.rm_all(into)
+                        raise
                     # move to target location
                     file1 = os.path.join(self.dl_dir, self.source)
                     if into != file1:
@@ -291,10 +288,9 @@ class DownloadMethodGitHubTarball(DownloadMethod):
             return e.errno != errno.ENOENT
 
     def _init_owner_repo(self):
-        url = self.url
-        m = self.__repo_url_regex.search(url)
+        m = self.__repo_url_regex.search(self.url)
         if m is None:
-            raise DownloadException('invalid github url: %s' % url)
+            raise self._error('Invalid github url: {}'.format(self.url))
         owner = m.group('owner')
         repo = m.group('repo')
         if repo.endswith('.git'):
@@ -302,23 +298,79 @@ class DownloadMethodGitHubTarball(DownloadMethod):
         self.owner = owner
         self.repo = repo
 
+    def _init_hasher(self):
+        xhash = self.xhash
+        if len(xhash) == 64:
+            self.hasher = hashlib.sha256()
+        elif len(xhash) == 32:
+            self.hasher = hashlib.md5()
+        else:
+            raise self._error('Requires sha256sum for verification')
+        self.xhash = xhash
+
+    def _hash_check(self, f):
+        with open(f, 'rb') as fin:
+            while True:
+                d = fin.read(4096)
+                if not d:
+                    break
+                self.hasher.update(d)
+        xhash = self.hasher.hexdigest()
+        if xhash != self.xhash:
+            raise self._error('Wrong hash (probably caused by .gitattributes), expecting {}, got {}'.format(self.xhash, xhash))
+
     def _init_commit_ts(self):
         if self.commit_ts is not None:
             return
-        url = self._make_repo_url_path('git', 'commits', self.version)
-        ct = self.commit_ts_cache.get(url)
-        if ct is not None:
-            self.commit_ts = ct
-            return
+        # GitHub provides 2 APIs[1,2] for fetching commit data.  API[1] is more
+        # terse while API[2] provides more verbose info such as commit diff
+        # etc.  That's the main reason why API[1] is preferred: the response
+        # size is predictable.
+        #
+        # However, API[1] only accepts complete commit sha1sum as the parameter
+        # while API[2] is more liberal accepting also partial commit id and
+        # tags, etc.
+        #
+        # [1] Get a single commit, Repositories, https://developer.github.com/v3/repos/commits/#get-a-single-commit
+        # [2] Git Commits, Git Data, https://developer.github.com/v3/git/commits/#get-a-commit
+        apis = [
+            {
+                'url': self._make_repo_url_path('git', 'commits', self.version),
+                'attr_path': ('committer', 'date'),
+            }, {
+                'url': self._make_repo_url_path('commits', self.version),
+                'attr_path': ('commit', 'committer', 'date'),
+            },
+        ]
+        version_is_sha1sum = len(self.version) == 40
+        if not version_is_sha1sum:
+            apis.insert(0, apis.pop())
+        for api in apis:
+            url = api['url']
+            attr_path = api['attr_path']
+            try:
+                ct = self.commit_ts_cache.get(url)
+                if ct is not None:
+                    self.commit_ts = ct
+                    return
+                ct = self._init_commit_ts_remote_get(url, attr_path)
+                self.commit_ts = ct
+                self.commit_ts_cache.set(url, ct)
+                return
+            except Exception:
+                pass
+        raise self._error('Cannot fetch commit ts: {}'.format(url))
+
+    def _init_commit_ts_remote_get(self, url, attrpath):
         resp = self._make_request(url)
         data = resp.read()
-        data = json.loads(data)
-        date = data['committer']['date']
+        date = json.loads(data)
+        for attr in attrpath:
+            date = date[attr]
         date = datetime.datetime.strptime(date, '%Y-%m-%dT%H:%M:%SZ')
         date = date.timetuple()
         ct = calendar.timegm(date)
-        self.commit_ts = ct
-        self.commit_ts_cache.set(url, ct)
+        return ct
 
     def _fetch(self, path):
         """Fetch tarball of the specified version ref."""
@@ -350,72 +402,25 @@ class DownloadMethodGitHubTarball(DownloadMethod):
         fileobj = urllib2.urlopen(req, context=sslcontext)
         return fileobj
 
-
-class DownloadMethodCatchall(DownloadMethod):
-    """Dummy method that knows names but not ways of download."""
-
-    def __init__(self, args):
-        super(DownloadMethodCatchall, self).__init__(args)
-        self.args = args
-        self.proto = args.proto
-        self.name = self._resolve_name()
-
-    def _resolve_name(self):
-        if self.proto:
-            return self.proto
-        methods_map = (
-            ('default', ('@APACHE/', '@GITHUB/', '@GNOME/', '@GNU/',
-                         '@KERNEL/', '@SF/', '@SAVANNAH/', 'ftp://', 'http://',
-                         'https://', 'file://')),
-            ('git', ('git://', )),
-            ('svn', ('svn://', )),
-            ('cvs', ('cvs://', )),
-            ('bzr', ('sftp://', )),
-            ('bzr', ('sftp://', )),
-            ('unknown', ('', )),
-        )
-        for name, prefixes in methods_map:
-            if any(url.startswith(prefix) for prefix in prefixes for url in self.urls):
-                return name
-
-    @staticmethod
-    def match(args):
-        """Return True."""
-        return True
-
-    def download(self):
-        """Not implemented.
-
-        raise DownloadException
-        """
-        raise DownloadException('download method for %s is not yet implemented' % self.name)
-
-# order matters
-DOWNLOAD_METHODS = [
-    DownloadMethodGitHubTarball,
-    DownloadMethodCatchall,
-]
+    def _error(self, msg):
+        return DownloadGitHubError('{}: {}'.format(self.source, msg))
 
 
 def main():
     parser = argparse.ArgumentParser()
-    parser.add_argument('action', choices=('dl_method', 'dl'), help='Action to take')
-    parser.add_argument('--urls', nargs='+', metavar='URL', help='Download URLs')
-    parser.add_argument('--proto', help='Download proto')
+    parser.add_argument('--dl-dir', default=os.getcwd(), help='Download dir')
+    parser.add_argument('--url', help='Download URL')
     parser.add_argument('--subdir', help='Source code subdir name')
     parser.add_argument('--version', help='Source code version')
     parser.add_argument('--source', help='Source tarball filename')
-    parser.add_argument('--dl-dir', default=os.getcwd(), help='Download dir')
+    parser.add_argument('--hash', help='Source tarball\'s expected sha256sum')
     args = parser.parse_args()
-    if args.action == 'dl_method':
-        method = DownloadMethod.resolve(args)
-        sys.stdout.write(method.name + '\n')
-    elif args.action == 'dl':
-        method = DownloadMethod.resolve(args)
-        try:
-            method.download()
-        except Exception:
-            raise
+    method = DownloadGitHubTarball(args)
+    try:
+        method.download()
+    except Exception:
+        sys.stderr.write('download {} from {} failed\n'.format(args.source, args.url))
+        raise
 
 if __name__ == '__main__':
     main()

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From yszhou4tech at gmail.com  Tue Jul  3 06:12:06 2018
From: yszhou4tech at gmail.com (Yousong Zhou)
Date: Tue,  3 Jul 2018 18:12:06 +0800
Subject: [OpenWrt-Devel] [PATCH 4/4] download.mk: enable
 DownloadMethod/github_archive
In-Reply-To: <20180703101206.53097-1-yszhou4tech@gmail.com>
References: <20180703101206.53097-1-yszhou4tech@gmail.com>
Message-ID: <20180703101206.53097-4-yszhou4tech@gmail.com>

Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
---
 include/download.mk | 22 ++++++++++++++--------
 1 file changed, 14 insertions(+), 8 deletions(-)

diff --git a/include/download.mk b/include/download.mk
index 3851f6c98a..d09ffab579 100644
--- a/include/download.mk
+++ b/include/download.mk
@@ -19,17 +19,23 @@ endif
 
 DOWNLOAD_RDEP=$(STAMP_PREPARED) $(HOST_STAMP_PREPARED)
 
+define dl_method_git
+$(if $(filter git://github.com/% https://github.com/%,$(1)),github_archive,git)
+endef
+
 # Try to guess the download method from the URL
 define dl_method
 $(strip \
-  $(if $(2),$(2), \
-    $(if $(filter @APACHE/% @GITHUB/% @GNOME/% @GNU/% @KERNEL/% @SF/% @SAVANNAH/% ftp://% http://% https://% file://%,$(1)),default, \
-      $(if $(filter git://%,$(1)),git, \
-        $(if $(filter svn://%,$(1)),svn, \
-          $(if $(filter cvs://%,$(1)),cvs, \
-            $(if $(filter hg://%,$(1)),hg, \
-              $(if $(filter sftp://%,$(1)),bzr, \
-                unknown \
+  $(if $(filter git,$(2)),$(call dl_method_git,$(1),$(2)),
+    $(if $(2),$(2), \
+      $(if $(filter @APACHE/% @GITHUB/% @GNOME/% @GNU/% @KERNEL/% @SF/% @SAVANNAH/% ftp://% http://% https://% file://%,$(1)),default, \
+        $(if $(filter git://%,$(1)),$(call dl_method_git,$(1),$(2)), \
+          $(if $(filter svn://%,$(1)),svn, \
+            $(if $(filter cvs://%,$(1)),cvs, \
+              $(if $(filter hg://%,$(1)),hg, \
+                $(if $(filter sftp://%,$(1)),bzr, \
+                  unknown \
+                ) \
               ) \
             ) \
           ) \

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From koen.vandeputte at ncentric.com  Tue Jul  3 06:29:48 2018
From: koen.vandeputte at ncentric.com (Koen Vandeputte)
Date: Tue, 3 Jul 2018 12:29:48 +0200
Subject: [OpenWrt-Devel] Recursive dependency in Luci?
Message-ID: <68f00a5e-ac09-a78d-14d9-8cab1b3905ca@ncentric.com>

Hi Jo,

Since this morning, there seems to be a recursive dependency present.
Judging by the output and the changes in Luci repo, I suspect the source 
is one of your latest commits?


tmp/.config-package.in:57794:error: recursive dependency detected!
For a resolution refer to Documentation/kbuild/kconfig-language.txt
subsection "Kconfig recursive dependency limitations"
tmp/.config-package.in:57794:??? symbol PACKAGE_iptables is selected by 
PACKAGE_sqm-scripts
For a resolution refer to Documentation/kbuild/kconfig-language.txt
subsection "Kconfig recursive dependency limitations"
tmp/.config-package.in:994:??? symbol PACKAGE_sqm-scripts is selected by 
PACKAGE_luci-app-sqm
For a resolution refer to Documentation/kbuild/kconfig-language.txt
subsection "Kconfig recursive dependency limitations"
tmp/.config-package.in:41648:??? symbol PACKAGE_luci-app-sqm depends on 
PACKAGE_luci-base
For a resolution refer to Documentation/kbuild/kconfig-language.txt
subsection "Kconfig recursive dependency limitations"
tmp/.config-package.in:40611:??? symbol PACKAGE_luci-base is selected by 
PACKAGE_luci-lib-json
For a resolution refer to Documentation/kbuild/kconfig-language.txt
subsection "Kconfig recursive dependency limitations"
tmp/.config-package.in:42122:??? symbol PACKAGE_luci-lib-json is 
selected by PACKAGE_luci-app-olsr
For a resolution refer to Documentation/kbuild/kconfig-language.txt
subsection "Kconfig recursive dependency limitations"
tmp/.config-package.in:41392:??? symbol PACKAGE_luci-app-olsr is 
selected by PACKAGE_luci-mod-freifunk-community
For a resolution refer to Documentation/kbuild/kconfig-language.txt
subsection "Kconfig recursive dependency limitations"
tmp/.config-package.in:40773:??? symbol 
PACKAGE_luci-mod-freifunk-community depends on PACKAGE_iptables
#



Any idea?


Thanks,

Koen


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From daniel at dd-wrt.com  Tue Jul  3 09:32:09 2018
From: daniel at dd-wrt.com (Daniel Danzberger)
Date: Tue,  3 Jul 2018 15:32:09 +0200
Subject: [OpenWrt-Devel]  [PATCH 0/2] iwinfo: Query more info from nl80211
Message-ID: <20180703133211.23120-1-daniel@dd-wrt.com>

The following 2 patches add some more stats to libiwinfo.
There is another patch for the rpcd iwinfo module that uses them.

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From daniel at dd-wrt.com  Tue Jul  3 09:32:10 2018
From: daniel at dd-wrt.com (Daniel Danzberger)
Date: Tue,  3 Jul 2018 15:32:10 +0200
Subject: [OpenWrt-Devel] [PATCH 1/2] iwinfo: nl80211: add more stats to
 assoclist.
In-Reply-To: <20180703133211.23120-1-daniel@dd-wrt.com>
References: <20180703133211.23120-1-daniel@dd-wrt.com>
Message-ID: <20180703133211.23120-2-daniel@dd-wrt.com>

+ NL80211_STA_INFO_SIGNAL_AVG
+ NL80211_STA_INFO_RX_DROP_MISC
+ NL80211_STA_INFO_CONNECTED_TIME

Signed-off-by: Daniel Danzberger <daniel at dd-wrt.com>
---
 include/iwinfo.h |  3 +++
 iwinfo_nl80211.c | 12 ++++++++++++
 2 files changed, 15 insertions(+)

diff --git a/include/iwinfo.h b/include/iwinfo.h
index 929f697..4111205 100644
--- a/include/iwinfo.h
+++ b/include/iwinfo.h
@@ -105,10 +105,13 @@ struct iwinfo_rate_entry {
 struct iwinfo_assoclist_entry {
 	uint8_t	mac[6];
 	int8_t signal;
+	int8_t signal_avg;
 	int8_t noise;
 	uint32_t inactive;
+	uint32_t connected_time;
 	uint32_t rx_packets;
 	uint32_t tx_packets;
+	uint64_t rx_drop_misc;
 	struct iwinfo_rate_entry rx_rate;
 	struct iwinfo_rate_entry tx_rate;
 	uint32_t rx_bytes;
diff --git a/iwinfo_nl80211.c b/iwinfo_nl80211.c
index ecd2d6a..0e0206b 100644
--- a/iwinfo_nl80211.c
+++ b/iwinfo_nl80211.c
@@ -1694,10 +1694,13 @@ static int nl80211_get_assoclist_cb(struct nl_msg *msg, void *arg)
 		[NL80211_STA_INFO_RX_BITRATE]    = { .type = NLA_NESTED },
 		[NL80211_STA_INFO_TX_BITRATE]    = { .type = NLA_NESTED },
 		[NL80211_STA_INFO_SIGNAL]        = { .type = NLA_U8     },
+		[NL80211_STA_INFO_SIGNAL_AVG]    = { .type = NLA_U8     },
 		[NL80211_STA_INFO_RX_BYTES]      = { .type = NLA_U32    },
 		[NL80211_STA_INFO_TX_BYTES]      = { .type = NLA_U32    },
 		[NL80211_STA_INFO_TX_RETRIES]    = { .type = NLA_U32    },
 		[NL80211_STA_INFO_TX_FAILED]     = { .type = NLA_U32    },
+		[NL80211_STA_INFO_CONNECTED_TIME]= { .type = NLA_U32    },
+		[NL80211_STA_INFO_RX_DROP_MISC]  = { .type = NLA_U64    },
 		[NL80211_STA_INFO_T_OFFSET]      = { .type = NLA_U64    },
 		[NL80211_STA_INFO_STA_FLAGS] =
 			{ .minlen = sizeof(struct nl80211_sta_flag_update) },
@@ -1725,9 +1728,15 @@ static int nl80211_get_assoclist_cb(struct nl_msg *msg, void *arg)
 		if (sinfo[NL80211_STA_INFO_SIGNAL])
 			e->signal = nla_get_u8(sinfo[NL80211_STA_INFO_SIGNAL]);
 
+		if (sinfo[NL80211_STA_INFO_SIGNAL_AVG])
+			e->signal_avg = nla_get_u8(sinfo[NL80211_STA_INFO_SIGNAL_AVG]);
+
 		if (sinfo[NL80211_STA_INFO_INACTIVE_TIME])
 			e->inactive = nla_get_u32(sinfo[NL80211_STA_INFO_INACTIVE_TIME]);
 
+		if (sinfo[NL80211_STA_INFO_CONNECTED_TIME])
+			e->connected_time = nla_get_u32(sinfo[NL80211_STA_INFO_CONNECTED_TIME]);
+
 		if (sinfo[NL80211_STA_INFO_RX_PACKETS])
 			e->rx_packets = nla_get_u32(sinfo[NL80211_STA_INFO_RX_PACKETS]);
 
@@ -1759,6 +1768,9 @@ static int nl80211_get_assoclist_cb(struct nl_msg *msg, void *arg)
 		if (sinfo[NL80211_STA_INFO_T_OFFSET])
 			e->t_offset = nla_get_u64(sinfo[NL80211_STA_INFO_T_OFFSET]);
 
+		if (sinfo[NL80211_STA_INFO_RX_DROP_MISC])
+			e->rx_drop_misc = nla_get_u64(sinfo[NL80211_STA_INFO_RX_DROP_MISC]);
+
 		if (sinfo[NL80211_STA_INFO_EXPECTED_THROUGHPUT])
 			e->thr = nla_get_u32(sinfo[NL80211_STA_INFO_EXPECTED_THROUGHPUT]);
 
-- 
2.18.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From daniel at dd-wrt.com  Tue Jul  3 09:32:11 2018
From: daniel at dd-wrt.com (Daniel Danzberger)
Date: Tue,  3 Jul 2018 15:32:11 +0200
Subject: [OpenWrt-Devel]  [PATCH 2/2] iwinfo: nl80211: add survey.
In-Reply-To: <20180703133211.23120-1-daniel@dd-wrt.com>
References: <20180703133211.23120-1-daniel@dd-wrt.com>
Message-ID: <20180703133211.23120-3-daniel@dd-wrt.com>

Signed-off-by: Daniel Danzberger <daniel at dd-wrt.com>
---
 include/iwinfo.h | 11 ++++++++
 iwinfo_nl80211.c | 69 ++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 80 insertions(+)

diff --git a/include/iwinfo.h b/include/iwinfo.h
index 4111205..49ee7f0 100644
--- a/include/iwinfo.h
+++ b/include/iwinfo.h
@@ -128,6 +128,16 @@ struct iwinfo_assoclist_entry {
 	uint32_t thr;
 };
 
+struct iwinfo_survey_entry {
+	uint64_t active_time;
+	uint64_t busy_time;
+	uint64_t busy_time_ext;
+	uint64_t rxtime;
+	uint64_t txtime;
+	uint32_t mhz;
+	uint8_t noise;
+};
+
 struct iwinfo_txpwrlist_entry {
 	uint8_t  dbm;
 	uint16_t mw;
@@ -223,6 +233,7 @@ struct iwinfo_ops {
 	int (*scanlist)(const char *, char *, int *);
 	int (*freqlist)(const char *, char *, int *);
 	int (*countrylist)(const char *, char *, int *);
+	int (*survey)(const char *, char *, int *);
 	int (*lookup_phy)(const char *, char *);
 	void (*close)(void);
 };
diff --git a/iwinfo_nl80211.c b/iwinfo_nl80211.c
index 0e0206b..71465b5 100644
--- a/iwinfo_nl80211.c
+++ b/iwinfo_nl80211.c
@@ -1678,6 +1678,59 @@ static void nl80211_parse_rateinfo(struct nlattr **ri,
 	re->is_40mhz = (re->mhz == 40);
 }
 
+static int nl80211_get_survey_cb(struct nl_msg *msg, void *arg)
+{
+	struct nl80211_array_buf *arr = arg;
+	struct iwinfo_survey_entry *e = arr->buf;
+	struct nlattr **attr = nl80211_parse(msg);
+	struct nlattr *sinfo[NL80211_SURVEY_INFO_MAX + 1];
+	int rc;
+
+	static struct nla_policy survey_policy[NL80211_SURVEY_INFO_MAX + 1] = {
+		[NL80211_SURVEY_INFO_FREQUENCY] = { .type = NLA_U32 },
+		[NL80211_SURVEY_INFO_NOISE]  = { .type = NLA_U8     },
+		[NL80211_SURVEY_INFO_TIME] = { .type = NLA_U64   },
+		[NL80211_SURVEY_INFO_TIME_BUSY] = { .type = NLA_U64   },
+		[NL80211_SURVEY_INFO_TIME_EXT_BUSY] = { .type = NLA_U64   },
+		[NL80211_SURVEY_INFO_TIME_RX] = { .type = NLA_U64   },
+		[NL80211_SURVEY_INFO_TIME_TX] = { .type = NLA_U64   },
+	};
+
+	rc = nla_parse_nested(sinfo, NL80211_SURVEY_INFO_MAX,
+				attr[NL80211_ATTR_SURVEY_INFO],
+				survey_policy);
+	if (rc)
+		return NL_SKIP;
+
+	/* advance to end of array */
+	e += arr->count;
+	memset(e, 0, sizeof(*e));
+
+	if (sinfo[NL80211_SURVEY_INFO_FREQUENCY])
+		e->mhz = nla_get_u32(sinfo[NL80211_SURVEY_INFO_FREQUENCY]);
+
+        if (sinfo[NL80211_SURVEY_INFO_NOISE])
+		e->noise = nla_get_u8(sinfo[NL80211_SURVEY_INFO_NOISE]);
+
+        if (sinfo[NL80211_SURVEY_INFO_TIME])
+		e->active_time = nla_get_u64(sinfo[NL80211_SURVEY_INFO_TIME]);
+
+        if (sinfo[NL80211_SURVEY_INFO_TIME_BUSY])
+		e->busy_time = nla_get_u64(sinfo[NL80211_SURVEY_INFO_TIME_BUSY]);
+
+        if (sinfo[NL80211_SURVEY_INFO_TIME_EXT_BUSY])
+                e->busy_time_ext = nla_get_u64(sinfo[NL80211_SURVEY_INFO_TIME_EXT_BUSY]);
+
+        if (sinfo[NL80211_SURVEY_INFO_TIME_RX])
+                e->rxtime = nla_get_u64(sinfo[NL80211_SURVEY_INFO_TIME_RX]);
+
+        if (sinfo[NL80211_SURVEY_INFO_TIME_TX])
+		e->txtime = nla_get_u64(sinfo[NL80211_SURVEY_INFO_TIME_TX]);
+
+	arr->count++;
+	return NL_SKIP;
+}
+
 static int nl80211_get_assoclist_cb(struct nl_msg *msg, void *arg)
 {
 	struct nl80211_array_buf *arr = arg;
@@ -1812,6 +1865,21 @@ static int nl80211_get_assoclist_cb(struct nl_msg *msg, void *arg)
 	return NL_SKIP;
 }
 
+static int nl80211_get_survey(const char *ifname, char *buf, int *len)
+{
+	struct nl80211_array_buf arr = { .buf = buf, .count = 0 };
+	int rc;
+
+	rc = nl80211_request(ifname, NL80211_CMD_GET_SURVEY,
+			NLM_F_DUMP, nl80211_get_survey_cb, &arr);
+	if (!rc)
+		*len = (arr.count * sizeof(struct iwinfo_survey_entry));
+	else
+		*len = 0;
+
+	return 0;
+}
+
 static int nl80211_get_assoclist(const char *ifname, char *buf, int *len)
 {
 	DIR *d;
@@ -2862,6 +2930,7 @@ const struct iwinfo_ops nl80211_ops = {
 	.scanlist         = nl80211_get_scanlist,
 	.freqlist         = nl80211_get_freqlist,
 	.countrylist      = nl80211_get_countrylist,
+	.survey           = nl80211_get_survey,
 	.lookup_phy       = nl80211_lookup_phyname,
 	.close            = nl80211_close
 };
-- 
2.18.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From philipp_subx at redfish-solutions.com  Tue Jul  3 12:39:43 2018
From: philipp_subx at redfish-solutions.com (Philip Prindeville)
Date: Tue, 3 Jul 2018 10:39:43 -0600
Subject: [OpenWrt-Devel] [PATCH] firewall3: make reject types selectable
 by user
In-Reply-To: <1530545351-24848-1-git-send-email-alin.nastac@technicolor.com>
References: <1530545351-24848-1-git-send-email-alin.nastac@technicolor.com>
Message-ID: <A5CA2CE7-B06B-4BD1-85CB-C27D71E89D39@redfish-solutions.com>

Aren?t all inbound SYNs unsolicited by definition? Is there a danger of reflection attacks?



Sent from my iPhone
> On Jul 2, 2018, at 9:29 AM, Alin Nastac <alin.nastac at gmail.com> wrote:
> 
> From: Alin Nastac <alin.nastac at gmail.com>
> 
> RFC 6092 recommends in section 3.3.1 that an IPv6 CPE must respond to
> unsolicited inbound SYNs with an ICMPv6 Destination Unreachable error
> code 1 (Communication with destination administratively prohibited).
> 
> Signed-off-by: Alin Nastac <alin.nastac at gmail.com>
> ---
> defaults.c | 21 ++++++++++++++++-----
> options.h  |  2 ++
> 2 files changed, 18 insertions(+), 5 deletions(-)
> 
> diff --git a/defaults.c b/defaults.c
> index 11fbf0d..6565ca2 100644
> --- a/defaults.c
> +++ b/defaults.c
> @@ -41,6 +41,8 @@ const struct fw3_option fw3_flag_opts[] = {
>    FW3_OPT("output",              target,   defaults, policy_output),
> 
>    FW3_OPT("drop_invalid",        bool,     defaults, drop_invalid),
> +    FW3_OPT("tcp_reset_rejects",   bool,     defaults, tcp_reset_rejects),
> +    FW3_OPT("admin_prohib_rejects",bool,     defaults, admin_prohib_rejects),
> 
>    FW3_OPT("syn_flood",           bool,     defaults, syn_flood),
>    FW3_OPT("synflood_protect",    bool,     defaults, syn_flood),
> @@ -113,6 +115,7 @@ fw3_load_defaults(struct fw3_state *state, struct uci_package *p)
> 
>    defs->syn_flood_rate.rate  = 25;
>    defs->syn_flood_rate.burst = 50;
> +    defs->tcp_reset_rejects    = true;
>    defs->tcp_syncookies       = true;
>    defs->tcp_window_scaling   = true;
>    defs->custom_chains        = true;
> @@ -276,14 +279,22 @@ fw3_print_default_head_rules(struct fw3_ipt_handle *handle,
>            fw3_ipt_rule_append(r, "INPUT");
>        }
> 
> -        r = fw3_ipt_rule_create(handle, &tcp, NULL, NULL, NULL, NULL);
> -        fw3_ipt_rule_target(r, "REJECT");
> -        fw3_ipt_rule_addarg(r, false, "--reject-with", "tcp-reset");
> -        fw3_ipt_rule_append(r, "reject");
> +        if (defs->tcp_reset_rejects)
> +        {
> +            r = fw3_ipt_rule_create(handle, &tcp, NULL, NULL, NULL, NULL);
> +            fw3_ipt_rule_target(r, "REJECT");
> +            fw3_ipt_rule_addarg(r, false, "--reject-with", "tcp-reset");
> +            fw3_ipt_rule_append(r, "reject");
> +        }
> 
>        r = fw3_ipt_rule_new(handle);
>        fw3_ipt_rule_target(r, "REJECT");
> -        fw3_ipt_rule_addarg(r, false, "--reject-with", "port-unreach");
> +        fw3_ipt_rule_addarg(r, false, "--reject-with",
> +            defs->admin_prohib_rejects ?
> +                (handle->family == FW3_FAMILY_V6 ?
> +                    "adm-prohibited" :
> +                    "admin-prohib") :
> +                "port-unreach");
>        fw3_ipt_rule_append(r, "reject");
> 
>        break;
> diff --git a/options.h b/options.h
> index 08fecf6..e3ba99c 100644
> --- a/options.h
> +++ b/options.h
> @@ -276,6 +276,8 @@ struct fw3_defaults
>    enum fw3_flag policy_forward;
> 
>    bool drop_invalid;
> +    bool tcp_reset_rejects;
> +    bool admin_prohib_rejects;
> 
>    bool syn_flood;
>    struct fw3_limit syn_flood_rate;
> -- 
> 2.7.4
> 
> 
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From por at oranjevos.nl  Tue Jul  3 13:26:51 2018
From: por at oranjevos.nl (Paul Oranje)
Date: Tue, 3 Jul 2018 19:26:51 +0200
Subject: [OpenWrt-Devel] [PATCH 1/2] Introduce new interface event
 "create" (IFEV_CREATE)
In-Reply-To: <CAJLcKsENVAWBYsWktmvqBLuvTmcG5ZhNsaeS1GpKvHWjLzRCvw@mail.gmail.com>
References: <20180629032315.7906-1-lynxis@fe80.eu>
 <CAJLcKsENVAWBYsWktmvqBLuvTmcG5ZhNsaeS1GpKvHWjLzRCvw@mail.gmail.com>
Message-ID: <0CD2DDEF-D940-43F0-895C-29A0007B21CA@oranjevos.nl>

Curious: what purposes or use-cases are intended to be served with this event ?


> Op 29 jun. 2018, om 16:14 heeft Hans Dedecker <dedeckeh at gmail.com> het volgende geschreven:
> 
> On Fri, Jun 29, 2018 at 5:23 AM Alexander Couzens <lynxis at fe80.eu> wrote:
>> 
>> "create" will be called before the proto handlers initialised.
> Acked-by: Hans Dedecker <dedeckeh at gmail.com>
>> ---
>> interface-event.c | 1 +
>> interface.c       | 1 +
>> interface.h       | 2 ++
>> 3 files changed, 4 insertions(+)
>> 
>> diff --git a/interface-event.c b/interface-event.c
>> index 86e8f5488da8..a40f6dc883d3 100644
>> --- a/interface-event.c
>> +++ b/interface-event.c
>> @@ -38,6 +38,7 @@ static const char * const eventnames[] = {
>>        [IFEV_FREE] = "free",
>>        [IFEV_RELOAD] = "reload",
>>        [IFEV_LINK_UP] = "iflink",
>> +       [IFEV_CREATE] = "create",
>> };
>> 
>> static void
>> diff --git a/interface.c b/interface.c
>> index 2a23984922a1..400c605efc0c 100644
>> --- a/interface.c
>> +++ b/interface.c
>> @@ -1275,6 +1275,7 @@ interface_update(struct vlist_tree *tree, struct vlist_node *node_new,
>>                set_config_state(if_old, IFC_REMOVE);
>>        } else if (node_new) {
>>                D(INTERFACE, "Create interface '%s'\n", if_new->name);
>> +               interface_event(if_new, IFEV_CREATE);
>>                proto_init_interface(if_new, if_new->config);
>>                interface_claim_device(if_new);
>>                netifd_ubus_add_interface(if_new);
>> diff --git a/interface.h b/interface.h
>> index 0e58f69c26e0..e5639eb326cd 100644
>> --- a/interface.h
>> +++ b/interface.h
>> @@ -28,6 +28,8 @@ enum interface_event {
>>        IFEV_FREE,
>>        IFEV_RELOAD,
>>        IFEV_LINK_UP,
>> +       /* send when a new interface created. This is before proto handlers has been attached. */
>> +       IFEV_CREATE,
>> };
>> 
>> enum interface_state {
>> --
>> 2.18.0
>> 
> 
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From dedeckeh at gmail.com  Tue Jul  3 16:46:00 2018
From: dedeckeh at gmail.com (Hans Dedecker)
Date: Tue, 3 Jul 2018 22:46:00 +0200
Subject: [OpenWrt-Devel] [PATCH 1/2] Introduce new interface event
 "create" (IFEV_CREATE)
In-Reply-To: <0CD2DDEF-D940-43F0-895C-29A0007B21CA@oranjevos.nl>
References: <20180629032315.7906-1-lynxis@fe80.eu>
 <CAJLcKsENVAWBYsWktmvqBLuvTmcG5ZhNsaeS1GpKvHWjLzRCvw@mail.gmail.com>
 <0CD2DDEF-D940-43F0-895C-29A0007B21CA@oranjevos.nl>
Message-ID: <CAJLcKsGt_QtuDceVXMMCMhSVW4ukhWd1H88bHFpjJUE1smYXTw@mail.gmail.com>

On Tue, Jul 3, 2018 at 7:26 PM Paul Oranje <por at oranjevos.nl> wrote:
>
> Curious: what purposes or use-cases are intended to be served with this event ?
Please don't top post

The interface event IFEV_CREATE can be used by external applications
or netifd internal subsystems to trigger specific logic when an
interface is created; patch http://patchwork.ozlabs.org/patch/937167/
makes use of this event

Hans
>
>
> > Op 29 jun. 2018, om 16:14 heeft Hans Dedecker <dedeckeh at gmail.com> het volgende geschreven:
> >
> > On Fri, Jun 29, 2018 at 5:23 AM Alexander Couzens <lynxis at fe80.eu> wrote:
> >>
> >> "create" will be called before the proto handlers initialised.
> > Acked-by: Hans Dedecker <dedeckeh at gmail.com>
> >> ---
> >> interface-event.c | 1 +
> >> interface.c       | 1 +
> >> interface.h       | 2 ++
> >> 3 files changed, 4 insertions(+)
> >> diff --git a/interface-event.c b/interface-event.c
> >> index 86e8f5488da8..a40f6dc883d3 100644
> >> --- a/interface-event.c
> >> +++ b/interface-event.c
> >> @@ -38,6 +38,7 @@ static const char * const eventnames[] = {
> >>        [IFEV_FREE] = "free",
> >>        [IFEV_RELOAD] = "reload",
> >>        [IFEV_LINK_UP] = "iflink",
> >> +       [IFEV_CREATE] = "create",
> >> };
> >>
> >> static void
> >> diff --git a/interface.c b/interface.c
> >> index 2a23984922a1..400c605efc0c 100644
> >> --- a/interface.c
> >> +++ b/interface.c
> >> @@ -1275,6 +1275,7 @@ interface_update(struct vlist_tree *tree, struct vlist_node *node_new,
> >>                set_config_state(if_old, IFC_REMOVE);
> >>        } else if (node_new) {
> >>                D(INTERFACE, "Create interface '%s'\n", if_new->name);
> >> +               interface_event(if_new, IFEV_CREATE);
> >>                proto_init_interface(if_new, if_new->config);
> >>                interface_claim_device(if_new);
> >>                netifd_ubus_add_interface(if_new);
> >> diff --git a/interface.h b/interface.h
> >> index 0e58f69c26e0..e5639eb326cd 100644
> >> --- a/interface.h
> >> +++ b/interface.h
> >> @@ -28,6 +28,8 @@ enum interface_event {
> >>        IFEV_FREE,
> >>        IFEV_RELOAD,
> >>        IFEV_LINK_UP,
> >> +       /* send when a new interface created. This is before proto handlers has been attached. */
> >> +       IFEV_CREATE,
> >> };
> >>
> >> enum interface_state {
> >> --
> >> 2.18.0
> >>
> >
> > _______________________________________________
> > openwrt-devel mailing list
> > openwrt-devel at lists.openwrt.org
> > https://lists.openwrt.org/mailman/listinfo/openwrt-devel
>

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From philipp_subx at redfish-solutions.com  Tue Jul  3 16:59:49 2018
From: philipp_subx at redfish-solutions.com (Philip Prindeville)
Date: Tue, 3 Jul 2018 14:59:49 -0600
Subject: =?iso-8859-1?q?_=5BOpenWrt-Devel=5D_Fwd=3A_Issues_porting_5=2E28?=
 =?iso-8859-1?q?=10=2E0_to_Openwrt?=
References: <694_1530504449_5B39A500_694_37_2_951DC12E-817F-4036-801C-C9E9DA30C3CC@cpan.org>
Message-ID: <B2058BFB-F71B-4261-9751-BDFE6B45F183@redfish-solutions.com>

Anyone got any insight into this one?

One of the characteristics of Perl versus other OpenWrt projects is each new version is guaranteed to break in an entirely different way you?ve never seen before.

I?ve reached out to the Storable author but haven?t heard back yet.

Maybe someone in the community has an idea that?s not occurred to me?

Thanks.



> Begin forwarded message:
> 
> From: Philip Prindeville <philipp at cpan.org>
> Subject: Re: Issues porting 5.28.0 to Openwrt
> Date: July 1, 2018 at 10:07:09 PM MDT
> To: Karl Williamson <public at khwilliamson.com>
> Cc: perl5-porters at perl.org
> 
> 
> 
>> On Jul 1, 2018, at 7:26 PM, Karl Williamson <public at khwilliamson.com> wrote:
>> 
>> On 07/01/2018 03:12 PM, Philip Prindeville wrote:
>>> Hi.
>>> I?m one of the two maintainers for Perl on Openwrt.
>>> I?m trying to update to 5.28.0, and encountered a couple of issues, and sent some patches for those issues a little while ago.
>>> But even with those changes, plus the updates here:
>>> https://github.com/openwrt/packages/compare/master...pprindeville:perl-5.28.0
>>> I?m still seeing the following breakage:
>> 
>> I'm thinking if you try the latest blead, as of d36adde059ed1c4f7af210b4f9fc3a7bd2d7d343
>> these problems will disappear.
> 
> 
> Hi Karl,
> 
> Alas, we?re required to stick to numbered releases, even if patched.
> 
> But I captured the patch you mentioned, applied it, and now things are building.
> 
> Since we?re cross building, will build a host miniperl, and that use that during the target build phases.
> 
> Getting a little further.
> 
> Now I?m seeing:
> 
> cd dist/Storable ; LD_LIBRARY_PATH=/home/philipp/lede/build_dir/target-x86_64_musl/perl/perl-5.28.0 make lib/Storable/Limit.pm
> make[4]: Entering directory '/home/philipp/lede/build_dir/target-x86_64_musl/perl/perl-5.28.0/dist/Storable'
> /home/philipp/lede/build_dir/target-x86_64_musl/perl/perl-5.28.0/dist/Storable/../../../../../../staging_dir/hostpkg/usr/bin/perl "-I../../lib" -MExtUtils::Command -e 'mkpath' -- ../../lib
> "../../../../../../staging_dir/hostpkg/usr/bin/perl" "-I../../lib" "-I../../lib" stacksize --core
> Should not run during miniperl
> Makefile:283: recipe for target 'lib/Storable/Limit.pm' failed
> make[4]: *** [lib/Storable/Limit.pm] Error 255
> make[4]: Leaving directory '/home/philipp/lede/build_dir/target-x86_64_musl/perl/perl-5.28.0/dist/Storable'
> Makefile:446: recipe for target 'dist/Storable/lib/Storable/Limit.pm' failed
> make[3]: *** [dist/Storable/lib/Storable/Limit.pm] Error 2
> 
> I?ll dig at this more tomorrow.
> 
> Thanks for helping me get past the compilation issues.
> 
> -Philip
> 
> 
>> 
>> This should also make your first patch moot.
>>> [snip]

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From alin.nastac at gmail.com  Tue Jul  3 17:22:00 2018
From: alin.nastac at gmail.com (=?UTF-8?B?QWxpbiBOxINzdGFj?=)
Date: Tue, 3 Jul 2018 23:22:00 +0200
Subject: [OpenWrt-Devel] [PATCH] firewall3: make reject types selectable
 by user
In-Reply-To: <A5CA2CE7-B06B-4BD1-85CB-C27D71E89D39@redfish-solutions.com>
References: <1530545351-24848-1-git-send-email-alin.nastac@technicolor.com>
 <A5CA2CE7-B06B-4BD1-85CB-C27D71E89D39@redfish-solutions.com>
Message-ID: <CAF1oqRD9gdt8PrM3HbYOM+MGBiwcxzbgB4eTOduY7PM7PnCo0w@mail.gmail.com>

On Tue, Jul 3, 2018 at 6:39 PM Philip Prindeville
<philipp_subx at redfish-solutions.com> wrote:
>
> Aren?t all inbound SYNs unsolicited by definition? Is there a danger of reflection attacks?

Not all inbound SYNs are unsolicited. Take for instance active mode
FTP transfers where the client resides on the LAN . In this case the
FTP data connection is initiated from the WAN, but it is solicited by
the FTP control connection initiated from the LAN.

I don't think it matters that much what error code firewall returns
for these unsolicited  inbound SYNs, but this RFC makes
adm-prohibitited code a must.

> Sent from my iPhone
> > On Jul 2, 2018, at 9:29 AM, Alin Nastac <alin.nastac at gmail.com> wrote:
> >
> > From: Alin Nastac <alin.nastac at gmail.com>
> >
> > RFC 6092 recommends in section 3.3.1 that an IPv6 CPE must respond to
> > unsolicited inbound SYNs with an ICMPv6 Destination Unreachable error
> > code 1 (Communication with destination administratively prohibited).
> >
> > Signed-off-by: Alin Nastac <alin.nastac at gmail.com>
> > ---
> > defaults.c | 21 ++++++++++++++++-----
> > options.h  |  2 ++
> > 2 files changed, 18 insertions(+), 5 deletions(-)
> >
> > diff --git a/defaults.c b/defaults.c
> > index 11fbf0d..6565ca2 100644
> > --- a/defaults.c
> > +++ b/defaults.c
> > @@ -41,6 +41,8 @@ const struct fw3_option fw3_flag_opts[] = {
> >    FW3_OPT("output",              target,   defaults, policy_output),
> >
> >    FW3_OPT("drop_invalid",        bool,     defaults, drop_invalid),
> > +    FW3_OPT("tcp_reset_rejects",   bool,     defaults, tcp_reset_rejects),
> > +    FW3_OPT("admin_prohib_rejects",bool,     defaults, admin_prohib_rejects),
> >
> >    FW3_OPT("syn_flood",           bool,     defaults, syn_flood),
> >    FW3_OPT("synflood_protect",    bool,     defaults, syn_flood),
> > @@ -113,6 +115,7 @@ fw3_load_defaults(struct fw3_state *state, struct uci_package *p)
> >
> >    defs->syn_flood_rate.rate  = 25;
> >    defs->syn_flood_rate.burst = 50;
> > +    defs->tcp_reset_rejects    = true;
> >    defs->tcp_syncookies       = true;
> >    defs->tcp_window_scaling   = true;
> >    defs->custom_chains        = true;
> > @@ -276,14 +279,22 @@ fw3_print_default_head_rules(struct fw3_ipt_handle *handle,
> >            fw3_ipt_rule_append(r, "INPUT");
> >        }
> >
> > -        r = fw3_ipt_rule_create(handle, &tcp, NULL, NULL, NULL, NULL);
> > -        fw3_ipt_rule_target(r, "REJECT");
> > -        fw3_ipt_rule_addarg(r, false, "--reject-with", "tcp-reset");
> > -        fw3_ipt_rule_append(r, "reject");
> > +        if (defs->tcp_reset_rejects)
> > +        {
> > +            r = fw3_ipt_rule_create(handle, &tcp, NULL, NULL, NULL, NULL);
> > +            fw3_ipt_rule_target(r, "REJECT");
> > +            fw3_ipt_rule_addarg(r, false, "--reject-with", "tcp-reset");
> > +            fw3_ipt_rule_append(r, "reject");
> > +        }
> >
> >        r = fw3_ipt_rule_new(handle);
> >        fw3_ipt_rule_target(r, "REJECT");
> > -        fw3_ipt_rule_addarg(r, false, "--reject-with", "port-unreach");
> > +        fw3_ipt_rule_addarg(r, false, "--reject-with",
> > +            defs->admin_prohib_rejects ?
> > +                (handle->family == FW3_FAMILY_V6 ?
> > +                    "adm-prohibited" :
> > +                    "admin-prohib") :
> > +                "port-unreach");
> >        fw3_ipt_rule_append(r, "reject");
> >
> >        break;
> > diff --git a/options.h b/options.h
> > index 08fecf6..e3ba99c 100644
> > --- a/options.h
> > +++ b/options.h
> > @@ -276,6 +276,8 @@ struct fw3_defaults
> >    enum fw3_flag policy_forward;
> >
> >    bool drop_invalid;
> > +    bool tcp_reset_rejects;
> > +    bool admin_prohib_rejects;
> >
> >    bool syn_flood;
> >    struct fw3_limit syn_flood_rate;
> > --
> > 2.7.4
> >
> >
> > _______________________________________________
> > openwrt-devel mailing list
> > openwrt-devel at lists.openwrt.org
> > https://lists.openwrt.org/mailman/listinfo/openwrt-devel
>

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From philipp_subx at redfish-solutions.com  Tue Jul  3 17:32:37 2018
From: philipp_subx at redfish-solutions.com (Philip Prindeville)
Date: Tue, 3 Jul 2018 15:32:37 -0600
Subject: [OpenWrt-Devel] [PATCH] firewall3: make reject types selectable
 by user
In-Reply-To: <CAF1oqRD9gdt8PrM3HbYOM+MGBiwcxzbgB4eTOduY7PM7PnCo0w@mail.gmail.com>
References: <1530545351-24848-1-git-send-email-alin.nastac@technicolor.com>
 <A5CA2CE7-B06B-4BD1-85CB-C27D71E89D39@redfish-solutions.com>
 <CAF1oqRD9gdt8PrM3HbYOM+MGBiwcxzbgB4eTOduY7PM7PnCo0w@mail.gmail.com>
Message-ID: <D5D797FA-E54A-4CF7-800A-ECBBEBE8195D@redfish-solutions.com>



> On Jul 3, 2018, at 3:22 PM, Alin N?stac <alin.nastac at gmail.com> wrote:
> 
> On Tue, Jul 3, 2018 at 6:39 PM Philip Prindeville
> <philipp_subx at redfish-solutions.com> wrote:
>> 
>> Aren?t all inbound SYNs unsolicited by definition? Is there a danger of reflection attacks?
> 
> Not all inbound SYNs are unsolicited. Take for instance active mode
> FTP transfers where the client resides on the LAN . In this case the
> FTP data connection is initiated from the WAN, but it is solicited by
> the FTP control connection initiated from the LAN.
> 
> I don't think it matters that much what error code firewall returns
> for these unsolicited  inbound SYNs, but this RFC makes
> adm-prohibitited code a must.


I would have thought that dropping them would be better, since it avoids reflection attacks.

-Philip


> 
>> Sent from my iPhone
>>> On Jul 2, 2018, at 9:29 AM, Alin Nastac <alin.nastac at gmail.com> wrote:
>>> 
>>> From: Alin Nastac <alin.nastac at gmail.com>
>>> 
>>> RFC 6092 recommends in section 3.3.1 that an IPv6 CPE must respond to
>>> unsolicited inbound SYNs with an ICMPv6 Destination Unreachable error
>>> code 1 (Communication with destination administratively prohibited).
>>> 
>>> Signed-off-by: Alin Nastac <alin.nastac at gmail.com>
>>> ---
>>> defaults.c | 21 ++++++++++++++++-----
>>> options.h  |  2 ++
>>> 2 files changed, 18 insertions(+), 5 deletions(-)
>>> 
>>> diff --git a/defaults.c b/defaults.c
>>> index 11fbf0d..6565ca2 100644
>>> --- a/defaults.c
>>> +++ b/defaults.c
>>> @@ -41,6 +41,8 @@ const struct fw3_option fw3_flag_opts[] = {
>>>   FW3_OPT("output",              target,   defaults, policy_output),
>>> 
>>>   FW3_OPT("drop_invalid",        bool,     defaults, drop_invalid),
>>> +    FW3_OPT("tcp_reset_rejects",   bool,     defaults, tcp_reset_rejects),
>>> +    FW3_OPT("admin_prohib_rejects",bool,     defaults, admin_prohib_rejects),
>>> 
>>>   FW3_OPT("syn_flood",           bool,     defaults, syn_flood),
>>>   FW3_OPT("synflood_protect",    bool,     defaults, syn_flood),
>>> @@ -113,6 +115,7 @@ fw3_load_defaults(struct fw3_state *state, struct uci_package *p)
>>> 
>>>   defs->syn_flood_rate.rate  = 25;
>>>   defs->syn_flood_rate.burst = 50;
>>> +    defs->tcp_reset_rejects    = true;
>>>   defs->tcp_syncookies       = true;
>>>   defs->tcp_window_scaling   = true;
>>>   defs->custom_chains        = true;
>>> @@ -276,14 +279,22 @@ fw3_print_default_head_rules(struct fw3_ipt_handle *handle,
>>>           fw3_ipt_rule_append(r, "INPUT");
>>>       }
>>> 
>>> -        r = fw3_ipt_rule_create(handle, &tcp, NULL, NULL, NULL, NULL);
>>> -        fw3_ipt_rule_target(r, "REJECT");
>>> -        fw3_ipt_rule_addarg(r, false, "--reject-with", "tcp-reset");
>>> -        fw3_ipt_rule_append(r, "reject");
>>> +        if (defs->tcp_reset_rejects)
>>> +        {
>>> +            r = fw3_ipt_rule_create(handle, &tcp, NULL, NULL, NULL, NULL);
>>> +            fw3_ipt_rule_target(r, "REJECT");
>>> +            fw3_ipt_rule_addarg(r, false, "--reject-with", "tcp-reset");
>>> +            fw3_ipt_rule_append(r, "reject");
>>> +        }
>>> 
>>>       r = fw3_ipt_rule_new(handle);
>>>       fw3_ipt_rule_target(r, "REJECT");
>>> -        fw3_ipt_rule_addarg(r, false, "--reject-with", "port-unreach");
>>> +        fw3_ipt_rule_addarg(r, false, "--reject-with",
>>> +            defs->admin_prohib_rejects ?
>>> +                (handle->family == FW3_FAMILY_V6 ?
>>> +                    "adm-prohibited" :
>>> +                    "admin-prohib") :
>>> +                "port-unreach");
>>>       fw3_ipt_rule_append(r, "reject");
>>> 
>>>       break;
>>> diff --git a/options.h b/options.h
>>> index 08fecf6..e3ba99c 100644
>>> --- a/options.h
>>> +++ b/options.h
>>> @@ -276,6 +276,8 @@ struct fw3_defaults
>>>   enum fw3_flag policy_forward;
>>> 
>>>   bool drop_invalid;
>>> +    bool tcp_reset_rejects;
>>> +    bool admin_prohib_rejects;
>>> 
>>>   bool syn_flood;
>>>   struct fw3_limit syn_flood_rate;
>>> --
>>> 2.7.4
>>> 
>>> 
>>> _______________________________________________
>>> openwrt-devel mailing list
>>> openwrt-devel at lists.openwrt.org
>>> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
>> 


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From davem at davemloft.net  Tue Jul  3 22:32:20 2018
From: davem at davemloft.net (David Miller)
Date: Wed, 04 Jul 2018 11:32:20 +0900 (KST)
Subject: [OpenWrt-Devel] [PATCH 1/3 v2] net: dsa: Add DT bindings for
 Vitesse VSC73xx switches
In-Reply-To: <20180630111731.19551-1-linus.walleij@linaro.org>
References: <20180630111731.19551-1-linus.walleij@linaro.org>
Message-ID: <20180704.113220.981331804898149070.davem@davemloft.net>

From: Linus Walleij <linus.walleij at linaro.org>
Date: Sat, 30 Jun 2018 13:17:29 +0200

> This adds the device tree bindings for the Vitesse VSC73xx
> switches. We also add the vendor name for Vitesse.
> 
> Cc: devicetree at vger.kernel.org
> Reviewed-by: Florian Fainelli <f.fainelli at gmail.com>
> Signed-off-by: Linus Walleij <linus.walleij at linaro.org>
> ---
> ChangeLog v1->v2:
> - Fix spelling error
> - Properly reference the GPIO bindings
> - Collect Florians ACK

Applied.

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From davem at davemloft.net  Tue Jul  3 22:32:20 2018
From: davem at davemloft.net (David Miller)
Date: Wed, 04 Jul 2018 11:32:20 +0900 (KST)
Subject: [OpenWrt-Devel] [PATCH 1/3 v2] net: dsa: Add DT bindings for
 Vitesse VSC73xx switches
In-Reply-To: <20180630111731.19551-1-linus.walleij@linaro.org>
References: <20180630111731.19551-1-linus.walleij@linaro.org>
Message-ID: <20180704.113220.981331804898149070.davem@davemloft.net>

From: Linus Walleij <linus.walleij at linaro.org>
Date: Sat, 30 Jun 2018 13:17:29 +0200

> This adds the device tree bindings for the Vitesse VSC73xx
> switches. We also add the vendor name for Vitesse.
> 
> Cc: devicetree at vger.kernel.org
> Reviewed-by: Florian Fainelli <f.fainelli at gmail.com>
> Signed-off-by: Linus Walleij <linus.walleij at linaro.org>
> ---
> ChangeLog v1->v2:
> - Fix spelling error
> - Properly reference the GPIO bindings
> - Collect Florians ACK

Applied.

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From davem at davemloft.net  Tue Jul  3 22:32:30 2018
From: davem at davemloft.net (David Miller)
Date: Wed, 04 Jul 2018 11:32:30 +0900 (KST)
Subject: [OpenWrt-Devel] [PATCH 2/3 v2] net: phy: vitesse: Add support
 for VSC73xx
In-Reply-To: <20180630111731.19551-2-linus.walleij@linaro.org>
References: <20180630111731.19551-1-linus.walleij@linaro.org>
 <20180630111731.19551-2-linus.walleij@linaro.org>
Message-ID: <20180704.113230.1134845998887388983.davem@davemloft.net>

From: Linus Walleij <linus.walleij at linaro.org>
Date: Sat, 30 Jun 2018 13:17:30 +0200

> The VSC7385, VSC7388, VSC7395 and VSC7398 are integrated
> switch/router chips for 5+1 or 8-port switches/routers. When
> managed directly by Linux using DSA we need to do a special
> set-up "dance" on the PHY. Unfortunately these sequences
> switches the PHY to undocumented pages named 2a30 and 52b6
> and does undocumented things. It is described by these opaque
> sequences also in the reference manual. This is a best
> effort to integrate it anyways.
> 
> Reviewed-by: Florian Fainelli <f.fainelli at gmail.com>
> Signed-off-by: Linus Walleij <linus.walleij at linaro.org>
> ---
> ChangeLog v1->v2:
> - Drop <linux/delay.h> from an earlier iteration.
> - Implement an .config_aneg() routine that does nothing: the
>   imroved genphy_config_aneg() makes the device fail as of
>   v4.18-rc1 and the device seems to feel best like this: it
>   comes up in autonegotiation mode and we do not try to instruct
>   it.
> - Use some MII defines when reading/writing registers.
> - Collect Florian's ACK.

Applied.

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From davem at davemloft.net  Tue Jul  3 22:32:30 2018
From: davem at davemloft.net (David Miller)
Date: Wed, 04 Jul 2018 11:32:30 +0900 (KST)
Subject: [OpenWrt-Devel] [PATCH 2/3 v2] net: phy: vitesse: Add support
 for VSC73xx
In-Reply-To: <20180630111731.19551-2-linus.walleij@linaro.org>
References: <20180630111731.19551-1-linus.walleij@linaro.org>
 <20180630111731.19551-2-linus.walleij@linaro.org>
Message-ID: <20180704.113230.1134845998887388983.davem@davemloft.net>

From: Linus Walleij <linus.walleij at linaro.org>
Date: Sat, 30 Jun 2018 13:17:30 +0200

> The VSC7385, VSC7388, VSC7395 and VSC7398 are integrated
> switch/router chips for 5+1 or 8-port switches/routers. When
> managed directly by Linux using DSA we need to do a special
> set-up "dance" on the PHY. Unfortunately these sequences
> switches the PHY to undocumented pages named 2a30 and 52b6
> and does undocumented things. It is described by these opaque
> sequences also in the reference manual. This is a best
> effort to integrate it anyways.
> 
> Reviewed-by: Florian Fainelli <f.fainelli at gmail.com>
> Signed-off-by: Linus Walleij <linus.walleij at linaro.org>
> ---
> ChangeLog v1->v2:
> - Drop <linux/delay.h> from an earlier iteration.
> - Implement an .config_aneg() routine that does nothing: the
>   imroved genphy_config_aneg() makes the device fail as of
>   v4.18-rc1 and the device seems to feel best like this: it
>   comes up in autonegotiation mode and we do not try to instruct
>   it.
> - Use some MII defines when reading/writing registers.
> - Collect Florian's ACK.

Applied.

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From davem at davemloft.net  Tue Jul  3 22:32:40 2018
From: davem at davemloft.net (David Miller)
Date: Wed, 04 Jul 2018 11:32:40 +0900 (KST)
Subject: [OpenWrt-Devel] [PATCH 3/3 v2] net: dsa: Add Vitesse VSC73xx
 DSA router driver
In-Reply-To: <20180630111731.19551-3-linus.walleij@linaro.org>
References: <20180630111731.19551-1-linus.walleij@linaro.org>
 <20180630111731.19551-3-linus.walleij@linaro.org>
Message-ID: <20180704.113240.652641829194832375.davem@davemloft.net>

From: Linus Walleij <linus.walleij at linaro.org>
Date: Sat, 30 Jun 2018 13:17:31 +0200

> This adds a DSA driver for:
> 
> Vitesse VSC7385 SparX-G5 5-port Integrated Gigabit Ethernet Switch
> Vitesse VSC7388 SparX-G8 8-port Integrated Gigabit Ethernet Switch
> Vitesse VSC7395 SparX-G5e 5+1-port Integrated Gigabit Ethernet Switch
> Vitesse VSC7398 SparX-G8e 8-port Integrated Gigabit Ethernet Switch
> 
> These switches have a built-in 8051 CPU and can download and execute
> firmware in this CPU. They can also be configured to use an external
> CPU handling the switch in a memory-mapped manner by connecting to
> that external CPU's memory bus.
> 
> This driver (currently) only takes control of the switch chip over
> SPI and configures it to route packages around when connected to a
> CPU port. The chip has embedded PHYs and VLAN support so we model it
> using DSA as a best fit so we can easily add VLAN support and maybe
> later also exploit the internal frame header to get more direct
> control over the switch.
> 
> The four built-in GPIO lines are exposed using a standard GPIO chip.
> 
> Signed-off-by: Linus Walleij <linus.walleij at linaro.org>
> ---
> ChangeLog v1->v2:
> - Update .get_strings() and .get_sset_count() to match the signature
>   with the new argument for sset type.
> - Drop DSA trailer select from Kconfig.
> - Use MII_* namespace definitions instead of hard-coded hex
>   values and calls to read into the PHY: instead use the genphy
>   decoded link state already present in the phydev.
> - Drop extraneous port number check in .enable() and .disable(),
>   this should not happen.
> - Move the GPIO chip set-up into a separate function.
> - Add some missing static in front of a counter function.
> - Drop the bool flags in the state container, use some macros with
>   the chipid to identify model instead like IS_VSC739X().
> - Check phydev->interface() for configuring the CPU port into
>   RGMII mode.

Applied.

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From davem at davemloft.net  Tue Jul  3 22:32:40 2018
From: davem at davemloft.net (David Miller)
Date: Wed, 04 Jul 2018 11:32:40 +0900 (KST)
Subject: [OpenWrt-Devel] [PATCH 3/3 v2] net: dsa: Add Vitesse VSC73xx
 DSA router driver
In-Reply-To: <20180630111731.19551-3-linus.walleij@linaro.org>
References: <20180630111731.19551-1-linus.walleij@linaro.org>
 <20180630111731.19551-3-linus.walleij@linaro.org>
Message-ID: <20180704.113240.652641829194832375.davem@davemloft.net>

From: Linus Walleij <linus.walleij at linaro.org>
Date: Sat, 30 Jun 2018 13:17:31 +0200

> This adds a DSA driver for:
> 
> Vitesse VSC7385 SparX-G5 5-port Integrated Gigabit Ethernet Switch
> Vitesse VSC7388 SparX-G8 8-port Integrated Gigabit Ethernet Switch
> Vitesse VSC7395 SparX-G5e 5+1-port Integrated Gigabit Ethernet Switch
> Vitesse VSC7398 SparX-G8e 8-port Integrated Gigabit Ethernet Switch
> 
> These switches have a built-in 8051 CPU and can download and execute
> firmware in this CPU. They can also be configured to use an external
> CPU handling the switch in a memory-mapped manner by connecting to
> that external CPU's memory bus.
> 
> This driver (currently) only takes control of the switch chip over
> SPI and configures it to route packages around when connected to a
> CPU port. The chip has embedded PHYs and VLAN support so we model it
> using DSA as a best fit so we can easily add VLAN support and maybe
> later also exploit the internal frame header to get more direct
> control over the switch.
> 
> The four built-in GPIO lines are exposed using a standard GPIO chip.
> 
> Signed-off-by: Linus Walleij <linus.walleij at linaro.org>
> ---
> ChangeLog v1->v2:
> - Update .get_strings() and .get_sset_count() to match the signature
>   with the new argument for sset type.
> - Drop DSA trailer select from Kconfig.
> - Use MII_* namespace definitions instead of hard-coded hex
>   values and calls to read into the PHY: instead use the genphy
>   decoded link state already present in the phydev.
> - Drop extraneous port number check in .enable() and .disable(),
>   this should not happen.
> - Move the GPIO chip set-up into a separate function.
> - Add some missing static in front of a counter function.
> - Drop the bool flags in the state container, use some macros with
>   the chipid to identify model instead like IS_VSC739X().
> - Check phydev->interface() for configuring the CPU port into
>   RGMII mode.

Applied.

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From alin.nastac at gmail.com  Wed Jul  4 01:39:22 2018
From: alin.nastac at gmail.com (=?UTF-8?B?QWxpbiBOxINzdGFj?=)
Date: Wed, 4 Jul 2018 07:39:22 +0200
Subject: [OpenWrt-Devel] [PATCH] firewall3: make reject types selectable
 by user
In-Reply-To: <D5D797FA-E54A-4CF7-800A-ECBBEBE8195D@redfish-solutions.com>
References: <1530545351-24848-1-git-send-email-alin.nastac@technicolor.com>
 <A5CA2CE7-B06B-4BD1-85CB-C27D71E89D39@redfish-solutions.com>
 <CAF1oqRD9gdt8PrM3HbYOM+MGBiwcxzbgB4eTOduY7PM7PnCo0w@mail.gmail.com>
 <D5D797FA-E54A-4CF7-800A-ECBBEBE8195D@redfish-solutions.com>
Message-ID: <CAF1oqRBW4EorOKmAKONXy4NCn_FdVS_gFDOWjiDMBTx7MMUw=Q@mail.gmail.com>

On Tue, Jul 3, 2018 at 11:32 PM Philip Prindeville
<philipp_subx at redfish-solutions.com> wrote:
> > On Jul 3, 2018, at 3:22 PM, Alin N?stac <alin.nastac at gmail.com> wrote:
> >
> > On Tue, Jul 3, 2018 at 6:39 PM Philip Prindeville
> > <philipp_subx at redfish-solutions.com> wrote:
> >>
> >> Aren?t all inbound SYNs unsolicited by definition? Is there a danger of reflection attacks?
> >
> > Not all inbound SYNs are unsolicited. Take for instance active mode
> > FTP transfers where the client resides on the LAN . In this case the
> > FTP data connection is initiated from the WAN, but it is solicited by
> > the FTP control connection initiated from the LAN.
> >
> > I don't think it matters that much what error code firewall returns
> > for these unsolicited  inbound SYNs, but this RFC makes
> > adm-prohibitited code a must.
>
> I would have thought that dropping them would be better, since it avoids reflection attacks.

Whether you want to silently drop or reject unauthorized connection
attempts is a matter of local policy.

Besides, in order for a reflection attack against your LAN to succeed,
the source IP address of rejected packets must be part of the LAN
prefix. This can be easily prevented, either by enabling rpfilter or
just by adding a firewall rule when the LAN prefix is statically
allocated (the usual IPv4 case).

> >>> On Jul 2, 2018, at 9:29 AM, Alin Nastac <alin.nastac at gmail.com> wrote:
> >>>
> >>> From: Alin Nastac <alin.nastac at gmail.com>
> >>>
> >>> RFC 6092 recommends in section 3.3.1 that an IPv6 CPE must respond to
> >>> unsolicited inbound SYNs with an ICMPv6 Destination Unreachable error
> >>> code 1 (Communication with destination administratively prohibited).
> >>>
> >>> Signed-off-by: Alin Nastac <alin.nastac at gmail.com>
> >>> ---
> >>> defaults.c | 21 ++++++++++++++++-----
> >>> options.h  |  2 ++
> >>> 2 files changed, 18 insertions(+), 5 deletions(-)
> >>>
> >>> diff --git a/defaults.c b/defaults.c
> >>> index 11fbf0d..6565ca2 100644
> >>> --- a/defaults.c
> >>> +++ b/defaults.c
> >>> @@ -41,6 +41,8 @@ const struct fw3_option fw3_flag_opts[] = {
> >>>   FW3_OPT("output",              target,   defaults, policy_output),
> >>>
> >>>   FW3_OPT("drop_invalid",        bool,     defaults, drop_invalid),
> >>> +    FW3_OPT("tcp_reset_rejects",   bool,     defaults, tcp_reset_rejects),
> >>> +    FW3_OPT("admin_prohib_rejects",bool,     defaults, admin_prohib_rejects),
> >>>
> >>>   FW3_OPT("syn_flood",           bool,     defaults, syn_flood),
> >>>   FW3_OPT("synflood_protect",    bool,     defaults, syn_flood),
> >>> @@ -113,6 +115,7 @@ fw3_load_defaults(struct fw3_state *state, struct uci_package *p)
> >>>
> >>>   defs->syn_flood_rate.rate  = 25;
> >>>   defs->syn_flood_rate.burst = 50;
> >>> +    defs->tcp_reset_rejects    = true;
> >>>   defs->tcp_syncookies       = true;
> >>>   defs->tcp_window_scaling   = true;
> >>>   defs->custom_chains        = true;
> >>> @@ -276,14 +279,22 @@ fw3_print_default_head_rules(struct fw3_ipt_handle *handle,
> >>>           fw3_ipt_rule_append(r, "INPUT");
> >>>       }
> >>>
> >>> -        r = fw3_ipt_rule_create(handle, &tcp, NULL, NULL, NULL, NULL);
> >>> -        fw3_ipt_rule_target(r, "REJECT");
> >>> -        fw3_ipt_rule_addarg(r, false, "--reject-with", "tcp-reset");
> >>> -        fw3_ipt_rule_append(r, "reject");
> >>> +        if (defs->tcp_reset_rejects)
> >>> +        {
> >>> +            r = fw3_ipt_rule_create(handle, &tcp, NULL, NULL, NULL, NULL);
> >>> +            fw3_ipt_rule_target(r, "REJECT");
> >>> +            fw3_ipt_rule_addarg(r, false, "--reject-with", "tcp-reset");
> >>> +            fw3_ipt_rule_append(r, "reject");
> >>> +        }
> >>>
> >>>       r = fw3_ipt_rule_new(handle);
> >>>       fw3_ipt_rule_target(r, "REJECT");
> >>> -        fw3_ipt_rule_addarg(r, false, "--reject-with", "port-unreach");
> >>> +        fw3_ipt_rule_addarg(r, false, "--reject-with",
> >>> +            defs->admin_prohib_rejects ?
> >>> +                (handle->family == FW3_FAMILY_V6 ?
> >>> +                    "adm-prohibited" :
> >>> +                    "admin-prohib") :
> >>> +                "port-unreach");
> >>>       fw3_ipt_rule_append(r, "reject");
> >>>
> >>>       break;
> >>> diff --git a/options.h b/options.h
> >>> index 08fecf6..e3ba99c 100644
> >>> --- a/options.h
> >>> +++ b/options.h
> >>> @@ -276,6 +276,8 @@ struct fw3_defaults
> >>>   enum fw3_flag policy_forward;
> >>>
> >>>   bool drop_invalid;
> >>> +    bool tcp_reset_rejects;
> >>> +    bool admin_prohib_rejects;
> >>>
> >>>   bool syn_flood;
> >>>   struct fw3_limit syn_flood_rate;
> >>> --
> >>> 2.7.4
> >>>
> >>>
> >>> _______________________________________________
> >>> openwrt-devel mailing list
> >>> openwrt-devel at lists.openwrt.org
> >>> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
> >>
>

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From ericluehrsen at gmail.com  Wed Jul  4 02:23:56 2018
From: ericluehrsen at gmail.com (Eric Luehrsen)
Date: Wed, 4 Jul 2018 02:23:56 -0400
Subject: [OpenWrt-Devel] [PATCH] firewall3: make reject types selectable
 by user
In-Reply-To: <CAF1oqRBW4EorOKmAKONXy4NCn_FdVS_gFDOWjiDMBTx7MMUw=Q@mail.gmail.com>
References: <1530545351-24848-1-git-send-email-alin.nastac@technicolor.com>
 <A5CA2CE7-B06B-4BD1-85CB-C27D71E89D39@redfish-solutions.com>
 <CAF1oqRD9gdt8PrM3HbYOM+MGBiwcxzbgB4eTOduY7PM7PnCo0w@mail.gmail.com>
 <D5D797FA-E54A-4CF7-800A-ECBBEBE8195D@redfish-solutions.com>
 <CAF1oqRBW4EorOKmAKONXy4NCn_FdVS_gFDOWjiDMBTx7MMUw=Q@mail.gmail.com>
Message-ID: <6f1ef1d5-919c-c8ec-2c02-c1f4a997c1fc@gmail.com>

On 07/04/2018 01:39 AM, Alin N?stac wrote:
> On Tue, Jul 3, 2018 at 11:32 PM Philip Prindeville
> <philipp_subx at redfish-solutions.com> wrote:
>>> On Jul 3, 2018, at 3:22 PM, Alin N?stac <alin.nastac at gmail.com> wrote:
>>>
>>> On Tue, Jul 3, 2018 at 6:39 PM Philip Prindeville
>>> <philipp_subx at redfish-solutions.com> wrote:
>>>>
>>>> Aren?t all inbound SYNs unsolicited by definition? Is there a danger of reflection attacks?
>>>
>>> Not all inbound SYNs are unsolicited. Take for instance active mode
>>> FTP transfers where the client resides on the LAN . In this case the
>>> FTP data connection is initiated from the WAN, but it is solicited by
>>> the FTP control connection initiated from the LAN.
>>>
>>> I don't think it matters that much what error code firewall returns
>>> for these unsolicited  inbound SYNs, but this RFC makes
>>> adm-prohibitited code a must.
>>
>> I would have thought that dropping them would be better, since it avoids reflection attacks.
> 
> Whether you want to silently drop or reject unauthorized connection
> attempts is a matter of local policy.
> 
> Besides, in order for a reflection attack against your LAN to succeed,
> the source IP address of rejected packets must be part of the LAN
> prefix. This can be easily prevented, either by enabling rpfilter or
> just by adding a firewall rule when the LAN prefix is statically
> allocated (the usual IPv4 case).
> 
>>>>> On Jul 2, 2018, at 9:29 AM, Alin Nastac <alin.nastac at gmail.com> wrote:
>>>>>
>>>>> From: Alin Nastac <alin.nastac at gmail.com>
>>>>>
>>>>> RFC 6092 recommends in section 3.3.1 that an IPv6 CPE must respond to
>>>>> unsolicited inbound SYNs with an ICMPv6 Destination Unreachable error
>>>>> code 1 (Communication with destination administratively prohibited).
>>>>>
>>>>> Signed-off-by: Alin Nastac <alin.nastac at gmail.com>
>>>>> ---
>>>>> defaults.c | 21 ++++++++++++++++-----
>>>>> options.h  |  2 ++
>>>>> 2 files changed, 18 insertions(+), 5 deletions(-)
>>>>>
>>>>> diff --git a/defaults.c b/defaults.c
>>>>> index 11fbf0d..6565ca2 100644
>>>>> --- a/defaults.c
>>>>> +++ b/defaults.c
>>>>> @@ -41,6 +41,8 @@ const struct fw3_option fw3_flag_opts[] = {
>>>>>    FW3_OPT("output",              target,   defaults, policy_output),
>>>>>
>>>>>    FW3_OPT("drop_invalid",        bool,     defaults, drop_invalid),
>>>>> +    FW3_OPT("tcp_reset_rejects",   bool,     defaults, tcp_reset_rejects),
>>>>> +    FW3_OPT("admin_prohib_rejects",bool,     defaults, admin_prohib_rejects),
>>>>>
>>>>>    FW3_OPT("syn_flood",           bool,     defaults, syn_flood),
>>>>>    FW3_OPT("synflood_protect",    bool,     defaults, syn_flood),
>>>>> @@ -113,6 +115,7 @@ fw3_load_defaults(struct fw3_state *state, struct uci_package *p)
>>>>>
>>>>>    defs->syn_flood_rate.rate  = 25;
>>>>>    defs->syn_flood_rate.burst = 50;
>>>>> +    defs->tcp_reset_rejects    = true;
>>>>>    defs->tcp_syncookies       = true;
>>>>>    defs->tcp_window_scaling   = true;
>>>>>    defs->custom_chains        = true;
>>>>> @@ -276,14 +279,22 @@ fw3_print_default_head_rules(struct fw3_ipt_handle *handle,
>>>>>            fw3_ipt_rule_append(r, "INPUT");
>>>>>        }
>>>>>
>>>>> -        r = fw3_ipt_rule_create(handle, &tcp, NULL, NULL, NULL, NULL);
>>>>> -        fw3_ipt_rule_target(r, "REJECT");
>>>>> -        fw3_ipt_rule_addarg(r, false, "--reject-with", "tcp-reset");
>>>>> -        fw3_ipt_rule_append(r, "reject");
>>>>> +        if (defs->tcp_reset_rejects)
>>>>> +        {
>>>>> +            r = fw3_ipt_rule_create(handle, &tcp, NULL, NULL, NULL, NULL);
>>>>> +            fw3_ipt_rule_target(r, "REJECT");
>>>>> +            fw3_ipt_rule_addarg(r, false, "--reject-with", "tcp-reset");
>>>>> +            fw3_ipt_rule_append(r, "reject");
>>>>> +        }
>>>>>
>>>>>        r = fw3_ipt_rule_new(handle);
>>>>>        fw3_ipt_rule_target(r, "REJECT");
>>>>> -        fw3_ipt_rule_addarg(r, false, "--reject-with", "port-unreach");
>>>>> +        fw3_ipt_rule_addarg(r, false, "--reject-with",
>>>>> +            defs->admin_prohib_rejects ?
>>>>> +                (handle->family == FW3_FAMILY_V6 ?
>>>>> +                    "adm-prohibited" :
>>>>> +                    "admin-prohib") :
>>>>> +                "port-unreach");
>>>>>        fw3_ipt_rule_append(r, "reject");
>>>>>
>>>>>        break;
>>>>> diff --git a/options.h b/options.h
>>>>> index 08fecf6..e3ba99c 100644
>>>>> --- a/options.h
>>>>> +++ b/options.h
>>>>> @@ -276,6 +276,8 @@ struct fw3_defaults
>>>>>    enum fw3_flag policy_forward;
>>>>>
>>>>>    bool drop_invalid;
>>>>> +    bool tcp_reset_rejects;
>>>>> +    bool admin_prohib_rejects;
>>>>>
>>>>>    bool syn_flood;
>>>>>    struct fw3_limit syn_flood_rate;
>>>>> --
>>>>> 2.7.4

This could spawn a side topic: for all firewall block types would it be 
useful to have a two tier response that is easily configurable for each 
rule or as a global default. That is _overt_ rejection on the first 
counter per time, and then _covert_ drop after that for maybe 4x cool 
off period. An honest address (DNS zone update) error would quickly 
resolve itself while failing connections properly rather than longer 
time outs. An attack flood would not generate amplified noise.

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From kristian.evensen at gmail.com  Wed Jul  4 08:16:43 2018
From: kristian.evensen at gmail.com (Kristian Evensen)
Date: Wed, 4 Jul 2018 14:16:43 +0200
Subject: [OpenWrt-Devel] mediatek: Add support for the UniElec U7623-02
In-Reply-To: <CAPrJfLekDbRXUQwnq-c2TuUFz=Oo7kse_h8dcdPONinf-nLAqA@mail.gmail.com>
References: <CAPrJfLekDbRXUQwnq-c2TuUFz=Oo7kse_h8dcdPONinf-nLAqA@mail.gmail.com>
Message-ID: <CAKfDRXjcDYZe8bQfJTVANS7MhpUttLU4MhSUWO0i=FJi9=uZvg@mail.gmail.com>

Hi Pavel,

On Tue, Jul 3, 2018 at 8:20 PM, Pavel Ivanov <pi635v at gmail.com> wrote:
> Hi,  Kristian !
> In your instructions for the firmware U7623-02, you write about
> repartitioning emmc (tftpboot $ {loadaddr} <name of mbr file>).
> Sorry, i do not understand where I should take the mbr file?

You need to create the mbr yourself. I have attached the small script
I use to create the mbr for my device. The only thing you need to do
is to set SECTORS to the number of sectors on your device (the value
in the script is correct for the 8GB eMMC). You might also want to
change the location of OUTFILE, as the script creates a (temporary)
file of the same size as the eMMC on your U7623. I tried to wrap my
head around ptgen, so that the mbr can be created during the build,
but I didn't quite manage to get the partitions aligned the way I want
to. I will give it another go this week, so that we can remove, or at
least simplify, this step :)

BR,
Kristian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: create_u7623_mbr.sh
Type: application/x-shellscript
Size: 351 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20180704/12fe4074/attachment.bin>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From tim at seoss.co.uk  Wed Jul  4 09:05:17 2018
From: tim at seoss.co.uk (Tim Small)
Date: Wed,  4 Jul 2018 14:05:17 +0100
Subject: [OpenWrt-Devel] Fix broken crypto ops on TP-Link TL-WDR4900
 18.06-RC1
Message-ID: <20180704130518.20896-1-tim@seoss.co.uk>

I hit unexplained errors when trying to use macsec on a TL-WDR4900v1 with
18.06-RC1, which I tracked down to an incorrect device tree definition for HW
crypto acceleration which is missing on the TC-WDR4900v1.  The following patch
removes the incorrect device tree node.


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From tim at seoss.co.uk  Wed Jul  4 09:05:18 2018
From: tim at seoss.co.uk (Tim Small)
Date: Wed,  4 Jul 2018 14:05:18 +0100
Subject: [OpenWrt-Devel] [PATCH] WDR4900v1 remove dt node for absent hw
 crypto.
In-Reply-To: <20180704130518.20896-1-tim@seoss.co.uk>
References: <20180704130518.20896-1-tim@seoss.co.uk>
Message-ID: <20180704130518.20896-2-tim@seoss.co.uk>

The WDR4900v1 uses the P1040 SoC, so the device tree pulls in the
definition for the related P1010 SoC.  However, the P1040 lacks the
CAAM/SEC4 hardware crypto accelerator which the P1010 device tree
defines.  If left defined, this causes the CAAM drivers (if present) to
attempt to use the non-existent device, making various crypto-related
operations (e.g. macsec and ipsec) fail.

This commit overrides the incorrect dt node definition in the included
file.

See also:
 - https://bugs.openwrt.org/index.php?do=details&task_id=1262
 - https://community.nxp.com/thread/338432#comment-474107

Signed-off-by: Tim Small <tim at seoss.co.uk>
---
 .../files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts  | 24 ++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts
index c2444936b7..bde5eb9575 100644
--- a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts
+++ b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts
@@ -236,3 +236,27 @@
 };
 
 /include/ "fsl/p1010si-post.dtsi"
+
+/*
+ * The TL-WDR4900 v1 uses the NXP (Freescale) P1014 SoC which is closely
+ * related to the P1010.
+ *
+ * NXP QP1010FS.pdf "QorIQ P1010 and P1014 Communications Processors"
+ * datasheet states that the P1014 does not include the accelerated crypto
+ * module (CAAM/SEC4) which is present in the P1010.
+ *
+ * NXP Appliation Note AN4938 Rev. 2 implies that some P1014 may contain the
+ * SEC4 module, but states that SoCs with System Version Register values
+ * 0x80F10110 or 0x80F10120 do not have the security feature.
+ *
+ * All v1.3 TL-WDR4900 tested have SVR == 0x80F10110 which AN4938 describes
+ * as: core rev 1.0, "P1014 (without security)".
+ *
+ * The SVR value is reported by uboot on the serial console.
+ */
+
+/ {
+	soc: soc at ffe00000 {
+		/delete-node/ crypto at 30000; /* Pulled in by p1010si-post */
+	};
+};
-- 
2.11.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From fe at dev.tdt.de  Wed Jul  4 09:26:57 2018
From: fe at dev.tdt.de (Florian Eckert)
Date: Wed,  4 Jul 2018 15:26:57 +0200
Subject: [OpenWrt-Devel] uhttpd: add configurable client Cache-Control http
 header
Message-ID: <20180704132659.5880-1-fe@dev.tdt.de>

I am working with luci-ng. And i have problems with caching with the following
Browser Edge, Internet-Explorer and Firefox. Chrome is working fine.
If the javascript or html files have changed on the system for example on
sysupgrade then the new files will not get loaded from uhttpd server.
The browsers always used the cached version and not the new version from
uhttpd.

To fix this tell the uhttpd to send the header Cache-Control no-cache on file
download. This header tells the browser to always check if the file has
changed on the server. If the file has not changed then the server send a 302
status header. The status header 302 tells the browser to load the file from
the browser cache because nothing has changed. On the other side if the file
has changed then the browser will deliver the new one.

This makes following patches deprecated
http://lists.infradead.org/pipermail/openwrt-devel/2018-July/013098.html
http://lists.infradead.org/pipermail/openwrt-devel/2018-July/013097.html


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From fe at dev.tdt.de  Wed Jul  4 09:26:58 2018
From: fe at dev.tdt.de (Florian Eckert)
Date: Wed,  4 Jul 2018 15:26:58 +0200
Subject: [OpenWrt-Devel] [PATCH 1/2] services/uhttpd: add -o option for
 Cache-Control header no-cache
In-Reply-To: <20180704132659.5880-1-fe@dev.tdt.de>
References: <20180704132659.5880-1-fe@dev.tdt.de>
Message-ID: <20180704132659.5880-2-fe@dev.tdt.de>

If uhttpd is started with the option -o then Cache-Control header is
send with option no-cache to client. This option will instruct the client
software (browser) do not cache the content.

I have seen some problem with luci-ng with the Browsers Edge, IE and Firefox.
They will not load the new files even the file content has changed.
If I set this option then all browser will load the new file from uhttpd.
This works with the Etag header feature.

Signed-off-by: Florian Eckert <fe at dev.tdt.de>
---
 ...ble-to-send-Cache-Control-header-no_cache.patch | 43 ++++++++++++++++++++++
 1 file changed, 43 insertions(+)
 create mode 100644 package/network/services/uhttpd/patches/0001-make-uhttpd-configurable-to-send-Cache-Control-header-no_cache.patch

diff --git a/package/network/services/uhttpd/patches/0001-make-uhttpd-configurable-to-send-Cache-Control-header-no_cache.patch b/package/network/services/uhttpd/patches/0001-make-uhttpd-configurable-to-send-Cache-Control-header-no_cache.patch
new file mode 100644
index 0000000000..4c40abd2ac
--- /dev/null
+++ b/package/network/services/uhttpd/patches/0001-make-uhttpd-configurable-to-send-Cache-Control-header-no_cache.patch
@@ -0,0 +1,43 @@
+--- a/file.c
++++ b/file.c
+@@ -339,6 +339,8 @@ static void uh_file_response_ok_hdrs(str
+ 		ustream_printf(cl->us, "ETag: %s\r\n", uh_file_mktag(s, buf, sizeof(buf)));
+ 		ustream_printf(cl->us, "Last-Modified: %s\r\n",
+ 			       uh_file_unix2date(s->st_mtime, buf, sizeof(buf)));
++		if(conf.no_cache)
++			ustream_printf(cl->us, "Cache-Control: %s\r\n", "no-cache");
+ 	}
+ 	ustream_printf(cl->us, "Date: %s\r\n",
+ 		       uh_file_unix2date(time(NULL), buf, sizeof(buf)));
+--- a/main.c
++++ b/main.c
+@@ -232,7 +232,7 @@ int main(int argc, char **argv)
+ 	init_defaults_pre();
+ 	signal(SIGPIPE, SIG_IGN);
+ 
+-	while ((ch = getopt(argc, argv, "A:aC:c:Dd:E:fh:H:I:i:K:k:L:l:m:N:n:p:qRr:Ss:T:t:U:u:Xx:y:")) != -1) {
++	while ((ch = getopt(argc, argv, "A:aC:c:Dd:E:fh:H:I:i:K:k:L:l:m:N:n:op:qRr:Ss:T:t:U:u:Xx:y:")) != -1) {
+ 		switch(ch) {
+ #ifdef HAVE_TLS
+ 		case 'C':
+@@ -311,6 +311,10 @@ int main(int argc, char **argv)
+ 			conf.rfc1918_filter = 1;
+ 			break;
+ 
++		case 'o':
++			conf.no_cache = 1;
++			break;
++
+ 		case 'n':
+ 			conf.max_script_requests = atoi(optarg);
+ 			break;
+--- a/uhttpd.h
++++ b/uhttpd.h
+@@ -77,6 +77,7 @@ struct config {
+ 	int ubus_noauth;
+ 	int ubus_cors;
+ 	int cgi_prefix_len;
++	int no_cache;
+ 	struct list_head cgi_alias;
+ };
+ 
-- 
2.11.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From fe at dev.tdt.de  Wed Jul  4 09:26:59 2018
From: fe at dev.tdt.de (Florian Eckert)
Date: Wed,  4 Jul 2018 15:26:59 +0200
Subject: [OpenWrt-Devel] [PATCH 2/2] services/uhttpd: Make new uhttpd
 no_cache option configurable over uci
In-Reply-To: <20180704132659.5880-1-fe@dev.tdt.de>
References: <20180704132659.5880-1-fe@dev.tdt.de>
Message-ID: <20180704132659.5880-3-fe@dev.tdt.de>

Make Cache-Control header no-cache configurable with uci. If the option
is not specified (default) then the Cache-Control header no-cache is not send
to the client.

Signed-off-by: Florian Eckert <fe at dev.tdt.de>
---
 package/network/services/uhttpd/files/uhttpd.init | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/network/services/uhttpd/files/uhttpd.init b/package/network/services/uhttpd/files/uhttpd.init
index 47270bcc15..aff24b5219 100755
--- a/package/network/services/uhttpd/files/uhttpd.init
+++ b/package/network/services/uhttpd/files/uhttpd.init
@@ -127,6 +127,7 @@ start_instance()
 	append_bool "$cfg" no_symlinks "-S" 0
 	append_bool "$cfg" no_dirlists "-D" 0
 	append_bool "$cfg" rfc1918_filter "-R" 0
+	append_bool "$cfg" no_cache "-o" 0
 
 	config_get alias_list "$cfg" alias
 	for alias in $alias_list; do
-- 
2.11.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From karlp at tweak.net.au  Wed Jul  4 10:01:21 2018
From: karlp at tweak.net.au (Karl Palsson)
Date: Wed, 04 Jul 2018 14:01:21 -0000
Subject: [OpenWrt-Devel] uhttpd: add configurable client Cache-Control
 http header
In-Reply-To: <20180704132659.5880-1-fe@dev.tdt.de>
References: <20180704132659.5880-1-fe@dev.tdt.de>
Message-ID: <UDucEJvUzh8QC2LWX48TZ5qZ9XLsFrZRAikW33iL229a@mailpile>


Florian Eckert <fe at dev.tdt.de> wrote:
> I am working with luci-ng. And i have problems with caching
> with the following Browser Edge, Internet-Explorer and Firefox.
> Chrome is working fine. If the javascript or html files have
> changed on the system for example on sysupgrade then the new
> files will not get loaded from uhttpd server. The browsers
> always used the cached version and not the new version from
> uhttpd.
> 
> To fix this tell the uhttpd to send the header Cache-Control
> no-cache on file download. This header tells the browser to
> always check if the file has changed on the server. If the file
> has not changed then the server send a 302 status header. The
> status header 302 tells the browser to load the file from the
> browser cache because nothing has changed. On the other side if
> the file has changed then the browser will deliver the new one.

That _seems_ like an exceptionally big hammer.

I just made all my code request js files with ?ver=xxxx version suffixes, so that only the right versions were cached.  

Cheers,
Karl P
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.html
Type: application/pgp-signature
Size: 1161 bytes
Desc: OpenPGP Digital Signature
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20180704/4ffdf6d5/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From linus.walleij at linaro.org  Wed Jul  4 15:17:57 2018
From: linus.walleij at linaro.org (Linus Walleij)
Date: Wed,  4 Jul 2018 21:17:57 +0200
Subject: [OpenWrt-Devel] [PATCH 1/3] ARM: dts: Add WAN ethernet port to the
 SQ201
Message-ID: <20180704191759.12577-1-linus.walleij@linaro.org>

This sets up the ethernet interface and PHY for the
WAN ethernet port which uses a Marvell PHY.

Signed-off-by: Linus Walleij <linus.walleij at linaro.org>
---
 arch/arm/boot/dts/gemini-sq201.dts | 85 ++++++++++++++++++++++++++++++
 1 file changed, 85 insertions(+)

diff --git a/arch/arm/boot/dts/gemini-sq201.dts b/arch/arm/boot/dts/gemini-sq201.dts
index e5cf9d1a98cd..2706b86e06f1 100644
--- a/arch/arm/boot/dts/gemini-sq201.dts
+++ b/arch/arm/boot/dts/gemini-sq201.dts
@@ -55,6 +55,21 @@
 		};
 	};
 
+	mdio0: ethernet-phy {
+		compatible = "virtual,mdio-gpio";
+		/* Uses MDC and MDIO */
+		gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>, /* MDC */
+			<&gpio0 21 GPIO_ACTIVE_HIGH>; /* MDIO */
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		/* This is a Marvell 88E1111 ethernet transciever */
+		phy0: ethernet-phy at 1 {
+			reg = <1>;
+			device_type = "ethernet-phy";
+		};
+	};
+
 	soc {
 		flash at 30000000 {
 			/*
@@ -108,6 +123,7 @@
 				/*
 				 * gpio0fgrp cover line 18 used by reset button
 				 * gpio0ggrp cover line 20 used by info LED
+				 * gpio0hgrp cover line 21, 22 used by MDIO for Marvell PHY
 				 * gpio0kgrp cover line 31 used by USB LED
 				 */
 				gpio0_default_pins: pinctrl-gpio0 {
@@ -115,9 +131,66 @@
 						function = "gpio0";
 						groups = "gpio0fgrp",
 						"gpio0ggrp",
+						"gpio0hgrp",
 						"gpio0kgrp";
 					};
 				};
+				pinctrl-gmii {
+					mux {
+						function = "gmii";
+						groups = "gmii_gmac0_grp", "gmii_gmac1_grp";
+					};
+					/* Settings come from memory dump in PLATO */
+					conf0 {
+						pins = "V8 GMAC0 RXDV";
+						skew-delay = <0>;
+					};
+					conf1 {
+						pins = "Y7 GMAC0 RXC";
+						skew-delay = <15>;
+					};
+					conf2 {
+						pins = "T8 GMAC0 TXEN";
+						skew-delay = <7>;
+					};
+					conf3 {
+						pins = "U8 GMAC0 TXC";
+						skew-delay = <10>;
+					};
+					conf4 {
+						pins = "T10 GMAC1 RXDV";
+						skew-delay = <7>;
+					};
+					conf5 {
+						pins = "Y11 GMAC1 RXC";
+						skew-delay = <8>;
+					};
+					conf6 {
+						pins = "W11 GMAC1 TXEN";
+						skew-delay = <7>;
+					};
+					conf7 {
+						pins = "V11 GMAC1 TXC";
+						skew-delay = <5>;
+					};
+					conf8 {
+						/* The data lines all have default skew */
+						pins = "W8 GMAC0 RXD0", "V9 GMAC0 RXD1",
+						       "Y8 GMAC0 RXD2", "U9 GMAC0 RXD3",
+						       "T7 GMAC0 TXD0", "U6 GMAC0 TXD1",
+						       "V7 GMAC0 TXD2", "U7 GMAC0 TXD3",
+						       "Y12 GMAC1 RXD0", "V12 GMAC1 RXD1",
+						       "T11 GMAC1 RXD2", "W12 GMAC1 RXD3",
+						       "U10 GMAC1 TXD0", "Y10 GMAC1 TXD1",
+						       "W10 GMAC1 TXD2", "T9 GMAC1 TXD3";
+						skew-delay = <7>;
+					};
+					/* Set up drive strength on GMAC0 and GMAC1 to 16 mA */
+					conf9 {
+						groups = "gmii_gmac0_grp", "gmii_gmac1_grp";
+						drive-strength = <16>;
+					};
+				};
 			};
 		};
 
@@ -154,6 +227,18 @@
 				<0x6000 0 0 4 &pci_intc 2>;
 		};
 
+		ethernet at 60000000 {
+			status = "okay";
+
+			ethernet-port at 0 {
+				phy-mode = "rgmii";
+				phy-handle = <&phy0>;
+			};
+			ethernet-port at 1 {
+				/* Used for the Vitesse G5 chip, add later */
+			};
+		};
+
 		ata at 63000000 {
 			status = "okay";
 		};
-- 
2.17.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From linus.walleij at linaro.org  Wed Jul  4 15:17:57 2018
From: linus.walleij at linaro.org (Linus Walleij)
Date: Wed,  4 Jul 2018 21:17:57 +0200
Subject: [OpenWrt-Devel] [PATCH 1/3] ARM: dts: Add WAN ethernet port to the
 SQ201
Message-ID: <20180704191759.12577-1-linus.walleij@linaro.org>

This sets up the ethernet interface and PHY for the
WAN ethernet port which uses a Marvell PHY.

Signed-off-by: Linus Walleij <linus.walleij at linaro.org>
---
 arch/arm/boot/dts/gemini-sq201.dts | 85 ++++++++++++++++++++++++++++++
 1 file changed, 85 insertions(+)

diff --git a/arch/arm/boot/dts/gemini-sq201.dts b/arch/arm/boot/dts/gemini-sq201.dts
index e5cf9d1a98cd..2706b86e06f1 100644
--- a/arch/arm/boot/dts/gemini-sq201.dts
+++ b/arch/arm/boot/dts/gemini-sq201.dts
@@ -55,6 +55,21 @@
 		};
 	};
 
+	mdio0: ethernet-phy {
+		compatible = "virtual,mdio-gpio";
+		/* Uses MDC and MDIO */
+		gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>, /* MDC */
+			<&gpio0 21 GPIO_ACTIVE_HIGH>; /* MDIO */
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		/* This is a Marvell 88E1111 ethernet transciever */
+		phy0: ethernet-phy at 1 {
+			reg = <1>;
+			device_type = "ethernet-phy";
+		};
+	};
+
 	soc {
 		flash at 30000000 {
 			/*
@@ -108,6 +123,7 @@
 				/*
 				 * gpio0fgrp cover line 18 used by reset button
 				 * gpio0ggrp cover line 20 used by info LED
+				 * gpio0hgrp cover line 21, 22 used by MDIO for Marvell PHY
 				 * gpio0kgrp cover line 31 used by USB LED
 				 */
 				gpio0_default_pins: pinctrl-gpio0 {
@@ -115,9 +131,66 @@
 						function = "gpio0";
 						groups = "gpio0fgrp",
 						"gpio0ggrp",
+						"gpio0hgrp",
 						"gpio0kgrp";
 					};
 				};
+				pinctrl-gmii {
+					mux {
+						function = "gmii";
+						groups = "gmii_gmac0_grp", "gmii_gmac1_grp";
+					};
+					/* Settings come from memory dump in PLATO */
+					conf0 {
+						pins = "V8 GMAC0 RXDV";
+						skew-delay = <0>;
+					};
+					conf1 {
+						pins = "Y7 GMAC0 RXC";
+						skew-delay = <15>;
+					};
+					conf2 {
+						pins = "T8 GMAC0 TXEN";
+						skew-delay = <7>;
+					};
+					conf3 {
+						pins = "U8 GMAC0 TXC";
+						skew-delay = <10>;
+					};
+					conf4 {
+						pins = "T10 GMAC1 RXDV";
+						skew-delay = <7>;
+					};
+					conf5 {
+						pins = "Y11 GMAC1 RXC";
+						skew-delay = <8>;
+					};
+					conf6 {
+						pins = "W11 GMAC1 TXEN";
+						skew-delay = <7>;
+					};
+					conf7 {
+						pins = "V11 GMAC1 TXC";
+						skew-delay = <5>;
+					};
+					conf8 {
+						/* The data lines all have default skew */
+						pins = "W8 GMAC0 RXD0", "V9 GMAC0 RXD1",
+						       "Y8 GMAC0 RXD2", "U9 GMAC0 RXD3",
+						       "T7 GMAC0 TXD0", "U6 GMAC0 TXD1",
+						       "V7 GMAC0 TXD2", "U7 GMAC0 TXD3",
+						       "Y12 GMAC1 RXD0", "V12 GMAC1 RXD1",
+						       "T11 GMAC1 RXD2", "W12 GMAC1 RXD3",
+						       "U10 GMAC1 TXD0", "Y10 GMAC1 TXD1",
+						       "W10 GMAC1 TXD2", "T9 GMAC1 TXD3";
+						skew-delay = <7>;
+					};
+					/* Set up drive strength on GMAC0 and GMAC1 to 16 mA */
+					conf9 {
+						groups = "gmii_gmac0_grp", "gmii_gmac1_grp";
+						drive-strength = <16>;
+					};
+				};
 			};
 		};
 
@@ -154,6 +227,18 @@
 				<0x6000 0 0 4 &pci_intc 2>;
 		};
 
+		ethernet at 60000000 {
+			status = "okay";
+
+			ethernet-port at 0 {
+				phy-mode = "rgmii";
+				phy-handle = <&phy0>;
+			};
+			ethernet-port at 1 {
+				/* Used for the Vitesse G5 chip, add later */
+			};
+		};
+
 		ata at 63000000 {
 			status = "okay";
 		};
-- 
2.17.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From linus.walleij at linaro.org  Wed Jul  4 15:17:58 2018
From: linus.walleij at linaro.org (Linus Walleij)
Date: Wed,  4 Jul 2018 21:17:58 +0200
Subject: [OpenWrt-Devel] [PATCH 2/3] ARM: dts: Att Vitesse G5e switch to the
 Gemini SQ201
In-Reply-To: <20180704191759.12577-1-linus.walleij@linaro.org>
References: <20180704191759.12577-1-linus.walleij@linaro.org>
Message-ID: <20180704191759.12577-2-linus.walleij@linaro.org>

This adds the Vitesse G5e ethernet switch to the Square
One Itian SQ201 router device tree.

Signed-off-by: Linus Walleij <linus.walleij at linaro.org>
---
 arch/arm/boot/dts/gemini-sq201.dts | 75 +++++++++++++++++++++++++++++-
 1 file changed, 73 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/gemini-sq201.dts b/arch/arm/boot/dts/gemini-sq201.dts
index 2706b86e06f1..830c167012a0 100644
--- a/arch/arm/boot/dts/gemini-sq201.dts
+++ b/arch/arm/boot/dts/gemini-sq201.dts
@@ -20,7 +20,7 @@
 	};
 
 	chosen {
-		bootargs = "console=ttyS0,115200n8";
+		bootargs = "console=ttyS0,115200n8 root=/dev/sda1 rw rootwait";
 		stdout-path = &uart0;
 	};
 
@@ -70,6 +70,61 @@
 		};
 	};
 
+	spi {
+		compatible = "spi-gpio";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		/* Check pin collisions */
+		gpio-sck = <&gpio1 28 GPIO_ACTIVE_HIGH>;
+		gpio-miso = <&gpio1 30 GPIO_ACTIVE_HIGH>;
+		gpio-mosi = <&gpio1 29 GPIO_ACTIVE_HIGH>;
+		cs-gpios = <&gpio1 31 GPIO_ACTIVE_HIGH>;
+		num-chipselects = <1>;
+
+		switch at 0 {
+			compatible = "vitesse,vsc7395";
+			reg = <0>;
+			/* Specified for 2.5 MHz or below */
+			spi-max-frequency = <2500000>;
+			gpio-controller;
+			#gpio-cells = <2>;
+
+			ports {
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				port at 0 {
+					reg = <0>;
+					label = "lan1";
+				};
+				port at 1 {
+					reg = <1>;
+					label = "lan2";
+				};
+				port at 2 {
+					reg = <2>;
+					label = "lan3";
+				};
+				port at 3 {
+					reg = <3>;
+					label = "lan4";
+				};
+				vsc: port at 6 {
+					reg = <6>;
+					label = "cpu";
+					ethernet = <&gmac1>;
+					phy-mode = "rgmii";
+					fixed-link {
+						speed = <1000>;
+						full-duplex;
+						pause;
+					};
+				};
+			};
+		};
+	};
+
+
 	soc {
 		flash at 30000000 {
 			/*
@@ -135,6 +190,16 @@
 						"gpio0kgrp";
 					};
 				};
+				/*
+				 * gpio0dgrp cover lines used by the SPI
+				 * to the Vitesse G5x chip.
+				 */
+				gpio1_default_pins: pinctrl-gpio1 {
+					mux {
+						function = "gpio1";
+						groups = "gpio1dgrp";
+					};
+				};
 				pinctrl-gmii {
 					mux {
 						function = "gmii";
@@ -205,6 +270,11 @@
 			pinctrl-0 = <&gpio0_default_pins>;
 		};
 
+		gpio1: gpio at 4e000000 {
+			pinctrl-names = "default";
+			pinctrl-0 = <&gpio1_default_pins>;
+		};
+
 		pci at 50000000 {
 			status = "okay";
 			interrupt-map-mask = <0xf800 0 0 7>;
@@ -235,7 +305,8 @@
 				phy-handle = <&phy0>;
 			};
 			ethernet-port at 1 {
-				/* Used for the Vitesse G5 chip, add later */
+				phy-mode = "rgmii";
+				phy-handle = <&vsc>;
 			};
 		};
 
-- 
2.17.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From linus.walleij at linaro.org  Wed Jul  4 15:17:58 2018
From: linus.walleij at linaro.org (Linus Walleij)
Date: Wed,  4 Jul 2018 21:17:58 +0200
Subject: [OpenWrt-Devel] [PATCH 2/3] ARM: dts: Att Vitesse G5e switch to the
 Gemini SQ201
In-Reply-To: <20180704191759.12577-1-linus.walleij@linaro.org>
References: <20180704191759.12577-1-linus.walleij@linaro.org>
Message-ID: <20180704191759.12577-2-linus.walleij@linaro.org>

This adds the Vitesse G5e ethernet switch to the Square
One Itian SQ201 router device tree.

Signed-off-by: Linus Walleij <linus.walleij at linaro.org>
---
 arch/arm/boot/dts/gemini-sq201.dts | 75 +++++++++++++++++++++++++++++-
 1 file changed, 73 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/gemini-sq201.dts b/arch/arm/boot/dts/gemini-sq201.dts
index 2706b86e06f1..830c167012a0 100644
--- a/arch/arm/boot/dts/gemini-sq201.dts
+++ b/arch/arm/boot/dts/gemini-sq201.dts
@@ -20,7 +20,7 @@
 	};
 
 	chosen {
-		bootargs = "console=ttyS0,115200n8";
+		bootargs = "console=ttyS0,115200n8 root=/dev/sda1 rw rootwait";
 		stdout-path = &uart0;
 	};
 
@@ -70,6 +70,61 @@
 		};
 	};
 
+	spi {
+		compatible = "spi-gpio";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		/* Check pin collisions */
+		gpio-sck = <&gpio1 28 GPIO_ACTIVE_HIGH>;
+		gpio-miso = <&gpio1 30 GPIO_ACTIVE_HIGH>;
+		gpio-mosi = <&gpio1 29 GPIO_ACTIVE_HIGH>;
+		cs-gpios = <&gpio1 31 GPIO_ACTIVE_HIGH>;
+		num-chipselects = <1>;
+
+		switch at 0 {
+			compatible = "vitesse,vsc7395";
+			reg = <0>;
+			/* Specified for 2.5 MHz or below */
+			spi-max-frequency = <2500000>;
+			gpio-controller;
+			#gpio-cells = <2>;
+
+			ports {
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				port at 0 {
+					reg = <0>;
+					label = "lan1";
+				};
+				port at 1 {
+					reg = <1>;
+					label = "lan2";
+				};
+				port at 2 {
+					reg = <2>;
+					label = "lan3";
+				};
+				port at 3 {
+					reg = <3>;
+					label = "lan4";
+				};
+				vsc: port at 6 {
+					reg = <6>;
+					label = "cpu";
+					ethernet = <&gmac1>;
+					phy-mode = "rgmii";
+					fixed-link {
+						speed = <1000>;
+						full-duplex;
+						pause;
+					};
+				};
+			};
+		};
+	};
+
+
 	soc {
 		flash at 30000000 {
 			/*
@@ -135,6 +190,16 @@
 						"gpio0kgrp";
 					};
 				};
+				/*
+				 * gpio0dgrp cover lines used by the SPI
+				 * to the Vitesse G5x chip.
+				 */
+				gpio1_default_pins: pinctrl-gpio1 {
+					mux {
+						function = "gpio1";
+						groups = "gpio1dgrp";
+					};
+				};
 				pinctrl-gmii {
 					mux {
 						function = "gmii";
@@ -205,6 +270,11 @@
 			pinctrl-0 = <&gpio0_default_pins>;
 		};
 
+		gpio1: gpio at 4e000000 {
+			pinctrl-names = "default";
+			pinctrl-0 = <&gpio1_default_pins>;
+		};
+
 		pci at 50000000 {
 			status = "okay";
 			interrupt-map-mask = <0xf800 0 0 7>;
@@ -235,7 +305,8 @@
 				phy-handle = <&phy0>;
 			};
 			ethernet-port at 1 {
-				/* Used for the Vitesse G5 chip, add later */
+				phy-mode = "rgmii";
+				phy-handle = <&vsc>;
 			};
 		};
 
-- 
2.17.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From linus.walleij at linaro.org  Wed Jul  4 15:17:59 2018
From: linus.walleij at linaro.org (Linus Walleij)
Date: Wed,  4 Jul 2018 21:17:59 +0200
Subject: [OpenWrt-Devel] [PATCH 3/3] ARM: dts: Add devicetree for
 Storlink/Storm SL93512R
In-Reply-To: <20180704191759.12577-1-linus.walleij@linaro.org>
References: <20180704191759.12577-1-linus.walleij@linaro.org>
Message-ID: <20180704191759.12577-3-linus.walleij@linaro.org>

The Storlink Gemini324 EV-Board also known as Storm
Semiconductor SL93512R_BRD is ground zero for the Gemini
devices. We add a device tree so we can support it, it
turns out to be pretty trivial.

Signed-off-by: Linus Walleij <linus.walleij at linaro.org>
---
 arch/arm/boot/dts/Makefile            |   1 +
 arch/arm/boot/dts/gemini-sl93512r.dts | 325 ++++++++++++++++++++++++++
 2 files changed, 326 insertions(+)
 create mode 100644 arch/arm/boot/dts/gemini-sl93512r.dts

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 37a3de760d40..a10ef98c6d75 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -200,6 +200,7 @@ dtb-$(CONFIG_ARCH_GEMINI) += \
 	gemini-dlink-dns-313.dtb \
 	gemini-nas4220b.dtb \
 	gemini-rut1xx.dtb \
+	gemini-sl93512r.dtb \
 	gemini-sq201.dtb \
 	gemini-wbd111.dtb \
 	gemini-wbd222.dtb
diff --git a/arch/arm/boot/dts/gemini-sl93512r.dts b/arch/arm/boot/dts/gemini-sl93512r.dts
new file mode 100644
index 000000000000..6160538bbb54
--- /dev/null
+++ b/arch/arm/boot/dts/gemini-sl93512r.dts
@@ -0,0 +1,325 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Device Tree file for the Storm Semiconductor SL93512R_BRD
+ * Gemini reference design, also initially called
+ * "Gemini324 EV-Board" before Storm acquired Storlink Semiconductor.
+ * The series were later acquired by Cortina Systems.
+ */
+
+/dts-v1/;
+
+#include "gemini.dtsi"
+#include <dt-bindings/input/input.h>
+
+/ {
+	model = "Storlink Semiconductor Gemini324 EV-Board / Storm Semiconductor SL93512R_BRD";
+	compatible = "storlink,gemini324", "storm,sl93512r", "cortina,gemini";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	memory at 0 {
+		/* 64 MB Samsung K4H511638B */
+		device_type = "memory";
+		reg = <0x00000000 0x4000000>;
+	};
+
+	chosen {
+		bootargs = "console=ttyS0,19200n8 root=/dev/sda1 rw rootwait";
+		stdout-path = &uart0;
+	};
+
+	gpio_keys {
+		compatible = "gpio-keys";
+
+		button-wps {
+			debounce-interval = <50>;
+			wakeup-source;
+			linux,code = <KEY_WPS_BUTTON>;
+			label = "WPS";
+			/* Conflict with NAND flash */
+			gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
+		};
+
+		button-setup {
+			debounce-interval = <50>;
+			wakeup-source;
+			linux,code = <KEY_SETUP>;
+			label = "factory reset";
+			/* Conflict with NAND flash */
+			gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
+		};
+	};
+
+	leds {
+		compatible = "gpio-leds";
+		led-green-harddisk {
+			label = "sq201:green:harddisk";
+			/* Conflict with LCD (no problem) */
+			gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
+			default-state = "off";
+			linux,default-trigger = "disk-activity";
+		};
+		led-green-wireless {
+			label = "sq201:green:wireless";
+			/* Conflict with NAND flash CE0 (no problem) */
+			gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
+			default-state = "on";
+			linux,default-trigger = "heartbeat";
+		};
+	};
+
+	mdio0: ethernet-phy {
+		compatible = "virtual,mdio-gpio";
+		/* Uses MDC and MDIO */
+		gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>, /* MDC */
+			<&gpio0 21 GPIO_ACTIVE_HIGH>; /* MDIO */
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		/* This is a Marvell 88E1111 ethernet transciever */
+		phy0: ethernet-phy at 1 {
+			reg = <1>;
+			device_type = "ethernet-phy";
+		};
+	};
+
+	spi {
+		compatible = "spi-gpio";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		/* Check pin collisions */
+		gpio-sck = <&gpio1 28 GPIO_ACTIVE_HIGH>;
+		gpio-miso = <&gpio1 30 GPIO_ACTIVE_HIGH>;
+		gpio-mosi = <&gpio1 29 GPIO_ACTIVE_HIGH>;
+		cs-gpios = <&gpio1 31 GPIO_ACTIVE_HIGH>;
+		num-chipselects = <1>;
+
+		switch at 0 {
+			compatible = "vitesse,vsc7385";
+			reg = <0>;
+			/* Specified for 2.5 MHz or below */
+			spi-max-frequency = <2500000>;
+			gpio-controller;
+			#gpio-cells = <2>;
+
+			ports {
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				port at 0 {
+					reg = <0>;
+					label = "lan1";
+				};
+				port at 1 {
+					reg = <1>;
+					label = "lan2";
+				};
+				port at 2 {
+					reg = <2>;
+					label = "lan3";
+				};
+				port at 3 {
+					reg = <3>;
+					label = "lan4";
+				};
+				vsc: port at 6 {
+					reg = <6>;
+					label = "cpu";
+					ethernet = <&gmac1>;
+					phy-mode = "rgmii";
+					fixed-link {
+						speed = <1000>;
+						full-duplex;
+						pause;
+					};
+				};
+			};
+		};
+	};
+
+
+	soc {
+		flash at 30000000 {
+			status = "okay";
+			/* 16MB of flash */
+			reg = <0x30000000 0x01000000>;
+
+			partition at 0 {
+				label = "BOOT";
+				reg = <0x00000000 0x00020000>;
+				read-only;
+			};
+			partition at 120000 {
+				label = "Kern";
+				reg = <0x00020000 0x00300000>;
+			};
+			partition at 320000 {
+				label = "Ramdisk";
+				reg = <0x00320000 0x00600000>;
+			};
+			partition at 920000 {
+				label = "Application";
+				reg = <0x00920000 0x00600000>;
+			};
+			partition at f20000 {
+				label = "VCTL";
+				reg = <0x00f20000 0x00020000>;
+				read-only;
+			};
+			partition at f40000 {
+				label = "CurConf";
+				reg = <0x00f40000 0x000a0000>;
+				read-only;
+			};
+			partition at fe0000 {
+				label = "FIS directory";
+				reg = <0x00fe0000 0x00020000>;
+				read-only;
+			};
+		};
+
+		syscon: syscon at 40000000 {
+			pinctrl {
+				/*
+				 * gpio0egrp cover line 16 used by HD LED
+				 * gpio0fgrp cover line 17, 18 used by wireless LED and reset button
+				 * gpio0hgrp cover line 21, 22 used by MDIO for Marvell PHY
+				 * gpio0kgrp cover line 31 used by USB LED
+				 */
+				gpio0_default_pins: pinctrl-gpio0 {
+					mux {
+						function = "gpio0";
+						groups = "gpio0egrp",
+						"gpio0fgrp",
+						"gpio0hgrp";
+					};
+				};
+				/*
+				 * gpio1dgrp cover lines used by SPI for
+				 * the Vitesse chip (28-31)
+				 */
+				gpio1_default_pins: pinctrl-gpio1 {
+					mux {
+						function = "gpio1";
+						groups = "gpio1dgrp";
+					};
+				};
+				pinctrl-gmii {
+					mux {
+						function = "gmii";
+						groups = "gmii_gmac0_grp", "gmii_gmac1_grp";
+					};
+					/* Control pad skew comes from sl_switch.c in the vendor code */
+					conf0 {
+						pins = "P10 GMAC1 TXC";
+						skew-delay = <5>;
+					};
+					conf1 {
+						pins = "V11 GMAC1 TXEN";
+						skew-delay = <7>;
+					};
+					conf2 {
+						pins = "T11 GMAC1 RXC";
+						skew-delay = <8>;
+					};
+					conf3 {
+						pins = "U11 GMAC1 RXDV";
+						skew-delay = <7>;
+					};
+					conf4 {
+						pins = "V7 GMAC0 TXC";
+						skew-delay = <10>;
+					};
+					conf5 {
+						pins = "P8 GMAC0 TXEN";
+						skew-delay = <7>; /* 5 at another place? */
+					};
+					conf6 {
+						pins = "T8 GMAC0 RXC";
+						skew-delay = <15>;
+					};
+					conf7 {
+						pins = "R8 GMAC0 RXDV";
+						skew-delay = <0>;
+					};
+					conf8 {
+						/* The data lines all have default skew */
+						pins = "U8 GMAC0 RXD0", "V8 GMAC0 RXD1",
+						       "P9 GMAC0 RXD2", "R9 GMAC0 RXD3",
+						       "R11 GMAC1 RXD0", "P11 GMAC1 RXD1",
+						       "V12 GMAC1 RXD2", "U12 GMAC1 RXD3",
+						       "R10 GMAC1 TXD0", "T10 GMAC1 TXD1",
+						       "U10 GMAC1 TXD2", "V10 GMAC1 TXD3";
+						skew-delay = <7>;
+					};
+					/* Appears in sl351x_gmac.c in the vendor code */
+					conf9 {
+						pins = "U7 GMAC0 TXD0", "T7 GMAC0 TXD1",
+						       "R7 GMAC0 TXD2", "P7 GMAC0 TXD3";
+						skew-delay = <5>;
+					};
+				};
+			};
+		};
+
+		/* Both interfaces brought out on SATA connectors */
+		sata: sata at 46000000 {
+			cortina,gemini-ata-muxmode = <0>;
+			cortina,gemini-enable-sata-bridge;
+			status = "okay";
+		};
+
+		gpio0: gpio at 4d000000 {
+			pinctrl-names = "default";
+			pinctrl-0 = <&gpio0_default_pins>;
+		};
+
+		gpio1: gpio at 4e000000 {
+			pinctrl-names = "default";
+			pinctrl-0 = <&gpio1_default_pins>;
+		};
+
+		pci at 50000000 {
+			status = "okay";
+			interrupt-map-mask = <0xf800 0 0 7>;
+			interrupt-map =
+				<0x4800 0 0 1 &pci_intc 0>, /* Slot 9 */
+				<0x4800 0 0 2 &pci_intc 1>,
+				<0x4800 0 0 3 &pci_intc 2>,
+				<0x4800 0 0 4 &pci_intc 3>,
+				<0x5000 0 0 1 &pci_intc 1>, /* Slot 10 */
+				<0x5000 0 0 2 &pci_intc 2>,
+				<0x5000 0 0 3 &pci_intc 3>,
+				<0x5000 0 0 4 &pci_intc 0>,
+				<0x5800 0 0 1 &pci_intc 2>, /* Slot 11 */
+				<0x5800 0 0 2 &pci_intc 3>,
+				<0x5800 0 0 3 &pci_intc 0>,
+				<0x5800 0 0 4 &pci_intc 1>,
+				<0x6000 0 0 1 &pci_intc 3>, /* Slot 12 */
+				<0x6000 0 0 2 &pci_intc 0>,
+				<0x6000 0 0 3 &pci_intc 1>,
+				<0x6000 0 0 4 &pci_intc 2>;
+		};
+
+		ethernet at 60000000 {
+			status = "okay";
+
+			ethernet-port at 0 {
+				phy-mode = "rgmii";
+				phy-handle = <&phy0>;
+			};
+			ethernet-port at 1 {
+				phy-mode = "rgmii";
+				phy-handle = <&vsc>;
+			};
+		};
+
+		ata at 63000000 {
+			status = "okay";
+		};
+
+		ata at 63400000 {
+			status = "okay";
+		};
+	};
+};
-- 
2.17.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From linus.walleij at linaro.org  Wed Jul  4 15:17:59 2018
From: linus.walleij at linaro.org (Linus Walleij)
Date: Wed,  4 Jul 2018 21:17:59 +0200
Subject: [OpenWrt-Devel] [PATCH 3/3] ARM: dts: Add devicetree for
 Storlink/Storm SL93512R
In-Reply-To: <20180704191759.12577-1-linus.walleij@linaro.org>
References: <20180704191759.12577-1-linus.walleij@linaro.org>
Message-ID: <20180704191759.12577-3-linus.walleij@linaro.org>

The Storlink Gemini324 EV-Board also known as Storm
Semiconductor SL93512R_BRD is ground zero for the Gemini
devices. We add a device tree so we can support it, it
turns out to be pretty trivial.

Signed-off-by: Linus Walleij <linus.walleij at linaro.org>
---
 arch/arm/boot/dts/Makefile            |   1 +
 arch/arm/boot/dts/gemini-sl93512r.dts | 325 ++++++++++++++++++++++++++
 2 files changed, 326 insertions(+)
 create mode 100644 arch/arm/boot/dts/gemini-sl93512r.dts

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 37a3de760d40..a10ef98c6d75 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -200,6 +200,7 @@ dtb-$(CONFIG_ARCH_GEMINI) += \
 	gemini-dlink-dns-313.dtb \
 	gemini-nas4220b.dtb \
 	gemini-rut1xx.dtb \
+	gemini-sl93512r.dtb \
 	gemini-sq201.dtb \
 	gemini-wbd111.dtb \
 	gemini-wbd222.dtb
diff --git a/arch/arm/boot/dts/gemini-sl93512r.dts b/arch/arm/boot/dts/gemini-sl93512r.dts
new file mode 100644
index 000000000000..6160538bbb54
--- /dev/null
+++ b/arch/arm/boot/dts/gemini-sl93512r.dts
@@ -0,0 +1,325 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Device Tree file for the Storm Semiconductor SL93512R_BRD
+ * Gemini reference design, also initially called
+ * "Gemini324 EV-Board" before Storm acquired Storlink Semiconductor.
+ * The series were later acquired by Cortina Systems.
+ */
+
+/dts-v1/;
+
+#include "gemini.dtsi"
+#include <dt-bindings/input/input.h>
+
+/ {
+	model = "Storlink Semiconductor Gemini324 EV-Board / Storm Semiconductor SL93512R_BRD";
+	compatible = "storlink,gemini324", "storm,sl93512r", "cortina,gemini";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	memory at 0 {
+		/* 64 MB Samsung K4H511638B */
+		device_type = "memory";
+		reg = <0x00000000 0x4000000>;
+	};
+
+	chosen {
+		bootargs = "console=ttyS0,19200n8 root=/dev/sda1 rw rootwait";
+		stdout-path = &uart0;
+	};
+
+	gpio_keys {
+		compatible = "gpio-keys";
+
+		button-wps {
+			debounce-interval = <50>;
+			wakeup-source;
+			linux,code = <KEY_WPS_BUTTON>;
+			label = "WPS";
+			/* Conflict with NAND flash */
+			gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
+		};
+
+		button-setup {
+			debounce-interval = <50>;
+			wakeup-source;
+			linux,code = <KEY_SETUP>;
+			label = "factory reset";
+			/* Conflict with NAND flash */
+			gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
+		};
+	};
+
+	leds {
+		compatible = "gpio-leds";
+		led-green-harddisk {
+			label = "sq201:green:harddisk";
+			/* Conflict with LCD (no problem) */
+			gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
+			default-state = "off";
+			linux,default-trigger = "disk-activity";
+		};
+		led-green-wireless {
+			label = "sq201:green:wireless";
+			/* Conflict with NAND flash CE0 (no problem) */
+			gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
+			default-state = "on";
+			linux,default-trigger = "heartbeat";
+		};
+	};
+
+	mdio0: ethernet-phy {
+		compatible = "virtual,mdio-gpio";
+		/* Uses MDC and MDIO */
+		gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>, /* MDC */
+			<&gpio0 21 GPIO_ACTIVE_HIGH>; /* MDIO */
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		/* This is a Marvell 88E1111 ethernet transciever */
+		phy0: ethernet-phy at 1 {
+			reg = <1>;
+			device_type = "ethernet-phy";
+		};
+	};
+
+	spi {
+		compatible = "spi-gpio";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		/* Check pin collisions */
+		gpio-sck = <&gpio1 28 GPIO_ACTIVE_HIGH>;
+		gpio-miso = <&gpio1 30 GPIO_ACTIVE_HIGH>;
+		gpio-mosi = <&gpio1 29 GPIO_ACTIVE_HIGH>;
+		cs-gpios = <&gpio1 31 GPIO_ACTIVE_HIGH>;
+		num-chipselects = <1>;
+
+		switch at 0 {
+			compatible = "vitesse,vsc7385";
+			reg = <0>;
+			/* Specified for 2.5 MHz or below */
+			spi-max-frequency = <2500000>;
+			gpio-controller;
+			#gpio-cells = <2>;
+
+			ports {
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				port at 0 {
+					reg = <0>;
+					label = "lan1";
+				};
+				port at 1 {
+					reg = <1>;
+					label = "lan2";
+				};
+				port at 2 {
+					reg = <2>;
+					label = "lan3";
+				};
+				port at 3 {
+					reg = <3>;
+					label = "lan4";
+				};
+				vsc: port at 6 {
+					reg = <6>;
+					label = "cpu";
+					ethernet = <&gmac1>;
+					phy-mode = "rgmii";
+					fixed-link {
+						speed = <1000>;
+						full-duplex;
+						pause;
+					};
+				};
+			};
+		};
+	};
+
+
+	soc {
+		flash at 30000000 {
+			status = "okay";
+			/* 16MB of flash */
+			reg = <0x30000000 0x01000000>;
+
+			partition at 0 {
+				label = "BOOT";
+				reg = <0x00000000 0x00020000>;
+				read-only;
+			};
+			partition at 120000 {
+				label = "Kern";
+				reg = <0x00020000 0x00300000>;
+			};
+			partition at 320000 {
+				label = "Ramdisk";
+				reg = <0x00320000 0x00600000>;
+			};
+			partition at 920000 {
+				label = "Application";
+				reg = <0x00920000 0x00600000>;
+			};
+			partition at f20000 {
+				label = "VCTL";
+				reg = <0x00f20000 0x00020000>;
+				read-only;
+			};
+			partition at f40000 {
+				label = "CurConf";
+				reg = <0x00f40000 0x000a0000>;
+				read-only;
+			};
+			partition at fe0000 {
+				label = "FIS directory";
+				reg = <0x00fe0000 0x00020000>;
+				read-only;
+			};
+		};
+
+		syscon: syscon at 40000000 {
+			pinctrl {
+				/*
+				 * gpio0egrp cover line 16 used by HD LED
+				 * gpio0fgrp cover line 17, 18 used by wireless LED and reset button
+				 * gpio0hgrp cover line 21, 22 used by MDIO for Marvell PHY
+				 * gpio0kgrp cover line 31 used by USB LED
+				 */
+				gpio0_default_pins: pinctrl-gpio0 {
+					mux {
+						function = "gpio0";
+						groups = "gpio0egrp",
+						"gpio0fgrp",
+						"gpio0hgrp";
+					};
+				};
+				/*
+				 * gpio1dgrp cover lines used by SPI for
+				 * the Vitesse chip (28-31)
+				 */
+				gpio1_default_pins: pinctrl-gpio1 {
+					mux {
+						function = "gpio1";
+						groups = "gpio1dgrp";
+					};
+				};
+				pinctrl-gmii {
+					mux {
+						function = "gmii";
+						groups = "gmii_gmac0_grp", "gmii_gmac1_grp";
+					};
+					/* Control pad skew comes from sl_switch.c in the vendor code */
+					conf0 {
+						pins = "P10 GMAC1 TXC";
+						skew-delay = <5>;
+					};
+					conf1 {
+						pins = "V11 GMAC1 TXEN";
+						skew-delay = <7>;
+					};
+					conf2 {
+						pins = "T11 GMAC1 RXC";
+						skew-delay = <8>;
+					};
+					conf3 {
+						pins = "U11 GMAC1 RXDV";
+						skew-delay = <7>;
+					};
+					conf4 {
+						pins = "V7 GMAC0 TXC";
+						skew-delay = <10>;
+					};
+					conf5 {
+						pins = "P8 GMAC0 TXEN";
+						skew-delay = <7>; /* 5 at another place? */
+					};
+					conf6 {
+						pins = "T8 GMAC0 RXC";
+						skew-delay = <15>;
+					};
+					conf7 {
+						pins = "R8 GMAC0 RXDV";
+						skew-delay = <0>;
+					};
+					conf8 {
+						/* The data lines all have default skew */
+						pins = "U8 GMAC0 RXD0", "V8 GMAC0 RXD1",
+						       "P9 GMAC0 RXD2", "R9 GMAC0 RXD3",
+						       "R11 GMAC1 RXD0", "P11 GMAC1 RXD1",
+						       "V12 GMAC1 RXD2", "U12 GMAC1 RXD3",
+						       "R10 GMAC1 TXD0", "T10 GMAC1 TXD1",
+						       "U10 GMAC1 TXD2", "V10 GMAC1 TXD3";
+						skew-delay = <7>;
+					};
+					/* Appears in sl351x_gmac.c in the vendor code */
+					conf9 {
+						pins = "U7 GMAC0 TXD0", "T7 GMAC0 TXD1",
+						       "R7 GMAC0 TXD2", "P7 GMAC0 TXD3";
+						skew-delay = <5>;
+					};
+				};
+			};
+		};
+
+		/* Both interfaces brought out on SATA connectors */
+		sata: sata at 46000000 {
+			cortina,gemini-ata-muxmode = <0>;
+			cortina,gemini-enable-sata-bridge;
+			status = "okay";
+		};
+
+		gpio0: gpio at 4d000000 {
+			pinctrl-names = "default";
+			pinctrl-0 = <&gpio0_default_pins>;
+		};
+
+		gpio1: gpio at 4e000000 {
+			pinctrl-names = "default";
+			pinctrl-0 = <&gpio1_default_pins>;
+		};
+
+		pci at 50000000 {
+			status = "okay";
+			interrupt-map-mask = <0xf800 0 0 7>;
+			interrupt-map =
+				<0x4800 0 0 1 &pci_intc 0>, /* Slot 9 */
+				<0x4800 0 0 2 &pci_intc 1>,
+				<0x4800 0 0 3 &pci_intc 2>,
+				<0x4800 0 0 4 &pci_intc 3>,
+				<0x5000 0 0 1 &pci_intc 1>, /* Slot 10 */
+				<0x5000 0 0 2 &pci_intc 2>,
+				<0x5000 0 0 3 &pci_intc 3>,
+				<0x5000 0 0 4 &pci_intc 0>,
+				<0x5800 0 0 1 &pci_intc 2>, /* Slot 11 */
+				<0x5800 0 0 2 &pci_intc 3>,
+				<0x5800 0 0 3 &pci_intc 0>,
+				<0x5800 0 0 4 &pci_intc 1>,
+				<0x6000 0 0 1 &pci_intc 3>, /* Slot 12 */
+				<0x6000 0 0 2 &pci_intc 0>,
+				<0x6000 0 0 3 &pci_intc 1>,
+				<0x6000 0 0 4 &pci_intc 2>;
+		};
+
+		ethernet at 60000000 {
+			status = "okay";
+
+			ethernet-port at 0 {
+				phy-mode = "rgmii";
+				phy-handle = <&phy0>;
+			};
+			ethernet-port at 1 {
+				phy-mode = "rgmii";
+				phy-handle = <&vsc>;
+			};
+		};
+
+		ata at 63000000 {
+			status = "okay";
+		};
+
+		ata at 63400000 {
+			status = "okay";
+		};
+	};
+};
-- 
2.17.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From nbd at nbd.name  Wed Jul  4 15:49:59 2018
From: nbd at nbd.name (Felix Fietkau)
Date: Wed, 4 Jul 2018 21:49:59 +0200
Subject: [OpenWrt-Devel] [PATCH 1/3] toolchain/gcc: add GCC 8.1.0
In-Reply-To: <20180621150812.3477-1-wong.syrone@gmail.com>
References: <20180621150812.3477-1-wong.syrone@gmail.com>
Message-ID: <973d2283-8d8f-0817-4b93-7144c14c07d9@nbd.name>

On 2018-06-21 17:08, wong.syrone at gmail.com wrote:
> From: Syrone Wong <wong.syrone at gmail.com>
> 
> Changes compared to GCC 7.x
> 
> 001-revert_register_mode_search.patch dropped
> 
> The commit guards comparison via maybe_gt(), while 001-revert_register_mode_search.patch simply ignore
> "GET_MODE_SIZE (mode) > GET_MODE_SIZE (found_mode)", the powerpc issue might be fixed, I'm not pretty sure.
> 
> upstream commit: https://github.com/gcc-mirror/gcc/commit/52acb7aee19f4bb33e76819907eff343bf4f42e8
I believe the actual fix is in this commit:
https://github.com/gcc-mirror/gcc/commit/3fa2798aa887d141d86985240f03e2f3809e7e62

I believe the actual underlying issue is described at the end of
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58139

So ACK from me on removing 001-revert_register_mode_search.patch

- Felix

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From nbd at nbd.name  Wed Jul  4 15:53:54 2018
From: nbd at nbd.name (Felix Fietkau)
Date: Wed, 4 Jul 2018 21:53:54 +0200
Subject: [OpenWrt-Devel] [RFC] toolchain: gcc: drop
 850-use_shared_libgcc.patch
In-Reply-To: <20180625053001.2360-1-yszhou4tech@gmail.com>
References: <20180625053001.2360-1-yszhou4tech@gmail.com>
Message-ID: <b322fdc5-637e-991b-ba25-c54357c6a7d2@nbd.name>

On 2018-06-25 07:30, Yousong Zhou wrote:
> A link error was encountered when invoking "gccgo -static hello.go" to test a
> fix for gccgo [1].  The linker cannot find reference to _Unwind_Resume which is
> defined in libgcc_eh.a and from the "gccgo -v" and "gccgo -dumpspecs" output, I
> found the issue was caused by libgcc_spec being patched by the said patch
> 
> The patch was originally introduced for linaro-gcc 4.5 in 2011 commit
> 23e18c9 ("gcc-linaro: fix the libgcc spec to default to using the shared
> libgcc").  It should be not needed now as the libgcc_spec logic of since
> at least gcc 5.5.0 already takes that into account
> 
>     %{static|static-libgcc:-lgcc -lgcc_eh}%{!static:%{!static-libgcc:%{!shared-libgcc:-lgcc --as-needed -lgcc_s --no-as-needed}%{shared-libgcc:-lgcc_s%{!shared: -lgcc}}}}
Won't this link in libgcc by default unless -shared-libgcc is passed?
I think last time I looked into this, this caused some extra bloat to
creep into every single compiled binary.
Maybe you could compare binaries before and after this change to make
sure that is no longer the case.

- Felix

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From nbd at nbd.name  Wed Jul  4 16:22:51 2018
From: nbd at nbd.name (Felix Fietkau)
Date: Wed, 4 Jul 2018 22:22:51 +0200
Subject: [OpenWrt-Devel] [RFC] toolchain: gcc: drop
 850-use_shared_libgcc.patch
In-Reply-To: <b322fdc5-637e-991b-ba25-c54357c6a7d2@nbd.name>
References: <20180625053001.2360-1-yszhou4tech@gmail.com>
 <b322fdc5-637e-991b-ba25-c54357c6a7d2@nbd.name>
Message-ID: <3b800dba-d932-bd8d-377b-730a06f9636a@nbd.name>

On 2018-07-04 21:53, Felix Fietkau wrote:
> On 2018-06-25 07:30, Yousong Zhou wrote:
>> A link error was encountered when invoking "gccgo -static hello.go" to test a
>> fix for gccgo [1].  The linker cannot find reference to _Unwind_Resume which is
>> defined in libgcc_eh.a and from the "gccgo -v" and "gccgo -dumpspecs" output, I
>> found the issue was caused by libgcc_spec being patched by the said patch
>> 
>> The patch was originally introduced for linaro-gcc 4.5 in 2011 commit
>> 23e18c9 ("gcc-linaro: fix the libgcc spec to default to using the shared
>> libgcc").  It should be not needed now as the libgcc_spec logic of since
>> at least gcc 5.5.0 already takes that into account
>> 
>>     %{static|static-libgcc:-lgcc -lgcc_eh}%{!static:%{!static-libgcc:%{!shared-libgcc:-lgcc --as-needed -lgcc_s --no-as-needed}%{shared-libgcc:-lgcc_s%{!shared: -lgcc}}}}
> Won't this link in libgcc by default unless -shared-libgcc is passed?
> I think last time I looked into this, this caused some extra bloat to
> creep into every single compiled binary.
> Maybe you could compare binaries before and after this change to make
> sure that is no longer the case.
I just ran that test. With that patch applied, it seems that every
single executable gets bigger by a considerable amount.

- Felix

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From vincent at systemli.org  Wed Jul  4 16:32:32 2018
From: vincent at systemli.org (Nick)
Date: Wed, 4 Jul 2018 22:32:32 +0200
Subject: [OpenWrt-Devel] [PATCH 2/2] iwinfo: nl80211: add survey.
In-Reply-To: <20180703133211.23120-3-daniel@dd-wrt.com>
References: <20180703133211.23120-1-daniel@dd-wrt.com>
 <20180703133211.23120-3-daniel@dd-wrt.com>
Message-ID: <affc3319-0a2a-e20d-4cfb-b958503d19a1@systemli.org>

I wanted to add this info too. See previous emails: "iwinfo: add channel
survey"
I think you are making the survey for all channels?
My attention was only a survey for the used channel.


On 03.07.2018 15:32, Daniel Danzberger wrote:
> Signed-off-by: Daniel Danzberger <daniel at dd-wrt.com>
> ---
>  include/iwinfo.h | 11 ++++++++
>  iwinfo_nl80211.c | 69 ++++++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 80 insertions(+)
>
> diff --git a/include/iwinfo.h b/include/iwinfo.h
> index 4111205..49ee7f0 100644
> --- a/include/iwinfo.h
> +++ b/include/iwinfo.h
> @@ -128,6 +128,16 @@ struct iwinfo_assoclist_entry {
>  	uint32_t thr;
>  };
>  
> +struct iwinfo_survey_entry {
> +	uint64_t active_time;
> +	uint64_t busy_time;
> +	uint64_t busy_time_ext;
> +	uint64_t rxtime;
> +	uint64_t txtime;
> +	uint32_t mhz;
> +	uint8_t noise;
> +};
> +
>  struct iwinfo_txpwrlist_entry {
>  	uint8_t  dbm;
>  	uint16_t mw;
> @@ -223,6 +233,7 @@ struct iwinfo_ops {
>  	int (*scanlist)(const char *, char *, int *);
>  	int (*freqlist)(const char *, char *, int *);
>  	int (*countrylist)(const char *, char *, int *);
> +	int (*survey)(const char *, char *, int *);
>  	int (*lookup_phy)(const char *, char *);
>  	void (*close)(void);
>  };
> diff --git a/iwinfo_nl80211.c b/iwinfo_nl80211.c
> index 0e0206b..71465b5 100644
> --- a/iwinfo_nl80211.c
> +++ b/iwinfo_nl80211.c
> @@ -1678,6 +1678,59 @@ static void nl80211_parse_rateinfo(struct nlattr **ri,
>  	re->is_40mhz = (re->mhz == 40);
>  }
>  
> +static int nl80211_get_survey_cb(struct nl_msg *msg, void *arg)
> +{
> +	struct nl80211_array_buf *arr = arg;
> +	struct iwinfo_survey_entry *e = arr->buf;
> +	struct nlattr **attr = nl80211_parse(msg);
> +	struct nlattr *sinfo[NL80211_SURVEY_INFO_MAX + 1];
> +	int rc;
> +
> +	static struct nla_policy survey_policy[NL80211_SURVEY_INFO_MAX + 1] = {
> +		[NL80211_SURVEY_INFO_FREQUENCY] = { .type = NLA_U32 },
> +		[NL80211_SURVEY_INFO_NOISE]  = { .type = NLA_U8     },
> +		[NL80211_SURVEY_INFO_TIME] = { .type = NLA_U64   },
> +		[NL80211_SURVEY_INFO_TIME_BUSY] = { .type = NLA_U64   },
> +		[NL80211_SURVEY_INFO_TIME_EXT_BUSY] = { .type = NLA_U64   },
> +		[NL80211_SURVEY_INFO_TIME_RX] = { .type = NLA_U64   },
> +		[NL80211_SURVEY_INFO_TIME_TX] = { .type = NLA_U64   },
> +	};
> +
> +	rc = nla_parse_nested(sinfo, NL80211_SURVEY_INFO_MAX,
> +				attr[NL80211_ATTR_SURVEY_INFO],
> +				survey_policy);
> +	if (rc)
> +		return NL_SKIP;
> +
> +	/* advance to end of array */
> +	e += arr->count;
> +	memset(e, 0, sizeof(*e));
> +
> +	if (sinfo[NL80211_SURVEY_INFO_FREQUENCY])
> +		e->mhz = nla_get_u32(sinfo[NL80211_SURVEY_INFO_FREQUENCY]);
> +
> +        if (sinfo[NL80211_SURVEY_INFO_NOISE])
> +		e->noise = nla_get_u8(sinfo[NL80211_SURVEY_INFO_NOISE]);
> +
> +        if (sinfo[NL80211_SURVEY_INFO_TIME])
> +		e->active_time = nla_get_u64(sinfo[NL80211_SURVEY_INFO_TIME]);
> +
> +        if (sinfo[NL80211_SURVEY_INFO_TIME_BUSY])
> +		e->busy_time = nla_get_u64(sinfo[NL80211_SURVEY_INFO_TIME_BUSY]);
> +
> +        if (sinfo[NL80211_SURVEY_INFO_TIME_EXT_BUSY])
> +                e->busy_time_ext = nla_get_u64(sinfo[NL80211_SURVEY_INFO_TIME_EXT_BUSY]);
> +
> +        if (sinfo[NL80211_SURVEY_INFO_TIME_RX])
> +                e->rxtime = nla_get_u64(sinfo[NL80211_SURVEY_INFO_TIME_RX]);
> +
> +        if (sinfo[NL80211_SURVEY_INFO_TIME_TX])
> +		e->txtime = nla_get_u64(sinfo[NL80211_SURVEY_INFO_TIME_TX]);
> +
> +	arr->count++;
> +	return NL_SKIP;
> +}
> +
>  static int nl80211_get_assoclist_cb(struct nl_msg *msg, void *arg)
>  {
>  	struct nl80211_array_buf *arr = arg;
> @@ -1812,6 +1865,21 @@ static int nl80211_get_assoclist_cb(struct nl_msg *msg, void *arg)
>  	return NL_SKIP;
>  }
>  
> +static int nl80211_get_survey(const char *ifname, char *buf, int *len)
> +{
> +	struct nl80211_array_buf arr = { .buf = buf, .count = 0 };
> +	int rc;
> +
> +	rc = nl80211_request(ifname, NL80211_CMD_GET_SURVEY,
> +			NLM_F_DUMP, nl80211_get_survey_cb, &arr);
> +	if (!rc)
> +		*len = (arr.count * sizeof(struct iwinfo_survey_entry));
> +	else
> +		*len = 0;
> +
> +	return 0;
> +}
> +
>  static int nl80211_get_assoclist(const char *ifname, char *buf, int *len)
>  {
>  	DIR *d;
> @@ -2862,6 +2930,7 @@ const struct iwinfo_ops nl80211_ops = {
>  	.scanlist         = nl80211_get_scanlist,
>  	.freqlist         = nl80211_get_freqlist,
>  	.countrylist      = nl80211_get_countrylist,
> +	.survey           = nl80211_get_survey,
>  	.lookup_phy       = nl80211_lookup_phyname,
>  	.close            = nl80211_close
>  };


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From andrew at lunn.ch  Wed Jul  4 16:45:39 2018
From: andrew at lunn.ch (Andrew Lunn)
Date: Wed, 4 Jul 2018 22:45:39 +0200
Subject: [OpenWrt-Devel] [PATCH 1/3] ARM: dts: Add WAN ethernet port to
 the SQ201
In-Reply-To: <20180704191759.12577-1-linus.walleij@linaro.org>
References: <20180704191759.12577-1-linus.walleij@linaro.org>
Message-ID: <20180704204539.GE23469@lunn.ch>

On Wed, Jul 04, 2018 at 09:17:57PM +0200, Linus Walleij wrote:
> This sets up the ethernet interface and PHY for the
> WAN ethernet port which uses a Marvell PHY.
> 
> Signed-off-by: Linus Walleij <linus.walleij at linaro.org>
> ---
>  arch/arm/boot/dts/gemini-sq201.dts | 85 ++++++++++++++++++++++++++++++
>  1 file changed, 85 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/gemini-sq201.dts b/arch/arm/boot/dts/gemini-sq201.dts
> index e5cf9d1a98cd..2706b86e06f1 100644
> --- a/arch/arm/boot/dts/gemini-sq201.dts
> +++ b/arch/arm/boot/dts/gemini-sq201.dts
> @@ -55,6 +55,21 @@
>  		};
>  	};
>  
> +	mdio0: ethernet-phy {

Hi Linus

mdio0: mdio - This node is not an ethernet phy, it is an mdio bus.

> +		compatible = "virtual,mdio-gpio";
> +		/* Uses MDC and MDIO */
> +		gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>, /* MDC */
> +			<&gpio0 21 GPIO_ACTIVE_HIGH>; /* MDIO */
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +
> +		/* This is a Marvell 88E1111 ethernet transciever */
> +		phy0: ethernet-phy at 1 {
> +			reg = <1>;
> +			device_type = "ethernet-phy";

device_type is not needed, and not part of the binding in
Documentation/devicetree/bindings/net/phy.txt

	Andrew

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From andrew at lunn.ch  Wed Jul  4 16:56:27 2018
From: andrew at lunn.ch (Andrew Lunn)
Date: Wed, 4 Jul 2018 22:56:27 +0200
Subject: [OpenWrt-Devel] [PATCH 3/3] ARM: dts: Add devicetree for
 Storlink/Storm SL93512R
In-Reply-To: <20180704191759.12577-3-linus.walleij@linaro.org>
References: <20180704191759.12577-1-linus.walleij@linaro.org>
 <20180704191759.12577-3-linus.walleij@linaro.org>
Message-ID: <20180704205627.GF23469@lunn.ch>

On Wed, Jul 04, 2018 at 09:17:59PM +0200, Linus Walleij wrote:
> The Storlink Gemini324 EV-Board also known as Storm
> Semiconductor SL93512R_BRD is ground zero for the Gemini
> devices. We add a device tree so we can support it, it
> turns out to be pretty trivial.
> 
> Signed-off-by: Linus Walleij <linus.walleij at linaro.org>
> ---
>  arch/arm/boot/dts/Makefile            |   1 +
>  arch/arm/boot/dts/gemini-sl93512r.dts | 325 ++++++++++++++++++++++++++
>  2 files changed, 326 insertions(+)
>  create mode 100644 arch/arm/boot/dts/gemini-sl93512r.dts
> 
> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> index 37a3de760d40..a10ef98c6d75 100644
> --- a/arch/arm/boot/dts/Makefile
> +++ b/arch/arm/boot/dts/Makefile
> @@ -200,6 +200,7 @@ dtb-$(CONFIG_ARCH_GEMINI) += \
>  	gemini-dlink-dns-313.dtb \
>  	gemini-nas4220b.dtb \
>  	gemini-rut1xx.dtb \
> +	gemini-sl93512r.dtb \
>  	gemini-sq201.dtb \
>  	gemini-wbd111.dtb \
>  	gemini-wbd222.dtb
> diff --git a/arch/arm/boot/dts/gemini-sl93512r.dts b/arch/arm/boot/dts/gemini-sl93512r.dts
> new file mode 100644
> index 000000000000..6160538bbb54
> --- /dev/null
> +++ b/arch/arm/boot/dts/gemini-sl93512r.dts
> @@ -0,0 +1,325 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * Device Tree file for the Storm Semiconductor SL93512R_BRD
> + * Gemini reference design, also initially called
> + * "Gemini324 EV-Board" before Storm acquired Storlink Semiconductor.
> + * The series were later acquired by Cortina Systems.
> + */
> +
> +/dts-v1/;
> +
> +#include "gemini.dtsi"
> +#include <dt-bindings/input/input.h>
> +
> +/ {
> +	model = "Storlink Semiconductor Gemini324 EV-Board / Storm Semiconductor SL93512R_BRD";
> +	compatible = "storlink,gemini324", "storm,sl93512r", "cortina,gemini";
> +	#address-cells = <1>;
> +	#size-cells = <1>;
> +
> +	memory at 0 {
> +		/* 64 MB Samsung K4H511638B */
> +		device_type = "memory";
> +		reg = <0x00000000 0x4000000>;
> +	};
> +
> +	chosen {
> +		bootargs = "console=ttyS0,19200n8 root=/dev/sda1 rw rootwait";
> +		stdout-path = &uart0;

Hi Linus

You should put the baud rate as part of the stdout-patch, not in bootargs.

> +	mdio0: ethernet-phy {

mdio0: mdio

> +		compatible = "virtual,mdio-gpio";
> +		/* Uses MDC and MDIO */
> +		gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>, /* MDC */
> +			<&gpio0 21 GPIO_ACTIVE_HIGH>; /* MDIO */
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +
> +		/* This is a Marvell 88E1111 ethernet transciever */
> +		phy0: ethernet-phy at 1 {
> +			reg = <1>;
> +			device_type = "ethernet-phy";

No device_type please.

> +		};
> +	};
> +
> +	spi {
> +		compatible = "spi-gpio";
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +		/* Check pin collisions */
> +		gpio-sck = <&gpio1 28 GPIO_ACTIVE_HIGH>;
> +		gpio-miso = <&gpio1 30 GPIO_ACTIVE_HIGH>;
> +		gpio-mosi = <&gpio1 29 GPIO_ACTIVE_HIGH>;
> +		cs-gpios = <&gpio1 31 GPIO_ACTIVE_HIGH>;
> +		num-chipselects = <1>;
> +
> +		switch at 0 {
> +			compatible = "vitesse,vsc7385";
> +			reg = <0>;
> +			/* Specified for 2.5 MHz or below */
> +			spi-max-frequency = <2500000>;
> +			gpio-controller;
> +			#gpio-cells = <2>;
> +
> +			ports {
> +				#address-cells = <1>;
> +				#size-cells = <0>;
> +
> +				port at 0 {
> +					reg = <0>;
> +					label = "lan1";
> +				};
> +				port at 1 {
> +					reg = <1>;
> +					label = "lan2";
> +				};
> +				port at 2 {
> +					reg = <2>;
> +					label = "lan3";
> +				};
> +				port at 3 {
> +					reg = <3>;
> +					label = "lan4";
> +				};
> +				vsc: port at 6 {
> +					reg = <6>;
> +					label = "cpu";
> +					ethernet = <&gmac1>;
> +					phy-mode = "rgmii";
> +					fixed-link {
> +						speed = <1000>;
> +						full-duplex;
> +						pause;
> +					};
> +				};
> +			};
> +		};
> +	};

> +		ethernet at 60000000 {
> +			status = "okay";
> +
> +			ethernet-port at 0 {
> +				phy-mode = "rgmii";
> +				phy-handle = <&phy0>;
> +			};
> +			ethernet-port at 1 {
> +				phy-mode = "rgmii";
> +				phy-handle = <&vsc>;

This looks odd. The switch port is not a PHY. Normally you use a
fixed-phy.

	Andrew

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From geert at linux-m68k.org  Wed Jul  4 17:10:15 2018
From: geert at linux-m68k.org (Geert Uytterhoeven)
Date: Wed, 4 Jul 2018 23:10:15 +0200
Subject: [OpenWrt-Devel] [PATCH 2/3] ARM: dts: Att Vitesse G5e switch to
 the Gemini SQ201
In-Reply-To: <20180704191759.12577-2-linus.walleij@linaro.org>
References: <20180704191759.12577-1-linus.walleij@linaro.org>
 <20180704191759.12577-2-linus.walleij@linaro.org>
Message-ID: <CAMuHMdWPasK_Xu7ap-UoHOTGhZ3N5X1jUpBDdzVpYzhe8RfZ+g@mail.gmail.com>

Hi Linus,

On Wed, Jul 4, 2018 at 9:21 PM Linus Walleij <linus.walleij at linaro.org> wrote:
> This adds the Vitesse G5e ethernet switch to the Square
> One Itian SQ201 router device tree.
>
> Signed-off-by: Linus Walleij <linus.walleij at linaro.org>

Thanks for your patch!

> --- a/arch/arm/boot/dts/gemini-sq201.dts
> +++ b/arch/arm/boot/dts/gemini-sq201.dts
> @@ -20,7 +20,7 @@
>         };
>
>         chosen {
> -               bootargs = "console=ttyS0,115200n8";
> +               bootargs = "console=ttyS0,115200n8 root=/dev/sda1 rw rootwait";
>                 stdout-path = &uart0;
>         };

The above hunk looks unrelated.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From rosenp at gmail.com  Wed Jul  4 19:20:04 2018
From: rosenp at gmail.com (Rosen Penev)
Date: Wed,  4 Jul 2018 16:20:04 -0700
Subject: [OpenWrt-Devel] [PATCH 1/5] ramips: ethernet: Switch to
 of_device_get_match_data
Message-ID: <20180704232008.3310-1-rosenp@gmail.com>

Slight cleanup and avoids a temporary variable.

Based on upstream commit.

Signed-off-by: Rosen Penev <rosenp at gmail.com>
---
 .../files-4.14/drivers/net/ethernet/mediatek/mtk_eth_soc.c    | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mtk_eth_soc.c
index a5704b0f1b..6999635ad7 100644
--- a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -1523,7 +1523,6 @@ static void fe_pending_work(struct work_struct *work)
 static int fe_probe(struct platform_device *pdev)
 {
 	struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	const struct of_device_id *match;
 	struct fe_soc_data *soc;
 	struct net_device *netdev;
 	struct fe_priv *priv;
@@ -1532,8 +1531,7 @@ static int fe_probe(struct platform_device *pdev)
 
 	device_reset(&pdev->dev);
 
-	match = of_match_device(of_fe_match, &pdev->dev);
-	soc = (struct fe_soc_data *)match->data;
+	soc = of_device_get_match_data(&pdev->dev);
 
 	if (soc->reg_table)
 		fe_reg_table = soc->reg_table;
-- 
2.17.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From rosenp at gmail.com  Wed Jul  4 19:20:05 2018
From: rosenp at gmail.com (Rosen Penev)
Date: Wed,  4 Jul 2018 16:20:05 -0700
Subject: [OpenWrt-Devel] [PATCH 2/5] net: ethernet: mediatek: use
 devm_mdiobus_alloc instead of mdiobus_alloc inside mtk_mdio_init
In-Reply-To: <20180704232008.3310-1-rosenp@gmail.com>
References: <20180704232008.3310-1-rosenp@gmail.com>
Message-ID: <20180704232008.3310-2-rosenp@gmail.com>

From: Sean Wang <sean.wang at mediatek.com>

a lot of parts in the driver uses devm_* APIs to gain benefits from the
device resource management, so devm_mdiobus_alloc is also used instead
of mdiobus_alloc to have more elegant code flow.

Using common code provided by the devm_* helps to
1) have simplified the code flow as [1] says
2) decrease the risk of incorrect error handling by human
3) only a few drivers used it since it was proposed on linux 3.16,
so just hope to promote for this.

Ref:
[1] https://patchwork.ozlabs.org/patch/344093/

Signed-off-by: Sean Wang <sean.wang at mediatek.com>
Reviewed-by: Andrew Lunn <andrew at lunn.ch>
Signed-off-by: David S. Miller <davem at davemloft.net>
---
 .../drivers/net/ethernet/mediatek/mdio.c      | 21 ++++++-------------
 1 file changed, 6 insertions(+), 15 deletions(-)

diff --git a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mdio.c b/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mdio.c
index bdfdf7a432..06f217af10 100644
--- a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mdio.c
+++ b/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mdio.c
@@ -202,7 +202,7 @@ static struct fe_phy phy_ralink = {
 int fe_mdio_init(struct fe_priv *priv)
 {
 	struct device_node *mii_np;
-	int err;
+	int ret;
 
 	if (!priv->soc->mdio_read || !priv->soc->mdio_write)
 		return 0;
@@ -217,13 +217,13 @@ int fe_mdio_init(struct fe_priv *priv)
 	}
 
 	if (!of_device_is_available(mii_np)) {
-		err = 0;
+		ret = 0;
 		goto err_put_node;
 	}
 
-	priv->mii_bus = mdiobus_alloc();
+	priv->mii_bus = devm_mdiobus_alloc(priv->dev);
 	if (!priv->mii_bus) {
-		err = -ENOMEM;
+		ret = -ENOMEM;
 		goto err_put_node;
 	}
 
@@ -235,18 +235,11 @@ int fe_mdio_init(struct fe_priv *priv)
 	priv->mii_bus->parent = priv->dev;
 
 	snprintf(priv->mii_bus->id, MII_BUS_ID_SIZE, "%s", mii_np->name);
-	err = of_mdiobus_register(priv->mii_bus, mii_np);
-	if (err)
-		goto err_free_bus;
+	ret = of_mdiobus_register(priv->mii_bus, mii_np);
 
-	return 0;
-
-err_free_bus:
-	kfree(priv->mii_bus);
 err_put_node:
 	of_node_put(mii_np);
-	priv->mii_bus = NULL;
-	return err;
+	return ret;
 }
 
 void fe_mdio_cleanup(struct fe_priv *priv)
@@ -255,6 +248,4 @@ void fe_mdio_cleanup(struct fe_priv *priv)
 		return;
 
 	mdiobus_unregister(priv->mii_bus);
-	of_node_put(priv->mii_bus->dev.of_node);
-	kfree(priv->mii_bus);
 }
-- 
2.17.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From rosenp at gmail.com  Wed Jul  4 19:20:06 2018
From: rosenp at gmail.com (Rosen Penev)
Date: Wed,  4 Jul 2018 16:20:06 -0700
Subject: [OpenWrt-Devel] [PATCH 3/5] ramips: ethernet: Use lightweight
 locking in two places
In-Reply-To: <20180704232008.3310-1-rosenp@gmail.com>
References: <20180704232008.3310-1-rosenp@gmail.com>
Message-ID: <20180704232008.3310-3-rosenp@gmail.com>

Slightly more efficient.

Backport of: e3e9652a43207561eaec6085a8272fe11b283286

Signed-off-by: Rosen Penev <rosenp at gmail.com>
---
 .../drivers/net/ethernet/mediatek/mtk_eth_soc.c       | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mtk_eth_soc.c
index 6999635ad7..76ad00136d 100644
--- a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -156,13 +156,11 @@ static inline void fe_int_enable(u32 mask)
 
 static inline void fe_hw_set_macaddr(struct fe_priv *priv, unsigned char *mac)
 {
-	unsigned long flags;
-
-	spin_lock_irqsave(&priv->page_lock, flags);
+	spin_lock_bh(&priv->page_lock);
 	fe_w32((mac[0] << 8) | mac[1], FE_GDMA1_MAC_ADRH);
 	fe_w32((mac[2] << 24) | (mac[3] << 16) | (mac[4] << 8) | mac[5],
 	       FE_GDMA1_MAC_ADRL);
-	spin_unlock_irqrestore(&priv->page_lock, flags);
+	spin_unlock_bh(&priv->page_lock);
 }
 
 static int fe_set_mac_address(struct net_device *dev, void *p)
@@ -1273,7 +1271,6 @@ static int fe_open(struct net_device *dev)
 static int fe_stop(struct net_device *dev)
 {
 	struct fe_priv *priv = netdev_priv(dev);
-	unsigned long flags;
 	int i;
 
 	netif_tx_disable(dev);
@@ -1283,12 +1280,12 @@ static int fe_stop(struct net_device *dev)
 	if (priv->phy)
 		priv->phy->stop(priv);
 
-	spin_lock_irqsave(&priv->page_lock, flags);
+	spin_lock_bh(&priv->page_lock);
 
 	fe_reg_w32(fe_reg_r32(FE_REG_PDMA_GLO_CFG) &
 		     ~(FE_TX_WB_DDONE | FE_RX_DMA_EN | FE_TX_DMA_EN),
 		     FE_REG_PDMA_GLO_CFG);
-	spin_unlock_irqrestore(&priv->page_lock, flags);
+	spin_unlock_bh(&priv->page_lock);
 
 	/* wait dma stop */
 	for (i = 0; i < 10; i++) {
-- 
2.17.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From rosenp at gmail.com  Wed Jul  4 19:20:07 2018
From: rosenp at gmail.com (Rosen Penev)
Date: Wed,  4 Jul 2018 16:20:07 -0700
Subject: [OpenWrt-Devel] [PATCH 4/5] net: ethernet: mediatek: fix error
 handling inside mtk_mdio_init
In-Reply-To: <20180704232008.3310-1-rosenp@gmail.com>
References: <20180704232008.3310-1-rosenp@gmail.com>
Message-ID: <20180704232008.3310-4-rosenp@gmail.com>

From: Sean Wang <sean.wang at mediatek.com>

Return -ENODEV if the MDIO bus is disabled in the device tree.

Signed-off-by: Sean Wang <sean.wang at mediatek.com>
Acked-by: John Crispin <john at phrozen.org>
Reviewed-by: Andrew Lunn <andrew at lunn.ch>
Signed-off-by: David S. Miller <davem at davemloft.net>
---
 .../ramips/files-4.14/drivers/net/ethernet/mediatek/mdio.c      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mdio.c b/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mdio.c
index 06f217af10..e2e79e185f 100644
--- a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mdio.c
+++ b/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mdio.c
@@ -217,7 +217,7 @@ int fe_mdio_init(struct fe_priv *priv)
 	}
 
 	if (!of_device_is_available(mii_np)) {
-		ret = 0;
+		ret = -ENODEV;
 		goto err_put_node;
 	}
 
-- 
2.17.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From rosenp at gmail.com  Wed Jul  4 19:20:08 2018
From: rosenp at gmail.com (Rosen Penev)
Date: Wed,  4 Jul 2018 16:20:08 -0700
Subject: [OpenWrt-Devel] [PATCH 5/5] net: ethernet: mediatek: enhance with
 avoiding superfluous assignment inside mtk_get_ethtool_stats
In-Reply-To: <20180704232008.3310-1-rosenp@gmail.com>
References: <20180704232008.3310-1-rosenp@gmail.com>
Message-ID: <20180704232008.3310-5-rosenp@gmail.com>

From: Sean Wang <sean.wang at mediatek.com>

data_src is unchanged inside the loop, so this patch moves
the assignment to outside the loop to avoid unnecessarily
assignment

Signed-off-by: Sean Wang <sean.wang at mediatek.com>
Signed-off-by: David S. Miller <davem at davemloft.net>
---
 .../ramips/files-4.14/drivers/net/ethernet/mediatek/ethtool.c  | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/ethtool.c b/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/ethtool.c
index 5732c28536..edadf4fc30 100644
--- a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/ethtool.c
+++ b/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/ethtool.c
@@ -192,8 +192,9 @@ static void fe_get_ethtool_stats(struct net_device *dev,
 		}
 	}
 
+	data_src = &hwstats->tx_bytes;
+
 	do {
-		data_src = &hwstats->tx_bytes;
 		data_dst = data;
 		start = u64_stats_fetch_begin_irq(&hwstats->syncp);
 
-- 
2.17.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From wong.syrone at gmail.com  Wed Jul  4 20:00:00 2018
From: wong.syrone at gmail.com (Syrone Wong)
Date: Thu, 5 Jul 2018 08:00:00 +0800
Subject: [OpenWrt-Devel] [PATCH 1/3] toolchain/gcc: add GCC 8.1.0
In-Reply-To: <973d2283-8d8f-0817-4b93-7144c14c07d9@nbd.name>
References: <20180621150812.3477-1-wong.syrone@gmail.com>
 <973d2283-8d8f-0817-4b93-7144c14c07d9@nbd.name>
Message-ID: <CAEaqfoZrbHVW7_v1B3eX66QdiAF0avtoZb0AxnOut_Lw-ODqeA@mail.gmail.com>

> I believe the actual fix is in this commit:
> https://github.com/gcc-mirror/gcc/commit/3fa2798aa887d141d86985240f03e2f3809e7e62
>
> I believe the actual underlying issue is described at the end of
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58139

Should I send a v2 and add this explaination?

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From fe at dev.tdt.de  Thu Jul  5 02:17:04 2018
From: fe at dev.tdt.de (Florian Eckert)
Date: Thu, 05 Jul 2018 08:17:04 +0200
Subject: [OpenWrt-Devel] uhttpd: add configurable client Cache-Control
 http header
In-Reply-To: <UDucEJvUzh8QC2LWX48TZ5qZ9XLsFrZRAikW33iL229a@mailpile>
References: <20180704132659.5880-1-fe@dev.tdt.de>
 <UDucEJvUzh8QC2LWX48TZ5qZ9XLsFrZRAikW33iL229a@mailpile>
Message-ID: <16b024e31006705660c302593d58d8cf@dev.tdt.de>

Thanks for reply

On 2018-07-04 16:01, Karl Palsson wrote:
> Florian Eckert <fe at dev.tdt.de> wrote:
>> To fix this tell the uhttpd to send the header Cache-Control
>> no-cache on file download. This header tells the browser to
>> always check if the file has changed on the server. If the file
>> has not changed then the server send a 302 status header. The
>> status header 302 tells the browser to load the file from the
>> browser cache because nothing has changed. On the other side if
>> the file has changed then the browser will deliver the new one.
> 
> That _seems_ like an exceptionally big hammer.

We could also use additional the other options, which are allowed by 
http Cache-Control header.
I have found an interesting article from google about the caching topic.
It is only in german :-(
But the graph with the head "Optimale Cache-Control-Richtlinien 
festlegen"
is interesting.

May be we could change the option from no_cache -> cache-control?
With the following options:

no-cache
no-store
max-age=<seconds>

So each uhttp instance could be configured to send a Cache-Control 
header or not.

> I just made all my code request js files with ?ver=xxxx version
> suffixes, so that only the right versions were cached.

Yes i have seen this in luci but not in luci-ng.

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From nbd at nbd.name  Thu Jul  5 05:18:02 2018
From: nbd at nbd.name (Felix Fietkau)
Date: Thu, 5 Jul 2018 11:18:02 +0200
Subject: [OpenWrt-Devel] [PATCH 1/3] toolchain/gcc: add GCC 8.1.0
In-Reply-To: <CAEaqfoZrbHVW7_v1B3eX66QdiAF0avtoZb0AxnOut_Lw-ODqeA@mail.gmail.com>
References: <20180621150812.3477-1-wong.syrone@gmail.com>
 <973d2283-8d8f-0817-4b93-7144c14c07d9@nbd.name>
 <CAEaqfoZrbHVW7_v1B3eX66QdiAF0avtoZb0AxnOut_Lw-ODqeA@mail.gmail.com>
Message-ID: <af365dcd-d308-4d02-2b47-3288dba7682d@nbd.name>

On 2018-07-05 02:00, Syrone Wong wrote:
>> I believe the actual fix is in this commit:
>> https://github.com/gcc-mirror/gcc/commit/3fa2798aa887d141d86985240f03e2f3809e7e62
>>
>> I believe the actual underlying issue is described at the end of
>> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58139
> 
> Should I send a v2 and add this explaination?
No need. I just merged your change to my staging tree and adjusted the
description.

- Felix

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From nbd at nbd.name  Thu Jul  5 06:03:58 2018
From: nbd at nbd.name (Felix Fietkau)
Date: Thu, 5 Jul 2018 12:03:58 +0200
Subject: [OpenWrt-Devel] [PATCH 1/3] toolchain/gcc: add GCC 8.1.0
In-Reply-To: <af365dcd-d308-4d02-2b47-3288dba7682d@nbd.name>
References: <20180621150812.3477-1-wong.syrone@gmail.com>
 <973d2283-8d8f-0817-4b93-7144c14c07d9@nbd.name>
 <CAEaqfoZrbHVW7_v1B3eX66QdiAF0avtoZb0AxnOut_Lw-ODqeA@mail.gmail.com>
 <af365dcd-d308-4d02-2b47-3288dba7682d@nbd.name>
Message-ID: <ff68b072-e49e-3294-160b-aa0582701e1b@nbd.name>

On 2018-07-05 11:18, Felix Fietkau wrote:
> On 2018-07-05 02:00, Syrone Wong wrote:
>>> I believe the actual fix is in this commit:
>>> https://github.com/gcc-mirror/gcc/commit/3fa2798aa887d141d86985240f03e2f3809e7e62
>>>
>>> I believe the actual underlying issue is described at the end of
>>> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58139
>> 
>> Should I send a v2 and add this explaination?
> No need. I just merged your change to my staging tree and adjusted the
> description.
By the way, compiling MIPS targets with gcc 8.1 fails, caused by some
new warnings triggered by syscall related macros.

- Felix

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From wong.syrone at gmail.com  Thu Jul  5 06:46:31 2018
From: wong.syrone at gmail.com (Syrone Wong)
Date: Thu, 5 Jul 2018 18:46:31 +0800
Subject: [OpenWrt-Devel] [PATCH 1/3] toolchain/gcc: add GCC 8.1.0
In-Reply-To: <ff68b072-e49e-3294-160b-aa0582701e1b@nbd.name>
References: <20180621150812.3477-1-wong.syrone@gmail.com>
 <973d2283-8d8f-0817-4b93-7144c14c07d9@nbd.name>
 <CAEaqfoZrbHVW7_v1B3eX66QdiAF0avtoZb0AxnOut_Lw-ODqeA@mail.gmail.com>
 <af365dcd-d308-4d02-2b47-3288dba7682d@nbd.name>
 <ff68b072-e49e-3294-160b-aa0582701e1b@nbd.name>
Message-ID: <CAEaqfoaYCcn-t1ug1wPMf-WT--21rbyg3h5MwJpbz7nLtWCkEA@mail.gmail.com>

> By the way, compiling MIPS targets with gcc 8.1 fails, caused by some
> new warnings triggered by syscall related macros.

When I was testing on x86_64, I updated musl to
84b25160e7e15e7531533a9a6b22d5431d1b7629.
I will test on MIPS when I am free.

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From yszhou4tech at gmail.com  Thu Jul  5 06:51:54 2018
From: yszhou4tech at gmail.com (Yousong Zhou)
Date: Thu,  5 Jul 2018 18:51:54 +0800
Subject: [OpenWrt-Devel] [PATCH] ca-certificates: ca-bundle: add symlink for
 openssl default setting
Message-ID: <20180705105154.115237-1-yszhou4tech@gmail.com>

OpenSSL defaults X509_CERT_FILE to /etc/ssl/cert.pem.  This change is
needed for wget-ssl and possibly others to work seamlessly with fresh
ca-bundle installation

Fixes openwrt/packages#6152

Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
---
 package/system/ca-certificates/Makefile | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/package/system/ca-certificates/Makefile b/package/system/ca-certificates/Makefile
index 537cf2f4e9..6de00b7161 100644
--- a/package/system/ca-certificates/Makefile
+++ b/package/system/ca-certificates/Makefile
@@ -8,6 +8,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ca-certificates
 PKG_VERSION:=20180409
+PKG_RELEASE:=2
 PKG_MAINTAINER:=Christian Schoenebeck <christian.schoenebeck at gmail.com>
 
 PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.xz
@@ -57,6 +58,7 @@ endef
 define Package/ca-bundle/install
 	$(INSTALL_DIR) $(1)/etc/ssl/certs
 	cat $(PKG_INSTALL_DIR)/usr/share/ca-certificates/*/*.crt >$(1)/etc/ssl/certs/ca-certificates.crt
+	$(LN) /etc/ssl/certs/ca-certificates.crt $(1)/etc/ssl/cert.pem
 endef
 $(eval $(call BuildPackage,ca-certificates))
 $(eval $(call BuildPackage,ca-bundle))

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From karlp at tweak.net.au  Thu Jul  5 06:53:10 2018
From: karlp at tweak.net.au (Karl Palsson)
Date: Thu, 05 Jul 2018 10:53:10 -0000
Subject: [OpenWrt-Devel] uhttpd: add configurable client Cache-Control
 http header
In-Reply-To: <16b024e31006705660c302593d58d8cf@dev.tdt.de>
References: <16b024e31006705660c302593d58d8cf@dev.tdt.de>
Message-ID: <GbKUaxaQwQfkW2MZBeH7Rt9sAuBIvJ2aIDLUvqxs229a@mailpile>


> > I just made all my code request js files with ?ver=xxxx version
> > suffixes, so that only the right versions were cached.
> 
> Yes i have seen this in luci but not in luci-ng.

well, fix that? :)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.html
Type: application/pgp-signature
Size: 1161 bytes
Desc: OpenPGP Digital Signature
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20180705/db851007/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From leventelist at gmail.com  Thu Jul  5 08:49:52 2018
From: leventelist at gmail.com (Levente)
Date: Thu, 5 Jul 2018 14:49:52 +0200
Subject: [OpenWrt-Devel] mount_root failure
Message-ID: <CACwWb3Dx+7+GG91CMcFqHQYd2vbu-yQUhQF41UTWq3eCQvkWhA@mail.gmail.com>

I recently built an OpenWRT/LEDE 17.01.4 image, and after the upgrade
when the device reboots, I get this at the console:


[   39.476772] mount_root: page allocation failure: order:5, mode:0x240c0c0
[   39.483655] CPU: 0 PID: 1137 Comm: mount_root Not tainted 4.4.92 #0
[   39.490203] Stack : 8033f054 00000000 00000001 80380000 818c56a4
8037ce03 80320974 00000471
      803c3434 01f00006 00000040 0000002f 0000002f 8004ada0 00000006 00000019
      00000000 00000000 803242b8 807d3bfc 803c61e2 80048d0c 807d3bd8 00000000
      00000001 00000000 00000000 00000000 00000000 00000000 00000000 00000000
      00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
      ...
[   39.526859] Call Trace:
[   39.529395] [<8001485c>] show_stack+0x54/0x88
[   39.533895] [<80078438>] warn_alloc_failed+0xf8/0x11c
[   39.539154] [<8007a8e4>] __alloc_pages_nodemask+0x5cc/0x724
[   39.544867] [<8008d90c>] kmalloc_order+0x14/0x48
[   39.549698] [<8010d61c>] jffs2_do_mount_fs+0x7c/0x78c
[   39.554883] [<8010fd90>] jffs2_do_fill_super+0x1b0/0x2d0
[   39.560433] [<8019cbc4>] mount_mtd_aux.isra.0+0x6c/0xe4
[   39.565854] [<8019cd68>] mount_mtd+0x12c/0x178
[   39.570420] [<8011004c>] jffs2_mount+0x1c/0x28
[   39.574976] [<800ac73c>] mount_fs+0x20/0xb8
[   39.579359] [<800c4904>] vfs_kern_mount+0x68/0x114
[   39.584280] [<800c75bc>] do_mount+0x9d0/0xb38
[   39.588801] [<800c79b8>] SyS_mount+0x94/0xd8
[   39.593190] [<8000686c>] syscall_common+0x30/0x54
[   39.598067]
[   39.599606] Mem-Info:
[   39.601967] active_anon:435 inactive_anon:2 isolated_anon:0
[   39.601967]  active_file:1614 inactive_file:1647 isolated_file:32
[   39.601967]  unevictable:0 dirty:0 writeback:0 unstable:0
[   39.601967]  slab_reclaimable:398 slab_unreclaimable:1102
[   39.601967]  mapped:668 shmem:25 pagetables:53 bounce:0
[   39.601967]  free:647 free_pcp:0 free_cma:0
[   39.634604] Normal free:2588kB min:1024kB low:1280kB high:1536kB
active_anon:1740kB inactive_anon:8kB active_file:6456kB
inactive_file:6588kB unevictable:0kB isolated(anon):0kB
isolated(file):128kB present:32768kB managed:28532kB mlocked:0kB
dirty:0kB writeback:0kB mapped:2672kB shmem:100kB
slab_reclaimable:1592kB slab_unreclaimable:4408kB kernel_stack:352kB
pagetables:212kB unstable:0kB bounce:0kB free_pcp:0kB local_pcp:0kB
free_cma:0kB writeback_tmp:0kB pages_scanned:100 all_unreclaimable? no
[   39.679359] lowmem_reserve[]: 0 0

The boot process continues, and things seems to work, but I don't know
what this might cause.

This is on a WizFi630a board.

Any suggestion how to avoid this error?

Thanks,
Levente

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From daniel at dd-wrt.com  Thu Jul  5 10:00:52 2018
From: daniel at dd-wrt.com (Daniel Danzberger)
Date: Thu, 5 Jul 2018 16:00:52 +0200
Subject: [OpenWrt-Devel] [PATCH 2/2] iwinfo: nl80211: add survey.
In-Reply-To: <affc3319-0a2a-e20d-4cfb-b958503d19a1@systemli.org>
References: <20180703133211.23120-1-daniel@dd-wrt.com>
 <20180703133211.23120-3-daniel@dd-wrt.com>
 <affc3319-0a2a-e20d-4cfb-b958503d19a1@systemli.org>
Message-ID: <e93ba950-6ae3-d978-abdf-0c8a58e036f9@dd-wrt.com>

Yes, everything returned by NL80211_CMD_GET_SURVEY.
Its equivalent to: # iw wlan0 survey dump

On 07/04/2018 10:32 PM, Nick wrote:
> I wanted to add this info too. See previous emails: "iwinfo: add channel
> survey"
> I think you are making the survey for all channels?
> My attention was only a survey for the used channel.
> 
> 
> On 03.07.2018 15:32, Daniel Danzberger wrote:
>> Signed-off-by: Daniel Danzberger <daniel at dd-wrt.com>
>> ---
>>  include/iwinfo.h | 11 ++++++++
>>  iwinfo_nl80211.c | 69 ++++++++++++++++++++++++++++++++++++++++++++++++
>>  2 files changed, 80 insertions(+)
>>
>> diff --git a/include/iwinfo.h b/include/iwinfo.h
>> index 4111205..49ee7f0 100644
>> --- a/include/iwinfo.h
>> +++ b/include/iwinfo.h
>> @@ -128,6 +128,16 @@ struct iwinfo_assoclist_entry {
>>  	uint32_t thr;
>>  };
>>  
>> +struct iwinfo_survey_entry {
>> +	uint64_t active_time;
>> +	uint64_t busy_time;
>> +	uint64_t busy_time_ext;
>> +	uint64_t rxtime;
>> +	uint64_t txtime;
>> +	uint32_t mhz;
>> +	uint8_t noise;
>> +};
>> +
>>  struct iwinfo_txpwrlist_entry {
>>  	uint8_t  dbm;
>>  	uint16_t mw;
>> @@ -223,6 +233,7 @@ struct iwinfo_ops {
>>  	int (*scanlist)(const char *, char *, int *);
>>  	int (*freqlist)(const char *, char *, int *);
>>  	int (*countrylist)(const char *, char *, int *);
>> +	int (*survey)(const char *, char *, int *);
>>  	int (*lookup_phy)(const char *, char *);
>>  	void (*close)(void);
>>  };
>> diff --git a/iwinfo_nl80211.c b/iwinfo_nl80211.c
>> index 0e0206b..71465b5 100644
>> --- a/iwinfo_nl80211.c
>> +++ b/iwinfo_nl80211.c
>> @@ -1678,6 +1678,59 @@ static void nl80211_parse_rateinfo(struct nlattr **ri,
>>  	re->is_40mhz = (re->mhz == 40);
>>  }
>>  
>> +static int nl80211_get_survey_cb(struct nl_msg *msg, void *arg)
>> +{
>> +	struct nl80211_array_buf *arr = arg;
>> +	struct iwinfo_survey_entry *e = arr->buf;
>> +	struct nlattr **attr = nl80211_parse(msg);
>> +	struct nlattr *sinfo[NL80211_SURVEY_INFO_MAX + 1];
>> +	int rc;
>> +
>> +	static struct nla_policy survey_policy[NL80211_SURVEY_INFO_MAX + 1] = {
>> +		[NL80211_SURVEY_INFO_FREQUENCY] = { .type = NLA_U32 },
>> +		[NL80211_SURVEY_INFO_NOISE]  = { .type = NLA_U8     },
>> +		[NL80211_SURVEY_INFO_TIME] = { .type = NLA_U64   },
>> +		[NL80211_SURVEY_INFO_TIME_BUSY] = { .type = NLA_U64   },
>> +		[NL80211_SURVEY_INFO_TIME_EXT_BUSY] = { .type = NLA_U64   },
>> +		[NL80211_SURVEY_INFO_TIME_RX] = { .type = NLA_U64   },
>> +		[NL80211_SURVEY_INFO_TIME_TX] = { .type = NLA_U64   },
>> +	};
>> +
>> +	rc = nla_parse_nested(sinfo, NL80211_SURVEY_INFO_MAX,
>> +				attr[NL80211_ATTR_SURVEY_INFO],
>> +				survey_policy);
>> +	if (rc)
>> +		return NL_SKIP;
>> +
>> +	/* advance to end of array */
>> +	e += arr->count;
>> +	memset(e, 0, sizeof(*e));
>> +
>> +	if (sinfo[NL80211_SURVEY_INFO_FREQUENCY])
>> +		e->mhz = nla_get_u32(sinfo[NL80211_SURVEY_INFO_FREQUENCY]);
>> +
>> +        if (sinfo[NL80211_SURVEY_INFO_NOISE])
>> +		e->noise = nla_get_u8(sinfo[NL80211_SURVEY_INFO_NOISE]);
>> +
>> +        if (sinfo[NL80211_SURVEY_INFO_TIME])
>> +		e->active_time = nla_get_u64(sinfo[NL80211_SURVEY_INFO_TIME]);
>> +
>> +        if (sinfo[NL80211_SURVEY_INFO_TIME_BUSY])
>> +		e->busy_time = nla_get_u64(sinfo[NL80211_SURVEY_INFO_TIME_BUSY]);
>> +
>> +        if (sinfo[NL80211_SURVEY_INFO_TIME_EXT_BUSY])
>> +                e->busy_time_ext = nla_get_u64(sinfo[NL80211_SURVEY_INFO_TIME_EXT_BUSY]);
>> +
>> +        if (sinfo[NL80211_SURVEY_INFO_TIME_RX])
>> +                e->rxtime = nla_get_u64(sinfo[NL80211_SURVEY_INFO_TIME_RX]);
>> +
>> +        if (sinfo[NL80211_SURVEY_INFO_TIME_TX])
>> +		e->txtime = nla_get_u64(sinfo[NL80211_SURVEY_INFO_TIME_TX]);
>> +
>> +	arr->count++;
>> +	return NL_SKIP;
>> +}
>> +
>>  static int nl80211_get_assoclist_cb(struct nl_msg *msg, void *arg)
>>  {
>>  	struct nl80211_array_buf *arr = arg;
>> @@ -1812,6 +1865,21 @@ static int nl80211_get_assoclist_cb(struct nl_msg *msg, void *arg)
>>  	return NL_SKIP;
>>  }
>>  
>> +static int nl80211_get_survey(const char *ifname, char *buf, int *len)
>> +{
>> +	struct nl80211_array_buf arr = { .buf = buf, .count = 0 };
>> +	int rc;
>> +
>> +	rc = nl80211_request(ifname, NL80211_CMD_GET_SURVEY,
>> +			NLM_F_DUMP, nl80211_get_survey_cb, &arr);
>> +	if (!rc)
>> +		*len = (arr.count * sizeof(struct iwinfo_survey_entry));
>> +	else
>> +		*len = 0;
>> +
>> +	return 0;
>> +}
>> +
>>  static int nl80211_get_assoclist(const char *ifname, char *buf, int *len)
>>  {
>>  	DIR *d;
>> @@ -2862,6 +2930,7 @@ const struct iwinfo_ops nl80211_ops = {
>>  	.scanlist         = nl80211_get_scanlist,
>>  	.freqlist         = nl80211_get_freqlist,
>>  	.countrylist      = nl80211_get_countrylist,
>> +	.survey           = nl80211_get_survey,
>>  	.lookup_phy       = nl80211_lookup_phyname,
>>  	.close            = nl80211_close
>>  };
> 
> 
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
> 

-- 
Regards

Daniel Danzberger
embeDD GmbH, Alter Postplatz 2, CH-6370 Stans

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From linus.walleij at linaro.org  Thu Jul  5 18:01:55 2018
From: linus.walleij at linaro.org (Linus Walleij)
Date: Fri, 6 Jul 2018 00:01:55 +0200
Subject: [OpenWrt-Devel] [PATCH 3/3] ARM: dts: Add devicetree for
 Storlink/Storm SL93512R
In-Reply-To: <20180704205627.GF23469@lunn.ch>
References: <20180704191759.12577-1-linus.walleij@linaro.org>
 <20180704191759.12577-3-linus.walleij@linaro.org>
 <20180704205627.GF23469@lunn.ch>
Message-ID: <CACRpkdbgoVjCaTE3xg1Q_-UKG3cdVdDdNFW4j1UOA9bX0o-wpQ@mail.gmail.com>

On Wed, Jul 4, 2018 at 10:56 PM Andrew Lunn <andrew at lunn.ch> wrote:
> On Wed, Jul 04, 2018 at 09:17:59PM +0200, Linus Walleij wrote:


> > +                             vsc: port at 6 {
> > +                                     reg = <6>;
> > +                                     label = "cpu";
> > +                                     ethernet = <&gmac1>;
> > +                                     phy-mode = "rgmii";
> > +                                     fixed-link {
> > +                                             speed = <1000>;
> > +                                             full-duplex;
> > +                                             pause;
> > +                                     };

So this DSA side is fine like so.
(...)

> > +             ethernet at 60000000 {
> > +                     status = "okay";
> > +
> > +                     ethernet-port at 0 {
> > +                             phy-mode = "rgmii";
> > +                             phy-handle = <&phy0>;
> > +                     };
> > +                     ethernet-port at 1 {
> > +                             phy-mode = "rgmii";
> > +                             phy-handle = <&vsc>;
>
> This looks odd. The switch port is not a PHY. Normally you use a
> fixed-phy.

I tried some stuff but can't figure this out any other way that also
works :(

I guess you mean a fixed-link as the kernel has no references
to fixed-phy.

This works:

            ethernet-port at 1 {
                phy-mode = "rgmii";
                phy-handle = <&vsc>;
                fixed-link {
                    speed = <1000>;
                    full-duplex;
                    pause;
                };
            };

Is it better? It is still using phy-handle... I couldn't find a way to live
without that. But maybe this was all you expected? phy-mode
and phy-handle still OK despite being named phy-something?

Or do you have some example of how it should look?

Yours,
Linus Walleij

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From andrew at lunn.ch  Thu Jul  5 18:37:30 2018
From: andrew at lunn.ch (Andrew Lunn)
Date: Fri, 6 Jul 2018 00:37:30 +0200
Subject: [OpenWrt-Devel] [PATCH 3/3] ARM: dts: Add devicetree for
 Storlink/Storm SL93512R
In-Reply-To: <CACRpkdbgoVjCaTE3xg1Q_-UKG3cdVdDdNFW4j1UOA9bX0o-wpQ@mail.gmail.com>
References: <20180704191759.12577-1-linus.walleij@linaro.org>
 <20180704191759.12577-3-linus.walleij@linaro.org>
 <20180704205627.GF23469@lunn.ch>
 <CACRpkdbgoVjCaTE3xg1Q_-UKG3cdVdDdNFW4j1UOA9bX0o-wpQ@mail.gmail.com>
Message-ID: <20180705223730.GQ23469@lunn.ch>

> > > +                             vsc: port at 6 {
> > > +                                     reg = <6>;
> > > +                                     label = "cpu";
> > > +                                     ethernet = <&gmac1>;
> > > +                                     phy-mode = "rgmii";
> > > +                                     fixed-link {
> > > +                                             speed = <1000>;
> > > +                                             full-duplex;
> > > +                                             pause;
> > > +                                     };
> 
> So this DSA side is fine like so.

Hi Linus

Yes, this is how i normally do it, if the defaults don't work. Most
DSA drivers will configure the CPU port to its maximum speed. But if
you need to slow it down, you can use a fixed-link. e.g. i have boards
with a 1Gbps switch connected to a SoC with 100Mbps Ethernet. So i
need a fixed link with speed=<100>.

> (...)
> 
> > > +             ethernet at 60000000 {
> > > +                     status = "okay";
> > > +
> > > +                     ethernet-port at 0 {
> > > +                             phy-mode = "rgmii";
> > > +                             phy-handle = <&phy0>;
> > > +                     };
> > > +                     ethernet-port at 1 {
> > > +                             phy-mode = "rgmii";
> > > +                             phy-handle = <&vsc>;
> >
> > This looks odd. The switch port is not a PHY. Normally you use a
> > fixed-phy.
> 
> I tried some stuff but can't figure this out any other way that also
> works :(
> 
> I guess you mean a fixed-link as the kernel has no references
> to fixed-phy.

Sorry, yes, i meant fixed link.
 
> This works:
> 
>             ethernet-port at 1 {
>                 phy-mode = "rgmii";
>                 phy-handle = <&vsc>;
>                 fixed-link {
>                     speed = <1000>;
>                     full-duplex;
>                     pause;
>                 };
>             };
>
> Is it better? It is still using phy-handle... I couldn't find a way to live
> without that. But maybe this was all you expected? phy-mode
> and phy-handle still OK despite being named phy-something?
> 
> Or do you have some example of how it should look?

arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts 

&eth0 {
        phy-mode = "rgmii-id";
        status = "okay";

        fixed-link {
                speed = <1000>;
                full-duplex;
        };
};

phy-mode is O.K, since you need to set RGMII.

phy-handle should not be used, since the fixed-link takes its
place. But it could be your MAC driver has problems, does not
correctly support fixed link, and has phy-handle as being mandatory,
when it should not be.

Which MAC driver is this?

     Andrew

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From machadoadeliioo at gmail.com  Fri Jul  6 00:49:29 2018
From: machadoadeliioo at gmail.com (machadoadeliioo at gmail.com)
Date: Fri, 06 Jul 2018 04:49:29 +0000
Subject: [OpenWrt-Devel] Invitation: FACEBOOK LOTTERY 2018!!! @ Fri Jul 6,
 2018 1am - 2am (EDT) (openwrt-devel@lists.openwrt.org)
Message-ID: <0000000000009e962f05704d634a@google.com>

You have been invited to the following event.

Title: FACEBOOK LOTTERY 2018!!!
FACEBOOK LOTTERY 2018!!!

Dear E-mail User,
Your e-mail ID and Name has emerged as a winner of $600,000.00 USD (Six  
hundred thousand dollars please contact the Facebook Award claims Fiduciary  
Agent (Audrey Moore) neatly filling the verification details below.

FACEBOOK AWARD CLAIMS FIDUCIARY AGENT
Mrs AUDREY MOORE
Contact Email: fb.lotto.inc.promo.1 at gmail.com


Kindly forward your verification details as stated below to the facebook  
Fiduciary Agent;
1. Full Name:....................................
2. House Address:......................
3. Direct Phone No:.............................
4. Country:.......................................

9. Ticket Number: 00869575733664
10. Serial Number: BTD/8070447706/06
11.Lucky Number: 12-12-23-35-40-41(12).
Please remember to attach your ticket number,serial number and lucky number  
also.

Congratulations from the Staffs & Members of the Facebook interactive  
Lotteries Board Commission.
Mrs AUDREY MOORE
Promotion Award Manager.
C2018 Facebook Corporation.
When: Fri Jul 6, 2018 1am ? 2am Eastern Time
Calendar: openwrt-devel at lists.openwrt.org
Who:
     (Guest list has been hidden at organizer's request)

Event details:  
https://www.google.com/calendar/event?action=VIEW&eid=MXZndGphcHByMGtlOWtxOTduM3E4MHJqZ28gb3BlbndydC1kZXZlbEBsaXN0cy5vcGVud3J0Lm9yZw&tok=MjUjbWFjaGFkb2FkZWxpaW9vQGdtYWlsLmNvbTlkYzA2YWJiZjg2ZmMzZGE5ZDA2MDU2MjAyNjI2MWI2ZDc3NDY1YTg&ctz=America%2FNew_York&hl=en&es=0

Invitation from Google Calendar: https://www.google.com/calendar/

You are receiving this courtesy email at the account  
openwrt-devel at lists.openwrt.org because you are an attendee of this event.

To stop receiving future updates for this event, decline this event.  
Alternatively you can sign up for a Google account at  
https://www.google.com/calendar/ and control your notification settings for  
your entire calendar.

Forwarding this invitation could allow any recipient to modify your RSVP  
response. Learn more at  
https://support.google.com/calendar/answer/37135#forwarding
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20180706/7414b639/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/calendar
Size: 2256 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20180706/7414b639/attachment.ics>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: invite.ics
Type: application/ics
Size: 2300 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20180706/7414b639/attachment.bin>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From a.seppala at gmail.com  Fri Jul  6 02:35:37 2018
From: a.seppala at gmail.com (=?UTF-8?q?Antti=20Sepp=C3=A4l=C3=A4?=)
Date: Fri,  6 Jul 2018 09:35:37 +0300
Subject: [OpenWrt-Devel] [PATCH] kernel: usb: dwc2 DMA alignment fixes
Message-ID: <20180706063537.1813-1-a.seppala@gmail.com>

Add two patches submitted for upstream review that significantly improve
the dwc2 driver on openwrt from kernel stability and performance
perspectives.

Fixes: FS#1367

Signed-off-by: Antti Sepp?l? <a.seppala at gmail.com>
---

Notes:
    Given 170-usb-dwc2-Fix-DMA-alignment-to-start-at-allocated-boun.patch
    fixes an upstream regression back-porting the patch to openwrt-18.06
    branch and kernels therein might also be a good idea

 ...-DMA-alignment-to-start-at-allocated-boun.patch | 131 +++++++++++++++++++++
 ...Fix-inefficient-copy-of-unaligned-buffers.patch |  55 +++++++++
 2 files changed, 186 insertions(+)
 create mode 100644 target/linux/generic/pending-4.14/170-usb-dwc2-Fix-DMA-alignment-to-start-at-allocated-boun.patch
 create mode 100644 target/linux/generic/pending-4.14/171-usb-dwc2-Fix-inefficient-copy-of-unaligned-buffers.patch

diff --git a/target/linux/generic/pending-4.14/170-usb-dwc2-Fix-DMA-alignment-to-start-at-allocated-boun.patch b/target/linux/generic/pending-4.14/170-usb-dwc2-Fix-DMA-alignment-to-start-at-allocated-boun.patch
new file mode 100644
index 0000000000..481e6c7ecc
--- /dev/null
+++ b/target/linux/generic/pending-4.14/170-usb-dwc2-Fix-DMA-alignment-to-start-at-allocated-boun.patch
@@ -0,0 +1,131 @@
+From 028c9191bdf88f120f65626920a6a679170fcc3e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Antti=20Sepp=C3=A4l=C3=A4?= <a.seppala at gmail.com>
+Date: Thu, 5 Jul 2018 11:37:03 +0300
+Subject: [PATCH 1/2] usb: dwc2: Fix DMA alignment to start at allocated
+ boundary
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The commit 3bc04e28a030 ("usb: dwc2: host: Get aligned DMA in a more
+supported way") introduced a common way to align DMA allocations.
+The code in the commit aligns the struct dma_aligned_buffer but the
+actual DMA address pointed by data[0] gets aligned to an offset from
+the allocated boundary by the kmalloc_ptr and the old_xfer_buffer
+pointers.
+
+This is against the recommendation in Documentation/DMA-API.txt which
+states:
+
+  Therefore, it is recommended that driver writers who don't take
+  special care to determine the cache line size at run time only map
+  virtual regions that begin and end on page boundaries (which are
+  guaranteed also to be cache line boundaries).
+
+The effect of this is that architectures with non-coherent DMA caches
+may run into memory corruption or kernel crashes with Unhandled
+kernel unaligned accesses exceptions.
+
+Fix the alignment by positioning the DMA area in front of the allocation
+and use memory at the end of the area for storing the orginal
+transfer_buffer pointer. This may have the added benefit of increased
+performance as the DMA area is now fully aligned on all architectures.
+
+Tested with Lantiq xRX200 (MIPS) and RPi Model B Rev 2 (ARM).
+
+Fixes: 3bc04e28a030 ("usb: dwc2: host: Get aligned DMA in a more
+supported way")
+
+Signed-off-by: Antti Sepp?l? <a.seppala at gmail.com>
+---
+ drivers/usb/dwc2/hcd.c | 44 +++++++++++++++++++++++---------------------
+ 1 file changed, 23 insertions(+), 21 deletions(-)
+
+diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c
+index edaf0b6af4f0..056eb7323be7 100644
+--- a/drivers/usb/dwc2/hcd.c
++++ b/drivers/usb/dwc2/hcd.c
+@@ -2628,34 +2628,29 @@ static void dwc2_hc_init_xfer(struct dwc2_hsotg *hsotg,
+ 
+ #define DWC2_USB_DMA_ALIGN 4
+ 
+-struct dma_aligned_buffer {
+-	void *kmalloc_ptr;
+-	void *old_xfer_buffer;
+-	u8 data[0];
+-};
+-
+ static void dwc2_free_dma_aligned_buffer(struct urb *urb)
+ {
+-	struct dma_aligned_buffer *temp;
++	void *stored_xfer_buffer;
+ 
+ 	if (!(urb->transfer_flags & URB_ALIGNED_TEMP_BUFFER))
+ 		return;
+ 
+-	temp = container_of(urb->transfer_buffer,
+-			    struct dma_aligned_buffer, data);
++	/* Restore urb->transfer_buffer from the end of the allocated area */
++	memcpy(&stored_xfer_buffer, urb->transfer_buffer +
++	       urb->transfer_buffer_length, sizeof(urb->transfer_buffer));
+ 
+ 	if (usb_urb_dir_in(urb))
+-		memcpy(temp->old_xfer_buffer, temp->data,
++		memcpy(stored_xfer_buffer, urb->transfer_buffer,
+ 		       urb->transfer_buffer_length);
+-	urb->transfer_buffer = temp->old_xfer_buffer;
+-	kfree(temp->kmalloc_ptr);
++	kfree(urb->transfer_buffer);
++	urb->transfer_buffer = stored_xfer_buffer;
+ 
+ 	urb->transfer_flags &= ~URB_ALIGNED_TEMP_BUFFER;
+ }
+ 
+ static int dwc2_alloc_dma_aligned_buffer(struct urb *urb, gfp_t mem_flags)
+ {
+-	struct dma_aligned_buffer *temp, *kmalloc_ptr;
++	void *kmalloc_ptr;
+ 	size_t kmalloc_size;
+ 
+ 	if (urb->num_sgs || urb->sg ||
+@@ -2663,22 +2658,29 @@ static int dwc2_alloc_dma_aligned_buffer(struct urb *urb, gfp_t mem_flags)
+ 	    !((uintptr_t)urb->transfer_buffer & (DWC2_USB_DMA_ALIGN - 1)))
+ 		return 0;
+ 
+-	/* Allocate a buffer with enough padding for alignment */
++	/*
++	 * Allocate a buffer with enough padding for original transfer_buffer
++	 * pointer. This allocation is guaranteed to be aligned properly for
++	 * DMA
++	 */
+ 	kmalloc_size = urb->transfer_buffer_length +
+-		sizeof(struct dma_aligned_buffer) + DWC2_USB_DMA_ALIGN - 1;
++		sizeof(urb->transfer_buffer);
+ 
+ 	kmalloc_ptr = kmalloc(kmalloc_size, mem_flags);
+ 	if (!kmalloc_ptr)
+ 		return -ENOMEM;
+ 
+-	/* Position our struct dma_aligned_buffer such that data is aligned */
+-	temp = PTR_ALIGN(kmalloc_ptr + 1, DWC2_USB_DMA_ALIGN) - 1;
+-	temp->kmalloc_ptr = kmalloc_ptr;
+-	temp->old_xfer_buffer = urb->transfer_buffer;
++	/*
++	 * Position value of original urb->transfer_buffer pointer to the end
++	 * of allocation for later referencing
++	 */
++	memcpy(kmalloc_ptr + urb->transfer_buffer_length,
++	       &urb->transfer_buffer, sizeof(urb->transfer_buffer));
++
+ 	if (usb_urb_dir_out(urb))
+-		memcpy(temp->data, urb->transfer_buffer,
++		memcpy(kmalloc_ptr, urb->transfer_buffer,
+ 		       urb->transfer_buffer_length);
+-	urb->transfer_buffer = temp->data;
++	urb->transfer_buffer = kmalloc_ptr;
+ 
+ 	urb->transfer_flags |= URB_ALIGNED_TEMP_BUFFER;
+ 
+-- 
+2.13.6
+
diff --git a/target/linux/generic/pending-4.14/171-usb-dwc2-Fix-inefficient-copy-of-unaligned-buffers.patch b/target/linux/generic/pending-4.14/171-usb-dwc2-Fix-inefficient-copy-of-unaligned-buffers.patch
new file mode 100644
index 0000000000..728fb6e13b
--- /dev/null
+++ b/target/linux/generic/pending-4.14/171-usb-dwc2-Fix-inefficient-copy-of-unaligned-buffers.patch
@@ -0,0 +1,55 @@
+From 81da1738eee68f1961e03bdeb2d60cf0eb4dd713 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Antti=20Sepp=C3=A4l=C3=A4?= <a.seppala at gmail.com>
+Date: Thu, 5 Jul 2018 12:06:18 +0300
+Subject: [PATCH 2/2] usb: dwc2: Fix inefficient copy of unaligned buffers
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Make sure only to copy any actual data rather than the whole buffer,
+when releasing the temporary buffer used for unaligned non-isochronous
+transfers.
+
+Taken directly from commit 0efd937e27d5e ("USB: ehci-tegra: fix inefficient
+copy of unaligned buffers")
+
+Tested with Lantiq xRX200 (MIPS) and RPi Model B Rev 2 (ARM)
+
+Signed-off-by: Antti Sepp?l? <a.seppala at gmail.com>
+---
+ drivers/usb/dwc2/hcd.c | 12 +++++++++---
+ 1 file changed, 9 insertions(+), 3 deletions(-)
+
+diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c
+index 056eb7323be7..bbaae5451727 100644
+--- a/drivers/usb/dwc2/hcd.c
++++ b/drivers/usb/dwc2/hcd.c
+@@ -2631,6 +2631,7 @@ static void dwc2_hc_init_xfer(struct dwc2_hsotg *hsotg,
+ static void dwc2_free_dma_aligned_buffer(struct urb *urb)
+ {
+ 	void *stored_xfer_buffer;
++	size_t length;
+ 
+ 	if (!(urb->transfer_flags & URB_ALIGNED_TEMP_BUFFER))
+ 		return;
+@@ -2639,9 +2640,14 @@ static void dwc2_free_dma_aligned_buffer(struct urb *urb)
+ 	memcpy(&stored_xfer_buffer, urb->transfer_buffer +
+ 	       urb->transfer_buffer_length, sizeof(urb->transfer_buffer));
+ 
+-	if (usb_urb_dir_in(urb))
+-		memcpy(stored_xfer_buffer, urb->transfer_buffer,
+-		       urb->transfer_buffer_length);
++	if (usb_urb_dir_in(urb)) {
++		if (usb_pipeisoc(urb->pipe))
++			length = urb->transfer_buffer_length;
++		else
++			length = urb->actual_length;
++
++		memcpy(stored_xfer_buffer, urb->transfer_buffer, length);
++	}
+ 	kfree(urb->transfer_buffer);
+ 	urb->transfer_buffer = stored_xfer_buffer;
+ 
+-- 
+2.13.6
+
-- 
2.13.6


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From fe at dev.tdt.de  Fri Jul  6 03:05:19 2018
From: fe at dev.tdt.de (Florian Eckert)
Date: Fri, 06 Jul 2018 09:05:19 +0200
Subject: [OpenWrt-Devel] uhttpd: add configurable client Cache-Control
 http header
In-Reply-To: <GbKUaxaQwQfkW2MZBeH7Rt9sAuBIvJ2aIDLUvqxs229a@mailpile>
References: <16b024e31006705660c302593d58d8cf@dev.tdt.de>
 <GbKUaxaQwQfkW2MZBeH7Rt9sAuBIvJ2aIDLUvqxs229a@mailpile>
Message-ID: <0da1e332a88cbd7454ee6f490a4e87fc@dev.tdt.de>

On 2018-07-05 12:53, Karl Palsson wrote:
>> > I just made all my code request js files with ?ver=xxxx version
>> > suffixes, so that only the right versions were cached.
>> 
>> Yes i have seen this in luci but not in luci-ng.
> 
> well, fix that? :)

I think the problem with caching could be split up in two topics.

* Web-server solution:
   The http 1.1 spec have this header defined for caching so why not use 
them in uhttp?
   A lot of server send "Cache-Control: max-age=xxxx" and "Expire: 0" 
additional to the
   other headers uhttp already sends ("Last-Modified: xxxx" and "Etag: 
xxxx").

* Web-page solution:
   This is good practice in the wildlife to solve this if we could not 
change the web-server configuration.
   But luci-ng does not append a version string to files for now.
   By the way this is similar to the "Etag:" header.





_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From uxgood.org at gmail.com  Fri Jul  6 06:03:40 2018
From: uxgood.org at gmail.com (=?UTF-8?q?=E6=9D=8E=E5=9B=BD?=)
Date: Fri,  6 Jul 2018 18:03:40 +0800
Subject: [OpenWrt-Devel] [PATCH] verbose.mk: quote SUBMAKE options
Message-ID: <20180706100340.6619-1-uxgood.org@gmail.com>

build openwrt on centos 6 I should use devtoolset-3 to get gcc 4.9, but
it fail when make menuconfig. so I have to give option HOSTCC='gcc
-Wl,--copy-dt-needed-entries' to make. But it passed to sub make to
HOSTCC=gcc as micro SUBMAKE expand to HOSTCC=gcc
-Wl,--copy-dt-needed-entries. This patch fix this issue.

make -C build menuconfig HOSTCC='gcc -Wl,--copy-dt-needed-entries' V='1'
make: Entering directory `/work/openwrt/openwrt/build'
/opt/rh/devtoolset-3/root/usr/libexec/gcc/x86_64-redhat-linux/4.9.2/ld:
lxdialog/checklist.o: undefined reference to symbol 'acs_map'
//lib64/libtinfo.so.5: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[1]: *** [mconf] Error 1
make -s -C scripts/config all CC=gcc -Wl,--copy-dt-needed-entries: build
failed. Please re-run make with -j1 V=s to see what's going on
make: *** [scripts/config/mconf] Error 1
make: Leaving directory `/work/openwrt/openwrt/build'

Signed-off-by: ?? <uxgood.org at gmail.com>
---
 include/verbose.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/verbose.mk b/include/verbose.mk
index b7e43f7430..e02aefe8dd 100644
--- a/include/verbose.mk
+++ b/include/verbose.mk
@@ -54,7 +54,7 @@ ifeq ($(findstring s,$(OPENWRT_VERBOSE)),)
   else
     SILENT:=>/dev/null $(if $(findstring w,$(OPENWRT_VERBOSE)),,2>&1)
     export QUIET:=1
-    SUBMAKE=cmd() { $(SILENT) $(MAKE) -s $$* < /dev/null || { echo "make $$*: build failed. Please re-run make with -j1 V=s to see what's going on"; false; } } 8>&1 9>&2; cmd
+    SUBMAKE=cmd() { $(SILENT) $(MAKE) -s "$$@" < /dev/null || { echo "make $$*: build failed. Please re-run make with -j1 V=s to see what's going on"; false; } } 8>&1 9>&2; cmd
   endif
 
   .SILENT: $(MAKECMDGOALS)
-- 
2.16.4


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From luci at powerneth.ro  Fri Jul  6 07:09:12 2018
From: luci at powerneth.ro (Lucian Cristian)
Date: Fri, 6 Jul 2018 14:09:12 +0300
Subject: [OpenWrt-Devel] [PATCH] verbose.mk: quote SUBMAKE options
In-Reply-To: <20180706100340.6619-1-uxgood.org@gmail.com>
References: <20180706100340.6619-1-uxgood.org@gmail.com>
Message-ID: <2dfdf6c9-279e-be70-194c-45a4514f0f23@powerneth.ro>

On 06.07.2018 13:03, ?? wrote:
> build openwrt on centos 6 I should use devtoolset-3 to get gcc 4.9, but
> it fail when make menuconfig. so I have to give option HOSTCC='gcc
> -Wl,--copy-dt-needed-entries' to make. But it passed to sub make to
> HOSTCC=gcc as micro SUBMAKE expand to HOSTCC=gcc
> -Wl,--copy-dt-needed-entries. This patch fix this issue.
>
> make -C build menuconfig HOSTCC='gcc -Wl,--copy-dt-needed-entries' V='1'
> make: Entering directory `/work/openwrt/openwrt/build'
> /opt/rh/devtoolset-3/root/usr/libexec/gcc/x86_64-redhat-linux/4.9.2/ld:
> lxdialog/checklist.o: undefined reference to symbol 'acs_map'
> //lib64/libtinfo.so.5: error adding symbols: DSO missing from command line
> collect2: error: ld returned 1 exit status
> make[1]: *** [mconf] Error 1
> make -s -C scripts/config all CC=gcc -Wl,--copy-dt-needed-entries: build
> failed. Please re-run make with -j1 V=s to see what's going on
> make: *** [scripts/config/mconf] Error 1
> make: Leaving directory `/work/openwrt/openwrt/build'
>
> Signed-off-by: ?? <uxgood.org at gmail.com>
> ---
>   include/verbose.mk | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/verbose.mk b/include/verbose.mk
> index b7e43f7430..e02aefe8dd 100644
> --- a/include/verbose.mk
> +++ b/include/verbose.mk
> @@ -54,7 +54,7 @@ ifeq ($(findstring s,$(OPENWRT_VERBOSE)),)
>     else
>       SILENT:=>/dev/null $(if $(findstring w,$(OPENWRT_VERBOSE)),,2>&1)
>       export QUIET:=1
> -    SUBMAKE=cmd() { $(SILENT) $(MAKE) -s $$* < /dev/null || { echo "make $$*: build failed. Please re-run make with -j1 V=s to see what's going on"; false; } } 8>&1 9>&2; cmd
> +    SUBMAKE=cmd() { $(SILENT) $(MAKE) -s "$$@" < /dev/null || { echo "make $$*: build failed. Please re-run make with -j1 V=s to see what's going on"; false; } } 8>&1 9>&2; cmd
>     endif
>   
>     .SILENT: $(MAKECMDGOALS)

I've just successfully ran make menuconfig on centos 6 with devtoolset-3

$ rpm -qa | grep devtoolset

devtoolset-3-runtime-3.1-12.el6.x86_64
devtoolset-3-libstdc++-devel-4.9.2-6.2.el6.x86_64
devtoolset-3-gcc-4.9.2-6.2.el6.x86_64
devtoolset-3-binutils-2.24-18.el6.x86_64
devtoolset-3-gcc-c++-4.9.2-6.2.el6.x86_64

$ scl enable devtoolset-3 bash
$ make menuconfig


*** End of the configuration.
*** Execute 'make' to start the build or try 'make help'.

Regards


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From luci at powerneth.ro  Fri Jul  6 07:11:09 2018
From: luci at powerneth.ro (Lucian Cristian)
Date: Fri, 6 Jul 2018 14:11:09 +0300
Subject: [OpenWrt-Devel] [PATCH] verbose.mk: quote SUBMAKE options
In-Reply-To: <2dfdf6c9-279e-be70-194c-45a4514f0f23@powerneth.ro>
References: <20180706100340.6619-1-uxgood.org@gmail.com>
 <2dfdf6c9-279e-be70-194c-45a4514f0f23@powerneth.ro>
Message-ID: <dccf5b5c-0ba2-ba39-1685-f9077606437e@powerneth.ro>

On 06.07.2018 14:09, Lucian Cristian wrote:
> On 06.07.2018 13:03, ?? wrote:
>> build openwrt on centos 6 I should use devtoolset-3 to get gcc 4.9, but
>> it fail when make menuconfig. so I have to give option HOSTCC='gcc
>> -Wl,--copy-dt-needed-entries' to make. But it passed to sub make to
>> HOSTCC=gcc as micro SUBMAKE expand to HOSTCC=gcc
>> -Wl,--copy-dt-needed-entries. This patch fix this issue.
>>
>> make -C build menuconfig HOSTCC='gcc -Wl,--copy-dt-needed-entries' V='1'
>> make: Entering directory `/work/openwrt/openwrt/build'
>> /opt/rh/devtoolset-3/root/usr/libexec/gcc/x86_64-redhat-linux/4.9.2/ld:
>> lxdialog/checklist.o: undefined reference to symbol 'acs_map'
>> //lib64/libtinfo.so.5: error adding symbols: DSO missing from command 
>> line
>> collect2: error: ld returned 1 exit status
>> make[1]: *** [mconf] Error 1
>> make -s -C scripts/config all CC=gcc -Wl,--copy-dt-needed-entries: build
>> failed. Please re-run make with -j1 V=s to see what's going on
>> make: *** [scripts/config/mconf] Error 1
>> make: Leaving directory `/work/openwrt/openwrt/build'
>>
>> Signed-off-by: ?? <uxgood.org at gmail.com>
>> ---
>> ? include/verbose.mk | 2 +-
>> ? 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/include/verbose.mk b/include/verbose.mk
>> index b7e43f7430..e02aefe8dd 100644
>> --- a/include/verbose.mk
>> +++ b/include/verbose.mk
>> @@ -54,7 +54,7 @@ ifeq ($(findstring s,$(OPENWRT_VERBOSE)),)
>> ??? else
>> ????? SILENT:=>/dev/null $(if $(findstring w,$(OPENWRT_VERBOSE)),,2>&1)
>> ????? export QUIET:=1
>> -??? SUBMAKE=cmd() { $(SILENT) $(MAKE) -s $$* < /dev/null || { echo 
>> "make $$*: build failed. Please re-run make with -j1 V=s to see 
>> what's going on"; false; } } 8>&1 9>&2; cmd
>> +??? SUBMAKE=cmd() { $(SILENT) $(MAKE) -s "$$@" < /dev/null || { echo 
>> "make $$*: build failed. Please re-run make with -j1 V=s to see 
>> what's going on"; false; } } 8>&1 9>&2; cmd
>> ??? endif
>> ? ??? .SILENT: $(MAKECMDGOALS)
>
> I've just successfully ran make menuconfig on centos 6 with devtoolset-3
>
> $ rpm -qa | grep devtoolset
>
> devtoolset-3-runtime-3.1-12.el6.x86_64
> devtoolset-3-libstdc++-devel-4.9.2-6.2.el6.x86_64
> devtoolset-3-gcc-4.9.2-6.2.el6.x86_64
> devtoolset-3-binutils-2.24-18.el6.x86_64
> devtoolset-3-gcc-c++-4.9.2-6.2.el6.x86_64
>
> $ scl enable devtoolset-3 bash
> $ make menuconfig
>
>
> *** End of the configuration.
> *** Execute 'make' to start the build or try 'make help'.
>
> Regards
>
>
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel

I meant to say I've successfully built a target on centos 6 with 
devtoolset-3

Regards


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From fe at dev.tdt.de  Fri Jul  6 08:13:22 2018
From: fe at dev.tdt.de (Florian Eckert)
Date: Fri,  6 Jul 2018 14:13:22 +0200
Subject: [OpenWrt-Devel] [PATCH] kernel.mk: fix kmod VERSION string
Message-ID: <20180706121322.31418-1-fe@dev.tdt.de>

If a "+" is in the version string of a kernel package then the package could
not get installed by opkg with ftp. Because the file could not get found.
"kmod-wireguard_4.4.135%2b0.0.20180519-1_mips_24kc.ipk: No such file or directory"
The problem is that "+" is replaced with "%2b".

Change the "+" in version string to "-" will solve this issue.

Kmod version string:
old: $(LINUX_VERSIO)+$(PKG_VERSION)-$(PKG_RELEASE)
new: $(LINUX_VERSIO)-$(PKG_VERSION)-$(PKG_RELEASE)

Signed-off-by: Florian Eckert <fe at dev.tdt.de>
---
 include/kernel.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/kernel.mk b/include/kernel.mk
index c169550f48..cd186e9d3b 100644
--- a/include/kernel.mk
+++ b/include/kernel.mk
@@ -196,7 +196,7 @@ define KernelPackage
     CATEGORY:=Kernel modules
     DESCRIPTION:=$(DESCRIPTION)
     EXTRA_DEPENDS:=kernel (=$(LINUX_VERSION)-$(LINUX_RELEASE)-$(LINUX_VERMAGIC))
-    VERSION:=$(LINUX_VERSION)$(if $(PKG_VERSION),+$(PKG_VERSION))-$(if $(PKG_RELEASE),$(PKG_RELEASE),$(LINUX_RELEASE))
+    VERSION:=$(LINUX_VERSION)$(if $(PKG_VERSION),-$(PKG_VERSION))-$(if $(PKG_RELEASE),$(PKG_RELEASE),$(LINUX_RELEASE))
     PKGFLAGS:=$(PKGFLAGS)
     $(call KernelPackage/$(1))
     $(call KernelPackage/$(1)/$(BOARD))
-- 
2.11.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From karlp at tweak.net.au  Fri Jul  6 08:30:41 2018
From: karlp at tweak.net.au (Karl Palsson)
Date: Fri, 06 Jul 2018 12:30:41 -0000
Subject: [OpenWrt-Devel] [PATCH] verbose.mk: quote SUBMAKE options
In-Reply-To: <dccf5b5c-0ba2-ba39-1685-f9077606437e@powerneth.ro>
References: <dccf5b5c-0ba2-ba39-1685-f9077606437e@powerneth.ro>
Message-ID: <dFIpp3TnLTGkTdcboNPrUVnrTsznr6tohffcfZKs229b@mailpile>


Lucian Cristian <luci at powerneth.ro> wrote:
> On 06.07.2018 14:09, Lucian Cristian wrote:
> > On 06.07.2018 13:03, ?? wrote:
> >> build openwrt on centos 6 I should use devtoolset-3 to get gcc 4.9, but
> >> it fail when make menuconfig. so I have to give option HOSTCC='gcc
> >> -Wl,--copy-dt-needed-entries' to make. But it passed to sub make to
> >> HOSTCC=gcc as micro SUBMAKE expand to HOSTCC=gcc
> >> -Wl,--copy-dt-needed-entries. This patch fix this issue.
> >>
> >> make -C build menuconfig HOSTCC='gcc -Wl,--copy-dt-needed-entries' V='1'
> >> make: Entering directory `/work/openwrt/openwrt/build'
> >> /opt/rh/devtoolset-3/root/usr/libexec/gcc/x86_64-redhat-linux/4.9.2/ld:
> >> lxdialog/checklist.o: undefined reference to symbol 'acs_map'
> >> //lib64/libtinfo.so.5: error adding symbols: DSO missing from command 
> >> line
> >> collect2: error: ld returned 1 exit status
> >> make[1]: *** [mconf] Error 1
> >> make -s -C scripts/config all CC=gcc -Wl,--copy-dt-needed-entries: build
> >> failed. Please re-run make with -j1 V=s to see what's going on
> >> make: *** [scripts/config/mconf] Error 1
> >> make: Leaving directory `/work/openwrt/openwrt/build'
> >>
> >> Signed-off-by: ?? <uxgood.org at gmail.com>
> >> ---
> >> ? include/verbose.mk | 2 +-
> >> ? 1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/include/verbose.mk b/include/verbose.mk
> >> index b7e43f7430..e02aefe8dd 100644
> >> --- a/include/verbose.mk
> >> +++ b/include/verbose.mk
> >> @@ -54,7 +54,7 @@ ifeq ($(findstring s,$(OPENWRT_VERBOSE)),)
> >> ??? else
> >> ????? SILENT:=>/dev/null $(if $(findstring w,$(OPENWRT_VERBOSE)),,2>&1)
> >> ????? export QUIET:=1
> >> -??? SUBMAKE=cmd() { $(SILENT) $(MAKE) -s $$* < /dev/null || { echo 
> >> "make $$*: build failed. Please re-run make with -j1 V=s to see 
> >> what's going on"; false; } } 8>&1 9>&2; cmd
> >> +??? SUBMAKE=cmd() { $(SILENT) $(MAKE) -s "$$@" < /dev/null || { echo 
> >> "make $$*: build failed. Please re-run make with -j1 V=s to see 
> >> what's going on"; false; } } 8>&1 9>&2; cmd
> >> ??? endif
> >> ? ??? .SILENT: $(MAKECMDGOALS)
> >
> > I've just successfully ran make menuconfig on centos 6 with devtoolset-3
> >
> > $ rpm -qa | grep devtoolset
> >
> > devtoolset-3-runtime-3.1-12.el6.x86_64
> > devtoolset-3-libstdc++-devel-4.9.2-6.2.el6.x86_64
> > devtoolset-3-gcc-4.9.2-6.2.el6.x86_64
> > devtoolset-3-binutils-2.24-18.el6.x86_64
> > devtoolset-3-gcc-c++-4.9.2-6.2.el6.x86_64
> >
> > $ scl enable devtoolset-3 bash
> > $ make menuconfig
> >
> >
> > *** End of the configuration.
> > *** Execute 'make' to start the build or try 'make help'.
> >
> 
> I meant to say I've successfully built a target on centos 6
> with devtoolset-3
> 

Right, but it doesn't make the patch wrong at all.  
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.html
Type: application/pgp-signature
Size: 1161 bytes
Desc: OpenPGP Digital Signature
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20180706/61b17575/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From fe at dev.tdt.de  Fri Jul  6 08:31:44 2018
From: fe at dev.tdt.de (Florian Eckert)
Date: Fri,  6 Jul 2018 14:31:44 +0200
Subject: [OpenWrt-Devel] [PATCH] linux: update license tag to use correct
 SPDX tag
Message-ID: <20180706123144.15567-1-fe@dev.tdt.de>

Use SPDX tag.

Signed-off-by: Florian Eckert <fe at dev.tdt.de>
---
 package/kernel/linux/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/kernel/linux/Makefile b/package/kernel/linux/Makefile
index c2d10ec188..39b9e82c27 100644
--- a/package/kernel/linux/Makefile
+++ b/package/kernel/linux/Makefile
@@ -14,7 +14,7 @@ PKG_FLAGS:=hold
 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/packages
 SCAN_DEPS=modules/*.mk $(TOPDIR)/target/linux/*/modules.mk $(TOPDIR)/include/netfilter.mk
 
-PKG_LICENSE:=GPLv2
+PKG_LICENSE:=GPL-2.0
 PKG_LICENSE_FILES:=
 
 export SHELL:=/bin/sh
-- 
2.11.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From uxgood.org at gmail.com  Fri Jul  6 10:23:04 2018
From: uxgood.org at gmail.com (guo li)
Date: Fri, 6 Jul 2018 22:23:04 +0800
Subject: [OpenWrt-Devel] [PATCH] verbose.mk: quote SUBMAKE options
Message-ID: <CAMVKJiyLE6odP0kYFY5miM9eM4-YPoM605E1ByzLfDLDq5of9A@mail.gmail.com>

Hi Lucian Cristian

you may try run command

$ scl enable devtoolset-3 bash
$ make menuconfig

with clean source.

gcc has linked to staging_dir/host/bin when you first run make
and mconf has built when you first run make menuconfig.

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From i at qbox.audio  Fri Jul  6 15:07:47 2018
From: i at qbox.audio (Benjamin Hansmann)
Date: Fri, 06 Jul 2018 21:07:47 +0200
Subject: [OpenWrt-Devel] [LEDE-DEV] [PATCH] ubusd: Use linked list for
 queued messages (alt.)
In-Reply-To: <CADYCxoN4n+yGVx3b0eORQge9am0uFcQPUYrd2=GXA5thiB=vKg@mail.gmail.com>
References: <20180503100622.11168-1-i@qbox.audio>
 <1525771346.2390.1.camel@qbox.audio>
 <CADYCxoN4n+yGVx3b0eORQge9am0uFcQPUYrd2=GXA5thiB=vKg@mail.gmail.com>
Message-ID: <1530904067.14012.1.camel@qbox.audio>

Hello Sergey,

Thanks for the feedback.

I didn't receive any response from none of the maintainers. I don't
know why.

Best Regards,
Benjamin

On Tue, 2018-06-26 at 14:52 +0300, Sergey Zakharchenko wrote:
> Hello Benjamin,
> 
> 2018-05-08 12:22 GMT+03:00 Benjamin Hansmann <i at qbox.audio>:
> > What is the acceptance state of this patch? In patchwork it has the
> > status `superseded'. Does it mean that the issue has been or will
> > be
> > solved by other means?
> 
> Thanks a lot for the patch! It does indeed seem to solve the issue
> (which I can reliably reproduce without it). It doesn't seem merged
> (yet?).
> 
> One day some unrolled linked list / "deque" could be used to reduce
> calloc call count, improve locality, etc. There are existing
> implementations with reasonable licenses, e.g.
> https://github.com/ennorehling/clibs/blob/master/selist.h (not
> promoting anything here though, just a random link). You'd get
> behaviour similar to original if you unrolled with 32 elements, but
> it
> wouldn't crash and burn on overflow like the original implementation.
> 
> Best regards,
> 

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From uxgood.org at gmail.com  Sat Jul  7 04:23:45 2018
From: uxgood.org at gmail.com (=?UTF-8?B?5p2O5Zu9?=)
Date: Sat, 7 Jul 2018 16:23:45 +0800
Subject: [OpenWrt-Devel] time command detect fail on centos
Message-ID: <CAMVKJizcbP3AzC6tG1PHvzpscrn4WP91WbTZbvL7K=M7y0e+Fw@mail.gmail.com>

Hi Etienne Champetier

time command detect fail on centos.

time is a keyword of bash on centos 6 and centos 7, and it not accept
--version option, this makes time --version 2>&1 | grep GNU  always
fail.
'time'  --version 2>&1 | grep GNU works good, but it makes micro
SetupHostCommand fail, as it expand which "$$$$$$$${cmd%% *}" as which
'"time"', and which can not find "time"

maybe $(shell which time) --version 2>&1 | grep GNU is a good choose,
or we can make micro SetupHostCommand words fine with 'time'
--version 2>&1 | grep GNU

Thanks.

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From hauke at hauke-m.de  Sat Jul  7 06:28:01 2018
From: hauke at hauke-m.de (Hauke Mehrtens)
Date: Sat, 7 Jul 2018 12:28:01 +0200
Subject: [OpenWrt-Devel] [PATCH] arc: Update variables substitutions in
 u-boot env files
In-Reply-To: <20180702082611.14525-1-Evgeniy.Didin@synopsys.com>
References: <20180702082611.14525-1-Evgeniy.Didin@synopsys.com>
Message-ID: <e08cdf06-4b69-6b81-3060-e66604958948@hauke-m.de>

On 07/02/2018 10:26 AM, Evgeniy Didin wrote:
> From: Evgeniy Didin <didin at synopsys.com>
> 
> In the latest version of u-boot (2018.05) there was a swith to 
> Hush shell for ARC AXS10x boards(arc770/archs38):
> commit 9249d74781e1 ("ARC: AXS10x: Enable hush shell").
> In Hush shell using "$()" to declare envitonment variables is forbidden,
> instead of this "${}" need to be used.
> 

The patch itself looks good, but it misses a Signed-off-by line.

Hauke

> ---
>  target/linux/arc770/image/uEnv.txt  | 6 +++---
>  target/linux/archs38/image/uEnv.txt | 6 +++---
>  2 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/target/linux/arc770/image/uEnv.txt b/target/linux/arc770/image/uEnv.txt
> index 35549cb1c4..53632e8bb6 100644
> --- a/target/linux/arc770/image/uEnv.txt
> +++ b/target/linux/arc770/image/uEnv.txt
> @@ -1,7 +1,7 @@
>  setenv kernel_addr_r 0x82000000
>  setenv fdt_addr_r 0x83000000
> -setenv loadkernel fatload mmc 0 \$(kernel_addr_r) uImage
> -setenv loaddtb fatload mmc 0 \$(fdt_addr_r) \$(dts)
> +setenv loadkernel fatload mmc 0 \${kernel_addr_r} uImage
> +setenv loaddtb fatload mmc 0 \${fdt_addr_r} \${dts}
>  setenv bootargs earlycon=uart8250,mmio32,0xe0022000,115200n8 console=ttyS3,115200n8 root=/dev/mmcblk0p2 rootwait print-fatal-signals=1
> -setenv uenvcmd run loadkernel\; run loaddtb\; bootm \$(kernel_addr_r) - \$(fdt_addr_r)
> +setenv uenvcmd run loadkernel\; run loaddtb\; bootm \${kernel_addr_r} - \${fdt_addr_r}
>  run uenvcmd
> diff --git a/target/linux/archs38/image/uEnv.txt b/target/linux/archs38/image/uEnv.txt
> index 35549cb1c4..53632e8bb6 100644
> --- a/target/linux/archs38/image/uEnv.txt
> +++ b/target/linux/archs38/image/uEnv.txt
> @@ -1,7 +1,7 @@
>  setenv kernel_addr_r 0x82000000
>  setenv fdt_addr_r 0x83000000
> -setenv loadkernel fatload mmc 0 \$(kernel_addr_r) uImage
> -setenv loaddtb fatload mmc 0 \$(fdt_addr_r) \$(dts)
> +setenv loadkernel fatload mmc 0 \${kernel_addr_r} uImage
> +setenv loaddtb fatload mmc 0 \${fdt_addr_r} \${dts}
>  setenv bootargs earlycon=uart8250,mmio32,0xe0022000,115200n8 console=ttyS3,115200n8 root=/dev/mmcblk0p2 rootwait print-fatal-signals=1
> -setenv uenvcmd run loadkernel\; run loaddtb\; bootm \$(kernel_addr_r) - \$(fdt_addr_r)
> +setenv uenvcmd run loadkernel\; run loaddtb\; bootm \${kernel_addr_r} - \${fdt_addr_r}
>  run uenvcmd
> 


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From openwrt-devel at lists.openwrt.org  Sat Jul  7 08:41:12 2018
From: openwrt-devel at lists.openwrt.org (Martin Strobel via openwrt-devel)
Date: Sat, 07 Jul 2018 12:41:12 +0000
Subject: [OpenWrt-Devel] [PATCH 2/3] mpc85xx: kernel 4.14
In-Reply-To: <141e098e-fcdb-bcf1-f92b-043bf491ee75@ag-web.biz>
References: <dc229669-2c3f-948b-ffb1-f694d9328f6f@ag-web.biz>
 <2f5637ae-4e53-b3e9-87c8-44c1b451026c@ag-web.biz>
 <1ae6810f-1f4d-33f4-d521-a76f40e9d10c@ag-web.biz>
 <dd3f9b66-0e84-a2f0-a4e4-e25c80ba29f8@phrozen.org>
 <9e840218-cd5b-b478-11fe-2725315aba00@ag-web.biz>
 <46ff8358-dbe6-a4ac-979e-e01299bec50d@gmail.com>
 <141e098e-fcdb-bcf1-f92b-043bf491ee75@ag-web.biz>
Message-ID: <mailman.9077.1530967271.25356.openwrt-devel@lists.openwrt.org>

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.
-------------- next part --------------
An embedded message was scrubbed...
From: Martin Strobel <martin at crza.de>
Subject: Re: [OpenWrt-Devel] [PATCH 2/3] mpc85xx: kernel 4.14
Date: Sat, 7 Jul 2018 14:40:18 +0200
Size: 6053
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20180707/b096e44a/attachment.eml>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From luci at powerneth.ro  Sat Jul  7 09:11:17 2018
From: luci at powerneth.ro (Lucian Cristian)
Date: Sat, 7 Jul 2018 16:11:17 +0300
Subject: [OpenWrt-Devel] [PATCH] verbose.mk: quote SUBMAKE options
In-Reply-To: <CAMVKJiyLE6odP0kYFY5miM9eM4-YPoM605E1ByzLfDLDq5of9A@mail.gmail.com>
References: <CAMVKJiyLE6odP0kYFY5miM9eM4-YPoM605E1ByzLfDLDq5of9A@mail.gmail.com>
Message-ID: <49e36060-217c-04fe-9c4e-c701035c6198@powerneth.ro>

On 06.07.2018 17:23, guo li wrote:
> Hi Lucian Cristian
>
> you may try run command
>
> $ scl enable devtoolset-3 bash
> $ make menuconfig
>
> with clean source.
>
> gcc has linked to staging_dir/host/bin when you first run make
> and mconf has built when you first run make menuconfig.
>
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel

you are right, tried a new clean tree and

/opt/rh/devtoolset-3/root/usr/libexec/gcc/x86_64-redhat-linux/4.9.2/ld: 
lxdialog/checklist.o: undefined reference to symbol 'acs_map'

Regards


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From kristian.evensen at gmail.com  Sat Jul  7 09:18:49 2018
From: kristian.evensen at gmail.com (Kristian Evensen)
Date: Sat, 7 Jul 2018 15:18:49 +0200
Subject: [OpenWrt-Devel] Question about mac80211.sh and MAC address
 generation
Message-ID: <CAKfDRXj9DEEBeHgo4pOwDDsos=hXdfoKaTmfUnRLU1qJu_F81g@mail.gmail.com>

Hi,

I have created a small tool which uses the MAC address to identify an
interface, and then collects some statistics about the interface. This
tool has worked fine for a long time, but lately I have noticed
strange values when running on some mt7620-boards. The problem turns
out to be the MAC generation algorithm in mac80211.sh, which creates a
MAC address that conflicts with the WAN interface.

All of the problematic boards have two wifi interfaces configured on
one radio, and the address_mask is 00:00:00:00:00:07. The MAC address
of eth0 (LAN) and wlan0 are the same, while the MAC of eth0.2 (WAN) is
LAN + 1. When the address for the second wifi interface is created,
the last byte of the MAC is set to b6 ^ 1. I suspect the intention
behind this calculation is to subtract index from b6. However, in my
case, the value of b6 is such that the XOR-operation causes b6 to be
increased by one, colliding with the MAC address of WAN. One example
of a "bad" b6 value is 0xb8.

What would be the proper way to work-around or fix this issue? While I
have several options wrt my tool, I am probably not the only one that
will be (or has been) hit by this behavior. Thus, some change to the
MAC generation might be desirable.

My current system-wide work-around is to also set the LA bit of b1,
which prevents a collision on all my devices. However, I am not sure
if that is acceptable, as you loose one valid MAC address.

BR,
Kristian

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From luci at powerneth.ro  Sat Jul  7 09:21:06 2018
From: luci at powerneth.ro (Lucian Cristian)
Date: Sat, 7 Jul 2018 16:21:06 +0300
Subject: [OpenWrt-Devel] time command detect fail on centos
In-Reply-To: <CAMVKJizcbP3AzC6tG1PHvzpscrn4WP91WbTZbvL7K=M7y0e+Fw@mail.gmail.com>
References: <CAMVKJizcbP3AzC6tG1PHvzpscrn4WP91WbTZbvL7K=M7y0e+Fw@mail.gmail.com>
Message-ID: <659e6788-6cc6-9a8f-53a8-8798cd63240f@powerneth.ro>

On 07.07.2018 11:23, ?? wrote:
> maybe $(shell which time) --version 2>&1 | grep GNU

works good on centos6

Regards


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From kristian.evensen at gmail.com  Sat Jul  7 09:52:01 2018
From: kristian.evensen at gmail.com (Kristian Evensen)
Date: Sat,  7 Jul 2018 15:52:01 +0200
Subject: [OpenWrt-Devel] [PATCH] mediatek: Fix memory node for U7623
Message-ID: <20180707135201.6425-1-kristian.evensen@gmail.com>

The changed applied to BananaPi R2 in upstream commit c0b0d540db1a,
which was backported to 4.14 in 4.14.53, is also required for the U7623.
Without updating the memory node, the board refuses to boot.

Fixes: d0839e020d0a ("kernel: bump 4.14 to 4.14.53")

Signed-off-by: Kristian Evensen <kristian.evensen at gmail.com>
---
 .../0227-arm-dts-Add-Unielec-U7623-DTS.patch         | 20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)

diff --git a/target/linux/mediatek/patches-4.14/0227-arm-dts-Add-Unielec-U7623-DTS.patch b/target/linux/mediatek/patches-4.14/0227-arm-dts-Add-Unielec-U7623-DTS.patch
index f4a21d4f64..8688a453df 100644
--- a/target/linux/mediatek/patches-4.14/0227-arm-dts-Add-Unielec-U7623-DTS.patch
+++ b/target/linux/mediatek/patches-4.14/0227-arm-dts-Add-Unielec-U7623-DTS.patch
@@ -1,4 +1,4 @@
-From 0c88c72bf130c9276958dc6f595ea473ea357a75 Mon Sep 17 00:00:00 2001
+From 13872b8abfadfe70598c065c19d1db759477c4e6 Mon Sep 17 00:00:00 2001
 From: Kristian Evensen <kristian.evensen at gmail.com>
 Date: Sun, 17 Jun 2018 14:41:47 +0200
 Subject: [PATCH] arm: dts: Add Unielec U7623 DTS
@@ -6,11 +6,13 @@ Subject: [PATCH] arm: dts: Add Unielec U7623 DTS
 ---
  arch/arm/boot/dts/Makefile                         |   1 +
  .../dts/mt7623a-unielec-u7623-02-emmc-512M.dts     |  17 +
- .../boot/dts/mt7623a-unielec-u7623-02-emmc.dtsi    | 374 +++++++++++++++++++++
- 3 files changed, 392 insertions(+)
+ .../boot/dts/mt7623a-unielec-u7623-02-emmc.dtsi    | 375 +++++++++++++++++++++
+ 3 files changed, 393 insertions(+)
  create mode 100644 arch/arm/boot/dts/mt7623a-unielec-u7623-02-emmc-512M.dts
  create mode 100644 arch/arm/boot/dts/mt7623a-unielec-u7623-02-emmc.dtsi
 
+diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
+index 3fec84fa0..e685ce9a4 100644
 --- a/arch/arm/boot/dts/Makefile
 +++ b/arch/arm/boot/dts/Makefile
 @@ -1062,6 +1062,7 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \
@@ -21,6 +23,9 @@ Subject: [PATCH] arm: dts: Add Unielec U7623 DTS
  	mt7623n-rfb-nand.dtb \
  	mt7623n-bananapi-bpi-r2.dtb \
  	mt8127-moose.dtb \
+diff --git a/arch/arm/boot/dts/mt7623a-unielec-u7623-02-emmc-512M.dts b/arch/arm/boot/dts/mt7623a-unielec-u7623-02-emmc-512M.dts
+new file mode 100644
+index 000000000..3b14eccd3
 --- /dev/null
 +++ b/arch/arm/boot/dts/mt7623a-unielec-u7623-02-emmc-512M.dts
 @@ -0,0 +1,17 @@
@@ -41,9 +46,12 @@ Subject: [PATCH] arm: dts: Add Unielec U7623 DTS
 +		reg = <0 0x80000000 0 0x20000000>;
 +	};
 +};
+diff --git a/arch/arm/boot/dts/mt7623a-unielec-u7623-02-emmc.dtsi b/arch/arm/boot/dts/mt7623a-unielec-u7623-02-emmc.dtsi
+new file mode 100644
+index 000000000..436b02f2d
 --- /dev/null
 +++ b/arch/arm/boot/dts/mt7623a-unielec-u7623-02-emmc.dtsi
-@@ -0,0 +1,374 @@
+@@ -0,0 +1,375 @@
 +/*
 + * Copyright 2018 Kristian Evensen <kristian.evensen at gmail.com>
 + *
@@ -146,6 +154,7 @@ Subject: [PATCH] arm: dts: Add Unielec U7623 DTS
 +	};
 +
 +	memory at 80000000 {
++		device_type = "memory";
 +		reg = <0 0x80000000 0 0x40000000>;
 +	};
 +
@@ -418,3 +427,6 @@ Subject: [PATCH] arm: dts: Add Unielec U7623 DTS
 +	status = "okay";
 +};
 +
+-- 
+2.14.1
+
-- 
2.14.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From jburgess777 at gmail.com  Sat Jul  7 12:11:38 2018
From: jburgess777 at gmail.com (Jon Burgess)
Date: Sat, 07 Jul 2018 17:11:38 +0100
Subject: [OpenWrt-Devel] time command detect fail on centos
In-Reply-To: <CAMVKJizcbP3AzC6tG1PHvzpscrn4WP91WbTZbvL7K=M7y0e+Fw@mail.gmail.com>
References: <CAMVKJizcbP3AzC6tG1PHvzpscrn4WP91WbTZbvL7K=M7y0e+Fw@mail.gmail.com>
Message-ID: <245f4cb7c6cbcac4def10a9b88dd8b1a69cd5d4e.camel@gmail.com>

On Sat, 2018-07-07 at 16:23 +0800, ?? wrote:
> Hi Etienne Champetier
> 
> time command detect fail on centos.
> 
> time is a keyword of bash on centos 6 and centos 7, and it not accept
> --version option, this makes time --version 2>&1 | grep GNU  always
> fail.

Does using \time instead help?

  Jon

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From openwrt-devel at lists.openwrt.org  Sat Jul  7 16:34:53 2018
From: openwrt-devel at lists.openwrt.org (Christoph Krapp via openwrt-devel)
Date: Sat, 07 Jul 2018 20:34:53 +0000
Subject: [OpenWrt-Devel]  ar71xx: add support for UniFi-AC-Mesh-Pro
Message-ID: <mailman.9137.1530995693.25356.openwrt-devel@lists.openwrt.org>

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.
-------------- next part --------------
An embedded message was scrubbed...
From: Christoph Krapp <achterin at googlemail.com>
Subject: [OpenWrt-Devel] ar71xx: add support for UniFi-AC-Mesh-Pro
Date: Sat, 7 Jul 2018 22:34:38 +0200
Size: 4438
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20180707/d8d7e6a4/attachment.eml>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From cshore at thecshore.com  Sat Jul  7 19:13:34 2018
From: cshore at thecshore.com (Daniel Dickinson)
Date: Sat, 7 Jul 2018 19:13:34 -0400
Subject: [OpenWrt-Devel] [PATCH] ca-certificates: ca-bundle: add symlink
 for openssl default setting
In-Reply-To: <20180705105154.115237-1-yszhou4tech@gmail.com>
References: <20180705105154.115237-1-yszhou4tech@gmail.com>
Message-ID: <289af3d8-048b-9312-532e-dc1a22b2eab4@thecshore.com>

On 2018-07-05 06:51 AM, Yousong Zhou wrote:
> OpenSSL defaults X509_CERT_FILE to /etc/ssl/cert.pem.  This change is
> needed for wget-ssl and possibly others to work seamlessly with fresh
> ca-bundle installation

Out of curiosity will this eliminate the need for installing both 
ca-bundle and ca-certificates? (I know that in the past some packages 
used the certs dir and others the bundle, perhaps this is why?).

Regards,

Daniel

> 
> Fixes openwrt/packages#6152
> 
> Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
> ---
>   package/system/ca-certificates/Makefile | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/package/system/ca-certificates/Makefile b/package/system/ca-certificates/Makefile
> index 537cf2f4e9..6de00b7161 100644
> --- a/package/system/ca-certificates/Makefile
> +++ b/package/system/ca-certificates/Makefile
> @@ -8,6 +8,7 @@ include $(TOPDIR)/rules.mk
>   
>   PKG_NAME:=ca-certificates
>   PKG_VERSION:=20180409
> +PKG_RELEASE:=2
>   PKG_MAINTAINER:=Christian Schoenebeck <christian.schoenebeck at gmail.com>
>   
>   PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.xz
> @@ -57,6 +58,7 @@ endef
>   define Package/ca-bundle/install
>   	$(INSTALL_DIR) $(1)/etc/ssl/certs
>   	cat $(PKG_INSTALL_DIR)/usr/share/ca-certificates/*/*.crt >$(1)/etc/ssl/certs/ca-certificates.crt
> +	$(LN) /etc/ssl/certs/ca-certificates.crt $(1)/etc/ssl/cert.pem
>   endef
>   $(eval $(call BuildPackage,ca-certificates))
>   $(eval $(call BuildPackage,ca-bundle))
> 
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
> 


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From rosenp at gmail.com  Sat Jul  7 20:26:08 2018
From: rosenp at gmail.com (Rosen Penev)
Date: Sat, 7 Jul 2018 17:26:08 -0700
Subject: [OpenWrt-Devel] [PATCH] ca-certificates: ca-bundle: add symlink
 for openssl default setting
In-Reply-To: <289af3d8-048b-9312-532e-dc1a22b2eab4@thecshore.com>
References: <20180705105154.115237-1-yszhou4tech@gmail.com>
 <289af3d8-048b-9312-532e-dc1a22b2eab4@thecshore.com>
Message-ID: <CAKxU2N9hYc6Cyjq_GzBdNJNkz2Mar71P-vpbxarvDqTZ9JUWjA@mail.gmail.com>

On Sat, Jul 7, 2018 at 4:14 PM Daniel Dickinson <cshore at thecshore.com> wrote:
>
> On 2018-07-05 06:51 AM, Yousong Zhou wrote:
> > OpenSSL defaults X509_CERT_FILE to /etc/ssl/cert.pem.  This change is
> > needed for wget-ssl and possibly others to work seamlessly with fresh
> > ca-bundle installation
>
> Out of curiosity will this eliminate the need for installing both
> ca-bundle and ca-certificates? (I know that in the past some packages
> used the certs dir and others the bundle, perhaps this is why?).
Hope so. The ca-certificates package is bigger as there's filesystem
padding and metadata to deal with.
>
> Regards,
>
> Daniel
>
> >
> > Fixes openwrt/packages#6152
> >
> > Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
> > ---
> >   package/system/ca-certificates/Makefile | 2 ++
> >   1 file changed, 2 insertions(+)
> >
> > diff --git a/package/system/ca-certificates/Makefile b/package/system/ca-certificates/Makefile
> > index 537cf2f4e9..6de00b7161 100644
> > --- a/package/system/ca-certificates/Makefile
> > +++ b/package/system/ca-certificates/Makefile
> > @@ -8,6 +8,7 @@ include $(TOPDIR)/rules.mk
> >
> >   PKG_NAME:=ca-certificates
> >   PKG_VERSION:=20180409
> > +PKG_RELEASE:=2
> >   PKG_MAINTAINER:=Christian Schoenebeck <christian.schoenebeck at gmail.com>
> >
> >   PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.xz
> > @@ -57,6 +58,7 @@ endef
> >   define Package/ca-bundle/install
> >       $(INSTALL_DIR) $(1)/etc/ssl/certs
> >       cat $(PKG_INSTALL_DIR)/usr/share/ca-certificates/*/*.crt >$(1)/etc/ssl/certs/ca-certificates.crt
> > +     $(LN) /etc/ssl/certs/ca-certificates.crt $(1)/etc/ssl/cert.pem
> >   endef
> >   $(eval $(call BuildPackage,ca-certificates))
> >   $(eval $(call BuildPackage,ca-bundle))
> >
> > _______________________________________________
> > openwrt-devel mailing list
> > openwrt-devel at lists.openwrt.org
> > https://lists.openwrt.org/mailman/listinfo/openwrt-devel
> >
>
>
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From uxgood.org at gmail.com  Sat Jul  7 23:44:55 2018
From: uxgood.org at gmail.com (=?UTF-8?B?5p2O5Zu9?=)
Date: Sun, 8 Jul 2018 11:44:55 +0800
Subject: [OpenWrt-Devel] time command detect fail on centos
In-Reply-To: <245f4cb7c6cbcac4def10a9b88dd8b1a69cd5d4e.camel@gmail.com>
References: <CAMVKJizcbP3AzC6tG1PHvzpscrn4WP91WbTZbvL7K=M7y0e+Fw@mail.gmail.com>
 <245f4cb7c6cbcac4def10a9b88dd8b1a69cd5d4e.camel@gmail.com>
Message-ID: <CAMVKJixuAQttJBfM6R3-gxsUHNMW1C63_HdWDo2CbYRpJS1VFA@mail.gmail.com>

Hi Jon Burgess

\time like "time" makes which fail

2018-07-08 0:11 GMT+08:00 Jon Burgess <jburgess777 at gmail.com>:
> On Sat, 2018-07-07 at 16:23 +0800, ?? wrote:
>> Hi Etienne Champetier
>>
>> time command detect fail on centos.
>>
>> time is a keyword of bash on centos 6 and centos 7, and it not accept
>> --version option, this makes time --version 2>&1 | grep GNU  always
>> fail.
>
> Does using \time instead help?
>
>   Jon

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From hauke at hauke-m.de  Sun Jul  8 05:37:56 2018
From: hauke at hauke-m.de (Hauke Mehrtens)
Date: Sun,  8 Jul 2018 11:37:56 +0200
Subject: [OpenWrt-Devel] [RFC] at91: do not check kernel size
Message-ID: <20180708093756.3638-1-hauke@hauke-m.de>

The at91/legacy build in build bot is failing since some months now
because it can not create openwrt-at91-legacy-at91-q5xr5-squashfs-
factory.bin.
See http://phase1.builds.lede-project.org/builders/at91%2Flegacy
This is caused by this warning:
WARNING: Image file linux-at91_legacy/at91-q5xr5-kernel.bin is too big
When the size check is removed it is working again.

I do not have this device and do not know if we can just remove this
size check or if we should solve this problem in a different way.

Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 target/linux/at91/image/legacy.mk | 1 -
 1 file changed, 1 deletion(-)

diff --git a/target/linux/at91/image/legacy.mk b/target/linux/at91/image/legacy.mk
index c6d9ed8108..2ed866dddc 100644
--- a/target/linux/at91/image/legacy.mk
+++ b/target/linux/at91/image/legacy.mk
@@ -113,7 +113,6 @@ TARGET_DEVICES += ethernut5
 define Device/at91-q5xr5
   $(Device/production-dtb)
   DEVICE_TITLE := Exegin Q5XR5
-  KERNEL_SIZE := 2048k
 endef
 TARGET_DEVICES += at91-q5xr5
 
-- 
2.11.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From dev at kresin.me  Sun Jul  8 06:04:10 2018
From: dev at kresin.me (Mathias Kresin)
Date: Sun, 8 Jul 2018 12:04:10 +0200
Subject: [OpenWrt-Devel] [RFC] at91: do not check kernel size
In-Reply-To: <20180708093756.3638-1-hauke@hauke-m.de>
References: <20180708093756.3638-1-hauke@hauke-m.de>
Message-ID: <af911a1f-bb81-0826-e7bf-1459f1770f5e@kresin.me>

08.07.2018 11:37, Hauke Mehrtens:
> The at91/legacy build in build bot is failing since some months now
> because it can not create openwrt-at91-legacy-at91-q5xr5-squashfs-
> factory.bin.
> See http://phase1.builds.lede-project.org/builders/at91%2Flegacy
> This is caused by this warning:
> WARNING: Image file linux-at91_legacy/at91-q5xr5-kernel.bin is too big
> When the size check is removed it is working again.
> 
> I do not have this device and do not know if we can just remove this
> size check or if we should solve this problem in a different way.
> 
> Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
> ---
>   target/linux/at91/image/legacy.mk | 1 -
>   1 file changed, 1 deletion(-)
> 
> diff --git a/target/linux/at91/image/legacy.mk b/target/linux/at91/image/legacy.mk
> index c6d9ed8108..2ed866dddc 100644
> --- a/target/linux/at91/image/legacy.mk
> +++ b/target/linux/at91/image/legacy.mk
> @@ -113,7 +113,6 @@ TARGET_DEVICES += ethernut5
>   define Device/at91-q5xr5
>     $(Device/production-dtb)
>     DEVICE_TITLE := Exegin Q5XR5
> -  KERNEL_SIZE := 2048k
>   endef
>   TARGET_DEVICES += at91-q5xr5

IMHO the wrong fix for the issue. The kernel size is restricted by the 
kernel partition defined in at91-q5xr5.dts[0]. Removing the variable 
would create a not working image.

The following fixes for the target build error comes in mind:

- disable the build of an image for the at91-q5xr5 completely
- set the IMAGES variable to nothing for the at91-q5xr5, to prevent the 
build of a sysupgrade image (not sure if it would allow to build 
initramfs images without hitting the kernel size error)
- add a preloader to use a better compression (not checked if kernel is 
already LZMA compressed)

Mathias


[0] 
https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=target/linux/at91/files/arch/arm/boot/dts/at91-q5xr5.dts;h=728553bce0bf58bdde6a14088910db5547d1c614;hb=HEAD

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From hauke at hauke-m.de  Sun Jul  8 06:52:09 2018
From: hauke at hauke-m.de (Hauke Mehrtens)
Date: Sun,  8 Jul 2018 12:52:09 +0200
Subject: [OpenWrt-Devel] [PATCH] toolchain/nasm: force ar and ranlib only on
 macOSX
Message-ID: <20180708105209.6850-1-hauke@hauke-m.de>

On Debian 9 nasm does not build when we force it to use ranlib, for
macOSX this is needed. Only force this on macOSX and not on any other
OS, this should fix the build of nasm on Linux systems.

Fixes: d3a7587eb95 ("toolchain/nasm: fix missing AR/RANLIB variables")
Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 toolchain/nasm/Makefile | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/toolchain/nasm/Makefile b/toolchain/nasm/Makefile
index 8d071033c7..31166358fd 100644
--- a/toolchain/nasm/Makefile
+++ b/toolchain/nasm/Makefile
@@ -24,9 +24,11 @@ HOST_CONFIGURE_ARGS+= \
 		--disable-gdb \
 		$(SOFT_FLOAT_CONFIG_OPTION) \
 
-HOST_MAKE_FLAGS = \
-	AR=ar \
-	RANLIB=ranlib
+ifeq ($(HOST_OS),Darwin)
+	HOST_MAKE_FLAGS = \
+		AR=ar \
+		RANLIB=ranlib
+endif
 
 define Host/Prepare
 	$(call Host/Prepare/Default)
-- 
2.11.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From uxgood.org at gmail.com  Sun Jul  8 09:50:59 2018
From: uxgood.org at gmail.com (=?UTF-8?B?5p2O5Zu9?=)
Date: Sun, 8 Jul 2018 21:50:59 +0800
Subject: [OpenWrt-Devel] time command detect fail on centos
In-Reply-To: <245f4cb7c6cbcac4def10a9b88dd8b1a69cd5d4e.camel@gmail.com>
References: <CAMVKJizcbP3AzC6tG1PHvzpscrn4WP91WbTZbvL7K=M7y0e+Fw@mail.gmail.com>
 <245f4cb7c6cbcac4def10a9b88dd8b1a69cd5d4e.camel@gmail.com>
Message-ID: <CAMVKJiy+Yg4gWXPnUZYX7=WqQ8gezY8P8mZSgZEohYHhSMaHfQ@mail.gmail.com>

Hi Jon Burgess
this patch works good. thanks.
diff --git a/include/prereq.mk b/include/prereq.mk
index 0f0f253744..173461e36f 100644
--- a/include/prereq.mk
+++ b/include/prereq.mk
@@ -95,7 +95,7 @@ define SetupHostCommand
                if [ -n "$$$$$$$$cmd" ]; then \
                        bin="$$$$$$$$(PATH="$(subst
$(space),:,$(filter-out $(STAGING_DIR_HOST)/%,$(subst
:,$(space),$(PATH))))" \
                                which "$$$$$$$${cmd%% *}")"; \
-                       if [ -x "$$$$$$$$bin" ] && eval "$$$$$$$$cmd"
>/dev/null 2>/dev/null; then \
+                       if [ -x "$$$$$$$$bin" ] && eval
"\\$$$$$$$$cmd" >/dev/null 2>/dev/null; then \
                                mkdir -p "$(STAGING_DIR_HOST)/bin"; \
                                ln -sf "$$$$$$$$bin"
"$(STAGING_DIR_HOST)/bin/$(strip $(1))"; \
                                exit 0; \

2018-07-08 0:11 GMT+08:00 Jon Burgess <jburgess777 at gmail.com>:
> On Sat, 2018-07-07 at 16:23 +0800, ?? wrote:
>> Hi Etienne Champetier
>>
>> time command detect fail on centos.
>>
>> time is a keyword of bash on centos 6 and centos 7, and it not accept
>> --version option, this makes time --version 2>&1 | grep GNU  always
>> fail.
>
> Does using \time instead help?
>
>   Jon

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From tim at seoss.co.uk  Sun Jul  8 10:22:14 2018
From: tim at seoss.co.uk (Tim Small)
Date: Sun, 8 Jul 2018 15:22:14 +0100
Subject: [OpenWrt-Devel] [PATCH] WDR4900v1 remove dt node for absent hw
 crypto.
In-Reply-To: <20180704130518.20896-2-tim@seoss.co.uk>
References: <20180704130518.20896-1-tim@seoss.co.uk>
 <20180704130518.20896-2-tim@seoss.co.uk>
Message-ID: <2dd4b935-8fdc-d579-3d84-86e334146539@seoss.co.uk>

On 04/07/18 14:05, Tim Small wrote:
> The WDR4900v1 uses the P1040 SoC, so the device tree pulls in the
> definition for the related P1010 SoC.  However, the P1040 lacks the
> CAAM/SEC4 hardware crypto accelerator which the P1010 device tree
> defines.  If left defined, this causes the CAAM drivers (if present) to
> attempt to use the non-existent device, making various crypto-related
> operations (e.g. macsec and ipsec) fail.

 > + * The SVR value is reported by uboot on the serial console.
 > + */
 > +
 > +/ {
 > +	soc: soc at ffe00000 {
 > +		/delete-node/ crypto at 30000; /* Pulled in by p1010si-post */
 > +	};
 > +};


FWIW, here is the equivalent code in the uboot tree:

http://git.denx.de/?p=u-boot.git;a=blob;f=arch/powerpc/cpu/mpc85xx/fdt.c;h=20ecca605ff0fb31bdb6d6f444a3536bffef4a2d;hb=HEAD#l597


Regards,

Tim.

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From linus.walleij at linaro.org  Sun Jul  8 15:53:39 2018
From: linus.walleij at linaro.org (Linus Walleij)
Date: Sun, 8 Jul 2018 21:53:39 +0200
Subject: [OpenWrt-Devel] [PATCH 3/3] ARM: dts: Add devicetree for
 Storlink/Storm SL93512R
In-Reply-To: <20180705223730.GQ23469@lunn.ch>
References: <20180704191759.12577-1-linus.walleij@linaro.org>
 <20180704191759.12577-3-linus.walleij@linaro.org>
 <20180704205627.GF23469@lunn.ch>
 <CACRpkdbgoVjCaTE3xg1Q_-UKG3cdVdDdNFW4j1UOA9bX0o-wpQ@mail.gmail.com>
 <20180705223730.GQ23469@lunn.ch>
Message-ID: <CACRpkdao_cEBJ9XkMfvOa3Z394K5z0HQEE=-rN-UXqiRp2iUkw@mail.gmail.com>

On Fri, Jul 6, 2018 at 12:37 AM Andrew Lunn <andrew at lunn.ch> wrote:

> arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts
>
> &eth0 {
>         phy-mode = "rgmii-id";
>         status = "okay";
>
>         fixed-link {
>                 speed = <1000>;
>                 full-duplex;
>         };
> };
>
> phy-mode is O.K, since you need to set RGMII.

OK hm maybe we should have "link-mode" as an alternative
as it makes it less stressful syntactically...

> phy-handle should not be used, since the fixed-link takes its
> place. But it could be your MAC driver has problems, does not
> correctly support fixed link, and has phy-handle as being mandatory,
> when it should not be.
>
> Which MAC driver is this?

This is
drivers/net/ethernet/cortina/gemini.c

My own driver code so the errors are likely mine...

the callback trail is usually:

gemini_ethernet_port_probe() or
.ndo_open() -> gmac_open()
I guess that is normal as net_device_ops doesn't have any
.adjust_link() callback or so.

then:

if (!netdev->phydev)
     gmac_setup_phy(netdev);

gmac_setup_phy()
of_phy_get_and_connect(netdev,
                                     dev->of_node,
                                     gmac_speed_set);
gmac_speed_set()

As long as a "phydev" is carrying over the
fixed link info it should be fine I think, this just
sets up the RGMII speed in this case, but it doesn't
get opened or something.

Yours,
Linus Walleij

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From cvmiller at gmail.com  Sun Jul  8 22:59:36 2018
From: cvmiller at gmail.com (Craig Miller)
Date: Sun, 8 Jul 2018 19:59:36 -0700
Subject: [OpenWrt-Devel] Is there an Open Issues list for openwrt-18.06.0-rc1
Message-ID: <5B42CF98.2000705@gmail.com>

Sorry if this has been answered else where. Is there a "known issues 
list" or tracker for issues for 18.06-rc1?

Thought I'd try |openwrt-18.06.0-rc1 |on my Netgear R6100 today.|

|Noted that the 5Ghz wireless radio wasn't even detected (after reseting 
to defaults). Nothing in the /etc/config/wireless about it.||Under 
17.01.4, it lists the radio as Qualcomm Atheros QCA9880 802.11nac (and 
the radio works normally).

  thanks,

Craig...|

|

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20180708/21ac6628/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From Evgeniy.Didin at synopsys.com  Mon Jul  9 05:31:30 2018
From: Evgeniy.Didin at synopsys.com (Evgeniy Didin)
Date: Mon,  9 Jul 2018 12:31:30 +0300
Subject: [OpenWrt-Devel] [PATCH v2] arc: Update variables substitutions in
 u-boot env files
Message-ID: <20180709093130.2994-1-Evgeniy.Didin@synopsys.com>

From: Evgeniy Didin <didin at synopsys.com>

In the latest version of u-boot (2018.05) there was a swith to 
Hush shell for ARC AXS10x boards(arc770/archs38):
commit 9249d74781e1 ("ARC: AXS10x: Enable hush shell").
In Hush shell using "$()" to declare envitonment variables is forbidden,
instead of this "${}" need to be used.

Signed-off-by: Evgeniy Didin <Evgeniy.Didin at synopsys.com>
Cc: Alexey Brodkin <abrodkin at synopsys.com>
Cc: Hauke Mehrtens <hauke at hauke-m.de>
Cc: John Crispin <john at phrozen.org>
---
Changes since v1:
-add missing Signed-off-by
 target/linux/arc770/image/uEnv.txt  | 6 +++---
 target/linux/archs38/image/uEnv.txt | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/target/linux/arc770/image/uEnv.txt b/target/linux/arc770/image/uEnv.txt
index 35549cb1c4..53632e8bb6 100644
--- a/target/linux/arc770/image/uEnv.txt
+++ b/target/linux/arc770/image/uEnv.txt
@@ -1,7 +1,7 @@
 setenv kernel_addr_r 0x82000000
 setenv fdt_addr_r 0x83000000
-setenv loadkernel fatload mmc 0 \$(kernel_addr_r) uImage
-setenv loaddtb fatload mmc 0 \$(fdt_addr_r) \$(dts)
+setenv loadkernel fatload mmc 0 \${kernel_addr_r} uImage
+setenv loaddtb fatload mmc 0 \${fdt_addr_r} \${dts}
 setenv bootargs earlycon=uart8250,mmio32,0xe0022000,115200n8 console=ttyS3,115200n8 root=/dev/mmcblk0p2 rootwait print-fatal-signals=1
-setenv uenvcmd run loadkernel\; run loaddtb\; bootm \$(kernel_addr_r) - \$(fdt_addr_r)
+setenv uenvcmd run loadkernel\; run loaddtb\; bootm \${kernel_addr_r} - \${fdt_addr_r}
 run uenvcmd
diff --git a/target/linux/archs38/image/uEnv.txt b/target/linux/archs38/image/uEnv.txt
index 35549cb1c4..53632e8bb6 100644
--- a/target/linux/archs38/image/uEnv.txt
+++ b/target/linux/archs38/image/uEnv.txt
@@ -1,7 +1,7 @@
 setenv kernel_addr_r 0x82000000
 setenv fdt_addr_r 0x83000000
-setenv loadkernel fatload mmc 0 \$(kernel_addr_r) uImage
-setenv loaddtb fatload mmc 0 \$(fdt_addr_r) \$(dts)
+setenv loadkernel fatload mmc 0 \${kernel_addr_r} uImage
+setenv loaddtb fatload mmc 0 \${fdt_addr_r} \${dts}
 setenv bootargs earlycon=uart8250,mmio32,0xe0022000,115200n8 console=ttyS3,115200n8 root=/dev/mmcblk0p2 rootwait print-fatal-signals=1
-setenv uenvcmd run loadkernel\; run loaddtb\; bootm \$(kernel_addr_r) - \$(fdt_addr_r)
+setenv uenvcmd run loadkernel\; run loaddtb\; bootm \${kernel_addr_r} - \${fdt_addr_r}
 run uenvcmd
-- 
2.17.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From peter.lundkvist at gmail.com  Mon Jul  9 06:54:17 2018
From: peter.lundkvist at gmail.com (Peter Lundkvist)
Date: Mon,  9 Jul 2018 12:54:17 +0200
Subject: [OpenWrt-Devel] [PATCH 1/2] ramips: TP-Link TL-WR902AC v3: don't
 build factory image
Message-ID: <20180709105418.16235-1-peter.lundkvist@gmail.com>

The factory image is not usable and may brick the device.

Signed-off-by: Peter Lundkvist <peter.lundkvist at gmail.com>
---
 target/linux/ramips/image/mt76x8.mk | 1 -
 1 file changed, 1 deletion(-)

diff --git a/target/linux/ramips/image/mt76x8.mk b/target/linux/ramips/image/mt76x8.mk
index eaafb149a2..729bf83003 100644
--- a/target/linux/ramips/image/mt76x8.mk
+++ b/target/linux/ramips/image/mt76x8.mk
@@ -233,7 +233,6 @@ define Device/tplink_tl-wr902ac-v3
   TPLINK_HWREV := 0x89
   TPLINK_HWREVADD := 0x1
   TPLINK_HVERSION := 3
-  IMAGES += factory.bin
   DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-usb-ledtrig-usbport
 endef
 TARGET_DEVICES += tplink_tl-wr902ac-v3
-- 
2.15.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From peter.lundkvist at gmail.com  Mon Jul  9 06:54:18 2018
From: peter.lundkvist at gmail.com (Peter Lundkvist)
Date: Mon,  9 Jul 2018 12:54:18 +0200
Subject: [OpenWrt-Devel] [PATCH 2/2] ramips: TP-Link TL-WR902AC v3: add
 missing wps button
In-Reply-To: <20180709105418.16235-1-peter.lundkvist@gmail.com>
References: <20180709105418.16235-1-peter.lundkvist@gmail.com>
Message-ID: <20180709105418.16235-2-peter.lundkvist@gmail.com>

Signed-off-by: Peter Lundkvist <peter.lundkvist at gmail.com>
---
 target/linux/ramips/dts/TL-WR902ACV3.dts | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/target/linux/ramips/dts/TL-WR902ACV3.dts b/target/linux/ramips/dts/TL-WR902ACV3.dts
index 8ff3576595..bfdc03b1b3 100644
--- a/target/linux/ramips/dts/TL-WR902ACV3.dts
+++ b/target/linux/ramips/dts/TL-WR902ACV3.dts
@@ -32,6 +32,12 @@
 			gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
 			linux,code = <BTN_1>;
 		};
+
+		wps {
+			label = "wps";
+			gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_WPS_BUTTON>;
+		};
 	};
 
 	gpio-leds {
@@ -72,7 +78,7 @@
 &pinctrl {
 	state_default: pinctrl0 {
 		gpio {
-			ralink,group = "i2c", "i2s", "p0led_an", "p4led_an", "uart1", "wdt", "wled_an";
+			ralink,group = "i2c", "i2s", "p0led_an", "p2led_an", "p4led_an", "uart1", "wdt", "wled_an";
 			ralink,function = "gpio";
 		};
 	};
-- 
2.15.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From dev at kresin.me  Mon Jul  9 07:02:49 2018
From: dev at kresin.me (Mathias Kresin)
Date: Mon, 9 Jul 2018 13:02:49 +0200
Subject: [OpenWrt-Devel] [PATCH 1/2] ramips: TP-Link TL-WR902AC v3:
 don't build factory image
In-Reply-To: <20180709105418.16235-1-peter.lundkvist@gmail.com>
References: <20180709105418.16235-1-peter.lundkvist@gmail.com>
Message-ID: <CABwW5n=g8gQ5d+zRBLSG4NYsbqbA9USGwavHswBoD4EE9Zg5tQ@mail.gmail.com>

2018-07-09 12:54 GMT+02:00 Peter Lundkvist <peter.lundkvist at gmail.com>:
> The factory image is not usable and may brick the device.
>
> Signed-off-by: Peter Lundkvist <peter.lundkvist at gmail.com>
> ---
>  target/linux/ramips/image/mt76x8.mk | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/target/linux/ramips/image/mt76x8.mk b/target/linux/ramips/image/mt76x8.mk
> index eaafb149a2..729bf83003 100644
> --- a/target/linux/ramips/image/mt76x8.mk
> +++ b/target/linux/ramips/image/mt76x8.mk
> @@ -233,7 +233,6 @@ define Device/tplink_tl-wr902ac-v3
>    TPLINK_HWREV := 0x89
>    TPLINK_HWREVADD := 0x1
>    TPLINK_HVERSION := 3
> -  IMAGES += factory.bin
>    DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-usb-ledtrig-usbport
>  endef
>  TARGET_DEVICES += tplink_tl-wr902ac-v3

Mind to explain how/why it bricks the board? Right now someone claims
that factory image it bricks boards ;-).

Mathias

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From andrew at lunn.ch  Mon Jul  9 10:54:50 2018
From: andrew at lunn.ch (Andrew Lunn)
Date: Mon, 9 Jul 2018 16:54:50 +0200
Subject: [OpenWrt-Devel] [PATCH 3/3] ARM: dts: Add devicetree for
 Storlink/Storm SL93512R
In-Reply-To: <CACRpkdao_cEBJ9XkMfvOa3Z394K5z0HQEE=-rN-UXqiRp2iUkw@mail.gmail.com>
References: <20180704191759.12577-1-linus.walleij@linaro.org>
 <20180704191759.12577-3-linus.walleij@linaro.org>
 <20180704205627.GF23469@lunn.ch>
 <CACRpkdbgoVjCaTE3xg1Q_-UKG3cdVdDdNFW4j1UOA9bX0o-wpQ@mail.gmail.com>
 <20180705223730.GQ23469@lunn.ch>
 <CACRpkdao_cEBJ9XkMfvOa3Z394K5z0HQEE=-rN-UXqiRp2iUkw@mail.gmail.com>
Message-ID: <20180709145450.GK10376@lunn.ch>

On Sun, Jul 08, 2018 at 09:53:39PM +0200, Linus Walleij wrote:
> On Fri, Jul 6, 2018 at 12:37 AM Andrew Lunn <andrew at lunn.ch> wrote:
> 
> > arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts
> >
> > &eth0 {
> >         phy-mode = "rgmii-id";
> >         status = "okay";
> >
> >         fixed-link {
> >                 speed = <1000>;
> >                 full-duplex;
> >         };
> > };
> >
> > phy-mode is O.K, since you need to set RGMII.
> 
> OK hm maybe we should have "link-mode" as an alternative
> as it makes it less stressful syntactically...
> 
> > phy-handle should not be used, since the fixed-link takes its
> > place. But it could be your MAC driver has problems, does not
> > correctly support fixed link, and has phy-handle as being mandatory,
> > when it should not be.
> >
> > Which MAC driver is this?
> 
> This is
> drivers/net/ethernet/cortina/gemini.c
> 
> My own driver code so the errors are likely mine...

Hi Linus

drivers/net/ethernet/cortina/gemini.c does not appear to have anything
to actually parse the fixed-link properties. I would probably extend
of_phy_get_and_connect() to do this parsing. Something like this,
which is not even compile tested:

@@ -367,14 +367,24 @@ struct phy_device *of_phy_get_and_connect(struct net_device *dev,
        phy_interface_t iface;
        struct device_node *phy_np;
        struct phy_device *phy;
+       int ret;
 
-       iface = of_get_phy_mode(np);
-       if (iface < 0)
-               return NULL;
+       if (of_phy_is_fixed_link(np)) {
+               ret = of_phy_register_fixed_link(np);
+               if (ret < 0) {
+                       dev_err(dev, "broken fixed-link specification\n");
+                       return NULL;
+               }
+               phy_np = of_node_get(np);
+       } else {
+               iface = of_get_phy_mode(np);
+               if (iface < 0)
+                       return NULL;
 
-       phy_np = of_parse_phandle(np, "phy-handle", 0);
-       if (!phy_np)
-               return NULL;
+               phy_np = of_parse_phandle(np, "phy-handle", 0);
+               if (!phy_np)
+                       return NULL;
+       }
 
        phy = of_phy_connect(dev, phy_np, hndlr, 0, iface);
 

	Andrew

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From monkeh at monkeh.net  Mon Jul  9 13:09:05 2018
From: monkeh at monkeh.net (Alex Maclean)
Date: Mon,  9 Jul 2018 18:09:05 +0100
Subject: [OpenWrt-Devel] [PATCH v2] config: extend small_flash feature
Message-ID: <20180709170905.10605-1-monkeh@monkeh.net>

Extend the small_flash feature to disable swap, core dumps, and
kernel debug info, and change the squashfs block size to 1024KiB.

Also change squashfs fragment cache to 2 for small_flash to ease memory
usage.

Signed-off-by: Alex Maclean <monkeh at monkeh.net>
---
 config/Config-images.in          |  1 +
 config/Config-kernel.in          | 11 ++++++++---
 target/linux/generic/config-3.18 |  2 +-
 target/linux/generic/config-4.14 |  2 +-
 target/linux/generic/config-4.9  |  2 +-
 5 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/config/Config-images.in b/config/Config-images.in
index 90e873edb8..07ef619e70 100644
--- a/config/Config-images.in
+++ b/config/Config-images.in
@@ -149,6 +149,7 @@ menu "Target Images"
 			int "Block size (in KiB)"
 			depends on TARGET_ROOTFS_SQUASHFS
 			default 64 if LOW_MEMORY_FOOTPRINT
+			default 1024 if (SMALL_FLASH && !LOW_MEMORY_FOOTPRINT)
 			default 256
 
 	menuconfig TARGET_ROOTFS_UBIFS
diff --git a/config/Config-kernel.in b/config/Config-kernel.in
index d2d1909956..4edccebea3 100644
--- a/config/Config-kernel.in
+++ b/config/Config-kernel.in
@@ -31,7 +31,7 @@ config KERNEL_CRASHLOG
 
 config KERNEL_SWAP
 	bool "Support for paging of anonymous memory (swap)"
-	default y
+	default y if !SMALL_FLASH
 
 config KERNEL_DEBUG_FS
 	bool "Compile the kernel with debug filesystem enabled"
@@ -133,7 +133,7 @@ config KERNEL_DEBUG_KERNEL
 
 config KERNEL_DEBUG_INFO
 	bool "Compile the kernel with debug information"
-	default y
+	default y if !SMALL_FLASH
 	select KERNEL_DEBUG_KERNEL
 	help
 	  This will compile your kernel and modules with debug information.
@@ -226,7 +226,7 @@ config KERNEL_COREDUMP
 config KERNEL_ELF_CORE
 	bool "Enable process core dump support"
 	select KERNEL_COREDUMP
-	default y
+	default y if !SMALL_FLASH
 
 config KERNEL_PROVE_LOCKING
 	bool "Enable kernel lock checking"
@@ -806,3 +806,8 @@ config KERNEL_DEVKMEM
 	  Say Y here if you want to support the /dev/kmem device. The
 	  /dev/kmem device is rarely used, but can be used for certain
 	  kind of kernel debugging operations.
+
+config KERNEL_SQUASHFS_FRAGMENT_CACHE_SIZE
+	int "Number of squashfs fragments cached"
+	default 2 if (SMALL_FLASH && !LOW_MEMORY_FOOTPRINT)
+	default 3
diff --git a/target/linux/generic/config-3.18 b/target/linux/generic/config-3.18
index 0f66960fdc..41f68cd582 100644
--- a/target/linux/generic/config-3.18
+++ b/target/linux/generic/config-3.18
@@ -3817,7 +3817,7 @@ CONFIG_SQUASHFS=y
 # CONFIG_SQUASHFS_DECOMP_MULTI is not set
 CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU=y
 # CONFIG_SQUASHFS_DECOMP_SINGLE is not set
-# CONFIG_SQUASHFS_EMBEDDED is not set
+CONFIG_SQUASHFS_EMBEDDED=y
 # CONFIG_SQUASHFS_FILE_CACHE is not set
 CONFIG_SQUASHFS_FILE_DIRECT=y
 CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3
diff --git a/target/linux/generic/config-4.14 b/target/linux/generic/config-4.14
index 3ed2fed7a6..6843ef3a56 100644
--- a/target/linux/generic/config-4.14
+++ b/target/linux/generic/config-4.14
@@ -4685,7 +4685,7 @@ CONFIG_SQUASHFS=y
 # CONFIG_SQUASHFS_DECOMP_MULTI is not set
 CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU=y
 # CONFIG_SQUASHFS_DECOMP_SINGLE is not set
-# CONFIG_SQUASHFS_EMBEDDED is not set
+CONFIG_SQUASHFS_EMBEDDED=y
 # CONFIG_SQUASHFS_FILE_CACHE is not set
 CONFIG_SQUASHFS_FILE_DIRECT=y
 CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3
diff --git a/target/linux/generic/config-4.9 b/target/linux/generic/config-4.9
index 83abfdc8ff..e7cf5e4361 100644
--- a/target/linux/generic/config-4.9
+++ b/target/linux/generic/config-4.9
@@ -4403,7 +4403,7 @@ CONFIG_SQUASHFS=y
 # CONFIG_SQUASHFS_DECOMP_MULTI is not set
 CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU=y
 # CONFIG_SQUASHFS_DECOMP_SINGLE is not set
-# CONFIG_SQUASHFS_EMBEDDED is not set
+CONFIG_SQUASHFS_EMBEDDED=y
 # CONFIG_SQUASHFS_FILE_CACHE is not set
 CONFIG_SQUASHFS_FILE_DIRECT=y
 CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3
-- 
2.18.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From dev at kresin.me  Mon Jul  9 14:48:56 2018
From: dev at kresin.me (Mathias Kresin)
Date: Mon,  9 Jul 2018 20:48:56 +0200
Subject: [OpenWrt-Devel] [PATCH] kernel: optimized for size if small_flash
 feature is set
Message-ID: <1531162136-3171-1-git-send-email-dev@kresin.me>

Add a new config option to allow to select the default compile
optimization level for the kernel.

Select the optimization for size by default if the small_flash feature is
set. Otherwise "Optimize for performance" is set.

Add the small_flash feature flag to all (sub)targets which had the
optimization for size in their default kernel config.

Remove CC_OPTIMIZE_FOR_* symbols from all kernel configs to apply the new
setting.

Exceptions to the above are:

  - lantiq, where the optimization for size is only required for the
    xway_legacy subtarget but was set for the whole target
  - mediatek, ramips/mt7620 & ramips/mt76x8 where boards should have
    plenty of space and an optimization for size doesn't make much sense
  - rb532, which has 128MByte flash

Signed-off-by: Mathias Kresin <dev at kresin.me>
---
 config/Config-kernel.in                      | 22 ++++++++++++++++++++++
 target/linux/adm5120/Makefile                |  2 +-
 target/linux/adm5120/config-3.18             |  1 -
 target/linux/at91/config-4.9                 |  2 --
 target/linux/ath79/tiny/config-default       |  2 --
 target/linux/au1000/Makefile                 |  2 +-
 target/linux/au1000/config-3.18              |  1 -
 target/linux/generic/config-3.18             |  1 -
 target/linux/generic/config-4.14             |  2 --
 target/linux/generic/config-4.9              |  2 --
 target/linux/lantiq/config-4.14              |  2 --
 target/linux/layerscape/armv8_32b/config-4.9 |  2 --
 target/linux/layerscape/armv8_64b/config-4.9 |  2 --
 target/linux/mcs814x/Makefile                |  2 +-
 target/linux/mcs814x/config-3.18             |  1 -
 target/linux/mediatek/mt7622/config-4.14     |  2 --
 target/linux/ppc40x/Makefile                 |  2 +-
 target/linux/ppc40x/config-3.18              |  1 -
 target/linux/ppc44x/Makefile                 |  2 +-
 target/linux/ppc44x/config-3.18              |  1 -
 target/linux/ramips/mt7620/config-4.14       |  2 --
 target/linux/ramips/mt76x8/config-4.14       |  2 --
 target/linux/ramips/rt288x/config-4.14       |  2 --
 target/linux/ramips/rt288x/target.mk         |  1 +
 target/linux/ramips/rt305x/config-4.14       |  2 --
 target/linux/ramips/rt305x/target.mk         |  2 +-
 target/linux/ramips/rt3883/config-4.14       |  2 --
 target/linux/ramips/rt3883/target.mk         |  2 +-
 target/linux/rb532/config-4.9                |  1 -
 29 files changed, 30 insertions(+), 40 deletions(-)

diff --git a/config/Config-kernel.in b/config/Config-kernel.in
index d2d1909..58f7d60 100644
--- a/config/Config-kernel.in
+++ b/config/Config-kernel.in
@@ -806,3 +806,25 @@ config KERNEL_DEVKMEM
 	  Say Y here if you want to support the /dev/kmem device. The
 	  /dev/kmem device is rarely used, but can be used for certain
 	  kind of kernel debugging operations.
+
+#
+# compile optimiziation setting
+#
+choice
+	prompt "Compiler optimization level"
+	default KERNEL_CC_OPTIMIZE_FOR_SIZE if SMALL_FLASH
+
+config KERNEL_CC_OPTIMIZE_FOR_PERFORMANCE
+	bool "Optimize for performance"
+	help
+	  This is the default optimization level for the kernel, building
+	  with the "-O2" compiler flag for best performance and most
+	  helpful compile-time warnings.
+
+config KERNEL_CC_OPTIMIZE_FOR_SIZE
+	bool "Optimize for size"
+	help
+	  Enabling this option will pass "-Os" instead of "-O2" to
+	  your compiler resulting in a smaller kernel.
+
+endchoice
diff --git a/target/linux/adm5120/Makefile b/target/linux/adm5120/Makefile
index 56916bd..75240ee 100644
--- a/target/linux/adm5120/Makefile
+++ b/target/linux/adm5120/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 BOARD:=adm5120
 BOARDNAME:=Infineon/ADMtek ADM5120
-FEATURES:=low_mem source-only
+FEATURES:=low_mem small_flash source-only
 SUBTARGETS:=router_le router_be rb1xx
 INITRAMFS_EXTRA_FILES:=
 
diff --git a/target/linux/adm5120/config-3.18 b/target/linux/adm5120/config-3.18
index 000424c..231877e 100644
--- a/target/linux/adm5120/config-3.18
+++ b/target/linux/adm5120/config-3.18
@@ -45,7 +45,6 @@ CONFIG_ARCH_SUSPEND_POSSIBLE=y
 CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y
 CONFIG_ARM_AMBA=y
 CONFIG_BUILD_BIN2C=y
-CONFIG_CC_OPTIMIZE_FOR_SIZE=y
 CONFIG_CEVT_R4K=y
 CONFIG_CLONE_BACKWARDS=y
 CONFIG_CMDLINE="console=ttyAM0,115200 rootfstype=squashfs,jffs2"
diff --git a/target/linux/at91/config-4.9 b/target/linux/at91/config-4.9
index 6ccc34b..a44d3ac 100644
--- a/target/linux/at91/config-4.9
+++ b/target/linux/at91/config-4.9
@@ -58,8 +58,6 @@ CONFIG_BLK_DEV_SD=y
 # CONFIG_BPF_SYSCALL is not set
 # CONFIG_BRIDGE is not set
 CONFIG_CACHE_L2X0=y
-CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE=y
-# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
 CONFIG_CLKDEV_LOOKUP=y
 CONFIG_CLKSRC_OF=y
 CONFIG_CLKSRC_PROBE=y
diff --git a/target/linux/ath79/tiny/config-default b/target/linux/ath79/tiny/config-default
index f5a485d..01af544 100644
--- a/target/linux/ath79/tiny/config-default
+++ b/target/linux/ath79/tiny/config-default
@@ -1,5 +1,3 @@
-# CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE is not set
-CONFIG_CC_OPTIMIZE_FOR_SIZE=y
 CONFIG_BLK_MQ_PCI=y
 CONFIG_LEDS_RESET=y
 CONFIG_OF_ADDRESS_PCI=y
diff --git a/target/linux/au1000/Makefile b/target/linux/au1000/Makefile
index ddc28d0..b13d9e8 100644
--- a/target/linux/au1000/Makefile
+++ b/target/linux/au1000/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 ARCH:=mipsel
 BOARD:=au1000
 BOARDNAME:=RMI/AMD AU1x00
-FEATURES:=squashfs usb pci source-only
+FEATURES:=squashfs usb pci small_flash source-only
 SUBTARGETS:=au1500 au1550
 MAINTAINER:=Florian Fainelli <florian at openwrt.org>
 
diff --git a/target/linux/au1000/config-3.18 b/target/linux/au1000/config-3.18
index cb2eee2..abce20a 100644
--- a/target/linux/au1000/config-3.18
+++ b/target/linux/au1000/config-3.18
@@ -11,7 +11,6 @@ CONFIG_ARCH_PHYS_ADDR_T_64BIT=y
 CONFIG_ARCH_REQUIRE_GPIOLIB=y
 CONFIG_ARCH_SUSPEND_POSSIBLE=y
 CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y
-CONFIG_CC_OPTIMIZE_FOR_SIZE=y
 CONFIG_CEVT_R4K=y
 CONFIG_CLONE_BACKWARDS=y
 CONFIG_CMDLINE="console=ttyS0,115200 root=/dev/mtdblock0 rootfstype=squashfs,jffs2"
diff --git a/target/linux/generic/config-3.18 b/target/linux/generic/config-3.18
index 0f66960..0eec5c6 100644
--- a/target/linux/generic/config-3.18
+++ b/target/linux/generic/config-3.18
@@ -580,7 +580,6 @@ CONFIG_CAVIUM_OCTEON_HELPER=y
 # CONFIG_CAVIUM_OCTEON_SIMULATOR is not set
 # CONFIG_CAVIUM_OCTEON_SOC is not set
 # CONFIG_CB710_CORE is not set
-# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
 # CONFIG_CC_STACKPROTECTOR is not set
 CONFIG_CC_STACKPROTECTOR_NONE=y
 # CONFIG_CC_STACKPROTECTOR_REGULAR is not set
diff --git a/target/linux/generic/config-4.14 b/target/linux/generic/config-4.14
index 3ed2fed..e7304b4 100644
--- a/target/linux/generic/config-4.14
+++ b/target/linux/generic/config-4.14
@@ -717,8 +717,6 @@ CONFIG_CARDBUS=y
 # CONFIG_CB710_CORE is not set
 # CONFIG_CC10001_ADC is not set
 # CONFIG_CCS811 is not set
-CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE=y
-# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
 # CONFIG_CC_STACKPROTECTOR is not set
 CONFIG_CC_STACKPROTECTOR_NONE=y
 # CONFIG_CC_STACKPROTECTOR_REGULAR is not set
diff --git a/target/linux/generic/config-4.9 b/target/linux/generic/config-4.9
index 83abfdc..011172b 100644
--- a/target/linux/generic/config-4.9
+++ b/target/linux/generic/config-4.9
@@ -680,8 +680,6 @@ CONFIG_CARDBUS=y
 # CONFIG_CAVIUM_OCTEON_SOC is not set
 # CONFIG_CB710_CORE is not set
 # CONFIG_CC10001_ADC is not set
-# CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE is not set
-CONFIG_CC_OPTIMIZE_FOR_SIZE=y
 # CONFIG_CC_STACKPROTECTOR is not set
 CONFIG_CC_STACKPROTECTOR_NONE=y
 # CONFIG_CC_STACKPROTECTOR_REGULAR is not set
diff --git a/target/linux/lantiq/config-4.14 b/target/linux/lantiq/config-4.14
index 1226441..aec0efa 100644
--- a/target/linux/lantiq/config-4.14
+++ b/target/linux/lantiq/config-4.14
@@ -20,8 +20,6 @@ CONFIG_ARCH_USE_BUILTIN_BSWAP=y
 CONFIG_ARCH_USE_QUEUED_RWLOCKS=y
 CONFIG_ARCH_USE_QUEUED_SPINLOCKS=y
 CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y
-# CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE is not set
-CONFIG_CC_OPTIMIZE_FOR_SIZE=y
 CONFIG_CEVT_R4K=y
 CONFIG_CLKDEV_LOOKUP=y
 CONFIG_CLONE_BACKWARDS=y
diff --git a/target/linux/layerscape/armv8_32b/config-4.9 b/target/linux/layerscape/armv8_32b/config-4.9
index 6f8ef62..b769589 100644
--- a/target/linux/layerscape/armv8_32b/config-4.9
+++ b/target/linux/layerscape/armv8_32b/config-4.9
@@ -145,8 +145,6 @@ CONFIG_CAN_RAW=y
 # CONFIG_CAN_SJA1000 is not set
 # CONFIG_CAN_SOFTING is not set
 # CONFIG_CAN_TI_HECC is not set
-CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE=y
-# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
 # CONFIG_CFS_BANDWIDTH is not set
 CONFIG_CGROUPS=y
 CONFIG_CGROUP_CPUACCT=y
diff --git a/target/linux/layerscape/armv8_64b/config-4.9 b/target/linux/layerscape/armv8_64b/config-4.9
index 0873b2a..06a6305 100644
--- a/target/linux/layerscape/armv8_64b/config-4.9
+++ b/target/linux/layerscape/armv8_64b/config-4.9
@@ -156,8 +156,6 @@ CONFIG_CAVIUM_ERRATUM_22375=y
 CONFIG_CAVIUM_ERRATUM_23144=y
 CONFIG_CAVIUM_ERRATUM_23154=y
 CONFIG_CAVIUM_ERRATUM_27456=y
-CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE=y
-# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
 CONFIG_CEPH_LIB=y
 # CONFIG_CEPH_LIB_PRETTYDEBUG is not set
 # CONFIG_CEPH_LIB_USE_DNS_RESOLVER is not set
diff --git a/target/linux/mcs814x/Makefile b/target/linux/mcs814x/Makefile
index 0f69bbe..cc096b2 100644
--- a/target/linux/mcs814x/Makefile
+++ b/target/linux/mcs814x/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 ARCH:=arm
 BOARD:=mcs814x
 BOARDNAME:=Moschip MCS814x
-FEATURES:=usb squashfs low_mem source-only
+FEATURES:=usb squashfs low_mem small_flash source-only
 CPU_TYPE:=arm926ej-s
 MAINTAINER:=Florian Fainelli <florian at openwrt.org>
 
diff --git a/target/linux/mcs814x/config-3.18 b/target/linux/mcs814x/config-3.18
index 7f1c570..0b74cd6 100644
--- a/target/linux/mcs814x/config-3.18
+++ b/target/linux/mcs814x/config-3.18
@@ -26,7 +26,6 @@ CONFIG_ARM_L1_CACHE_SHIFT=5
 # CONFIG_ARM_THUMB is not set
 CONFIG_BINFMT_MISC=y
 # CONFIG_CACHE_L2X0 is not set
-CONFIG_CC_OPTIMIZE_FOR_SIZE=y
 CONFIG_CLKDEV_LOOKUP=y
 CONFIG_CLONE_BACKWARDS=y
 CONFIG_CMDLINE="earlyprintk"
diff --git a/target/linux/mediatek/mt7622/config-4.14 b/target/linux/mediatek/mt7622/config-4.14
index ce705e5..15cd47a 100644
--- a/target/linux/mediatek/mt7622/config-4.14
+++ b/target/linux/mediatek/mt7622/config-4.14
@@ -88,8 +88,6 @@ CONFIG_BT_HCIUART=y
 CONFIG_BT_HCIUART_SERDEV=y
 CONFIG_BT_HCIVHCI=y
 CONFIG_BUILD_BIN2C=y
-# CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE is not set
-CONFIG_CC_OPTIMIZE_FOR_SIZE=y
 CONFIG_CLKDEV_LOOKUP=y
 CONFIG_CLKSRC_MMIO=y
 CONFIG_CLOCK_THERMAL=y
diff --git a/target/linux/ppc40x/Makefile b/target/linux/ppc40x/Makefile
index 3529bb3..ebe0998 100644
--- a/target/linux/ppc40x/Makefile
+++ b/target/linux/ppc40x/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 ARCH:=powerpc
 BOARD:=ppc40x
 BOARDNAME:=AMCC/IBM PPC40x
-FEATURES:=squashfs broken
+FEATURES:=squashfs small_flash broken
 CPU_TYPE:=405
 MAINTAINER:=Imre Kaloz <kaloz at openwrt.org>
 
diff --git a/target/linux/ppc40x/config-3.18 b/target/linux/ppc40x/config-3.18
index 85bbe0c..fc53dde 100644
--- a/target/linux/ppc40x/config-3.18
+++ b/target/linux/ppc40x/config-3.18
@@ -27,7 +27,6 @@ CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
 CONFIG_AUDIT_ARCH=y
 CONFIG_BOOKE_WDT=y
 CONFIG_BOUNCE=y
-CONFIG_CC_OPTIMIZE_FOR_SIZE=y
 CONFIG_CLONE_BACKWARDS=y
 CONFIG_CMDLINE="console=ttyS0,115200 rootfstype=squashfs,jffs2 noinitrd"
 CONFIG_CMDLINE_BOOL=y
diff --git a/target/linux/ppc44x/Makefile b/target/linux/ppc44x/Makefile
index 07404d5..52772e4 100644
--- a/target/linux/ppc44x/Makefile
+++ b/target/linux/ppc44x/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 ARCH:=powerpc
 BOARD:=ppc44x
 BOARDNAME:=AMCC/IBM PPC44x
-FEATURES:=squashfs broken
+FEATURES:=squashfs small_flash broken
 CPU_TYPE:=440
 MAINTAINER:=Imre Kaloz <kaloz at openwrt.org>
 
diff --git a/target/linux/ppc44x/config-3.18 b/target/linux/ppc44x/config-3.18
index 842d898..48880b6 100644
--- a/target/linux/ppc44x/config-3.18
+++ b/target/linux/ppc44x/config-3.18
@@ -34,7 +34,6 @@ CONFIG_BOOKE=y
 CONFIG_BOOKE_WDT=y
 CONFIG_BOUNCE=y
 CONFIG_CANYONLANDS=y
-CONFIG_CC_OPTIMIZE_FOR_SIZE=y
 CONFIG_CLONE_BACKWARDS=y
 CONFIG_CMDLINE="console=ttyS0,115200 root=/dev/mtdblock1 rootfstype=squashfs,jffs2 noinitrd"
 CONFIG_CMDLINE_BOOL=y
diff --git a/target/linux/ramips/mt7620/config-4.14 b/target/linux/ramips/mt7620/config-4.14
index d60696b..89de071 100644
--- a/target/linux/ramips/mt7620/config-4.14
+++ b/target/linux/ramips/mt7620/config-4.14
@@ -22,8 +22,6 @@ CONFIG_ARCH_USE_QUEUED_SPINLOCKS=y
 CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y
 CONFIG_AT803X_PHY=y
 CONFIG_BLK_MQ_PCI=y
-# CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE is not set
-CONFIG_CC_OPTIMIZE_FOR_SIZE=y
 CONFIG_CEVT_R4K=y
 CONFIG_CEVT_SYSTICK_QUIRK=y
 CONFIG_CLKDEV_LOOKUP=y
diff --git a/target/linux/ramips/mt76x8/config-4.14 b/target/linux/ramips/mt76x8/config-4.14
index 614c366..81e0848 100644
--- a/target/linux/ramips/mt76x8/config-4.14
+++ b/target/linux/ramips/mt76x8/config-4.14
@@ -22,8 +22,6 @@ CONFIG_ARCH_USE_QUEUED_SPINLOCKS=y
 CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y
 CONFIG_AT803X_PHY=y
 CONFIG_BLK_MQ_PCI=y
-# CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE is not set
-CONFIG_CC_OPTIMIZE_FOR_SIZE=y
 CONFIG_CEVT_R4K=y
 CONFIG_CEVT_SYSTICK_QUIRK=y
 CONFIG_CLKDEV_LOOKUP=y
diff --git a/target/linux/ramips/rt288x/config-4.14 b/target/linux/ramips/rt288x/config-4.14
index a4b4979..de4dffe 100644
--- a/target/linux/ramips/rt288x/config-4.14
+++ b/target/linux/ramips/rt288x/config-4.14
@@ -21,8 +21,6 @@ CONFIG_ARCH_USE_QUEUED_RWLOCKS=y
 CONFIG_ARCH_USE_QUEUED_SPINLOCKS=y
 CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y
 CONFIG_BLK_MQ_PCI=y
-# CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE is not set
-CONFIG_CC_OPTIMIZE_FOR_SIZE=y
 CONFIG_CEVT_R4K=y
 # CONFIG_CEVT_SYSTICK_QUIRK is not set
 CONFIG_CLKDEV_LOOKUP=y
diff --git a/target/linux/ramips/rt288x/target.mk b/target/linux/ramips/rt288x/target.mk
index 2ca5ecf..11b5a0b 100644
--- a/target/linux/ramips/rt288x/target.mk
+++ b/target/linux/ramips/rt288x/target.mk
@@ -4,6 +4,7 @@
 
 SUBTARGET:=rt288x
 BOARDNAME:=RT288x based boards
+FEATURES+=small_flash
 CPU_TYPE:=24kc
 
 DEFAULT_PACKAGES += kmod-rt2800-soc wpad-mini
diff --git a/target/linux/ramips/rt305x/config-4.14 b/target/linux/ramips/rt305x/config-4.14
index dadf88e..346a8a8 100644
--- a/target/linux/ramips/rt305x/config-4.14
+++ b/target/linux/ramips/rt305x/config-4.14
@@ -12,8 +12,6 @@ CONFIG_ARCH_SUPPORTS_UPROBES=y
 CONFIG_ARCH_SUSPEND_POSSIBLE=y
 CONFIG_ARCH_USE_BUILTIN_BSWAP=y
 CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y
-# CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE is not set
-CONFIG_CC_OPTIMIZE_FOR_SIZE=y
 CONFIG_CEVT_R4K=y
 CONFIG_CEVT_SYSTICK_QUIRK=y
 CONFIG_CLKDEV_LOOKUP=y
diff --git a/target/linux/ramips/rt305x/target.mk b/target/linux/ramips/rt305x/target.mk
index 300639f..e36fa63 100644
--- a/target/linux/ramips/rt305x/target.mk
+++ b/target/linux/ramips/rt305x/target.mk
@@ -4,7 +4,7 @@
 
 SUBTARGET:=rt305x
 BOARDNAME:=RT3x5x/RT5350 based boards
-FEATURES+=usb ramdisk
+FEATURES+=usb ramdisk small_flash
 CPU_TYPE:=24kc
 
 DEFAULT_PACKAGES += kmod-rt2800-soc wpad-mini
diff --git a/target/linux/ramips/rt3883/config-4.14 b/target/linux/ramips/rt3883/config-4.14
index f663d49..93d803e 100644
--- a/target/linux/ramips/rt3883/config-4.14
+++ b/target/linux/ramips/rt3883/config-4.14
@@ -22,8 +22,6 @@ CONFIG_ARCH_USE_QUEUED_RWLOCKS=y
 CONFIG_ARCH_USE_QUEUED_SPINLOCKS=y
 CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y
 CONFIG_BLK_MQ_PCI=y
-# CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE is not set
-CONFIG_CC_OPTIMIZE_FOR_SIZE=y
 CONFIG_CEVT_R4K=y
 # CONFIG_CEVT_SYSTICK_QUIRK is not set
 CONFIG_CLKDEV_LOOKUP=y
diff --git a/target/linux/ramips/rt3883/target.mk b/target/linux/ramips/rt3883/target.mk
index a2631d1..2cc1985 100644
--- a/target/linux/ramips/rt3883/target.mk
+++ b/target/linux/ramips/rt3883/target.mk
@@ -4,7 +4,7 @@
 
 SUBTARGET:=rt3883
 BOARDNAME:=RT3662/RT3883 based boards
-FEATURES+=usb pci
+FEATURES+=usb pci small_flash
 CPU_TYPE:=74kc
 
 DEFAULT_PACKAGES += kmod-rt2800-pci kmod-rt2800-soc wpad-mini
diff --git a/target/linux/rb532/config-4.9 b/target/linux/rb532/config-4.9
index 9290a18..a02dc03 100644
--- a/target/linux/rb532/config-4.9
+++ b/target/linux/rb532/config-4.9
@@ -16,7 +16,6 @@ CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y
 CONFIG_ATA=y
 CONFIG_BLK_DEV_LOOP=y
 CONFIG_BLK_DEV_SD=y
-CONFIG_CC_OPTIMIZE_FOR_SIZE=y
 CONFIG_CEVT_R4K=y
 CONFIG_CLONE_BACKWARDS=y
 CONFIG_CPU_GENERIC_DUMP_TLB=y
-- 
2.7.4


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From mschiffer at universe-factory.net  Mon Jul  9 18:31:20 2018
From: mschiffer at universe-factory.net (Matthias Schiffer)
Date: Tue, 10 Jul 2018 00:31:20 +0200
Subject: [OpenWrt-Devel] [PATCH 0/4] Overhaul distfeeds.conf generation
Message-ID: <cover.1531174081.git.mschiffer@universe-factory.net>

Hi,
I've been annoyed with the way we handle distfeeds.conf generation for
quite some time, as the feeds that are used to build and the feeds that end
up in the opkg config always had to be the same (disabling some of the
CONFIG_FEED_... symbols would also disable the feed for rootfs creation,
making these options basically useless - the result was usually a broken
build).

This patchset implements a way to add additional distfeeds.conf entries
(src-dummy method), makes rootfs creation independent of feed enable
status, and moves from global ADD_DISABLED and ADD_COMMENTED symbols to
per-feed configuration.

I would like to add this patchset to 18.06 as well, as we require these
changes for Gluon, and we obviously want to avoid adding downstream patches
as much as possible.

The same patchset can also be found in my staging tree at 
https://git.openwrt.org/?p=openwrt/staging/neoraider.git;a=summary

Regards,
Matthias


Matthias Schiffer (4):
  scripts/feeds: add src-dummy method
  include/feeds.mk: always add available feeds to PACKAGE_SUBDIRS
  base-files: fix feed list in PKG_CONFIG_DEPENDS
  include/feeds.mk: rework generation of opkg distfeeds.conf

 include/feeds.mk                   | 17 ++++++-----------
 package/base-files/Makefile        |  4 +---
 package/base-files/image-config.in | 14 --------------
 scripts/feeds                      | 12 +++++++++---
 4 files changed, 16 insertions(+), 31 deletions(-)

-- 
2.18.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From mschiffer at universe-factory.net  Mon Jul  9 18:31:21 2018
From: mschiffer at universe-factory.net (Matthias Schiffer)
Date: Tue, 10 Jul 2018 00:31:21 +0200
Subject: [OpenWrt-Devel] [PATCH 1/4] scripts/feeds: add src-dummy method
In-Reply-To: <cover.1531174081.git.mschiffer@universe-factory.net>
References: <cover.1531174081.git.mschiffer@universe-factory.net>
Message-ID: <a78e94c0897c4c450c36e6e1c1ae8ae9d928b05b.1531174081.git.mschiffer@universe-factory.net>

The src-dummy method does not actually obtain any feed, but it can be used
to insert addtional entries into the opkg distfeeds.conf.

Signed-off-by: Matthias Schiffer <mschiffer at universe-factory.net>
---
 scripts/feeds | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/scripts/feeds b/scripts/feeds
index 7613d3a107e4..b29e1d5c353d 100755
--- a/scripts/feeds
+++ b/scripts/feeds
@@ -59,7 +59,8 @@ sub parse_config() {
 		my $valid = 1;
 		$line[0] =~ /^src-[\w-]+$/ or $valid = 0;
 		$line[1] =~ /^\w+$/ or $valid = 0;
-		@src = split /\s+/, $line[2];
+		@src = split /\s+/, ($line[2] or '');
+		@src = ('') if @src == 0;
 		$valid or die "Syntax error in feeds.conf, line: $line\n";
 
 		$name{$line[1]} and die "Duplicate feed name '$line[1]', line: $line\n";
@@ -127,6 +128,10 @@ my %update_method = (
 		'init'		=> "ln -s '%s' '%s'",
 		'update'	=> "",
 		'revision'	=> "echo -n 'local'"},
+	'src-dummy' => {
+		'init'		=> "true '%s' && mkdir '%s'",
+		'update'	=> "",
+		'revision'	=> "echo -n 'dummy'"},
 	'src-git' => {
 		'init'          => "git clone --depth 1 '%s' '%s'",
 		'init_branch'   => "git clone --depth 1 --branch '%s' '%s' '%s'",
-- 
2.18.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From mschiffer at universe-factory.net  Mon Jul  9 18:31:22 2018
From: mschiffer at universe-factory.net (Matthias Schiffer)
Date: Tue, 10 Jul 2018 00:31:22 +0200
Subject: [OpenWrt-Devel] [PATCH 2/4] include/feeds.mk: always add available
 feeds to PACKAGE_SUBDIRS
In-Reply-To: <cover.1531174081.git.mschiffer@universe-factory.net>
References: <cover.1531174081.git.mschiffer@universe-factory.net>
Message-ID: <93f508a680af059fc5810ed401f84f7c7d7978ad.1531174081.git.mschiffer@universe-factory.net>

Setting CONFIG_FEED_... symbols combined two different effects: Disabling
a feed in the generated opkg distfeeds.conf, and omitting the feed from
PACKAGE_SUBDIRS.

It does not make sense to omit built feeds from PACKAGE_SUBDIRS, as it will
only lead to packages that can be enabled in .config (and that will
consequently be built) not to be found during rootfs creation, breaking
the build. All feeds that packages are emitted to should simply always be
added to PACKAGE_SUBDIRS instead; the CONFIG_FEED_... only configure the
generated distfeeds.conf like this.

Signed-off-by: Matthias Schiffer <mschiffer at universe-factory.net>
---
 include/feeds.mk | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/include/feeds.mk b/include/feeds.mk
index cecd30424f19..c9ffa95a368a 100644
--- a/include/feeds.mk
+++ b/include/feeds.mk
@@ -16,11 +16,7 @@ FEEDS_DISABLED:=$(filter-out $(FEEDS_ENABLED),$(FEEDS_AVAILABLE))
 PACKAGE_SUBDIRS=$(PACKAGE_DIR)
 ifneq ($(CONFIG_PER_FEED_REPO),)
   PACKAGE_SUBDIRS += $(OUTPUT_DIR)/packages/$(ARCH_PACKAGES)/base
-  ifneq ($(CONFIG_PER_FEED_REPO_ADD_DISABLED),)
-    PACKAGE_SUBDIRS += $(foreach FEED,$(FEEDS_AVAILABLE),$(OUTPUT_DIR)/packages/$(ARCH_PACKAGES)/$(FEED))
-  else
-    PACKAGE_SUBDIRS += $(foreach FEED,$(FEEDS_ENABLED),$(OUTPUT_DIR)/packages/$(ARCH_PACKAGES)/$(FEED))
-  endif
+  PACKAGE_SUBDIRS += $(foreach FEED,$(FEEDS_AVAILABLE),$(OUTPUT_DIR)/packages/$(ARCH_PACKAGES)/$(FEED))
 endif
 
 opkg_package_files = $(wildcard \
-- 
2.18.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From mschiffer at universe-factory.net  Mon Jul  9 18:31:23 2018
From: mschiffer at universe-factory.net (Matthias Schiffer)
Date: Tue, 10 Jul 2018 00:31:23 +0200
Subject: [OpenWrt-Devel] [PATCH 3/4] base-files: fix feed list in
 PKG_CONFIG_DEPENDS
In-Reply-To: <cover.1531174081.git.mschiffer@universe-factory.net>
References: <cover.1531174081.git.mschiffer@universe-factory.net>
Message-ID: <21c8a5abd9d034d5b9daa251c36e97ef6c798148.1531174081.git.mschiffer@universe-factory.net>

FEEDS_ENABLED and FEEDS_DISABLED are derived from FEEDS_AVAILABLE, not
FEEDS_INSTALLED.

Signed-off-by: Matthias Schiffer <mschiffer at universe-factory.net>
---
 package/base-files/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/base-files/Makefile b/package/base-files/Makefile
index 89ee0be3154e..a4ceb5cb36fa 100644
--- a/package/base-files/Makefile
+++ b/package/base-files/Makefile
@@ -27,7 +27,7 @@ PKG_CONFIG_DEPENDS += \
 	CONFIG_PER_FEED_REPO \
 	CONFIG_PER_FEED_REPO_ADD_DISABLED \
 	CONFIG_PER_FEED_REPO_ADD_COMMENTED \
-	$(foreach feed,$(FEEDS_INSTALLED),CONFIG_FEED_$(feed))
+	$(foreach feed,$(FEEDS_AVAILABLE),CONFIG_FEED_$(feed))
 
 include $(INCLUDE_DIR)/package.mk
 
-- 
2.18.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From mschiffer at universe-factory.net  Mon Jul  9 18:31:24 2018
From: mschiffer at universe-factory.net (Matthias Schiffer)
Date: Tue, 10 Jul 2018 00:31:24 +0200
Subject: [OpenWrt-Devel] [PATCH 4/4] include/feeds.mk: rework generation of
 opkg distfeeds.conf
In-Reply-To: <cover.1531174081.git.mschiffer@universe-factory.net>
References: <cover.1531174081.git.mschiffer@universe-factory.net>
Message-ID: <33daf45a818c9941cf5e37296fc0d2fbd6ec3735.1531174081.git.mschiffer@universe-factory.net>

Allow enabling/commenting/disabling each feed individually by using a
tristate config symbol.

Signed-off-by: Matthias Schiffer <mschiffer at universe-factory.net>
---
 include/feeds.mk                   | 11 +++++------
 package/base-files/Makefile        |  2 --
 package/base-files/image-config.in | 14 --------------
 scripts/feeds                      |  5 +++--
 4 files changed, 8 insertions(+), 24 deletions(-)

diff --git a/include/feeds.mk b/include/feeds.mk
index c9ffa95a368a..3e0801e656bf 100644
--- a/include/feeds.mk
+++ b/include/feeds.mk
@@ -10,8 +10,6 @@
 
 FEEDS_INSTALLED:=$(notdir $(wildcard $(TOPDIR)/package/feeds/*))
 FEEDS_AVAILABLE:=$(sort $(FEEDS_INSTALLED) $(shell $(SCRIPT_DIR)/feeds list -n))
-FEEDS_ENABLED:=$(foreach feed,$(FEEDS_AVAILABLE),$(if $(CONFIG_FEED_$(feed)),$(feed)))
-FEEDS_DISABLED:=$(filter-out $(FEEDS_ENABLED),$(FEEDS_AVAILABLE))
 
 PACKAGE_SUBDIRS=$(PACKAGE_DIR)
 ifneq ($(CONFIG_PER_FEED_REPO),)
@@ -35,10 +33,11 @@ endef
 # 1: destination file
 define FeedSourcesAppend
 ( \
-  echo "src/gz %d_core %U/targets/%S/packages"; \
+  echo 'src/gz %d_core %U/targets/%S/packages'; \
+  echo 'src/gz %d_base %U/packages/%A/base'; \
   $(strip $(if $(CONFIG_PER_FEED_REPO), \
-	$(foreach feed,base $(FEEDS_ENABLED),echo "src/gz %d_$(feed) %U/packages/%A/$(feed)";) \
-	$(if $(CONFIG_PER_FEED_REPO_ADD_DISABLED), \
-		$(foreach feed,$(FEEDS_DISABLED),echo "$(if $(CONFIG_PER_FEED_REPO_ADD_COMMENTED),# )src/gz %d_$(feed) %U/packages/%A/$(feed)";)))) \
+	$(foreach feed,$(FEEDS_AVAILABLE), \
+		$(if $(CONFIG_FEED_$(feed)), \
+			echo '$(if $(filter m,$(CONFIG_FEED_$(feed))),# )src/gz %d_$(feed) %U/packages/%A/$(feed)';)))) \
 ) >> $(1)
 endef
diff --git a/package/base-files/Makefile b/package/base-files/Makefile
index a4ceb5cb36fa..b58843163fd4 100644
--- a/package/base-files/Makefile
+++ b/package/base-files/Makefile
@@ -25,8 +25,6 @@ PKG_CONFIG_DEPENDS += \
 	CONFIG_NAND_SUPPORT \
 	CONFIG_CLEAN_IPKG \
 	CONFIG_PER_FEED_REPO \
-	CONFIG_PER_FEED_REPO_ADD_DISABLED \
-	CONFIG_PER_FEED_REPO_ADD_COMMENTED \
 	$(foreach feed,$(FEEDS_AVAILABLE),CONFIG_FEED_$(feed))
 
 include $(INCLUDE_DIR)/package.mk
diff --git a/package/base-files/image-config.in b/package/base-files/image-config.in
index ffa12cd3ecc4..cf2cfd1d4e49 100644
--- a/package/base-files/image-config.in
+++ b/package/base-files/image-config.in
@@ -274,18 +274,4 @@ menuconfig PER_FEED_REPO
 		If set, a separate repository is generated within bin/*/packages/
 		for the core packages and each enabled feed.
 
-	config PER_FEED_REPO_ADD_DISABLED
-		bool "Add available but not enabled feeds to opkg.conf"
-		default y
-		depends on PER_FEED_REPO
-		help
-		  Add not installed or disabled feeds from feeds.conf to opkg.conf.
-
-	config PER_FEED_REPO_ADD_COMMENTED
-		bool "Comment out not enabled feeds"
-		default !BUILDBOT
-		depends on PER_FEED_REPO && PER_FEED_REPO_ADD_DISABLED
-		help
-		  Add not enabled feeds as commented out source lines to opkg.conf.
-
 source "tmp/.config-feeds.in"
diff --git a/scripts/feeds b/scripts/feeds
index b29e1d5c353d..304ef6cbafd1 100755
--- a/scripts/feeds
+++ b/scripts/feeds
@@ -824,11 +824,12 @@ sub feed_config() {
 		my $installed = (-f "feeds/$feed->[1].index");
 
 		printf "\tconfig FEED_%s\n", $feed->[1];
-		printf "\t\tbool \"Enable feed %s\"\n", $feed->[1];
+		printf "\t\ttristate \"Enable feed %s\"\n", $feed->[1];
 		printf "\t\tdepends on PER_FEED_REPO\n";
 		printf "\t\tdefault y\n" if $installed;
 		printf "\t\thelp\n";
-		printf "\t\t Enable the \\\"%s\\\" feed at %s.\n", $feed->[1], $feed->[2][0];
+		printf "\t\t Enable the \\\"%s\\\" feed in opkg distfeeds.conf.\n", $feed->[1];
+		printf "\t\t Say M to add the feed commented out.\n";
 		printf "\n";
 	}
 
-- 
2.18.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From peter.lundkvist at gmail.com  Tue Jul 10 02:20:12 2018
From: peter.lundkvist at gmail.com (Peter Lundkvist)
Date: Tue, 10 Jul 2018 08:20:12 +0200
Subject: [OpenWrt-Devel] [PATCH 1/2] ramips: TP-Link TL-WR902AC v3:
 don't build factory image
In-Reply-To: <CABwW5n=g8gQ5d+zRBLSG4NYsbqbA9USGwavHswBoD4EE9Zg5tQ@mail.gmail.com>
References: <20180709105418.16235-1-peter.lundkvist@gmail.com>
 <CABwW5n=g8gQ5d+zRBLSG4NYsbqbA9USGwavHswBoD4EE9Zg5tQ@mail.gmail.com>
Message-ID: <386dd97d-b276-b578-e14e-2a5d07280dd6@gmail.com>

Hi,

On 2018-07-09 13:02, Mathias Kresin wrote:
> 2018-07-09 12:54 GMT+02:00 Peter Lundkvist <peter.lundkvist at gmail.com>:
>> The factory image is not usable and may brick the device.
>>
>> Signed-off-by: Peter Lundkvist <peter.lundkvist at gmail.com>
>> ---
>>   target/linux/ramips/image/mt76x8.mk | 1 -
>>   1 file changed, 1 deletion(-)
>>
>> diff --git a/target/linux/ramips/image/mt76x8.mk b/target/linux/ramips/image/mt76x8.mk
>> index eaafb149a2..729bf83003 100644
>> --- a/target/linux/ramips/image/mt76x8.mk
>> +++ b/target/linux/ramips/image/mt76x8.mk
>> @@ -233,7 +233,6 @@ define Device/tplink_tl-wr902ac-v3
>>     TPLINK_HWREV := 0x89
>>     TPLINK_HWREVADD := 0x1
>>     TPLINK_HVERSION := 3
>> -  IMAGES += factory.bin
>>     DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-usb-ledtrig-usbport
>>   endef
>>   TARGET_DEVICES += tplink_tl-wr902ac-v3
> 
> Mind to explain how/why it bricks the board? Right now someone claims
> that factory image it bricks boards ;-).

The line that produces factory image was accidentally left by me while
testing before inital commit, d13b05741a4d05a271d26fc3be61e76530025098
I came to the conclusion that flashing from OEM firmware does not work
(seems to share this behavior with other tplinks based on mt7628).
I have not done any further analysis, as I was unable to open the
case and attach a serial port (too much glue). Maybe i will try once
more.

So the way to do initial flashing (or un-bricking) is to use the
tftp-recover image. It is possible to revert to OEM firmware with tftp
recovery; in this case the first 512 bytes the image file need to be
cut off.

Peter

> 
> Mathias
> 


-- 
Peter Lundkvist, peter.lundkvist at gmail.com

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From denis at si-wifi.org  Tue Jul 10 06:29:28 2018
From: denis at si-wifi.org (=?UTF-8?Q?Denis_Peri=C5=A1a?=)
Date: Tue, 10 Jul 2018 12:29:28 +0200
Subject: [OpenWrt-Devel] Problem with hostapd (CONFIG_OWE)
Message-ID: <CAC8mBSUGb4gGP6e0nT_673XVDkEu=5LsYd1A0Kd=5As4oUR1Ww@mail.gmail.com>

Hi all,

I'm having this problem, cannot compile hostapd with CONFIG_OWE, it
seems to require sha512 and no matter what I add in menuconfig or
kernel it's not good.

If anyone can help

  CC  ../src/crypto/sha384-prf.c
make[4]: *** No rule to make target '../src/crypto/sha512.o', needed
by 'hostapd'.  Stop.
make[4]: Leaving directory
'/OPENWRT/rb435g_stable/build_dir/target-mips_24kc_musl/hostapd-full-internal/hostapd-2018-05-21-62566bc2/hostapd'
make[3]: *** [Makefile:625:
/OPENWRT/rb435g_stable/build_dir/target-mips_24kc_musl/hostapd-full-internal/hostapd-2018-05-21-62566bc2/.built]
Error 2
make[3]: Leaving directory
'/OPENWRT/rb435g_stable/package/network/services/hostapd'


Thank you.

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From koen.vandeputte at ncentric.com  Tue Jul 10 06:37:00 2018
From: koen.vandeputte at ncentric.com (Koen Vandeputte)
Date: Tue, 10 Jul 2018 12:37:00 +0200
Subject: [OpenWrt-Devel] Master build failure since NASM for x86_64
Message-ID: <d4cf9914-436f-b6b5-c910-6e5aa798434c@ncentric.com>

Hi All,

Since the NASM additions, I'm getting this build error when compiling 
for target x86_64:
I'm NOT getting the errors on builds for targets: ar71xx, cns3xxx, imx6



----------------------------------------------------------------------
Libraries have been installed in:
/mnt/ramdisk/koen/firmware/builds/generic_x86_64/staging_dir/toolchain-x86_64_gcc-7.3.0_musl/x86_64-openwrt-linux-musl/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
 ?? - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
 ???? during execution
 ?? - add LIBDIR to the `LD_RUN_PATH' environment variable
 ???? during linking
 ?? - use the `-Wl,-rpath -Wl,LIBDIR' linker flag
 ?? - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
make[8]: Nothing to be done for 'install-data-am'.
make[8]: Leaving directory 
'/mnt/ramdisk/koen/firmware/builds/generic_x86_64/build_dir/toolchain-x86_64_gcc-7.3.0_musl/gcc-7.3.0-final/x86_64-openwrt-linux-musl/libatomic'
make[7]: Leaving directory 
'/mnt/ramdisk/koen/firmware/builds/generic_x86_64/build_dir/toolchain-x86_64_gcc-7.3.0_musl/gcc-7.3.0-final/x86_64-openwrt-linux-musl/libatomic'
make[6]: Leaving directory 
'/mnt/ramdisk/koen/firmware/builds/generic_x86_64/build_dir/toolchain-x86_64_gcc-7.3.0_musl/gcc-7.3.0-final/x86_64-openwrt-linux-musl/libatomic'
make[5]: Leaving directory 
'/mnt/ramdisk/koen/firmware/builds/generic_x86_64/build_dir/toolchain-x86_64_gcc-7.3.0_musl/gcc-7.3.0-final'
make[4]: Leaving directory 
'/mnt/ramdisk/koen/firmware/builds/generic_x86_64/build_dir/toolchain-x86_64_gcc-7.3.0_musl/gcc-7.3.0-final'
# Set up the symlinks to enable lying about target name.
set -e; (cd 
/mnt/ramdisk/koen/firmware/builds/generic_x86_64/staging_dir/toolchain-x86_64_gcc-7.3.0_musl; 
ln -sf x86_64-openwrt-linux-musl x86_64-openwrt-linux; cd bin; for app 
in x86_64-openwrt-linux-musl-* ; do ln -sf ${app} 
x86_64-openwrt-linux${app##x86_64-openwrt-linux-musl}; done; );
rm -f 
/mnt/ramdisk/koen/firmware/builds/generic_x86_64/staging_dir/toolchain-x86_64_gcc-7.3.0_musl/lib/libiberty.a
/mnt/ramdisk/koen/firmware/builds/generic_x86_64/scripts/patch-specs.sh 
"/mnt/ramdisk/koen/firmware/builds/generic_x86_64/staging_dir/toolchain-x86_64_gcc-7.3.0_musl"
Locating cpp ... 
/mnt/ramdisk/koen/firmware/builds/generic_x86_64/staging_dir/toolchain-x86_64_gcc-7.3.0_musl/bin/x86_64-openwrt-linux-cpp
Patching specs ... ok
Toolchain successfully patched.
mkdir -p 
/mnt/ramdisk/koen/firmware/builds/generic_x86_64/staging_dir/toolchain-x86_64_gcc-7.3.0_musl/stamp
touch 
/mnt/ramdisk/koen/firmware/builds/generic_x86_64/build_dir/toolchain-x86_64_gcc-7.3.0_musl/gcc-7.3.0-final/.built
touch 
/mnt/ramdisk/koen/firmware/builds/generic_x86_64/staging_dir/toolchain-x86_64_gcc-7.3.0_musl/stamp/.gcc_final_installed
make[3]: Leaving directory 
'/mnt/ramdisk/koen/firmware/builds/generic_x86_64/toolchain/gcc/final'
time: toolchain/gcc/final/compile#842.26#58.81#973.67
make[3]: Entering directory 
'/mnt/ramdisk/koen/firmware/builds/generic_x86_64/toolchain/fortify-headers'
make[3]: Nothing to be done for 'compile'.
make[3]: Leaving directory 
'/mnt/ramdisk/koen/firmware/builds/generic_x86_64/toolchain/fortify-headers'
time: toolchain/fortify-headers/compile#0.00#0.00#0.01
make[3]: Entering directory 
'/mnt/ramdisk/koen/firmware/builds/generic_x86_64/toolchain/nasm'
CFLAGS="-O2 
-I/mnt/ramdisk/koen/firmware/builds/generic_x86_64/staging_dir/host/include 
" 
CPPFLAGS="-I/mnt/ramdisk/koen/firmware/builds/generic_x86_64/staging_dir/host/include 
" CXXFLAGS="" 
LDFLAGS="-L/mnt/ramdisk/koen/firmware/builds/generic_x86_64/staging_dir/host/lib 
" make? -C 
/mnt/ramdisk/koen/firmware/builds/generic_x86_64/build_dir/toolchain-x86_64_gcc-7.3.0_musl/nasm-2.13.03 

make[4]: Entering directory 
'/mnt/ramdisk/koen/firmware/builds/generic_x86_64/build_dir/toolchain-x86_64_gcc-7.3.0_musl/nasm-2.13.03'
rm -f libnasm.a



cq libnasm.a stdlib/snprintf.o stdlib/vsnprintf.o stdlib/strlcpy.o 
stdlib/strnlen.o nasmlib/ver.o nasmlib/crc64.o nasmlib/malloc.o 
nasmlib/md5c.o nasmlib/string.o nasmlib/file.o nasmlib/mmap.o 
nasmlib/ilog2.o nasmlib/realpath.o nasmlib/path.o nasmlib/filename.o 
nasmlib/srcfile.o nasmlib/zerobuf.o nasmlib/readnum.o nasmlib/bsi.o 
nasmlib/rbtree.o nasmlib/hashtbl.o nasmlib/raa.o nasmlib/saa.o 
nasmlib/strlist.o nasmlib/perfhash.o nasmlib/badenum.o common/common.o 
x86/insnsa.o x86/insnsb.o x86/insnsd.o x86/insnsn.o x86/regs.o 
x86/regvals.o x86/regflags.o x86/regdis.o x86/disp8.o x86/iflag.o 
asm/error.o asm/float.o asm/directiv.o asm/directbl.o asm/pragma.o 
asm/assemble.o asm/labels.o asm/parser.o asm/preproc.o asm/quote.o 
asm/pptok.o asm/listing.o asm/eval.o asm/exprlib.o asm/exprdump.o 
asm/stdscan.o asm/strfunc.o asm/tokhash.o asm/segalloc.o 
asm/preproc-nop.o asm/rdstrnum.o macros/macros.o output/outform.o 
output/outlib.o output/legacy.o output/nulldbg.o output/nullout.o 
output/outbin.o output/outaout.o output/outcoff.o output/outelf.o 
output/outobj.o output/outas86.o output/outrdf2.o output/outdbg.o 
output/outieee.o output/outmacho.o output/codeview.o disasm/disasm.o 
disasm/sync.o


make[4]: cq: Command not found



Makefile:149: recipe for target 'libnasm.a' failed
make[4]: *** [libnasm.a] Error 127
make[4]: Leaving directory 
'/mnt/ramdisk/koen/firmware/builds/generic_x86_64/build_dir/toolchain-x86_64_gcc-7.3.0_musl/nasm-2.13.03'
Makefile:59: recipe for target 
'/mnt/ramdisk/koen/firmware/builds/generic_x86_64/build_dir/toolchain-x86_64_gcc-7.3.0_musl/nasm-2.13.03/.built' 
failed
make[3]: *** 
[/mnt/ramdisk/koen/firmware/builds/generic_x86_64/build_dir/toolchain-x86_64_gcc-7.3.0_musl/nasm-2.13.03/.built] 
Error 2
make[3]: Leaving directory 
'/mnt/ramdisk/koen/firmware/builds/generic_x86_64/toolchain/nasm'
Command exited with non-zero status 2
time: toolchain/nasm/compile#0.01#0.00#0.01
toolchain/Makefile:96: recipe for target 'toolchain/nasm/compile' failed
make[2]: *** [toolchain/nasm/compile] Error 2
make[2]: Leaving directory 
'/mnt/ramdisk/koen/firmware/builds/generic_x86_64'
toolchain/Makefile:94: recipe for target 
'/mnt/ramdisk/koen/firmware/builds/generic_x86_64/staging_dir/toolchain-x86_64_gcc-7.3.0_musl/stamp/.toolchain_compile' 
failed
make[1]: *** 
[/mnt/ramdisk/koen/firmware/builds/generic_x86_64/staging_dir/toolchain-x86_64_gcc-7.3.0_musl/stamp/.toolchain_compile] 
Error 2
make[1]: Leaving directory 
'/mnt/ramdisk/koen/firmware/builds/generic_x86_64'
/mnt/ramdisk/koen/firmware/builds/generic_x86_64/include/toplevel.mk:216: 
recipe for target 'world' failed
make: *** [world] Error 2
koen at bob:~/firmware/builds/generic_x86_64$


Any idea?

Thanks,

Koen


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From nbd at nbd.name  Tue Jul 10 07:12:03 2018
From: nbd at nbd.name (Felix Fietkau)
Date: Tue, 10 Jul 2018 13:12:03 +0200
Subject: [OpenWrt-Devel] Master build failure since NASM for x86_64
In-Reply-To: <d4cf9914-436f-b6b5-c910-6e5aa798434c@ncentric.com>
References: <d4cf9914-436f-b6b5-c910-6e5aa798434c@ncentric.com>
Message-ID: <1066a9a4-c8fa-b27f-700b-99254e952953@nbd.name>

On 2018-07-10 12:37, Koen Vandeputte wrote:
> Hi All,
> 
> Since the NASM additions, I'm getting this build error when compiling 
> for target x86_64:
> I'm NOT getting the errors on builds for targets: ar71xx, cns3xxx, imx6
I did some more digging and figure out that the cause of the build error
was --enable-lto in the nasm configure flags.
There are no checks and no graceful fallback code in the build system to
deal with older versions of GCC (or not even using GCC), so this was
causing the build issues on various systems.

I pushed a change to pass --disable-lto instead and remove the no longer
needed macOS workaround.

- Felix

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From koen.vandeputte at ncentric.com  Tue Jul 10 08:10:12 2018
From: koen.vandeputte at ncentric.com (Koen Vandeputte)
Date: Tue, 10 Jul 2018 14:10:12 +0200
Subject: [OpenWrt-Devel] Master build failure since NASM for x86_64
In-Reply-To: <1066a9a4-c8fa-b27f-700b-99254e952953@nbd.name>
References: <d4cf9914-436f-b6b5-c910-6e5aa798434c@ncentric.com>
 <1066a9a4-c8fa-b27f-700b-99254e952953@nbd.name>
Message-ID: <69eb515a-0a42-297d-99bc-4c4ef5797632@ncentric.com>



On 2018-07-10 13:12, Felix Fietkau wrote:
> On 2018-07-10 12:37, Koen Vandeputte wrote:
>> Hi All,
>>
>> Since the NASM additions, I'm getting this build error when compiling
>> for target x86_64:
>> I'm NOT getting the errors on builds for targets: ar71xx, cns3xxx, imx6
> I did some more digging and figure out that the cause of the build error
> was --enable-lto in the nasm configure flags.
> There are no checks and no graceful fallback code in the build system to
> deal with older versions of GCC (or not even using GCC), so this was
> causing the build issues on various systems.
>
> I pushed a change to pass --disable-lto instead and remove the no longer
> needed macOS workaround.
I can confirm it's fixed. (re-compiled on all platforms mentioned above)
Thanks for your fast response!


Koen
> - Felix


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From thess at kitschensync.net  Tue Jul 10 10:26:25 2018
From: thess at kitschensync.net (Ted Hess)
Date: Tue, 10 Jul 2018 10:26:25 -0400
Subject: [OpenWrt-Devel] Master build failure since NASM for x86_64
In-Reply-To: <69eb515a-0a42-297d-99bc-4c4ef5797632@ncentric.com>
References: <d4cf9914-436f-b6b5-c910-6e5aa798434c@ncentric.com>
 <1066a9a4-c8fa-b27f-700b-99254e952953@nbd.name>
 <69eb515a-0a42-297d-99bc-4c4ef5797632@ncentric.com>
Message-ID: <3A9066D1F20A411ABF7290B253A2DDB8@fortmeadow.com>

Thanks - Felix

/ted

-----Original Message----- 
From: Koen Vandeputte 
Sent: Tuesday, July 10, 2018 8:10 AM 
To: Felix Fietkau ; LEDE Development List 
Cc: thess at kitschensync.net ; Hauke Mehrtens 
Subject: Re: Master build failure since NASM for x86_64 



On 2018-07-10 13:12, Felix Fietkau wrote:
> On 2018-07-10 12:37, Koen Vandeputte wrote:
>> Hi All,
>>
>> Since the NASM additions, I'm getting this build error when compiling
>> for target x86_64:
>> I'm NOT getting the errors on builds for targets: ar71xx, cns3xxx, imx6
> I did some more digging and figure out that the cause of the build error
> was --enable-lto in the nasm configure flags.
> There are no checks and no graceful fallback code in the build system to
> deal with older versions of GCC (or not even using GCC), so this was
> causing the build issues on various systems.
>
> I pushed a change to pass --disable-lto instead and remove the no longer
> needed macOS workaround.
I can confirm it's fixed. (re-compiled on all platforms mentioned above)
Thanks for your fast response!


Koen
> - Felix

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From moritzwarning at web.de  Tue Jul 10 12:50:30 2018
From: moritzwarning at web.de (Moritz Warning)
Date: Tue, 10 Jul 2018 18:50:30 +0200
Subject: [OpenWrt-Devel] [PATCH] qos-scripts: fix indentation
Message-ID: <20180710165030.18525-1-moritzwarning@web.de>

Signed-off-by: Moritz Warning <moritzwarning at web.de>
---
 .../qos-scripts/files/usr/bin/qos-start       |  2 +-
 .../config/qos-scripts/files/usr/bin/qos-stop |  1 +
 .../qos-scripts/files/usr/lib/qos/generate.sh | 28 +++++++++----------
 3 files changed, 16 insertions(+), 15 deletions(-)

diff --git a/package/network/config/qos-scripts/files/usr/bin/qos-start b/package/network/config/qos-scripts/files/usr/bin/qos-start
index 261ffb42b0..68dae70638 100755
--- a/package/network/config/qos-scripts/files/usr/bin/qos-start
+++ b/package/network/config/qos-scripts/files/usr/bin/qos-start
@@ -1,4 +1,4 @@
 #!/bin/sh
+
 qos-stop 
 /usr/lib/qos/generate.sh all | sh
-
diff --git a/package/network/config/qos-scripts/files/usr/bin/qos-stop b/package/network/config/qos-scripts/files/usr/bin/qos-stop
index 7f654d8587..ea3bba3abf 100755
--- a/package/network/config/qos-scripts/files/usr/bin/qos-stop
+++ b/package/network/config/qos-scripts/files/usr/bin/qos-stop
@@ -1,4 +1,5 @@
 #!/bin/sh
+
 for iface in $(tc qdisc show | grep -E '(hfsc|ingress)' | awk '{print $5}'); do
 	tc qdisc del dev "$iface" ingress 2>&- >&-
 	tc qdisc del dev "$iface" root 2>&- >&-
diff --git a/package/network/config/qos-scripts/files/usr/lib/qos/generate.sh b/package/network/config/qos-scripts/files/usr/lib/qos/generate.sh
index 48c9f4a9df..3ec7f80e53 100755
--- a/package/network/config/qos-scripts/files/usr/lib/qos/generate.sh
+++ b/package/network/config/qos-scripts/files/usr/lib/qos/generate.sh
@@ -118,21 +118,21 @@ parse_matching_rule() {
 				append "$var" "-m comment --comment '$value'"
 			;;
 			*:tos)
-                                add_insmod xt_dscp
-                                case "$value" in
-                                        !*) append "$var" "-m tos ! --tos $value";;
-                                        *) append "$var" "-m tos --tos $value"
-                                esac
-                        ;;
+				add_insmod xt_dscp
+				case "$value" in
+					!*) append "$var" "-m tos ! --tos $value";;
+					*) append "$var" "-m tos --tos $value"
+				esac
+			;;
 			*:dscp)
-                                add_insmod xt_dscp
+				add_insmod xt_dscp
 				dscp_option="--dscp"
-                                [ -z "${value%%[EBCA]*}" ] && dscp_option="--dscp-class"
+				[ -z "${value%%[EBCA]*}" ] && dscp_option="--dscp-class"
 				case "$value" in
-                                       	!*) append "$var" "-m dscp ! $dscp_option $value";;
-                                       	*) append "$var" "-m dscp $dscp_option $value"
-                                esac
-                        ;;
+					!*) append "$var" "-m dscp ! $dscp_option $value";;
+					*) append "$var" "-m dscp $dscp_option $value"
+				esac
+			;;
 			*:direction)
 				value="$(echo "$value" | sed -e 's,-,:,g')"
 				if [ "$value" = "out" ]; then
@@ -428,7 +428,7 @@ start_cg() {
 	cat <<EOF
 $INSMOD
 EOF
-  
+
 for command in $iptables; do
 	cat <<EOF
 	$command -w -t mangle -N qos_${cg} 
@@ -486,7 +486,7 @@ stop_firewall() {
 				-e 's/^-A/-D/' \
 				-e '${p;g}' |
 			# Make into proper iptables calls
-			# Note:  awkward in previous call due to hold space usage
+			# Note: awkward in previous call due to hold space usage
 			sed -n -e "s/^./${command} -w -t mangle &/p"
 	done
 }
-- 
2.18.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From Jason at zx2c4.com  Tue Jul 10 15:29:18 2018
From: Jason at zx2c4.com (Jason A. Donenfeld)
Date: Tue, 10 Jul 2018 21:29:18 +0200
Subject: [OpenWrt-Devel] [PATCH] wireguard: bump to 0.0.20180708
Message-ID: <20180710192918.3333-1-Jason@zx2c4.com>

* device: print daddr not saddr in missing peer error
* receive: style

Debug messages now make sense again.

* wg-quick: android: support excluding applications

Android now supports excluding certain apps (uids) from the tunnel.

* selftest: ratelimiter: improve chance of success via retry
* qemu: bump default kernel version
* qemu: decide debug kernel based on KERNEL_VERSION

Some improvements to our testing infrastructure.

* receive: use NAPI on the receive path

This is a big change that should both improve preemption latency (by not
disabling it unconditionally) and vastly improve rx performance on most
systems by using NAPI. The main purpose of this snapshot is to test out this
technique.

Signed-off-by: Jason A. Donenfeld <Jason at zx2c4.com>
---
 package/network/services/wireguard/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/network/services/wireguard/Makefile b/package/network/services/wireguard/Makefile
index 63aaf39405..90ecae3e64 100644
--- a/package/network/services/wireguard/Makefile
+++ b/package/network/services/wireguard/Makefile
@@ -11,12 +11,12 @@ include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=wireguard
 
-PKG_VERSION:=0.0.20180625
+PKG_VERSION:=0.0.20180708
 PKG_RELEASE:=1
 
 PKG_SOURCE:=WireGuard-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://git.zx2c4.com/WireGuard/snapshot/
-PKG_HASH:=d9bedeb22b1f83d48581608a6521fea1d429fbeb8809419d08703ef2ec570020
+PKG_HASH:=5e38d554f7d1e3a64e3a5319ca1a3b790c84ed89c896586c490a93ac1f953a91
 
 PKG_LICENSE:=GPL-2.0 Apache-2.0
 PKG_LICENSE_FILES:=COPYING
-- 
2.18.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From champetier.etienne at gmail.com  Tue Jul 10 15:38:39 2018
From: champetier.etienne at gmail.com (Etienne Champetier)
Date: Tue, 10 Jul 2018 21:38:39 +0200
Subject: [OpenWrt-Devel] time command detect fail on centos
In-Reply-To: <CAMVKJiy+Yg4gWXPnUZYX7=WqQ8gezY8P8mZSgZEohYHhSMaHfQ@mail.gmail.com>
References: <CAMVKJizcbP3AzC6tG1PHvzpscrn4WP91WbTZbvL7K=M7y0e+Fw@mail.gmail.com>
 <245f4cb7c6cbcac4def10a9b88dd8b1a69cd5d4e.camel@gmail.com>
 <CAMVKJiy+Yg4gWXPnUZYX7=WqQ8gezY8P8mZSgZEohYHhSMaHfQ@mail.gmail.com>
Message-ID: <CAOdf3gqafqr5mSre8NzrOZE_jzmjjEw6XRhqW27vfzhyVm7q-w@mail.gmail.com>

Hi,

2018-07-08 15:50 GMT+02:00 ?? <uxgood.org at gmail.com>:
> Hi Jon Burgess
> this patch works good. thanks.
> diff --git a/include/prereq.mk b/include/prereq.mk
> index 0f0f253744..173461e36f 100644
> --- a/include/prereq.mk
> +++ b/include/prereq.mk
> @@ -95,7 +95,7 @@ define SetupHostCommand
>                 if [ -n "$$$$$$$$cmd" ]; then \
>                         bin="$$$$$$$$(PATH="$(subst
> $(space),:,$(filter-out $(STAGING_DIR_HOST)/%,$(subst
> :,$(space),$(PATH))))" \
>                                 which "$$$$$$$${cmd%% *}")"; \
> -                       if [ -x "$$$$$$$$bin" ] && eval "$$$$$$$$cmd"
>>/dev/null 2>/dev/null; then \
> +                       if [ -x "$$$$$$$$bin" ] && eval
> "\\$$$$$$$$cmd" >/dev/null 2>/dev/null; then \
>                                 mkdir -p "$(STAGING_DIR_HOST)/bin"; \
>                                 ln -sf "$$$$$$$$bin"
> "$(STAGING_DIR_HOST)/bin/$(strip $(1))"; \
>                                 exit 0; \
>
> 2018-07-08 0:11 GMT+08:00 Jon Burgess <jburgess777 at gmail.com>:
>> On Sat, 2018-07-07 at 16:23 +0800, ?? wrote:
>>> Hi Etienne Champetier
>>>
>>> time command detect fail on centos.
>>>
>>> time is a keyword of bash on centos 6 and centos 7, and it not accept
>>> --version option, this makes time --version 2>&1 | grep GNU  always
>>> fail.

I just tried a fresh git checkout of master on an up to date CentOS 7
After "yum install time" build work perfectly fine

Regards
Etienne

>>
>> Does using \time instead help?
>>
>>   Jon
>
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From zajec5 at gmail.com  Tue Jul 10 15:59:15 2018
From: zajec5 at gmail.com (=?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?=)
Date: Tue, 10 Jul 2018 21:59:15 +0200
Subject: [OpenWrt-Devel] [PATCH] mtd: support bad blocks within the
 mtd_fixtrx()
Message-ID: <20180710195915.1856-1-zajec5@gmail.com>

From: Rafa? Mi?ecki <rafal at milecki.pl>

Reading MTD data with (p)read doesn't return any error when accessing
bad block. As the result, with current code, CRC32 covers "data" stored
in bad blocks.

That behavior doesn't match CFE's one (bootloader simply skips bad
blocks) and may result in:
1) Invalid CRC32
2) CFE refusing to boot firmware with a following error:
Boot program checksum is invalid

Fix that problem by checking every block before reading its content.

Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
---
 package/system/mtd/src/trx.c | 40 ++++++++++++++++++++++++++++++++++------
 1 file changed, 34 insertions(+), 6 deletions(-)

diff --git a/package/system/mtd/src/trx.c b/package/system/mtd/src/trx.c
index 1f5c52914c..305efc5dd5 100644
--- a/package/system/mtd/src/trx.c
+++ b/package/system/mtd/src/trx.c
@@ -156,9 +156,10 @@ mtd_fixtrx(const char *mtd, size_t offset, size_t data_size)
 	int fd;
 	struct trx_header *trx;
 	char *first_block;
-	char *buf;
+	char *buf, *to;
 	ssize_t res;
 	size_t block_offset;
+	size_t read_offset, read_size;
 
 	if (quiet < 2)
 		fprintf(stderr, "Trying to fix trx header in %s at 0x%x...\n", mtd, offset);
@@ -214,10 +215,38 @@ mtd_fixtrx(const char *mtd, size_t offset, size_t data_size)
 		exit(1);
 	}
 
-	res = pread(fd, buf, data_size, data_offset);
-	if (res != data_size) {
-		perror("pread");
-		exit(1);
+	read_offset = data_offset;
+	read_size = data_size;
+	to = buf;
+	while (read_size) {
+		size_t read_block_offset = read_offset & ~(erasesize - 1);
+		size_t read_chunk;
+
+		read_chunk = erasesize - (read_offset & (erasesize - 1));
+		read_chunk = read_chunk > read_size ? read_size : read_chunk;
+
+		res = ioctl(fd, MEMGETBADBLOCK, &read_block_offset);
+		if (res == -1) {
+			perror("ioctl");
+			exit(1);
+		}
+
+		/* Skip bad block to match CFE behavior */
+		if (res) {
+			read_offset += read_chunk;
+			read_size -= read_chunk;
+			continue;
+		}
+
+		res = pread(fd, to, read_chunk, read_offset);
+		if (res != read_chunk) {
+			perror("pread");
+			exit(1);
+		}
+
+		read_offset += read_chunk;
+		read_size -= read_chunk;
+		to += read_chunk;
 	}
 
 	trx->len = STORE32_LE(data_size + offsetof(struct trx_header, flag_version));
@@ -244,4 +273,3 @@ mtd_fixtrx(const char *mtd, size_t offset, size_t data_size)
 	return 0;
 
 }
-
-- 
2.13.7


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From foss at volatilesystems.org  Tue Jul 10 16:08:31 2018
From: foss at volatilesystems.org (Stijn Segers)
Date: Tue, 10 Jul 2018 22:08:31 +0200
Subject: [OpenWrt-Devel] [PATCH 1/2] kernel: bump 4.9 to 4.9.111 for 18.06
Message-ID: <20180710200832.3260-1-foss@volatilesystems.org>

Refreshed patches.

Compile-tested on: ar71xx
Run-tested on: ar71xx

Signed-off-by: Stijn Segers <foss at volatilesystems.org>
---
 include/kernel-version.mk                                             | 4 ++--
 target/linux/brcm2708/patches-4.9/950-0031-Add-dwc_otg-driver.patch   | 2 +-
 target/linux/brcm47xx/patches-4.9/830-huawei_e970_support.patch       | 4 ++--
 .../490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch    | 4 ++--
 target/linux/layerscape/patches-4.9/702-pci-support-layerscape.patch  | 2 +-
 5 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/include/kernel-version.mk b/include/kernel-version.mk
index 641b65258f..250ac0f15e 100644
--- a/include/kernel-version.mk
+++ b/include/kernel-version.mk
@@ -4,12 +4,12 @@ LINUX_RELEASE?=1
 
 LINUX_VERSION-3.18 = .71
 LINUX_VERSION-4.4 = .121
-LINUX_VERSION-4.9 = .110
+LINUX_VERSION-4.9 = .111
 LINUX_VERSION-4.14 = .52
 
 LINUX_KERNEL_HASH-3.18.71 = 5abc9778ad44ce02ed6c8ab52ece8a21c6d20d21f6ed8a19287b4a38a50c1240
 LINUX_KERNEL_HASH-4.4.121 = 44a88268b5088dc326b30c9b9133ac35a9a200b636b7268d08f32abeae6ca729
-LINUX_KERNEL_HASH-4.9.110 = 379a143a70a79f0eea6c9f6638942b65e6043abdde17ad23264c0abd93c4ea7a
+LINUX_KERNEL_HASH-4.9.111 = 5966558959dc580f163766f3fdefd7e57c01b2b45d51202d00b3807c253759dd
 LINUX_KERNEL_HASH-4.14.52 = a5d226c7b2fd1eb0f01d56e4e2c6a0100784b68df907cc7317f32bde34f88810
 
 remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
diff --git a/target/linux/brcm2708/patches-4.9/950-0031-Add-dwc_otg-driver.patch b/target/linux/brcm2708/patches-4.9/950-0031-Add-dwc_otg-driver.patch
index 34e7764668..d19027a2f0 100644
--- a/target/linux/brcm2708/patches-4.9/950-0031-Add-dwc_otg-driver.patch
+++ b/target/linux/brcm2708/patches-4.9/950-0031-Add-dwc_otg-driver.patch
@@ -696,7 +696,7 @@ Signed-off-by: Noralf Tr?nnes <noralf at tronnes.org>
  }
 --- a/drivers/usb/core/hub.c
 +++ b/drivers/usb/core/hub.c
-@@ -5062,7 +5062,7 @@ static void port_event(struct usb_hub *h
+@@ -5064,7 +5064,7 @@ static void port_event(struct usb_hub *h
  	if (portchange & USB_PORT_STAT_C_OVERCURRENT) {
  		u16 status = 0, unused;
  
diff --git a/target/linux/brcm47xx/patches-4.9/830-huawei_e970_support.patch b/target/linux/brcm47xx/patches-4.9/830-huawei_e970_support.patch
index b6150ed8fd..5d40fe6541 100644
--- a/target/linux/brcm47xx/patches-4.9/830-huawei_e970_support.patch
+++ b/target/linux/brcm47xx/patches-4.9/830-huawei_e970_support.patch
@@ -8,7 +8,7 @@
  #include <asm/bootinfo.h>
  #include <asm/idle.h>
  #include <asm/prom.h>
-@@ -225,6 +226,33 @@ static struct fixed_phy_status bcm47xx_f
+@@ -231,6 +232,33 @@ static struct fixed_phy_status bcm47xx_f
  	.duplex	= DUPLEX_FULL,
  };
  
@@ -42,7 +42,7 @@
  static int __init bcm47xx_register_bus_complete(void)
  {
  	switch (bcm47xx_bus_type) {
-@@ -244,6 +272,7 @@ static int __init bcm47xx_register_bus_c
+@@ -250,6 +278,7 @@ static int __init bcm47xx_register_bus_c
  	bcm47xx_workarounds();
  
  	fixed_phy_add(PHY_POLL, 0, &bcm47xx_fixed_phy_status, -1);
diff --git a/target/linux/generic/pending-4.9/490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch b/target/linux/generic/pending-4.9/490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch
index 1d44cdb9f4..8b37dba034 100644
--- a/target/linux/generic/pending-4.9/490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch
+++ b/target/linux/generic/pending-4.9/490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch
@@ -8,7 +8,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
 
 --- a/drivers/mtd/ubi/build.c
 +++ b/drivers/mtd/ubi/build.c
-@@ -1223,6 +1223,49 @@ static struct mtd_info * __init open_mtd
+@@ -1226,6 +1226,49 @@ static struct mtd_info * __init open_mtd
  	return mtd;
  }
  
@@ -58,7 +58,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  static int __init ubi_init(void)
  {
  	int err, i, k;
-@@ -1306,6 +1349,12 @@ static int __init ubi_init(void)
+@@ -1309,6 +1352,12 @@ static int __init ubi_init(void)
  		}
  	}
  
diff --git a/target/linux/layerscape/patches-4.9/702-pci-support-layerscape.patch b/target/linux/layerscape/patches-4.9/702-pci-support-layerscape.patch
index 37eb5410d2..724c6841f8 100644
--- a/target/linux/layerscape/patches-4.9/702-pci-support-layerscape.patch
+++ b/target/linux/layerscape/patches-4.9/702-pci-support-layerscape.patch
@@ -2060,7 +2060,7 @@ Signed-off-by: Yangbo Lu <yangbo.lu at nxp.com>
  	}
 --- a/drivers/pci/quirks.c
 +++ b/drivers/pci/quirks.c
-@@ -4659,3 +4659,11 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_IN
+@@ -4679,3 +4679,11 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_IN
  DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x2031, quirk_no_aersid);
  DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x2032, quirk_no_aersid);
  DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x2033, quirk_no_aersid);
-- 
2.11.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From foss at volatilesystems.org  Tue Jul 10 16:08:32 2018
From: foss at volatilesystems.org (Stijn Segers)
Date: Tue, 10 Jul 2018 22:08:32 +0200
Subject: [OpenWrt-Devel] [PATCH 2/2] [RFC] kernel: bump 4.14 to 4.14.54 for
 18.06
In-Reply-To: <20180710200832.3260-1-foss@volatilesystems.org>
References: <20180710200832.3260-1-foss@volatilesystems.org>
Message-ID: <20180710200832.3260-2-foss@volatilesystems.org>

Refreshed patches. The bump from .53 to .54 introduced a minor change in net/netfilter/nf_tables_api.c [1] but I am unable to 
judge if this is a fluke or not, so I'd like a second pair of eyes on that. It's a single 'table[0]' being replaced by 'table':

- if (filter && filter->table[0] &&
+ if (filter && filter->table &&

I have updated the 335-v4.16-netfilter-nf_tables-add-single-table-list-for-all-fa.patch accordingly.

Compile-tested on: ramips/mt7621, x86/64
Run-tested on: ramips/mt7621, x86/64

[1]	https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/diff/net/netfilter/nf_tables_api.c?id=v4.14.54&id2=v4.14.53

Signed-off-by: Stijn Segers <foss at volatilesystems.org>
---
 include/kernel-version.mk                          |   4 +-
 .../patches-4.14/830-huawei_e970_support.patch     |   4 +-
 ...ore-only-allow-one-nat-hook-per-hook-poin.patch |   2 +-
 ...f_tables-remove-multihook-chains-and-fami.patch |  46 +++---
 ...f_tables-remove-hooks-from-family-definit.patch |  12 +-
 .../314-v4.16-netfilter-meta-secpath-support.patch |   6 +-
 ...nf_tables-add-flow-table-netlink-frontend.patch |  42 +++---
 ...f_tables-remove-nhooks-field-from-struct-.patch |   8 +-
 ...f_tables-fix-a-typo-in-nf_tables_getflowt.patch |   2 +-
 ...f_tables-remove-flag-field-from-struct-nf.patch |   6 +-
 ...f_tables-no-need-for-struct-nft_af_info-t.patch |  12 +-
 ...f_tables-remove-struct-nft_af_info-parame.patch |   6 +-
 ...f_tables-fix-potential-NULL-ptr-deref-in-.patch |   2 +-
 ...f_tables-add-single-table-list-for-all-fa.patch | 160 ++++++++++-----------
 ...15-netfilter-exit_net-cleanup-check-added.patch |   4 +-
 ...lter-nf_tables-get-rid-of-pernet-families.patch |  12 +-
 ...f_tables-get-rid-of-struct-nft_af_info-ab.patch | 132 ++++++++---------
 ...ft_flow_offload-wait-for-garbage-collecto.patch |   2 +-
 ...16-netfilter-nf_tables-fix-flowtable-free.patch |   2 +-
 ...f_tables-allocate-handle-and-delete-objec.patch |  64 ++++-----
 ...f_flow_table-move-init-code-to-nf_flow_ta.patch |   4 +-
 ...f_flow_table-fix-priv-pointer-for-netdev-.patch |   2 +-
 ...f_flow_table-track-flow-tables-in-nf_flow.patch |   4 +-
 .../generic/hack-4.14/904-debloat_dma_buf.patch    |   2 +-
 ...tach-mtd-device-named-ubi-or-data-on-boot.patch |   4 +-
 ...f_flow_table-add-hardware-offload-support.patch |   6 +-
 ...ubi-add-quirk-to-autoload-ubi-on-rt-ac58u.patch |   2 +-
 target/linux/mediatek/patches-4.14/0064-dts.patch  |  14 +-
 28 files changed, 283 insertions(+), 283 deletions(-)

diff --git a/include/kernel-version.mk b/include/kernel-version.mk
index 250ac0f15e..f0d8160e34 100644
--- a/include/kernel-version.mk
+++ b/include/kernel-version.mk
@@ -5,12 +5,12 @@ LINUX_RELEASE?=1
 LINUX_VERSION-3.18 = .71
 LINUX_VERSION-4.4 = .121
 LINUX_VERSION-4.9 = .111
-LINUX_VERSION-4.14 = .52
+LINUX_VERSION-4.14 = .54
 
 LINUX_KERNEL_HASH-3.18.71 = 5abc9778ad44ce02ed6c8ab52ece8a21c6d20d21f6ed8a19287b4a38a50c1240
 LINUX_KERNEL_HASH-4.4.121 = 44a88268b5088dc326b30c9b9133ac35a9a200b636b7268d08f32abeae6ca729
 LINUX_KERNEL_HASH-4.9.111 = 5966558959dc580f163766f3fdefd7e57c01b2b45d51202d00b3807c253759dd
-LINUX_KERNEL_HASH-4.14.52 = a5d226c7b2fd1eb0f01d56e4e2c6a0100784b68df907cc7317f32bde34f88810
+LINUX_KERNEL_HASH-4.14.54 = 451642ac28c539a91072f1fb83b1c061d6d44df870ddf5562400ade5e1c4b6c6
 
 remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
 sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1)))))))
diff --git a/target/linux/brcm47xx/patches-4.14/830-huawei_e970_support.patch b/target/linux/brcm47xx/patches-4.14/830-huawei_e970_support.patch
index b6150ed8fd..5d40fe6541 100644
--- a/target/linux/brcm47xx/patches-4.14/830-huawei_e970_support.patch
+++ b/target/linux/brcm47xx/patches-4.14/830-huawei_e970_support.patch
@@ -8,7 +8,7 @@
  #include <asm/bootinfo.h>
  #include <asm/idle.h>
  #include <asm/prom.h>
-@@ -225,6 +226,33 @@ static struct fixed_phy_status bcm47xx_f
+@@ -231,6 +232,33 @@ static struct fixed_phy_status bcm47xx_f
  	.duplex	= DUPLEX_FULL,
  };
  
@@ -42,7 +42,7 @@
  static int __init bcm47xx_register_bus_complete(void)
  {
  	switch (bcm47xx_bus_type) {
-@@ -244,6 +272,7 @@ static int __init bcm47xx_register_bus_c
+@@ -250,6 +278,7 @@ static int __init bcm47xx_register_bus_c
  	bcm47xx_workarounds();
  
  	fixed_phy_add(PHY_POLL, 0, &bcm47xx_fixed_phy_status, -1);
diff --git a/target/linux/generic/backport-4.14/301-v4.16-netfilter-core-only-allow-one-nat-hook-per-hook-poin.patch b/target/linux/generic/backport-4.14/301-v4.16-netfilter-core-only-allow-one-nat-hook-per-hook-poin.patch
index 711eca0352..5ae8f8f1ed 100644
--- a/target/linux/generic/backport-4.14/301-v4.16-netfilter-core-only-allow-one-nat-hook-per-hook-poin.patch
+++ b/target/linux/generic/backport-4.14/301-v4.16-netfilter-core-only-allow-one-nat-hook-per-hook-poin.patch
@@ -135,7 +135,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  			new->hooks[nhooks] = old->hooks[i];
 --- a/net/netfilter/nf_tables_api.c
 +++ b/net/netfilter/nf_tables_api.c
-@@ -1400,6 +1400,8 @@ static int nf_tables_addchain(struct nft
+@@ -1431,6 +1431,8 @@ static int nf_tables_addchain(struct nft
  				ops->hook = hookfn;
  			if (afi->hook_ops_init)
  				afi->hook_ops_init(ops, i);
diff --git a/target/linux/generic/backport-4.14/303-v4.16-netfilter-nf_tables-remove-multihook-chains-and-fami.patch b/target/linux/generic/backport-4.14/303-v4.16-netfilter-nf_tables-remove-multihook-chains-and-fami.patch
index 81f140441f..f2210259e8 100644
--- a/target/linux/generic/backport-4.14/303-v4.16-netfilter-nf_tables-remove-multihook-chains-and-fami.patch
+++ b/target/linux/generic/backport-4.14/303-v4.16-netfilter-nf_tables-remove-multihook-chains-and-fami.patch
@@ -11,7 +11,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
 
 --- a/include/net/netfilter/nf_tables.h
 +++ b/include/net/netfilter/nf_tables.h
-@@ -892,8 +892,6 @@ struct nft_stats {
+@@ -897,8 +897,6 @@ struct nft_stats {
  	struct u64_stats_sync	syncp;
  };
  
@@ -20,7 +20,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  /**
   *	struct nft_base_chain - nf_tables base chain
   *
-@@ -905,7 +903,7 @@ struct nft_stats {
+@@ -910,7 +908,7 @@ struct nft_stats {
   *	@dev_name: device name that this base chain is attached to (if any)
   */
  struct nft_base_chain {
@@ -29,7 +29,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	const struct nf_chain_type	*type;
  	u8				policy;
  	u8				flags;
-@@ -966,8 +964,6 @@ enum nft_af_flags {
+@@ -971,8 +969,6 @@ enum nft_af_flags {
   *	@owner: module owner
   *	@tables: used internally
   *	@flags: family flags
@@ -38,7 +38,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
   *	@hooks: hookfn overrides for packet validation
   */
  struct nft_af_info {
-@@ -977,9 +973,6 @@ struct nft_af_info {
+@@ -982,9 +978,6 @@ struct nft_af_info {
  	struct module			*owner;
  	struct list_head		tables;
  	u32				flags;
@@ -128,7 +128,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  }
  
  static int nft_trans_table_add(struct nft_ctx *ctx, int msg_type)
-@@ -595,8 +592,7 @@ static void _nf_tables_table_disable(str
+@@ -624,8 +621,7 @@ static void _nf_tables_table_disable(str
  		if (cnt && i++ == cnt)
  			break;
  
@@ -138,7 +138,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	}
  }
  
-@@ -613,8 +609,7 @@ static int nf_tables_table_enable(struct
+@@ -642,8 +638,7 @@ static int nf_tables_table_enable(struct
  		if (!nft_is_base_chain(chain))
  			continue;
  
@@ -148,7 +148,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  		if (err < 0)
  			goto err;
  
-@@ -1026,7 +1021,7 @@ static int nf_tables_fill_chain_info(str
+@@ -1055,7 +1050,7 @@ static int nf_tables_fill_chain_info(str
  
  	if (nft_is_base_chain(chain)) {
  		const struct nft_base_chain *basechain = nft_base_chain(chain);
@@ -157,7 +157,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  		struct nlattr *nest;
  
  		nest = nla_nest_start(skb, NFTA_CHAIN_HOOK);
-@@ -1252,8 +1247,8 @@ static void nf_tables_chain_destroy(stru
+@@ -1283,8 +1278,8 @@ static void nf_tables_chain_destroy(stru
  		free_percpu(basechain->stats);
  		if (basechain->stats)
  			static_branch_dec(&nft_counters_enabled);
@@ -168,7 +168,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  		kfree(chain->name);
  		kfree(basechain);
  	} else {
-@@ -1349,7 +1344,6 @@ static int nf_tables_addchain(struct nft
+@@ -1380,7 +1375,6 @@ static int nf_tables_addchain(struct nft
  	struct nft_stats __percpu *stats;
  	struct net *net = ctx->net;
  	struct nft_chain *chain;
@@ -176,7 +176,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	int err;
  
  	if (table->use == UINT_MAX)
-@@ -1388,21 +1382,18 @@ static int nf_tables_addchain(struct nft
+@@ -1419,21 +1413,18 @@ static int nf_tables_addchain(struct nft
  		basechain->type = hook.type;
  		chain = &basechain->chain;
  
@@ -210,7 +210,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  
  		chain->flags |= NFT_BASE_CHAIN;
  		basechain->policy = policy;
-@@ -1420,7 +1411,7 @@ static int nf_tables_addchain(struct nft
+@@ -1451,7 +1442,7 @@ static int nf_tables_addchain(struct nft
  		goto err1;
  	}
  
@@ -219,7 +219,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	if (err < 0)
  		goto err1;
  
-@@ -1434,7 +1425,7 @@ static int nf_tables_addchain(struct nft
+@@ -1465,7 +1456,7 @@ static int nf_tables_addchain(struct nft
  
  	return 0;
  err2:
@@ -228,7 +228,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  err1:
  	nf_tables_chain_destroy(chain);
  
-@@ -1447,14 +1438,13 @@ static int nf_tables_updchain(struct nft
+@@ -1478,14 +1469,13 @@ static int nf_tables_updchain(struct nft
  	const struct nlattr * const *nla = ctx->nla;
  	struct nft_table *table = ctx->table;
  	struct nft_chain *chain = ctx->chain;
@@ -244,7 +244,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  
  	if (nla[NFTA_CHAIN_HOOK]) {
  		if (!nft_is_base_chain(chain))
-@@ -1471,14 +1461,12 @@ static int nf_tables_updchain(struct nft
+@@ -1502,14 +1492,12 @@ static int nf_tables_updchain(struct nft
  			return -EBUSY;
  		}
  
@@ -265,7 +265,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  		}
  		nft_chain_release_hook(&hook);
  	}
-@@ -5069,10 +5057,9 @@ static int nf_tables_commit(struct net *
+@@ -5112,10 +5100,9 @@ static int nf_tables_commit(struct net *
  		case NFT_MSG_DELCHAIN:
  			list_del_rcu(&trans->ctx.chain->list);
  			nf_tables_chain_notify(&trans->ctx, NFT_MSG_DELCHAIN);
@@ -279,7 +279,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  			break;
  		case NFT_MSG_NEWRULE:
  			nft_clear(trans->ctx.net, nft_trans_rule(trans));
-@@ -5209,10 +5196,9 @@ static int nf_tables_abort(struct net *n
+@@ -5252,10 +5239,9 @@ static int nf_tables_abort(struct net *n
  			} else {
  				trans->ctx.table->use--;
  				list_del_rcu(&trans->ctx.chain->list);
@@ -293,7 +293,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  			}
  			break;
  		case NFT_MSG_DELCHAIN:
-@@ -5313,7 +5299,7 @@ int nft_chain_validate_hooks(const struc
+@@ -5358,7 +5344,7 @@ int nft_chain_validate_hooks(const struc
  	if (nft_is_base_chain(chain)) {
  		basechain = nft_base_chain(chain);
  
@@ -302,7 +302,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  			return 0;
  
  		return -EOPNOTSUPP;
-@@ -5795,8 +5781,7 @@ int __nft_release_basechain(struct nft_c
+@@ -5840,8 +5826,7 @@ int __nft_release_basechain(struct nft_c
  
  	BUG_ON(!nft_is_base_chain(ctx->chain));
  
@@ -312,7 +312,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	list_for_each_entry_safe(rule, nr, &ctx->chain->rules, list) {
  		list_del(&rule->list);
  		ctx->chain->use--;
-@@ -5825,8 +5810,7 @@ static void __nft_release_afinfo(struct
+@@ -5870,8 +5855,7 @@ static void __nft_release_afinfo(struct
  
  	list_for_each_entry_safe(table, nt, &afi->tables, list) {
  		list_for_each_entry(chain, &table->chains, list)
@@ -353,7 +353,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  		strncpy(basechain->dev_name, dev->name, IFNAMSIZ);
 --- a/net/netfilter/nft_compat.c
 +++ b/net/netfilter/nft_compat.c
-@@ -169,7 +169,7 @@ nft_target_set_tgchk_param(struct xt_tgc
+@@ -186,7 +186,7 @@ nft_target_set_tgchk_param(struct xt_tgc
  	if (nft_is_base_chain(ctx->chain)) {
  		const struct nft_base_chain *basechain =
  						nft_base_chain(ctx->chain);
@@ -362,7 +362,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  
  		par->hook_mask = 1 << ops->hooknum;
  	} else {
-@@ -302,7 +302,7 @@ static int nft_target_validate(const str
+@@ -317,7 +317,7 @@ static int nft_target_validate(const str
  	if (nft_is_base_chain(ctx->chain)) {
  		const struct nft_base_chain *basechain =
  						nft_base_chain(ctx->chain);
@@ -371,7 +371,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  
  		hook_mask = 1 << ops->hooknum;
  		if (target->hooks && !(hook_mask & target->hooks))
-@@ -383,7 +383,7 @@ nft_match_set_mtchk_param(struct xt_mtch
+@@ -414,7 +414,7 @@ nft_match_set_mtchk_param(struct xt_mtch
  	if (nft_is_base_chain(ctx->chain)) {
  		const struct nft_base_chain *basechain =
  						nft_base_chain(ctx->chain);
@@ -380,7 +380,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  
  		par->hook_mask = 1 << ops->hooknum;
  	} else {
-@@ -481,7 +481,7 @@ static int nft_match_validate(const stru
+@@ -564,7 +564,7 @@ static int nft_match_validate(const stru
  	if (nft_is_base_chain(ctx->chain)) {
  		const struct nft_base_chain *basechain =
  						nft_base_chain(ctx->chain);
diff --git a/target/linux/generic/backport-4.14/312-v4.16-netfilter-nf_tables-remove-hooks-from-family-definit.patch b/target/linux/generic/backport-4.14/312-v4.16-netfilter-nf_tables-remove-hooks-from-family-definit.patch
index dd969c12a6..3ee8ad9d33 100644
--- a/target/linux/generic/backport-4.14/312-v4.16-netfilter-nf_tables-remove-hooks-from-family-definit.patch
+++ b/target/linux/generic/backport-4.14/312-v4.16-netfilter-nf_tables-remove-hooks-from-family-definit.patch
@@ -10,7 +10,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
 
 --- a/include/net/netfilter/nf_tables.h
 +++ b/include/net/netfilter/nf_tables.h
-@@ -870,7 +870,7 @@ enum nft_chain_type {
+@@ -875,7 +875,7 @@ enum nft_chain_type {
   * 	@family: address family
   * 	@owner: module owner
   * 	@hook_mask: mask of valid hooks
@@ -19,7 +19,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
   */
  struct nf_chain_type {
  	const char			*name;
-@@ -964,7 +964,6 @@ enum nft_af_flags {
+@@ -969,7 +969,6 @@ enum nft_af_flags {
   *	@owner: module owner
   *	@tables: used internally
   *	@flags: family flags
@@ -27,7 +27,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
   */
  struct nft_af_info {
  	struct list_head		list;
-@@ -973,7 +972,6 @@ struct nft_af_info {
+@@ -978,7 +977,6 @@ struct nft_af_info {
  	struct module			*owner;
  	struct list_head		tables;
  	u32				flags;
@@ -151,7 +151,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  static int __init nf_tables_ipv6_init(void)
 --- a/net/netfilter/nf_tables_api.c
 +++ b/net/netfilter/nf_tables_api.c
-@@ -1352,7 +1352,6 @@ static int nf_tables_addchain(struct nft
+@@ -1383,7 +1383,6 @@ static int nf_tables_addchain(struct nft
  	if (nla[NFTA_CHAIN_HOOK]) {
  		struct nft_chain_hook hook;
  		struct nf_hook_ops *ops;
@@ -159,7 +159,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  
  		err = nft_chain_parse_hook(net, nla, afi, &hook, create);
  		if (err < 0)
-@@ -1378,7 +1377,6 @@ static int nf_tables_addchain(struct nft
+@@ -1409,7 +1408,6 @@ static int nf_tables_addchain(struct nft
  			static_branch_inc(&nft_counters_enabled);
  		}
  
@@ -167,7 +167,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  		basechain->type = hook.type;
  		chain = &basechain->chain;
  
-@@ -1387,10 +1385,8 @@ static int nf_tables_addchain(struct nft
+@@ -1418,10 +1416,8 @@ static int nf_tables_addchain(struct nft
  		ops->hooknum	= hook.num;
  		ops->priority	= hook.priority;
  		ops->priv	= chain;
diff --git a/target/linux/generic/backport-4.14/314-v4.16-netfilter-meta-secpath-support.patch b/target/linux/generic/backport-4.14/314-v4.16-netfilter-meta-secpath-support.patch
index d755c17fc3..7aab67fc2c 100644
--- a/target/linux/generic/backport-4.14/314-v4.16-netfilter-meta-secpath-support.patch
+++ b/target/linux/generic/backport-4.14/314-v4.16-netfilter-meta-secpath-support.patch
@@ -40,7 +40,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	default:
  		WARN_ON(1);
  		goto err;
-@@ -308,6 +313,11 @@ int nft_meta_get_init(const struct nft_c
+@@ -310,6 +315,11 @@ int nft_meta_get_init(const struct nft_c
  		prandom_init_once(&nft_prandom_state);
  		len = sizeof(u32);
  		break;
@@ -52,7 +52,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	default:
  		return -EOPNOTSUPP;
  	}
-@@ -318,6 +328,38 @@ int nft_meta_get_init(const struct nft_c
+@@ -320,6 +330,38 @@ int nft_meta_get_init(const struct nft_c
  }
  EXPORT_SYMBOL_GPL(nft_meta_get_init);
  
@@ -91,7 +91,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  int nft_meta_set_validate(const struct nft_ctx *ctx,
  			  const struct nft_expr *expr,
  			  const struct nft_data **data)
-@@ -434,6 +476,7 @@ static const struct nft_expr_ops nft_met
+@@ -436,6 +478,7 @@ static const struct nft_expr_ops nft_met
  	.eval		= nft_meta_get_eval,
  	.init		= nft_meta_get_init,
  	.dump		= nft_meta_get_dump,
diff --git a/target/linux/generic/backport-4.14/321-v4.16-netfilter-nf_tables-add-flow-table-netlink-frontend.patch b/target/linux/generic/backport-4.14/321-v4.16-netfilter-nf_tables-add-flow-table-netlink-frontend.patch
index 9bdacd914f..8266562a82 100644
--- a/target/linux/generic/backport-4.14/321-v4.16-netfilter-nf_tables-add-flow-table-netlink-frontend.patch
+++ b/target/linux/generic/backport-4.14/321-v4.16-netfilter-nf_tables-add-flow-table-netlink-frontend.patch
@@ -50,7 +50,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  #include <net/netlink.h>
  
  #define NFT_JUMP_STACK_SIZE	16
-@@ -933,6 +934,7 @@ unsigned int nft_do_chain(struct nft_pkt
+@@ -938,6 +939,7 @@ unsigned int nft_do_chain(struct nft_pkt
   *	@chains: chains in the table
   *	@sets: sets in the table
   *	@objects: stateful objects in the table
@@ -58,7 +58,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
   *	@hgenerator: handle generator state
   *	@use: number of chain references to this table
   *	@flags: table flag (see enum nft_table_flags)
-@@ -944,6 +946,7 @@ struct nft_table {
+@@ -949,6 +951,7 @@ struct nft_table {
  	struct list_head		chains;
  	struct list_head		sets;
  	struct list_head		objects;
@@ -66,7 +66,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	u64				hgenerator;
  	u32				use;
  	u16				flags:14,
-@@ -1075,6 +1078,44 @@ int nft_register_obj(struct nft_object_t
+@@ -1080,6 +1083,44 @@ int nft_register_obj(struct nft_object_t
  void nft_unregister_obj(struct nft_object_type *obj_type);
  
  /**
@@ -111,7 +111,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
   *	struct nft_traceinfo - nft tracing information and state
   *
   *	@pkt: pktinfo currently processed
-@@ -1310,4 +1351,11 @@ struct nft_trans_obj {
+@@ -1315,4 +1356,11 @@ struct nft_trans_obj {
  #define nft_trans_obj(trans)	\
  	(((struct nft_trans_obj *)trans->data)->obj)
  
@@ -217,7 +217,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  
  /**
   *	nft_register_afinfo - register nf_tables address family info
-@@ -345,6 +347,40 @@ static int nft_delobj(struct nft_ctx *ct
+@@ -374,6 +376,40 @@ static int nft_delobj(struct nft_ctx *ct
  	return err;
  }
  
@@ -258,7 +258,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  /*
   * Tables
   */
-@@ -728,6 +764,7 @@ static int nf_tables_newtable(struct net
+@@ -757,6 +793,7 @@ static int nf_tables_newtable(struct net
  	INIT_LIST_HEAD(&table->chains);
  	INIT_LIST_HEAD(&table->sets);
  	INIT_LIST_HEAD(&table->objects);
@@ -266,7 +266,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	table->flags = flags;
  
  	nft_ctx_init(&ctx, net, skb, nlh, afi, table, NULL, nla);
-@@ -749,10 +786,11 @@ err1:
+@@ -778,10 +815,11 @@ err1:
  
  static int nft_flush_table(struct nft_ctx *ctx)
  {
@@ -279,7 +279,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  
  	list_for_each_entry(chain, &ctx->table->chains, list) {
  		if (!nft_is_active_next(ctx->net, chain))
-@@ -778,6 +816,12 @@ static int nft_flush_table(struct nft_ct
+@@ -807,6 +845,12 @@ static int nft_flush_table(struct nft_ct
  			goto out;
  	}
  
@@ -292,7 +292,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	list_for_each_entry_safe(obj, ne, &ctx->table->objects, list) {
  		err = nft_delobj(ctx, obj);
  		if (err < 0)
-@@ -4774,6 +4818,605 @@ static void nf_tables_obj_notify(const s
+@@ -4817,6 +4861,605 @@ static void nf_tables_obj_notify(const s
  		       ctx->afi->family, ctx->report, GFP_KERNEL);
  }
  
@@ -898,7 +898,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  static int nf_tables_fill_gen_info(struct sk_buff *skb, struct net *net,
  				   u32 portid, u32 seq)
  {
-@@ -4804,6 +5447,49 @@ nla_put_failure:
+@@ -4847,6 +5490,49 @@ nla_put_failure:
  	return -EMSGSIZE;
  }
  
@@ -948,7 +948,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  static void nf_tables_gen_notify(struct net *net, struct sk_buff *skb,
  				 int event)
  {
-@@ -4956,6 +5642,21 @@ static const struct nfnl_callback nf_tab
+@@ -4999,6 +5685,21 @@ static const struct nfnl_callback nf_tab
  		.attr_count	= NFTA_OBJ_MAX,
  		.policy		= nft_obj_policy,
  	},
@@ -970,7 +970,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  };
  
  static void nft_chain_commit_update(struct nft_trans *trans)
-@@ -5001,6 +5702,9 @@ static void nf_tables_commit_release(str
+@@ -5044,6 +5745,9 @@ static void nf_tables_commit_release(str
  	case NFT_MSG_DELOBJ:
  		nft_obj_destroy(nft_trans_obj(trans));
  		break;
@@ -980,7 +980,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	}
  	kfree(trans);
  }
-@@ -5118,6 +5822,21 @@ static int nf_tables_commit(struct net *
+@@ -5161,6 +5865,21 @@ static int nf_tables_commit(struct net *
  			nf_tables_obj_notify(&trans->ctx, nft_trans_obj(trans),
  					     NFT_MSG_DELOBJ);
  			break;
@@ -1002,7 +1002,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  		}
  	}
  
-@@ -5155,6 +5874,9 @@ static void nf_tables_abort_release(stru
+@@ -5198,6 +5917,9 @@ static void nf_tables_abort_release(stru
  	case NFT_MSG_NEWOBJ:
  		nft_obj_destroy(nft_trans_obj(trans));
  		break;
@@ -1012,7 +1012,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	}
  	kfree(trans);
  }
-@@ -5244,6 +5966,17 @@ static int nf_tables_abort(struct net *n
+@@ -5289,6 +6011,17 @@ static int nf_tables_abort(struct net *n
  			nft_clear(trans->ctx.net, nft_trans_obj(trans));
  			nft_trans_destroy(trans);
  			break;
@@ -1030,7 +1030,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  		}
  	}
  
-@@ -5794,6 +6527,7 @@ EXPORT_SYMBOL_GPL(__nft_release_basechai
+@@ -5839,6 +6572,7 @@ EXPORT_SYMBOL_GPL(__nft_release_basechai
  /* Called by nft_unregister_afinfo() from __net_exit path, nfnl_lock is held. */
  static void __nft_release_afinfo(struct net *net, struct nft_af_info *afi)
  {
@@ -1038,7 +1038,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	struct nft_table *table, *nt;
  	struct nft_chain *chain, *nc;
  	struct nft_object *obj, *ne;
-@@ -5807,6 +6541,9 @@ static void __nft_release_afinfo(struct
+@@ -5852,6 +6586,9 @@ static void __nft_release_afinfo(struct
  	list_for_each_entry_safe(table, nt, &afi->tables, list) {
  		list_for_each_entry(chain, &table->chains, list)
  			nf_tables_unregister_hook(net, table, chain);
@@ -1048,8 +1048,8 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  		/* No packets are walking on these chains anymore. */
  		ctx.table = table;
  		list_for_each_entry(chain, &table->chains, list) {
-@@ -5817,6 +6554,11 @@ static void __nft_release_afinfo(struct
- 				nf_tables_rule_destroy(&ctx, rule);
+@@ -5862,6 +6599,11 @@ static void __nft_release_afinfo(struct
+ 				nf_tables_rule_release(&ctx, rule);
  			}
  		}
 +		list_for_each_entry_safe(flowtable, nf, &table->flowtables, list) {
@@ -1060,7 +1060,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  		list_for_each_entry_safe(set, ns, &table->sets, list) {
  			list_del(&set->list);
  			table->use--;
-@@ -5860,6 +6602,8 @@ static int __init nf_tables_module_init(
+@@ -5905,6 +6647,8 @@ static int __init nf_tables_module_init(
  	if (err < 0)
  		goto err3;
  
@@ -1069,7 +1069,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	pr_info("nf_tables: (c) 2007-2009 Patrick McHardy <kaber at trash.net>\n");
  	return register_pernet_subsys(&nf_tables_net_ops);
  err3:
-@@ -5874,6 +6618,7 @@ static void __exit nf_tables_module_exit
+@@ -5919,6 +6663,7 @@ static void __exit nf_tables_module_exit
  {
  	unregister_pernet_subsys(&nf_tables_net_ops);
  	nfnetlink_subsys_unregister(&nf_tables_subsys);
diff --git a/target/linux/generic/backport-4.14/327-v4.16-netfilter-nf_tables-remove-nhooks-field-from-struct-.patch b/target/linux/generic/backport-4.14/327-v4.16-netfilter-nf_tables-remove-nhooks-field-from-struct-.patch
index d1b12ad0d1..307749763a 100644
--- a/target/linux/generic/backport-4.14/327-v4.16-netfilter-nf_tables-remove-nhooks-field-from-struct-.patch
+++ b/target/linux/generic/backport-4.14/327-v4.16-netfilter-nf_tables-remove-nhooks-field-from-struct-.patch
@@ -14,7 +14,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
 
 --- a/include/net/netfilter/nf_tables.h
 +++ b/include/net/netfilter/nf_tables.h
-@@ -963,7 +963,6 @@ enum nft_af_flags {
+@@ -968,7 +968,6 @@ enum nft_af_flags {
   *
   *	@list: used internally
   *	@family: address family
@@ -22,7 +22,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
   *	@owner: module owner
   *	@tables: used internally
   *	@flags: family flags
-@@ -971,7 +970,6 @@ enum nft_af_flags {
+@@ -976,7 +975,6 @@ enum nft_af_flags {
  struct nft_af_info {
  	struct list_head		list;
  	int				family;
@@ -72,7 +72,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  
 --- a/net/netfilter/nf_tables_api.c
 +++ b/net/netfilter/nf_tables_api.c
-@@ -1328,9 +1328,6 @@ static int nft_chain_parse_hook(struct n
+@@ -1359,9 +1359,6 @@ static int nft_chain_parse_hook(struct n
  		return -EINVAL;
  
  	hook->num = ntohl(nla_get_be32(ha[NFTA_HOOK_HOOKNUM]));
@@ -82,7 +82,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	hook->priority = ntohl(nla_get_be32(ha[NFTA_HOOK_PRIORITY]));
  
  	type = chain_type[afi->family][NFT_CHAIN_T_DEFAULT];
-@@ -4926,7 +4923,7 @@ static int nf_tables_flowtable_parse_hoo
+@@ -4969,7 +4966,7 @@ static int nf_tables_flowtable_parse_hoo
  		return -EINVAL;
  
  	hooknum = ntohl(nla_get_be32(tb[NFTA_FLOWTABLE_HOOK_NUM]));
diff --git a/target/linux/generic/backport-4.14/328-v4.16-netfilter-nf_tables-fix-a-typo-in-nf_tables_getflowt.patch b/target/linux/generic/backport-4.14/328-v4.16-netfilter-nf_tables-fix-a-typo-in-nf_tables_getflowt.patch
index 1cfa0ae1c4..94e69790d8 100644
--- a/target/linux/generic/backport-4.14/328-v4.16-netfilter-nf_tables-fix-a-typo-in-nf_tables_getflowt.patch
+++ b/target/linux/generic/backport-4.14/328-v4.16-netfilter-nf_tables-fix-a-typo-in-nf_tables_getflowt.patch
@@ -11,7 +11,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
 
 --- a/net/netfilter/nf_tables_api.c
 +++ b/net/netfilter/nf_tables_api.c
-@@ -5350,7 +5350,7 @@ static int nf_tables_getflowtable(struct
+@@ -5393,7 +5393,7 @@ static int nf_tables_getflowtable(struct
  
  	flowtable = nf_tables_flowtable_lookup(table, nla[NFTA_FLOWTABLE_NAME],
  					       genmask);
diff --git a/target/linux/generic/backport-4.14/330-v4.16-netfilter-nf_tables-remove-flag-field-from-struct-nf.patch b/target/linux/generic/backport-4.14/330-v4.16-netfilter-nf_tables-remove-flag-field-from-struct-nf.patch
index 42aa7b1b0d..c599ad79c2 100644
--- a/target/linux/generic/backport-4.14/330-v4.16-netfilter-nf_tables-remove-flag-field-from-struct-nf.patch
+++ b/target/linux/generic/backport-4.14/330-v4.16-netfilter-nf_tables-remove-flag-field-from-struct-nf.patch
@@ -10,7 +10,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
 
 --- a/include/net/netfilter/nf_tables.h
 +++ b/include/net/netfilter/nf_tables.h
-@@ -954,10 +954,6 @@ struct nft_table {
+@@ -959,10 +959,6 @@ struct nft_table {
  	char				*name;
  };
  
@@ -21,7 +21,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  /**
   *	struct nft_af_info - nf_tables address family info
   *
-@@ -965,14 +961,12 @@ enum nft_af_flags {
+@@ -970,14 +966,12 @@ enum nft_af_flags {
   *	@family: address family
   *	@owner: module owner
   *	@tables: used internally
@@ -38,7 +38,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  int nft_register_afinfo(struct net *, struct nft_af_info *);
 --- a/net/netfilter/nf_tables_api.c
 +++ b/net/netfilter/nf_tables_api.c
-@@ -1345,7 +1345,7 @@ static int nft_chain_parse_hook(struct n
+@@ -1376,7 +1376,7 @@ static int nft_chain_parse_hook(struct n
  	hook->type = type;
  
  	hook->dev = NULL;
diff --git a/target/linux/generic/backport-4.14/331-v4.16-netfilter-nf_tables-no-need-for-struct-nft_af_info-t.patch b/target/linux/generic/backport-4.14/331-v4.16-netfilter-nf_tables-no-need-for-struct-nft_af_info-t.patch
index b4d0130a78..ce46e69d43 100644
--- a/target/linux/generic/backport-4.14/331-v4.16-netfilter-nf_tables-no-need-for-struct-nft_af_info-t.patch
+++ b/target/linux/generic/backport-4.14/331-v4.16-netfilter-nf_tables-no-need-for-struct-nft_af_info-t.patch
@@ -11,7 +11,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
 
 --- a/net/netfilter/nf_tables_api.c
 +++ b/net/netfilter/nf_tables_api.c
-@@ -611,10 +611,7 @@ err:
+@@ -640,10 +640,7 @@ err:
  	return err;
  }
  
@@ -23,7 +23,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  {
  	struct nft_chain *chain;
  	u32 i = 0;
-@@ -632,9 +629,7 @@ static void _nf_tables_table_disable(str
+@@ -661,9 +658,7 @@ static void _nf_tables_table_disable(str
  	}
  }
  
@@ -34,7 +34,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  {
  	struct nft_chain *chain;
  	int err, i = 0;
-@@ -654,15 +649,13 @@ static int nf_tables_table_enable(struct
+@@ -683,15 +678,13 @@ static int nf_tables_table_enable(struct
  	return 0;
  err:
  	if (i)
@@ -53,7 +53,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  }
  
  static int nf_tables_updtable(struct nft_ctx *ctx)
-@@ -691,7 +684,7 @@ static int nf_tables_updtable(struct nft
+@@ -720,7 +713,7 @@ static int nf_tables_updtable(struct nft
  		nft_trans_table_enable(trans) = false;
  	} else if (!(flags & NFT_TABLE_F_DORMANT) &&
  		   ctx->table->flags & NFT_TABLE_F_DORMANT) {
@@ -62,7 +62,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  		if (ret >= 0) {
  			ctx->table->flags &= ~NFT_TABLE_F_DORMANT;
  			nft_trans_table_enable(trans) = true;
-@@ -5728,7 +5721,6 @@ static int nf_tables_commit(struct net *
+@@ -5771,7 +5764,6 @@ static int nf_tables_commit(struct net *
  			if (nft_trans_table_update(trans)) {
  				if (!nft_trans_table_enable(trans)) {
  					nf_tables_table_disable(net,
@@ -70,7 +70,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  								trans->ctx.table);
  					trans->ctx.table->flags |= NFT_TABLE_F_DORMANT;
  				}
-@@ -5890,7 +5882,6 @@ static int nf_tables_abort(struct net *n
+@@ -5933,7 +5925,6 @@ static int nf_tables_abort(struct net *n
  			if (nft_trans_table_update(trans)) {
  				if (nft_trans_table_enable(trans)) {
  					nf_tables_table_disable(net,
diff --git a/target/linux/generic/backport-4.14/332-v4.16-netfilter-nf_tables-remove-struct-nft_af_info-parame.patch b/target/linux/generic/backport-4.14/332-v4.16-netfilter-nf_tables-remove-struct-nft_af_info-parame.patch
index 158f987fef..086178ae20 100644
--- a/target/linux/generic/backport-4.14/332-v4.16-netfilter-nf_tables-remove-struct-nft_af_info-parame.patch
+++ b/target/linux/generic/backport-4.14/332-v4.16-netfilter-nf_tables-remove-struct-nft_af_info-parame.patch
@@ -11,7 +11,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
 
 --- a/net/netfilter/nf_tables_api.c
 +++ b/net/netfilter/nf_tables_api.c
-@@ -423,7 +423,7 @@ static inline u64 nf_tables_alloc_handle
+@@ -452,7 +452,7 @@ static inline u64 nf_tables_alloc_handle
  static const struct nf_chain_type *chain_type[NFPROTO_NUMPROTO][NFT_CHAIN_T_MAX];
  
  static const struct nf_chain_type *
@@ -20,7 +20,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  {
  	int i;
  
-@@ -436,22 +436,20 @@ __nf_tables_chain_type_lookup(int family
+@@ -465,22 +465,20 @@ __nf_tables_chain_type_lookup(int family
  }
  
  static const struct nf_chain_type *
@@ -47,7 +47,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  		if (type != NULL)
  			return ERR_PTR(-EAGAIN);
  	}
-@@ -1325,8 +1323,8 @@ static int nft_chain_parse_hook(struct n
+@@ -1356,8 +1354,8 @@ static int nft_chain_parse_hook(struct n
  
  	type = chain_type[afi->family][NFT_CHAIN_T_DEFAULT];
  	if (nla[NFTA_CHAIN_TYPE]) {
diff --git a/target/linux/generic/backport-4.14/334-v4.15-netfilter-nf_tables-fix-potential-NULL-ptr-deref-in-.patch b/target/linux/generic/backport-4.14/334-v4.15-netfilter-nf_tables-fix-potential-NULL-ptr-deref-in-.patch
index 14921f92a6..91118198ac 100644
--- a/target/linux/generic/backport-4.14/334-v4.15-netfilter-nf_tables-fix-potential-NULL-ptr-deref-in-.patch
+++ b/target/linux/generic/backport-4.14/334-v4.15-netfilter-nf_tables-fix-potential-NULL-ptr-deref-in-.patch
@@ -15,7 +15,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
 
 --- a/net/netfilter/nf_tables_api.c
 +++ b/net/netfilter/nf_tables_api.c
-@@ -5269,8 +5269,10 @@ static int nf_tables_dump_flowtable_done
+@@ -5312,8 +5312,10 @@ static int nf_tables_dump_flowtable_done
  	if (!filter)
  		return 0;
  
diff --git a/target/linux/generic/backport-4.14/335-v4.16-netfilter-nf_tables-add-single-table-list-for-all-fa.patch b/target/linux/generic/backport-4.14/335-v4.16-netfilter-nf_tables-add-single-table-list-for-all-fa.patch
index 787f62ef8f..592b3a832a 100644
--- a/target/linux/generic/backport-4.14/335-v4.16-netfilter-nf_tables-add-single-table-list-for-all-fa.patch
+++ b/target/linux/generic/backport-4.14/335-v4.16-netfilter-nf_tables-add-single-table-list-for-all-fa.patch
@@ -42,7 +42,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	bool				report;
  };
  
-@@ -939,6 +939,7 @@ unsigned int nft_do_chain(struct nft_pkt
+@@ -944,6 +944,7 @@ unsigned int nft_do_chain(struct nft_pkt
   *	@use: number of chain references to this table
   *	@flags: table flag (see enum nft_table_flags)
   *	@genmask: generation mask
@@ -50,7 +50,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
   *	@name: name of the table
   */
  struct nft_table {
-@@ -951,6 +952,7 @@ struct nft_table {
+@@ -956,6 +957,7 @@ struct nft_table {
  	u32				use;
  	u16				flags:14,
  					genmask:2;
@@ -58,7 +58,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	char				*name;
  };
  
-@@ -960,13 +962,11 @@ struct nft_table {
+@@ -965,13 +967,11 @@ struct nft_table {
   *	@list: used internally
   *	@family: address family
   *	@owner: module owner
@@ -108,7 +108,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	ctx->table	= table;
  	ctx->chain	= chain;
  	ctx->nla   	= nla;
-@@ -385,30 +384,31 @@ static int nft_delflowtable(struct nft_c
+@@ -414,30 +413,31 @@ static int nft_delflowtable(struct nft_c
   * Tables
   */
  
@@ -146,7 +146,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	if (table != NULL)
  		return table;
  
-@@ -507,7 +507,7 @@ static void nf_tables_table_notify(const
+@@ -536,7 +536,7 @@ static void nf_tables_table_notify(const
  		goto err;
  
  	err = nf_tables_fill_table_info(skb, ctx->net, ctx->portid, ctx->seq,
@@ -155,7 +155,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	if (err < 0) {
  		kfree_skb(skb);
  		goto err;
-@@ -524,7 +524,6 @@ static int nf_tables_dump_tables(struct
+@@ -553,7 +553,6 @@ static int nf_tables_dump_tables(struct
  				 struct netlink_callback *cb)
  {
  	const struct nfgenmsg *nfmsg = nlmsg_data(cb->nlh);
@@ -163,7 +163,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	const struct nft_table *table;
  	unsigned int idx = 0, s_idx = cb->args[0];
  	struct net *net = sock_net(skb->sk);
-@@ -533,30 +532,27 @@ static int nf_tables_dump_tables(struct
+@@ -562,30 +561,27 @@ static int nf_tables_dump_tables(struct
  	rcu_read_lock();
  	cb->seq = net->nft.base_seq;
  
@@ -211,7 +211,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	}
  done:
  	rcu_read_unlock();
-@@ -588,7 +584,8 @@ static int nf_tables_gettable(struct net
+@@ -617,7 +613,8 @@ static int nf_tables_gettable(struct net
  	if (IS_ERR(afi))
  		return PTR_ERR(afi);
  
@@ -221,7 +221,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	if (IS_ERR(table))
  		return PTR_ERR(table);
  
-@@ -719,7 +716,7 @@ static int nf_tables_newtable(struct net
+@@ -748,7 +745,7 @@ static int nf_tables_newtable(struct net
  		return PTR_ERR(afi);
  
  	name = nla[NFTA_TABLE_NAME];
@@ -230,7 +230,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	if (IS_ERR(table)) {
  		if (PTR_ERR(table) != -ENOENT)
  			return PTR_ERR(table);
-@@ -729,7 +726,7 @@ static int nf_tables_newtable(struct net
+@@ -758,7 +755,7 @@ static int nf_tables_newtable(struct net
  		if (nlh->nlmsg_flags & NLM_F_REPLACE)
  			return -EOPNOTSUPP;
  
@@ -239,7 +239,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  		return nf_tables_updtable(&ctx);
  	}
  
-@@ -756,14 +753,15 @@ static int nf_tables_newtable(struct net
+@@ -785,14 +782,15 @@ static int nf_tables_newtable(struct net
  	INIT_LIST_HEAD(&table->sets);
  	INIT_LIST_HEAD(&table->objects);
  	INIT_LIST_HEAD(&table->flowtables);
@@ -257,7 +257,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	return 0;
  err4:
  	kfree(table->name);
-@@ -837,30 +835,28 @@ out:
+@@ -866,30 +864,28 @@ out:
  
  static int nft_flush(struct nft_ctx *ctx, int family)
  {
@@ -301,7 +301,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	}
  out:
  	return err;
-@@ -878,7 +874,7 @@ static int nf_tables_deltable(struct net
+@@ -907,7 +903,7 @@ static int nf_tables_deltable(struct net
  	int family = nfmsg->nfgen_family;
  	struct nft_ctx ctx;
  
@@ -310,7 +310,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	if (family == AF_UNSPEC || nla[NFTA_TABLE_NAME] == NULL)
  		return nft_flush(&ctx, family);
  
-@@ -886,7 +882,8 @@ static int nf_tables_deltable(struct net
+@@ -915,7 +911,8 @@ static int nf_tables_deltable(struct net
  	if (IS_ERR(afi))
  		return PTR_ERR(afi);
  
@@ -320,7 +320,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	if (IS_ERR(table))
  		return PTR_ERR(table);
  
-@@ -894,7 +891,7 @@ static int nf_tables_deltable(struct net
+@@ -923,7 +920,7 @@ static int nf_tables_deltable(struct net
  	    table->use > 0)
  		return -EBUSY;
  
@@ -329,7 +329,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	ctx.table = table;
  
  	return nft_flush_table(&ctx);
-@@ -906,7 +903,7 @@ static void nf_tables_table_destroy(stru
+@@ -935,7 +932,7 @@ static void nf_tables_table_destroy(stru
  
  	kfree(ctx->table->name);
  	kfree(ctx->table);
@@ -338,7 +338,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  }
  
  int nft_register_chain_type(const struct nf_chain_type *ctype)
-@@ -1107,7 +1104,7 @@ static void nf_tables_chain_notify(const
+@@ -1136,7 +1133,7 @@ static void nf_tables_chain_notify(const
  		goto err;
  
  	err = nf_tables_fill_chain_info(skb, ctx->net, ctx->portid, ctx->seq,
@@ -347,7 +347,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  					ctx->chain);
  	if (err < 0) {
  		kfree_skb(skb);
-@@ -1125,7 +1122,6 @@ static int nf_tables_dump_chains(struct
+@@ -1154,7 +1151,6 @@ static int nf_tables_dump_chains(struct
  				 struct netlink_callback *cb)
  {
  	const struct nfgenmsg *nfmsg = nlmsg_data(cb->nlh);
@@ -355,7 +355,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	const struct nft_table *table;
  	const struct nft_chain *chain;
  	unsigned int idx = 0, s_idx = cb->args[0];
-@@ -1135,31 +1131,30 @@ static int nf_tables_dump_chains(struct
+@@ -1164,31 +1160,30 @@ static int nf_tables_dump_chains(struct
  	rcu_read_lock();
  	cb->seq = net->nft.base_seq;
  
@@ -407,7 +407,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  		}
  	}
  done:
-@@ -1193,7 +1188,8 @@ static int nf_tables_getchain(struct net
+@@ -1222,7 +1217,8 @@ static int nf_tables_getchain(struct net
  	if (IS_ERR(afi))
  		return PTR_ERR(afi);
  
@@ -417,7 +417,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	if (IS_ERR(table))
  		return PTR_ERR(table);
  
-@@ -1301,8 +1297,8 @@ struct nft_chain_hook {
+@@ -1332,8 +1328,8 @@ struct nft_chain_hook {
  
  static int nft_chain_parse_hook(struct net *net,
  				const struct nlattr * const nla[],
@@ -428,7 +428,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  {
  	struct nlattr *ha[NFTA_HOOK_MAX + 1];
  	const struct nf_chain_type *type;
-@@ -1321,10 +1317,10 @@ static int nft_chain_parse_hook(struct n
+@@ -1352,10 +1348,10 @@ static int nft_chain_parse_hook(struct n
  	hook->num = ntohl(nla_get_be32(ha[NFTA_HOOK_HOOKNUM]));
  	hook->priority = ntohl(nla_get_be32(ha[NFTA_HOOK_PRIORITY]));
  
@@ -441,7 +441,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  		if (IS_ERR(type))
  			return PTR_ERR(type);
  	}
-@@ -1336,7 +1332,7 @@ static int nft_chain_parse_hook(struct n
+@@ -1367,7 +1363,7 @@ static int nft_chain_parse_hook(struct n
  	hook->type = type;
  
  	hook->dev = NULL;
@@ -450,7 +450,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  		char ifname[IFNAMSIZ];
  
  		if (!ha[NFTA_HOOK_DEV]) {
-@@ -1371,7 +1367,6 @@ static int nf_tables_addchain(struct nft
+@@ -1402,7 +1398,6 @@ static int nf_tables_addchain(struct nft
  {
  	const struct nlattr * const *nla = ctx->nla;
  	struct nft_table *table = ctx->table;
@@ -458,7 +458,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	struct nft_base_chain *basechain;
  	struct nft_stats __percpu *stats;
  	struct net *net = ctx->net;
-@@ -1385,7 +1380,7 @@ static int nf_tables_addchain(struct nft
+@@ -1416,7 +1411,7 @@ static int nf_tables_addchain(struct nft
  		struct nft_chain_hook hook;
  		struct nf_hook_ops *ops;
  
@@ -467,7 +467,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  		if (err < 0)
  			return err;
  
-@@ -1478,7 +1473,7 @@ static int nf_tables_updchain(struct nft
+@@ -1509,7 +1504,7 @@ static int nf_tables_updchain(struct nft
  		if (!nft_is_base_chain(chain))
  			return -EBUSY;
  
@@ -476,7 +476,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  					   create);
  		if (err < 0)
  			return err;
-@@ -1571,7 +1566,8 @@ static int nf_tables_newchain(struct net
+@@ -1602,7 +1597,8 @@ static int nf_tables_newchain(struct net
  	if (IS_ERR(afi))
  		return PTR_ERR(afi);
  
@@ -486,7 +486,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	if (IS_ERR(table))
  		return PTR_ERR(table);
  
-@@ -1611,7 +1607,7 @@ static int nf_tables_newchain(struct net
+@@ -1642,7 +1638,7 @@ static int nf_tables_newchain(struct net
  		}
  	}
  
@@ -495,7 +495,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  
  	if (chain != NULL) {
  		if (nlh->nlmsg_flags & NLM_F_EXCL)
-@@ -1645,7 +1641,8 @@ static int nf_tables_delchain(struct net
+@@ -1676,7 +1672,8 @@ static int nf_tables_delchain(struct net
  	if (IS_ERR(afi))
  		return PTR_ERR(afi);
  
@@ -505,7 +505,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	if (IS_ERR(table))
  		return PTR_ERR(table);
  
-@@ -1657,7 +1654,7 @@ static int nf_tables_delchain(struct net
+@@ -1688,7 +1685,7 @@ static int nf_tables_delchain(struct net
  	    chain->use > 0)
  		return -EBUSY;
  
@@ -514,7 +514,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  
  	use = chain->use;
  	list_for_each_entry(rule, &chain->rules, list) {
-@@ -1822,7 +1819,7 @@ static int nf_tables_expr_parse(const st
+@@ -1853,7 +1850,7 @@ static int nf_tables_expr_parse(const st
  	if (err < 0)
  		return err;
  
@@ -523,7 +523,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	if (IS_ERR(type))
  		return PTR_ERR(type);
  
-@@ -2045,7 +2042,7 @@ static void nf_tables_rule_notify(const
+@@ -2077,7 +2074,7 @@ static void nf_tables_rule_notify(const
  		goto err;
  
  	err = nf_tables_fill_rule_info(skb, ctx->net, ctx->portid, ctx->seq,
@@ -532,7 +532,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  				       ctx->chain, rule);
  	if (err < 0) {
  		kfree_skb(skb);
-@@ -2069,7 +2066,6 @@ static int nf_tables_dump_rules(struct s
+@@ -2101,7 +2098,6 @@ static int nf_tables_dump_rules(struct s
  {
  	const struct nfgenmsg *nfmsg = nlmsg_data(cb->nlh);
  	const struct nft_rule_dump_ctx *ctx = cb->data;
@@ -540,7 +540,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	const struct nft_table *table;
  	const struct nft_chain *chain;
  	const struct nft_rule *rule;
-@@ -2080,39 +2076,37 @@ static int nf_tables_dump_rules(struct s
+@@ -2112,39 +2108,37 @@ static int nf_tables_dump_rules(struct s
  	rcu_read_lock();
  	cb->seq = net->nft.base_seq;
  
@@ -605,7 +605,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  			}
  		}
  	}
-@@ -2190,7 +2184,8 @@ static int nf_tables_getrule(struct net
+@@ -2222,7 +2216,8 @@ static int nf_tables_getrule(struct net
  	if (IS_ERR(afi))
  		return PTR_ERR(afi);
  
@@ -615,7 +615,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	if (IS_ERR(table))
  		return PTR_ERR(table);
  
-@@ -2267,7 +2262,8 @@ static int nf_tables_newrule(struct net
+@@ -2306,7 +2301,8 @@ static int nf_tables_newrule(struct net
  	if (IS_ERR(afi))
  		return PTR_ERR(afi);
  
@@ -625,7 +625,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	if (IS_ERR(table))
  		return PTR_ERR(table);
  
-@@ -2306,7 +2302,7 @@ static int nf_tables_newrule(struct net
+@@ -2345,7 +2341,7 @@ static int nf_tables_newrule(struct net
  			return PTR_ERR(old_rule);
  	}
  
@@ -634,7 +634,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  
  	n = 0;
  	size = 0;
-@@ -2446,7 +2442,8 @@ static int nf_tables_delrule(struct net
+@@ -2485,7 +2481,8 @@ static int nf_tables_delrule(struct net
  	if (IS_ERR(afi))
  		return PTR_ERR(afi);
  
@@ -644,7 +644,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	if (IS_ERR(table))
  		return PTR_ERR(table);
  
-@@ -2457,7 +2454,7 @@ static int nf_tables_delrule(struct net
+@@ -2496,7 +2493,7 @@ static int nf_tables_delrule(struct net
  			return PTR_ERR(chain);
  	}
  
@@ -653,7 +653,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  
  	if (chain) {
  		if (nla[NFTA_RULE_HANDLE]) {
-@@ -2655,13 +2652,13 @@ static int nft_ctx_init_from_setattr(str
+@@ -2694,13 +2691,13 @@ static int nft_ctx_init_from_setattr(str
  		if (afi == NULL)
  			return -EAFNOSUPPORT;
  
@@ -670,7 +670,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	return 0;
  }
  
-@@ -2788,7 +2785,7 @@ static int nf_tables_fill_set(struct sk_
+@@ -2827,7 +2824,7 @@ static int nf_tables_fill_set(struct sk_
  		goto nla_put_failure;
  
  	nfmsg = nlmsg_data(nlh);
@@ -679,7 +679,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	nfmsg->version		= NFNETLINK_V0;
  	nfmsg->res_id		= htons(ctx->net->nft.base_seq & 0xffff);
  
-@@ -2880,10 +2877,8 @@ static int nf_tables_dump_sets(struct sk
+@@ -2919,10 +2916,8 @@ static int nf_tables_dump_sets(struct sk
  {
  	const struct nft_set *set;
  	unsigned int idx, s_idx = cb->args[0];
@@ -690,7 +690,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	struct nft_ctx *ctx = cb->data, ctx_set;
  
  	if (cb->args[1])
-@@ -2892,51 +2887,44 @@ static int nf_tables_dump_sets(struct sk
+@@ -2931,51 +2926,44 @@ static int nf_tables_dump_sets(struct sk
  	rcu_read_lock();
  	cb->seq = net->nft.base_seq;
  
@@ -771,7 +771,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	}
  	cb->args[1] = 1;
  done:
-@@ -3146,11 +3134,12 @@ static int nf_tables_newset(struct net *
+@@ -3185,11 +3173,12 @@ static int nf_tables_newset(struct net *
  	if (IS_ERR(afi))
  		return PTR_ERR(afi);
  
@@ -786,7 +786,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  
  	set = nf_tables_set_lookup(table, nla[NFTA_SET_NAME], genmask);
  	if (IS_ERR(set)) {
-@@ -3417,12 +3406,12 @@ static int nft_ctx_init_from_elemattr(st
+@@ -3458,12 +3447,12 @@ static int nft_ctx_init_from_elemattr(st
  	if (IS_ERR(afi))
  		return PTR_ERR(afi);
  
@@ -802,7 +802,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	return 0;
  }
  
-@@ -3527,7 +3516,6 @@ static int nf_tables_dump_set(struct sk_
+@@ -3568,7 +3557,6 @@ static int nf_tables_dump_set(struct sk_
  {
  	struct nft_set_dump_ctx *dump_ctx = cb->data;
  	struct net *net = sock_net(skb->sk);
@@ -810,7 +810,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	struct nft_table *table;
  	struct nft_set *set;
  	struct nft_set_dump_args args;
-@@ -3539,21 +3527,19 @@ static int nf_tables_dump_set(struct sk_
+@@ -3580,21 +3568,19 @@ static int nf_tables_dump_set(struct sk_
  	int event;
  
  	rcu_read_lock();
@@ -841,7 +841,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  		}
  		break;
  	}
-@@ -3573,7 +3559,7 @@ static int nf_tables_dump_set(struct sk_
+@@ -3614,7 +3600,7 @@ static int nf_tables_dump_set(struct sk_
  		goto nla_put_failure;
  
  	nfmsg = nlmsg_data(nlh);
@@ -850,7 +850,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	nfmsg->version      = NFNETLINK_V0;
  	nfmsg->res_id	    = htons(net->nft.base_seq & 0xffff);
  
-@@ -3675,7 +3661,7 @@ static int nf_tables_fill_setelem_info(s
+@@ -3716,7 +3702,7 @@ static int nf_tables_fill_setelem_info(s
  		goto nla_put_failure;
  
  	nfmsg = nlmsg_data(nlh);
@@ -859,7 +859,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	nfmsg->version		= NFNETLINK_V0;
  	nfmsg->res_id		= htons(ctx->net->nft.base_seq & 0xffff);
  
-@@ -3919,7 +3905,7 @@ static int nft_add_set_elem(struct nft_c
+@@ -3960,7 +3946,7 @@ static int nft_add_set_elem(struct nft_c
  		list_for_each_entry(binding, &set->bindings, list) {
  			struct nft_ctx bind_ctx = {
  				.net	= ctx->net,
@@ -868,7 +868,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  				.table	= ctx->table,
  				.chain	= (struct nft_chain *)binding->chain,
  			};
-@@ -4466,7 +4452,8 @@ static int nf_tables_newobj(struct net *
+@@ -4509,7 +4495,8 @@ static int nf_tables_newobj(struct net *
  	if (IS_ERR(afi))
  		return PTR_ERR(afi);
  
@@ -878,7 +878,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	if (IS_ERR(table))
  		return PTR_ERR(table);
  
-@@ -4484,7 +4471,7 @@ static int nf_tables_newobj(struct net *
+@@ -4527,7 +4514,7 @@ static int nf_tables_newobj(struct net *
  		return 0;
  	}
  
@@ -887,7 +887,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  
  	type = nft_obj_type_get(objtype);
  	if (IS_ERR(type))
-@@ -4561,7 +4548,6 @@ struct nft_obj_filter {
+@@ -4604,7 +4591,6 @@ struct nft_obj_filter {
  static int nf_tables_dump_obj(struct sk_buff *skb, struct netlink_callback *cb)
  {
  	const struct nfgenmsg *nfmsg = nlmsg_data(cb->nlh);
@@ -895,7 +895,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	const struct nft_table *table;
  	unsigned int idx = 0, s_idx = cb->args[0];
  	struct nft_obj_filter *filter = cb->data;
-@@ -4576,38 +4562,37 @@ static int nf_tables_dump_obj(struct sk_
+@@ -4619,38 +4605,37 @@ static int nf_tables_dump_obj(struct sk_
  	rcu_read_lock();
  	cb->seq = net->nft.base_seq;
  
@@ -914,7 +914,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
 -				if (idx > s_idx)
 -					memset(&cb->args[1], 0,
 -					       sizeof(cb->args) - sizeof(cb->args[0]));
--				if (filter && filter->table[0] &&
+-				if (filter && filter->table &&
 -				    strcmp(filter->table, table->name))
 -					goto cont;
 -				if (filter &&
@@ -960,7 +960,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  		}
  	}
  done:
-@@ -4694,7 +4679,8 @@ static int nf_tables_getobj(struct net *
+@@ -4737,7 +4722,8 @@ static int nf_tables_getobj(struct net *
  	if (IS_ERR(afi))
  		return PTR_ERR(afi);
  
@@ -970,7 +970,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	if (IS_ERR(table))
  		return PTR_ERR(table);
  
-@@ -4754,7 +4740,8 @@ static int nf_tables_delobj(struct net *
+@@ -4797,7 +4783,8 @@ static int nf_tables_delobj(struct net *
  	if (IS_ERR(afi))
  		return PTR_ERR(afi);
  
@@ -980,7 +980,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	if (IS_ERR(table))
  		return PTR_ERR(table);
  
-@@ -4765,7 +4752,7 @@ static int nf_tables_delobj(struct net *
+@@ -4808,7 +4795,7 @@ static int nf_tables_delobj(struct net *
  	if (obj->use > 0)
  		return -EBUSY;
  
@@ -989,7 +989,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  
  	return nft_delobj(&ctx, obj);
  }
-@@ -4803,7 +4790,7 @@ static void nf_tables_obj_notify(const s
+@@ -4846,7 +4833,7 @@ static void nf_tables_obj_notify(const s
  				 struct nft_object *obj, int event)
  {
  	nft_obj_notify(ctx->net, ctx->table, obj, ctx->portid, ctx->seq, event,
@@ -998,7 +998,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  }
  
  /*
-@@ -4993,7 +4980,7 @@ void nft_flow_table_iterate(struct net *
+@@ -5036,7 +5023,7 @@ void nft_flow_table_iterate(struct net *
  
  	rcu_read_lock();
  	list_for_each_entry_rcu(afi, &net->nft.af_info, list) {
@@ -1007,7 +1007,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  			list_for_each_entry_rcu(flowtable, &table->flowtables, list) {
  				iter(&flowtable->data, data);
  			}
-@@ -5041,7 +5028,8 @@ static int nf_tables_newflowtable(struct
+@@ -5084,7 +5071,8 @@ static int nf_tables_newflowtable(struct
  	if (IS_ERR(afi))
  		return PTR_ERR(afi);
  
@@ -1017,7 +1017,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	if (IS_ERR(table))
  		return PTR_ERR(table);
  
-@@ -5058,7 +5046,7 @@ static int nf_tables_newflowtable(struct
+@@ -5101,7 +5089,7 @@ static int nf_tables_newflowtable(struct
  		return 0;
  	}
  
@@ -1026,7 +1026,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  
  	flowtable = kzalloc(sizeof(*flowtable), GFP_KERNEL);
  	if (!flowtable)
-@@ -5139,7 +5127,8 @@ static int nf_tables_delflowtable(struct
+@@ -5182,7 +5170,8 @@ static int nf_tables_delflowtable(struct
  	if (IS_ERR(afi))
  		return PTR_ERR(afi);
  
@@ -1036,7 +1036,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	if (IS_ERR(table))
  		return PTR_ERR(table);
  
-@@ -5150,7 +5139,7 @@ static int nf_tables_delflowtable(struct
+@@ -5193,7 +5182,7 @@ static int nf_tables_delflowtable(struct
  	if (flowtable->use > 0)
  		return -EBUSY;
  
@@ -1045,7 +1045,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  
  	return nft_delflowtable(&ctx, flowtable);
  }
-@@ -5219,40 +5208,37 @@ static int nf_tables_dump_flowtable(stru
+@@ -5262,40 +5251,37 @@ static int nf_tables_dump_flowtable(stru
  	struct net *net = sock_net(skb->sk);
  	int family = nfmsg->nfgen_family;
  	struct nft_flowtable *flowtable;
@@ -1107,7 +1107,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  		}
  	}
  done:
-@@ -5337,7 +5323,8 @@ static int nf_tables_getflowtable(struct
+@@ -5380,7 +5366,8 @@ static int nf_tables_getflowtable(struct
  	if (IS_ERR(afi))
  		return PTR_ERR(afi);
  
@@ -1117,7 +1117,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	if (IS_ERR(table))
  		return PTR_ERR(table);
  
-@@ -5380,7 +5367,7 @@ static void nf_tables_flowtable_notify(s
+@@ -5423,7 +5410,7 @@ static void nf_tables_flowtable_notify(s
  
  	err = nf_tables_fill_flowtable_info(skb, ctx->net, ctx->portid,
  					    ctx->seq, event, 0,
@@ -1126,7 +1126,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	if (err < 0) {
  		kfree_skb(skb);
  		goto err;
-@@ -5458,17 +5445,14 @@ static int nf_tables_flowtable_event(str
+@@ -5501,17 +5488,14 @@ static int nf_tables_flowtable_event(str
  	struct net_device *dev = netdev_notifier_info_to_dev(ptr);
  	struct nft_flowtable *flowtable;
  	struct nft_table *table;
@@ -1147,7 +1147,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  		}
  	}
  	nfnl_unlock(NFNL_SUBSYS_NFTABLES);
-@@ -6487,6 +6471,7 @@ EXPORT_SYMBOL_GPL(nft_data_dump);
+@@ -6532,6 +6516,7 @@ EXPORT_SYMBOL_GPL(nft_data_dump);
  static int __net_init nf_tables_init_net(struct net *net)
  {
  	INIT_LIST_HEAD(&net->nft.af_info);
@@ -1155,7 +1155,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	INIT_LIST_HEAD(&net->nft.commit_list);
  	net->nft.base_seq = 1;
  	return 0;
-@@ -6523,10 +6508,10 @@ static void __nft_release_afinfo(struct
+@@ -6568,10 +6553,10 @@ static void __nft_release_afinfo(struct
  	struct nft_set *set, *ns;
  	struct nft_ctx ctx = {
  		.net	= net,
@@ -1210,7 +1210,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	nfnl_unlock(NFNL_SUBSYS_NFTABLES);
 --- a/net/netfilter/nft_compat.c
 +++ b/net/netfilter/nft_compat.c
-@@ -144,7 +144,7 @@ nft_target_set_tgchk_param(struct xt_tgc
+@@ -161,7 +161,7 @@ nft_target_set_tgchk_param(struct xt_tgc
  {
  	par->net	= ctx->net;
  	par->table	= ctx->table->name;
@@ -1219,7 +1219,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	case AF_INET:
  		entry->e4.ip.proto = proto;
  		entry->e4.ip.invflags = inv ? IPT_INV_PROTO : 0;
-@@ -175,7 +175,7 @@ nft_target_set_tgchk_param(struct xt_tgc
+@@ -192,7 +192,7 @@ nft_target_set_tgchk_param(struct xt_tgc
  	} else {
  		par->hook_mask = 0;
  	}
@@ -1228,7 +1228,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	par->nft_compat = true;
  }
  
-@@ -267,7 +267,7 @@ nft_target_destroy(const struct nft_ctx
+@@ -282,7 +282,7 @@ nft_target_destroy(const struct nft_ctx
  	par.net = ctx->net;
  	par.target = target;
  	par.targinfo = info;
@@ -1237,7 +1237,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	if (par.target->destroy != NULL)
  		par.target->destroy(&par);
  
-@@ -358,7 +358,7 @@ nft_match_set_mtchk_param(struct xt_mtch
+@@ -389,7 +389,7 @@ nft_match_set_mtchk_param(struct xt_mtch
  {
  	par->net	= ctx->net;
  	par->table	= ctx->table->name;
@@ -1246,7 +1246,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	case AF_INET:
  		entry->e4.ip.proto = proto;
  		entry->e4.ip.invflags = inv ? IPT_INV_PROTO : 0;
-@@ -389,7 +389,7 @@ nft_match_set_mtchk_param(struct xt_mtch
+@@ -420,7 +420,7 @@ nft_match_set_mtchk_param(struct xt_mtch
  	} else {
  		par->hook_mask = 0;
  	}
@@ -1255,7 +1255,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	par->nft_compat = true;
  }
  
-@@ -446,7 +446,7 @@ nft_match_destroy(const struct nft_ctx *
+@@ -502,7 +502,7 @@ __nft_match_destroy(const struct nft_ctx
  	par.net = ctx->net;
  	par.match = match;
  	par.matchinfo = info;
@@ -1264,7 +1264,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	if (par.match->destroy != NULL)
  		par.match->destroy(&par);
  
-@@ -648,7 +648,7 @@ nft_match_select_ops(const struct nft_ct
+@@ -732,7 +732,7 @@ nft_match_select_ops(const struct nft_ct
  
  	mt_name = nla_data(tb[NFTA_MATCH_NAME]);
  	rev = ntohl(nla_get_be32(tb[NFTA_MATCH_REV]));
@@ -1273,7 +1273,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  
  	/* Re-use the existing match if it's already loaded. */
  	list_for_each_entry(nft_match, &nft_match_list, head) {
-@@ -733,7 +733,7 @@ nft_target_select_ops(const struct nft_c
+@@ -823,7 +823,7 @@ nft_target_select_ops(const struct nft_c
  
  	tg_name = nla_data(tb[NFTA_TARGET_NAME]);
  	rev = ntohl(nla_get_be32(tb[NFTA_TARGET_REV]));
@@ -1408,7 +1408,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  
 --- a/net/netfilter/nft_meta.c
 +++ b/net/netfilter/nft_meta.c
-@@ -339,7 +339,7 @@ static int nft_meta_get_validate(const s
+@@ -341,7 +341,7 @@ static int nft_meta_get_validate(const s
  	if (priv->key != NFT_META_SECPATH)
  		return 0;
  
@@ -1417,7 +1417,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	case NFPROTO_NETDEV:
  		hooks = 1 << NF_NETDEV_INGRESS;
  		break;
-@@ -370,7 +370,7 @@ int nft_meta_set_validate(const struct n
+@@ -372,7 +372,7 @@ int nft_meta_set_validate(const struct n
  	if (priv->key != NFT_META_PKTTYPE)
  		return 0;
  
diff --git a/target/linux/generic/backport-4.14/336-v4.15-netfilter-exit_net-cleanup-check-added.patch b/target/linux/generic/backport-4.14/336-v4.15-netfilter-exit_net-cleanup-check-added.patch
index 431098fa09..37975ae038 100644
--- a/target/linux/generic/backport-4.14/336-v4.15-netfilter-exit_net-cleanup-check-added.patch
+++ b/target/linux/generic/backport-4.14/336-v4.15-netfilter-exit_net-cleanup-check-added.patch
@@ -21,7 +21,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  static struct pernet_operations clusterip_net_ops = {
 --- a/net/netfilter/nf_tables_api.c
 +++ b/net/netfilter/nf_tables_api.c
-@@ -6477,6 +6477,12 @@ static int __net_init nf_tables_init_net
+@@ -6522,6 +6522,12 @@ static int __net_init nf_tables_init_net
  	return 0;
  }
  
@@ -34,7 +34,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  int __nft_release_basechain(struct nft_ctx *ctx)
  {
  	struct nft_rule *rule, *nr;
-@@ -6554,6 +6560,7 @@ static void __nft_release_afinfo(struct
+@@ -6599,6 +6605,7 @@ static void __nft_release_afinfo(struct
  
  static struct pernet_operations nf_tables_net_ops = {
  	.init	= nf_tables_init_net,
diff --git a/target/linux/generic/backport-4.14/337-v4.16-netfilter-nf_tables-get-rid-of-pernet-families.patch b/target/linux/generic/backport-4.14/337-v4.16-netfilter-nf_tables-get-rid-of-pernet-families.patch
index 1db472dd6a..2683f5b031 100644
--- a/target/linux/generic/backport-4.14/337-v4.16-netfilter-nf_tables-get-rid-of-pernet-families.patch
+++ b/target/linux/generic/backport-4.14/337-v4.16-netfilter-nf_tables-get-rid-of-pernet-families.patch
@@ -14,7 +14,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
 
 --- a/include/net/netfilter/nf_tables.h
 +++ b/include/net/netfilter/nf_tables.h
-@@ -969,8 +969,8 @@ struct nft_af_info {
+@@ -974,8 +974,8 @@ struct nft_af_info {
  	struct module			*owner;
  };
  
@@ -364,7 +364,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  		if (afi->family == family)
  			return afi;
  	}
-@@ -4975,15 +4973,12 @@ void nft_flow_table_iterate(struct net *
+@@ -5018,15 +5016,12 @@ void nft_flow_table_iterate(struct net *
  			    void *data)
  {
  	struct nft_flowtable *flowtable;
@@ -383,7 +383,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  		}
  	}
  	rcu_read_unlock();
-@@ -6468,21 +6463,6 @@ int nft_data_dump(struct sk_buff *skb, i
+@@ -6513,21 +6508,6 @@ int nft_data_dump(struct sk_buff *skb, i
  }
  EXPORT_SYMBOL_GPL(nft_data_dump);
  
@@ -405,7 +405,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  int __nft_release_basechain(struct nft_ctx *ctx)
  {
  	struct nft_rule *rule, *nr;
-@@ -6503,8 +6483,7 @@ int __nft_release_basechain(struct nft_c
+@@ -6548,8 +6528,7 @@ int __nft_release_basechain(struct nft_c
  }
  EXPORT_SYMBOL_GPL(__nft_release_basechain);
  
@@ -415,7 +415,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  {
  	struct nft_flowtable *flowtable, *nf;
  	struct nft_table *table, *nt;
-@@ -6514,10 +6493,11 @@ static void __nft_release_afinfo(struct
+@@ -6559,10 +6538,11 @@ static void __nft_release_afinfo(struct
  	struct nft_set *set, *ns;
  	struct nft_ctx ctx = {
  		.net	= net,
@@ -428,7 +428,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  		list_for_each_entry(chain, &table->chains, list)
  			nf_tables_unregister_hook(net, table, chain);
  		list_for_each_entry(flowtable, &table->flowtables, list)
-@@ -6558,6 +6538,21 @@ static void __nft_release_afinfo(struct
+@@ -6603,6 +6583,21 @@ static void __nft_release_afinfo(struct
  	}
  }
  
diff --git a/target/linux/generic/backport-4.14/338-v4.16-netfilter-nf_tables-get-rid-of-struct-nft_af_info-ab.patch b/target/linux/generic/backport-4.14/338-v4.16-netfilter-nf_tables-get-rid-of-struct-nft_af_info-ab.patch
index 031f67e5b3..544dfb92ab 100644
--- a/target/linux/generic/backport-4.14/338-v4.16-netfilter-nf_tables-get-rid-of-struct-nft_af_info-ab.patch
+++ b/target/linux/generic/backport-4.14/338-v4.16-netfilter-nf_tables-get-rid-of-struct-nft_af_info-ab.patch
@@ -11,7 +11,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
 
 --- a/include/net/netfilter/nf_tables.h
 +++ b/include/net/netfilter/nf_tables.h
-@@ -950,28 +950,12 @@ struct nft_table {
+@@ -955,28 +955,12 @@ struct nft_table {
  	struct list_head		flowtables;
  	u64				hgenerator;
  	u32				use;
@@ -42,7 +42,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  int nft_register_chain_type(const struct nf_chain_type *);
  void nft_unregister_chain_type(const struct nf_chain_type *);
  
-@@ -1139,9 +1123,6 @@ void nft_trace_notify(struct nft_tracein
+@@ -1144,9 +1128,6 @@ void nft_trace_notify(struct nft_tracein
  #define nft_dereference(p)					\
  	nfnl_dereference(p, NFNL_SUBSYS_NFTABLES)
  
@@ -323,7 +323,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  
  static void nft_ctx_init(struct nft_ctx *ctx,
  			 struct net *net,
-@@ -390,7 +325,7 @@ static struct nft_table *nft_table_looku
+@@ -419,7 +354,7 @@ static struct nft_table *nft_table_looku
  
  	list_for_each_entry(table, &net->nft.tables, list) {
  		if (!nla_strcmp(nla, table->name) &&
@@ -332,7 +332,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  		    nft_active_genmask(table, genmask))
  			return table;
  	}
-@@ -531,7 +466,7 @@ static int nf_tables_dump_tables(struct
+@@ -560,7 +495,7 @@ static int nf_tables_dump_tables(struct
  	cb->seq = net->nft.base_seq;
  
  	list_for_each_entry_rcu(table, &net->nft.tables, list) {
@@ -341,7 +341,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  			continue;
  
  		if (idx < s_idx)
-@@ -545,7 +480,7 @@ static int nf_tables_dump_tables(struct
+@@ -574,7 +509,7 @@ static int nf_tables_dump_tables(struct
  					      NETLINK_CB(cb->skb).portid,
  					      cb->nlh->nlmsg_seq,
  					      NFT_MSG_NEWTABLE, NLM_F_MULTI,
@@ -350,7 +350,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  			goto done;
  
  		nl_dump_check_consistent(cb, nlmsg_hdr(skb));
-@@ -565,7 +500,6 @@ static int nf_tables_gettable(struct net
+@@ -594,7 +529,6 @@ static int nf_tables_gettable(struct net
  {
  	const struct nfgenmsg *nfmsg = nlmsg_data(nlh);
  	u8 genmask = nft_genmask_cur(net);
@@ -358,7 +358,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	const struct nft_table *table;
  	struct sk_buff *skb2;
  	int family = nfmsg->nfgen_family;
-@@ -578,11 +512,7 @@ static int nf_tables_gettable(struct net
+@@ -607,11 +541,7 @@ static int nf_tables_gettable(struct net
  		return netlink_dump_start(nlsk, skb, nlh, &c);
  	}
  
@@ -371,7 +371,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  				       genmask);
  	if (IS_ERR(table))
  		return PTR_ERR(table);
-@@ -702,19 +632,14 @@ static int nf_tables_newtable(struct net
+@@ -731,19 +661,14 @@ static int nf_tables_newtable(struct net
  	const struct nfgenmsg *nfmsg = nlmsg_data(nlh);
  	u8 genmask = nft_genmask_next(net);
  	const struct nlattr *name;
@@ -392,7 +392,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	if (IS_ERR(table)) {
  		if (PTR_ERR(table) != -ENOENT)
  			return PTR_ERR(table);
-@@ -724,7 +649,7 @@ static int nf_tables_newtable(struct net
+@@ -753,7 +678,7 @@ static int nf_tables_newtable(struct net
  		if (nlh->nlmsg_flags & NLM_F_REPLACE)
  			return -EOPNOTSUPP;
  
@@ -401,7 +401,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  		return nf_tables_updtable(&ctx);
  	}
  
-@@ -734,40 +659,34 @@ static int nf_tables_newtable(struct net
+@@ -763,40 +688,34 @@ static int nf_tables_newtable(struct net
  			return -EINVAL;
  	}
  
@@ -450,7 +450,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	return err;
  }
  
-@@ -838,10 +757,10 @@ static int nft_flush(struct nft_ctx *ctx
+@@ -867,10 +786,10 @@ static int nft_flush(struct nft_ctx *ctx
  	int err = 0;
  
  	list_for_each_entry_safe(table, nt, &ctx->net->nft.tables, list) {
@@ -463,7 +463,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  
  		if (!nft_is_active_next(ctx->net, table))
  			continue;
-@@ -867,7 +786,6 @@ static int nf_tables_deltable(struct net
+@@ -896,7 +815,6 @@ static int nf_tables_deltable(struct net
  {
  	const struct nfgenmsg *nfmsg = nlmsg_data(nlh);
  	u8 genmask = nft_genmask_next(net);
@@ -471,7 +471,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	struct nft_table *table;
  	int family = nfmsg->nfgen_family;
  	struct nft_ctx ctx;
-@@ -876,11 +794,7 @@ static int nf_tables_deltable(struct net
+@@ -905,11 +823,7 @@ static int nf_tables_deltable(struct net
  	if (family == AF_UNSPEC || nla[NFTA_TABLE_NAME] == NULL)
  		return nft_flush(&ctx, family);
  
@@ -484,7 +484,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  				       genmask);
  	if (IS_ERR(table))
  		return PTR_ERR(table);
-@@ -889,7 +803,7 @@ static int nf_tables_deltable(struct net
+@@ -918,7 +832,7 @@ static int nf_tables_deltable(struct net
  	    table->use > 0)
  		return -EBUSY;
  
@@ -493,7 +493,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	ctx.table = table;
  
  	return nft_flush_table(&ctx);
-@@ -901,7 +815,6 @@ static void nf_tables_table_destroy(stru
+@@ -930,7 +844,6 @@ static void nf_tables_table_destroy(stru
  
  	kfree(ctx->table->name);
  	kfree(ctx->table);
@@ -501,7 +501,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  }
  
  int nft_register_chain_type(const struct nf_chain_type *ctype)
-@@ -1130,7 +1043,7 @@ static int nf_tables_dump_chains(struct
+@@ -1159,7 +1072,7 @@ static int nf_tables_dump_chains(struct
  	cb->seq = net->nft.base_seq;
  
  	list_for_each_entry_rcu(table, &net->nft.tables, list) {
@@ -510,7 +510,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  			continue;
  
  		list_for_each_entry_rcu(chain, &table->chains, list) {
-@@ -1146,7 +1059,7 @@ static int nf_tables_dump_chains(struct
+@@ -1175,7 +1088,7 @@ static int nf_tables_dump_chains(struct
  						      cb->nlh->nlmsg_seq,
  						      NFT_MSG_NEWCHAIN,
  						      NLM_F_MULTI,
@@ -519,7 +519,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  						      chain) < 0)
  				goto done;
  
-@@ -1168,7 +1081,6 @@ static int nf_tables_getchain(struct net
+@@ -1197,7 +1110,6 @@ static int nf_tables_getchain(struct net
  {
  	const struct nfgenmsg *nfmsg = nlmsg_data(nlh);
  	u8 genmask = nft_genmask_cur(net);
@@ -527,7 +527,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	const struct nft_table *table;
  	const struct nft_chain *chain;
  	struct sk_buff *skb2;
-@@ -1182,11 +1094,7 @@ static int nf_tables_getchain(struct net
+@@ -1211,11 +1123,7 @@ static int nf_tables_getchain(struct net
  		return netlink_dump_start(nlsk, skb, nlh, &c);
  	}
  
@@ -540,7 +540,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  				       genmask);
  	if (IS_ERR(table))
  		return PTR_ERR(table);
-@@ -1550,7 +1458,6 @@ static int nf_tables_newchain(struct net
+@@ -1581,7 +1489,6 @@ static int nf_tables_newchain(struct net
  	const struct nlattr * uninitialized_var(name);
  	u8 genmask = nft_genmask_next(net);
  	int family = nfmsg->nfgen_family;
@@ -548,7 +548,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	struct nft_table *table;
  	struct nft_chain *chain;
  	u8 policy = NF_ACCEPT;
-@@ -1560,11 +1467,7 @@ static int nf_tables_newchain(struct net
+@@ -1591,11 +1498,7 @@ static int nf_tables_newchain(struct net
  
  	create = nlh->nlmsg_flags & NLM_F_CREATE ? true : false;
  
@@ -561,7 +561,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  				       genmask);
  	if (IS_ERR(table))
  		return PTR_ERR(table);
-@@ -1605,7 +1508,7 @@ static int nf_tables_newchain(struct net
+@@ -1636,7 +1539,7 @@ static int nf_tables_newchain(struct net
  		}
  	}
  
@@ -570,7 +570,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  
  	if (chain != NULL) {
  		if (nlh->nlmsg_flags & NLM_F_EXCL)
-@@ -1626,7 +1529,6 @@ static int nf_tables_delchain(struct net
+@@ -1657,7 +1560,6 @@ static int nf_tables_delchain(struct net
  {
  	const struct nfgenmsg *nfmsg = nlmsg_data(nlh);
  	u8 genmask = nft_genmask_next(net);
@@ -578,7 +578,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	struct nft_table *table;
  	struct nft_chain *chain;
  	struct nft_rule *rule;
-@@ -1635,11 +1537,7 @@ static int nf_tables_delchain(struct net
+@@ -1666,11 +1568,7 @@ static int nf_tables_delchain(struct net
  	u32 use;
  	int err;
  
@@ -591,7 +591,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  				       genmask);
  	if (IS_ERR(table))
  		return PTR_ERR(table);
-@@ -1652,7 +1550,7 @@ static int nf_tables_delchain(struct net
+@@ -1683,7 +1581,7 @@ static int nf_tables_delchain(struct net
  	    chain->use > 0)
  		return -EBUSY;
  
@@ -600,7 +600,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  
  	use = chain->use;
  	list_for_each_entry(rule, &chain->rules, list) {
-@@ -2075,7 +1973,7 @@ static int nf_tables_dump_rules(struct s
+@@ -2107,7 +2005,7 @@ static int nf_tables_dump_rules(struct s
  	cb->seq = net->nft.base_seq;
  
  	list_for_each_entry_rcu(table, &net->nft.tables, list) {
@@ -609,7 +609,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  			continue;
  
  		if (ctx && ctx->table && strcmp(ctx->table, table->name) != 0)
-@@ -2098,7 +1996,7 @@ static int nf_tables_dump_rules(struct s
+@@ -2130,7 +2028,7 @@ static int nf_tables_dump_rules(struct s
  							      cb->nlh->nlmsg_seq,
  							      NFT_MSG_NEWRULE,
  							      NLM_F_MULTI | NLM_F_APPEND,
@@ -618,7 +618,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  							      table, chain, rule) < 0)
  					goto done;
  
-@@ -2134,7 +2032,6 @@ static int nf_tables_getrule(struct net
+@@ -2166,7 +2064,6 @@ static int nf_tables_getrule(struct net
  {
  	const struct nfgenmsg *nfmsg = nlmsg_data(nlh);
  	u8 genmask = nft_genmask_cur(net);
@@ -626,7 +626,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	const struct nft_table *table;
  	const struct nft_chain *chain;
  	const struct nft_rule *rule;
-@@ -2178,11 +2075,7 @@ static int nf_tables_getrule(struct net
+@@ -2210,11 +2107,7 @@ static int nf_tables_getrule(struct net
  		return netlink_dump_start(nlsk, skb, nlh, &c);
  	}
  
@@ -639,7 +639,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  				       genmask);
  	if (IS_ERR(table))
  		return PTR_ERR(table);
-@@ -2240,7 +2133,7 @@ static int nf_tables_newrule(struct net
+@@ -2279,7 +2172,7 @@ static int nf_tables_newrule(struct net
  {
  	const struct nfgenmsg *nfmsg = nlmsg_data(nlh);
  	u8 genmask = nft_genmask_next(net);
@@ -648,7 +648,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	struct nft_table *table;
  	struct nft_chain *chain;
  	struct nft_rule *rule, *old_rule = NULL;
-@@ -2256,11 +2149,7 @@ static int nf_tables_newrule(struct net
+@@ -2295,11 +2188,7 @@ static int nf_tables_newrule(struct net
  
  	create = nlh->nlmsg_flags & NLM_F_CREATE ? true : false;
  
@@ -661,7 +661,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  				       genmask);
  	if (IS_ERR(table))
  		return PTR_ERR(table);
-@@ -2300,7 +2189,7 @@ static int nf_tables_newrule(struct net
+@@ -2339,7 +2228,7 @@ static int nf_tables_newrule(struct net
  			return PTR_ERR(old_rule);
  	}
  
@@ -670,7 +670,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  
  	n = 0;
  	size = 0;
-@@ -2429,18 +2318,13 @@ static int nf_tables_delrule(struct net
+@@ -2468,18 +2357,13 @@ static int nf_tables_delrule(struct net
  {
  	const struct nfgenmsg *nfmsg = nlmsg_data(nlh);
  	u8 genmask = nft_genmask_next(net);
@@ -690,7 +690,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  				       genmask);
  	if (IS_ERR(table))
  		return PTR_ERR(table);
-@@ -2452,7 +2336,7 @@ static int nf_tables_delrule(struct net
+@@ -2491,7 +2375,7 @@ static int nf_tables_delrule(struct net
  			return PTR_ERR(chain);
  	}
  
@@ -699,7 +699,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  
  	if (chain) {
  		if (nla[NFTA_RULE_HANDLE]) {
-@@ -2637,26 +2521,17 @@ static int nft_ctx_init_from_setattr(str
+@@ -2676,26 +2560,17 @@ static int nft_ctx_init_from_setattr(str
  				     u8 genmask)
  {
  	const struct nfgenmsg *nfmsg = nlmsg_data(nlh);
@@ -729,7 +729,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	return 0;
  }
  
-@@ -2887,7 +2762,7 @@ static int nf_tables_dump_sets(struct sk
+@@ -2926,7 +2801,7 @@ static int nf_tables_dump_sets(struct sk
  
  	list_for_each_entry_rcu(table, &net->nft.tables, list) {
  		if (ctx->family != NFPROTO_UNSPEC &&
@@ -738,7 +738,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  			continue;
  
  		if (ctx->table && ctx->table != table)
-@@ -2908,7 +2783,7 @@ static int nf_tables_dump_sets(struct sk
+@@ -2947,7 +2822,7 @@ static int nf_tables_dump_sets(struct sk
  
  			ctx_set = *ctx;
  			ctx_set.table = table;
@@ -747,7 +747,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  
  			if (nf_tables_fill_set(skb, &ctx_set, set,
  					       NFT_MSG_NEWSET,
-@@ -3020,8 +2895,8 @@ static int nf_tables_newset(struct net *
+@@ -3059,8 +2934,8 @@ static int nf_tables_newset(struct net *
  {
  	const struct nfgenmsg *nfmsg = nlmsg_data(nlh);
  	u8 genmask = nft_genmask_next(net);
@@ -757,7 +757,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	struct nft_table *table;
  	struct nft_set *set;
  	struct nft_ctx ctx;
-@@ -3128,16 +3003,12 @@ static int nf_tables_newset(struct net *
+@@ -3167,16 +3042,12 @@ static int nf_tables_newset(struct net *
  
  	create = nlh->nlmsg_flags & NLM_F_CREATE ? true : false;
  
@@ -776,7 +776,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  
  	set = nf_tables_set_lookup(table, nla[NFTA_SET_NAME], genmask);
  	if (IS_ERR(set)) {
-@@ -3397,19 +3268,15 @@ static int nft_ctx_init_from_elemattr(st
+@@ -3438,19 +3309,15 @@ static int nft_ctx_init_from_elemattr(st
  				      u8 genmask)
  {
  	const struct nfgenmsg *nfmsg = nlmsg_data(nlh);
@@ -799,7 +799,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	return 0;
  }
  
-@@ -3527,7 +3394,7 @@ static int nf_tables_dump_set(struct sk_
+@@ -3568,7 +3435,7 @@ static int nf_tables_dump_set(struct sk_
  	rcu_read_lock();
  	list_for_each_entry_rcu(table, &net->nft.tables, list) {
  		if (dump_ctx->ctx.family != NFPROTO_UNSPEC &&
@@ -808,7 +808,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  			continue;
  
  		if (table != dump_ctx->ctx.table)
-@@ -3557,7 +3424,7 @@ static int nf_tables_dump_set(struct sk_
+@@ -3598,7 +3465,7 @@ static int nf_tables_dump_set(struct sk_
  		goto nla_put_failure;
  
  	nfmsg = nlmsg_data(nlh);
@@ -817,7 +817,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	nfmsg->version      = NFNETLINK_V0;
  	nfmsg->res_id	    = htons(net->nft.base_seq & 0xffff);
  
-@@ -4434,7 +4301,6 @@ static int nf_tables_newobj(struct net *
+@@ -4477,7 +4344,6 @@ static int nf_tables_newobj(struct net *
  	const struct nft_object_type *type;
  	u8 genmask = nft_genmask_next(net);
  	int family = nfmsg->nfgen_family;
@@ -825,7 +825,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	struct nft_table *table;
  	struct nft_object *obj;
  	struct nft_ctx ctx;
-@@ -4446,11 +4312,7 @@ static int nf_tables_newobj(struct net *
+@@ -4489,11 +4355,7 @@ static int nf_tables_newobj(struct net *
  	    !nla[NFTA_OBJ_DATA])
  		return -EINVAL;
  
@@ -838,7 +838,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  				       genmask);
  	if (IS_ERR(table))
  		return PTR_ERR(table);
-@@ -4469,7 +4331,7 @@ static int nf_tables_newobj(struct net *
+@@ -4512,7 +4374,7 @@ static int nf_tables_newobj(struct net *
  		return 0;
  	}
  
@@ -847,7 +847,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  
  	type = nft_obj_type_get(objtype);
  	if (IS_ERR(type))
-@@ -4561,7 +4423,7 @@ static int nf_tables_dump_obj(struct sk_
+@@ -4604,7 +4466,7 @@ static int nf_tables_dump_obj(struct sk_
  	cb->seq = net->nft.base_seq;
  
  	list_for_each_entry_rcu(table, &net->nft.tables, list) {
@@ -856,7 +856,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  			continue;
  
  		list_for_each_entry_rcu(obj, &table->objects, list) {
-@@ -4584,7 +4446,7 @@ static int nf_tables_dump_obj(struct sk_
+@@ -4627,7 +4489,7 @@ static int nf_tables_dump_obj(struct sk_
  						    cb->nlh->nlmsg_seq,
  						    NFT_MSG_NEWOBJ,
  						    NLM_F_MULTI | NLM_F_APPEND,
@@ -865,7 +865,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  						    obj, reset) < 0)
  				goto done;
  
-@@ -4642,7 +4504,6 @@ static int nf_tables_getobj(struct net *
+@@ -4685,7 +4547,6 @@ static int nf_tables_getobj(struct net *
  	const struct nfgenmsg *nfmsg = nlmsg_data(nlh);
  	u8 genmask = nft_genmask_cur(net);
  	int family = nfmsg->nfgen_family;
@@ -873,7 +873,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	const struct nft_table *table;
  	struct nft_object *obj;
  	struct sk_buff *skb2;
-@@ -4673,11 +4534,7 @@ static int nf_tables_getobj(struct net *
+@@ -4716,11 +4577,7 @@ static int nf_tables_getobj(struct net *
  	    !nla[NFTA_OBJ_TYPE])
  		return -EINVAL;
  
@@ -886,7 +886,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  				       genmask);
  	if (IS_ERR(table))
  		return PTR_ERR(table);
-@@ -4724,7 +4581,6 @@ static int nf_tables_delobj(struct net *
+@@ -4767,7 +4624,6 @@ static int nf_tables_delobj(struct net *
  	const struct nfgenmsg *nfmsg = nlmsg_data(nlh);
  	u8 genmask = nft_genmask_next(net);
  	int family = nfmsg->nfgen_family;
@@ -894,7 +894,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	struct nft_table *table;
  	struct nft_object *obj;
  	struct nft_ctx ctx;
-@@ -4734,11 +4590,7 @@ static int nf_tables_delobj(struct net *
+@@ -4777,11 +4633,7 @@ static int nf_tables_delobj(struct net *
  	    !nla[NFTA_OBJ_NAME])
  		return -EINVAL;
  
@@ -907,7 +907,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  				       genmask);
  	if (IS_ERR(table))
  		return PTR_ERR(table);
-@@ -4750,7 +4602,7 @@ static int nf_tables_delobj(struct net *
+@@ -4793,7 +4645,7 @@ static int nf_tables_delobj(struct net *
  	if (obj->use > 0)
  		return -EBUSY;
  
@@ -916,7 +916,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  
  	return nft_delobj(&ctx, obj);
  }
-@@ -4935,33 +4787,31 @@ err1:
+@@ -4978,33 +4830,31 @@ err1:
  	return err;
  }
  
@@ -956,7 +956,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  			return ERR_PTR(-EAGAIN);
  	}
  #endif
-@@ -5009,7 +4859,6 @@ static int nf_tables_newflowtable(struct
+@@ -5052,7 +4902,6 @@ static int nf_tables_newflowtable(struct
  	u8 genmask = nft_genmask_next(net);
  	int family = nfmsg->nfgen_family;
  	struct nft_flowtable *flowtable;
@@ -964,7 +964,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	struct nft_table *table;
  	struct nft_ctx ctx;
  	int err, i, k;
-@@ -5019,12 +4868,8 @@ static int nf_tables_newflowtable(struct
+@@ -5062,12 +4911,8 @@ static int nf_tables_newflowtable(struct
  	    !nla[NFTA_FLOWTABLE_HOOK])
  		return -EINVAL;
  
@@ -978,7 +978,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	if (IS_ERR(table))
  		return PTR_ERR(table);
  
-@@ -5041,7 +4886,7 @@ static int nf_tables_newflowtable(struct
+@@ -5084,7 +4929,7 @@ static int nf_tables_newflowtable(struct
  		return 0;
  	}
  
@@ -987,7 +987,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  
  	flowtable = kzalloc(sizeof(*flowtable), GFP_KERNEL);
  	if (!flowtable)
-@@ -5054,7 +4899,7 @@ static int nf_tables_newflowtable(struct
+@@ -5097,7 +4942,7 @@ static int nf_tables_newflowtable(struct
  		goto err1;
  	}
  
@@ -996,7 +996,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	if (IS_ERR(type)) {
  		err = PTR_ERR(type);
  		goto err2;
-@@ -5114,16 +4959,11 @@ static int nf_tables_delflowtable(struct
+@@ -5157,16 +5002,11 @@ static int nf_tables_delflowtable(struct
  	u8 genmask = nft_genmask_next(net);
  	int family = nfmsg->nfgen_family;
  	struct nft_flowtable *flowtable;
@@ -1014,7 +1014,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	if (IS_ERR(table))
  		return PTR_ERR(table);
  
-@@ -5134,7 +4974,7 @@ static int nf_tables_delflowtable(struct
+@@ -5177,7 +5017,7 @@ static int nf_tables_delflowtable(struct
  	if (flowtable->use > 0)
  		return -EBUSY;
  
@@ -1023,7 +1023,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  
  	return nft_delflowtable(&ctx, flowtable);
  }
-@@ -5209,7 +5049,7 @@ static int nf_tables_dump_flowtable(stru
+@@ -5252,7 +5092,7 @@ static int nf_tables_dump_flowtable(stru
  	cb->seq = net->nft.base_seq;
  
  	list_for_each_entry_rcu(table, &net->nft.tables, list) {
@@ -1032,7 +1032,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  			continue;
  
  		list_for_each_entry_rcu(flowtable, &table->flowtables, list) {
-@@ -5228,7 +5068,7 @@ static int nf_tables_dump_flowtable(stru
+@@ -5271,7 +5111,7 @@ static int nf_tables_dump_flowtable(stru
  							  cb->nlh->nlmsg_seq,
  							  NFT_MSG_NEWFLOWTABLE,
  							  NLM_F_MULTI | NLM_F_APPEND,
@@ -1041,7 +1041,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  				goto done;
  
  			nl_dump_check_consistent(cb, nlmsg_hdr(skb));
-@@ -5288,7 +5128,6 @@ static int nf_tables_getflowtable(struct
+@@ -5331,7 +5171,6 @@ static int nf_tables_getflowtable(struct
  	u8 genmask = nft_genmask_cur(net);
  	int family = nfmsg->nfgen_family;
  	struct nft_flowtable *flowtable;
@@ -1049,7 +1049,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	const struct nft_table *table;
  	struct sk_buff *skb2;
  	int err;
-@@ -5314,12 +5153,8 @@ static int nf_tables_getflowtable(struct
+@@ -5357,12 +5196,8 @@ static int nf_tables_getflowtable(struct
  	if (!nla[NFTA_FLOWTABLE_NAME])
  		return -EINVAL;
  
@@ -1063,7 +1063,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	if (IS_ERR(table))
  		return PTR_ERR(table);
  
-@@ -6483,7 +6318,7 @@ int __nft_release_basechain(struct nft_c
+@@ -6528,7 +6363,7 @@ int __nft_release_basechain(struct nft_c
  }
  EXPORT_SYMBOL_GPL(__nft_release_basechain);
  
@@ -1072,7 +1072,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  {
  	struct nft_flowtable *flowtable, *nf;
  	struct nft_table *table, *nt;
-@@ -6496,7 +6331,7 @@ static void __nft_release_afinfo(struct
+@@ -6541,7 +6376,7 @@ static void __nft_release_afinfo(struct
  	};
  
  	list_for_each_entry_safe(table, nt, &net->nft.tables, list) {
@@ -1081,7 +1081,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  
  		list_for_each_entry(chain, &table->chains, list)
  			nf_tables_unregister_hook(net, table, chain);
-@@ -6548,7 +6383,7 @@ static int __net_init nf_tables_init_net
+@@ -6593,7 +6428,7 @@ static int __net_init nf_tables_init_net
  
  static void __net_exit nf_tables_exit_net(struct net *net)
  {
diff --git a/target/linux/generic/backport-4.14/339-v4.16-netfilter-nft_flow_offload-wait-for-garbage-collecto.patch b/target/linux/generic/backport-4.14/339-v4.16-netfilter-nft_flow_offload-wait-for-garbage-collecto.patch
index 3e8dccf0eb..0572c2fcd9 100644
--- a/target/linux/generic/backport-4.14/339-v4.16-netfilter-nft_flow_offload-wait-for-garbage-collecto.patch
+++ b/target/linux/generic/backport-4.14/339-v4.16-netfilter-nft_flow_offload-wait-for-garbage-collecto.patch
@@ -17,7 +17,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
 
 --- a/net/netfilter/nf_tables_api.c
 +++ b/net/netfilter/nf_tables_api.c
-@@ -4825,13 +4825,13 @@ void nft_flow_table_iterate(struct net *
+@@ -4868,13 +4868,13 @@ void nft_flow_table_iterate(struct net *
  	struct nft_flowtable *flowtable;
  	const struct nft_table *table;
  
diff --git a/target/linux/generic/backport-4.14/342-v4.16-netfilter-nf_tables-fix-flowtable-free.patch b/target/linux/generic/backport-4.14/342-v4.16-netfilter-nf_tables-fix-flowtable-free.patch
index d0f6b7aa33..bd935b971d 100644
--- a/target/linux/generic/backport-4.14/342-v4.16-netfilter-nf_tables-fix-flowtable-free.patch
+++ b/target/linux/generic/backport-4.14/342-v4.16-netfilter-nf_tables-fix-flowtable-free.patch
@@ -118,7 +118,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  };
 --- a/net/netfilter/nf_tables_api.c
 +++ b/net/netfilter/nf_tables_api.c
-@@ -5210,17 +5210,12 @@ err:
+@@ -5253,17 +5253,12 @@ err:
  	nfnetlink_set_err(ctx->net, ctx->portid, NFNLGRP_NFTABLES, -ENOBUFS);
  }
  
diff --git a/target/linux/generic/backport-4.14/344-v4.16-netfilter-nf_tables-allocate-handle-and-delete-objec.patch b/target/linux/generic/backport-4.14/344-v4.16-netfilter-nf_tables-allocate-handle-and-delete-objec.patch
index 22720aa727..a7ce0df5cf 100644
--- a/target/linux/generic/backport-4.14/344-v4.16-netfilter-nf_tables-allocate-handle-and-delete-objec.patch
+++ b/target/linux/generic/backport-4.14/344-v4.16-netfilter-nf_tables-allocate-handle-and-delete-objec.patch
@@ -12,7 +12,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
 
 --- a/include/net/netfilter/nf_tables.h
 +++ b/include/net/netfilter/nf_tables.h
-@@ -369,6 +369,7 @@ void nft_unregister_set(struct nft_set_t
+@@ -370,6 +370,7 @@ void nft_unregister_set(struct nft_set_t
   *	@list: table set list node
   *	@bindings: list of set bindings
   * 	@name: name of the set
@@ -20,7 +20,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
   * 	@ktype: key type (numeric type defined by userspace, not used in the kernel)
   * 	@dtype: data type (verdict or numeric type defined by userspace)
   * 	@objtype: object type (see NFT_OBJECT_* definitions)
-@@ -391,6 +392,7 @@ struct nft_set {
+@@ -392,6 +393,7 @@ struct nft_set {
  	struct list_head		list;
  	struct list_head		bindings;
  	char				*name;
@@ -28,7 +28,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	u32				ktype;
  	u32				dtype;
  	u32				objtype;
-@@ -936,6 +938,7 @@ unsigned int nft_do_chain(struct nft_pkt
+@@ -941,6 +943,7 @@ unsigned int nft_do_chain(struct nft_pkt
   *	@objects: stateful objects in the table
   *	@flowtables: flow tables in the table
   *	@hgenerator: handle generator state
@@ -36,7 +36,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
   *	@use: number of chain references to this table
   *	@flags: table flag (see enum nft_table_flags)
   *	@genmask: generation mask
-@@ -949,6 +952,7 @@ struct nft_table {
+@@ -954,6 +957,7 @@ struct nft_table {
  	struct list_head		objects;
  	struct list_head		flowtables;
  	u64				hgenerator;
@@ -44,7 +44,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	u32				use;
  	u16				family:6,
  					flags:8,
-@@ -973,9 +977,9 @@ int nft_verdict_dump(struct sk_buff *skb
+@@ -978,9 +982,9 @@ int nft_verdict_dump(struct sk_buff *skb
   *	@name: name of this stateful object
   *	@genmask: generation mask
   *	@use: number of references to this stateful object
@@ -56,7 +56,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
   */
  struct nft_object {
  	struct list_head		list;
-@@ -983,6 +987,7 @@ struct nft_object {
+@@ -988,6 +992,7 @@ struct nft_object {
  	struct nft_table		*table;
  	u32				genmask:2,
  					use:30;
@@ -64,7 +64,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	/* runtime data below here */
  	const struct nft_object_ops	*ops ____cacheline_aligned;
  	unsigned char			data[]
-@@ -1064,6 +1069,7 @@ void nft_unregister_obj(struct nft_objec
+@@ -1069,6 +1074,7 @@ void nft_unregister_obj(struct nft_objec
   *	@ops_len: number of hooks in array
   *	@genmask: generation mask
   *	@use: number of references to this flow table
@@ -72,7 +72,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
   *	@data: rhashtable and garbage collector
   * 	@ops: array of hooks
   */
-@@ -1076,6 +1082,7 @@ struct nft_flowtable {
+@@ -1081,6 +1087,7 @@ struct nft_flowtable {
  	int				ops_len;
  	u32				genmask:2,
  					use:30;
@@ -151,7 +151,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  
  static void nft_ctx_init(struct nft_ctx *ctx,
  			 struct net *net,
-@@ -332,6 +333,20 @@ static struct nft_table *nft_table_looku
+@@ -361,6 +362,20 @@ static struct nft_table *nft_table_looku
  	return NULL;
  }
  
@@ -172,7 +172,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  static struct nft_table *nf_tables_table_lookup(const struct net *net,
  						const struct nlattr *nla,
  						u8 family, u8 genmask)
-@@ -348,6 +363,22 @@ static struct nft_table *nf_tables_table
+@@ -377,6 +392,22 @@ static struct nft_table *nf_tables_table
  	return ERR_PTR(-ENOENT);
  }
  
@@ -195,7 +195,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  static inline u64 nf_tables_alloc_handle(struct nft_table *table)
  {
  	return ++table->hgenerator;
-@@ -394,6 +425,7 @@ static const struct nla_policy nft_table
+@@ -423,6 +454,7 @@ static const struct nla_policy nft_table
  	[NFTA_TABLE_NAME]	= { .type = NLA_STRING,
  				    .len = NFT_TABLE_MAXNAMELEN - 1 },
  	[NFTA_TABLE_FLAGS]	= { .type = NLA_U32 },
@@ -203,7 +203,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  };
  
  static int nf_tables_fill_table_info(struct sk_buff *skb, struct net *net,
-@@ -415,7 +447,9 @@ static int nf_tables_fill_table_info(str
+@@ -444,7 +476,9 @@ static int nf_tables_fill_table_info(str
  
  	if (nla_put_string(skb, NFTA_TABLE_NAME, table->name) ||
  	    nla_put_be32(skb, NFTA_TABLE_FLAGS, htonl(table->flags)) ||
@@ -214,7 +214,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  		goto nla_put_failure;
  
  	nlmsg_end(skb, nlh);
-@@ -674,6 +708,7 @@ static int nf_tables_newtable(struct net
+@@ -703,6 +737,7 @@ static int nf_tables_newtable(struct net
  	INIT_LIST_HEAD(&table->flowtables);
  	table->family = family;
  	table->flags = flags;
@@ -222,7 +222,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  
  	nft_ctx_init(&ctx, net, skb, nlh, family, table, NULL, nla);
  	err = nft_trans_table_add(&ctx, NFT_MSG_NEWTABLE);
-@@ -791,11 +826,18 @@ static int nf_tables_deltable(struct net
+@@ -820,11 +855,18 @@ static int nf_tables_deltable(struct net
  	struct nft_ctx ctx;
  
  	nft_ctx_init(&ctx, net, skb, nlh, 0, NULL, NULL, nla);
@@ -244,7 +244,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	if (IS_ERR(table))
  		return PTR_ERR(table);
  
-@@ -1534,6 +1576,7 @@ static int nf_tables_delchain(struct net
+@@ -1565,6 +1607,7 @@ static int nf_tables_delchain(struct net
  	struct nft_rule *rule;
  	int family = nfmsg->nfgen_family;
  	struct nft_ctx ctx;
@@ -252,7 +252,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	u32 use;
  	int err;
  
-@@ -1542,7 +1585,12 @@ static int nf_tables_delchain(struct net
+@@ -1573,7 +1616,12 @@ static int nf_tables_delchain(struct net
  	if (IS_ERR(table))
  		return PTR_ERR(table);
  
@@ -266,7 +266,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	if (IS_ERR(chain))
  		return PTR_ERR(chain);
  
-@@ -2508,6 +2556,7 @@ static const struct nla_policy nft_set_p
+@@ -2547,6 +2595,7 @@ static const struct nla_policy nft_set_p
  	[NFTA_SET_USERDATA]		= { .type = NLA_BINARY,
  					    .len  = NFT_USERDATA_MAXLEN },
  	[NFTA_SET_OBJ_TYPE]		= { .type = NLA_U32 },
@@ -274,7 +274,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  };
  
  static const struct nla_policy nft_set_desc_policy[NFTA_SET_DESC_MAX + 1] = {
-@@ -2551,6 +2600,22 @@ static struct nft_set *nf_tables_set_loo
+@@ -2590,6 +2639,22 @@ static struct nft_set *nf_tables_set_loo
  	return ERR_PTR(-ENOENT);
  }
  
@@ -297,7 +297,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  static struct nft_set *nf_tables_set_lookup_byid(const struct net *net,
  						 const struct nlattr *nla,
  						 u8 genmask)
-@@ -2666,6 +2731,9 @@ static int nf_tables_fill_set(struct sk_
+@@ -2705,6 +2770,9 @@ static int nf_tables_fill_set(struct sk_
  		goto nla_put_failure;
  	if (nla_put_string(skb, NFTA_SET_NAME, set->name))
  		goto nla_put_failure;
@@ -307,7 +307,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	if (set->flags != 0)
  		if (nla_put_be32(skb, NFTA_SET_FLAGS, htonl(set->flags)))
  			goto nla_put_failure;
-@@ -3074,6 +3142,7 @@ static int nf_tables_newset(struct net *
+@@ -3113,6 +3181,7 @@ static int nf_tables_newset(struct net *
  	set->udata  = udata;
  	set->timeout = timeout;
  	set->gc_int = gc_int;
@@ -315,7 +315,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  
  	err = ops->init(set, &desc, nla);
  	if (err < 0)
-@@ -3133,7 +3202,10 @@ static int nf_tables_delset(struct net *
+@@ -3172,7 +3241,10 @@ static int nf_tables_delset(struct net *
  	if (err < 0)
  		return err;
  
@@ -327,7 +327,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	if (IS_ERR(set))
  		return PTR_ERR(set);
  
-@@ -4189,6 +4261,21 @@ struct nft_object *nf_tables_obj_lookup(
+@@ -4232,6 +4304,21 @@ struct nft_object *nf_tables_obj_lookup(
  }
  EXPORT_SYMBOL_GPL(nf_tables_obj_lookup);
  
@@ -349,7 +349,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  static const struct nla_policy nft_obj_policy[NFTA_OBJ_MAX + 1] = {
  	[NFTA_OBJ_TABLE]	= { .type = NLA_STRING,
  				    .len = NFT_TABLE_MAXNAMELEN - 1 },
-@@ -4196,6 +4283,7 @@ static const struct nla_policy nft_obj_p
+@@ -4239,6 +4326,7 @@ static const struct nla_policy nft_obj_p
  				    .len = NFT_OBJ_MAXNAMELEN - 1 },
  	[NFTA_OBJ_TYPE]		= { .type = NLA_U32 },
  	[NFTA_OBJ_DATA]		= { .type = NLA_NESTED },
@@ -357,7 +357,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  };
  
  static struct nft_object *nft_obj_init(const struct nft_ctx *ctx,
-@@ -4343,6 +4431,8 @@ static int nf_tables_newobj(struct net *
+@@ -4386,6 +4474,8 @@ static int nf_tables_newobj(struct net *
  		goto err1;
  	}
  	obj->table = table;
@@ -366,7 +366,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	obj->name = nla_strdup(nla[NFTA_OBJ_NAME], GFP_KERNEL);
  	if (!obj->name) {
  		err = -ENOMEM;
-@@ -4389,7 +4479,9 @@ static int nf_tables_fill_obj_info(struc
+@@ -4432,7 +4522,9 @@ static int nf_tables_fill_obj_info(struc
  	    nla_put_string(skb, NFTA_OBJ_NAME, obj->name) ||
  	    nla_put_be32(skb, NFTA_OBJ_TYPE, htonl(obj->ops->type->type)) ||
  	    nla_put_be32(skb, NFTA_OBJ_USE, htonl(obj->use)) ||
@@ -377,7 +377,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  		goto nla_put_failure;
  
  	nlmsg_end(skb, nlh);
-@@ -4587,7 +4679,7 @@ static int nf_tables_delobj(struct net *
+@@ -4630,7 +4722,7 @@ static int nf_tables_delobj(struct net *
  	u32 objtype;
  
  	if (!nla[NFTA_OBJ_TYPE] ||
@@ -386,7 +386,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  		return -EINVAL;
  
  	table = nf_tables_table_lookup(net, nla[NFTA_OBJ_TABLE], family,
-@@ -4596,7 +4688,12 @@ static int nf_tables_delobj(struct net *
+@@ -4639,7 +4731,12 @@ static int nf_tables_delobj(struct net *
  		return PTR_ERR(table);
  
  	objtype = ntohl(nla_get_be32(nla[NFTA_OBJ_TYPE]));
@@ -400,7 +400,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	if (IS_ERR(obj))
  		return PTR_ERR(obj);
  	if (obj->use > 0)
-@@ -4668,6 +4765,7 @@ static const struct nla_policy nft_flowt
+@@ -4711,6 +4808,7 @@ static const struct nla_policy nft_flowt
  	[NFTA_FLOWTABLE_NAME]		= { .type = NLA_STRING,
  					    .len = NFT_NAME_MAXLEN - 1 },
  	[NFTA_FLOWTABLE_HOOK]		= { .type = NLA_NESTED },
@@ -408,7 +408,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  };
  
  struct nft_flowtable *nf_tables_flowtable_lookup(const struct nft_table *table,
-@@ -4685,6 +4783,20 @@ struct nft_flowtable *nf_tables_flowtabl
+@@ -4728,6 +4826,20 @@ struct nft_flowtable *nf_tables_flowtabl
  }
  EXPORT_SYMBOL_GPL(nf_tables_flowtable_lookup);
  
@@ -429,7 +429,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  #define NFT_FLOWTABLE_DEVICE_MAX	8
  
  static int nf_tables_parse_devices(const struct nft_ctx *ctx,
-@@ -4893,6 +5005,8 @@ static int nf_tables_newflowtable(struct
+@@ -4936,6 +5048,8 @@ static int nf_tables_newflowtable(struct
  		return -ENOMEM;
  
  	flowtable->table = table;
@@ -438,7 +438,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	flowtable->name = nla_strdup(nla[NFTA_FLOWTABLE_NAME], GFP_KERNEL);
  	if (!flowtable->name) {
  		err = -ENOMEM;
-@@ -4967,8 +5081,14 @@ static int nf_tables_delflowtable(struct
+@@ -5010,8 +5124,14 @@ static int nf_tables_delflowtable(struct
  	if (IS_ERR(table))
  		return PTR_ERR(table);
  
@@ -455,7 +455,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	if (IS_ERR(flowtable))
                  return PTR_ERR(flowtable);
  	if (flowtable->use > 0)
-@@ -5001,7 +5121,9 @@ static int nf_tables_fill_flowtable_info
+@@ -5044,7 +5164,9 @@ static int nf_tables_fill_flowtable_info
  
  	if (nla_put_string(skb, NFTA_FLOWTABLE_TABLE, flowtable->table->name) ||
  	    nla_put_string(skb, NFTA_FLOWTABLE_NAME, flowtable->name) ||
diff --git a/target/linux/generic/backport-4.14/357-v4.18-netfilter-nf_flow_table-move-init-code-to-nf_flow_ta.patch b/target/linux/generic/backport-4.14/357-v4.18-netfilter-nf_flow_table-move-init-code-to-nf_flow_ta.patch
index 278947644f..2af2fbe284 100644
--- a/target/linux/generic/backport-4.14/357-v4.18-netfilter-nf_flow_table-move-init-code-to-nf_flow_ta.patch
+++ b/target/linux/generic/backport-4.14/357-v4.18-netfilter-nf_flow_table-move-init-code-to-nf_flow_ta.patch
@@ -236,7 +236,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	.owner		= THIS_MODULE,
 --- a/net/netfilter/nf_tables_api.c
 +++ b/net/netfilter/nf_tables_api.c
-@@ -5020,40 +5020,38 @@ static int nf_tables_newflowtable(struct
+@@ -5063,40 +5063,38 @@ static int nf_tables_newflowtable(struct
  	}
  
  	flowtable->data.type = type;
@@ -285,7 +285,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  err3:
  	module_put(type->owner);
  err2:
-@@ -5334,10 +5332,8 @@ err:
+@@ -5377,10 +5375,8 @@ err:
  
  static void nf_tables_flowtable_destroy(struct nft_flowtable *flowtable)
  {
diff --git a/target/linux/generic/backport-4.14/358-v4.18-netfilter-nf_flow_table-fix-priv-pointer-for-netdev-.patch b/target/linux/generic/backport-4.14/358-v4.18-netfilter-nf_flow_table-fix-priv-pointer-for-netdev-.patch
index fcf206de37..9481d16ba5 100644
--- a/target/linux/generic/backport-4.14/358-v4.18-netfilter-nf_flow_table-fix-priv-pointer-for-netdev-.patch
+++ b/target/linux/generic/backport-4.14/358-v4.18-netfilter-nf_flow_table-fix-priv-pointer-for-netdev-.patch
@@ -11,7 +11,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/net/netfilter/nf_tables_api.c
 +++ b/net/netfilter/nf_tables_api.c
-@@ -4886,7 +4886,7 @@ static int nf_tables_flowtable_parse_hoo
+@@ -4929,7 +4929,7 @@ static int nf_tables_flowtable_parse_hoo
  		flowtable->ops[i].pf		= NFPROTO_NETDEV;
  		flowtable->ops[i].hooknum	= hooknum;
  		flowtable->ops[i].priority	= priority;
diff --git a/target/linux/generic/backport-4.14/359-v4.18-netfilter-nf_flow_table-track-flow-tables-in-nf_flow.patch b/target/linux/generic/backport-4.14/359-v4.18-netfilter-nf_flow_table-track-flow-tables-in-nf_flow.patch
index 3530eb6c24..2dc50f8358 100644
--- a/target/linux/generic/backport-4.14/359-v4.18-netfilter-nf_flow_table-track-flow-tables-in-nf_flow.patch
+++ b/target/linux/generic/backport-4.14/359-v4.18-netfilter-nf_flow_table-track-flow-tables-in-nf_flow.patch
@@ -21,7 +21,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	struct delayed_work		gc_work;
 --- a/include/net/netfilter/nf_tables.h
 +++ b/include/net/netfilter/nf_tables.h
-@@ -1091,9 +1091,6 @@ struct nft_flowtable {
+@@ -1096,9 +1096,6 @@ struct nft_flowtable {
  struct nft_flowtable *nf_tables_flowtable_lookup(const struct nft_table *table,
  						 const struct nlattr *nla,
  						 u8 genmask);
@@ -88,7 +88,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	WARN_ON(!nf_flow_offload_gc_step(flow_table));
 --- a/net/netfilter/nf_tables_api.c
 +++ b/net/netfilter/nf_tables_api.c
-@@ -4930,23 +4930,6 @@ static const struct nf_flowtable_type *n
+@@ -4973,23 +4973,6 @@ static const struct nf_flowtable_type *n
  	return ERR_PTR(-ENOENT);
  }
  
diff --git a/target/linux/generic/hack-4.14/904-debloat_dma_buf.patch b/target/linux/generic/hack-4.14/904-debloat_dma_buf.patch
index e715909339..4d9f947edc 100644
--- a/target/linux/generic/hack-4.14/904-debloat_dma_buf.patch
+++ b/target/linux/generic/hack-4.14/904-debloat_dma_buf.patch
@@ -54,7 +54,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 +MODULE_LICENSE("GPL");
 --- a/kernel/sched/core.c
 +++ b/kernel/sched/core.c
-@@ -2147,6 +2147,7 @@ int wake_up_state(struct task_struct *p,
+@@ -2164,6 +2164,7 @@ int wake_up_state(struct task_struct *p,
  {
  	return try_to_wake_up(p, state, 0);
  }
diff --git a/target/linux/generic/pending-4.14/490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch b/target/linux/generic/pending-4.14/490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch
index 2a09caf442..63afabb1d9 100644
--- a/target/linux/generic/pending-4.14/490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch
+++ b/target/linux/generic/pending-4.14/490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch
@@ -8,7 +8,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
 
 --- a/drivers/mtd/ubi/build.c
 +++ b/drivers/mtd/ubi/build.c
-@@ -1168,6 +1168,49 @@ static struct mtd_info * __init open_mtd
+@@ -1171,6 +1171,49 @@ static struct mtd_info * __init open_mtd
  	return mtd;
  }
  
@@ -58,7 +58,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  static int __init ubi_init(void)
  {
  	int err, i, k;
-@@ -1251,6 +1294,12 @@ static int __init ubi_init(void)
+@@ -1254,6 +1297,12 @@ static int __init ubi_init(void)
  		}
  	}
  
diff --git a/target/linux/generic/pending-4.14/640-netfilter-nf_flow_table-add-hardware-offload-support.patch b/target/linux/generic/pending-4.14/640-netfilter-nf_flow_table-add-hardware-offload-support.patch
index 73475a5433..72121eb11a 100644
--- a/target/linux/generic/pending-4.14/640-netfilter-nf_flow_table-add-hardware-offload-support.patch
+++ b/target/linux/generic/pending-4.14/640-netfilter-nf_flow_table-add-hardware-offload-support.patch
@@ -506,7 +506,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
 +MODULE_ALIAS("nf-flow-table-hw");
 --- a/net/netfilter/nf_tables_api.c
 +++ b/net/netfilter/nf_tables_api.c
-@@ -4873,6 +4873,14 @@ static int nf_tables_flowtable_parse_hoo
+@@ -4916,6 +4916,14 @@ static int nf_tables_flowtable_parse_hoo
  	if (err < 0)
  		goto err1;
  
@@ -521,7 +521,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	ops = kzalloc(sizeof(struct nf_hook_ops) * n, GFP_KERNEL);
  	if (!ops) {
  		err = -ENOMEM;
-@@ -5003,10 +5011,19 @@ static int nf_tables_newflowtable(struct
+@@ -5046,10 +5054,19 @@ static int nf_tables_newflowtable(struct
  	}
  
  	flowtable->data.type = type;
@@ -541,7 +541,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  	err = nf_tables_flowtable_parse_hook(&ctx, nla[NFTA_FLOWTABLE_HOOK],
  					     flowtable);
  	if (err < 0)
-@@ -5104,7 +5121,8 @@ static int nf_tables_fill_flowtable_info
+@@ -5147,7 +5164,8 @@ static int nf_tables_fill_flowtable_info
  	    nla_put_string(skb, NFTA_FLOWTABLE_NAME, flowtable->name) ||
  	    nla_put_be32(skb, NFTA_FLOWTABLE_USE, htonl(flowtable->use)) ||
  	    nla_put_be64(skb, NFTA_FLOWTABLE_HANDLE, cpu_to_be64(flowtable->handle),
diff --git a/target/linux/ipq40xx/patches-4.14/400-mtd-ubi-add-quirk-to-autoload-ubi-on-rt-ac58u.patch b/target/linux/ipq40xx/patches-4.14/400-mtd-ubi-add-quirk-to-autoload-ubi-on-rt-ac58u.patch
index 8a9da2c088..4ee79515c9 100644
--- a/target/linux/ipq40xx/patches-4.14/400-mtd-ubi-add-quirk-to-autoload-ubi-on-rt-ac58u.patch
+++ b/target/linux/ipq40xx/patches-4.14/400-mtd-ubi-add-quirk-to-autoload-ubi-on-rt-ac58u.patch
@@ -17,7 +17,7 @@ Signed-off-by: Christian Lamparter <chunkeey at googlemail.com>
 
 --- a/drivers/mtd/ubi/build.c
 +++ b/drivers/mtd/ubi/build.c
-@@ -1181,6 +1181,9 @@ static void __init ubi_auto_attach(void)
+@@ -1184,6 +1184,9 @@ static void __init ubi_auto_attach(void)
  	mtd = open_mtd_device("ubi");
  	if (IS_ERR(mtd))
  		mtd = open_mtd_device("data");
diff --git a/target/linux/mediatek/patches-4.14/0064-dts.patch b/target/linux/mediatek/patches-4.14/0064-dts.patch
index cfae4fee64..08feb8d731 100644
--- a/target/linux/mediatek/patches-4.14/0064-dts.patch
+++ b/target/linux/mediatek/patches-4.14/0064-dts.patch
@@ -11,8 +11,8 @@
  	cpus {
  		cpu at 0 {
  			proc-supply = <&mt6323_vproc_reg>;
-@@ -102,6 +106,10 @@
- 	memory at 80000000 {
+@@ -103,6 +107,10 @@
+ 		device_type = "memory";
  		reg = <0 0x80000000 0 0x40000000>;
  	};
 +
@@ -22,7 +22,7 @@
  };
  
  &cir {
-@@ -129,11 +137,24 @@
+@@ -130,11 +138,24 @@
  		};
  	};
  
@@ -49,7 +49,7 @@
  			compatible = "mediatek,mt7530";
  			#address-cells = <1>;
  			#size-cells = <0>;
-@@ -143,6 +164,8 @@
+@@ -144,6 +165,8 @@
  			core-supply = <&mt6323_vpa_reg>;
  			io-supply = <&mt6323_vemc3v3_reg>;
  
@@ -58,7 +58,7 @@
  			ports {
  				#address-cells = <1>;
  				#size-cells = <0>;
-@@ -151,29 +174,46 @@
+@@ -152,29 +175,46 @@
  				port at 0 {
  					reg = <0>;
  					label = "wan";
@@ -106,7 +106,7 @@
  					reg = <6>;
  					label = "cpu";
  					ethernet = <&gmac0>;
-@@ -186,8 +226,6 @@
+@@ -187,8 +227,6 @@
  				};
  			};
  		};
@@ -579,7 +579,7 @@
 +
 --- a/arch/arm/boot/dts/mt7623.dtsi
 +++ b/arch/arm/boot/dts/mt7623.dtsi
-@@ -322,6 +322,7 @@
+@@ -323,6 +323,7 @@
  			     "syscon";
  		reg = <0 0x10209000 0 0x1000>;
  		#clock-cells = <1>;
-- 
2.11.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From zajec5 at gmail.com  Wed Jul 11 00:36:51 2018
From: zajec5 at gmail.com (=?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?=)
Date: Wed, 11 Jul 2018 06:36:51 +0200
Subject: [OpenWrt-Devel] [PATCH] mtd: skip bad blocks when writing
In-Reply-To: <20180518152530.2642-1-leventelist@gmail.com>
References: <20180518152530.2642-1-leventelist@gmail.com>
Message-ID: <39877681-7d36-36db-a0fe-7986d66f51d6@gmail.com>

Please sign off your patch with full real name and send again.

On 18.05.2018 17:25, Lev wrote:
> ---
>   package/system/mtd/src/jffs2.c | 10 ++++++++++
>   1 file changed, 10 insertions(+)
> 
> diff --git a/package/system/mtd/src/jffs2.c b/package/system/mtd/src/jffs2.c
> index b432f64ac0..5bf3eec328 100644
> --- a/package/system/mtd/src/jffs2.c
> +++ b/package/system/mtd/src/jffs2.c
> @@ -308,6 +308,16 @@ int mtd_write_jffs2(const char *mtd, const char *filename, const char *dir)
>   	for(;;) {
>   		struct jffs2_unknown_node *node = (struct jffs2_unknown_node *) buf;
>   
> +		while (mtd_block_is_bad(outfd, mtdofs) && (mtdofs < mtdsize)) {

I think your checks should happen in reverted order. It makes more sense
to first validate mtdofs value and then use it.


> +			if (!quiet)
> +				fprintf(stderr, "\nSkipping bad block at 0x%08x   ", mtdofs);

Why \n at the beginning? Why empty spaces at the end?


> +
> +			mtdofs += erasesize;
> +
> +			/* Move the file pointer along over the bad block. */
> +			lseek(outfd, erasesize, SEEK_CUR);
> +		}
> +
>   		if (read(outfd, buf, erasesize) != erasesize) {
>   			fdeof = 1;
>   			break;
> 

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From hannu.nyman at iki.fi  Wed Jul 11 00:45:53 2018
From: hannu.nyman at iki.fi (Hannu Nyman)
Date: Wed, 11 Jul 2018 07:45:53 +0300
Subject: [OpenWrt-Devel] [PATCH 2/2] [RFC] kernel: bump 4.14 to 4.14.54
 for 18.06
In-Reply-To: <20180710200832.3260-2-foss@volatilesystems.org>
References: <20180710200832.3260-1-foss@volatilesystems.org>
 <20180710200832.3260-2-foss@volatilesystems.org>
Message-ID: <46f3116e-f981-6bcf-37ab-481a1ee133b8@iki.fi>

Stijn Segers kirjoitti 10.7.2018 klo 23:08:
> Refreshed patches. The bump from .53 to .54 introduced a minor change in net/netfilter/nf_tables_api.c [1] but I am unable to
> judge if this is a fluke or not, so I'd like a second pair of eyes on that. It's a single 'table[0]' being replaced by 'table':
>
> - if (filter && filter->table[0] &&
> + if (filter && filter->table &&
>
> I have updated the 335-v4.16-netfilter-nf_tables-add-single-table-list-for-all-fa.patch accordingly.
>

Seems like a legitimate change due to upstream changes that are clearly 
visible in your upstream diff link.

Clicking your link and then looking at the file's commit log, I luckily 
stumbled directly to the responsible commit (fix NULL pointer):

https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/net/netfilter/nf_tables_api.c?id=360cc79d9d299ce297b205508276285ceffc5fa8

Note also that our patch 335 removes the whole code block where that one line 
changed in upstream. So, the change inside the removed code block would be 
rather safe in any case.


>
> [1]	https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/diff/net/netfilter/nf_tables_api.c?id=v4.14.54&id2=v4.14.53
>

> @@ -895,7 +895,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
>    	const struct nft_table *table;
>    	unsigned int idx = 0, s_idx = cb->args[0];
>    	struct nft_obj_filter *filter = cb->data;
> -@@ -4576,38 +4562,37 @@ static int nf_tables_dump_obj(struct sk_
> +@@ -4619,38 +4605,37 @@ static int nf_tables_dump_obj(struct sk_
>    	rcu_read_lock();
>    	cb->seq = net->nft.base_seq;
>    
> @@ -914,7 +914,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
>   -				if (idx > s_idx)
>   -					memset(&cb->args[1], 0,
>   -					       sizeof(cb->args) - sizeof(cb->args[0]));
> --				if (filter && filter->table[0] &&
> +-				if (filter && filter->table &&
>   -				    strcmp(filter->table, table->name))
>   -					goto cont;
>   -				if (filter &&
> @@ -960,7 +960,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
>    		}
>    	}


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From dedeckeh at gmail.com  Wed Jul 11 03:15:49 2018
From: dedeckeh at gmail.com (Hans Dedecker)
Date: Wed, 11 Jul 2018 09:15:49 +0200
Subject: [OpenWrt-Devel] [PATCH] wireguard: bump to 0.0.20180708
In-Reply-To: <20180710192918.3333-1-Jason@zx2c4.com>
References: <20180710192918.3333-1-Jason@zx2c4.com>
Message-ID: <CAJLcKsFdjnYbN_vwqUCMpbOKt66Jw=Hda-XTo_ngPmjTHRzC7A@mail.gmail.com>

On Tue, Jul 10, 2018 at 9:29 PM Jason A. Donenfeld <Jason at zx2c4.com> wrote:
>
> * device: print daddr not saddr in missing peer error
> * receive: style
>
> Debug messages now make sense again.
>
> * wg-quick: android: support excluding applications
>
> Android now supports excluding certain apps (uids) from the tunnel.
>
> * selftest: ratelimiter: improve chance of success via retry
> * qemu: bump default kernel version
> * qemu: decide debug kernel based on KERNEL_VERSION
>
> Some improvements to our testing infrastructure.
>
> * receive: use NAPI on the receive path
>
> This is a big change that should both improve preemption latency (by not
> disabling it unconditionally) and vastly improve rx performance on most
> systems by using NAPI. The main purpose of this snapshot is to test out this
> technique.
>
> Signed-off-by: Jason A. Donenfeld <Jason at zx2c4.com>
Patch applied; thx

Hans
> ---
>  package/network/services/wireguard/Makefile | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/package/network/services/wireguard/Makefile b/package/network/services/wireguard/Makefile
> index 63aaf39405..90ecae3e64 100644
> --- a/package/network/services/wireguard/Makefile
> +++ b/package/network/services/wireguard/Makefile
> @@ -11,12 +11,12 @@ include $(INCLUDE_DIR)/kernel.mk
>
>  PKG_NAME:=wireguard
>
> -PKG_VERSION:=0.0.20180625
> +PKG_VERSION:=0.0.20180708
>  PKG_RELEASE:=1
>
>  PKG_SOURCE:=WireGuard-$(PKG_VERSION).tar.xz
>  PKG_SOURCE_URL:=https://git.zx2c4.com/WireGuard/snapshot/
> -PKG_HASH:=d9bedeb22b1f83d48581608a6521fea1d429fbeb8809419d08703ef2ec570020
> +PKG_HASH:=5e38d554f7d1e3a64e3a5319ca1a3b790c84ed89c896586c490a93ac1f953a91
>
>  PKG_LICENSE:=GPL-2.0 Apache-2.0
>  PKG_LICENSE_FILES:=COPYING
> --
> 2.18.0
>
>
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From dedeckeh at gmail.com  Wed Jul 11 03:41:22 2018
From: dedeckeh at gmail.com (Hans Dedecker)
Date: Wed, 11 Jul 2018 09:41:22 +0200
Subject: [OpenWrt-Devel] [PATCH] qos-scripts: fix indentation
In-Reply-To: <20180710165030.18525-1-moritzwarning@web.de>
References: <20180710165030.18525-1-moritzwarning@web.de>
Message-ID: <CAJLcKsExm77Z6uNyDR8kVOALi23XyFQ_yG5C93-vzwtrM_d+XA@mail.gmail.com>

On Tue, Jul 10, 2018 at 6:51 PM Moritz Warning <moritzwarning at web.de> wrote:
>
> Signed-off-by: Moritz Warning <moritzwarning at web.de>
Patch applied; thx

Hans
> ---
>  .../qos-scripts/files/usr/bin/qos-start       |  2 +-
>  .../config/qos-scripts/files/usr/bin/qos-stop |  1 +
>  .../qos-scripts/files/usr/lib/qos/generate.sh | 28 +++++++++----------
>  3 files changed, 16 insertions(+), 15 deletions(-)
>
> diff --git a/package/network/config/qos-scripts/files/usr/bin/qos-start b/package/network/config/qos-scripts/files/usr/bin/qos-start
> index 261ffb42b0..68dae70638 100755
> --- a/package/network/config/qos-scripts/files/usr/bin/qos-start
> +++ b/package/network/config/qos-scripts/files/usr/bin/qos-start
> @@ -1,4 +1,4 @@
>  #!/bin/sh
> +
>  qos-stop
>  /usr/lib/qos/generate.sh all | sh
> -
> diff --git a/package/network/config/qos-scripts/files/usr/bin/qos-stop b/package/network/config/qos-scripts/files/usr/bin/qos-stop
> index 7f654d8587..ea3bba3abf 100755
> --- a/package/network/config/qos-scripts/files/usr/bin/qos-stop
> +++ b/package/network/config/qos-scripts/files/usr/bin/qos-stop
> @@ -1,4 +1,5 @@
>  #!/bin/sh
> +
>  for iface in $(tc qdisc show | grep -E '(hfsc|ingress)' | awk '{print $5}'); do
>         tc qdisc del dev "$iface" ingress 2>&- >&-
>         tc qdisc del dev "$iface" root 2>&- >&-
> diff --git a/package/network/config/qos-scripts/files/usr/lib/qos/generate.sh b/package/network/config/qos-scripts/files/usr/lib/qos/generate.sh
> index 48c9f4a9df..3ec7f80e53 100755
> --- a/package/network/config/qos-scripts/files/usr/lib/qos/generate.sh
> +++ b/package/network/config/qos-scripts/files/usr/lib/qos/generate.sh
> @@ -118,21 +118,21 @@ parse_matching_rule() {
>                                 append "$var" "-m comment --comment '$value'"
>                         ;;
>                         *:tos)
> -                                add_insmod xt_dscp
> -                                case "$value" in
> -                                        !*) append "$var" "-m tos ! --tos $value";;
> -                                        *) append "$var" "-m tos --tos $value"
> -                                esac
> -                        ;;
> +                               add_insmod xt_dscp
> +                               case "$value" in
> +                                       !*) append "$var" "-m tos ! --tos $value";;
> +                                       *) append "$var" "-m tos --tos $value"
> +                               esac
> +                       ;;
>                         *:dscp)
> -                                add_insmod xt_dscp
> +                               add_insmod xt_dscp
>                                 dscp_option="--dscp"
> -                                [ -z "${value%%[EBCA]*}" ] && dscp_option="--dscp-class"
> +                               [ -z "${value%%[EBCA]*}" ] && dscp_option="--dscp-class"
>                                 case "$value" in
> -                                               !*) append "$var" "-m dscp ! $dscp_option $value";;
> -                                               *) append "$var" "-m dscp $dscp_option $value"
> -                                esac
> -                        ;;
> +                                       !*) append "$var" "-m dscp ! $dscp_option $value";;
> +                                       *) append "$var" "-m dscp $dscp_option $value"
> +                               esac
> +                       ;;
>                         *:direction)
>                                 value="$(echo "$value" | sed -e 's,-,:,g')"
>                                 if [ "$value" = "out" ]; then
> @@ -428,7 +428,7 @@ start_cg() {
>         cat <<EOF
>  $INSMOD
>  EOF
> -
> +
>  for command in $iptables; do
>         cat <<EOF
>         $command -w -t mangle -N qos_${cg}
> @@ -486,7 +486,7 @@ stop_firewall() {
>                                 -e 's/^-A/-D/' \
>                                 -e '${p;g}' |
>                         # Make into proper iptables calls
> -                       # Note:  awkward in previous call due to hold space usage
> +                       # Note: awkward in previous call due to hold space usage
>                         sed -n -e "s/^./${command} -w -t mangle &/p"
>         done
>  }
> --
> 2.18.0
>
>
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From kevin at darbyshire-bryant.me.uk  Wed Jul 11 04:11:46 2018
From: kevin at darbyshire-bryant.me.uk (Kevin Darbyshire-Bryant)
Date: Wed, 11 Jul 2018 08:11:46 +0000
Subject: [OpenWrt-Devel] [PATCH 2/2] [RFC] kernel: bump 4.14 to 4.14.54
 for 18.06
In-Reply-To: <46f3116e-f981-6bcf-37ab-481a1ee133b8@iki.fi>
References: <20180710200832.3260-1-foss@volatilesystems.org>
 <20180710200832.3260-2-foss@volatilesystems.org>
 <46f3116e-f981-6bcf-37ab-481a1ee133b8@iki.fi>
Message-ID: <DA92E917-40D8-411C-96EC-58352F1EA010@darbyshire-bryant.me.uk>



> On 11 Jul 2018, at 05:45, Hannu Nyman <hannu.nyman at iki.fi> wrote:
> 
> Stijn Segers kirjoitti 10.7.2018 klo 23:08:
>> Refreshed patches. The bump from .53 to .54 introduced a minor change in net/netfilter/nf_tables_api.c [1] but I am unable to
>> judge if this is a fluke or not, so I'd like a second pair of eyes on that. It's a single 'table[0]' being replaced by 'table':
>> 
>> - if (filter && filter->table[0] &&
>> + if (filter && filter->table &&
>> 
>> I have updated the 335-v4.16-netfilter-nf_tables-add-single-table-list-for-all-fa.patch accordingly.
>> 
> 
> Seems like a legitimate change due to upstream changes that are clearly visible in your upstream diff link.
> 
> Clicking your link and then looking at the file's commit log, I luckily stumbled directly to the responsible commit (fix NULL pointer):
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/net/netfilter/nf_tables_api.c?id=360cc79d9d299ce297b205508276285ceffc5fa8
> 
> Note also that our patch 335 removes the whole code block where that one line changed in upstream. So, the change inside the removed code block would be rather safe in any case.
> 
> 
>> 
>> [1]	https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/diff/net/netfilter/nf_tables_api.c?id=v4.14.54&id2=v4.14.53
>> 
> 
>> @@ -895,7 +895,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
>>   	const struct nft_table *table;
>>   	unsigned int idx = 0, s_idx = cb->args[0];
>>   	struct nft_obj_filter *filter = cb->data;
>> -@@ -4576,38 +4562,37 @@ static int nf_tables_dump_obj(struct sk_
>> +@@ -4619,38 +4605,37 @@ static int nf_tables_dump_obj(struct sk_
>>   	rcu_read_lock();
>>   	cb->seq = net->nft.base_seq;
>>   @@ -914,7 +914,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
>>  -				if (idx > s_idx)
>>  -					memset(&cb->args[1], 0,
>>  -					       sizeof(cb->args) - sizeof(cb->args[0]));
>> --				if (filter && filter->table[0] &&
>> +-				if (filter && filter->table &&
>>  -				    strcmp(filter->table, table->name))
>>  -					goto cont;
>>  -				if (filter &&
>> @@ -960,7 +960,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
>>   		}
>>   	}
> 

Really not convinced I agree with the "patch 335 removes the whole code block where that one line changed in upstream?.  Did a refresh myself, several times, and patch 335 is a right confusing pain in the backside.  I think the block in question should look like:

@@ -4619,38 +4605,37 @@ static int nf_tables_dump_obj(struct sk_
 	rcu_read_lock();
 	cb->seq = net->nft.base_seq;

-	list_for_each_entry_rcu(afi, &net->nft.af_info, list) {
-		if (family != NFPROTO_UNSPEC && family != afi->family)
+	list_for_each_entry_rcu(table, &net->nft.tables, list) {
+		if (family != NFPROTO_UNSPEC && family != table->afi->family)
 			continue;

-		list_for_each_entry_rcu(table, &afi->tables, list) {
-			list_for_each_entry_rcu(obj, &table->objects, list) {
-				if (!nft_is_active(net, obj))
-					goto cont;
-				if (idx < s_idx)
-					goto cont;
-				if (idx > s_idx)
-					memset(&cb->args[1], 0,
-					       sizeof(cb->args) - sizeof(cb->args[0]));
-				if (filter && filter->table &&
-				    strcmp(filter->table, table->name))
-					goto cont;
-				if (filter &&
-				    filter->type != NFT_OBJECT_UNSPEC &&
-				    obj->ops->type->type != filter->type)
-					goto cont;
+		list_for_each_entry_rcu(obj, &table->objects, list) {
+			if (!nft_is_active(net, obj))
+				goto cont;
+			if (idx < s_idx)
+				goto cont;
+			if (idx > s_idx)
+				memset(&cb->args[1], 0,
+				       sizeof(cb->args) - sizeof(cb->args[0]));
+			if (filter && filter->table &&
+			    strcmp(filter->table, table->name))
+				goto cont;
+			if (filter &&
+			    filter->type != NFT_OBJECT_UNSPEC &&
+			    obj->ops->type->type != filter->type)
+				goto cont;

-				if (nf_tables_fill_obj_info(skb, net, NETLINK_CB(cb->skb).portid,
-							    cb->nlh->nlmsg_seq,
-							    NFT_MSG_NEWOBJ,
-							    NLM_F_MULTI | NLM_F_APPEND,
-							    afi->family, table, obj, reset) < 0)
-					goto done;
+			if (nf_tables_fill_obj_info(skb, net, NETLINK_CB(cb->skb).portid,
+						    cb->nlh->nlmsg_seq,
+						    NFT_MSG_NEWOBJ,
+						    NLM_F_MULTI | NLM_F_APPEND,
+						    table->afi->family, table,
+						    obj, reset) < 0)
+				goto done;

-				nl_dump_check_consistent(cb, nlmsg_hdr(skb));
-cont:
-				idx++;
-			}
+			nl_dump_check_consistent(cb, nlmsg_hdr(skb));
+  cont:
+			idx++;
 		}
 	}
 done:

There are a couple of similar blocks, which have probably confused me anyway.

Overall this one patch in the refresh makes me distinctly uncomfortable.


> 
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Cheers,

Kevin D-B

012C ACB2 28C6 C53E 9775  9123 B3A2 389B 9DE2 334A

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Message signed with OpenPGP
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20180711/afc4a9b6/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From koen.vandeputte at ncentric.com  Wed Jul 11 04:21:24 2018
From: koen.vandeputte at ncentric.com (Koen Vandeputte)
Date: Wed, 11 Jul 2018 10:21:24 +0200
Subject: [OpenWrt-Devel] [PATCH 2/2] [RFC] kernel: bump 4.14 to 4.14.54
 for 18.06
In-Reply-To: <20180710200832.3260-2-foss@volatilesystems.org>
References: <20180710200832.3260-1-foss@volatilesystems.org>
 <20180710200832.3260-2-foss@volatilesystems.org>
Message-ID: <bca1be90-02ba-1016-dc4b-5a764d25f0eb@ncentric.com>



On 2018-07-10 22:08, Stijn Segers wrote:
> Refreshed patches. The bump from .53 to .54 introduced a minor change in net/netfilter/nf_tables_api.c [1] but I am unable to
> judge if this is a fluke or not, so I'd like a second pair of eyes on that. It's a single 'table[0]' being replaced by 'table':
>
> - if (filter && filter->table[0] &&
> + if (filter && filter->table &&
>
> I have updated the 335-v4.16-netfilter-nf_tables-add-single-table-list-for-all-fa.patch accordingly.
>
> Compile-tested on: ramips/mt7621, x86/64
> Run-tested on: ramips/mt7621, x86/64
>
> [1]	https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/diff/net/netfilter/nf_tables_api.c?id=v4.14.54&id2=v4.14.53

Hi Stijn,

I ran into the same yesterday when creating the bump to 4.14.54 for master.

The upstream patch in 4.14 is altering this check in 1 location only:? 
nf_tables_dump_obj()? [1]
Within OpenWrt, this functionality was backported from 4.16 and 4.18

Within the "335-.." patch, there is another function doing the exact 
same check on the exact same data: nf_tables_dump_flowtable() [2]
Your kernel bump patch should also fix it over there. (line 1084)


[1] 
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?h=v4.14.54&id=b8d8cde449fd51db0bb407dece03d36ced1acb83
[2] 
https://git.openwrt.org/?p=openwrt/staging/xback.git;a=blob;f=target/linux/generic/backport-4.14/335-v4.16-netfilter-nf_tables-add-single-table-list-for-all-fa.patch;h=787f62ef8f0b2a0d9ca8e1fb360a6c06115b40fc;hb=b84a07b3803bd39d0a1eb1b040718a023b8f7971#l1048


Koen

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From koen.vandeputte at ncentric.com  Wed Jul 11 04:31:09 2018
From: koen.vandeputte at ncentric.com (Koen Vandeputte)
Date: Wed, 11 Jul 2018 10:31:09 +0200
Subject: [OpenWrt-Devel] [PATCH 2/2] [RFC] kernel: bump 4.14 to 4.14.54
 for 18.06
In-Reply-To: <DA92E917-40D8-411C-96EC-58352F1EA010@darbyshire-bryant.me.uk>
References: <20180710200832.3260-1-foss@volatilesystems.org>
 <20180710200832.3260-2-foss@volatilesystems.org>
 <46f3116e-f981-6bcf-37ab-481a1ee133b8@iki.fi>
 <DA92E917-40D8-411C-96EC-58352F1EA010@darbyshire-bryant.me.uk>
Message-ID: <d079a8bc-b99a-8484-7777-c34975c494a6@ncentric.com>



On 2018-07-11 10:11, Kevin Darbyshire-Bryant wrote:
>
> Really not convinced I agree with the "patch 335 removes the whole code block where that one line changed in upstream?.  Did a refresh myself, several times, and patch 335 is a right confusing pain in the backside.  I think the block in question should look like:
>
> @@ -4619,38 +4605,37 @@ static int nf_tables_dump_obj(struct sk_
>   	rcu_read_lock();
>   	cb->seq = net->nft.base_seq;
>
> -	list_for_each_entry_rcu(afi, &net->nft.af_info, list) {
> -		if (family != NFPROTO_UNSPEC && family != afi->family)
> +	list_for_each_entry_rcu(table, &net->nft.tables, list) {
> +		if (family != NFPROTO_UNSPEC && family != table->afi->family)
>   			continue;
>
> -		list_for_each_entry_rcu(table, &afi->tables, list) {
> -			list_for_each_entry_rcu(obj, &table->objects, list) {
> -				if (!nft_is_active(net, obj))
> -					goto cont;
> -				if (idx < s_idx)
> -					goto cont;
> -				if (idx > s_idx)
> -					memset(&cb->args[1], 0,
> -					       sizeof(cb->args) - sizeof(cb->args[0]));
> -				if (filter && filter->table &&
> -				    strcmp(filter->table, table->name))
> -					goto cont;
> -				if (filter &&
> -				    filter->type != NFT_OBJECT_UNSPEC &&
> -				    obj->ops->type->type != filter->type)
> -					goto cont;
> +		list_for_each_entry_rcu(obj, &table->objects, list) {
> +			if (!nft_is_active(net, obj))
> +				goto cont;
> +			if (idx < s_idx)
> +				goto cont;
> +			if (idx > s_idx)
> +				memset(&cb->args[1], 0,
> +				       sizeof(cb->args) - sizeof(cb->args[0]));
> +			if (filter && filter->table &&
> +			    strcmp(filter->table, table->name))
> +				goto cont;
> +			if (filter &&
> +			    filter->type != NFT_OBJECT_UNSPEC &&
> +			    obj->ops->type->type != filter->type)
> +				goto cont;
>
> -				if (nf_tables_fill_obj_info(skb, net, NETLINK_CB(cb->skb).portid,
> -							    cb->nlh->nlmsg_seq,
> -							    NFT_MSG_NEWOBJ,
> -							    NLM_F_MULTI | NLM_F_APPEND,
> -							    afi->family, table, obj, reset) < 0)
> -					goto done;
> +			if (nf_tables_fill_obj_info(skb, net, NETLINK_CB(cb->skb).portid,
> +						    cb->nlh->nlmsg_seq,
> +						    NFT_MSG_NEWOBJ,
> +						    NLM_F_MULTI | NLM_F_APPEND,
> +						    table->afi->family, table,
> +						    obj, reset) < 0)
> +				goto done;
>
> -				nl_dump_check_consistent(cb, nlmsg_hdr(skb));
> -cont:
> -				idx++;
> -			}
> +			nl_dump_check_consistent(cb, nlmsg_hdr(skb));
> +  cont:
> +			idx++;
>   		}
>   	}
>   done:
>
> There are a couple of similar blocks, which have probably confused me anyway.
>
> Overall this one patch in the refresh makes me distinctly uncomfortable.
>
>
+1 to get this cleaned up properly, but I would propose to do it 
separately and after the kernel bump patch.

Koen

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From zajec5 at gmail.com  Wed Jul 11 04:52:34 2018
From: zajec5 at gmail.com (=?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?=)
Date: Wed, 11 Jul 2018 10:52:34 +0200
Subject: [OpenWrt-Devel] [PATCH V2] mtd: support bad blocks within the
 mtd_fixtrx()
In-Reply-To: <20180710195915.1856-1-zajec5@gmail.com>
References: <20180710195915.1856-1-zajec5@gmail.com>
Message-ID: <20180711085234.1201-1-zajec5@gmail.com>

From: Rafa? Mi?ecki <rafal at milecki.pl>

Reading MTD data with (p)read doesn't return any error when accessing
bad block. As the result, with current code, CRC32 covers "data" stored
in bad blocks.

That behavior doesn't match CFE's one (bootloader simply skips bad
blocks) and may result in:
1) Invalid CRC32
2) CFE refusing to boot firmware with a following error:
Boot program checksum is invalid

Fix that problem by checking every block before reading its content.

Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
---
V2: Bump PKG_RELEASE
    Use min() to make code easier to understand
    Recalculate data_size to make sure old size value (including bad
    blocks) isn't used.
    Drop some unneeded helper variables.
---
 package/system/mtd/Makefile  |  2 +-
 package/system/mtd/src/trx.c | 40 ++++++++++++++++++++++++++++++++++------
 2 files changed, 35 insertions(+), 7 deletions(-)

diff --git a/package/system/mtd/Makefile b/package/system/mtd/Makefile
index 9ae03a77a9..969e1c711c 100644
--- a/package/system/mtd/Makefile
+++ b/package/system/mtd/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=mtd
-PKG_RELEASE:=21
+PKG_RELEASE:=22
 
 PKG_BUILD_DIR := $(KERNEL_BUILD_DIR)/$(PKG_NAME)
 STAMP_PREPARED := $(STAMP_PREPARED)_$(call confvar,CONFIG_MTD_REDBOOT_PARTS)
diff --git a/package/system/mtd/src/trx.c b/package/system/mtd/src/trx.c
index 1f5c52914c..d4d486c32b 100644
--- a/package/system/mtd/src/trx.c
+++ b/package/system/mtd/src/trx.c
@@ -46,6 +46,12 @@ struct trx_header {
 	uint32_t offsets[3];    /* Offsets of partitions from start of header */
 };
 
+#define min(x,y) ({		\
+	typeof(x) _x = (x);	\
+	typeof(y) _y = (y);	\
+	(void) (&_x == &_y);	\
+	_x < _y ? _x : _y; })
+
 #if __BYTE_ORDER == __BIG_ENDIAN
 #define STORE32_LE(X)           ((((X) & 0x000000FF) << 24) | (((X) & 0x0000FF00) << 8) | (((X) & 0x00FF0000) >> 8) | (((X) & 0xFF000000) >> 24))
 #elif __BYTE_ORDER == __LITTLE_ENDIAN
@@ -156,7 +162,7 @@ mtd_fixtrx(const char *mtd, size_t offset, size_t data_size)
 	int fd;
 	struct trx_header *trx;
 	char *first_block;
-	char *buf;
+	char *buf, *to;
 	ssize_t res;
 	size_t block_offset;
 
@@ -214,11 +220,34 @@ mtd_fixtrx(const char *mtd, size_t offset, size_t data_size)
 		exit(1);
 	}
 
-	res = pread(fd, buf, data_size, data_offset);
-	if (res != data_size) {
-		perror("pread");
-		exit(1);
+	to = buf;
+	while (data_size) {
+		size_t read_block_offset = data_offset & ~(erasesize - 1);
+		size_t read_chunk;
+
+		read_chunk = erasesize - (data_offset & (erasesize - 1));
+		read_chunk = min(read_chunk, data_size);
+
+		res = ioctl(fd, MEMGETBADBLOCK, &read_block_offset);
+		if (res == -1) {
+			perror("ioctl");
+			exit(1);
+		}
+
+		/* Read from good blocks only to match CFE behavior */
+		if (res == 0) {
+			res = pread(fd, to, read_chunk, data_offset);
+			if (res != read_chunk) {
+				perror("pread");
+				exit(1);
+			}
+			to += read_chunk;
+		}
+
+		data_offset += read_chunk;
+		data_size -= read_chunk;
 	}
+	data_size = to - buf;
 
 	trx->len = STORE32_LE(data_size + offsetof(struct trx_header, flag_version));
 
@@ -244,4 +273,3 @@ mtd_fixtrx(const char *mtd, size_t offset, size_t data_size)
 	return 0;
 
 }
-
-- 
2.13.7


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From zajec5 at gmail.com  Wed Jul 11 04:59:36 2018
From: zajec5 at gmail.com (=?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?=)
Date: Wed, 11 Jul 2018 10:59:36 +0200
Subject: [OpenWrt-Devel] [PATCH 1/4] scripts/feeds: add src-dummy method
In-Reply-To: <a78e94c0897c4c450c36e6e1c1ae8ae9d928b05b.1531174081.git.mschiffer@universe-factory.net>
References: <cover.1531174081.git.mschiffer@universe-factory.net>
 <a78e94c0897c4c450c36e6e1c1ae8ae9d928b05b.1531174081.git.mschiffer@universe-factory.net>
Message-ID: <CACna6rz9pZs1Ts40tt9UXn_hX9q0f_RBVPxxOdJXp4okKbxuiQ@mail.gmail.com>

On Tue, 10 Jul 2018 at 00:31, Matthias Schiffer
<mschiffer at universe-factory.net> wrote:
> The src-dummy method does not actually obtain any feed, but it can be used
> to insert addtional entries into the opkg distfeeds.conf.

Should that be clear to me why we want that? Or could you add an extra
line of explanation, please?

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From jo at mein.io  Wed Jul 11 05:10:18 2018
From: jo at mein.io (Jo-Philipp Wich)
Date: Wed, 11 Jul 2018 11:10:18 +0200
Subject: [OpenWrt-Devel] [PATCH 0/4] Overhaul distfeeds.conf generation
In-Reply-To: <cover.1531174081.git.mschiffer@universe-factory.net>
References: <cover.1531174081.git.mschiffer@universe-factory.net>
Message-ID: <639d3234-b360-ecb8-6776-6590a3647c55@mein.io>

> This patchset implements a way to add additional distfeeds.conf entries
> (src-dummy method), makes rootfs creation independent of feed enable
> status, and moves from global ADD_DISABLED and ADD_COMMENTED symbols to
> per-feed configuration.

Acked-by: Jo-Philipp Wich <jo at mein.io>


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From lukas.mrtvy at gmail.com  Wed Jul 11 05:33:55 2018
From: lukas.mrtvy at gmail.com (=?UTF-8?B?THVrw6HFoSBNcnR2w70=?=)
Date: Wed, 11 Jul 2018 11:33:55 +0200
Subject: [OpenWrt-Devel] Patches to remove PCengines apuX boardname checking
 for leds-apu2 and gpio-nct5104d kernel modules
Message-ID: <CANrATEZQaK49ETwnQK4cVEcwFb8hArZRE7PPT=Lf=uHL6r5qew@mail.gmail.com>

Hello,
I am sending patches to remove PCengines apuX boardname checking for
leds-apu2 and gpio-nct5104d kernel modules.
No need to check boardname, which is squishy in different versions of
coreboot.

https://github.com/pcengines/coreboot/compare/v4.6.6...v4.6.7

contact IRC: muhaha
Thanks
-- 
BR,
Luk?? Mrtv?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20180711/db642df3/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 301-kernel-leds-apu2-remove-boardname-check.patch
Type: text/x-patch
Size: 1382 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20180711/db642df3/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 301-kernel-gpio-nct5104d-remove-boardname-check.patch
Type: text/x-patch
Size: 1232 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20180711/db642df3/attachment-0001.bin>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From hannu.nyman at iki.fi  Wed Jul 11 05:44:38 2018
From: hannu.nyman at iki.fi (Hannu Nyman)
Date: Wed, 11 Jul 2018 12:44:38 +0300
Subject: [OpenWrt-Devel] [PATCH 2/2] [RFC] kernel: bump 4.14 to 4.14.54 for
 18.06
Message-ID: <124fe88a079d76d4bcecd6e2b20aff58@iki.fi>

Kevin Darbyshire-Bryant wrote:
> Really not convinced I agree with the "patch 335 removes the whole code 
> block where that one line changed in upstream?.

You are right.
The corresponding addition needs to be done for the lines replacing the 
removed lines:
  932 + if (filter && filter->table[0] &&
should likely be
  932 + if (filter && filter->table &&
matching the change done upstream.

In my comment I overlooked the part where we add back similar lines :-(

(the refresh patch only notices the need to refresh the upstream lines, 
but does not know about out own additions.)

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From kevin at darbyshire-bryant.me.uk  Wed Jul 11 06:38:39 2018
From: kevin at darbyshire-bryant.me.uk (Kevin Darbyshire-Bryant)
Date: Wed, 11 Jul 2018 10:38:39 +0000
Subject: [OpenWrt-Devel] [PATCH 2/2] [RFC] kernel: bump 4.14 to 4.14.54
 for 18.06
In-Reply-To: <124fe88a079d76d4bcecd6e2b20aff58@iki.fi>
References: <124fe88a079d76d4bcecd6e2b20aff58@iki.fi>
Message-ID: <66B57B04-EA13-4A8C-8725-8D7145048121@darbyshire-bryant.me.uk>



> On 11 Jul 2018, at 10:44, Hannu Nyman <hannu.nyman at iki.fi> wrote:
> 
> Kevin Darbyshire-Bryant wrote:
>> Really not convinced I agree with the "patch 335 removes the whole code block where that one line changed in upstream?.
> 
> You are right.
> The corresponding addition needs to be done for the lines replacing the removed lines:
> 932 + if (filter && filter->table[0] &&
> should likely be
> 932 + if (filter && filter->table &&
> matching the change done upstream.
> 
> In my comment I overlooked the part where we add back similar lines :-(

lol - I?m really happy?.it turns out I?m not *completely* stupid :-)

> 
> (the refresh patch only notices the need to refresh the upstream lines, but does not know about out own additions.)

Reading patches to patches is?.challenging.   I wonder if there?s a tool that would make it easier?

Sunshine!

Kevin


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Message signed with OpenPGP
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20180711/b8040abd/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From alexvoina1994 at gmail.com  Wed Jul 11 11:52:26 2018
From: alexvoina1994 at gmail.com (Voina Alex)
Date: Wed, 11 Jul 2018 18:52:26 +0300
Subject: [OpenWrt-Devel] Fwd: Fixed bug
In-Reply-To: <CA+kudQ9y9MwV68H4erD2QanJRDqtOdEPLRk0VbH3MV6yEJLXkg@mail.gmail.com>
References: <CA+kudQ9y9MwV68H4erD2QanJRDqtOdEPLRk0VbH3MV6yEJLXkg@mail.gmail.com>
Message-ID: <CA+kudQ-=A0WAWn2=mYNPwbsJYK+LRL5HSW83DuQ=g2ThVZvypg@mail.gmail.com>

Dear OpenWRT/LEDE buddy,

I have found a bug in the Chaos Calmer (15.05.1 , 448532) release that has
been fixed since the lede-17.01.3 release for x86 targets. The bug is
related to ubusd or libubox but I'm not really sure which one it is. It is
a file descriptor leak rooted in the logread ubus method. Every call to
logread whether is logread -f, logread, logread -l 1 or ubus call log read
'{ }' opens a file of the following format which is not closed anymore.

ubusd   2918 root   41r   CHR                1,3      0t0    3934 /dev/null
ubusd   2918 root   42r   CHR                1,3      0t0    3934 /dev/null
ubusd   2918 root   43r   CHR                1,3      0t0    3934 /dev/null
ubusd   2918 root   44r   CHR                1,3      0t0    3934 /dev/null
ubusd   2918 root   45r   CHR                1,3      0t0    3934 /dev/null
ubusd   2918 root   46r   CHR                1,3      0t0    3934 /dev/null
ubusd   2918 root   47r   CHR                1,3      0t0    3934 /dev/null

I saw this issue is mitigated in lede-17.01.3 but I don't know where
exactly along the releases it happened. Can you point me to the
patch/commit that fixes this ?

Best,
Alex Voina
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20180711/de389dc2/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openwrt_fd_leak.png
Type: image/png
Size: 29284 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20180711/de389dc2/attachment.png>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From cshored at thecshore.com  Wed Jul 11 15:17:18 2018
From: cshored at thecshore.com (Daniel F. Dickinson)
Date: Wed, 11 Jul 2018 15:17:18 -0400
Subject: [OpenWrt-Devel] Fwd: Fixed bug
In-Reply-To: <CA+kudQ-=A0WAWn2=mYNPwbsJYK+LRL5HSW83DuQ=g2ThVZvypg@mail.gmail.com>
References: <CA+kudQ9y9MwV68H4erD2QanJRDqtOdEPLRk0VbH3MV6yEJLXkg@mail.gmail.com>
 <CA+kudQ-=A0WAWn2=mYNPwbsJYK+LRL5HSW83DuQ=g2ThVZvypg@mail.gmail.com>
Message-ID: <6ceb065a-649c-e5ea-0ebb-b225de18b2ff@thecshore.com>

On 2018-07-11 11:52 AM, Voina Alex wrote:
> 
> 
> Dear OpenWRT/LEDE buddy,
> 
> I have found a bug in the Chaos Calmer (15.05.1 , 448532) release that 
> has been fixed since the lede-17.01.3 release for x86 targets. The bug 
> is related to ubusd or libubox but I'm not really sure which one it is. 
> It is a file descriptor leak rooted in the logread ubus method. Every 
> call to logread whether is logread -f, logread, logread -l 1 or ubus 
> call log read '{ }' opens a file of the following format which is not 
> closed anymore.
> 
> ubusd?? 2918 root?? 41r?? CHR??????????????? 1,3????? 0t0??? 3934 /dev/null
> ubusd?? 2918 root?? 42r?? CHR??????????????? 1,3????? 0t0??? 3934 /dev/null
> ubusd?? 2918 root?? 43r?? CHR??????????????? 1,3????? 0t0??? 3934 /dev/null
> ubusd?? 2918 root?? 44r?? CHR??????????????? 1,3????? 0t0??? 3934 /dev/null
> ubusd?? 2918 root?? 45r?? CHR??????????????? 1,3????? 0t0??? 3934 /dev/null
> ubusd?? 2918 root?? 46r?? CHR??????????????? 1,3????? 0t0??? 3934 /dev/null
> ubusd?? 2918 root?? 47r?? CHR??????????????? 1,3????? 0t0??? 3934 /dev/null
> 
> I saw this issue is mitigated in lede-17.01.3 but I don't know where 
> exactly along the releases it happened. Can you point me to the 
> patch/commit that fixes this ?
> 


This is perhaps a silly question but did you look at the ubus repo at 
git.openwrt.org (ubus source code is maintained separate from the main 
tree; the main tree is primarily packaging/build and kernel concerns.

Regards,

Daniel

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From mschiffer at universe-factory.net  Wed Jul 11 15:39:24 2018
From: mschiffer at universe-factory.net (Matthias Schiffer)
Date: Wed, 11 Jul 2018 21:39:24 +0200
Subject: [OpenWrt-Devel] [PATCH 1/4] scripts/feeds: add src-dummy method
In-Reply-To: <CACna6rz9pZs1Ts40tt9UXn_hX9q0f_RBVPxxOdJXp4okKbxuiQ@mail.gmail.com>
References: <cover.1531174081.git.mschiffer@universe-factory.net>
 <a78e94c0897c4c450c36e6e1c1ae8ae9d928b05b.1531174081.git.mschiffer@universe-factory.net>
 <CACna6rz9pZs1Ts40tt9UXn_hX9q0f_RBVPxxOdJXp4okKbxuiQ@mail.gmail.com>
Message-ID: <262e49d3-feb5-c4a1-64eb-da14ebfabd99@universe-factory.net>

On 07/11/2018 10:59 AM, Rafa? Mi?ecki wrote:
> On Tue, 10 Jul 2018 at 00:31, Matthias Schiffer
> <mschiffer at universe-factory.net> wrote:
>> The src-dummy method does not actually obtain any feed, but it can be used
>> to insert addtional entries into the opkg distfeeds.conf.
> 
> Should that be clear to me why we want that? Or could you add an extra
> line of explanation, please?
> 

Well, I think it's generally a good idea to give firmware builders more
control over the contents of distfeeds.conf.

In Gluon, the concrete reason is that we want all standard OpenWrt feeds to
be available to users, even though we do not include all these feeds in the
build. I can add a bit more explanation to the commit message.

Matthias

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20180711/f7d748aa/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From linus.walleij at linaro.org  Wed Jul 11 15:47:18 2018
From: linus.walleij at linaro.org (Linus Walleij)
Date: Wed, 11 Jul 2018 21:47:18 +0200
Subject: [OpenWrt-Devel] [PATCH 1/3 v3] ARM: dts: Add WAN ethernet port to
 the SQ201
Message-ID: <20180711194720.25266-1-linus.walleij@linaro.org>

This sets up the ethernet interface and PHY for the
WAN ethernet port which uses a Marvell PHY.

Signed-off-by: Linus Walleij <linus.walleij at linaro.org>
---
ChangeLog v2->v3:
- No changes, just resending.
ChangeLog v1->v2:
- Rename wrongly named "ethernet-phy" to "mdio"
- Drop device_type from the ethernet phy
---
 arch/arm/boot/dts/gemini-sq201.dts | 85 ++++++++++++++++++++++++++++++
 1 file changed, 85 insertions(+)

diff --git a/arch/arm/boot/dts/gemini-sq201.dts b/arch/arm/boot/dts/gemini-sq201.dts
index 7658e212e6d2..cc693e64faaf 100644
--- a/arch/arm/boot/dts/gemini-sq201.dts
+++ b/arch/arm/boot/dts/gemini-sq201.dts
@@ -55,6 +55,21 @@
 		};
 	};
 
+	mdio0: ethernet-phy {
+		compatible = "virtual,mdio-gpio";
+		/* Uses MDC and MDIO */
+		gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>, /* MDC */
+			<&gpio0 21 GPIO_ACTIVE_HIGH>; /* MDIO */
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		/* This is a Marvell 88E1111 ethernet transciever */
+		phy0: ethernet-phy at 1 {
+			reg = <1>;
+			device_type = "ethernet-phy";
+		};
+	};
+
 	soc {
 		flash at 30000000 {
 			/*
@@ -108,6 +123,7 @@
 				/*
 				 * gpio0fgrp cover line 18 used by reset button
 				 * gpio0ggrp cover line 20 used by info LED
+				 * gpio0hgrp cover line 21, 22 used by MDIO for Marvell PHY
 				 * gpio0kgrp cover line 31 used by USB LED
 				 */
 				gpio0_default_pins: pinctrl-gpio0 {
@@ -115,9 +131,66 @@
 						function = "gpio0";
 						groups = "gpio0fgrp",
 						"gpio0ggrp",
+						"gpio0hgrp",
 						"gpio0kgrp";
 					};
 				};
+				pinctrl-gmii {
+					mux {
+						function = "gmii";
+						groups = "gmii_gmac0_grp", "gmii_gmac1_grp";
+					};
+					/* Settings come from memory dump in PLATO */
+					conf0 {
+						pins = "V8 GMAC0 RXDV";
+						skew-delay = <0>;
+					};
+					conf1 {
+						pins = "Y7 GMAC0 RXC";
+						skew-delay = <15>;
+					};
+					conf2 {
+						pins = "T8 GMAC0 TXEN";
+						skew-delay = <7>;
+					};
+					conf3 {
+						pins = "U8 GMAC0 TXC";
+						skew-delay = <10>;
+					};
+					conf4 {
+						pins = "T10 GMAC1 RXDV";
+						skew-delay = <7>;
+					};
+					conf5 {
+						pins = "Y11 GMAC1 RXC";
+						skew-delay = <8>;
+					};
+					conf6 {
+						pins = "W11 GMAC1 TXEN";
+						skew-delay = <7>;
+					};
+					conf7 {
+						pins = "V11 GMAC1 TXC";
+						skew-delay = <5>;
+					};
+					conf8 {
+						/* The data lines all have default skew */
+						pins = "W8 GMAC0 RXD0", "V9 GMAC0 RXD1",
+						       "Y8 GMAC0 RXD2", "U9 GMAC0 RXD3",
+						       "T7 GMAC0 TXD0", "U6 GMAC0 TXD1",
+						       "V7 GMAC0 TXD2", "U7 GMAC0 TXD3",
+						       "Y12 GMAC1 RXD0", "V12 GMAC1 RXD1",
+						       "T11 GMAC1 RXD2", "W12 GMAC1 RXD3",
+						       "U10 GMAC1 TXD0", "Y10 GMAC1 TXD1",
+						       "W10 GMAC1 TXD2", "T9 GMAC1 TXD3";
+						skew-delay = <7>;
+					};
+					/* Set up drive strength on GMAC0 and GMAC1 to 16 mA */
+					conf9 {
+						groups = "gmii_gmac0_grp", "gmii_gmac1_grp";
+						drive-strength = <16>;
+					};
+				};
 			};
 		};
 
@@ -154,6 +227,18 @@
 				<0x6000 0 0 4 &pci_intc 2>;
 		};
 
+		ethernet at 60000000 {
+			status = "okay";
+
+			ethernet-port at 0 {
+				phy-mode = "rgmii";
+				phy-handle = <&phy0>;
+			};
+			ethernet-port at 1 {
+				/* Used for the Vitesse G5 chip, add later */
+			};
+		};
+
 		ata at 63000000 {
 			status = "okay";
 		};
-- 
2.17.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From linus.walleij at linaro.org  Wed Jul 11 15:47:18 2018
From: linus.walleij at linaro.org (Linus Walleij)
Date: Wed, 11 Jul 2018 21:47:18 +0200
Subject: [OpenWrt-Devel] [PATCH 1/3 v3] ARM: dts: Add WAN ethernet port to
 the SQ201
Message-ID: <20180711194720.25266-1-linus.walleij@linaro.org>

This sets up the ethernet interface and PHY for the
WAN ethernet port which uses a Marvell PHY.

Signed-off-by: Linus Walleij <linus.walleij at linaro.org>
---
ChangeLog v2->v3:
- No changes, just resending.
ChangeLog v1->v2:
- Rename wrongly named "ethernet-phy" to "mdio"
- Drop device_type from the ethernet phy
---
 arch/arm/boot/dts/gemini-sq201.dts | 85 ++++++++++++++++++++++++++++++
 1 file changed, 85 insertions(+)

diff --git a/arch/arm/boot/dts/gemini-sq201.dts b/arch/arm/boot/dts/gemini-sq201.dts
index 7658e212e6d2..cc693e64faaf 100644
--- a/arch/arm/boot/dts/gemini-sq201.dts
+++ b/arch/arm/boot/dts/gemini-sq201.dts
@@ -55,6 +55,21 @@
 		};
 	};
 
+	mdio0: ethernet-phy {
+		compatible = "virtual,mdio-gpio";
+		/* Uses MDC and MDIO */
+		gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>, /* MDC */
+			<&gpio0 21 GPIO_ACTIVE_HIGH>; /* MDIO */
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		/* This is a Marvell 88E1111 ethernet transciever */
+		phy0: ethernet-phy at 1 {
+			reg = <1>;
+			device_type = "ethernet-phy";
+		};
+	};
+
 	soc {
 		flash at 30000000 {
 			/*
@@ -108,6 +123,7 @@
 				/*
 				 * gpio0fgrp cover line 18 used by reset button
 				 * gpio0ggrp cover line 20 used by info LED
+				 * gpio0hgrp cover line 21, 22 used by MDIO for Marvell PHY
 				 * gpio0kgrp cover line 31 used by USB LED
 				 */
 				gpio0_default_pins: pinctrl-gpio0 {
@@ -115,9 +131,66 @@
 						function = "gpio0";
 						groups = "gpio0fgrp",
 						"gpio0ggrp",
+						"gpio0hgrp",
 						"gpio0kgrp";
 					};
 				};
+				pinctrl-gmii {
+					mux {
+						function = "gmii";
+						groups = "gmii_gmac0_grp", "gmii_gmac1_grp";
+					};
+					/* Settings come from memory dump in PLATO */
+					conf0 {
+						pins = "V8 GMAC0 RXDV";
+						skew-delay = <0>;
+					};
+					conf1 {
+						pins = "Y7 GMAC0 RXC";
+						skew-delay = <15>;
+					};
+					conf2 {
+						pins = "T8 GMAC0 TXEN";
+						skew-delay = <7>;
+					};
+					conf3 {
+						pins = "U8 GMAC0 TXC";
+						skew-delay = <10>;
+					};
+					conf4 {
+						pins = "T10 GMAC1 RXDV";
+						skew-delay = <7>;
+					};
+					conf5 {
+						pins = "Y11 GMAC1 RXC";
+						skew-delay = <8>;
+					};
+					conf6 {
+						pins = "W11 GMAC1 TXEN";
+						skew-delay = <7>;
+					};
+					conf7 {
+						pins = "V11 GMAC1 TXC";
+						skew-delay = <5>;
+					};
+					conf8 {
+						/* The data lines all have default skew */
+						pins = "W8 GMAC0 RXD0", "V9 GMAC0 RXD1",
+						       "Y8 GMAC0 RXD2", "U9 GMAC0 RXD3",
+						       "T7 GMAC0 TXD0", "U6 GMAC0 TXD1",
+						       "V7 GMAC0 TXD2", "U7 GMAC0 TXD3",
+						       "Y12 GMAC1 RXD0", "V12 GMAC1 RXD1",
+						       "T11 GMAC1 RXD2", "W12 GMAC1 RXD3",
+						       "U10 GMAC1 TXD0", "Y10 GMAC1 TXD1",
+						       "W10 GMAC1 TXD2", "T9 GMAC1 TXD3";
+						skew-delay = <7>;
+					};
+					/* Set up drive strength on GMAC0 and GMAC1 to 16 mA */
+					conf9 {
+						groups = "gmii_gmac0_grp", "gmii_gmac1_grp";
+						drive-strength = <16>;
+					};
+				};
 			};
 		};
 
@@ -154,6 +227,18 @@
 				<0x6000 0 0 4 &pci_intc 2>;
 		};
 
+		ethernet at 60000000 {
+			status = "okay";
+
+			ethernet-port at 0 {
+				phy-mode = "rgmii";
+				phy-handle = <&phy0>;
+			};
+			ethernet-port at 1 {
+				/* Used for the Vitesse G5 chip, add later */
+			};
+		};
+
 		ata at 63000000 {
 			status = "okay";
 		};
-- 
2.17.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From linus.walleij at linaro.org  Wed Jul 11 15:47:19 2018
From: linus.walleij at linaro.org (Linus Walleij)
Date: Wed, 11 Jul 2018 21:47:19 +0200
Subject: [OpenWrt-Devel] [PATCH 2/3 v3] ARM: dts: Att Vitesse G5e switch to
 the Gemini SQ201
In-Reply-To: <20180711194720.25266-1-linus.walleij@linaro.org>
References: <20180711194720.25266-1-linus.walleij@linaro.org>
Message-ID: <20180711194720.25266-2-linus.walleij@linaro.org>

This adds the Vitesse G5e ethernet switch to the Square
One Itian SQ201 router device tree.

Signed-off-by: Linus Walleij <linus.walleij at linaro.org>
---
ChangeLog v2->v3:
- Use a fixed link for the ethernet port to the Vitesse
  DSA router chip.
ChangeLog v1->v2:
- Drop unrelated roofs mount point change.
---
 arch/arm/boot/dts/gemini-sq201.dts | 76 +++++++++++++++++++++++++++++-
 1 file changed, 75 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/gemini-sq201.dts b/arch/arm/boot/dts/gemini-sq201.dts
index cc693e64faaf..c7a0788ef8c1 100644
--- a/arch/arm/boot/dts/gemini-sq201.dts
+++ b/arch/arm/boot/dts/gemini-sq201.dts
@@ -70,6 +70,61 @@
 		};
 	};
 
+	spi {
+		compatible = "spi-gpio";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		/* Check pin collisions */
+		gpio-sck = <&gpio1 28 GPIO_ACTIVE_HIGH>;
+		gpio-miso = <&gpio1 30 GPIO_ACTIVE_HIGH>;
+		gpio-mosi = <&gpio1 29 GPIO_ACTIVE_HIGH>;
+		cs-gpios = <&gpio1 31 GPIO_ACTIVE_HIGH>;
+		num-chipselects = <1>;
+
+		switch at 0 {
+			compatible = "vitesse,vsc7395";
+			reg = <0>;
+			/* Specified for 2.5 MHz or below */
+			spi-max-frequency = <2500000>;
+			gpio-controller;
+			#gpio-cells = <2>;
+
+			ports {
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				port at 0 {
+					reg = <0>;
+					label = "lan1";
+				};
+				port at 1 {
+					reg = <1>;
+					label = "lan2";
+				};
+				port at 2 {
+					reg = <2>;
+					label = "lan3";
+				};
+				port at 3 {
+					reg = <3>;
+					label = "lan4";
+				};
+				vsc: port at 6 {
+					reg = <6>;
+					label = "cpu";
+					ethernet = <&gmac1>;
+					phy-mode = "rgmii";
+					fixed-link {
+						speed = <1000>;
+						full-duplex;
+						pause;
+					};
+				};
+			};
+		};
+	};
+
+
 	soc {
 		flash at 30000000 {
 			/*
@@ -135,6 +190,15 @@
 						"gpio0kgrp";
 					};
 				};
+				/*
+				 * gpio0kgrp cover line 31 used by USB LED
+				 */
+				gpio1_default_pins: pinctrl-gpio1 {
+					mux {
+						function = "gpio1";
+						groups = "gpio1dgrp";
+					};
+				};
 				pinctrl-gmii {
 					mux {
 						function = "gmii";
@@ -205,6 +269,11 @@
 			pinctrl-0 = <&gpio0_default_pins>;
 		};
 
+		gpio1: gpio at 4e000000 {
+			pinctrl-names = "default";
+			pinctrl-0 = <&gpio1_default_pins>;
+		};
+
 		pci at 50000000 {
 			status = "okay";
 			interrupt-map-mask = <0xf800 0 0 7>;
@@ -235,7 +304,12 @@
 				phy-handle = <&phy0>;
 			};
 			ethernet-port at 1 {
-				/* Used for the Vitesse G5 chip, add later */
+				phy-mode = "rgmii";
+				fixed-link {
+					speed = <1000>;
+					full-duplex;
+					pause;
+				};
 			};
 		};
 
-- 
2.17.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From linus.walleij at linaro.org  Wed Jul 11 15:47:19 2018
From: linus.walleij at linaro.org (Linus Walleij)
Date: Wed, 11 Jul 2018 21:47:19 +0200
Subject: [OpenWrt-Devel] [PATCH 2/3 v3] ARM: dts: Att Vitesse G5e switch to
 the Gemini SQ201
In-Reply-To: <20180711194720.25266-1-linus.walleij@linaro.org>
References: <20180711194720.25266-1-linus.walleij@linaro.org>
Message-ID: <20180711194720.25266-2-linus.walleij@linaro.org>

This adds the Vitesse G5e ethernet switch to the Square
One Itian SQ201 router device tree.

Signed-off-by: Linus Walleij <linus.walleij at linaro.org>
---
ChangeLog v2->v3:
- Use a fixed link for the ethernet port to the Vitesse
  DSA router chip.
ChangeLog v1->v2:
- Drop unrelated roofs mount point change.
---
 arch/arm/boot/dts/gemini-sq201.dts | 76 +++++++++++++++++++++++++++++-
 1 file changed, 75 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/gemini-sq201.dts b/arch/arm/boot/dts/gemini-sq201.dts
index cc693e64faaf..c7a0788ef8c1 100644
--- a/arch/arm/boot/dts/gemini-sq201.dts
+++ b/arch/arm/boot/dts/gemini-sq201.dts
@@ -70,6 +70,61 @@
 		};
 	};
 
+	spi {
+		compatible = "spi-gpio";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		/* Check pin collisions */
+		gpio-sck = <&gpio1 28 GPIO_ACTIVE_HIGH>;
+		gpio-miso = <&gpio1 30 GPIO_ACTIVE_HIGH>;
+		gpio-mosi = <&gpio1 29 GPIO_ACTIVE_HIGH>;
+		cs-gpios = <&gpio1 31 GPIO_ACTIVE_HIGH>;
+		num-chipselects = <1>;
+
+		switch at 0 {
+			compatible = "vitesse,vsc7395";
+			reg = <0>;
+			/* Specified for 2.5 MHz or below */
+			spi-max-frequency = <2500000>;
+			gpio-controller;
+			#gpio-cells = <2>;
+
+			ports {
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				port at 0 {
+					reg = <0>;
+					label = "lan1";
+				};
+				port at 1 {
+					reg = <1>;
+					label = "lan2";
+				};
+				port at 2 {
+					reg = <2>;
+					label = "lan3";
+				};
+				port at 3 {
+					reg = <3>;
+					label = "lan4";
+				};
+				vsc: port at 6 {
+					reg = <6>;
+					label = "cpu";
+					ethernet = <&gmac1>;
+					phy-mode = "rgmii";
+					fixed-link {
+						speed = <1000>;
+						full-duplex;
+						pause;
+					};
+				};
+			};
+		};
+	};
+
+
 	soc {
 		flash at 30000000 {
 			/*
@@ -135,6 +190,15 @@
 						"gpio0kgrp";
 					};
 				};
+				/*
+				 * gpio0kgrp cover line 31 used by USB LED
+				 */
+				gpio1_default_pins: pinctrl-gpio1 {
+					mux {
+						function = "gpio1";
+						groups = "gpio1dgrp";
+					};
+				};
 				pinctrl-gmii {
 					mux {
 						function = "gmii";
@@ -205,6 +269,11 @@
 			pinctrl-0 = <&gpio0_default_pins>;
 		};
 
+		gpio1: gpio at 4e000000 {
+			pinctrl-names = "default";
+			pinctrl-0 = <&gpio1_default_pins>;
+		};
+
 		pci at 50000000 {
 			status = "okay";
 			interrupt-map-mask = <0xf800 0 0 7>;
@@ -235,7 +304,12 @@
 				phy-handle = <&phy0>;
 			};
 			ethernet-port at 1 {
-				/* Used for the Vitesse G5 chip, add later */
+				phy-mode = "rgmii";
+				fixed-link {
+					speed = <1000>;
+					full-duplex;
+					pause;
+				};
 			};
 		};
 
-- 
2.17.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From linus.walleij at linaro.org  Wed Jul 11 15:47:20 2018
From: linus.walleij at linaro.org (Linus Walleij)
Date: Wed, 11 Jul 2018 21:47:20 +0200
Subject: [OpenWrt-Devel] [PATCH 3/3 v3] ARM: dts: Add devicetree for
 Storlink/Storm SL93512R
In-Reply-To: <20180711194720.25266-1-linus.walleij@linaro.org>
References: <20180711194720.25266-1-linus.walleij@linaro.org>
Message-ID: <20180711194720.25266-3-linus.walleij@linaro.org>

The Storlink Gemini324 EV-Board also known as Storm
Semiconductor SL93512R_BRD is ground zero for the Gemini
devices. We add a device tree so we can support it, it
turns out to be pretty trivial.

Signed-off-by: Linus Walleij <linus.walleij at linaro.org>
---
ChangeLog v2->v3:
- Use a fixed link for the ethernet port to the Vitesse
  DSA router chip.
ChangeLog v1->v2:
- Rename wrongly named "ethernet-phy" to "mdio"
- Drop device_type from the ethernet phy
---
 arch/arm/boot/dts/Makefile            |   1 +
 arch/arm/boot/dts/gemini-sl93512r.dts | 329 ++++++++++++++++++++++++++
 2 files changed, 330 insertions(+)
 create mode 100644 arch/arm/boot/dts/gemini-sl93512r.dts

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 37a3de760d40..a10ef98c6d75 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -200,6 +200,7 @@ dtb-$(CONFIG_ARCH_GEMINI) += \
 	gemini-dlink-dns-313.dtb \
 	gemini-nas4220b.dtb \
 	gemini-rut1xx.dtb \
+	gemini-sl93512r.dtb \
 	gemini-sq201.dtb \
 	gemini-wbd111.dtb \
 	gemini-wbd222.dtb
diff --git a/arch/arm/boot/dts/gemini-sl93512r.dts b/arch/arm/boot/dts/gemini-sl93512r.dts
new file mode 100644
index 000000000000..7f451b670bdb
--- /dev/null
+++ b/arch/arm/boot/dts/gemini-sl93512r.dts
@@ -0,0 +1,329 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Device Tree file for the Storm Semiconductor SL93512R_BRD
+ * Gemini reference design, also initially called
+ * "Gemini324 EV-Board" before Storm acquired Storlink Semiconductor.
+ * The series were later acquired by Cortina Systems.
+ */
+
+/dts-v1/;
+
+#include "gemini.dtsi"
+#include <dt-bindings/input/input.h>
+
+/ {
+	model = "Storlink Semiconductor Gemini324 EV-Board / Storm Semiconductor SL93512R_BRD";
+	compatible = "storlink,gemini324", "storm,sl93512r", "cortina,gemini";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	memory at 0 {
+		/* 64 MB Samsung K4H511638B */
+		device_type = "memory";
+		reg = <0x00000000 0x4000000>;
+	};
+
+	chosen {
+		bootargs = "console=ttyS0,19200n8 root=/dev/sda1 rw rootwait";
+		stdout-path = &uart0;
+	};
+
+	gpio_keys {
+		compatible = "gpio-keys";
+
+		button-wps {
+			debounce-interval = <50>;
+			wakeup-source;
+			linux,code = <KEY_WPS_BUTTON>;
+			label = "WPS";
+			/* Conflict with NAND flash */
+			gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
+		};
+
+		button-setup {
+			debounce-interval = <50>;
+			wakeup-source;
+			linux,code = <KEY_SETUP>;
+			label = "factory reset";
+			/* Conflict with NAND flash */
+			gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
+		};
+	};
+
+	leds {
+		compatible = "gpio-leds";
+		led-green-harddisk {
+			label = "sq201:green:harddisk";
+			/* Conflict with LCD (no problem) */
+			gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
+			default-state = "off";
+			linux,default-trigger = "disk-activity";
+		};
+		led-green-wireless {
+			label = "sq201:green:wireless";
+			/* Conflict with NAND flash CE0 (no problem) */
+			gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
+			default-state = "on";
+			linux,default-trigger = "heartbeat";
+		};
+	};
+
+	mdio0: ethernet-phy {
+		compatible = "virtual,mdio-gpio";
+		/* Uses MDC and MDIO */
+		gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>, /* MDC */
+			<&gpio0 21 GPIO_ACTIVE_HIGH>; /* MDIO */
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		/* This is a Marvell 88E1111 ethernet transciever */
+		phy0: ethernet-phy at 1 {
+			reg = <1>;
+			device_type = "ethernet-phy";
+		};
+	};
+
+	spi {
+		compatible = "spi-gpio";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		/* Check pin collisions */
+		gpio-sck = <&gpio1 28 GPIO_ACTIVE_HIGH>;
+		gpio-miso = <&gpio1 30 GPIO_ACTIVE_HIGH>;
+		gpio-mosi = <&gpio1 29 GPIO_ACTIVE_HIGH>;
+		cs-gpios = <&gpio1 31 GPIO_ACTIVE_HIGH>;
+		num-chipselects = <1>;
+
+		switch at 0 {
+			compatible = "vitesse,vsc7385";
+			reg = <0>;
+			/* Specified for 2.5 MHz or below */
+			spi-max-frequency = <2500000>;
+			gpio-controller;
+			#gpio-cells = <2>;
+
+			ports {
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				port at 0 {
+					reg = <0>;
+					label = "lan1";
+				};
+				port at 1 {
+					reg = <1>;
+					label = "lan2";
+				};
+				port at 2 {
+					reg = <2>;
+					label = "lan3";
+				};
+				port at 3 {
+					reg = <3>;
+					label = "lan4";
+				};
+				vsc: port at 6 {
+					reg = <6>;
+					label = "cpu";
+					ethernet = <&gmac1>;
+					phy-mode = "rgmii";
+					fixed-link {
+						speed = <1000>;
+						full-duplex;
+						pause;
+					};
+				};
+			};
+		};
+	};
+
+
+	soc {
+		flash at 30000000 {
+			status = "okay";
+			/* 16MB of flash */
+			reg = <0x30000000 0x01000000>;
+
+			partition at 0 {
+				label = "BOOT";
+				reg = <0x00000000 0x00020000>;
+				read-only;
+			};
+			partition at 120000 {
+				label = "Kern";
+				reg = <0x00020000 0x00300000>;
+			};
+			partition at 320000 {
+				label = "Ramdisk";
+				reg = <0x00320000 0x00600000>;
+			};
+			partition at 920000 {
+				label = "Application";
+				reg = <0x00920000 0x00600000>;
+			};
+			partition at f20000 {
+				label = "VCTL";
+				reg = <0x00f20000 0x00020000>;
+				read-only;
+			};
+			partition at f40000 {
+				label = "CurConf";
+				reg = <0x00f40000 0x000a0000>;
+				read-only;
+			};
+			partition at fe0000 {
+				label = "FIS directory";
+				reg = <0x00fe0000 0x00020000>;
+				read-only;
+			};
+		};
+
+		syscon: syscon at 40000000 {
+			pinctrl {
+				/*
+				 * gpio0egrp cover line 16 used by HD LED
+				 * gpio0fgrp cover line 17, 18 used by wireless LED and reset button
+				 * gpio0hgrp cover line 21, 22 used by MDIO for Marvell PHY
+				 * gpio0kgrp cover line 31 used by USB LED
+				 */
+				gpio0_default_pins: pinctrl-gpio0 {
+					mux {
+						function = "gpio0";
+						groups = "gpio0egrp",
+						"gpio0fgrp",
+						"gpio0hgrp";
+					};
+				};
+				/*
+				 * gpio1dgrp cover lines used by SPI for
+				 * the Vitesse chip (28-31)
+				 */
+				gpio1_default_pins: pinctrl-gpio1 {
+					mux {
+						function = "gpio1";
+						groups = "gpio1dgrp";
+					};
+				};
+				pinctrl-gmii {
+					mux {
+						function = "gmii";
+						groups = "gmii_gmac0_grp", "gmii_gmac1_grp";
+					};
+					/* Control pad skew comes from sl_switch.c in the vendor code */
+					conf0 {
+						pins = "P10 GMAC1 TXC";
+						skew-delay = <5>;
+					};
+					conf1 {
+						pins = "V11 GMAC1 TXEN";
+						skew-delay = <7>;
+					};
+					conf2 {
+						pins = "T11 GMAC1 RXC";
+						skew-delay = <8>;
+					};
+					conf3 {
+						pins = "U11 GMAC1 RXDV";
+						skew-delay = <7>;
+					};
+					conf4 {
+						pins = "V7 GMAC0 TXC";
+						skew-delay = <10>;
+					};
+					conf5 {
+						pins = "P8 GMAC0 TXEN";
+						skew-delay = <7>; /* 5 at another place? */
+					};
+					conf6 {
+						pins = "T8 GMAC0 RXC";
+						skew-delay = <15>;
+					};
+					conf7 {
+						pins = "R8 GMAC0 RXDV";
+						skew-delay = <0>;
+					};
+					conf8 {
+						/* The data lines all have default skew */
+						pins = "U8 GMAC0 RXD0", "V8 GMAC0 RXD1",
+						       "P9 GMAC0 RXD2", "R9 GMAC0 RXD3",
+						       "R11 GMAC1 RXD0", "P11 GMAC1 RXD1",
+						       "V12 GMAC1 RXD2", "U12 GMAC1 RXD3",
+						       "R10 GMAC1 TXD0", "T10 GMAC1 TXD1",
+						       "U10 GMAC1 TXD2", "V10 GMAC1 TXD3";
+						skew-delay = <7>;
+					};
+					/* Appears in sl351x_gmac.c in the vendor code */
+					conf9 {
+						pins = "U7 GMAC0 TXD0", "T7 GMAC0 TXD1",
+						       "R7 GMAC0 TXD2", "P7 GMAC0 TXD3";
+						skew-delay = <5>;
+					};
+				};
+			};
+		};
+
+		/* Both interfaces brought out on SATA connectors */
+		sata: sata at 46000000 {
+			cortina,gemini-ata-muxmode = <0>;
+			cortina,gemini-enable-sata-bridge;
+			status = "okay";
+		};
+
+		gpio0: gpio at 4d000000 {
+			pinctrl-names = "default";
+			pinctrl-0 = <&gpio0_default_pins>;
+		};
+
+		gpio1: gpio at 4e000000 {
+			pinctrl-names = "default";
+			pinctrl-0 = <&gpio1_default_pins>;
+		};
+
+		pci at 50000000 {
+			status = "okay";
+			interrupt-map-mask = <0xf800 0 0 7>;
+			interrupt-map =
+				<0x4800 0 0 1 &pci_intc 0>, /* Slot 9 */
+				<0x4800 0 0 2 &pci_intc 1>,
+				<0x4800 0 0 3 &pci_intc 2>,
+				<0x4800 0 0 4 &pci_intc 3>,
+				<0x5000 0 0 1 &pci_intc 1>, /* Slot 10 */
+				<0x5000 0 0 2 &pci_intc 2>,
+				<0x5000 0 0 3 &pci_intc 3>,
+				<0x5000 0 0 4 &pci_intc 0>,
+				<0x5800 0 0 1 &pci_intc 2>, /* Slot 11 */
+				<0x5800 0 0 2 &pci_intc 3>,
+				<0x5800 0 0 3 &pci_intc 0>,
+				<0x5800 0 0 4 &pci_intc 1>,
+				<0x6000 0 0 1 &pci_intc 3>, /* Slot 12 */
+				<0x6000 0 0 2 &pci_intc 0>,
+				<0x6000 0 0 3 &pci_intc 1>,
+				<0x6000 0 0 4 &pci_intc 2>;
+		};
+
+		ethernet at 60000000 {
+			status = "okay";
+
+			ethernet-port at 0 {
+				phy-mode = "rgmii";
+				phy-handle = <&phy0>;
+			};
+			ethernet-port at 1 {
+				phy-mode = "rgmii";
+				fixed-link {
+					speed = <1000>;
+					full-duplex;
+					pause;
+				};
+			};
+		};
+
+		ata at 63000000 {
+			status = "okay";
+		};
+
+		ata at 63400000 {
+			status = "okay";
+		};
+	};
+};
-- 
2.17.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From linus.walleij at linaro.org  Wed Jul 11 15:47:20 2018
From: linus.walleij at linaro.org (Linus Walleij)
Date: Wed, 11 Jul 2018 21:47:20 +0200
Subject: [OpenWrt-Devel] [PATCH 3/3 v3] ARM: dts: Add devicetree for
 Storlink/Storm SL93512R
In-Reply-To: <20180711194720.25266-1-linus.walleij@linaro.org>
References: <20180711194720.25266-1-linus.walleij@linaro.org>
Message-ID: <20180711194720.25266-3-linus.walleij@linaro.org>

The Storlink Gemini324 EV-Board also known as Storm
Semiconductor SL93512R_BRD is ground zero for the Gemini
devices. We add a device tree so we can support it, it
turns out to be pretty trivial.

Signed-off-by: Linus Walleij <linus.walleij at linaro.org>
---
ChangeLog v2->v3:
- Use a fixed link for the ethernet port to the Vitesse
  DSA router chip.
ChangeLog v1->v2:
- Rename wrongly named "ethernet-phy" to "mdio"
- Drop device_type from the ethernet phy
---
 arch/arm/boot/dts/Makefile            |   1 +
 arch/arm/boot/dts/gemini-sl93512r.dts | 329 ++++++++++++++++++++++++++
 2 files changed, 330 insertions(+)
 create mode 100644 arch/arm/boot/dts/gemini-sl93512r.dts

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 37a3de760d40..a10ef98c6d75 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -200,6 +200,7 @@ dtb-$(CONFIG_ARCH_GEMINI) += \
 	gemini-dlink-dns-313.dtb \
 	gemini-nas4220b.dtb \
 	gemini-rut1xx.dtb \
+	gemini-sl93512r.dtb \
 	gemini-sq201.dtb \
 	gemini-wbd111.dtb \
 	gemini-wbd222.dtb
diff --git a/arch/arm/boot/dts/gemini-sl93512r.dts b/arch/arm/boot/dts/gemini-sl93512r.dts
new file mode 100644
index 000000000000..7f451b670bdb
--- /dev/null
+++ b/arch/arm/boot/dts/gemini-sl93512r.dts
@@ -0,0 +1,329 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Device Tree file for the Storm Semiconductor SL93512R_BRD
+ * Gemini reference design, also initially called
+ * "Gemini324 EV-Board" before Storm acquired Storlink Semiconductor.
+ * The series were later acquired by Cortina Systems.
+ */
+
+/dts-v1/;
+
+#include "gemini.dtsi"
+#include <dt-bindings/input/input.h>
+
+/ {
+	model = "Storlink Semiconductor Gemini324 EV-Board / Storm Semiconductor SL93512R_BRD";
+	compatible = "storlink,gemini324", "storm,sl93512r", "cortina,gemini";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	memory at 0 {
+		/* 64 MB Samsung K4H511638B */
+		device_type = "memory";
+		reg = <0x00000000 0x4000000>;
+	};
+
+	chosen {
+		bootargs = "console=ttyS0,19200n8 root=/dev/sda1 rw rootwait";
+		stdout-path = &uart0;
+	};
+
+	gpio_keys {
+		compatible = "gpio-keys";
+
+		button-wps {
+			debounce-interval = <50>;
+			wakeup-source;
+			linux,code = <KEY_WPS_BUTTON>;
+			label = "WPS";
+			/* Conflict with NAND flash */
+			gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
+		};
+
+		button-setup {
+			debounce-interval = <50>;
+			wakeup-source;
+			linux,code = <KEY_SETUP>;
+			label = "factory reset";
+			/* Conflict with NAND flash */
+			gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
+		};
+	};
+
+	leds {
+		compatible = "gpio-leds";
+		led-green-harddisk {
+			label = "sq201:green:harddisk";
+			/* Conflict with LCD (no problem) */
+			gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
+			default-state = "off";
+			linux,default-trigger = "disk-activity";
+		};
+		led-green-wireless {
+			label = "sq201:green:wireless";
+			/* Conflict with NAND flash CE0 (no problem) */
+			gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
+			default-state = "on";
+			linux,default-trigger = "heartbeat";
+		};
+	};
+
+	mdio0: ethernet-phy {
+		compatible = "virtual,mdio-gpio";
+		/* Uses MDC and MDIO */
+		gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>, /* MDC */
+			<&gpio0 21 GPIO_ACTIVE_HIGH>; /* MDIO */
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		/* This is a Marvell 88E1111 ethernet transciever */
+		phy0: ethernet-phy at 1 {
+			reg = <1>;
+			device_type = "ethernet-phy";
+		};
+	};
+
+	spi {
+		compatible = "spi-gpio";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		/* Check pin collisions */
+		gpio-sck = <&gpio1 28 GPIO_ACTIVE_HIGH>;
+		gpio-miso = <&gpio1 30 GPIO_ACTIVE_HIGH>;
+		gpio-mosi = <&gpio1 29 GPIO_ACTIVE_HIGH>;
+		cs-gpios = <&gpio1 31 GPIO_ACTIVE_HIGH>;
+		num-chipselects = <1>;
+
+		switch at 0 {
+			compatible = "vitesse,vsc7385";
+			reg = <0>;
+			/* Specified for 2.5 MHz or below */
+			spi-max-frequency = <2500000>;
+			gpio-controller;
+			#gpio-cells = <2>;
+
+			ports {
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				port at 0 {
+					reg = <0>;
+					label = "lan1";
+				};
+				port at 1 {
+					reg = <1>;
+					label = "lan2";
+				};
+				port at 2 {
+					reg = <2>;
+					label = "lan3";
+				};
+				port at 3 {
+					reg = <3>;
+					label = "lan4";
+				};
+				vsc: port at 6 {
+					reg = <6>;
+					label = "cpu";
+					ethernet = <&gmac1>;
+					phy-mode = "rgmii";
+					fixed-link {
+						speed = <1000>;
+						full-duplex;
+						pause;
+					};
+				};
+			};
+		};
+	};
+
+
+	soc {
+		flash at 30000000 {
+			status = "okay";
+			/* 16MB of flash */
+			reg = <0x30000000 0x01000000>;
+
+			partition at 0 {
+				label = "BOOT";
+				reg = <0x00000000 0x00020000>;
+				read-only;
+			};
+			partition at 120000 {
+				label = "Kern";
+				reg = <0x00020000 0x00300000>;
+			};
+			partition at 320000 {
+				label = "Ramdisk";
+				reg = <0x00320000 0x00600000>;
+			};
+			partition at 920000 {
+				label = "Application";
+				reg = <0x00920000 0x00600000>;
+			};
+			partition at f20000 {
+				label = "VCTL";
+				reg = <0x00f20000 0x00020000>;
+				read-only;
+			};
+			partition at f40000 {
+				label = "CurConf";
+				reg = <0x00f40000 0x000a0000>;
+				read-only;
+			};
+			partition at fe0000 {
+				label = "FIS directory";
+				reg = <0x00fe0000 0x00020000>;
+				read-only;
+			};
+		};
+
+		syscon: syscon at 40000000 {
+			pinctrl {
+				/*
+				 * gpio0egrp cover line 16 used by HD LED
+				 * gpio0fgrp cover line 17, 18 used by wireless LED and reset button
+				 * gpio0hgrp cover line 21, 22 used by MDIO for Marvell PHY
+				 * gpio0kgrp cover line 31 used by USB LED
+				 */
+				gpio0_default_pins: pinctrl-gpio0 {
+					mux {
+						function = "gpio0";
+						groups = "gpio0egrp",
+						"gpio0fgrp",
+						"gpio0hgrp";
+					};
+				};
+				/*
+				 * gpio1dgrp cover lines used by SPI for
+				 * the Vitesse chip (28-31)
+				 */
+				gpio1_default_pins: pinctrl-gpio1 {
+					mux {
+						function = "gpio1";
+						groups = "gpio1dgrp";
+					};
+				};
+				pinctrl-gmii {
+					mux {
+						function = "gmii";
+						groups = "gmii_gmac0_grp", "gmii_gmac1_grp";
+					};
+					/* Control pad skew comes from sl_switch.c in the vendor code */
+					conf0 {
+						pins = "P10 GMAC1 TXC";
+						skew-delay = <5>;
+					};
+					conf1 {
+						pins = "V11 GMAC1 TXEN";
+						skew-delay = <7>;
+					};
+					conf2 {
+						pins = "T11 GMAC1 RXC";
+						skew-delay = <8>;
+					};
+					conf3 {
+						pins = "U11 GMAC1 RXDV";
+						skew-delay = <7>;
+					};
+					conf4 {
+						pins = "V7 GMAC0 TXC";
+						skew-delay = <10>;
+					};
+					conf5 {
+						pins = "P8 GMAC0 TXEN";
+						skew-delay = <7>; /* 5 at another place? */
+					};
+					conf6 {
+						pins = "T8 GMAC0 RXC";
+						skew-delay = <15>;
+					};
+					conf7 {
+						pins = "R8 GMAC0 RXDV";
+						skew-delay = <0>;
+					};
+					conf8 {
+						/* The data lines all have default skew */
+						pins = "U8 GMAC0 RXD0", "V8 GMAC0 RXD1",
+						       "P9 GMAC0 RXD2", "R9 GMAC0 RXD3",
+						       "R11 GMAC1 RXD0", "P11 GMAC1 RXD1",
+						       "V12 GMAC1 RXD2", "U12 GMAC1 RXD3",
+						       "R10 GMAC1 TXD0", "T10 GMAC1 TXD1",
+						       "U10 GMAC1 TXD2", "V10 GMAC1 TXD3";
+						skew-delay = <7>;
+					};
+					/* Appears in sl351x_gmac.c in the vendor code */
+					conf9 {
+						pins = "U7 GMAC0 TXD0", "T7 GMAC0 TXD1",
+						       "R7 GMAC0 TXD2", "P7 GMAC0 TXD3";
+						skew-delay = <5>;
+					};
+				};
+			};
+		};
+
+		/* Both interfaces brought out on SATA connectors */
+		sata: sata at 46000000 {
+			cortina,gemini-ata-muxmode = <0>;
+			cortina,gemini-enable-sata-bridge;
+			status = "okay";
+		};
+
+		gpio0: gpio at 4d000000 {
+			pinctrl-names = "default";
+			pinctrl-0 = <&gpio0_default_pins>;
+		};
+
+		gpio1: gpio at 4e000000 {
+			pinctrl-names = "default";
+			pinctrl-0 = <&gpio1_default_pins>;
+		};
+
+		pci at 50000000 {
+			status = "okay";
+			interrupt-map-mask = <0xf800 0 0 7>;
+			interrupt-map =
+				<0x4800 0 0 1 &pci_intc 0>, /* Slot 9 */
+				<0x4800 0 0 2 &pci_intc 1>,
+				<0x4800 0 0 3 &pci_intc 2>,
+				<0x4800 0 0 4 &pci_intc 3>,
+				<0x5000 0 0 1 &pci_intc 1>, /* Slot 10 */
+				<0x5000 0 0 2 &pci_intc 2>,
+				<0x5000 0 0 3 &pci_intc 3>,
+				<0x5000 0 0 4 &pci_intc 0>,
+				<0x5800 0 0 1 &pci_intc 2>, /* Slot 11 */
+				<0x5800 0 0 2 &pci_intc 3>,
+				<0x5800 0 0 3 &pci_intc 0>,
+				<0x5800 0 0 4 &pci_intc 1>,
+				<0x6000 0 0 1 &pci_intc 3>, /* Slot 12 */
+				<0x6000 0 0 2 &pci_intc 0>,
+				<0x6000 0 0 3 &pci_intc 1>,
+				<0x6000 0 0 4 &pci_intc 2>;
+		};
+
+		ethernet at 60000000 {
+			status = "okay";
+
+			ethernet-port at 0 {
+				phy-mode = "rgmii";
+				phy-handle = <&phy0>;
+			};
+			ethernet-port at 1 {
+				phy-mode = "rgmii";
+				fixed-link {
+					speed = <1000>;
+					full-duplex;
+					pause;
+				};
+			};
+		};
+
+		ata at 63000000 {
+			status = "okay";
+		};
+
+		ata at 63400000 {
+			status = "okay";
+		};
+	};
+};
-- 
2.17.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From andrew at lunn.ch  Wed Jul 11 16:08:34 2018
From: andrew at lunn.ch (Andrew Lunn)
Date: Wed, 11 Jul 2018 22:08:34 +0200
Subject: [OpenWrt-Devel] [PATCH 1/3 v3] ARM: dts: Add WAN ethernet port
 to the SQ201
In-Reply-To: <20180711194720.25266-1-linus.walleij@linaro.org>
References: <20180711194720.25266-1-linus.walleij@linaro.org>
Message-ID: <20180711200834.GE21430@lunn.ch>

On Wed, Jul 11, 2018 at 09:47:18PM +0200, Linus Walleij wrote:
> This sets up the ethernet interface and PHY for the
> WAN ethernet port which uses a Marvell PHY.
> 
> Signed-off-by: Linus Walleij <linus.walleij at linaro.org>
> ---
> ChangeLog v2->v3:
> - No changes, just resending.
> ChangeLog v1->v2:
> - Rename wrongly named "ethernet-phy" to "mdio"
> - Drop device_type from the ethernet phy
> ---
>  arch/arm/boot/dts/gemini-sq201.dts | 85 ++++++++++++++++++++++++++++++
>  1 file changed, 85 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/gemini-sq201.dts b/arch/arm/boot/dts/gemini-sq201.dts
> index 7658e212e6d2..cc693e64faaf 100644
> --- a/arch/arm/boot/dts/gemini-sq201.dts
> +++ b/arch/arm/boot/dts/gemini-sq201.dts
> @@ -55,6 +55,21 @@
>  		};
>  	};
>  
> +	mdio0: ethernet-phy {

Hi Linus

mdio0: mdio {

This is not a phy. Which is odd, because v1->v2 should of fixed this...

> +		compatible = "virtual,mdio-gpio";
> +		/* Uses MDC and MDIO */
> +		gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>, /* MDC */
> +			<&gpio0 21 GPIO_ACTIVE_HIGH>; /* MDIO */
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +
> +		/* This is a Marvell 88E1111 ethernet transciever */
> +		phy0: ethernet-phy at 1 {
> +			reg = <1>;
> +			device_type = "ethernet-phy";

???

I'm wondering if this is the correct version of these patches....

	Andrew

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From david.lloyd.johnson at gmail.com  Wed Jul 11 18:19:36 2018
From: david.lloyd.johnson at gmail.com (David Johnson)
Date: Thu, 12 Jul 2018 00:19:36 +0200
Subject: [OpenWrt-Devel] Current status of support for RB953GS-5HnT-RP
Message-ID: <CAFDDukCchNs=6e2JMY-sB6D74WKJ7PB8APp3nn5DOfyeWJZ8FQ@mail.gmail.com>

The last patch I saw was from gui in Jan 2017 but I haven't seen this patch
added to the latest openwrt code

https://lists.openwrt.org/pipermail/openwrt-devel/2017-January/005212.html

It appeared that there were issues with the Ethernet ports - was that the
only problem left for full support?

Thanks
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20180712/83c9508a/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From luaraneda at gmail.com  Wed Jul 11 22:36:03 2018
From: luaraneda at gmail.com (Luis Araneda)
Date: Wed, 11 Jul 2018 22:36:03 -0400
Subject: [OpenWrt-Devel] [PATCH] dropbear: close all active clients on
 shutdown
Message-ID: <20180712023603.6177-1-luaraneda@gmail.com>

From: Christian Schoenebeck <christian.schoenebeck at gmail.com>

Override the default shutdown action (stop) and close all processes
of dropbear

Since commit 498fe85, the stop action only closes the process
that's listening for new connections, maintaining the ones with
existing clients.
This poses a problem when restarting or shutting-down a device,
because the connections with existing SSH clients, like OpenSSH,
are not properly closed, causing them to hang.

This situation can be avoided by closing all dropbear processes when
shutting-down the system, which closes properly the connections with
current clients.

Signed-off-by: Christian Schoenebeck <christian.schoenebeck at gmail.com>
[Luis: Rework commit message]
Signed-off-by: Luis Araneda <luaraneda at gmail.com>
---
 package/network/services/dropbear/files/dropbear.init | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/package/network/services/dropbear/files/dropbear.init b/package/network/services/dropbear/files/dropbear.init
index 2225113498..b86e52d8bc 100755
--- a/package/network/services/dropbear/files/dropbear.init
+++ b/package/network/services/dropbear/files/dropbear.init
@@ -148,6 +148,11 @@ service_triggers()
 	procd_add_validation validate_section_dropbear
 }
 
+shutdown() {
+	# close all open connections
+	killall dropbear
+}
+
 killclients()
 {
 	local ignore=''
-- 
2.18.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From zajec5 at gmail.com  Thu Jul 12 00:04:50 2018
From: zajec5 at gmail.com (=?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?=)
Date: Thu, 12 Jul 2018 06:04:50 +0200
Subject: [OpenWrt-Devel] [PATCH 1/4] scripts/feeds: add src-dummy method
In-Reply-To: <262e49d3-feb5-c4a1-64eb-da14ebfabd99@universe-factory.net>
References: <cover.1531174081.git.mschiffer@universe-factory.net>
 <a78e94c0897c4c450c36e6e1c1ae8ae9d928b05b.1531174081.git.mschiffer@universe-factory.net>
 <CACna6rz9pZs1Ts40tt9UXn_hX9q0f_RBVPxxOdJXp4okKbxuiQ@mail.gmail.com>
 <262e49d3-feb5-c4a1-64eb-da14ebfabd99@universe-factory.net>
Message-ID: <CACna6rxfVvhYMFErJWkrKTH0iEBJPcy=kPrrCbX+EKYiMosYug@mail.gmail.com>

On Wed, 11 Jul 2018 at 21:39, Matthias Schiffer
<mschiffer at universe-factory.net> wrote:
>
> On 07/11/2018 10:59 AM, Rafa? Mi?ecki wrote:
> > On Tue, 10 Jul 2018 at 00:31, Matthias Schiffer
> > <mschiffer at universe-factory.net> wrote:
> >> The src-dummy method does not actually obtain any feed, but it can be used
> >> to insert addtional entries into the opkg distfeeds.conf.
> >
> > Should that be clear to me why we want that? Or could you add an extra
> > line of explanation, please?
> >
>
> Well, I think it's generally a good idea to give firmware builders more
> control over the contents of distfeeds.conf.
>
> In Gluon, the concrete reason is that we want all standard OpenWrt feeds to
> be available to users, even though we do not include all these feeds in the
> build. I can add a bit more explanation to the commit message.

Ah, I see the point now, thanks!

-- 
Rafa?

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From john at phrozen.org  Thu Jul 12 02:49:32 2018
From: john at phrozen.org (John Crispin)
Date: Thu, 12 Jul 2018 08:49:32 +0200
Subject: [OpenWrt-Devel] [PATCH] dropbear: close all active clients on
 shutdown
In-Reply-To: <20180712023603.6177-1-luaraneda@gmail.com>
References: <20180712023603.6177-1-luaraneda@gmail.com>
Message-ID: <bec0820f-c5b9-5e24-a221-9515656d0e6d@phrozen.org>



On 12/07/18 04:36, Luis Araneda wrote:
> From: Christian Schoenebeck <christian.schoenebeck at gmail.com>
>
> Override the default shutdown action (stop) and close all processes
> of dropbear
>
> Since commit 498fe85, the stop action only closes the process
> that's listening for new connections, maintaining the ones with
> existing clients.
> This poses a problem when restarting or shutting-down a device,
> because the connections with existing SSH clients, like OpenSSH,
> are not properly closed, causing them to hang.
>
> This situation can be avoided by closing all dropbear processes when
> shutting-down the system, which closes properly the connections with
> current clients.

does this break sysupgrade when run via ssh ?
 ??? John

> Signed-off-by: Christian Schoenebeck <christian.schoenebeck at gmail.com>
> [Luis: Rework commit message]
> Signed-off-by: Luis Araneda <luaraneda at gmail.com>
> ---
>   package/network/services/dropbear/files/dropbear.init | 5 +++++
>   1 file changed, 5 insertions(+)
>
> diff --git a/package/network/services/dropbear/files/dropbear.init b/package/network/services/dropbear/files/dropbear.init
> index 2225113498..b86e52d8bc 100755
> --- a/package/network/services/dropbear/files/dropbear.init
> +++ b/package/network/services/dropbear/files/dropbear.init
> @@ -148,6 +148,11 @@ service_triggers()
>   	procd_add_validation validate_section_dropbear
>   }
>   
> +shutdown() {
> +	# close all open connections
> +	killall dropbear
> +}
> +
>   killclients()
>   {
>   	local ignore=''


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From john at phrozen.org  Thu Jul 12 03:11:54 2018
From: john at phrozen.org (John Crispin)
Date: Thu, 12 Jul 2018 09:11:54 +0200
Subject: [OpenWrt-Devel] [PATCH] kernel.mk: fix kmod VERSION string
In-Reply-To: <20180706121322.31418-1-fe@dev.tdt.de>
References: <20180706121322.31418-1-fe@dev.tdt.de>
Message-ID: <3037e534-221a-c75c-095d-b33196690e60@phrozen.org>



On 06/07/18 14:13, Florian Eckert wrote:
> If a "+" is in the version string of a kernel package then the package could
> not get installed by opkg with ftp. Because the file could not get found.
> "kmod-wireguard_4.4.135%2b0.0.20180519-1_mips_24kc.ipk: No such file or directory"
> The problem is that "+" is replaced with "%2b".
>
> Change the "+" in version string to "-" will solve this issue.
>
> Kmod version string:
> old: $(LINUX_VERSIO)+$(PKG_VERSION)-$(PKG_RELEASE)
> new: $(LINUX_VERSIO)-$(PKG_VERSION)-$(PKG_RELEASE)
this needs to be fixed in opkg or wget. ftp urls should not be encoded.
 ??? John

> Signed-off-by: Florian Eckert <fe at dev.tdt.de>
> ---
>   include/kernel.mk | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/kernel.mk b/include/kernel.mk
> index c169550f48..cd186e9d3b 100644
> --- a/include/kernel.mk
> +++ b/include/kernel.mk
> @@ -196,7 +196,7 @@ define KernelPackage
>       CATEGORY:=Kernel modules
>       DESCRIPTION:=$(DESCRIPTION)
>       EXTRA_DEPENDS:=kernel (=$(LINUX_VERSION)-$(LINUX_RELEASE)-$(LINUX_VERMAGIC))
> -    VERSION:=$(LINUX_VERSION)$(if $(PKG_VERSION),+$(PKG_VERSION))-$(if $(PKG_RELEASE),$(PKG_RELEASE),$(LINUX_RELEASE))
> +    VERSION:=$(LINUX_VERSION)$(if $(PKG_VERSION),-$(PKG_VERSION))-$(if $(PKG_RELEASE),$(PKG_RELEASE),$(LINUX_RELEASE))
>       PKGFLAGS:=$(PKGFLAGS)
>       $(call KernelPackage/$(1))
>       $(call KernelPackage/$(1)/$(BOARD))


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From uxgood.org at gmail.com  Thu Jul 12 04:05:00 2018
From: uxgood.org at gmail.com (=?UTF-8?B?5p2O5Zu9?=)
Date: Thu, 12 Jul 2018 16:05:00 +0800
Subject: [OpenWrt-Devel] time command detect fail on centos
In-Reply-To: <CAOdf3gqafqr5mSre8NzrOZE_jzmjjEw6XRhqW27vfzhyVm7q-w@mail.gmail.com>
References: <CAMVKJizcbP3AzC6tG1PHvzpscrn4WP91WbTZbvL7K=M7y0e+Fw@mail.gmail.com>
 <245f4cb7c6cbcac4def10a9b88dd8b1a69cd5d4e.camel@gmail.com>
 <CAMVKJiy+Yg4gWXPnUZYX7=WqQ8gezY8P8mZSgZEohYHhSMaHfQ@mail.gmail.com>
 <CAOdf3gqafqr5mSre8NzrOZE_jzmjjEw6XRhqW27vfzhyVm7q-w@mail.gmail.com>
Message-ID: <CAMVKJixqXrAZmPNezFkNuzxuE1PVsdZSP0S2GhCdkPt0BxHdcA@mail.gmail.com>

Hi Etienne Champetier,

You are right.
CentOS 7 is ok, but CentOS 6 fail.

on CentOS 7
$ sh -c 'time --version'
GNU time 1.7

but on CentOS 6
$ sh -c 'time --version'
sh: --version: command not found

real    0m0.001s
user    0m0.000s
sys     0m0.000s

Thanks!

2018-07-11 3:38 GMT+08:00 Etienne Champetier <champetier.etienne at gmail.com>:
> Hi,
>
> 2018-07-08 15:50 GMT+02:00 ?? <uxgood.org at gmail.com>:
>> Hi Jon Burgess
>> this patch works good. thanks.
>> diff --git a/include/prereq.mk b/include/prereq.mk
>> index 0f0f253744..173461e36f 100644
>> --- a/include/prereq.mk
>> +++ b/include/prereq.mk
>> @@ -95,7 +95,7 @@ define SetupHostCommand
>>                 if [ -n "$$$$$$$$cmd" ]; then \
>>                         bin="$$$$$$$$(PATH="$(subst
>> $(space),:,$(filter-out $(STAGING_DIR_HOST)/%,$(subst
>> :,$(space),$(PATH))))" \
>>                                 which "$$$$$$$${cmd%% *}")"; \
>> -                       if [ -x "$$$$$$$$bin" ] && eval "$$$$$$$$cmd"
>>>/dev/null 2>/dev/null; then \
>> +                       if [ -x "$$$$$$$$bin" ] && eval
>> "\\$$$$$$$$cmd" >/dev/null 2>/dev/null; then \
>>                                 mkdir -p "$(STAGING_DIR_HOST)/bin"; \
>>                                 ln -sf "$$$$$$$$bin"
>> "$(STAGING_DIR_HOST)/bin/$(strip $(1))"; \
>>                                 exit 0; \
>>
>> 2018-07-08 0:11 GMT+08:00 Jon Burgess <jburgess777 at gmail.com>:
>>> On Sat, 2018-07-07 at 16:23 +0800, ?? wrote:
>>>> Hi Etienne Champetier
>>>>
>>>> time command detect fail on centos.
>>>>
>>>> time is a keyword of bash on centos 6 and centos 7, and it not accept
>>>> --version option, this makes time --version 2>&1 | grep GNU  always
>>>> fail.
>
> I just tried a fresh git checkout of master on an up to date CentOS 7
> After "yum install time" build work perfectly fine
>
> Regards
> Etienne
>
>>>
>>> Does using \time instead help?
>>>
>>>   Jon
>>
>> _______________________________________________
>> openwrt-devel mailing list
>> openwrt-devel at lists.openwrt.org
>> https://lists.openwrt.org/mailman/listinfo/openwrt-devel

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From david.lloyd.johnson at gmail.com  Thu Jul 12 04:15:41 2018
From: david.lloyd.johnson at gmail.com (David Johnson)
Date: Thu, 12 Jul 2018 10:15:41 +0200
Subject: [OpenWrt-Devel] Current status of support for RB953GS-5HnT-RP
Message-ID: <CAFDDukDiqGv7U4T-UTLjkh5Z_YYzj8B_qR4=rNv6XzO4OOA3og@mail.gmail.com>

The last patch I saw was from gui in Jan 2017 but I haven't seen this
patch added to the latest openwrt code

https://lists.openwrt.org/pipermail/openwrt-devel/2017-January/005212.html

It appeared that there were issues with the Ethernet ports and the
Nand flash - any progress on those issues - our team of developers at
Ammbr would like to jump in and get full support for this board

Thanks
David

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From david.lloyd.johnson at gmail.com  Thu Jul 12 04:27:06 2018
From: david.lloyd.johnson at gmail.com (David Johnson)
Date: Thu, 12 Jul 2018 10:27:06 +0200
Subject: [OpenWrt-Devel] Good suggestion for Openwrt router board with 2x
 mini pci-express
Message-ID: <CAFDDukB4O-5oi=w57gJuU0VUkeN2tc+HC-h2XcjUsdvrdbdH3w@mail.gmail.com>

It seems its quite hard to find a board that is fully supported by
openwrt that has 2x mini pci-express, 2x ethernet ports (WAN, LAN), >
64M flash

I want to plug in ath10k supported 802.11ac mini pci-e radios

Any thoughts suggestions

Thanks
David

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From alin.nastac at gmail.com  Thu Jul 12 04:36:02 2018
From: alin.nastac at gmail.com (Alin Nastac)
Date: Thu, 12 Jul 2018 10:36:02 +0200
Subject: [OpenWrt-Devel] [PATCH v2] firewall3: make reject types selectable
 by user
Message-ID: <1531384562-8917-1-git-send-email-alin.nastac@technicolor.com>

From: Alin Nastac <alin.nastac at gmail.com>

RFC 6092 recommends in section 3.3.1 that an IPv6 CPE must respond to
unsolicited inbound SYNs with an ICMPv6 Destination Unreachable error
code 1 (Communication with destination administratively prohibited).

Signed-off-by: Alin Nastac <alin.nastac at gmail.com>
---
 defaults.c | 34 ++++++++++++++++++++++++++++++++--
 options.c  | 13 +++++++++++++
 options.h  | 12 ++++++++++++
 3 files changed, 57 insertions(+), 2 deletions(-)

diff --git a/defaults.c b/defaults.c
index 11fbf0d..f42eed6 100644
--- a/defaults.c
+++ b/defaults.c
@@ -41,6 +41,8 @@ const struct fw3_option fw3_flag_opts[] = {
 	FW3_OPT("output",              target,   defaults, policy_output),
 
 	FW3_OPT("drop_invalid",        bool,     defaults, drop_invalid),
+	FW3_OPT("tcp_reject_code",     reject_code, defaults, tcp_reject_code),
+	FW3_OPT("any_reject_code",     reject_code, defaults, any_reject_code),
 
 	FW3_OPT("syn_flood",           bool,     defaults, syn_flood),
 	FW3_OPT("synflood_protect",    bool,     defaults, syn_flood),
@@ -102,6 +104,30 @@ check_offloading(struct uci_element *e, bool *offloading)
 	*offloading = false;
 }
 
+static void
+check_any_reject_code(struct uci_element *e, enum fw3_reject_code *any_reject_code)
+{
+	if (*any_reject_code == FW3_REJECT_CODE_TCP_RESET) {
+		warn_elem(e, "tcp-reset not valid for any_reject_code, defaulting to port-unreach");
+		*any_reject_code = FW3_REJECT_CODE_PORT_UNREACH;
+	}
+}
+
+static const char*
+get_reject_code(enum fw3_family family, enum fw3_reject_code reject_code)
+{
+	switch (reject_code) {
+	case FW3_REJECT_CODE_TCP_RESET:
+		return "tcp-reset";
+	case FW3_REJECT_CODE_PORT_UNREACH:
+		return "port-unreach";
+	case FW3_REJECT_CODE_ADM_PROHIBITED:
+		return family == FW3_FAMILY_V6 ? "adm-prohibited": "admin-prohib";
+	default:
+		return "unknown";
+	}
+}
+
 void
 fw3_load_defaults(struct fw3_state *state, struct uci_package *p)
 {
@@ -111,6 +137,8 @@ fw3_load_defaults(struct fw3_state *state, struct uci_package *p)
 
 	bool seen = false;
 
+	defs->tcp_reject_code      = FW3_REJECT_CODE_TCP_RESET;
+	defs->any_reject_code      = FW3_REJECT_CODE_PORT_UNREACH;
 	defs->syn_flood_rate.rate  = 25;
 	defs->syn_flood_rate.burst = 50;
 	defs->tcp_syncookies       = true;
@@ -138,6 +166,8 @@ fw3_load_defaults(struct fw3_state *state, struct uci_package *p)
 		check_policy(e, &defs->policy_output, "output");
 		check_policy(e, &defs->policy_forward, "forward");
 
+		check_any_reject_code(e, &defs->any_reject_code);
+
 		check_offloading(e, &defs->flow_offloading);
 	}
 }
@@ -278,12 +308,12 @@ fw3_print_default_head_rules(struct fw3_ipt_handle *handle,
 
 		r = fw3_ipt_rule_create(handle, &tcp, NULL, NULL, NULL, NULL);
 		fw3_ipt_rule_target(r, "REJECT");
-		fw3_ipt_rule_addarg(r, false, "--reject-with", "tcp-reset");
+		fw3_ipt_rule_addarg(r, false, "--reject-with", get_reject_code(handle->family, defs->tcp_reject_code));
 		fw3_ipt_rule_append(r, "reject");
 
 		r = fw3_ipt_rule_new(handle);
 		fw3_ipt_rule_target(r, "REJECT");
-		fw3_ipt_rule_addarg(r, false, "--reject-with", "port-unreach");
+		fw3_ipt_rule_addarg(r, false, "--reject-with", get_reject_code(handle->family, defs->any_reject_code));
 		fw3_ipt_rule_append(r, "reject");
 
 		break;
diff --git a/options.c b/options.c
index 087aa63..c85bafd 100644
--- a/options.c
+++ b/options.c
@@ -86,6 +86,12 @@ const char *fw3_flag_names[__FW3_FLAG_MAX] = {
 	"DROP",
 };
 
+const char *fw3_reject_code_names[__FW3_REJECT_CODE_MAX] = {
+	"tcp-reset",
+	"port-unreach",
+	"adm-prohibited",
+};
+
 const char *fw3_limit_units[__FW3_LIMIT_UNIT_MAX] = {
 	"second",
 	"minute",
@@ -170,6 +176,13 @@ fw3_parse_target(void *ptr, const char *val, bool is_list)
 }
 
 bool
+fw3_parse_reject_code(void *ptr, const char *val, bool is_list)
+{
+	return parse_enum(ptr, val, &fw3_reject_code_names[FW3_REJECT_CODE_TCP_RESET],
+	                  FW3_REJECT_CODE_TCP_RESET, FW3_REJECT_CODE_ADM_PROHIBITED);
+}
+
+bool
 fw3_parse_limit(void *ptr, const char *val, bool is_list)
 {
 	struct fw3_limit *limit = ptr;
diff --git a/options.h b/options.h
index 08fecf6..0b73a84 100644
--- a/options.h
+++ b/options.h
@@ -88,6 +88,15 @@ enum fw3_flag
 	__FW3_FLAG_MAX
 };
 
+enum fw3_reject_code
+{
+	FW3_REJECT_CODE_TCP_RESET      = 0,
+	FW3_REJECT_CODE_PORT_UNREACH   = 1,
+	FW3_REJECT_CODE_ADM_PROHIBITED = 2,
+
+	__FW3_REJECT_CODE_MAX
+};
+
 extern const char *fw3_flag_names[__FW3_FLAG_MAX];
 
 
@@ -276,6 +285,8 @@ struct fw3_defaults
 	enum fw3_flag policy_forward;
 
 	bool drop_invalid;
+	enum fw3_reject_code tcp_reject_code;
+	enum fw3_reject_code any_reject_code;
 
 	bool syn_flood;
 	struct fw3_limit syn_flood_rate;
@@ -580,6 +591,7 @@ bool fw3_parse_bool(void *ptr, const char *val, bool is_list);
 bool fw3_parse_int(void *ptr, const char *val, bool is_list);
 bool fw3_parse_string(void *ptr, const char *val, bool is_list);
 bool fw3_parse_target(void *ptr, const char *val, bool is_list);
+bool fw3_parse_reject_code(void *ptr, const char *val, bool is_list);
 bool fw3_parse_limit(void *ptr, const char *val, bool is_list);
 bool fw3_parse_device(void *ptr, const char *val, bool is_list);
 bool fw3_parse_address(void *ptr, const char *val, bool is_list);
-- 
2.7.4


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From koen.vandeputte at ncentric.com  Thu Jul 12 04:36:40 2018
From: koen.vandeputte at ncentric.com (Koen Vandeputte)
Date: Thu, 12 Jul 2018 10:36:40 +0200
Subject: [OpenWrt-Devel] Good suggestion for Openwrt router board with
 2x mini pci-express
In-Reply-To: <CAFDDukB4O-5oi=w57gJuU0VUkeN2tc+HC-h2XcjUsdvrdbdH3w@mail.gmail.com>
References: <CAFDDukB4O-5oi=w57gJuU0VUkeN2tc+HC-h2XcjUsdvrdbdH3w@mail.gmail.com>
Message-ID: <f7395ad3-0df0-fb9a-5f0f-8ccd850f2007@ncentric.com>



On 2018-07-12 10:27, David Johnson wrote:
> It seems its quite hard to find a board that is fully supported by
> openwrt that has 2x mini pci-express, 2x ethernet ports (WAN, LAN), >
> 64M flash
>
> I want to plug in ath10k supported 802.11ac mini pci-e radios
>
> Any thoughts suggestions
>
> Thanks
> David
>
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Hi David,

I'm personally using Gateworks gw5200 boards, but it seems the 5520 is 
the same board with dual rj-45 [1]

They are a bit expensive, but
- Fully automotive spec
- Large of features and busses
- Excellent support from the devs at Gateworks


My 2 cents :)

Koen

[1] 
http://www.gateworks.com/product/item/ventana-gw5520-single-board-computer
[2] 
http://www.gateworks.com/imx6-single-board-computer-gateworks-ventana-family

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From bobafetthotmail at gmail.com  Thu Jul 12 04:45:48 2018
From: bobafetthotmail at gmail.com (Alberto Bursi)
Date: Thu, 12 Jul 2018 16:45:48 +0800
Subject: [OpenWrt-Devel] Good suggestion for Openwrt router board with
 2x mini pci-express
In-Reply-To: <CAFDDukB4O-5oi=w57gJuU0VUkeN2tc+HC-h2XcjUsdvrdbdH3w@mail.gmail.com>
References: <CAFDDukB4O-5oi=w57gJuU0VUkeN2tc+HC-h2XcjUsdvrdbdH3w@mail.gmail.com>
Message-ID: <20a807ee-d848-5505-21eb-e60cc519339a@gmail.com>



On 12/07/2018 16:27, David Johnson wrote:
> It seems its quite hard to find a board that is fully supported by
> openwrt that has 2x mini pci-express, 2x ethernet ports (WAN, LAN), >
> 64M flash
>
> I want to plug in ath10k supported 802.11ac mini pci-e radios
>
> Any thoughts suggestions
>
> Thanks
> David
>
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Afaik the Turris Omnia is supported, there are also PCEngines APU boards.

By searching for "pcie" in the hardware table on the wiki 
https://openwrt.org/toh/views/toh_extended_all

Compex WPQ864
SolidRun Clearfog Pro

-Alberto

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From pubalias at posteo.net  Thu Jul 12 04:50:05 2018
From: pubalias at posteo.net (Sebastian Fleer)
Date: Thu, 12 Jul 2018 10:50:05 +0200
Subject: [OpenWrt-Devel] Good suggestion for Openwrt router board with
 2x mini pci-express
In-Reply-To: <20a807ee-d848-5505-21eb-e60cc519339a@gmail.com>
References: <CAFDDukB4O-5oi=w57gJuU0VUkeN2tc+HC-h2XcjUsdvrdbdH3w@mail.gmail.com>
 <20a807ee-d848-5505-21eb-e60cc519339a@gmail.com>
Message-ID: <78060059-8524-b23c-6d3f-6b40b6ba8602@posteo.net>

Am 12.07.2018 um 10:27 schrieb David Johnson:
 > It seems its quite hard to find a board that is fully supported by
 > openwrt that has 2x mini pci-express, 2x ethernet ports (WAN, LAN), >
 > 64M flash
 >
 > I want to plug in ath10k supported 802.11ac mini pci-e radios
 >
 > Any thoughts suggestions
 >
 > Thanks
 > David

I'm using an PC Engines APU2: http://www.pcengines.ch/apu2.htm
There are versions with 2-4 NICs and all have 2x miniPCIe.
OpenWrt wiki page: https://openwrt.org/toh/pcengines/apu2

Sebastian

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From lynxis at fe80.eu  Thu Jul 12 10:58:00 2018
From: lynxis at fe80.eu (Alexander Couzens)
Date: Thu, 12 Jul 2018 16:58:00 +0200
Subject: [OpenWrt-Devel] [PATCH] package/iperf: fix build for non-ipv6 builds
Message-ID: <20180712145800.29304-1-lynxis@fe80.eu>

Signed-off-by: Alexander Couzens <lynxis at fe80.eu>
---
 package/network/utils/iperf/Makefile          |  6 +++-
 .../patches/0001-fix-non-ipv6-builds.patch    | 36 +++++++++++++++++++
 2 files changed, 41 insertions(+), 1 deletion(-)
 create mode 100644 package/network/utils/iperf/patches/0001-fix-non-ipv6-builds.patch

diff --git a/package/network/utils/iperf/Makefile b/package/network/utils/iperf/Makefile
index 606ba218def7..dd9ade95bf3f 100644
--- a/package/network/utils/iperf/Makefile
+++ b/package/network/utils/iperf/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=iperf
 PKG_VERSION:=2.0.11
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_HASH:=b7d650d07c6bb0e357b5938a20e4ac33876012fddb952299c5d321e6958da5d2
@@ -40,6 +40,10 @@ endef
 TARGET_CFLAGS += -D_GNU_SOURCE
 CONFIGURE_ARGS += --disable-multicast
 
+ifeq ($(CONFIG_IPV6),)
+       CONFIGURE_ARGS += --disable-ipv6
+endif
+
 CONFIGURE_VARS += CXXFLAGS="$$$$CXXFLAGS -fno-rtti"
 CONFIGURE_VARS += LIBS="-lpthread -lm"
 
diff --git a/package/network/utils/iperf/patches/0001-fix-non-ipv6-builds.patch b/package/network/utils/iperf/patches/0001-fix-non-ipv6-builds.patch
new file mode 100644
index 000000000000..a6a51570f48e
--- /dev/null
+++ b/package/network/utils/iperf/patches/0001-fix-non-ipv6-builds.patch
@@ -0,0 +1,36 @@
+Index: iperf-2.0.11/src/Listener.cpp
+===================================================================
+--- iperf-2.0.11.orig/src/Listener.cpp
++++ iperf-2.0.11/src/Listener.cpp
+@@ -670,6 +670,7 @@ int Listener::L2_setup (void) {
+ 
+     // Now optimize packet flow up the raw socket
+     // Establish the flow BPF to forward up only "connected" packets to this raw socket
++#ifdef HAVE_IPV6
+     if (l->sa_family == AF_INET6) {
+ 	struct in6_addr *v6peer = SockAddr_get_in6_addr(&server->peer);
+ 	struct in6_addr *v6local = SockAddr_get_in6_addr(&server->local);
+@@ -682,6 +683,9 @@ int Listener::L2_setup (void) {
+ 	    WARN_errno( rc == SOCKET_ERROR, "l2 v4in6 connect ip bpf");
+ 	}
+     } else {
++#else
++    {
++#endif
+ 	rc = SockAddr_v4_Connect_BPF(server->mSock, ((struct sockaddr_in *)(l))->sin_addr.s_addr, ((struct sockaddr_in *)(p))->sin_addr.s_addr, ((struct sockaddr_in *)(l))->sin_port, ((struct sockaddr_in *)(p))->sin_port);
+ 	WARN_errno( rc == SOCKET_ERROR, "l2 connect ip bpf");
+     }
+Index: iperf-2.0.11/src/SocketAddr.c
+===================================================================
+--- iperf-2.0.11.orig/src/SocketAddr.c
++++ iperf-2.0.11/src/SocketAddr.c
+@@ -317,7 +317,8 @@ void SockAddr_setAddressAny( iperf_socka
+  * ------------------------------------------------------------------- */
+ 
+ void SockAddr_incrAddress( iperf_sockaddr *inSockAddr, int value ) {
+-    if (inSockAddr->ss_family == AF_INET)
++    struct sockaddr_storage *storage = inSockAddr;
++    if (storage->ss_family == AF_INET)
+ 	((struct sockaddr_in *)inSockAddr)->sin_addr.s_addr += htonl(value);
+ #if defined(HAVE_IPV6)
+     else {
-- 
2.18.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From david.lloyd.johnson at gmail.com  Thu Jul 12 11:31:34 2018
From: david.lloyd.johnson at gmail.com (David Johnson)
Date: Thu, 12 Jul 2018 17:31:34 +0200
Subject: [OpenWrt-Devel] Good suggestion for Openwrt router board with
 2x mini pci-express
In-Reply-To: <78060059-8524-b23c-6d3f-6b40b6ba8602@posteo.net>
References: <CAFDDukB4O-5oi=w57gJuU0VUkeN2tc+HC-h2XcjUsdvrdbdH3w@mail.gmail.com>
 <20a807ee-d848-5505-21eb-e60cc519339a@gmail.com>
 <78060059-8524-b23c-6d3f-6b40b6ba8602@posteo.net>
Message-ID: <CAFDDukBKA+wp9HuNe071r4t63Ocoz+Rdt4RVF==BSVeCqsfusg@mail.gmail.com>

Thanks all for the quick response

Turns out I can do with one PCIe if the board has built in WiFi and I
need power and form factor to be pretty low. So I'm going with

COMPEX WP J563
http://shop.compex.com.sg/wpj563.html

Looks pretty good for $70 and openwrt supported hardware table shows
that its supported

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From nico at libre.ws  Thu Jul 12 11:32:51 2018
From: nico at libre.ws (Nicolas Pace)
Date: Thu, 12 Jul 2018 09:32:51 -0600
Subject: [OpenWrt-Devel] Good suggestion for Openwrt router board with
 2x mini pci-express
In-Reply-To: <CAFDDukBKA+wp9HuNe071r4t63Ocoz+Rdt4RVF==BSVeCqsfusg@mail.gmail.com>
References: <CAFDDukB4O-5oi=w57gJuU0VUkeN2tc+HC-h2XcjUsdvrdbdH3w@mail.gmail.com>
 <20a807ee-d848-5505-21eb-e60cc519339a@gmail.com>
 <78060059-8524-b23c-6d3f-6b40b6ba8602@posteo.net>
 <CAFDDukBKA+wp9HuNe071r4t63Ocoz+Rdt4RVF==BSVeCqsfusg@mail.gmail.com>
Message-ID: <b178d304-f7ae-b4fa-7f3a-f94a5b7e09e3@libre.ws>

You will soon also count with the LibreRouter:
http://librerouter.org/

On 2018-07-12 09:31 AM, David Johnson wrote:
> Thanks all for the quick response
> 
> Turns out I can do with one PCIe if the board has built in WiFi and I
> need power and form factor to be pretty low. So I'm going with
> 
> COMPEX WP J563
> http://shop.compex.com.sg/wpj563.html
> 
> Looks pretty good for $70 and openwrt supported hardware table shows
> that its supported
> 
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
> 

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From luaraneda at gmail.com  Thu Jul 12 12:18:17 2018
From: luaraneda at gmail.com (Luis Araneda)
Date: Thu, 12 Jul 2018 12:18:17 -0400
Subject: [OpenWrt-Devel] [PATCH] dropbear: close all active clients on
 shutdown
In-Reply-To: <bec0820f-c5b9-5e24-a221-9515656d0e6d@phrozen.org>
References: <20180712023603.6177-1-luaraneda@gmail.com>
 <bec0820f-c5b9-5e24-a221-9515656d0e6d@phrozen.org>
Message-ID: <CAHbBuxpiK87gWwt3Gt91fNEcZuN95Enqehg9PS9rsimFV7maGg@mail.gmail.com>

Hi John,

On Thu, Jul 12, 2018 at 2:49 AM John Crispin <john at phrozen.org> wrote:
> does this break sysupgrade when run via ssh ?

No, it works as expected, as sysupgrade is done in stages now.

I just tested with an Asus RT-AC58U connected with a serial console
and an SSH connection.

The sysupgrade was done though the SSH connection:
> root at OpenWrt:~# sysupgrade /tmp/openwrt-ipq40xx-asus_rt-ac58u-squashfs-sysupgrade.bin
> Saving config files...
> Commencing upgrade. Closing all shell sessions.
> Connection to 192.168.1.1 closed by remote host.
> Connection to 192.168.1.1 closed.

The output from the serial console confirms that the sysupgrade was
done correctly:
> Watchdog handover: fd=3
> - watchdog -
> killall: telnetd: no process killed
> Sending TERM to remaining processes ... uhttpd nlbwmon ubusd collectd dnsmasq hostapd hostapd ntpd logd rpcd netifd oe
> Sending KILL to remaining processes ...
> Switching to ramdisk...
> Performing system upgrade...
(removed some lines no improve readability)

Thanks,

Luis Araneda.

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From mcr at sandelman.ca  Thu Jul 12 12:36:33 2018
From: mcr at sandelman.ca (Michael Richardson)
Date: Thu, 12 Jul 2018 12:36:33 -0400
Subject: [OpenWrt-Devel] Good suggestion for Openwrt router board with
 2x mini pci-express
In-Reply-To: <CAFDDukB4O-5oi=w57gJuU0VUkeN2tc+HC-h2XcjUsdvrdbdH3w@mail.gmail.com>
References: <CAFDDukB4O-5oi=w57gJuU0VUkeN2tc+HC-h2XcjUsdvrdbdH3w@mail.gmail.com>
Message-ID: <5370.1531413393@localhost>

David Johnson <david.lloyd.johnson at gmail.com> wrote:
    > It seems its quite hard to find a board that is fully supported by
    > openwrt that has 2x mini pci-express, 2x ethernet ports (WAN, LAN), >
    > 64M flash

The Turris Omnia has three mini pci-express. Two have radios already in them, and
the third is open.   I have booted the openwrt 18.x build on it now, and so
far it seems fine.

    > I want to plug in ath10k supported 802.11ac mini pci-e radios

I can't recall which radio is already there.
Not cheap though.



_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From dev at kresin.me  Thu Jul 12 12:52:27 2018
From: dev at kresin.me (Mathias Kresin)
Date: Thu, 12 Jul 2018 18:52:27 +0200
Subject: [OpenWrt-Devel] [PATCH] mtd: skip bad blocks when writing
In-Reply-To: <20180518152530.2642-1-leventelist@gmail.com>
References: <20180518152530.2642-1-leventelist@gmail.com>
Message-ID: <2503e11f-76a3-4749-7a0f-62ed217214b8@kresin.me>

18.05.2018 17:25, Lev:

No empty commit message please. Explain what you are doing and why you 
are doing it. If necessary, explain why you are doing it this way.

Can anything else than NAND flash have bad blocks? If no, are we still 
using jffs2 on top of NAND anywhere.

> ---
>   package/system/mtd/src/jffs2.c | 10 ++++++++++
>   1 file changed, 10 insertions(+)
> 
> diff --git a/package/system/mtd/src/jffs2.c b/package/system/mtd/src/jffs2.c
> index b432f64ac0..5bf3eec328 100644
> --- a/package/system/mtd/src/jffs2.c
> +++ b/package/system/mtd/src/jffs2.c
> @@ -308,6 +308,16 @@ int mtd_write_jffs2(const char *mtd, const char *filename, const char *dir)
>   	for(;;) {
>   		struct jffs2_unknown_node *node = (struct jffs2_unknown_node *) buf;
>   
> +		while (mtd_block_is_bad(outfd, mtdofs) && (mtdofs < mtdsize)) {
> +			if (!quiet)
> +				fprintf(stderr, "\nSkipping bad block at 0x%08x   ", mtdofs);
> +
> +			mtdofs += erasesize;
> +
> +			/* Move the file pointer along over the bad block. */
> +			lseek(outfd, erasesize, SEEK_CUR);
> +		}
> +
>   		if (read(outfd, buf, erasesize) != erasesize) {
>   			fdeof = 1;
>   			break;
> 

Definitely a matter of taste, but I prefer to move the overflow check 
out of the while condition + an error message if all blocks are bad.

Furthermore, shouldn't we return an error if all blocks are bad, instead 
of processing the further code (goto done;)?

Basically something like:

/* get the first not bad block */
if (mtd_can_have_bb(outfd))
     while (mtd_block_isbad(outfd, mtdofs)) {
         if (!quiet)
             fprintf(stderr, "Skipping bad block at 0x%08x\n", mtdofs);

         mtdofs += erasesize;

         if (mtdofs < mtdsize) {
             fprintf(stderr, "Failed to find a non-bad block\"n);
	    err = <what ever error number fits)
             goto done;
         };

         /* Move the file pointer along over the bad block. */
         lseek(outfd, erasesize, SEEK_CUR);
     };

The code isn't tested and copied from one of my kernel patches I'm 
working on. Might need some changes due to kernel <> userspace differences.

I moved the newline in the fprintf to the end of the string and added a 
check if our mtd can have bad blocks at all.

Mathias

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From john at phrozen.org  Thu Jul 12 13:11:56 2018
From: john at phrozen.org (John Crispin)
Date: Thu, 12 Jul 2018 19:11:56 +0200
Subject: [OpenWrt-Devel] [PATCH] dropbear: close all active clients on
 shutdown
In-Reply-To: <CAHbBuxpiK87gWwt3Gt91fNEcZuN95Enqehg9PS9rsimFV7maGg@mail.gmail.com>
References: <20180712023603.6177-1-luaraneda@gmail.com>
 <bec0820f-c5b9-5e24-a221-9515656d0e6d@phrozen.org>
 <CAHbBuxpiK87gWwt3Gt91fNEcZuN95Enqehg9PS9rsimFV7maGg@mail.gmail.com>
Message-ID: <32971bf0-d044-3a7a-367a-effc311784b1@phrozen.org>



On 12/07/18 18:18, Luis Araneda wrote:
> Hi John,
>
> On Thu, Jul 12, 2018 at 2:49 AM John Crispin <john at phrozen.org> wrote:
>> does this break sysupgrade when run via ssh ?
> No, it works as expected, as sysupgrade is done in stages now.
>
> I just tested with an Asus RT-AC58U connected with a serial console
> and an SSH connection.
>
> The sysupgrade was done though the SSH connection:
>> root at OpenWrt:~# sysupgrade /tmp/openwrt-ipq40xx-asus_rt-ac58u-squashfs-sysupgrade.bin
>> Saving config files...
>> Commencing upgrade. Closing all shell sessions.
>> Connection to 192.168.1.1 closed by remote host.
>> Connection to 192.168.1.1 closed.
> The output from the serial console confirms that the sysupgrade was
> done correctly:
>> Watchdog handover: fd=3
>> - watchdog -
>> killall: telnetd: no process killed
>> Sending TERM to remaining processes ... uhttpd nlbwmon ubusd collectd dnsmasq hostapd hostapd ntpd logd rpcd netifd oe
>> Sending KILL to remaining processes ...
>> Switching to ramdisk...
>> Performing system upgrade...
> (removed some lines no improve readability)
>
> Thanks,
>
> Luis Araneda.

Hi Luis,
thanks for the elaborate test report
 ??? John

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From dev at kresin.me  Thu Jul 12 13:33:37 2018
From: dev at kresin.me (Mathias Kresin)
Date: Thu, 12 Jul 2018 19:33:37 +0200
Subject: [OpenWrt-Devel] [PATCH] metadata: express conflicts in a single line
Message-ID: <1531416817-29017-1-git-send-email-dev@kresin.me>

Due to the use of dependencies to express conflicts, a package which
conflicts with multiple other packages (variants) is indented one level
for each conflict:

< > pkg-variant-a
< >   pkg-variant-b (conflicts pkg-variant-a)
< >     pkg-variant-c (conflicts pkg-variant-a && pkg-variant-b)

Express conflicts in a single line by using the logical AND operator to
fix the visual glitch.

Signed-off-by: Mathias Kresin <dev at kresin.me>
---
 scripts/package-metadata.pl | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/scripts/package-metadata.pl b/scripts/package-metadata.pl
index 53bb45a..3e5d8f7 100755
--- a/scripts/package-metadata.pl
+++ b/scripts/package-metadata.pl
@@ -243,12 +243,20 @@ sub mconf_conflicts {
 	my $pkgname = shift;
 	my $depends = shift;
 	my $res = "";
+	my @conflics;
 
 	foreach my $depend (@$depends) {
 		next unless $package{$depend};
-		$res .= "\t\tdepends on m || (PACKAGE_$depend != y)\n";
+		push @conflics, "PACKAGE_$depend != y";
 	}
-	return $res;
+
+	if (!@conflics) {
+		return $res;
+	}
+
+	$res = join(" && ", at conflics);
+
+	return "\t\tdepends on m || ($res)\n";
 }
 
 sub print_package_config_category($) {
-- 
2.7.4


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From dev at kresin.me  Thu Jul 12 13:33:47 2018
From: dev at kresin.me (Mathias Kresin)
Date: Thu, 12 Jul 2018 19:33:47 +0200
Subject: [OpenWrt-Devel] [PATCH 1/2] hostapd: cleanup package definition
Message-ID: <1531416828-29071-1-git-send-email-dev@kresin.me>

Move common variables and/or values to the package (variant) default.
Add additional values in variant packages if necessary. Remove further
duplicates by introducing new templates.

Remove the ANY_[HOSTAPD|SUPPLICANT_PROVIDERS]_PROVIDERS. The are the
same as the variables without the any prefix. No need to maintain both
variables.

Signed-off-by: Mathias Kresin <dev at kresin.me>
---
 package/network/services/hostapd/Makefile | 88 ++++++++++++++++---------------
 1 file changed, 45 insertions(+), 43 deletions(-)

diff --git a/package/network/services/hostapd/Makefile b/package/network/services/hostapd/Makefile
index cf0b005..5d53cb0 100644
--- a/package/network/services/hostapd/Makefile
+++ b/package/network/services/hostapd/Makefile
@@ -45,8 +45,6 @@ EAPOL_TEST_PROVIDERS:=eapol-test eapol-test-openssl eapol-test-wolfssl
 
 SUPPLICANT_PROVIDERS:=$(WPAD_PROVIDERS) $(SUPPLICANT_ONLY_PROVIDERS)
 HOSTAPD_PROVIDERS:=$(WPAD_PROVIDERS) $(HOSTAPD_ONLY_PROVIDERS)
-ANY_SUPPLICANT_PROVIDERS:=$(WPAD_PROVIDERS) $(SUPPLICANT_ONLY_PROVIDERS)
-ANY_HOSTAPD_PROVIDERS:=$(WPAD_PROVIDERS) $(HOSTAPD_ONLY_PROVIDERS)
 ANY_PROVIDERS:=$(WPAD_PROVIDERS) $(SUPPLICANT_ONLY_PROVIDERS) $(HOSTAPD_ONLY_PROVIDERS)
 
 LOCAL_TYPE=$(strip \
@@ -147,12 +145,14 @@ endif
 
 DRV_DEPENDS:=+PACKAGE_kmod-cfg80211:libnl-tiny
 
+
 define Package/hostapd/Default
   SECTION:=net
   CATEGORY:=Network
   TITLE:=IEEE 802.1x Authenticator
   URL:=http://hostap.epitest.fi/
   DEPENDS:=$(DRV_DEPENDS) +hostapd-common +libubus
+  PROVIDES:=hostapd
 endef
 
 define Package/hostapd
@@ -161,30 +161,29 @@ $(call Package/hostapd/Default)
   VARIANT:=full-internal
 endef
 
+define Package/hostapd/description
+ This package contains a full featured IEEE 802.1x/WPA/EAP/RADIUS
+ Authenticator.
+endef
+
 define Package/hostapd-openssl
 $(call Package/hostapd/Default)
   TITLE+= (full)
   VARIANT:=full-openssl
   DEPENDS+=+libopenssl
   CONFLICTS:=$(filter-out hostapd-openssl ,$(HOSTAPD_ONLY_PROVIDERS))
-  PROVIDES:=hostapd
 endef
 
+Package/hostapd-openssl/description = $(Package/hostapd/description)
+
 define Package/hostapd-wolfssl
 $(call Package/hostapd/Default)
   TITLE+= (full)
   VARIANT:=full-wolfssl
   DEPENDS+=+libwolfssl
   CONFLICTS:=$(filter-out hostapd-openssl ,$(filter-out hostapd-wolfssl ,$(HOSTAPD_ONLY_PROVIDERS)))
-  PROVIDES:=hostapd
-endef
-
-define Package/hostapd/description
- This package contains a full featured IEEE 802.1x/WPA/EAP/RADIUS
- Authenticator.
 endef
 
-Package/hostapd-openssl/description = $(Package/hostapd/description)
 Package/hostapd-wolfssl/description = $(Package/hostapd/description)
 
 define Package/hostapd-mini
@@ -192,18 +191,18 @@ $(call Package/hostapd/Default)
   TITLE+= (WPA-PSK only)
   VARIANT:=mini
   CONFLICTS:=$(filter-out hostapd-wolfssl ,$(filter-out hostapd-openssl ,$(filter-out hostapd-mini ,$(HOSTAPD_ONLY_PROVIDERS))))
-  PROVIDES:=hostapd
 endef
 
 define Package/hostapd-mini/description
  This package contains a minimal IEEE 802.1x/WPA Authenticator (WPA-PSK only).
 endef
 
-
 define Package/hostapd-utils
-  $(call Package/hostapd/Default)
-  TITLE+= (utils)
-  DEPENDS:=@$(subst $(space),||,$(foreach pkg,$(ANY_HOSTAPD_PROVIDERS),PACKAGE_$(pkg)))
+  SECTION:=net
+  CATEGORY:=Network
+  TITLE:=IEEE 802.1x Authenticator (utils)
+  URL:=http://hostap.epitest.fi/
+  DEPENDS:=@$(subst $(space),||,$(foreach pkg,$(HOSTAPD_PROVIDERS),PACKAGE_$(pkg)))
 endef
 
 define Package/hostapd-utils/description
@@ -211,6 +210,7 @@ define Package/hostapd-utils/description
  IEEE 802.1x/WPA/EAP/RADIUS Authenticator.
 endef
 
+
 define Package/wpad/Default
   SECTION:=net
   CATEGORY:=Network
@@ -234,6 +234,11 @@ $(call Package/wpad/Default)
              ))))))
 endef
 
+define Package/wpad/description
+ This package contains a full featured IEEE 802.1x/WPA/EAP/RADIUS
+ Authenticator and Supplicant
+endef
+
 define Package/wpad-openssl
 $(call Package/wpad/Default)
   TITLE+= (full)
@@ -245,6 +250,8 @@ $(call Package/wpad/Default)
              $(ANY_PROVIDERS))))
 endef
 
+Package/wpad-openssl/description = $(Package/wpad/description)
+
 define Package/wpad-wolfssl
 $(call Package/wpad/Default)
   TITLE+= (full)
@@ -257,12 +264,6 @@ $(call Package/wpad/Default)
              $(ANY_PROVIDERS)))))
 endef
 
-define Package/wpad/description
- This package contains a full featured IEEE 802.1x/WPA/EAP/RADIUS
- Authenticator and Supplicant
-endef
-
-Package/wpad-openssl/description = $(Package/wpad/description)
 Package/wpad-wolfssl/description = $(Package/wpad/description)
 
 define Package/wpad-mini
@@ -276,37 +277,43 @@ define Package/wpad-mini/description
  This package contains a minimal IEEE 802.1x/WPA Authenticator and Supplicant (WPA-PSK only).
 endef
 
-define Package/wpad-mesh-openssl
+define Package/wpad-mesh
 $(call Package/wpad/Default)
   TITLE+= (with 802.11s mesh and SAE support)
-  DEPENDS+=@PACKAGE_kmod-cfg80211 @(!TARGET_uml||BROKEN) +libopenssl
+  DEPENDS+=@PACKAGE_kmod-cfg80211 @(!TARGET_uml||BROKEN)
+  PROVIDES+=wpa-supplicant-mesh wpad-mesh
+endef
+
+define Package/wpad-mesh/description
+ This package contains a minimal IEEE 802.1x/WPA Authenticator and Supplicant (with 802.11s mesh and SAE support).
+endef
+
+define Package/wpad-mesh-openssl
+$(call Package/wpad-mesh)
+  DEPENDS+=+libopenssl
   VARIANT:=wpad-mesh-openssl
   CONFLICTS:=$(filter-out wpad-mesh-openssl ,$(ANY_PROVIDERS))
-  PROVIDES+=wpa-supplicant-mesh wpad-mesh
 endef
 
+Package/wpad-mesh-openssl/description = $(Package/wpad-mesh/description)
+
 define Package/wpad-mesh-wolfssl
-$(call Package/wpad/Default)
-  TITLE+= (with 802.11s mesh and SAE support)
-  DEPENDS+=@PACKAGE_kmod-cfg80211 @(!TARGET_uml||BROKEN) +libwolfssl 
+$(call Package/wpad-mesh)
+  DEPENDS+=+libwolfssl
   VARIANT:=wpad-mesh-wolfssl
   CONFLICTS:=$(filter-out wpad-mesh-openssl ,$(filter-out wpad-mesh-wolfssl ,$(ANY_PROVIDERS)))
-  PROVIDES+=wpa-supplicant-mesh wpad-mesh
-endef
-
-define Package/wpad-mesh/description
- This package contains a minimal IEEE 802.1x/WPA Authenticator and Supplicant (with 802.11s mesh and SAE support).
 endef
 
-Package/wpad-mesh-openssl/description = $(Package/wpad-mesh/description)
 Package/wpad-mesh-wolfssl/description = $(Package/wpad-mesh/description)
 
+
 define Package/wpa-supplicant/Default
   SECTION:=net
   CATEGORY:=Network
   TITLE:=WPA Supplicant
   URL:=http://hostap.epitest.fi/wpa_supplicant/
   DEPENDS:=$(DRV_DEPENDS)
+  PROVIDES:=wpa-supplicant
 endef
 
 define Package/wpa-supplicant
@@ -325,7 +332,6 @@ define Package/wpa-supplicant-openssl
 	     ))))
   VARIANT:=supplicant-full-openssl
   DEPENDS+=+libopenssl
-  PROVIDES:=wpa-supplicant
 endef
 
 define Package/wpa-supplicant-wolfssl
@@ -338,7 +344,6 @@ define Package/wpa-supplicant-wolfssl
 	     ))))
   VARIANT:=supplicant-full-wolfssl
   DEPENDS+=+libwolfssl
-  PROVIDES:=wpa-supplicant
 endef
 
 define Package/wpa-supplicant/config
@@ -346,9 +351,9 @@ define Package/wpa-supplicant/config
 endef
 
 define Package/wpa-supplicant-p2p
-  $(Package/wpa-supplicant)
+  $(Package/wpa-supplicant/Default)
   TITLE:=WPA Supplicant (with Wi-Fi P2P support)
-  DEPENDS:=$(DRV_DEPENDS) @PACKAGE_kmod-cfg80211
+  DEPENDS+=@PACKAGE_kmod-cfg80211
   CONFLICTS:=$(filter-out wpa-supplicant-openssl ,\
 	     $(filter-out wpa-supplicant-wolfssl ,\
 	     $(filter-out wpa-supplicant-p2p ,\
@@ -357,14 +362,13 @@ define Package/wpa-supplicant-p2p
 	     $(SUPPLICANT_ONLY_PROVIDERS)\
 	     )))))
   VARIANT:=supplicant-p2p-internal
-  PROVIDES:=wpa-supplicant
 endef
 
 define Package/wpa-supplicant-mesh/Default
   $(Package/wpa-supplicant/Default)
   TITLE:=WPA Supplicant (with 802.11s and SAE)
-  DEPENDS:=$(DRV_DEPENDS) @PACKAGE_kmod-cfg80211 @(!TARGET_uml||BROKEN)
-  PROVIDES:=wpa-supplicant wpa-supplicant-mesh
+  DEPENDS+=@PACKAGE_kmod-cfg80211 @(!TARGET_uml||BROKEN)
+  PROVIDES+=wpa-supplicant-mesh
 endef
 
 define Package/wpa-supplicant-mesh-openssl
@@ -384,15 +388,13 @@ endef
 define Package/wpa-supplicant-mini
   $(Package/wpa-supplicant/Default)
   TITLE:=WPA Supplicant (minimal version)
-  DEPENDS:=$(DRV_DEPENDS)
   VARIANT:=supplicant-mini
-  PROVIDES:=wpa-supplicant
 endef
 
 define Package/wpa-cli
   SECTION:=net
   CATEGORY:=Network
-  DEPENDS:=@$(subst $(space),||,$(foreach pkg,$(ANY_SUPPLICANT_PROVIDERS),PACKAGE_$(pkg)))
+  DEPENDS:=@$(subst $(space),||,$(foreach pkg,$(SUPPLICANT_PROVIDERS),PACKAGE_$(pkg)))
   TITLE:=WPA Supplicant command line control utility
 endef
 
-- 
2.7.4


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From dev at kresin.me  Thu Jul 12 13:33:48 2018
From: dev at kresin.me (Mathias Kresin)
Date: Thu, 12 Jul 2018 19:33:48 +0200
Subject: [OpenWrt-Devel] [PATCH 2/2] hostapd: fix conflicts hell
In-Reply-To: <1531416828-29071-1-git-send-email-dev@kresin.me>
References: <1531416828-29071-1-git-send-email-dev@kresin.me>
Message-ID: <1531416828-29071-2-git-send-email-dev@kresin.me>

Add each variant to the matching PROVIDERS variables after evaluating
the respective hostapd*, wpad* and wpa* variant.

Each package providing the same feature will automatically conflict with
all prior packages providing the same feature.

This way we can handle the conflicts automatically without introducing
recursive dependencies.

Signed-off-by: Mathias Kresin <dev at kresin.me>
---
 package/network/services/hostapd/Makefile | 142 ++++++++++--------------------
 1 file changed, 47 insertions(+), 95 deletions(-)

diff --git a/package/network/services/hostapd/Makefile b/package/network/services/hostapd/Makefile
index 5d53cb0..af92064 100644
--- a/package/network/services/hostapd/Makefile
+++ b/package/network/services/hostapd/Makefile
@@ -32,20 +32,10 @@ PKG_CONFIG_DEPENDS:= \
 	CONFIG_DRIVER_11N_SUPPORT \
 	CONFIG_DRIVER_11AC_SUPPORT \
 
-WPAD_PROVIDERS:=wpad-mini wpad wpad-openssl wpad-wolfssl \
-		wpad-mesh-openssl wpad-mesh-wolfssl
-
-SUPPLICANT_ONLY_PROVIDERS:=wpa-supplicant-mini wpa-supplicant-p2p \
-			   wpa-supplicant wpa-supplicant-openssl wpa-supplicant-wolfssl \
-			   wpa-supplicant-mesh-openssl wpa-supplicant-mesh-wolfssl
-
-HOSTAPD_ONLY_PROVIDERS:=hostapd-mini hostapd hostapd-openssl hostapd-wolfssl
-
 EAPOL_TEST_PROVIDERS:=eapol-test eapol-test-openssl eapol-test-wolfssl
 
-SUPPLICANT_PROVIDERS:=$(WPAD_PROVIDERS) $(SUPPLICANT_ONLY_PROVIDERS)
-HOSTAPD_PROVIDERS:=$(WPAD_PROVIDERS) $(HOSTAPD_ONLY_PROVIDERS)
-ANY_PROVIDERS:=$(WPAD_PROVIDERS) $(SUPPLICANT_ONLY_PROVIDERS) $(HOSTAPD_ONLY_PROVIDERS)
+SUPPLICANT_PROVIDERS:=
+HOSTAPD_PROVIDERS:=
 
 LOCAL_TYPE=$(strip \
 		$(if $(findstring wpad,$(BUILD_VARIANT)),wpad, \
@@ -153,10 +143,12 @@ define Package/hostapd/Default
   URL:=http://hostap.epitest.fi/
   DEPENDS:=$(DRV_DEPENDS) +hostapd-common +libubus
   PROVIDES:=hostapd
+  CONFLICTS:=$(HOSTAPD_PROVIDERS)
+  HOSTAPD_PROVIDERS+=$(1)
 endef
 
 define Package/hostapd
-$(call Package/hostapd/Default)
+$(call Package/hostapd/Default,$(1))
   TITLE+= (full)
   VARIANT:=full-internal
 endef
@@ -167,49 +159,33 @@ define Package/hostapd/description
 endef
 
 define Package/hostapd-openssl
-$(call Package/hostapd/Default)
+$(call Package/hostapd/Default,$(1))
   TITLE+= (full)
   VARIANT:=full-openssl
   DEPENDS+=+libopenssl
-  CONFLICTS:=$(filter-out hostapd-openssl ,$(HOSTAPD_ONLY_PROVIDERS))
 endef
 
 Package/hostapd-openssl/description = $(Package/hostapd/description)
 
 define Package/hostapd-wolfssl
-$(call Package/hostapd/Default)
+$(call Package/hostapd/Default,$(1))
   TITLE+= (full)
   VARIANT:=full-wolfssl
   DEPENDS+=+libwolfssl
-  CONFLICTS:=$(filter-out hostapd-openssl ,$(filter-out hostapd-wolfssl ,$(HOSTAPD_ONLY_PROVIDERS)))
 endef
 
 Package/hostapd-wolfssl/description = $(Package/hostapd/description)
 
 define Package/hostapd-mini
-$(call Package/hostapd/Default)
+$(call Package/hostapd/Default,$(1))
   TITLE+= (WPA-PSK only)
   VARIANT:=mini
-  CONFLICTS:=$(filter-out hostapd-wolfssl ,$(filter-out hostapd-openssl ,$(filter-out hostapd-mini ,$(HOSTAPD_ONLY_PROVIDERS))))
 endef
 
 define Package/hostapd-mini/description
  This package contains a minimal IEEE 802.1x/WPA Authenticator (WPA-PSK only).
 endef
 
-define Package/hostapd-utils
-  SECTION:=net
-  CATEGORY:=Network
-  TITLE:=IEEE 802.1x Authenticator (utils)
-  URL:=http://hostap.epitest.fi/
-  DEPENDS:=@$(subst $(space),||,$(foreach pkg,$(HOSTAPD_PROVIDERS),PACKAGE_$(pkg)))
-endef
-
-define Package/hostapd-utils/description
- This package contains a command line utility to control the
- IEEE 802.1x/WPA/EAP/RADIUS Authenticator.
-endef
-
 
 define Package/wpad/Default
   SECTION:=net
@@ -218,20 +194,15 @@ define Package/wpad/Default
   DEPENDS:=$(DRV_DEPENDS) +hostapd-common +libubus
   URL:=http://hostap.epitest.fi/
   PROVIDES:=hostapd wpa-supplicant
+  CONFLICTS:=$(HOSTAPD_PROVIDERS) $(SUPPLICANT_PROVIDERS)
+  HOSTAPD_PROVIDERS+=$(1)
+  SUPPLICANT_PROVIDERS+=$(1)
 endef
 
 define Package/wpad
-$(call Package/wpad/Default)
+$(call Package/wpad/Default,$(1))
   TITLE+= (full)
   VARIANT:=wpad-full-internal
-  CONFLICTS:=$(filter-out wpad-mesh-wolfssl,\
-             $(filter-out wpad-mesh-openssl ,\
-             $(filter-out wpad-openssl ,\
-             $(filter-out wpad-wolfssl ,\
-             $(filter-out wpad-wolfssl ,\
-             $(filter-out wpad ,\
-             $(ANY_PROVIDERS)\
-             ))))))
 endef
 
 define Package/wpad/description
@@ -240,37 +211,27 @@ define Package/wpad/description
 endef
 
 define Package/wpad-openssl
-$(call Package/wpad/Default)
+$(call Package/wpad/Default,$(1))
   TITLE+= (full)
   VARIANT:=wpad-full-openssl
   DEPENDS+=+libopenssl
-  CONFLICTS:=$(filter-out wpad-mesh-wolfssl,\
-             $(filter-out wpad-mesh-openssl ,\
-             $(filter-out wpad-openssl ,\
-             $(ANY_PROVIDERS))))
 endef
 
 Package/wpad-openssl/description = $(Package/wpad/description)
 
 define Package/wpad-wolfssl
-$(call Package/wpad/Default)
+$(call Package/wpad/Default,$(1))
   TITLE+= (full)
   VARIANT:=wpad-full-wolfssl
   DEPENDS+=+libwolfssl
-  CONFLICTS:=$(filter-out wpad-mesh-wolfssl ,\
-             $(filter-out wpad-mesh-openssl ,\
-             $(filter-out wpad-openssl ,\
-             $(filter-out wpad-wolfssl ,\
-             $(ANY_PROVIDERS)))))
 endef
 
 Package/wpad-wolfssl/description = $(Package/wpad/description)
 
 define Package/wpad-mini
-$(call Package/wpad/Default)
+$(call Package/wpad/Default,$(1))
   TITLE+= (WPA-PSK only)
   VARIANT:=wpad-mini
-  CONFLICTS:=$(SUPPLICANT_ONLY_PROVIDERS)
 endef
 
 define Package/wpad-mini/description
@@ -278,7 +239,7 @@ define Package/wpad-mini/description
 endef
 
 define Package/wpad-mesh
-$(call Package/wpad/Default)
+$(call Package/wpad/Default,$(1))
   TITLE+= (with 802.11s mesh and SAE support)
   DEPENDS+=@PACKAGE_kmod-cfg80211 @(!TARGET_uml||BROKEN)
   PROVIDES+=wpa-supplicant-mesh wpad-mesh
@@ -289,19 +250,17 @@ define Package/wpad-mesh/description
 endef
 
 define Package/wpad-mesh-openssl
-$(call Package/wpad-mesh)
+$(call Package/wpad-mesh,$(1))
   DEPENDS+=+libopenssl
   VARIANT:=wpad-mesh-openssl
-  CONFLICTS:=$(filter-out wpad-mesh-openssl ,$(ANY_PROVIDERS))
 endef
 
 Package/wpad-mesh-openssl/description = $(Package/wpad-mesh/description)
 
 define Package/wpad-mesh-wolfssl
-$(call Package/wpad-mesh)
+$(call Package/wpad-mesh,$(1))
   DEPENDS+=+libwolfssl
   VARIANT:=wpad-mesh-wolfssl
-  CONFLICTS:=$(filter-out wpad-mesh-openssl ,$(filter-out wpad-mesh-wolfssl ,$(ANY_PROVIDERS)))
 endef
 
 Package/wpad-mesh-wolfssl/description = $(Package/wpad-mesh/description)
@@ -314,34 +273,23 @@ define Package/wpa-supplicant/Default
   URL:=http://hostap.epitest.fi/wpa_supplicant/
   DEPENDS:=$(DRV_DEPENDS)
   PROVIDES:=wpa-supplicant
+  CONFLICTS:=$(SUPPLICANT_PROVIDERS)
+  SUPPLICANT_PROVIDERS+=$(1)
 endef
 
 define Package/wpa-supplicant
-  $(Package/wpa-supplicant/Default)
+$(call Package/wpa-supplicant/Default,$(1))
   VARIANT:=supplicant-full-internal
-  CONFLICTS:=wpa-supplicant-mini
 endef
 
 define Package/wpa-supplicant-openssl
-  $(Package/wpa-supplicant/Default)
-  CONFLICTS:=$(filter-out wpa-supplicant-wolfssl ,\
-	     $(filter-out wpa-supplicant-openssl ,\
-	     $(filter-out wpa-supplicant-mesh-openssl ,\
-	     $(filter-out wpa-supplicant-mesh-wolfssl ,\
-	     $(SUPPLICANT_ONLY_PROVIDERS)\
-	     ))))
+$(call Package/wpa-supplicant/Default,$(1))
   VARIANT:=supplicant-full-openssl
   DEPENDS+=+libopenssl
 endef
 
 define Package/wpa-supplicant-wolfssl
-  $(Package/wpa-supplicant/Default)
-  CONFLICTS:=$(filter-out wpa-supplicant-wolfssl ,\
-	     $(filter-out wpa-supplicant-openssl ,\
-	     $(filter-out wpa-supplicant-mesh-openssl ,\
-	     $(filter-out wpa-supplicant-mesh-wolfssl ,\
-	     $(SUPPLICANT_ONLY_PROVIDERS)\
-	     ))))
+$(call Package/wpa-supplicant/Default,$(1))
   VARIANT:=supplicant-full-wolfssl
   DEPENDS+=+libwolfssl
 endef
@@ -351,57 +299,61 @@ define Package/wpa-supplicant/config
 endef
 
 define Package/wpa-supplicant-p2p
-  $(Package/wpa-supplicant/Default)
+$(call Package/wpa-supplicant/Default,$(1))
   TITLE:=WPA Supplicant (with Wi-Fi P2P support)
   DEPENDS+=@PACKAGE_kmod-cfg80211
-  CONFLICTS:=$(filter-out wpa-supplicant-openssl ,\
-	     $(filter-out wpa-supplicant-wolfssl ,\
-	     $(filter-out wpa-supplicant-p2p ,\
-	     $(filter-out wpa-supplicant-mesh-openssl ,\
-	     $(filter-out wpa-supplicant-mesh-wolfssl ,\
-	     $(SUPPLICANT_ONLY_PROVIDERS)\
-	     )))))
-  VARIANT:=supplicant-p2p-internal
 endef
 
 define Package/wpa-supplicant-mesh/Default
-  $(Package/wpa-supplicant/Default)
+$(call Package/wpa-supplicant/Default,$(1))
   TITLE:=WPA Supplicant (with 802.11s and SAE)
   DEPENDS+=@PACKAGE_kmod-cfg80211 @(!TARGET_uml||BROKEN)
   PROVIDES+=wpa-supplicant-mesh
 endef
 
 define Package/wpa-supplicant-mesh-openssl
-  $(Package/wpa-supplicant-mesh/Default)
+$(call Package/wpa-supplicant-mesh/Default,$(1))
   VARIANT:=supplicant-mesh-openssl
-  CONFLICTS:=$(filter-out wpa-supplicant-mesh-openssl ,$(SUPPLICANT_ONLY_PROVIDERS))
   DEPENDS+=+libopenssl
 endef
 
 define Package/wpa-supplicant-mesh-wolfssl
-  $(Package/wpa-supplicant-mesh/Default)
+$(call Package/wpa-supplicant-mesh/Default,$(1))
   VARIANT:=supplicant-mesh-wolfssl
-  CONFLICTS:=$(filter-out wpa-supplicant-mesh-openssl ,$(filter-out wpa-supplicant-mesh-wolfssl ,$(SUPPLICANT_ONLY_PROVIDERS)))
   DEPENDS+=+libwolfssl
 endef
 
 define Package/wpa-supplicant-mini
-  $(Package/wpa-supplicant/Default)
+$(call Package/wpa-supplicant/Default)
   TITLE:=WPA Supplicant (minimal version)
   VARIANT:=supplicant-mini
 endef
 
-define Package/wpa-cli
+
+define Package/hostapd-common
+  TITLE:=hostapd/wpa_supplicant common support files
   SECTION:=net
   CATEGORY:=Network
-  DEPENDS:=@$(subst $(space),||,$(foreach pkg,$(SUPPLICANT_PROVIDERS),PACKAGE_$(pkg)))
-  TITLE:=WPA Supplicant command line control utility
 endef
 
-define Package/hostapd-common
-  TITLE:=hostapd/wpa_supplicant common support files
+define Package/hostapd-utils
+  SECTION:=net
+  CATEGORY:=Network
+  TITLE:=IEEE 802.1x Authenticator (utils)
+  URL:=http://hostap.epitest.fi/
+  DEPENDS:=@$(subst $(space),||,$(foreach pkg,$(HOSTAPD_PROVIDERS),PACKAGE_$(pkg)))
+endef
+
+define Package/hostapd-utils/description
+ This package contains a command line utility to control the
+ IEEE 802.1x/WPA/EAP/RADIUS Authenticator.
+endef
+
+define Package/wpa-cli
   SECTION:=net
   CATEGORY:=Network
+  DEPENDS:=@$(subst $(space),||,$(foreach pkg,$(SUPPLICANT_PROVIDERS),PACKAGE_$(pkg)))
+  TITLE:=WPA Supplicant command line control utility
 endef
 
 define Package/eapol-test
-- 
2.7.4


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From foss at volatilesystems.org  Thu Jul 12 16:10:07 2018
From: foss at volatilesystems.org (Stijn Segers)
Date: Thu, 12 Jul 2018 22:10:07 +0200
Subject: [OpenWrt-Devel] [PATCH 2/2] [RFC] kernel: bump 4.14 to 4.14.54
 for 18.06
In-Reply-To: <d079a8bc-b99a-8484-7777-c34975c494a6@ncentric.com>
References: <20180710200832.3260-1-foss@volatilesystems.org>
 <20180710200832.3260-2-foss@volatilesystems.org>
 <46f3116e-f981-6bcf-37ab-481a1ee133b8@iki.fi>
 <DA92E917-40D8-411C-96EC-58352F1EA010@darbyshire-bryant.me.uk>
 <d079a8bc-b99a-8484-7777-c34975c494a6@ncentric.com>
Message-ID: <1531426207.2555.1@volatilesystems.org>


Op wo, 11 jul 2018 om 10:31 , schreef Koen Vandeputte 
<koen.vandeputte at ncentric.com>:
> 
> 
> On 2018-07-11 10:11, Kevin Darbyshire-Bryant wrote:
> >
> > Really not convinced I agree with the "patch 335 removes the whole 
> code block where that one line changed in upstream?.  Did a refresh 
> myself, several times, and patch 335 is a right confusing pain in the 
> backside.  I think the block in question should look like:
> >
> > @@ -4619,38 +4605,37 @@ static int nf_tables_dump_obj(struct sk_
> >   	rcu_read_lock();
> >   	cb->seq = net->nft.base_seq;
> >
> > -	list_for_each_entry_rcu(afi, &net->nft.af_info, list) {
> > -		if (family != NFPROTO_UNSPEC && family != afi->family)
> > +	list_for_each_entry_rcu(table, &net->nft.tables, list) {
> > +		if (family != NFPROTO_UNSPEC && family != table->afi->family)
> >   			continue;
> >
> > -		list_for_each_entry_rcu(table, &afi->tables, list) {
> > -			list_for_each_entry_rcu(obj, &table->objects, list) {
> > -				if (!nft_is_active(net, obj))
> > -					goto cont;
> > -				if (idx < s_idx)
> > -					goto cont;
> > -				if (idx > s_idx)
> > -					memset(&cb->args[1], 0,
> > -					       sizeof(cb->args) - sizeof(cb->args[0]));
> > -				if (filter && filter->table &&
> > -				    strcmp(filter->table, table->name))
> > -					goto cont;
> > -				if (filter &&
> > -				    filter->type != NFT_OBJECT_UNSPEC &&
> > -				    obj->ops->type->type != filter->type)
> > -					goto cont;
> > +		list_for_each_entry_rcu(obj, &table->objects, list) {
> > +			if (!nft_is_active(net, obj))
> > +				goto cont;
> > +			if (idx < s_idx)
> > +				goto cont;
> > +			if (idx > s_idx)
> > +				memset(&cb->args[1], 0,
> > +				       sizeof(cb->args) - sizeof(cb->args[0]));
> > +			if (filter && filter->table &&
> > +			    strcmp(filter->table, table->name))
> > +				goto cont;
> > +			if (filter &&
> > +			    filter->type != NFT_OBJECT_UNSPEC &&
> > +			    obj->ops->type->type != filter->type)
> > +				goto cont;
> >
> > -				if (nf_tables_fill_obj_info(skb, net, 
> NETLINK_CB(cb->skb).portid,
> > -							    cb->nlh->nlmsg_seq,
> > -							    NFT_MSG_NEWOBJ,
> > -							    NLM_F_MULTI | NLM_F_APPEND,
> > -							    afi->family, table, obj, reset) < 0)
> > -					goto done;
> > +			if (nf_tables_fill_obj_info(skb, net, 
> NETLINK_CB(cb->skb).portid,
> > +						    cb->nlh->nlmsg_seq,
> > +						    NFT_MSG_NEWOBJ,
> > +						    NLM_F_MULTI | NLM_F_APPEND,
> > +						    table->afi->family, table,
> > +						    obj, reset) < 0)
> > +				goto done;
> >
> > -				nl_dump_check_consistent(cb, nlmsg_hdr(skb));
> > -cont:
> > -				idx++;
> > -			}
> > +			nl_dump_check_consistent(cb, nlmsg_hdr(skb));
> > +  cont:
> > +			idx++;
> >   		}
> >   	}
> >   done:
> >
> > There are a couple of similar blocks, which have probably confused 
> me anyway.
> >
> > Overall this one patch in the refresh makes me distinctly 
> uncomfortable.
> >
> >
> +1 to get this cleaned up properly, but I would propose to do it
> separately and after the kernel bump patch.
> 
> Koen

Hi Koen,

Thanks, you beat me to it - thank you.

Stijn
> 
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From linus.walleij at linaro.org  Fri Jul 13 04:00:59 2018
From: linus.walleij at linaro.org (Linus Walleij)
Date: Fri, 13 Jul 2018 10:00:59 +0200
Subject: [OpenWrt-Devel] [PATCH 1/3 v3] ARM: dts: Add WAN ethernet port
 to the SQ201
In-Reply-To: <20180711200834.GE21430@lunn.ch>
References: <20180711194720.25266-1-linus.walleij@linaro.org>
 <20180711200834.GE21430@lunn.ch>
Message-ID: <CACRpkdbDbUFAWCi+jwvPg=x30x+PGTJqkXqCNxADrsjstJGjWg@mail.gmail.com>

On Wed, Jul 11, 2018 at 10:08 PM Andrew Lunn <andrew at lunn.ch> wrote:

> mdio0: mdio {
>
> This is not a phy. Which is odd, because v1->v2 should of fixed this...
>
> I'm wondering if this is the correct version of these patches....

Indeed I screwed up because of multiple branches and cutting
and pasting.

Sorry, I will fix it and resend.

Yours,
Linus Walleij

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From linus.walleij at linaro.org  Fri Jul 13 04:00:59 2018
From: linus.walleij at linaro.org (Linus Walleij)
Date: Fri, 13 Jul 2018 10:00:59 +0200
Subject: [OpenWrt-Devel] [PATCH 1/3 v3] ARM: dts: Add WAN ethernet port
 to the SQ201
In-Reply-To: <20180711200834.GE21430@lunn.ch>
References: <20180711194720.25266-1-linus.walleij@linaro.org>
 <20180711200834.GE21430@lunn.ch>
Message-ID: <CACRpkdbDbUFAWCi+jwvPg=x30x+PGTJqkXqCNxADrsjstJGjWg@mail.gmail.com>

On Wed, Jul 11, 2018 at 10:08 PM Andrew Lunn <andrew at lunn.ch> wrote:

> mdio0: mdio {
>
> This is not a phy. Which is odd, because v1->v2 should of fixed this...
>
> I'm wondering if this is the correct version of these patches....

Indeed I screwed up because of multiple branches and cutting
and pasting.

Sorry, I will fix it and resend.

Yours,
Linus Walleij

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From yshvedov at wimarksystems.com  Fri Jul 13 04:57:37 2018
From: yshvedov at wimarksystems.com (Yury Shvedov)
Date: Fri, 13 Jul 2018 11:57:37 +0300
Subject: [OpenWrt-Devel] [PATCH 1/2] add htmodelist for scan results
Message-ID: <20180713085738.25259-1-yshvedov@wimarksystems.com>

The knowledge about HT and VHT modes could be useful for user experience.
So grab it via nl80211 and make it available in both C and LUA APIs,
and show htmodelist on CLI scan results.
---
 include/iwinfo.h |  1 +
 iwinfo_cli.c     | 13 ++++++--
 iwinfo_lua.c     | 16 +++++++++-
 iwinfo_nl80211.c | 77 ++++++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 104 insertions(+), 3 deletions(-)

diff --git a/include/iwinfo.h b/include/iwinfo.h
index 929f697..c3c25ff 100644
--- a/include/iwinfo.h
+++ b/include/iwinfo.h
@@ -154,6 +154,7 @@ struct iwinfo_scanlist_entry {
 	uint8_t signal;
 	uint8_t quality;
 	uint8_t quality_max;
+    int htmodelist;
 	struct iwinfo_crypto_entry crypto;
 };
 
diff --git a/iwinfo_cli.c b/iwinfo_cli.c
index 49c9035..2d58020 100644
--- a/iwinfo_cli.c
+++ b/iwinfo_cli.c
@@ -572,7 +572,7 @@ static void print_info(const struct iwinfo_ops *iw, const char *ifname)
 
 static void print_scanlist(const struct iwinfo_ops *iw, const char *ifname)
 {
-	int i, x, len;
+	int i, h, x, len;
 	char buf[IWINFO_BUFSIZE];
 	struct iwinfo_scanlist_entry *e;
 
@@ -603,8 +603,17 @@ static void print_scanlist(const struct iwinfo_ops *iw, const char *ifname)
 			format_signal(e->signal - 0x100),
 			format_quality(e->quality),
 			format_quality_max(e->quality_max));
-		printf("          Encryption: %s\n\n",
+		printf("          Encryption: %s\n",
 			format_encryption(&e->crypto));
+		if (e->htmodelist)
+		{
+			printf("          HT Capabilities: ");
+			for (h = 0; h < ARRAY_SIZE(IWINFO_HTMODE_NAMES); h++)
+				if (e->htmodelist & (1 << h))
+					printf("%s ", IWINFO_HTMODE_NAMES[h]);
+			printf ("\n");
+		}
+		printf ("\n");
 	}
 }
 
diff --git a/iwinfo_lua.c b/iwinfo_lua.c
index eebab8e..01581a3 100644
--- a/iwinfo_lua.c
+++ b/iwinfo_lua.c
@@ -378,7 +378,7 @@ static int iwinfo_L_txpwrlist(lua_State *L, int (*func)(const char *, char *, in
 /* Wrapper for scan list */
 static int iwinfo_L_scanlist(lua_State *L, int (*func)(const char *, char *, int *))
 {
-	int i, x, len = 0;
+	int i, x, h, len = 0;
 	char rv[IWINFO_BUFSIZE];
 	char macstr[18];
 	const char *ifname = luaL_checkstring(L, 1);
@@ -432,6 +432,20 @@ static int iwinfo_L_scanlist(lua_State *L, int (*func)(const char *, char *, int
 			iwinfo_L_cryptotable(L, &e->crypto);
 			lua_setfield(L, -2, "encryption");
 
+			/* HT Modes */
+			if (e->htmodelist)
+			{
+				lua_newtable(L);
+				for (h = 0; h < ARRAY_SIZE(IWINFO_HTMODE_NAMES); h++)
+				{
+					lua_pushboolean(L, e->htmodelist & (1 << h));
+					lua_setfield(L, -2, IWINFO_HTMODE_NAMES[h]);
+				}
+			}
+			else
+				lua_pushnil(L);
+			lua_setfield(L, -2, "htmodelist");
+
 			lua_rawseti(L, -2, x);
 		}
 	}
diff --git a/iwinfo_nl80211.c b/iwinfo_nl80211.c
index ecd2d6a..542ac7d 100644
--- a/iwinfo_nl80211.c
+++ b/iwinfo_nl80211.c
@@ -1980,6 +1980,71 @@ struct nl80211_scanlist {
 	int len;
 };
 
+static void nl80211_parse_ht_capa(struct iwinfo_scanlist_entry *e,
+								  unsigned char *ie,
+								  int len)
+{
+	int capa;
+	if (len < 2)
+		return;
+	e->htmodelist |= IWINFO_HTMODE_HT20;
+	capa = ie[0] | (ie[8] << 8);
+	if (capa & (1 << 1))
+	{
+		e->htmodelist |= IWINFO_HTMODE_HT40;
+		if (e->htmodelist & IWINFO_HTMODE_VHT20)
+			e->htmodelist |= IWINFO_HTMODE_VHT40;
+	}
+}
+static void nl80211_parse_vht_capa(struct iwinfo_scanlist_entry *e,
+								   unsigned char *ie,
+								   int len)
+{
+	int capa;
+	if (len < 4)
+		return;
+	capa = ie[0] | (ie[1] << 8) | (ie[2] << 16) | (ie[3] << 24);
+
+	e->htmodelist |= IWINFO_HTMODE_VHT20;
+	if (e->htmodelist & IWINFO_HTMODE_HT40)
+		e->htmodelist |= IWINFO_HTMODE_VHT40;
+
+	switch ((capa >> 2) & 3) {
+	/*case 0: neither 160 nor 80+80 */
+	case 1:
+		e->htmodelist |= IWINFO_HTMODE_VHT160;
+		break;
+	case 2:
+		e->htmodelist |= IWINFO_HTMODE_VHT80_80;
+		break;
+	}
+}
+static void nl80211_parse_vht_oper(struct iwinfo_scanlist_entry *e,
+								   unsigned char *ie,
+								   int len)
+{
+	int chanwidth;
+	if (len < 1)
+		return;
+	chanwidth = ie[0];
+
+	e->htmodelist |= IWINFO_HTMODE_VHT20;
+	if (e->htmodelist & IWINFO_HTMODE_HT40)
+		e->htmodelist |= IWINFO_HTMODE_VHT40;
+
+	switch (chanwidth) {
+	/*case 0: 20 or 40 MHz */
+	case 1:
+		e->htmodelist |= IWINFO_HTMODE_VHT80;
+		break;
+	case 2:
+		e->htmodelist |= IWINFO_HTMODE_VHT160;
+		break;
+	case 3:
+		e->htmodelist |= IWINFO_HTMODE_VHT80_80;
+		break;
+	}
+}
 
 static void nl80211_get_scanlist_ie(struct nlattr **bss,
                                     struct iwinfo_scanlist_entry *e)
@@ -1999,11 +2064,23 @@ static void nl80211_get_scanlist_ie(struct nlattr **bss,
 			e->ssid[len] = 0;
 			break;
 
+		case 45: /* HT Capabilities */
+			nl80211_parse_ht_capa(e, ie + 2, ie[1]);
+			break;
+
 		case 48: /* RSN */
 			iwinfo_parse_rsn(&e->crypto, ie + 2, ie[1],
 			                 IWINFO_CIPHER_CCMP, IWINFO_KMGMT_8021x);
 			break;
 
+		case 191: /* VHT Capabilities */
+			nl80211_parse_vht_capa(e, ie + 2, ie[1]);
+			break;
+
+		case 192: /* VHT Operation */
+			nl80211_parse_vht_oper(e, ie + 2, ie[1]);
+			break;
+
 		case 221: /* Vendor */
 			if (ie[1] >= 4 && !memcmp(ie + 2, ms_oui, 3) && ie[5] == 1)
 				iwinfo_parse_rsn(&e->crypto, ie + 6, ie[1] - 4,
-- 
2.17.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From yshvedov at wimarksystems.com  Fri Jul 13 04:57:38 2018
From: yshvedov at wimarksystems.com (Yury Shvedov)
Date: Fri, 13 Jul 2018 11:57:38 +0300
Subject: [OpenWrt-Devel] [PATCH 2/2] add channel information for scan results
In-Reply-To: <20180713085738.25259-1-yshvedov@wimarksystems.com>
References: <20180713085738.25259-1-yshvedov@wimarksystems.com>
Message-ID: <20180713085738.25259-2-yshvedov@wimarksystems.com>

Besides channel number the secondary channel for HT40 and center idx0
and idx1 gives full understanding about real channel position and width
on the spectra. So grab it via nl80211 and make it available in both C
and LUA APIs, and show detailed channel information on CLI scan results.
---
 include/iwinfo.h | 21 ++++++++++++++++++++-
 iwinfo_cli.c     | 10 ++++++++++
 iwinfo_lua.c     | 11 +++++++++++
 iwinfo_nl80211.c | 32 ++++++++++++++++++++++++++++++--
 4 files changed, 71 insertions(+), 3 deletions(-)

diff --git a/include/iwinfo.h b/include/iwinfo.h
index c3c25ff..b1b39a1 100644
--- a/include/iwinfo.h
+++ b/include/iwinfo.h
@@ -145,6 +145,24 @@ struct iwinfo_crypto_entry {
 	uint8_t auth_suites;
 	uint8_t auth_algs;
 };
+struct iwinfo_channel_info_entry {
+	/**
+	 * sec_channel_offset - Secondary channel offset for HT40
+	 *
+	 * 0 = HT40 disabled,
+	 * -1 = HT40 enabled, secondary channel below primary,
+	 * 1 = HT40 enabled, secondary channel above primary
+	 */
+	int sec_channel_offset;
+	/**
+	 * Center channel for VHT80
+	 */
+	int center_idx0;
+	/**
+	 * Center channel for VHT160
+	 */
+	int center_idx1;
+};
 
 struct iwinfo_scanlist_entry {
 	uint8_t mac[6];
@@ -154,8 +172,9 @@ struct iwinfo_scanlist_entry {
 	uint8_t signal;
 	uint8_t quality;
 	uint8_t quality_max;
-    int htmodelist;
+	int htmodelist;
 	struct iwinfo_crypto_entry crypto;
+	struct iwinfo_channel_info_entry channel_info;
 };
 
 struct iwinfo_country_entry {
diff --git a/iwinfo_cli.c b/iwinfo_cli.c
index 2d58020..0d899e0 100644
--- a/iwinfo_cli.c
+++ b/iwinfo_cli.c
@@ -612,6 +612,16 @@ static void print_scanlist(const struct iwinfo_ops *iw, const char *ifname)
 				if (e->htmodelist & (1 << h))
 					printf("%s ", IWINFO_HTMODE_NAMES[h]);
 			printf ("\n");
+			if (e->channel_info.sec_channel_offset)
+				printf ("              HT secondary channel is %s\n",
+						e->channel_info.sec_channel_offset < 0 ? "below" :
+							"above");
+			if (e->channel_info.center_idx0)
+				printf ("              VHT Center IDX0: %d\n",
+						e->channel_info.center_idx0);
+			if (e->channel_info.center_idx1)
+				printf ("              VHT Center IDX1: %d\n",
+						e->channel_info.center_idx1);
 		}
 		printf ("\n");
 	}
diff --git a/iwinfo_lua.c b/iwinfo_lua.c
index 01581a3..bd7f0d3 100644
--- a/iwinfo_lua.c
+++ b/iwinfo_lua.c
@@ -446,6 +446,17 @@ static int iwinfo_L_scanlist(lua_State *L, int (*func)(const char *, char *, int
 				lua_pushnil(L);
 			lua_setfield(L, -2, "htmodelist");
 
+			lua_pushinteger(L, e->channel_info.sec_channel_offset);
+			lua_setfield(L, -2, "sec_channel_offset");
+			if (e->channel_info.center_idx0) {
+				lua_pushinteger(L, e->channel_info.center_idx0);
+				lua_setfield(L, -2, "center_idx0");
+			}
+			if (e->channel_info.center_idx1) {
+				lua_pushinteger(L, e->channel_info.center_idx1);
+				lua_setfield(L, -2, "center_idx1");
+			}
+
 			lua_rawseti(L, -2, x);
 		}
 	}
diff --git a/iwinfo_nl80211.c b/iwinfo_nl80211.c
index 542ac7d..fb137b2 100644
--- a/iwinfo_nl80211.c
+++ b/iwinfo_nl80211.c
@@ -1996,6 +1996,27 @@ static void nl80211_parse_ht_capa(struct iwinfo_scanlist_entry *e,
 			e->htmodelist |= IWINFO_HTMODE_VHT40;
 	}
 }
+static void nl80211_parse_ht_oper(struct iwinfo_scanlist_entry *e,
+								  unsigned char *ie,
+								  int len)
+{
+	uint8_t oper_info;
+
+	if (len < 6)
+		return;
+	oper_info = ie[1];
+	switch (oper_info & 3) {
+	case 0:
+		e->channel_info.sec_channel_offset = 0;
+		break;
+	case 1:
+		e->channel_info.sec_channel_offset = 1;
+		break;
+	case 3:
+		e->channel_info.sec_channel_offset = -1;
+		break;
+	}
+}
 static void nl80211_parse_vht_capa(struct iwinfo_scanlist_entry *e,
 								   unsigned char *ie,
 								   int len)
@@ -2024,7 +2045,7 @@ static void nl80211_parse_vht_oper(struct iwinfo_scanlist_entry *e,
 								   int len)
 {
 	int chanwidth;
-	if (len < 1)
+	if (len < 3)
 		return;
 	chanwidth = ie[0];
 
@@ -2036,6 +2057,7 @@ static void nl80211_parse_vht_oper(struct iwinfo_scanlist_entry *e,
 	/*case 0: 20 or 40 MHz */
 	case 1:
 		e->htmodelist |= IWINFO_HTMODE_VHT80;
+		e->channel_info.center_idx0 = ie[1];
 		break;
 	case 2:
 		e->htmodelist |= IWINFO_HTMODE_VHT160;
@@ -2044,10 +2066,12 @@ static void nl80211_parse_vht_oper(struct iwinfo_scanlist_entry *e,
 		e->htmodelist |= IWINFO_HTMODE_VHT80_80;
 		break;
 	}
+	e->channel_info.center_idx0 = ie[1];
+	e->channel_info.center_idx1 = ie[2];
 }
 
 static void nl80211_get_scanlist_ie(struct nlattr **bss,
-                                    struct iwinfo_scanlist_entry *e)
+									struct iwinfo_scanlist_entry *e)
 {
 	int ielen = nla_len(bss[NL80211_BSS_INFORMATION_ELEMENTS]);
 	unsigned char *ie = nla_data(bss[NL80211_BSS_INFORMATION_ELEMENTS]);
@@ -2073,6 +2097,10 @@ static void nl80211_get_scanlist_ie(struct nlattr **bss,
 			                 IWINFO_CIPHER_CCMP, IWINFO_KMGMT_8021x);
 			break;
 
+		case 61: /* HT Operation */
+			nl80211_parse_ht_oper(e, ie + 2, ie[1]);
+			break;
+
 		case 191: /* VHT Capabilities */
 			nl80211_parse_vht_capa(e, ie + 2, ie[1]);
 			break;
-- 
2.17.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From yshvedov at wimarksystems.com  Fri Jul 13 05:03:22 2018
From: yshvedov at wimarksystems.com (Yury Shvedov)
Date: Fri, 13 Jul 2018 12:03:22 +0300
Subject: [OpenWrt-Devel] [PATCH 2/2] add channel information for scan
 results
In-Reply-To: <20180713085738.25259-2-yshvedov@wimarksystems.com>
References: <20180713085738.25259-1-yshvedov@wimarksystems.com>
 <20180713085738.25259-2-yshvedov@wimarksystems.com>
Message-ID: <c3e8b1e8-f444-c413-35b3-7e9f5f7810a2@wimarksystems.com>

Hi!

This patches are for iwinfo repo. I think I sent them to the wrong 
place. Please, say me so.

This patches add extra information to scan list. I've made them for my 
own usage. But they may be useful for someone.


On 07/13/2018 11:57 AM, Yury Shvedov wrote:
> Besides channel number the secondary channel for HT40 and center idx0
> and idx1 gives full understanding about real channel position and width
> on the spectra. So grab it via nl80211 and make it available in both C
> and LUA APIs, and show detailed channel information on CLI scan results.
> ---
>   include/iwinfo.h | 21 ++++++++++++++++++++-
>   iwinfo_cli.c     | 10 ++++++++++
>   iwinfo_lua.c     | 11 +++++++++++
>   iwinfo_nl80211.c | 32 ++++++++++++++++++++++++++++++--
>   4 files changed, 71 insertions(+), 3 deletions(-)
>
> diff --git a/include/iwinfo.h b/include/iwinfo.h
> index c3c25ff..b1b39a1 100644
> --- a/include/iwinfo.h
> +++ b/include/iwinfo.h
> @@ -145,6 +145,24 @@ struct iwinfo_crypto_entry {
>   	uint8_t auth_suites;
>   	uint8_t auth_algs;
>   };
> +struct iwinfo_channel_info_entry {
> +	/**
> +	 * sec_channel_offset - Secondary channel offset for HT40
> +	 *
> +	 * 0 = HT40 disabled,
> +	 * -1 = HT40 enabled, secondary channel below primary,
> +	 * 1 = HT40 enabled, secondary channel above primary
> +	 */
> +	int sec_channel_offset;
> +	/**
> +	 * Center channel for VHT80
> +	 */
> +	int center_idx0;
> +	/**
> +	 * Center channel for VHT160
> +	 */
> +	int center_idx1;
> +};
>   
>   struct iwinfo_scanlist_entry {
>   	uint8_t mac[6];
> @@ -154,8 +172,9 @@ struct iwinfo_scanlist_entry {
>   	uint8_t signal;
>   	uint8_t quality;
>   	uint8_t quality_max;
> -    int htmodelist;
> +	int htmodelist;
>   	struct iwinfo_crypto_entry crypto;
> +	struct iwinfo_channel_info_entry channel_info;
>   };
>   
>   struct iwinfo_country_entry {
> diff --git a/iwinfo_cli.c b/iwinfo_cli.c
> index 2d58020..0d899e0 100644
> --- a/iwinfo_cli.c
> +++ b/iwinfo_cli.c
> @@ -612,6 +612,16 @@ static void print_scanlist(const struct iwinfo_ops *iw, const char *ifname)
>   				if (e->htmodelist & (1 << h))
>   					printf("%s ", IWINFO_HTMODE_NAMES[h]);
>   			printf ("\n");
> +			if (e->channel_info.sec_channel_offset)
> +				printf ("              HT secondary channel is %s\n",
> +						e->channel_info.sec_channel_offset < 0 ? "below" :
> +							"above");
> +			if (e->channel_info.center_idx0)
> +				printf ("              VHT Center IDX0: %d\n",
> +						e->channel_info.center_idx0);
> +			if (e->channel_info.center_idx1)
> +				printf ("              VHT Center IDX1: %d\n",
> +						e->channel_info.center_idx1);
>   		}
>   		printf ("\n");
>   	}
> diff --git a/iwinfo_lua.c b/iwinfo_lua.c
> index 01581a3..bd7f0d3 100644
> --- a/iwinfo_lua.c
> +++ b/iwinfo_lua.c
> @@ -446,6 +446,17 @@ static int iwinfo_L_scanlist(lua_State *L, int (*func)(const char *, char *, int
>   				lua_pushnil(L);
>   			lua_setfield(L, -2, "htmodelist");
>   
> +			lua_pushinteger(L, e->channel_info.sec_channel_offset);
> +			lua_setfield(L, -2, "sec_channel_offset");
> +			if (e->channel_info.center_idx0) {
> +				lua_pushinteger(L, e->channel_info.center_idx0);
> +				lua_setfield(L, -2, "center_idx0");
> +			}
> +			if (e->channel_info.center_idx1) {
> +				lua_pushinteger(L, e->channel_info.center_idx1);
> +				lua_setfield(L, -2, "center_idx1");
> +			}
> +
>   			lua_rawseti(L, -2, x);
>   		}
>   	}
> diff --git a/iwinfo_nl80211.c b/iwinfo_nl80211.c
> index 542ac7d..fb137b2 100644
> --- a/iwinfo_nl80211.c
> +++ b/iwinfo_nl80211.c
> @@ -1996,6 +1996,27 @@ static void nl80211_parse_ht_capa(struct iwinfo_scanlist_entry *e,
>   			e->htmodelist |= IWINFO_HTMODE_VHT40;
>   	}
>   }
> +static void nl80211_parse_ht_oper(struct iwinfo_scanlist_entry *e,
> +								  unsigned char *ie,
> +								  int len)
> +{
> +	uint8_t oper_info;
> +
> +	if (len < 6)
> +		return;
> +	oper_info = ie[1];
> +	switch (oper_info & 3) {
> +	case 0:
> +		e->channel_info.sec_channel_offset = 0;
> +		break;
> +	case 1:
> +		e->channel_info.sec_channel_offset = 1;
> +		break;
> +	case 3:
> +		e->channel_info.sec_channel_offset = -1;
> +		break;
> +	}
> +}
>   static void nl80211_parse_vht_capa(struct iwinfo_scanlist_entry *e,
>   								   unsigned char *ie,
>   								   int len)
> @@ -2024,7 +2045,7 @@ static void nl80211_parse_vht_oper(struct iwinfo_scanlist_entry *e,
>   								   int len)
>   {
>   	int chanwidth;
> -	if (len < 1)
> +	if (len < 3)
>   		return;
>   	chanwidth = ie[0];
>   
> @@ -2036,6 +2057,7 @@ static void nl80211_parse_vht_oper(struct iwinfo_scanlist_entry *e,
>   	/*case 0: 20 or 40 MHz */
>   	case 1:
>   		e->htmodelist |= IWINFO_HTMODE_VHT80;
> +		e->channel_info.center_idx0 = ie[1];
>   		break;
>   	case 2:
>   		e->htmodelist |= IWINFO_HTMODE_VHT160;
> @@ -2044,10 +2066,12 @@ static void nl80211_parse_vht_oper(struct iwinfo_scanlist_entry *e,
>   		e->htmodelist |= IWINFO_HTMODE_VHT80_80;
>   		break;
>   	}
> +	e->channel_info.center_idx0 = ie[1];
> +	e->channel_info.center_idx1 = ie[2];
>   }
>   
>   static void nl80211_get_scanlist_ie(struct nlattr **bss,
> -                                    struct iwinfo_scanlist_entry *e)
> +									struct iwinfo_scanlist_entry *e)
>   {
>   	int ielen = nla_len(bss[NL80211_BSS_INFORMATION_ELEMENTS]);
>   	unsigned char *ie = nla_data(bss[NL80211_BSS_INFORMATION_ELEMENTS]);
> @@ -2073,6 +2097,10 @@ static void nl80211_get_scanlist_ie(struct nlattr **bss,
>   			                 IWINFO_CIPHER_CCMP, IWINFO_KMGMT_8021x);
>   			break;
>   
> +		case 61: /* HT Operation */
> +			nl80211_parse_ht_oper(e, ie + 2, ie[1]);
> +			break;
> +
>   		case 191: /* VHT Capabilities */
>   			nl80211_parse_vht_capa(e, ie + 2, ie[1]);
>   			break;

-- 
? ?????????,
???? ??????
WiMark Systems


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From zajec5 at gmail.com  Fri Jul 13 05:54:14 2018
From: zajec5 at gmail.com (=?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?=)
Date: Fri, 13 Jul 2018 11:54:14 +0200
Subject: [OpenWrt-Devel] OpenWRT mtd tooling vs mtd-utils
In-Reply-To: <351822581.163754.1526642132964.JavaMail.zimbra@sigma-star.at>
References: <CACwWb3DnyxqTrQF-5UpuU+rUDRGrS2XM8+yQEf45miCbJ5nrpw@mail.gmail.com>
 <967434303.163429.1526634595483.JavaMail.zimbra@sigma-star.at>
 <CACwWb3AVnJOjNW2DE6jn8CR3SRFECP=2mgr-n_rQ-4fNAOd11A@mail.gmail.com>
 <1397936863.163523.1526636992502.JavaMail.zimbra@sigma-star.at>
 <73497de5-6ea1-2662-2cc1-c5047e29d865@mein.io>
 <351822581.163754.1526642132964.JavaMail.zimbra@sigma-star.at>
Message-ID: <CACna6ryBnAxUUVKkCbkbDgCOxPzvE0=AB+w14aPrAyF=jojn4w@mail.gmail.com>

On Fri, 18 May 2018 at 13:16, David Oberhollenzer <goliath at sigma-star.at> wrote:
> Thanks for the clarification!
>
> Just out of curiosity, is there a specific reason why OpenWRT uses its
> own formatting utility here instead of using the tools from mtd-utils?

It's probably because it includes some features that upstream
developers/maintaners would probably find too hacky.

In OpenWrt's mtd there is support for some magic deadc0de marker,
appending JFFS2 data, handling vendor specific formats like TRX and
Seama.

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From dedeckeh at gmail.com  Fri Jul 13 06:54:25 2018
From: dedeckeh at gmail.com (Hans Dedecker)
Date: Fri, 13 Jul 2018 12:54:25 +0200
Subject: [OpenWrt-Devel] [PATCH] odhcpd: allow specifying lease trigger
 mode
In-Reply-To: <mailman.6910.1530045246.25356.openwrt-devel@lists.openwrt.org>
References: <mailman.6910.1530045246.25356.openwrt-devel@lists.openwrt.org>
Message-ID: <CAJLcKsHfAea_va3tCSWShTW=EY768EmiDTfWuxbRba_Bm604iw@mail.gmail.com>

On Tue, Jun 26, 2018 at 10:34 PM Micha? K?pie? via openwrt-devel
<openwrt-devel at lists.openwrt.org> wrote:
>
> 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.
>
>
> ---------- Forwarded message ----------
> From: "Micha? K?pie?" <lede at kempniu.pl>
> To: openwrt-devel at lists.openwrt.org
> Cc:
> Bcc:
> Date: Tue, 26 Jun 2018 22:33:40 +0200
> Subject: [PATCH] odhcpd: allow specifying lease trigger mode
> odhcpd only calls the lease trigger script when a lease with an
> associated hostname is changed.  Enabling the lease trigger script to
> also be called when a lease without an associated hostname is changed
> allows for greater flexibility.
>
> Add a new global odhcpd configuration parameter, "leasetrigger_mode",
> with a default value of 0 which retains current behavior.  Setting the
> parameter to 1 causes the lease trigger script to instead be called
> every time any lease is changed, no matter whether it is associated with
> a hostname or not.
Hi,

What usecase do you want to cover by calling the lease script every time ?

Hans
>
> Signed-off-by: Micha? K?pie? <lede at kempniu.pl>
> ---
> The configuration parameter added by this patch could obviously be a
> boolean, but it occurred to me that if the flexibility of the lease
> trigger script is further improved in the future [1], more lease trigger
> modes may be added (e.g. upon every single DHCP event, even if one does
> not cause any lease to be modified).
>
> [1] see e.g. https://bugs.openwrt.org/index.php?do=details&task_id=401
>
>  README          | 18 ++++++++++--------
>  src/config.c    | 10 ++++++++--
>  src/dhcpv6-ia.c |  6 ++++++
>  src/odhcpd.h    |  1 +
>  4 files changed, 25 insertions(+), 10 deletions(-)
>
> diff --git a/README b/README
> index 0c562e6..a43f2e7 100644
> --- a/README
> +++ b/README
> @@ -57,14 +57,16 @@ and may also receive information from ubus
>
>  Section of type odhcpd
>
> -Option         Type    Default                 Description
> -legacy         bool    0                       Enable DHCPv4 if start but
> -                                               no dhcpv4 option set
> -maindhcp       bool    0                       Use odhcpd as the main DHCPv4
> -                                               service
> -leasefile      string                          DHCP/v6 lease/hostfile
> -leasetrigger   string                          Lease trigger script
> -loglevel       integer 6                       Syslog level priority (0-7)
> +Option                 Type    Default                 Description
> +legacy                 bool    0                       Enable DHCPv4 if start but
> +                                                       no dhcpv4 option set
> +maindhcp               bool    0                       Use odhcpd as the main DHCPv4
> +                                                       service
> +leasefile              string                          DHCP/v6 lease/hostfile
> +leasetrigger           string                          Lease trigger script
> +leasetrigger_mode      integer 0                       Lease trigger mode
> +                       0: lease with hostname changed, 1: any lease changed
> +loglevel               integer 6                       Syslog level priority (0-7)
>
>
>  Sections of type dhcp (configure DHCP / DHCPv6 / RA / NDP service)
> diff --git a/src/config.c b/src/config.c
> index 118349a..78488b7 100644
> --- a/src/config.c
> +++ b/src/config.c
> @@ -20,8 +20,8 @@ static int reload_pipe[2];
>  struct list_head leases = LIST_HEAD_INIT(leases);
>  struct list_head interfaces = LIST_HEAD_INIT(interfaces);
>  struct config config = {.legacy = false, .main_dhcpv4 = false,
> -                       .dhcp_cb = NULL, .dhcp_statefile = NULL,
> -                       .log_level = LOG_INFO};
> +                       .dhcp_cb = NULL, .dhcp_cb_mode = 0,
> +                       .dhcp_statefile = NULL, .log_level = LOG_INFO};
>
>  enum {
>         IFACE_ATTR_INTERFACE,
> @@ -149,6 +149,7 @@ enum {
>         ODHCPD_ATTR_MAINDHCP,
>         ODHCPD_ATTR_LEASEFILE,
>         ODHCPD_ATTR_LEASETRIGGER,
> +       ODHCPD_ATTR_LEASETRIGGER_MODE,
>         ODHCPD_ATTR_LOGLEVEL,
>         ODHCPD_ATTR_MAX
>  };
> @@ -158,6 +159,7 @@ static const struct blobmsg_policy odhcpd_attrs[LEASE_ATTR_MAX] = {
>         [ODHCPD_ATTR_MAINDHCP] = { .name = "maindhcp", .type = BLOBMSG_TYPE_BOOL },
>         [ODHCPD_ATTR_LEASEFILE] = { .name = "leasefile", .type = BLOBMSG_TYPE_STRING },
>         [ODHCPD_ATTR_LEASETRIGGER] = { .name = "leasetrigger", .type = BLOBMSG_TYPE_STRING },
> +       [ODHCPD_ATTR_LEASETRIGGER_MODE] = { .name = "leasetrigger_mode", .type = BLOBMSG_TYPE_INT32 },
>         [ODHCPD_ATTR_LOGLEVEL] = { .name = "loglevel", .type = BLOBMSG_TYPE_INT32 },
>  };
>
> @@ -290,6 +292,10 @@ static void set_config(struct uci_section *s)
>                 config.dhcp_cb = strdup(blobmsg_get_string(c));
>         }
>
> +       if ((c = tb[ODHCPD_ATTR_LEASETRIGGER_MODE])) {
> +               config.dhcp_cb_mode = blobmsg_get_u32(c);
> +       }
> +
>         if ((c = tb[ODHCPD_ATTR_LOGLEVEL])) {
>                 int log_level = (blobmsg_get_u32(c) & LOG_PRIMASK);
>
> diff --git a/src/dhcpv6-ia.c b/src/dhcpv6-ia.c
> index 4ee6dd2..e51be79 100644
> --- a/src/dhcpv6-ia.c
> +++ b/src/dhcpv6-ia.c
> @@ -408,6 +408,9 @@ void dhcpv6_write_statefile(void)
>
>                                         ctxt.buf[ctxt.buf_idx - 1] = '\n';
>                                         fwrite(ctxt.buf, 1, ctxt.buf_idx, ctxt.fp);
> +                                       if (config.dhcp_cb_mode > 0) {
> +                                               md5_hash(ctxt.buf, ctxt.buf_idx, &ctxt.md5);
> +                                       }
>                                 }
>                         }
>
> @@ -453,6 +456,9 @@ void dhcpv6_write_statefile(void)
>                                                                         "%s/32 ", ipbuf);
>                                         ctxt.buf[ctxt.buf_idx - 1] = '\n';
>                                         fwrite(ctxt.buf, 1, ctxt.buf_idx, ctxt.fp);
> +                                       if (config.dhcp_cb_mode > 0) {
> +                                               md5_hash(ctxt.buf, ctxt.buf_idx, &ctxt.md5);
> +                                       }
>                                 }
>                         }
>                 }
> diff --git a/src/odhcpd.h b/src/odhcpd.h
> index 91fdcbf..0f23667 100644
> --- a/src/odhcpd.h
> +++ b/src/odhcpd.h
> @@ -138,6 +138,7 @@ struct config {
>         bool legacy;
>         bool main_dhcpv4;
>         char *dhcp_cb;
> +       int dhcp_cb_mode;
>         char *dhcp_statefile;
>         int log_level;
>  } config;
> --
> 2.18.0
>
>
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/listinfo/openwrt-devel

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From jwh at corp.connectbit.io  Fri Jul 13 11:44:39 2018
From: jwh at corp.connectbit.io (Joe Holden)
Date: Fri, 13 Jul 2018 16:44:39 +0100
Subject: [OpenWrt-Devel] [PATCH firewall3] defaults: use a generic
 check_kmod() function
Message-ID: <20180713154439.17582-1-jwh@corp.connectbit.io>

From: Joe Holden <jwh at zorins.co.uk>

Rather than having functions for check_offloading() et al, replace it with a
generic function.

Signed-off-by: Joe Holden <jwh at zorins.co.uk>
---
 defaults.c | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/defaults.c b/defaults.c
index 11fbf0d..46c2a45 100644
--- a/defaults.c
+++ b/defaults.c
@@ -83,14 +83,17 @@ check_policy(struct uci_element *e, enum fw3_flag *pol, const char *name)
 }
 
 static void
-check_offloading(struct uci_element *e, bool *offloading)
+check_kmod(struct uci_element *e, bool *module, const char *name)
 {
 	FILE *f;
+	char buf[128];
 
-	if (!*offloading)
+	if (!*module)
 		return;
 
-	f = fopen("/sys/module/xt_FLOWOFFLOAD/refcnt", "r");
+	snprintf(buf, sizeof(buf), "/sys/module/%s/refcnt", name);
+
+	f = fopen(buf, "r");
 
 	if (f)
 	{
@@ -98,8 +101,8 @@ check_offloading(struct uci_element *e, bool *offloading)
 		return;
 	}
 
-	warn_elem(e, "enables offloading but missing kernel support, disabling");
-	*offloading = false;
+	warn_elem(e, sprintf("requires module %s but missing kernel support, disabling", name));
+	*module = false;
 }
 
 void
@@ -138,7 +141,7 @@ fw3_load_defaults(struct fw3_state *state, struct uci_package *p)
 		check_policy(e, &defs->policy_output, "output");
 		check_policy(e, &defs->policy_forward, "forward");
 
-		check_offloading(e, &defs->flow_offloading);
+		check_kmod(e, &defs->flow_offloading, "xt_FLOWOFFLOAD");
 	}
 }
 
-- 
2.18.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From linus.walleij at linaro.org  Fri Jul 13 17:19:34 2018
From: linus.walleij at linaro.org (Linus Walleij)
Date: Fri, 13 Jul 2018 23:19:34 +0200
Subject: [OpenWrt-Devel] [PATCH 1/3 v4] ARM: dts: Add WAN ethernet port to
 the SQ201
Message-ID: <20180713211936.31820-1-linus.walleij@linaro.org>

This sets up the ethernet interface and PHY for the
WAN ethernet port which uses a Marvell PHY.

Signed-off-by: Linus Walleij <linus.walleij at linaro.org>
---
ChangeLog v3->v4:
- Revert the lost changes in v3 (sorrty for the mistakes).
ChangeLog v2->v3:
- No changes, just resending.
ChangeLog v1->v2:
- Rename wrongly named "ethernet-phy" to "mdio"
- Drop device_type from the ethernet phy
---
 arch/arm/boot/dts/gemini-sq201.dts | 86 +++++++++++++++++++++++++++++-
 1 file changed, 85 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/gemini-sq201.dts b/arch/arm/boot/dts/gemini-sq201.dts
index 7658e212e6d2..a57a03e2953b 100644
--- a/arch/arm/boot/dts/gemini-sq201.dts
+++ b/arch/arm/boot/dts/gemini-sq201.dts
@@ -20,7 +20,7 @@
 	};
 
 	chosen {
-		bootargs = "console=ttyS0,115200n8 root=/dev/sdb1 rw rootwait";
+		bootargs = "console=ttyS0,115200n8";
 		stdout-path = &uart0;
 	};
 
@@ -55,6 +55,20 @@
 		};
 	};
 
+	mdio0: mdio {
+		compatible = "virtual,mdio-gpio";
+		/* Uses MDC and MDIO */
+		gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>, /* MDC */
+			<&gpio0 21 GPIO_ACTIVE_HIGH>; /* MDIO */
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		/* This is a Marvell 88E1111 ethernet transciever */
+		phy0: ethernet-phy at 1 {
+			reg = <1>;
+		};
+	};
+
 	soc {
 		flash at 30000000 {
 			/*
@@ -108,6 +122,7 @@
 				/*
 				 * gpio0fgrp cover line 18 used by reset button
 				 * gpio0ggrp cover line 20 used by info LED
+				 * gpio0hgrp cover line 21, 22 used by MDIO for Marvell PHY
 				 * gpio0kgrp cover line 31 used by USB LED
 				 */
 				gpio0_default_pins: pinctrl-gpio0 {
@@ -115,9 +130,66 @@
 						function = "gpio0";
 						groups = "gpio0fgrp",
 						"gpio0ggrp",
+						"gpio0hgrp",
 						"gpio0kgrp";
 					};
 				};
+				pinctrl-gmii {
+					mux {
+						function = "gmii";
+						groups = "gmii_gmac0_grp", "gmii_gmac1_grp";
+					};
+					/* Settings come from memory dump in PLATO */
+					conf0 {
+						pins = "V8 GMAC0 RXDV";
+						skew-delay = <0>;
+					};
+					conf1 {
+						pins = "Y7 GMAC0 RXC";
+						skew-delay = <15>;
+					};
+					conf2 {
+						pins = "T8 GMAC0 TXEN";
+						skew-delay = <7>;
+					};
+					conf3 {
+						pins = "U8 GMAC0 TXC";
+						skew-delay = <10>;
+					};
+					conf4 {
+						pins = "T10 GMAC1 RXDV";
+						skew-delay = <7>;
+					};
+					conf5 {
+						pins = "Y11 GMAC1 RXC";
+						skew-delay = <8>;
+					};
+					conf6 {
+						pins = "W11 GMAC1 TXEN";
+						skew-delay = <7>;
+					};
+					conf7 {
+						pins = "V11 GMAC1 TXC";
+						skew-delay = <5>;
+					};
+					conf8 {
+						/* The data lines all have default skew */
+						pins = "W8 GMAC0 RXD0", "V9 GMAC0 RXD1",
+						       "Y8 GMAC0 RXD2", "U9 GMAC0 RXD3",
+						       "T7 GMAC0 TXD0", "U6 GMAC0 TXD1",
+						       "V7 GMAC0 TXD2", "U7 GMAC0 TXD3",
+						       "Y12 GMAC1 RXD0", "V12 GMAC1 RXD1",
+						       "T11 GMAC1 RXD2", "W12 GMAC1 RXD3",
+						       "U10 GMAC1 TXD0", "Y10 GMAC1 TXD1",
+						       "W10 GMAC1 TXD2", "T9 GMAC1 TXD3";
+						skew-delay = <7>;
+					};
+					/* Set up drive strength on GMAC0 and GMAC1 to 16 mA */
+					conf9 {
+						groups = "gmii_gmac0_grp", "gmii_gmac1_grp";
+						drive-strength = <16>;
+					};
+				};
 			};
 		};
 
@@ -154,6 +226,18 @@
 				<0x6000 0 0 4 &pci_intc 2>;
 		};
 
+		ethernet at 60000000 {
+			status = "okay";
+
+			ethernet-port at 0 {
+				phy-mode = "rgmii";
+				phy-handle = <&phy0>;
+			};
+			ethernet-port at 1 {
+				/* Used for the Vitesse G5 chip, add later */
+			};
+		};
+
 		ata at 63000000 {
 			status = "okay";
 		};
-- 
2.17.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From linus.walleij at linaro.org  Fri Jul 13 17:19:34 2018
From: linus.walleij at linaro.org (Linus Walleij)
Date: Fri, 13 Jul 2018 23:19:34 +0200
Subject: [OpenWrt-Devel] [PATCH 1/3 v4] ARM: dts: Add WAN ethernet port to
 the SQ201
Message-ID: <20180713211936.31820-1-linus.walleij@linaro.org>

This sets up the ethernet interface and PHY for the
WAN ethernet port which uses a Marvell PHY.

Signed-off-by: Linus Walleij <linus.walleij at linaro.org>
---
ChangeLog v3->v4:
- Revert the lost changes in v3 (sorrty for the mistakes).
ChangeLog v2->v3:
- No changes, just resending.
ChangeLog v1->v2:
- Rename wrongly named "ethernet-phy" to "mdio"
- Drop device_type from the ethernet phy
---
 arch/arm/boot/dts/gemini-sq201.dts | 86 +++++++++++++++++++++++++++++-
 1 file changed, 85 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/gemini-sq201.dts b/arch/arm/boot/dts/gemini-sq201.dts
index 7658e212e6d2..a57a03e2953b 100644
--- a/arch/arm/boot/dts/gemini-sq201.dts
+++ b/arch/arm/boot/dts/gemini-sq201.dts
@@ -20,7 +20,7 @@
 	};
 
 	chosen {
-		bootargs = "console=ttyS0,115200n8 root=/dev/sdb1 rw rootwait";
+		bootargs = "console=ttyS0,115200n8";
 		stdout-path = &uart0;
 	};
 
@@ -55,6 +55,20 @@
 		};
 	};
 
+	mdio0: mdio {
+		compatible = "virtual,mdio-gpio";
+		/* Uses MDC and MDIO */
+		gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>, /* MDC */
+			<&gpio0 21 GPIO_ACTIVE_HIGH>; /* MDIO */
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		/* This is a Marvell 88E1111 ethernet transciever */
+		phy0: ethernet-phy at 1 {
+			reg = <1>;
+		};
+	};
+
 	soc {
 		flash at 30000000 {
 			/*
@@ -108,6 +122,7 @@
 				/*
 				 * gpio0fgrp cover line 18 used by reset button
 				 * gpio0ggrp cover line 20 used by info LED
+				 * gpio0hgrp cover line 21, 22 used by MDIO for Marvell PHY
 				 * gpio0kgrp cover line 31 used by USB LED
 				 */
 				gpio0_default_pins: pinctrl-gpio0 {
@@ -115,9 +130,66 @@
 						function = "gpio0";
 						groups = "gpio0fgrp",
 						"gpio0ggrp",
+						"gpio0hgrp",
 						"gpio0kgrp";
 					};
 				};
+				pinctrl-gmii {
+					mux {
+						function = "gmii";
+						groups = "gmii_gmac0_grp", "gmii_gmac1_grp";
+					};
+					/* Settings come from memory dump in PLATO */
+					conf0 {
+						pins = "V8 GMAC0 RXDV";
+						skew-delay = <0>;
+					};
+					conf1 {
+						pins = "Y7 GMAC0 RXC";
+						skew-delay = <15>;
+					};
+					conf2 {
+						pins = "T8 GMAC0 TXEN";
+						skew-delay = <7>;
+					};
+					conf3 {
+						pins = "U8 GMAC0 TXC";
+						skew-delay = <10>;
+					};
+					conf4 {
+						pins = "T10 GMAC1 RXDV";
+						skew-delay = <7>;
+					};
+					conf5 {
+						pins = "Y11 GMAC1 RXC";
+						skew-delay = <8>;
+					};
+					conf6 {
+						pins = "W11 GMAC1 TXEN";
+						skew-delay = <7>;
+					};
+					conf7 {
+						pins = "V11 GMAC1 TXC";
+						skew-delay = <5>;
+					};
+					conf8 {
+						/* The data lines all have default skew */
+						pins = "W8 GMAC0 RXD0", "V9 GMAC0 RXD1",
+						       "Y8 GMAC0 RXD2", "U9 GMAC0 RXD3",
+						       "T7 GMAC0 TXD0", "U6 GMAC0 TXD1",
+						       "V7 GMAC0 TXD2", "U7 GMAC0 TXD3",
+						       "Y12 GMAC1 RXD0", "V12 GMAC1 RXD1",
+						       "T11 GMAC1 RXD2", "W12 GMAC1 RXD3",
+						       "U10 GMAC1 TXD0", "Y10 GMAC1 TXD1",
+						       "W10 GMAC1 TXD2", "T9 GMAC1 TXD3";
+						skew-delay = <7>;
+					};
+					/* Set up drive strength on GMAC0 and GMAC1 to 16 mA */
+					conf9 {
+						groups = "gmii_gmac0_grp", "gmii_gmac1_grp";
+						drive-strength = <16>;
+					};
+				};
 			};
 		};
 
@@ -154,6 +226,18 @@
 				<0x6000 0 0 4 &pci_intc 2>;
 		};
 
+		ethernet at 60000000 {
+			status = "okay";
+
+			ethernet-port at 0 {
+				phy-mode = "rgmii";
+				phy-handle = <&phy0>;
+			};
+			ethernet-port at 1 {
+				/* Used for the Vitesse G5 chip, add later */
+			};
+		};
+
 		ata at 63000000 {
 			status = "okay";
 		};
-- 
2.17.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From linus.walleij at linaro.org  Fri Jul 13 17:19:35 2018
From: linus.walleij at linaro.org (Linus Walleij)
Date: Fri, 13 Jul 2018 23:19:35 +0200
Subject: [OpenWrt-Devel] [PATCH 2/3 v4] ARM: dts: Att Vitesse G5e switch to
 the Gemini SQ201
In-Reply-To: <20180713211936.31820-1-linus.walleij@linaro.org>
References: <20180713211936.31820-1-linus.walleij@linaro.org>
Message-ID: <20180713211936.31820-2-linus.walleij@linaro.org>

This adds the Vitesse G5e ethernet switch to the Square
One Itian SQ201 router device tree.

Signed-off-by: Linus Walleij <linus.walleij at linaro.org>
---
ChangeLog v3->v4:
- Restore a lost comment change from v1 (sorry for the mess)
ChangeLog v2->v3:
- Use a fixed link for the ethernet port to the Vitesse
  DSA router chip.
ChangeLog v1->v2:
- Drop unrelated roofs mount point change.
---
 arch/arm/boot/dts/gemini-sq201.dts | 77 +++++++++++++++++++++++++++++-
 1 file changed, 76 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/gemini-sq201.dts b/arch/arm/boot/dts/gemini-sq201.dts
index a57a03e2953b..3787cf3763c4 100644
--- a/arch/arm/boot/dts/gemini-sq201.dts
+++ b/arch/arm/boot/dts/gemini-sq201.dts
@@ -69,6 +69,61 @@
 		};
 	};
 
+	spi {
+		compatible = "spi-gpio";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		/* Check pin collisions */
+		gpio-sck = <&gpio1 28 GPIO_ACTIVE_HIGH>;
+		gpio-miso = <&gpio1 30 GPIO_ACTIVE_HIGH>;
+		gpio-mosi = <&gpio1 29 GPIO_ACTIVE_HIGH>;
+		cs-gpios = <&gpio1 31 GPIO_ACTIVE_HIGH>;
+		num-chipselects = <1>;
+
+		switch at 0 {
+			compatible = "vitesse,vsc7395";
+			reg = <0>;
+			/* Specified for 2.5 MHz or below */
+			spi-max-frequency = <2500000>;
+			gpio-controller;
+			#gpio-cells = <2>;
+
+			ports {
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				port at 0 {
+					reg = <0>;
+					label = "lan1";
+				};
+				port at 1 {
+					reg = <1>;
+					label = "lan2";
+				};
+				port at 2 {
+					reg = <2>;
+					label = "lan3";
+				};
+				port at 3 {
+					reg = <3>;
+					label = "lan4";
+				};
+				vsc: port at 6 {
+					reg = <6>;
+					label = "cpu";
+					ethernet = <&gmac1>;
+					phy-mode = "rgmii";
+					fixed-link {
+						speed = <1000>;
+						full-duplex;
+						pause;
+					};
+				};
+			};
+		};
+	};
+
+
 	soc {
 		flash at 30000000 {
 			/*
@@ -134,6 +189,16 @@
 						"gpio0kgrp";
 					};
 				};
+				/*
+				 * gpio0dgrp cover lines used by the SPI
+				 * to the Vitesse G5x chip.
+				 */
+				gpio1_default_pins: pinctrl-gpio1 {
+					mux {
+						function = "gpio1";
+						groups = "gpio1dgrp";
+					};
+				};
 				pinctrl-gmii {
 					mux {
 						function = "gmii";
@@ -204,6 +269,11 @@
 			pinctrl-0 = <&gpio0_default_pins>;
 		};
 
+		gpio1: gpio at 4e000000 {
+			pinctrl-names = "default";
+			pinctrl-0 = <&gpio1_default_pins>;
+		};
+
 		pci at 50000000 {
 			status = "okay";
 			interrupt-map-mask = <0xf800 0 0 7>;
@@ -234,7 +304,12 @@
 				phy-handle = <&phy0>;
 			};
 			ethernet-port at 1 {
-				/* Used for the Vitesse G5 chip, add later */
+				phy-mode = "rgmii";
+				fixed-link {
+					speed = <1000>;
+					full-duplex;
+					pause;
+				};
 			};
 		};
 
-- 
2.17.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From linus.walleij at linaro.org  Fri Jul 13 17:19:35 2018
From: linus.walleij at linaro.org (Linus Walleij)
Date: Fri, 13 Jul 2018 23:19:35 +0200
Subject: [OpenWrt-Devel] [PATCH 2/3 v4] ARM: dts: Att Vitesse G5e switch to
 the Gemini SQ201
In-Reply-To: <20180713211936.31820-1-linus.walleij@linaro.org>
References: <20180713211936.31820-1-linus.walleij@linaro.org>
Message-ID: <20180713211936.31820-2-linus.walleij@linaro.org>

This adds the Vitesse G5e ethernet switch to the Square
One Itian SQ201 router device tree.

Signed-off-by: Linus Walleij <linus.walleij at linaro.org>
---
ChangeLog v3->v4:
- Restore a lost comment change from v1 (sorry for the mess)
ChangeLog v2->v3:
- Use a fixed link for the ethernet port to the Vitesse
  DSA router chip.
ChangeLog v1->v2:
- Drop unrelated roofs mount point change.
---
 arch/arm/boot/dts/gemini-sq201.dts | 77 +++++++++++++++++++++++++++++-
 1 file changed, 76 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/gemini-sq201.dts b/arch/arm/boot/dts/gemini-sq201.dts
index a57a03e2953b..3787cf3763c4 100644
--- a/arch/arm/boot/dts/gemini-sq201.dts
+++ b/arch/arm/boot/dts/gemini-sq201.dts
@@ -69,6 +69,61 @@
 		};
 	};
 
+	spi {
+		compatible = "spi-gpio";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		/* Check pin collisions */
+		gpio-sck = <&gpio1 28 GPIO_ACTIVE_HIGH>;
+		gpio-miso = <&gpio1 30 GPIO_ACTIVE_HIGH>;
+		gpio-mosi = <&gpio1 29 GPIO_ACTIVE_HIGH>;
+		cs-gpios = <&gpio1 31 GPIO_ACTIVE_HIGH>;
+		num-chipselects = <1>;
+
+		switch at 0 {
+			compatible = "vitesse,vsc7395";
+			reg = <0>;
+			/* Specified for 2.5 MHz or below */
+			spi-max-frequency = <2500000>;
+			gpio-controller;
+			#gpio-cells = <2>;
+
+			ports {
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				port at 0 {
+					reg = <0>;
+					label = "lan1";
+				};
+				port at 1 {
+					reg = <1>;
+					label = "lan2";
+				};
+				port at 2 {
+					reg = <2>;
+					label = "lan3";
+				};
+				port at 3 {
+					reg = <3>;
+					label = "lan4";
+				};
+				vsc: port at 6 {
+					reg = <6>;
+					label = "cpu";
+					ethernet = <&gmac1>;
+					phy-mode = "rgmii";
+					fixed-link {
+						speed = <1000>;
+						full-duplex;
+						pause;
+					};
+				};
+			};
+		};
+	};
+
+
 	soc {
 		flash at 30000000 {
 			/*
@@ -134,6 +189,16 @@
 						"gpio0kgrp";
 					};
 				};
+				/*
+				 * gpio0dgrp cover lines used by the SPI
+				 * to the Vitesse G5x chip.
+				 */
+				gpio1_default_pins: pinctrl-gpio1 {
+					mux {
+						function = "gpio1";
+						groups = "gpio1dgrp";
+					};
+				};
 				pinctrl-gmii {
 					mux {
 						function = "gmii";
@@ -204,6 +269,11 @@
 			pinctrl-0 = <&gpio0_default_pins>;
 		};
 
+		gpio1: gpio at 4e000000 {
+			pinctrl-names = "default";
+			pinctrl-0 = <&gpio1_default_pins>;
+		};
+
 		pci at 50000000 {
 			status = "okay";
 			interrupt-map-mask = <0xf800 0 0 7>;
@@ -234,7 +304,12 @@
 				phy-handle = <&phy0>;
 			};
 			ethernet-port at 1 {
-				/* Used for the Vitesse G5 chip, add later */
+				phy-mode = "rgmii";
+				fixed-link {
+					speed = <1000>;
+					full-duplex;
+					pause;
+				};
 			};
 		};
 
-- 
2.17.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From linus.walleij at linaro.org  Fri Jul 13 17:19:36 2018
From: linus.walleij at linaro.org (Linus Walleij)
Date: Fri, 13 Jul 2018 23:19:36 +0200
Subject: [OpenWrt-Devel] [PATCH 3/3 v4] ARM: dts: Add devicetree for
 Storlink/Storm SL93512R
In-Reply-To: <20180713211936.31820-1-linus.walleij@linaro.org>
References: <20180713211936.31820-1-linus.walleij@linaro.org>
Message-ID: <20180713211936.31820-3-linus.walleij@linaro.org>

The Storlink Gemini324 EV-Board also known as Storm
Semiconductor SL93512R_BRD is ground zero for the Gemini
devices. We add a device tree so we can support it, it
turns out to be pretty trivial.

Signed-off-by: Linus Walleij <linus.walleij at linaro.org>
---
ChangeLog v3->v4:
- Restore lost changes from v1 (sorry about the mess)
ChangeLog v2->v3:
- Use a fixed link for the ethernet port to the Vitesse
  DSA router chip.
ChangeLog v1->v2:
- Rename wrongly named "ethernet-phy" to "mdio"
- Drop device_type from the ethernet phy
---
 arch/arm/boot/dts/Makefile            |   1 +
 arch/arm/boot/dts/gemini-sl93512r.dts | 328 ++++++++++++++++++++++++++
 2 files changed, 329 insertions(+)
 create mode 100644 arch/arm/boot/dts/gemini-sl93512r.dts

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 37a3de760d40..a10ef98c6d75 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -200,6 +200,7 @@ dtb-$(CONFIG_ARCH_GEMINI) += \
 	gemini-dlink-dns-313.dtb \
 	gemini-nas4220b.dtb \
 	gemini-rut1xx.dtb \
+	gemini-sl93512r.dtb \
 	gemini-sq201.dtb \
 	gemini-wbd111.dtb \
 	gemini-wbd222.dtb
diff --git a/arch/arm/boot/dts/gemini-sl93512r.dts b/arch/arm/boot/dts/gemini-sl93512r.dts
new file mode 100644
index 000000000000..ebefb7297379
--- /dev/null
+++ b/arch/arm/boot/dts/gemini-sl93512r.dts
@@ -0,0 +1,328 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Device Tree file for the Storm Semiconductor SL93512R_BRD
+ * Gemini reference design, also initially called
+ * "Gemini324 EV-Board" before Storm acquired Storlink Semiconductor.
+ * The series were later acquired by Cortina Systems.
+ */
+
+/dts-v1/;
+
+#include "gemini.dtsi"
+#include <dt-bindings/input/input.h>
+
+/ {
+	model = "Storlink Semiconductor Gemini324 EV-Board / Storm Semiconductor SL93512R_BRD";
+	compatible = "storlink,gemini324", "storm,sl93512r", "cortina,gemini";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	memory at 0 {
+		/* 64 MB Samsung K4H511638B */
+		device_type = "memory";
+		reg = <0x00000000 0x4000000>;
+	};
+
+	chosen {
+		bootargs = "console=ttyS0,19200n8 root=/dev/sda1 rw rootwait";
+		stdout-path = &uart0;
+	};
+
+	gpio_keys {
+		compatible = "gpio-keys";
+
+		button-wps {
+			debounce-interval = <50>;
+			wakeup-source;
+			linux,code = <KEY_WPS_BUTTON>;
+			label = "WPS";
+			/* Conflict with NAND flash */
+			gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
+		};
+
+		button-setup {
+			debounce-interval = <50>;
+			wakeup-source;
+			linux,code = <KEY_SETUP>;
+			label = "factory reset";
+			/* Conflict with NAND flash */
+			gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
+		};
+	};
+
+	leds {
+		compatible = "gpio-leds";
+		led-green-harddisk {
+			label = "sq201:green:harddisk";
+			/* Conflict with LCD (no problem) */
+			gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
+			default-state = "off";
+			linux,default-trigger = "disk-activity";
+		};
+		led-green-wireless {
+			label = "sq201:green:wireless";
+			/* Conflict with NAND flash CE0 (no problem) */
+			gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
+			default-state = "on";
+			linux,default-trigger = "heartbeat";
+		};
+	};
+
+	mdio0: mdio {
+		compatible = "virtual,mdio-gpio";
+		/* Uses MDC and MDIO */
+		gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>, /* MDC */
+			<&gpio0 21 GPIO_ACTIVE_HIGH>; /* MDIO */
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		/* This is a Marvell 88E1111 ethernet transciever */
+		phy0: ethernet-phy at 1 {
+			reg = <1>;
+		};
+	};
+
+	spi {
+		compatible = "spi-gpio";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		/* Check pin collisions */
+		gpio-sck = <&gpio1 28 GPIO_ACTIVE_HIGH>;
+		gpio-miso = <&gpio1 30 GPIO_ACTIVE_HIGH>;
+		gpio-mosi = <&gpio1 29 GPIO_ACTIVE_HIGH>;
+		cs-gpios = <&gpio1 31 GPIO_ACTIVE_HIGH>;
+		num-chipselects = <1>;
+
+		switch at 0 {
+			compatible = "vitesse,vsc7385";
+			reg = <0>;
+			/* Specified for 2.5 MHz or below */
+			spi-max-frequency = <2500000>;
+			gpio-controller;
+			#gpio-cells = <2>;
+
+			ports {
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				port at 0 {
+					reg = <0>;
+					label = "lan1";
+				};
+				port at 1 {
+					reg = <1>;
+					label = "lan2";
+				};
+				port at 2 {
+					reg = <2>;
+					label = "lan3";
+				};
+				port at 3 {
+					reg = <3>;
+					label = "lan4";
+				};
+				vsc: port at 6 {
+					reg = <6>;
+					label = "cpu";
+					ethernet = <&gmac1>;
+					phy-mode = "rgmii";
+					fixed-link {
+						speed = <1000>;
+						full-duplex;
+						pause;
+					};
+				};
+			};
+		};
+	};
+
+
+	soc {
+		flash at 30000000 {
+			status = "okay";
+			/* 16MB of flash */
+			reg = <0x30000000 0x01000000>;
+
+			partition at 0 {
+				label = "BOOT";
+				reg = <0x00000000 0x00020000>;
+				read-only;
+			};
+			partition at 120000 {
+				label = "Kern";
+				reg = <0x00020000 0x00300000>;
+			};
+			partition at 320000 {
+				label = "Ramdisk";
+				reg = <0x00320000 0x00600000>;
+			};
+			partition at 920000 {
+				label = "Application";
+				reg = <0x00920000 0x00600000>;
+			};
+			partition at f20000 {
+				label = "VCTL";
+				reg = <0x00f20000 0x00020000>;
+				read-only;
+			};
+			partition at f40000 {
+				label = "CurConf";
+				reg = <0x00f40000 0x000a0000>;
+				read-only;
+			};
+			partition at fe0000 {
+				label = "FIS directory";
+				reg = <0x00fe0000 0x00020000>;
+				read-only;
+			};
+		};
+
+		syscon: syscon at 40000000 {
+			pinctrl {
+				/*
+				 * gpio0egrp cover line 16 used by HD LED
+				 * gpio0fgrp cover line 17, 18 used by wireless LED and reset button
+				 * gpio0hgrp cover line 21, 22 used by MDIO for Marvell PHY
+				 * gpio0kgrp cover line 31 used by USB LED
+				 */
+				gpio0_default_pins: pinctrl-gpio0 {
+					mux {
+						function = "gpio0";
+						groups = "gpio0egrp",
+						"gpio0fgrp",
+						"gpio0hgrp";
+					};
+				};
+				/*
+				 * gpio1dgrp cover lines used by SPI for
+				 * the Vitesse chip (28-31)
+				 */
+				gpio1_default_pins: pinctrl-gpio1 {
+					mux {
+						function = "gpio1";
+						groups = "gpio1dgrp";
+					};
+				};
+				pinctrl-gmii {
+					mux {
+						function = "gmii";
+						groups = "gmii_gmac0_grp", "gmii_gmac1_grp";
+					};
+					/* Control pad skew comes from sl_switch.c in the vendor code */
+					conf0 {
+						pins = "P10 GMAC1 TXC";
+						skew-delay = <5>;
+					};
+					conf1 {
+						pins = "V11 GMAC1 TXEN";
+						skew-delay = <7>;
+					};
+					conf2 {
+						pins = "T11 GMAC1 RXC";
+						skew-delay = <8>;
+					};
+					conf3 {
+						pins = "U11 GMAC1 RXDV";
+						skew-delay = <7>;
+					};
+					conf4 {
+						pins = "V7 GMAC0 TXC";
+						skew-delay = <10>;
+					};
+					conf5 {
+						pins = "P8 GMAC0 TXEN";
+						skew-delay = <7>; /* 5 at another place? */
+					};
+					conf6 {
+						pins = "T8 GMAC0 RXC";
+						skew-delay = <15>;
+					};
+					conf7 {
+						pins = "R8 GMAC0 RXDV";
+						skew-delay = <0>;
+					};
+					conf8 {
+						/* The data lines all have default skew */
+						pins = "U8 GMAC0 RXD0", "V8 GMAC0 RXD1",
+						       "P9 GMAC0 RXD2", "R9 GMAC0 RXD3",
+						       "R11 GMAC1 RXD0", "P11 GMAC1 RXD1",
+						       "V12 GMAC1 RXD2", "U12 GMAC1 RXD3",
+						       "R10 GMAC1 TXD0", "T10 GMAC1 TXD1",
+						       "U10 GMAC1 TXD2", "V10 GMAC1 TXD3";
+						skew-delay = <7>;
+					};
+					/* Appears in sl351x_gmac.c in the vendor code */
+					conf9 {
+						pins = "U7 GMAC0 TXD0", "T7 GMAC0 TXD1",
+						       "R7 GMAC0 TXD2", "P7 GMAC0 TXD3";
+						skew-delay = <5>;
+					};
+				};
+			};
+		};
+
+		/* Both interfaces brought out on SATA connectors */
+		sata: sata at 46000000 {
+			cortina,gemini-ata-muxmode = <0>;
+			cortina,gemini-enable-sata-bridge;
+			status = "okay";
+		};
+
+		gpio0: gpio at 4d000000 {
+			pinctrl-names = "default";
+			pinctrl-0 = <&gpio0_default_pins>;
+		};
+
+		gpio1: gpio at 4e000000 {
+			pinctrl-names = "default";
+			pinctrl-0 = <&gpio1_default_pins>;
+		};
+
+		pci at 50000000 {
+			status = "okay";
+			interrupt-map-mask = <0xf800 0 0 7>;
+			interrupt-map =
+				<0x4800 0 0 1 &pci_intc 0>, /* Slot 9 */
+				<0x4800 0 0 2 &pci_intc 1>,
+				<0x4800 0 0 3 &pci_intc 2>,
+				<0x4800 0 0 4 &pci_intc 3>,
+				<0x5000 0 0 1 &pci_intc 1>, /* Slot 10 */
+				<0x5000 0 0 2 &pci_intc 2>,
+				<0x5000 0 0 3 &pci_intc 3>,
+				<0x5000 0 0 4 &pci_intc 0>,
+				<0x5800 0 0 1 &pci_intc 2>, /* Slot 11 */
+				<0x5800 0 0 2 &pci_intc 3>,
+				<0x5800 0 0 3 &pci_intc 0>,
+				<0x5800 0 0 4 &pci_intc 1>,
+				<0x6000 0 0 1 &pci_intc 3>, /* Slot 12 */
+				<0x6000 0 0 2 &pci_intc 0>,
+				<0x6000 0 0 3 &pci_intc 1>,
+				<0x6000 0 0 4 &pci_intc 2>;
+		};
+
+		ethernet at 60000000 {
+			status = "okay";
+
+			ethernet-port at 0 {
+				phy-mode = "rgmii";
+				phy-handle = <&phy0>;
+			};
+			ethernet-port at 1 {
+				phy-mode = "rgmii";
+				fixed-link {
+					speed = <1000>;
+					full-duplex;
+					pause;
+				};
+			};
+		};
+
+		ata at 63000000 {
+			status = "okay";
+		};
+
+		ata at 63400000 {
+			status = "okay";
+		};
+	};
+};
-- 
2.17.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From linus.walleij at linaro.org  Fri Jul 13 17:19:36 2018
From: linus.walleij at linaro.org (Linus Walleij)
Date: Fri, 13 Jul 2018 23:19:36 +0200
Subject: [OpenWrt-Devel] [PATCH 3/3 v4] ARM: dts: Add devicetree for
 Storlink/Storm SL93512R
In-Reply-To: <20180713211936.31820-1-linus.walleij@linaro.org>
References: <20180713211936.31820-1-linus.walleij@linaro.org>
Message-ID: <20180713211936.31820-3-linus.walleij@linaro.org>

The Storlink Gemini324 EV-Board also known as Storm
Semiconductor SL93512R_BRD is ground zero for the Gemini
devices. We add a device tree so we can support it, it
turns out to be pretty trivial.

Signed-off-by: Linus Walleij <linus.walleij at linaro.org>
---
ChangeLog v3->v4:
- Restore lost changes from v1 (sorry about the mess)
ChangeLog v2->v3:
- Use a fixed link for the ethernet port to the Vitesse
  DSA router chip.
ChangeLog v1->v2:
- Rename wrongly named "ethernet-phy" to "mdio"
- Drop device_type from the ethernet phy
---
 arch/arm/boot/dts/Makefile            |   1 +
 arch/arm/boot/dts/gemini-sl93512r.dts | 328 ++++++++++++++++++++++++++
 2 files changed, 329 insertions(+)
 create mode 100644 arch/arm/boot/dts/gemini-sl93512r.dts

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 37a3de760d40..a10ef98c6d75 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -200,6 +200,7 @@ dtb-$(CONFIG_ARCH_GEMINI) += \
 	gemini-dlink-dns-313.dtb \
 	gemini-nas4220b.dtb \
 	gemini-rut1xx.dtb \
+	gemini-sl93512r.dtb \
 	gemini-sq201.dtb \
 	gemini-wbd111.dtb \
 	gemini-wbd222.dtb
diff --git a/arch/arm/boot/dts/gemini-sl93512r.dts b/arch/arm/boot/dts/gemini-sl93512r.dts
new file mode 100644
index 000000000000..ebefb7297379
--- /dev/null
+++ b/arch/arm/boot/dts/gemini-sl93512r.dts
@@ -0,0 +1,328 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Device Tree file for the Storm Semiconductor SL93512R_BRD
+ * Gemini reference design, also initially called
+ * "Gemini324 EV-Board" before Storm acquired Storlink Semiconductor.
+ * The series were later acquired by Cortina Systems.
+ */
+
+/dts-v1/;
+
+#include "gemini.dtsi"
+#include <dt-bindings/input/input.h>
+
+/ {
+	model = "Storlink Semiconductor Gemini324 EV-Board / Storm Semiconductor SL93512R_BRD";
+	compatible = "storlink,gemini324", "storm,sl93512r", "cortina,gemini";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	memory at 0 {
+		/* 64 MB Samsung K4H511638B */
+		device_type = "memory";
+		reg = <0x00000000 0x4000000>;
+	};
+
+	chosen {
+		bootargs = "console=ttyS0,19200n8 root=/dev/sda1 rw rootwait";
+		stdout-path = &uart0;
+	};
+
+	gpio_keys {
+		compatible = "gpio-keys";
+
+		button-wps {
+			debounce-interval = <50>;
+			wakeup-source;
+			linux,code = <KEY_WPS_BUTTON>;
+			label = "WPS";
+			/* Conflict with NAND flash */
+			gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
+		};
+
+		button-setup {
+			debounce-interval = <50>;
+			wakeup-source;
+			linux,code = <KEY_SETUP>;
+			label = "factory reset";
+			/* Conflict with NAND flash */
+			gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
+		};
+	};
+
+	leds {
+		compatible = "gpio-leds";
+		led-green-harddisk {
+			label = "sq201:green:harddisk";
+			/* Conflict with LCD (no problem) */
+			gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
+			default-state = "off";
+			linux,default-trigger = "disk-activity";
+		};
+		led-green-wireless {
+			label = "sq201:green:wireless";
+			/* Conflict with NAND flash CE0 (no problem) */
+			gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
+			default-state = "on";
+			linux,default-trigger = "heartbeat";
+		};
+	};
+
+	mdio0: mdio {
+		compatible = "virtual,mdio-gpio";
+		/* Uses MDC and MDIO */
+		gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>, /* MDC */
+			<&gpio0 21 GPIO_ACTIVE_HIGH>; /* MDIO */
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		/* This is a Marvell 88E1111 ethernet transciever */
+		phy0: ethernet-phy at 1 {
+			reg = <1>;
+		};
+	};
+
+	spi {
+		compatible = "spi-gpio";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		/* Check pin collisions */
+		gpio-sck = <&gpio1 28 GPIO_ACTIVE_HIGH>;
+		gpio-miso = <&gpio1 30 GPIO_ACTIVE_HIGH>;
+		gpio-mosi = <&gpio1 29 GPIO_ACTIVE_HIGH>;
+		cs-gpios = <&gpio1 31 GPIO_ACTIVE_HIGH>;
+		num-chipselects = <1>;
+
+		switch at 0 {
+			compatible = "vitesse,vsc7385";
+			reg = <0>;
+			/* Specified for 2.5 MHz or below */
+			spi-max-frequency = <2500000>;
+			gpio-controller;
+			#gpio-cells = <2>;
+
+			ports {
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				port at 0 {
+					reg = <0>;
+					label = "lan1";
+				};
+				port at 1 {
+					reg = <1>;
+					label = "lan2";
+				};
+				port at 2 {
+					reg = <2>;
+					label = "lan3";
+				};
+				port at 3 {
+					reg = <3>;
+					label = "lan4";
+				};
+				vsc: port at 6 {
+					reg = <6>;
+					label = "cpu";
+					ethernet = <&gmac1>;
+					phy-mode = "rgmii";
+					fixed-link {
+						speed = <1000>;
+						full-duplex;
+						pause;
+					};
+				};
+			};
+		};
+	};
+
+
+	soc {
+		flash at 30000000 {
+			status = "okay";
+			/* 16MB of flash */
+			reg = <0x30000000 0x01000000>;
+
+			partition at 0 {
+				label = "BOOT";
+				reg = <0x00000000 0x00020000>;
+				read-only;
+			};
+			partition at 120000 {
+				label = "Kern";
+				reg = <0x00020000 0x00300000>;
+			};
+			partition at 320000 {
+				label = "Ramdisk";
+				reg = <0x00320000 0x00600000>;
+			};
+			partition at 920000 {
+				label = "Application";
+				reg = <0x00920000 0x00600000>;
+			};
+			partition at f20000 {
+				label = "VCTL";
+				reg = <0x00f20000 0x00020000>;
+				read-only;
+			};
+			partition at f40000 {
+				label = "CurConf";
+				reg = <0x00f40000 0x000a0000>;
+				read-only;
+			};
+			partition at fe0000 {
+				label = "FIS directory";
+				reg = <0x00fe0000 0x00020000>;
+				read-only;
+			};
+		};
+
+		syscon: syscon at 40000000 {
+			pinctrl {
+				/*
+				 * gpio0egrp cover line 16 used by HD LED
+				 * gpio0fgrp cover line 17, 18 used by wireless LED and reset button
+				 * gpio0hgrp cover line 21, 22 used by MDIO for Marvell PHY
+				 * gpio0kgrp cover line 31 used by USB LED
+				 */
+				gpio0_default_pins: pinctrl-gpio0 {
+					mux {
+						function = "gpio0";
+						groups = "gpio0egrp",
+						"gpio0fgrp",
+						"gpio0hgrp";
+					};
+				};
+				/*
+				 * gpio1dgrp cover lines used by SPI for
+				 * the Vitesse chip (28-31)
+				 */
+				gpio1_default_pins: pinctrl-gpio1 {
+					mux {
+						function = "gpio1";
+						groups = "gpio1dgrp";
+					};
+				};
+				pinctrl-gmii {
+					mux {
+						function = "gmii";
+						groups = "gmii_gmac0_grp", "gmii_gmac1_grp";
+					};
+					/* Control pad skew comes from sl_switch.c in the vendor code */
+					conf0 {
+						pins = "P10 GMAC1 TXC";
+						skew-delay = <5>;
+					};
+					conf1 {
+						pins = "V11 GMAC1 TXEN";
+						skew-delay = <7>;
+					};
+					conf2 {
+						pins = "T11 GMAC1 RXC";
+						skew-delay = <8>;
+					};
+					conf3 {
+						pins = "U11 GMAC1 RXDV";
+						skew-delay = <7>;
+					};
+					conf4 {
+						pins = "V7 GMAC0 TXC";
+						skew-delay = <10>;
+					};
+					conf5 {
+						pins = "P8 GMAC0 TXEN";
+						skew-delay = <7>; /* 5 at another place? */
+					};
+					conf6 {
+						pins = "T8 GMAC0 RXC";
+						skew-delay = <15>;
+					};
+					conf7 {
+						pins = "R8 GMAC0 RXDV";
+						skew-delay = <0>;
+					};
+					conf8 {
+						/* The data lines all have default skew */
+						pins = "U8 GMAC0 RXD0", "V8 GMAC0 RXD1",
+						       "P9 GMAC0 RXD2", "R9 GMAC0 RXD3",
+						       "R11 GMAC1 RXD0", "P11 GMAC1 RXD1",
+						       "V12 GMAC1 RXD2", "U12 GMAC1 RXD3",
+						       "R10 GMAC1 TXD0", "T10 GMAC1 TXD1",
+						       "U10 GMAC1 TXD2", "V10 GMAC1 TXD3";
+						skew-delay = <7>;
+					};
+					/* Appears in sl351x_gmac.c in the vendor code */
+					conf9 {
+						pins = "U7 GMAC0 TXD0", "T7 GMAC0 TXD1",
+						       "R7 GMAC0 TXD2", "P7 GMAC0 TXD3";
+						skew-delay = <5>;
+					};
+				};
+			};
+		};
+
+		/* Both interfaces brought out on SATA connectors */
+		sata: sata at 46000000 {
+			cortina,gemini-ata-muxmode = <0>;
+			cortina,gemini-enable-sata-bridge;
+			status = "okay";
+		};
+
+		gpio0: gpio at 4d000000 {
+			pinctrl-names = "default";
+			pinctrl-0 = <&gpio0_default_pins>;
+		};
+
+		gpio1: gpio at 4e000000 {
+			pinctrl-names = "default";
+			pinctrl-0 = <&gpio1_default_pins>;
+		};
+
+		pci at 50000000 {
+			status = "okay";
+			interrupt-map-mask = <0xf800 0 0 7>;
+			interrupt-map =
+				<0x4800 0 0 1 &pci_intc 0>, /* Slot 9 */
+				<0x4800 0 0 2 &pci_intc 1>,
+				<0x4800 0 0 3 &pci_intc 2>,
+				<0x4800 0 0 4 &pci_intc 3>,
+				<0x5000 0 0 1 &pci_intc 1>, /* Slot 10 */
+				<0x5000 0 0 2 &pci_intc 2>,
+				<0x5000 0 0 3 &pci_intc 3>,
+				<0x5000 0 0 4 &pci_intc 0>,
+				<0x5800 0 0 1 &pci_intc 2>, /* Slot 11 */
+				<0x5800 0 0 2 &pci_intc 3>,
+				<0x5800 0 0 3 &pci_intc 0>,
+				<0x5800 0 0 4 &pci_intc 1>,
+				<0x6000 0 0 1 &pci_intc 3>, /* Slot 12 */
+				<0x6000 0 0 2 &pci_intc 0>,
+				<0x6000 0 0 3 &pci_intc 1>,
+				<0x6000 0 0 4 &pci_intc 2>;
+		};
+
+		ethernet at 60000000 {
+			status = "okay";
+
+			ethernet-port at 0 {
+				phy-mode = "rgmii";
+				phy-handle = <&phy0>;
+			};
+			ethernet-port at 1 {
+				phy-mode = "rgmii";
+				fixed-link {
+					speed = <1000>;
+					full-duplex;
+					pause;
+				};
+			};
+		};
+
+		ata at 63000000 {
+			status = "okay";
+		};
+
+		ata at 63400000 {
+			status = "okay";
+		};
+	};
+};
-- 
2.17.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From andrew at lunn.ch  Fri Jul 13 17:46:11 2018
From: andrew at lunn.ch (Andrew Lunn)
Date: Fri, 13 Jul 2018 23:46:11 +0200
Subject: [OpenWrt-Devel] [PATCH 1/3 v4] ARM: dts: Add WAN ethernet port
 to the SQ201
In-Reply-To: <20180713211936.31820-1-linus.walleij@linaro.org>
References: <20180713211936.31820-1-linus.walleij@linaro.org>
Message-ID: <20180713214611.GB7486@lunn.ch>

On Fri, Jul 13, 2018 at 11:19:34PM +0200, Linus Walleij wrote:
> This sets up the ethernet interface and PHY for the
> WAN ethernet port which uses a Marvell PHY.
> 
> Signed-off-by: Linus Walleij <linus.walleij at linaro.org>

Reviewed-by: Andrew Lunn <andrew at lunn.ch>

    Andrew

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From andrew at lunn.ch  Fri Jul 13 17:49:36 2018
From: andrew at lunn.ch (Andrew Lunn)
Date: Fri, 13 Jul 2018 23:49:36 +0200
Subject: [OpenWrt-Devel] [PATCH 2/3 v4] ARM: dts: Att Vitesse G5e switch
 to the Gemini SQ201
In-Reply-To: <20180713211936.31820-2-linus.walleij@linaro.org>
References: <20180713211936.31820-1-linus.walleij@linaro.org>
 <20180713211936.31820-2-linus.walleij@linaro.org>
Message-ID: <20180713214936.GC7486@lunn.ch>

On Fri, Jul 13, 2018 at 11:19:35PM +0200, Linus Walleij wrote:
> Subject: [PATCH 2/3 v4] ARM: dts: Att Vitesse G5e switch to the Gemini SQ201

Hi Linus

s/Att/Add in the subject line.

> Signed-off-by: Linus Walleij <linus.walleij at linaro.org>

Reviewed-by: Andrew Lunn <andrew at lunn.ch>

    Andrew

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From andrew at lunn.ch  Fri Jul 13 17:53:55 2018
From: andrew at lunn.ch (Andrew Lunn)
Date: Fri, 13 Jul 2018 23:53:55 +0200
Subject: [OpenWrt-Devel] [PATCH 3/3 v4] ARM: dts: Add devicetree for
 Storlink/Storm SL93512R
In-Reply-To: <20180713211936.31820-3-linus.walleij@linaro.org>
References: <20180713211936.31820-1-linus.walleij@linaro.org>
 <20180713211936.31820-3-linus.walleij@linaro.org>
Message-ID: <20180713215355.GD7486@lunn.ch>

On Fri, Jul 13, 2018 at 11:19:36PM +0200, Linus Walleij wrote:
> The Storlink Gemini324 EV-Board also known as Storm
> Semiconductor SL93512R_BRD is ground zero for the Gemini
> devices. We add a device tree so we can support it, it
> turns out to be pretty trivial.
> 
> Signed-off-by: Linus Walleij <linus.walleij at linaro.org>

Reviewed-by: Andrew Lunn <andrew at lunn.ch>

    Andrew

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From dev at kresin.me  Sat Jul 14 04:48:48 2018
From: dev at kresin.me (Mathias Kresin)
Date: Sat, 14 Jul 2018 10:48:48 +0200
Subject: [OpenWrt-Devel] [PATCH] metadata: express conflicts in a single
 line
In-Reply-To: <1531416817-29017-1-git-send-email-dev@kresin.me>
References: <1531416817-29017-1-git-send-email-dev@kresin.me>
Message-ID: <f7931e0f-ec57-a0b4-8fba-c1eae2c05546@kresin.me>

12.07.2018 19:33, Mathias Kresin:
> Due to the use of dependencies to express conflicts, a package which
> conflicts with multiple other packages (variants) is indented one level
> for each conflict:
> 
> < > pkg-variant-a
> < >   pkg-variant-b (conflicts pkg-variant-a)
> < >     pkg-variant-c (conflicts pkg-variant-a && pkg-variant-b)
> 
> Express conflicts in a single line by using the logical AND operator to
> fix the visual glitch.
> 
> Signed-off-by: Mathias Kresin <dev at kresin.me>
> ---
>   scripts/package-metadata.pl | 12 ++++++++++--
>   1 file changed, 10 insertions(+), 2 deletions(-)
> 
> diff --git a/scripts/package-metadata.pl b/scripts/package-metadata.pl
> index 53bb45a..3e5d8f7 100755
> --- a/scripts/package-metadata.pl
> +++ b/scripts/package-metadata.pl
> @@ -243,12 +243,20 @@ sub mconf_conflicts {
>   	my $pkgname = shift;
>   	my $depends = shift;
>   	my $res = "";
> +	my @conflics;
>   
>   	foreach my $depend (@$depends) {
>   		next unless $package{$depend};
> -		$res .= "\t\tdepends on m || (PACKAGE_$depend != y)\n";
> +		push @conflics, "PACKAGE_$depend != y";
>   	}
> -	return $res;
> +
> +	if (!@conflics) {
> +		return $res;
> +	}
> +
> +	$res = join(" && ", at conflics);
> +
> +	return "\t\tdepends on m || ($res)\n";
>   }
>   
>   sub print_package_config_category($) {
> 

Disregard this patch. I realised it's an ugly workaround which might not 
work in all cases. The script/conf code need to be extended to handle 
our use of "!= y" dependencies properly.

Mathias

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From linus.walleij at linaro.org  Sat Jul 14 05:45:53 2018
From: linus.walleij at linaro.org (Linus Walleij)
Date: Sat, 14 Jul 2018 11:45:53 +0200
Subject: [OpenWrt-Devel] [PATCH 1/4 v1] net: phy: realtek: Support RTL8366RB
 variant
Message-ID: <20180714094556.30791-1-linus.walleij@linaro.org>

The RTL8366RB is an ASIC with five internal PHYs for
LAN0..LAN3 and WAN. The PHYs are spawn off the main
device so they can be handled in a distributed manner
by the Realtek PHY driver. All that is really needed
is the power save feature enablement and letting the
PHY driver core pick up the IRQ from the switch chip.

Cc: Antti Sepp?l? <a.seppala at gmail.com>
Cc: Roman Yeryomin <roman at advem.lv>
Cc: Colin Leitner <colin.leitner at googlemail.com>
Cc: Gabor Juhos <juhosg at openwrt.org>
Cc: Florian Fainelli <f.fainelli at gmail.com>
Signed-off-by: Linus Walleij <linus.walleij at linaro.org>
---
ChangeLog RFCv2->v1
- Correct the PHY power save register from 0x21 to 0x15
  as it should be.
- Drop the comment about the DSA switch.
- Use BIT(12) for power save bit define
- Use phy_set_bits() to simplify code
- Skip assigning genphy_config_aneg() and
  genphy_read_status() as this is default anyway
ChangeLog RFCv1->RFCv2:
- No real changes.
---
 drivers/net/phy/realtek.c | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/drivers/net/phy/realtek.c b/drivers/net/phy/realtek.c
index 082fb40c656d..d0d07f22df1f 100644
--- a/drivers/net/phy/realtek.c
+++ b/drivers/net/phy/realtek.c
@@ -37,6 +37,9 @@
 #define RTL8201F_ISR				0x1e
 #define RTL8201F_IER				0x13
 
+#define RTL8366RB_POWER_SAVE			0x15
+#define RTL8366RB_POWER_SAVE_ON			BIT(12)
+
 MODULE_DESCRIPTION("Realtek PHY driver");
 MODULE_AUTHOR("Johnson Leung");
 MODULE_LICENSE("GPL");
@@ -159,6 +162,24 @@ static int rtl8211b_resume(struct phy_device *phydev)
 	return genphy_resume(phydev);
 }
 
+static int rtl8366rb_config_init(struct phy_device *phydev)
+{
+	int ret;
+
+	ret = genphy_config_init(phydev);
+	if (ret < 0)
+		return ret;
+
+	ret = phy_set_bits(phydev, RTL8366RB_POWER_SAVE,
+			   RTL8366RB_POWER_SAVE_ON);
+	if (ret) {
+		dev_err(&phydev->mdio.dev,
+			"error enabling power management\n");
+	}
+
+	return ret;
+}
+
 static struct phy_driver realtek_drvs[] = {
 	{
 		.phy_id         = 0x00008201,
@@ -223,6 +244,15 @@ static struct phy_driver realtek_drvs[] = {
 		.resume		= genphy_resume,
 		.read_page	= rtl821x_read_page,
 		.write_page	= rtl821x_write_page,
+	}, {
+		.phy_id		= 0x001cc961,
+		.name		= "RTL8366RB Gigabit Ethernet",
+		.phy_id_mask	= 0x001fffff,
+		.features	= PHY_GBIT_FEATURES,
+		.flags		= PHY_HAS_INTERRUPT,
+		.config_init	= &rtl8366rb_config_init,
+		.suspend	= genphy_suspend,
+		.resume		= genphy_resume,
 	},
 };
 
@@ -234,6 +264,7 @@ static struct mdio_device_id __maybe_unused realtek_tbl[] = {
 	{ 0x001cc914, 0x001fffff },
 	{ 0x001cc915, 0x001fffff },
 	{ 0x001cc916, 0x001fffff },
+	{ 0x001cc961, 0x001fffff },
 	{ }
 };
 
-- 
2.17.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From linus.walleij at linaro.org  Sat Jul 14 05:45:53 2018
From: linus.walleij at linaro.org (Linus Walleij)
Date: Sat, 14 Jul 2018 11:45:53 +0200
Subject: [OpenWrt-Devel] [PATCH 1/4 v1] net: phy: realtek: Support RTL8366RB
 variant
Message-ID: <20180714094556.30791-1-linus.walleij@linaro.org>

The RTL8366RB is an ASIC with five internal PHYs for
LAN0..LAN3 and WAN. The PHYs are spawn off the main
device so they can be handled in a distributed manner
by the Realtek PHY driver. All that is really needed
is the power save feature enablement and letting the
PHY driver core pick up the IRQ from the switch chip.

Cc: Antti Sepp?l? <a.seppala at gmail.com>
Cc: Roman Yeryomin <roman at advem.lv>
Cc: Colin Leitner <colin.leitner at googlemail.com>
Cc: Gabor Juhos <juhosg at openwrt.org>
Cc: Florian Fainelli <f.fainelli at gmail.com>
Signed-off-by: Linus Walleij <linus.walleij at linaro.org>
---
ChangeLog RFCv2->v1
- Correct the PHY power save register from 0x21 to 0x15
  as it should be.
- Drop the comment about the DSA switch.
- Use BIT(12) for power save bit define
- Use phy_set_bits() to simplify code
- Skip assigning genphy_config_aneg() and
  genphy_read_status() as this is default anyway
ChangeLog RFCv1->RFCv2:
- No real changes.
---
 drivers/net/phy/realtek.c | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/drivers/net/phy/realtek.c b/drivers/net/phy/realtek.c
index 082fb40c656d..d0d07f22df1f 100644
--- a/drivers/net/phy/realtek.c
+++ b/drivers/net/phy/realtek.c
@@ -37,6 +37,9 @@
 #define RTL8201F_ISR				0x1e
 #define RTL8201F_IER				0x13
 
+#define RTL8366RB_POWER_SAVE			0x15
+#define RTL8366RB_POWER_SAVE_ON			BIT(12)
+
 MODULE_DESCRIPTION("Realtek PHY driver");
 MODULE_AUTHOR("Johnson Leung");
 MODULE_LICENSE("GPL");
@@ -159,6 +162,24 @@ static int rtl8211b_resume(struct phy_device *phydev)
 	return genphy_resume(phydev);
 }
 
+static int rtl8366rb_config_init(struct phy_device *phydev)
+{
+	int ret;
+
+	ret = genphy_config_init(phydev);
+	if (ret < 0)
+		return ret;
+
+	ret = phy_set_bits(phydev, RTL8366RB_POWER_SAVE,
+			   RTL8366RB_POWER_SAVE_ON);
+	if (ret) {
+		dev_err(&phydev->mdio.dev,
+			"error enabling power management\n");
+	}
+
+	return ret;
+}
+
 static struct phy_driver realtek_drvs[] = {
 	{
 		.phy_id         = 0x00008201,
@@ -223,6 +244,15 @@ static struct phy_driver realtek_drvs[] = {
 		.resume		= genphy_resume,
 		.read_page	= rtl821x_read_page,
 		.write_page	= rtl821x_write_page,
+	}, {
+		.phy_id		= 0x001cc961,
+		.name		= "RTL8366RB Gigabit Ethernet",
+		.phy_id_mask	= 0x001fffff,
+		.features	= PHY_GBIT_FEATURES,
+		.flags		= PHY_HAS_INTERRUPT,
+		.config_init	= &rtl8366rb_config_init,
+		.suspend	= genphy_suspend,
+		.resume		= genphy_resume,
 	},
 };
 
@@ -234,6 +264,7 @@ static struct mdio_device_id __maybe_unused realtek_tbl[] = {
 	{ 0x001cc914, 0x001fffff },
 	{ 0x001cc915, 0x001fffff },
 	{ 0x001cc916, 0x001fffff },
+	{ 0x001cc961, 0x001fffff },
 	{ }
 };
 
-- 
2.17.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From linus.walleij at linaro.org  Sat Jul 14 05:45:54 2018
From: linus.walleij at linaro.org (Linus Walleij)
Date: Sat, 14 Jul 2018 11:45:54 +0200
Subject: [OpenWrt-Devel] [PATCH 2/4 v1] net: dsa: Add bindings for Realtek
 SMI DSAs
In-Reply-To: <20180714094556.30791-1-linus.walleij@linaro.org>
References: <20180714094556.30791-1-linus.walleij@linaro.org>
Message-ID: <20180714094556.30791-2-linus.walleij@linaro.org>

The Realtek SMI family is a set of DSA chips that provide
switching in routers. This binding just follows the pattern
set by other switches but with the introduction of an embedded
irqchip to demux and handle the interrupts fired by the single
line from the chip.

This interrupt construction is similar to how we handle
interrupt controllers inside PCI bridges etc.

Cc: Antti Sepp?l? <a.seppala at gmail.com>
Cc: Roman Yeryomin <roman at advem.lv>
Cc: Colin Leitner <colin.leitner at googlemail.com>
Cc: Gabor Juhos <juhosg at openwrt.org>
Cc: Florian Fainelli <f.fainelli at gmail.com>
Cc: devicetree at vger.kernel.org
Signed-off-by: Linus Walleij <linus.walleij at linaro.org>
---
ChangeLog RFCv2->v1:
- No changes, we agree on these bindings.
ChangeLog RFCv1->RFCv2:
- Switch to Andrew's suggestion to have a local MDIO bus
  definition inside of the DSA device node
- Add realtek,disabled-leds
- Correct WAN IRQ to 12 in the example
---
 .../bindings/net/dsa/realtek-smi.txt          | 153 ++++++++++++++++++
 1 file changed, 153 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/net/dsa/realtek-smi.txt

diff --git a/Documentation/devicetree/bindings/net/dsa/realtek-smi.txt b/Documentation/devicetree/bindings/net/dsa/realtek-smi.txt
new file mode 100644
index 000000000000..b6ae8541bd55
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/dsa/realtek-smi.txt
@@ -0,0 +1,153 @@
+Realtek SMI-based Switches
+==========================
+
+The SMI "Simple Management Interface" is a two-wire protocol using
+bit-banged GPIO that while it reuses the MDIO lines MCK and MDIO does
+not use the MDIO protocol. This binding defines how to specify the
+SMI-based Realtek devices.
+
+Required properties:
+
+- compatible: must be exactly one of:
+      "realtek,rtl8366"
+      "realtek,rtl8366rb" (4+1 ports)
+      "realtek,rtl8366s"  (4+1 ports)
+      "realtek,rtl8367"
+      "realtek,rtl8367b"
+      "realtek,rtl8368s"  (8 port)
+      "realtek,rtl8369"
+      "realtek,rtl8370"   (8 port)
+
+Required properties:
+- mdc-gpios: GPIO line for the MDC clock line.
+- mdio-gpios: GPIO line for the MDIO data line.
+- reset-gpios: GPIO line for the reset signal.
+
+Optional properties:
+- realtek,disable-leds: if the LED drivers are not used in the
+  hardware design this will disable them so they are not turned on
+  and wasting power.
+
+Required subnodes:
+
+- interrupt-controller
+
+  This defines an interrupt controller with an IRQ line (typically
+  a GPIO) that will demultiplex and handle the interrupt from the single
+  interrupt line coming out of one of the SMI-based chips. It most
+  importantly provides link up/down interrupts to the PHY blocks inside
+  the ASIC.
+
+Required properties of interrupt-controller:
+
+- interrupt: parent interrupt, see interrupt-controller/interrupts.txt
+- interrupt-controller: see interrupt-controller/interrupts.txt
+- #address-cells: should be <0>
+- #interrupt-cells: should be <1>
+
+- mdio
+
+  This defines the internal MDIO bus of the SMI device, mostly for the
+  purpose of being able to hook the interrupts to the right PHY and
+  the right PHY to the corresponding port.
+
+Required properties of mdio:
+
+- compatible: should be set to "realtek,smi-mdio" for all SMI devices
+
+See net/mdio.txt for additional MDIO bus properties.
+
+See net/dsa/dsa.txt for a list of additional required and optional properties
+and subnodes of DSA switches.
+
+Examples:
+
+switch {
+	compatible = "realtek,rtl8366rb";
+	/* 22 = MDIO (has input reads), 21 = MDC (clock, output only) */
+	mdc-gpios = <&gpio0 21 GPIO_ACTIVE_HIGH>;
+	mdio-gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>;
+	reset-gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
+
+	switch_intc: interrupt-controller {
+		/* GPIO 15 provides the interrupt */
+		interrupt-parent = <&gpio0>;
+		interrupts = <15 IRQ_TYPE_LEVEL_LOW>;
+		interrupt-controller;
+		#address-cells = <0>;
+		#interrupt-cells = <1>;
+	};
+
+	ports {
+		#address-cells = <1>;
+		#size-cells = <0>;
+		reg = <0>;
+		port at 0 {
+			reg = <0>;
+			label = "lan0";
+			phy-handle = <&phy0>;
+		};
+		port at 1 {
+			reg = <1>;
+			label = "lan1";
+			phy-handle = <&phy1>;
+		};
+		port at 2 {
+			reg = <2>;
+			label = "lan2";
+			phy-handle = <&phy2>;
+		};
+		port at 3 {
+			reg = <3>;
+			label = "lan3";
+			phy-handle = <&phy3>;
+		};
+		port at 4 {
+			reg = <4>;
+			label = "wan";
+			phy-handle = <&phy4>;
+		};
+		port at 5 {
+			reg = <5>;
+			label = "cpu";
+			ethernet = <&gmac0>;
+			phy-mode = "rgmii";
+			fixed-link {
+				speed = <1000>;
+				full-duplex;
+			};
+		};
+	};
+
+	mdio {
+		compatible = "realtek,smi-mdio", "dsa-mdio";
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		phy0: phy at 0 {
+			reg = <0>;
+			interrupt-parent = <&switch_intc>;
+			interrupts = <0>;
+		};
+		phy1: phy at 1 {
+			reg = <1>;
+			interrupt-parent = <&switch_intc>;
+			interrupts = <1>;
+		};
+		phy2: phy at 2 {
+			reg = <2>;
+			interrupt-parent = <&switch_intc>;
+			interrupts = <2>;
+		};
+		phy3: phy at 3 {
+			reg = <3>;
+			interrupt-parent = <&switch_intc>;
+			interrupts = <3>;
+		};
+		phy4: phy at 4 {
+			reg = <4>;
+			interrupt-parent = <&switch_intc>;
+			interrupts = <12>;
+		};
+	};
+};
-- 
2.17.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From linus.walleij at linaro.org  Sat Jul 14 05:45:54 2018
From: linus.walleij at linaro.org (Linus Walleij)
Date: Sat, 14 Jul 2018 11:45:54 +0200
Subject: [OpenWrt-Devel] [PATCH 2/4 v1] net: dsa: Add bindings for Realtek
 SMI DSAs
In-Reply-To: <20180714094556.30791-1-linus.walleij@linaro.org>
References: <20180714094556.30791-1-linus.walleij@linaro.org>
Message-ID: <20180714094556.30791-2-linus.walleij@linaro.org>

The Realtek SMI family is a set of DSA chips that provide
switching in routers. This binding just follows the pattern
set by other switches but with the introduction of an embedded
irqchip to demux and handle the interrupts fired by the single
line from the chip.

This interrupt construction is similar to how we handle
interrupt controllers inside PCI bridges etc.

Cc: Antti Sepp?l? <a.seppala at gmail.com>
Cc: Roman Yeryomin <roman at advem.lv>
Cc: Colin Leitner <colin.leitner at googlemail.com>
Cc: Gabor Juhos <juhosg at openwrt.org>
Cc: Florian Fainelli <f.fainelli at gmail.com>
Cc: devicetree at vger.kernel.org
Signed-off-by: Linus Walleij <linus.walleij at linaro.org>
---
ChangeLog RFCv2->v1:
- No changes, we agree on these bindings.
ChangeLog RFCv1->RFCv2:
- Switch to Andrew's suggestion to have a local MDIO bus
  definition inside of the DSA device node
- Add realtek,disabled-leds
- Correct WAN IRQ to 12 in the example
---
 .../bindings/net/dsa/realtek-smi.txt          | 153 ++++++++++++++++++
 1 file changed, 153 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/net/dsa/realtek-smi.txt

diff --git a/Documentation/devicetree/bindings/net/dsa/realtek-smi.txt b/Documentation/devicetree/bindings/net/dsa/realtek-smi.txt
new file mode 100644
index 000000000000..b6ae8541bd55
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/dsa/realtek-smi.txt
@@ -0,0 +1,153 @@
+Realtek SMI-based Switches
+==========================
+
+The SMI "Simple Management Interface" is a two-wire protocol using
+bit-banged GPIO that while it reuses the MDIO lines MCK and MDIO does
+not use the MDIO protocol. This binding defines how to specify the
+SMI-based Realtek devices.
+
+Required properties:
+
+- compatible: must be exactly one of:
+      "realtek,rtl8366"
+      "realtek,rtl8366rb" (4+1 ports)
+      "realtek,rtl8366s"  (4+1 ports)
+      "realtek,rtl8367"
+      "realtek,rtl8367b"
+      "realtek,rtl8368s"  (8 port)
+      "realtek,rtl8369"
+      "realtek,rtl8370"   (8 port)
+
+Required properties:
+- mdc-gpios: GPIO line for the MDC clock line.
+- mdio-gpios: GPIO line for the MDIO data line.
+- reset-gpios: GPIO line for the reset signal.
+
+Optional properties:
+- realtek,disable-leds: if the LED drivers are not used in the
+  hardware design this will disable them so they are not turned on
+  and wasting power.
+
+Required subnodes:
+
+- interrupt-controller
+
+  This defines an interrupt controller with an IRQ line (typically
+  a GPIO) that will demultiplex and handle the interrupt from the single
+  interrupt line coming out of one of the SMI-based chips. It most
+  importantly provides link up/down interrupts to the PHY blocks inside
+  the ASIC.
+
+Required properties of interrupt-controller:
+
+- interrupt: parent interrupt, see interrupt-controller/interrupts.txt
+- interrupt-controller: see interrupt-controller/interrupts.txt
+- #address-cells: should be <0>
+- #interrupt-cells: should be <1>
+
+- mdio
+
+  This defines the internal MDIO bus of the SMI device, mostly for the
+  purpose of being able to hook the interrupts to the right PHY and
+  the right PHY to the corresponding port.
+
+Required properties of mdio:
+
+- compatible: should be set to "realtek,smi-mdio" for all SMI devices
+
+See net/mdio.txt for additional MDIO bus properties.
+
+See net/dsa/dsa.txt for a list of additional required and optional properties
+and subnodes of DSA switches.
+
+Examples:
+
+switch {
+	compatible = "realtek,rtl8366rb";
+	/* 22 = MDIO (has input reads), 21 = MDC (clock, output only) */
+	mdc-gpios = <&gpio0 21 GPIO_ACTIVE_HIGH>;
+	mdio-gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>;
+	reset-gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
+
+	switch_intc: interrupt-controller {
+		/* GPIO 15 provides the interrupt */
+		interrupt-parent = <&gpio0>;
+		interrupts = <15 IRQ_TYPE_LEVEL_LOW>;
+		interrupt-controller;
+		#address-cells = <0>;
+		#interrupt-cells = <1>;
+	};
+
+	ports {
+		#address-cells = <1>;
+		#size-cells = <0>;
+		reg = <0>;
+		port at 0 {
+			reg = <0>;
+			label = "lan0";
+			phy-handle = <&phy0>;
+		};
+		port at 1 {
+			reg = <1>;
+			label = "lan1";
+			phy-handle = <&phy1>;
+		};
+		port at 2 {
+			reg = <2>;
+			label = "lan2";
+			phy-handle = <&phy2>;
+		};
+		port at 3 {
+			reg = <3>;
+			label = "lan3";
+			phy-handle = <&phy3>;
+		};
+		port at 4 {
+			reg = <4>;
+			label = "wan";
+			phy-handle = <&phy4>;
+		};
+		port at 5 {
+			reg = <5>;
+			label = "cpu";
+			ethernet = <&gmac0>;
+			phy-mode = "rgmii";
+			fixed-link {
+				speed = <1000>;
+				full-duplex;
+			};
+		};
+	};
+
+	mdio {
+		compatible = "realtek,smi-mdio", "dsa-mdio";
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		phy0: phy at 0 {
+			reg = <0>;
+			interrupt-parent = <&switch_intc>;
+			interrupts = <0>;
+		};
+		phy1: phy at 1 {
+			reg = <1>;
+			interrupt-parent = <&switch_intc>;
+			interrupts = <1>;
+		};
+		phy2: phy at 2 {
+			reg = <2>;
+			interrupt-parent = <&switch_intc>;
+			interrupts = <2>;
+		};
+		phy3: phy at 3 {
+			reg = <3>;
+			interrupt-parent = <&switch_intc>;
+			interrupts = <3>;
+		};
+		phy4: phy at 4 {
+			reg = <4>;
+			interrupt-parent = <&switch_intc>;
+			interrupts = <12>;
+		};
+	};
+};
-- 
2.17.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From linus.walleij at linaro.org  Sat Jul 14 05:45:55 2018
From: linus.walleij at linaro.org (Linus Walleij)
Date: Sat, 14 Jul 2018 11:45:55 +0200
Subject: [OpenWrt-Devel] [PATCH 3/4 v1] net: dsa: realtek-smi: Add Realtek
 SMI driver
In-Reply-To: <20180714094556.30791-1-linus.walleij@linaro.org>
References: <20180714094556.30791-1-linus.walleij@linaro.org>
Message-ID: <20180714094556.30791-3-linus.walleij@linaro.org>

This adds a driver core for the Realtek SMI chips and a
subdriver for the RTL8366RB. I just added this chip simply
because it is all I can test.

The code is a massaged variant of the code that has been
sitting out-of-tree in OpenWRT for years in the absence of
a proper switch subsystem. This creates a DSA driver for it.
I have tried to credit the original authors wherever
possible.

The main changes I've done from the OpenWRT code:

- Added an IRQ chip inside the RTL8366RB switch to demux and
  handle the line state IRQs.

- Distributed the phy handling out to the PHY driver.

- Added some RTL8366RB code that was missing in the driver at
  the time, such as setting up "green ethernet" with a funny
  jam table and forcing MAC5 (the CPU port) into 1 GBit.

- Select jam table and add the default jam table from the
  vendor driver, also for ASIC "version 0" if need be.

- Do not store jam tables in the device tree, store them
  in the driver.

- Pick in the "initvals" jam tables from OpenWRT's driver
  and make those get selected per compatible for the
  whole system. It's apparently about electrical settings
  for this system and whatnot, not really configuration
  from device tree.

- Implemented LED control: beware of bugs because there are
  no LEDs on the device I am using!

We do not implement custom DSA tags. This is explained in
a comment in the driver as well: this "tagging protocol" is
not simply a few extra bytes tagged on to the ethernet
frame as DSA is used to. Instead, enabling the CPU tags
will make the switch start talking Realtek RRCP internally.
For example a simple ping will make this kind of packets
appear inside the switch:

0000   ff ff ff ff ff ff bc ae c5 6b a8 3d 88 99 a2 00
0010   08 06 00 01 08 00 06 04 00 01 bc ae c5 6b a8 3d
0020   a9 fe 01 01 00 00 00 00 00 00 a9 fe 01 02 00 00
0030   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

As you can see a custom "8899" tagged packet using the
protocol 0xa2. Norm RRCP appears to always have this
protocol set to 0x01 according to OpenRRCP. You can also
see that this is not a ping packet at all, instead the
switch is starting to talk network management issues
with the CPU port.

So for now custom "tagging" is disabled.

This was tested on the D-Link DIR-685 with initramfs and
OpenWRT userspaces and works fine on all the LAN ports
(lan0 .. lan3). The WAN port is yet not working.

Cc: Antti Sepp?l? <a.seppala at gmail.com>
Cc: Roman Yeryomin <roman at advem.lv>
Cc: Colin Leitner <colin.leitner at googlemail.com>
Cc: Gabor Juhos <juhosg at openwrt.org>
Cc: Florian Fainelli <f.fainelli at gmail.com>
Signed-off-by: Linus Walleij <linus.walleij at linaro.org>
---
ChangeLog RFCv2->v1
- Drop the debugfs leftovers in the state container.
- Use strncpy() to get the MIB strings.
- Renamed Kconfig symbol to NET_DSA_REALTEK_SMI to match
  the PHY symbol better.
- Fixed a ton of checkpatch warnings and errors.
ChangeLog RFCv1->RFCv2:
- Create the internal MDIO bus from the new MDIO node in
  the device tree
- Support disabling all LEDs and LED setup
- Run the per-device "jam tables" to set up registers to
  initial predictable states.
- Fix a bunch of warnings from the static checkers that
  picked up the RFC patch for test immediately
---
 MAINTAINERS                   |    7 +
 drivers/net/dsa/Kconfig       |   11 +
 drivers/net/dsa/Makefile      |    2 +
 drivers/net/dsa/realtek-smi.c |  487 +++++++++++
 drivers/net/dsa/realtek-smi.h |  144 ++++
 drivers/net/dsa/rtl8366.c     |  516 ++++++++++++
 drivers/net/dsa/rtl8366rb.c   | 1424 +++++++++++++++++++++++++++++++++
 7 files changed, 2591 insertions(+)
 create mode 100644 drivers/net/dsa/realtek-smi.c
 create mode 100644 drivers/net/dsa/realtek-smi.h
 create mode 100644 drivers/net/dsa/rtl8366.c
 create mode 100644 drivers/net/dsa/rtl8366rb.c

diff --git a/MAINTAINERS b/MAINTAINERS
index 9d5eeff51b5f..174749b9ef96 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -12048,6 +12048,13 @@ S:	Maintained
 F:	sound/soc/codecs/rt*
 F:	include/sound/rt*.h
 
+REALTEK RTL83xx SMI DSA ROUTER CHIPS
+M:	Linus Walleij <linus.walleij at linaro.org>
+S:	Maintained
+F:	Documentation/devicetree/bindings/net/dsa/realtek-smi.txt
+F:	drivers/net/dsa/realtek-smi*
+F:	drivers/net/dsa/rtl83*
+
 REGISTER MAP ABSTRACTION
 M:	Mark Brown <broonie at kernel.org>
 L:	linux-kernel at vger.kernel.org
diff --git a/drivers/net/dsa/Kconfig b/drivers/net/dsa/Kconfig
index 2b81b97e994f..6bf4de83b34c 100644
--- a/drivers/net/dsa/Kconfig
+++ b/drivers/net/dsa/Kconfig
@@ -52,6 +52,17 @@ config NET_DSA_QCA8K
 	  This enables support for the Qualcomm Atheros QCA8K Ethernet
 	  switch chips.
 
+config NET_DSA_REALTEK_SMI
+	tristate "Realtek SMI Ethernet switch family support"
+	depends on NET_DSA
+	select FIXED_PHY
+	select IRQ_DOMAIN
+	select REALTEK_PHY
+	select REGMAP
+	---help---
+	  This enables support for the Realtek SMI-based switch
+	  chips, currently only RTL8366RB.
+
 config NET_DSA_SMSC_LAN9303
 	tristate
 	select NET_DSA_TAG_LAN9303
diff --git a/drivers/net/dsa/Makefile b/drivers/net/dsa/Makefile
index 15c2a831edf1..89891727579a 100644
--- a/drivers/net/dsa/Makefile
+++ b/drivers/net/dsa/Makefile
@@ -8,6 +8,8 @@ endif
 obj-$(CONFIG_NET_DSA_MT7530)	+= mt7530.o
 obj-$(CONFIG_NET_DSA_MV88E6060) += mv88e6060.o
 obj-$(CONFIG_NET_DSA_QCA8K)	+= qca8k.o
+obj-$(CONFIG_NET_DSA_REALTEK_SMI) += realtek.o
+realtek-objs			:= realtek-smi.o rtl8366.o rtl8366rb.o
 obj-$(CONFIG_NET_DSA_SMSC_LAN9303) += lan9303-core.o
 obj-$(CONFIG_NET_DSA_SMSC_LAN9303_I2C) += lan9303_i2c.o
 obj-$(CONFIG_NET_DSA_SMSC_LAN9303_MDIO) += lan9303_mdio.o
diff --git a/drivers/net/dsa/realtek-smi.c b/drivers/net/dsa/realtek-smi.c
new file mode 100644
index 000000000000..f941f4582825
--- /dev/null
+++ b/drivers/net/dsa/realtek-smi.c
@@ -0,0 +1,487 @@
+// SPDX-License-Identifier: GPL-2.0+
+/* Realtek Simple Management Interface (SMI) driver
+ * It can be discussed how "simple" this interface is.
+ *
+ * The SMI protocol piggy-backs the MDIO MDC and MDIO signals levels
+ * but the protocol is not MDIO at all. Instead it is a Realtek
+ * pecularity that need to bit-bang the lines in a special way to
+ * communicate with the switch.
+ *
+ * ASICs we intend to support with this driver:
+ *
+ * RTL8366   - The original version, apparently
+ * RTL8369   - Similar enough to have the same datsheet as RTL8366
+ * RTL8366RB - Probably reads out "RTL8366 revision B", has a quite
+ *             different register layout from the other two
+ * RTL8366S  - Is this "RTL8366 super"?
+ * RTL8367   - Has an OpenWRT driver as well
+ * RTL8368S  - Seems to be an alternative name for RTL8366RB
+ * RTL8370   - Also uses SMI
+ *
+ * Copyright (C) 2017 Linus Walleij <linus.walleij at linaro.org>
+ * Copyright (C) 2010 Antti Sepp?l? <a.seppala at gmail.com>
+ * Copyright (C) 2010 Roman Yeryomin <roman at advem.lv>
+ * Copyright (C) 2011 Colin Leitner <colin.leitner at googlemail.com>
+ * Copyright (C) 2009-2010 Gabor Juhos <juhosg at openwrt.org>
+ */
+
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/device.h>
+#include <linux/spinlock.h>
+#include <linux/skbuff.h>
+#include <linux/of.h>
+#include <linux/of_device.h>
+#include <linux/of_mdio.h>
+#include <linux/delay.h>
+#include <linux/gpio/consumer.h>
+#include <linux/platform_device.h>
+#include <linux/regmap.h>
+#include <linux/bitops.h>
+#include <linux/if_bridge.h>
+
+#include "realtek-smi.h"
+
+#define REALTEK_SMI_ACK_RETRY_COUNT		5
+#define REALTEK_SMI_HW_STOP_DELAY		25	/* msecs */
+#define REALTEK_SMI_HW_START_DELAY		100	/* msecs */
+
+static inline void realtek_smi_clk_delay(struct realtek_smi *smi)
+{
+	ndelay(smi->clk_delay);
+}
+
+static void realtek_smi_start(struct realtek_smi *smi)
+{
+	/* Set GPIO pins to output mode, with initial state:
+	 * SCK = 0, SDA = 1
+	 */
+	gpiod_direction_output(smi->mdc, 0);
+	gpiod_direction_output(smi->mdio, 1);
+	realtek_smi_clk_delay(smi);
+
+	/* CLK 1: 0 -> 1, 1 -> 0 */
+	gpiod_set_value(smi->mdc, 1);
+	realtek_smi_clk_delay(smi);
+	gpiod_set_value(smi->mdc, 0);
+	realtek_smi_clk_delay(smi);
+
+	/* CLK 2: */
+	gpiod_set_value(smi->mdc, 1);
+	realtek_smi_clk_delay(smi);
+	gpiod_set_value(smi->mdio, 0);
+	realtek_smi_clk_delay(smi);
+	gpiod_set_value(smi->mdc, 0);
+	realtek_smi_clk_delay(smi);
+	gpiod_set_value(smi->mdio, 1);
+}
+
+static void realtek_smi_stop(struct realtek_smi *smi)
+{
+	realtek_smi_clk_delay(smi);
+	gpiod_set_value(smi->mdio, 0);
+	gpiod_set_value(smi->mdc, 1);
+	realtek_smi_clk_delay(smi);
+	gpiod_set_value(smi->mdio, 1);
+	realtek_smi_clk_delay(smi);
+	gpiod_set_value(smi->mdc, 1);
+	realtek_smi_clk_delay(smi);
+	gpiod_set_value(smi->mdc, 0);
+	realtek_smi_clk_delay(smi);
+	gpiod_set_value(smi->mdc, 1);
+
+	/* Add a click */
+	realtek_smi_clk_delay(smi);
+	gpiod_set_value(smi->mdc, 0);
+	realtek_smi_clk_delay(smi);
+	gpiod_set_value(smi->mdc, 1);
+
+	/* Set GPIO pins to input mode */
+	gpiod_direction_input(smi->mdio);
+	gpiod_direction_input(smi->mdc);
+}
+
+static void realtek_smi_write_bits(struct realtek_smi *smi, u32 data, u32 len)
+{
+	for (; len > 0; len--) {
+		realtek_smi_clk_delay(smi);
+
+		/* Prepare data */
+		gpiod_set_value(smi->mdio, !!(data & (1 << (len - 1))));
+		realtek_smi_clk_delay(smi);
+
+		/* Clocking */
+		gpiod_set_value(smi->mdc, 1);
+		realtek_smi_clk_delay(smi);
+		gpiod_set_value(smi->mdc, 0);
+	}
+}
+
+static void realtek_smi_read_bits(struct realtek_smi *smi, u32 len, u32 *data)
+{
+	gpiod_direction_input(smi->mdio);
+
+	for (*data = 0; len > 0; len--) {
+		u32 u;
+
+		realtek_smi_clk_delay(smi);
+
+		/* Clocking */
+		gpiod_set_value(smi->mdc, 1);
+		realtek_smi_clk_delay(smi);
+		u = !!gpiod_get_value(smi->mdio);
+		gpiod_set_value(smi->mdc, 0);
+
+		*data |= (u << (len - 1));
+	}
+
+	gpiod_direction_output(smi->mdio, 0);
+}
+
+static int realtek_smi_wait_for_ack(struct realtek_smi *smi)
+{
+	int retry_cnt;
+
+	retry_cnt = 0;
+	do {
+		u32 ack;
+
+		realtek_smi_read_bits(smi, 1, &ack);
+		if (ack == 0)
+			break;
+
+		if (++retry_cnt > REALTEK_SMI_ACK_RETRY_COUNT) {
+			dev_err(smi->dev, "ACK timeout\n");
+			return -ETIMEDOUT;
+		}
+	} while (1);
+
+	return 0;
+}
+
+static int realtek_smi_write_byte(struct realtek_smi *smi, u8 data)
+{
+	realtek_smi_write_bits(smi, data, 8);
+	return realtek_smi_wait_for_ack(smi);
+}
+
+static int realtek_smi_write_byte_noack(struct realtek_smi *smi, u8 data)
+{
+	realtek_smi_write_bits(smi, data, 8);
+	return 0;
+}
+
+static int realtek_smi_read_byte0(struct realtek_smi *smi, u8 *data)
+{
+	u32 t;
+
+	/* Read data */
+	realtek_smi_read_bits(smi, 8, &t);
+	*data = (t & 0xff);
+
+	/* Send an ACK */
+	realtek_smi_write_bits(smi, 0x00, 1);
+
+	return 0;
+}
+
+static int realtek_smi_read_byte1(struct realtek_smi *smi, u8 *data)
+{
+	u32 t;
+
+	/* Read data */
+	realtek_smi_read_bits(smi, 8, &t);
+	*data = (t & 0xff);
+
+	/* Send an ACK */
+	realtek_smi_write_bits(smi, 0x01, 1);
+
+	return 0;
+}
+
+static int realtek_smi_read_reg(struct realtek_smi *smi, u32 addr, u32 *data)
+{
+	unsigned long flags;
+	u8 lo = 0;
+	u8 hi = 0;
+	int ret;
+
+	spin_lock_irqsave(&smi->lock, flags);
+
+	realtek_smi_start(smi);
+
+	/* Send READ command */
+	ret = realtek_smi_write_byte(smi, smi->cmd_read);
+	if (ret)
+		goto out;
+
+	/* Set ADDR[7:0] */
+	ret = realtek_smi_write_byte(smi, addr & 0xff);
+	if (ret)
+		goto out;
+
+	/* Set ADDR[15:8] */
+	ret = realtek_smi_write_byte(smi, addr >> 8);
+	if (ret)
+		goto out;
+
+	/* Read DATA[7:0] */
+	realtek_smi_read_byte0(smi, &lo);
+	/* Read DATA[15:8] */
+	realtek_smi_read_byte1(smi, &hi);
+
+	*data = ((u32)lo) | (((u32)hi) << 8);
+
+	ret = 0;
+
+ out:
+	realtek_smi_stop(smi);
+	spin_unlock_irqrestore(&smi->lock, flags);
+
+	return ret;
+}
+
+static int realtek_smi_write_reg(struct realtek_smi *smi,
+				 u32 addr, u32 data, bool ack)
+{
+	unsigned long flags;
+	int ret;
+
+	spin_lock_irqsave(&smi->lock, flags);
+
+	realtek_smi_start(smi);
+
+	/* Send WRITE command */
+	ret = realtek_smi_write_byte(smi, smi->cmd_write);
+	if (ret)
+		goto out;
+
+	/* Set ADDR[7:0] */
+	ret = realtek_smi_write_byte(smi, addr & 0xff);
+	if (ret)
+		goto out;
+
+	/* Set ADDR[15:8] */
+	ret = realtek_smi_write_byte(smi, addr >> 8);
+	if (ret)
+		goto out;
+
+	/* Write DATA[7:0] */
+	ret = realtek_smi_write_byte(smi, data & 0xff);
+	if (ret)
+		goto out;
+
+	/* Write DATA[15:8] */
+	if (ack)
+		ret = realtek_smi_write_byte(smi, data >> 8);
+	else
+		ret = realtek_smi_write_byte_noack(smi, data >> 8);
+	if (ret)
+		goto out;
+
+	ret = 0;
+
+ out:
+	realtek_smi_stop(smi);
+	spin_unlock_irqrestore(&smi->lock, flags);
+
+	return ret;
+}
+
+/* There is one single case when we need to use this accessor and that
+ * is when issueing soft reset. Since the device reset as soon as we write
+ * that bit, no ACK will come back for natural reasons.
+ */
+int realtek_smi_write_reg_noack(struct realtek_smi *smi, u32 addr,
+				u32 data)
+{
+	return realtek_smi_write_reg(smi, addr, data, false);
+}
+EXPORT_SYMBOL_GPL(realtek_smi_write_reg_noack);
+
+/* Regmap accessors */
+
+static int realtek_smi_write(void *ctx, u32 reg, u32 val)
+{
+	struct realtek_smi *smi = ctx;
+
+	return realtek_smi_write_reg(smi, reg, val, true);
+}
+
+static int realtek_smi_read(void *ctx, u32 reg, u32 *val)
+{
+	struct realtek_smi *smi = ctx;
+
+	return realtek_smi_read_reg(smi, reg, val);
+}
+
+static const struct regmap_config realtek_smi_mdio_regmap_config = {
+	.reg_bits = 10, /* A4..A0 R4..R0 */
+	.val_bits = 16,
+	.reg_stride = 1,
+	/* PHY regs are at 0x8000 */
+	.max_register = 0xffff,
+	.reg_format_endian = REGMAP_ENDIAN_BIG,
+	.reg_read = realtek_smi_read,
+	.reg_write = realtek_smi_write,
+	.cache_type = REGCACHE_NONE,
+};
+
+static int realtek_smi_mdio_read(struct mii_bus *bus, int addr, int regnum)
+{
+	struct realtek_smi *smi = bus->priv;
+
+	return smi->ops->phy_read(smi, addr, regnum);
+}
+
+static int realtek_smi_mdio_write(struct mii_bus *bus, int addr, int regnum,
+				  u16 val)
+{
+	struct realtek_smi *smi = bus->priv;
+
+	return smi->ops->phy_write(smi, addr, regnum, val);
+}
+
+int realtek_smi_setup_mdio(struct realtek_smi *smi)
+{
+	struct device_node *mdio_np;
+	int ret;
+
+	mdio_np = of_find_compatible_node(smi->dev->of_node, NULL,
+					  "realtek,smi-mdio");
+	if (!mdio_np) {
+		dev_err(smi->dev, "no MDIO bus node\n");
+		return -ENODEV;
+	}
+
+	smi->slave_mii_bus = devm_mdiobus_alloc(smi->dev);
+	if (!smi->slave_mii_bus)
+		return -ENOMEM;
+	smi->slave_mii_bus->priv = smi;
+	smi->slave_mii_bus->name = "SMI slave MII";
+	smi->slave_mii_bus->read = realtek_smi_mdio_read;
+	smi->slave_mii_bus->write = realtek_smi_mdio_write;
+	snprintf(smi->slave_mii_bus->id, MII_BUS_ID_SIZE, "SMI-%d",
+		 smi->ds->index);
+	smi->slave_mii_bus->dev.of_node = mdio_np;
+	smi->slave_mii_bus->parent = smi->dev;
+	smi->ds->slave_mii_bus = smi->slave_mii_bus;
+
+	ret = of_mdiobus_register(smi->slave_mii_bus, mdio_np);
+	if (ret) {
+		dev_err(smi->dev, "unable to register MDIO bus %s\n",
+			smi->slave_mii_bus->id);
+		of_node_put(mdio_np);
+	}
+
+	return 0;
+}
+
+static int realtek_smi_probe(struct platform_device *pdev)
+{
+	const struct realtek_smi_variant *var;
+	struct device *dev = &pdev->dev;
+	struct realtek_smi *smi;
+	struct device_node *np;
+	int ret;
+
+	var = of_device_get_match_data(dev);
+	np = dev->of_node;
+
+	smi = devm_kzalloc(dev, sizeof(*smi), GFP_KERNEL);
+	if (!smi)
+		return -ENOMEM;
+	smi->map = devm_regmap_init(dev, NULL, smi,
+				    &realtek_smi_mdio_regmap_config);
+	if (IS_ERR(smi->map)) {
+		ret = PTR_ERR(smi->map);
+		dev_err(dev, "regmap init failed: %d\n", ret);
+		return ret;
+	}
+
+	/* Link forward and backward */
+	smi->dev = dev;
+	smi->clk_delay = var->clk_delay;
+	smi->cmd_read = var->cmd_read;
+	smi->cmd_write = var->cmd_write;
+	smi->ops = var->ops;
+
+	dev_set_drvdata(dev, smi);
+	spin_lock_init(&smi->lock);
+
+	/* TODO: if power is software controlled, set up any regulators here */
+
+	/* Assert then deassert RESET */
+	smi->reset = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_HIGH);
+	if (IS_ERR(smi->reset)) {
+		dev_err(dev, "failed to get RESET GPIO\n");
+		return PTR_ERR(smi->reset);
+	}
+	msleep(REALTEK_SMI_HW_STOP_DELAY);
+	gpiod_set_value(smi->reset, 0);
+	msleep(REALTEK_SMI_HW_START_DELAY);
+	dev_info(dev, "deasserted RESET\n");
+
+	/* Fetch MDIO pins */
+	smi->mdc = devm_gpiod_get_optional(dev, "mdc", GPIOD_OUT_LOW);
+	if (IS_ERR(smi->mdc))
+		return PTR_ERR(smi->mdc);
+	smi->mdio = devm_gpiod_get_optional(dev, "mdio", GPIOD_OUT_LOW);
+	if (IS_ERR(smi->mdio))
+		return PTR_ERR(smi->mdio);
+
+	smi->leds_disabled = of_property_read_bool(np, "realtek,disable-leds");
+
+	ret = smi->ops->detect(smi);
+	if (ret) {
+		dev_err(dev, "unable to detect switch\n");
+		return ret;
+	}
+
+	smi->ds = dsa_switch_alloc(dev, smi->num_ports);
+	if (!smi->ds)
+		return -ENOMEM;
+	smi->ds->priv = smi;
+
+	smi->ds->ops = var->ds_ops;
+	ret = dsa_register_switch(smi->ds);
+	if (ret) {
+		dev_err(dev, "unable to register switch ret = %d\n", ret);
+		return ret;
+	}
+	return 0;
+}
+
+static int realtek_smi_remove(struct platform_device *pdev)
+{
+	struct realtek_smi *smi = dev_get_drvdata(&pdev->dev);
+
+	dsa_unregister_switch(smi->ds);
+	gpiod_set_value(smi->reset, 1);
+
+	return 0;
+}
+
+static const struct of_device_id realtek_smi_of_match[] = {
+	{
+		.compatible = "realtek,rtl8366rb",
+		.data = &rtl8366rb_variant,
+	},
+	{
+		/* FIXME: add support for RTL8366S and more */
+		.compatible = "realtek,rtl8366s",
+		.data = NULL,
+	},
+	{ /* sentinel */ },
+};
+MODULE_DEVICE_TABLE(of, realtek_smi_of_match);
+
+static struct platform_driver realtek_smi_driver = {
+	.driver = {
+		.name = "realtek-smi",
+		.of_match_table = of_match_ptr(realtek_smi_of_match),
+	},
+	.probe  = realtek_smi_probe,
+	.remove = realtek_smi_remove,
+};
+module_platform_driver(realtek_smi_driver);
diff --git a/drivers/net/dsa/realtek-smi.h b/drivers/net/dsa/realtek-smi.h
new file mode 100644
index 000000000000..9a63b51e1d82
--- /dev/null
+++ b/drivers/net/dsa/realtek-smi.h
@@ -0,0 +1,144 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/* Realtek SMI interface driver defines
+ *
+ * Copyright (C) 2017 Linus Walleij <linus.walleij at linaro.org>
+ * Copyright (C) 2009-2010 Gabor Juhos <juhosg at openwrt.org>
+ */
+
+#ifndef _REALTEK_SMI_H
+#define _REALTEK_SMI_H
+
+#include <linux/phy.h>
+#include <linux/platform_device.h>
+#include <linux/gpio/consumer.h>
+#include <net/dsa.h>
+
+struct realtek_smi_ops;
+struct dentry;
+struct inode;
+struct file;
+
+struct rtl8366_mib_counter {
+	unsigned int	base;
+	unsigned int	offset;
+	unsigned int	length;
+	const char	*name;
+};
+
+struct rtl8366_vlan_mc {
+	u16	vid;
+	u16	untag;
+	u16	member;
+	u8	fid;
+	u8	priority;
+};
+
+struct rtl8366_vlan_4k {
+	u16	vid;
+	u16	untag;
+	u16	member;
+	u8	fid;
+};
+
+struct realtek_smi {
+	struct device		*dev;
+	struct gpio_desc	*reset;
+	struct gpio_desc	*mdc;
+	struct gpio_desc	*mdio;
+	struct regmap		*map;
+	struct mii_bus		*slave_mii_bus;
+
+	unsigned int		clk_delay;
+	u8			cmd_read;
+	u8			cmd_write;
+	spinlock_t		lock; /* Locks around command writes */
+	struct dsa_switch	*ds;
+	struct irq_domain	*irqdomain;
+	bool			leds_disabled;
+
+	unsigned int		cpu_port;
+	unsigned int		num_ports;
+	unsigned int		num_vlan_mc;
+	unsigned int		num_mib_counters;
+	struct rtl8366_mib_counter *mib_counters;
+
+	const struct realtek_smi_ops *ops;
+
+	int			vlan_enabled;
+	int			vlan4k_enabled;
+
+	char			buf[4096];
+};
+
+/**
+ * struct realtek_smi_ops - vtable for the per-SMI-chiptype operations
+ * @detect: detects the chiptype
+ */
+struct realtek_smi_ops {
+	int	(*detect)(struct realtek_smi *smi);
+	int	(*reset_chip)(struct realtek_smi *smi);
+	int	(*setup)(struct realtek_smi *smi);
+	void	(*cleanup)(struct realtek_smi *smi);
+	int	(*get_mib_counter)(struct realtek_smi *smi,
+				   int port,
+				   struct rtl8366_mib_counter *mib,
+				   u64 *mibvalue);
+	int	(*get_vlan_mc)(struct realtek_smi *smi, u32 index,
+			       struct rtl8366_vlan_mc *vlanmc);
+	int	(*set_vlan_mc)(struct realtek_smi *smi, u32 index,
+			       const struct rtl8366_vlan_mc *vlanmc);
+	int	(*get_vlan_4k)(struct realtek_smi *smi, u32 vid,
+			       struct rtl8366_vlan_4k *vlan4k);
+	int	(*set_vlan_4k)(struct realtek_smi *smi,
+			       const struct rtl8366_vlan_4k *vlan4k);
+	int	(*get_mc_index)(struct realtek_smi *smi, int port, int *val);
+	int	(*set_mc_index)(struct realtek_smi *smi, int port, int index);
+	bool	(*is_vlan_valid)(struct realtek_smi *smi, unsigned int vlan);
+	int	(*enable_vlan)(struct realtek_smi *smi, bool enable);
+	int	(*enable_vlan4k)(struct realtek_smi *smi, bool enable);
+	int	(*enable_port)(struct realtek_smi *smi, int port, bool enable);
+	int	(*phy_read)(struct realtek_smi *smi, int phy, int regnum);
+	int	(*phy_write)(struct realtek_smi *smi, int phy, int regnum,
+			     u16 val);
+};
+
+struct realtek_smi_variant {
+	const struct dsa_switch_ops *ds_ops;
+	const struct realtek_smi_ops *ops;
+	unsigned int clk_delay;
+	u8 cmd_read;
+	u8 cmd_write;
+};
+
+/* SMI core calls */
+int realtek_smi_write_reg_noack(struct realtek_smi *smi, u32 addr,
+				u32 data);
+int realtek_smi_setup_mdio(struct realtek_smi *smi);
+
+/* RTL8366 library helpers */
+int rtl8366_mc_is_used(struct realtek_smi *smi, int mc_index, int *used);
+int rtl8366_set_vlan(struct realtek_smi *smi, int vid, u32 member,
+		     u32 untag, u32 fid);
+int rtl8366_get_pvid(struct realtek_smi *smi, int port, int *val);
+int rtl8366_set_pvid(struct realtek_smi *smi, unsigned int port,
+		     unsigned int vid);
+int rtl8366_enable_vlan4k(struct realtek_smi *smi, bool enable);
+int rtl8366_enable_vlan(struct realtek_smi *smi, bool enable);
+int rtl8366_reset_vlan(struct realtek_smi *smi);
+int rtl8366_init_vlan(struct realtek_smi *smi);
+int rtl8366_vlan_filtering(struct dsa_switch *ds, int port,
+			   bool vlan_filtering);
+int rtl8366_vlan_prepare(struct dsa_switch *ds, int port,
+			 const struct switchdev_obj_port_vlan *vlan);
+void rtl8366_vlan_add(struct dsa_switch *ds, int port,
+		      const struct switchdev_obj_port_vlan *vlan);
+int rtl8366_vlan_del(struct dsa_switch *ds, int port,
+		     const struct switchdev_obj_port_vlan *vlan);
+void rtl8366_get_strings(struct dsa_switch *ds, int port, u32 stringset,
+			 uint8_t *data);
+int rtl8366_get_sset_count(struct dsa_switch *ds, int port, int sset);
+void rtl8366_get_ethtool_stats(struct dsa_switch *ds, int port, uint64_t *data);
+
+extern const struct realtek_smi_variant rtl8366rb_variant;
+
+#endif /*  _REALTEK_SMI_H */
diff --git a/drivers/net/dsa/rtl8366.c b/drivers/net/dsa/rtl8366.c
new file mode 100644
index 000000000000..58d8534f7ecb
--- /dev/null
+++ b/drivers/net/dsa/rtl8366.c
@@ -0,0 +1,516 @@
+// SPDX-License-Identifier: GPL-2.0
+/* Realtek SMI library helpers for the RTL8366x variants
+ * RTL8366RB and RTL8366S
+ *
+ * Copyright (C) 2017 Linus Walleij <linus.walleij at linaro.org>
+ * Copyright (C) 2009-2010 Gabor Juhos <juhosg at openwrt.org>
+ * Copyright (C) 2010 Antti Sepp?l? <a.seppala at gmail.com>
+ * Copyright (C) 2010 Roman Yeryomin <roman at advem.lv>
+ * Copyright (C) 2011 Colin Leitner <colin.leitner at googlemail.com>
+ */
+#include <linux/if_bridge.h>
+#include <net/dsa.h>
+
+#include "realtek-smi.h"
+
+int rtl8366_mc_is_used(struct realtek_smi *smi, int mc_index, int *used)
+{
+	int ret;
+	int i;
+
+	*used = 0;
+	for (i = 0; i < smi->num_ports; i++) {
+		int index = 0;
+
+		ret = smi->ops->get_mc_index(smi, i, &index);
+		if (ret)
+			return ret;
+
+		if (mc_index == index) {
+			*used = 1;
+			break;
+		}
+	}
+
+	return 0;
+}
+EXPORT_SYMBOL_GPL(rtl8366_mc_is_used);
+
+int rtl8366_set_vlan(struct realtek_smi *smi, int vid, u32 member,
+		     u32 untag, u32 fid)
+{
+	struct rtl8366_vlan_4k vlan4k;
+	int ret;
+	int i;
+
+	/* Update the 4K table */
+	ret = smi->ops->get_vlan_4k(smi, vid, &vlan4k);
+	if (ret)
+		return ret;
+
+	vlan4k.member = member;
+	vlan4k.untag = untag;
+	vlan4k.fid = fid;
+	ret = smi->ops->set_vlan_4k(smi, &vlan4k);
+	if (ret)
+		return ret;
+
+	/* Try to find an existing MC entry for this VID */
+	for (i = 0; i < smi->num_vlan_mc; i++) {
+		struct rtl8366_vlan_mc vlanmc;
+
+		ret = smi->ops->get_vlan_mc(smi, i, &vlanmc);
+		if (ret)
+			return ret;
+
+		if (vid == vlanmc.vid) {
+			/* update the MC entry */
+			vlanmc.member = member;
+			vlanmc.untag = untag;
+			vlanmc.fid = fid;
+
+			ret = smi->ops->set_vlan_mc(smi, i, &vlanmc);
+			break;
+		}
+	}
+
+	return ret;
+}
+EXPORT_SYMBOL_GPL(rtl8366_set_vlan);
+
+int rtl8366_get_pvid(struct realtek_smi *smi, int port, int *val)
+{
+	struct rtl8366_vlan_mc vlanmc;
+	int ret;
+	int index;
+
+	ret = smi->ops->get_mc_index(smi, port, &index);
+	if (ret)
+		return ret;
+
+	ret = smi->ops->get_vlan_mc(smi, index, &vlanmc);
+	if (ret)
+		return ret;
+
+	*val = vlanmc.vid;
+	return 0;
+}
+EXPORT_SYMBOL_GPL(rtl8366_get_pvid);
+
+int rtl8366_set_pvid(struct realtek_smi *smi, unsigned int port,
+		     unsigned int vid)
+{
+	struct rtl8366_vlan_mc vlanmc;
+	struct rtl8366_vlan_4k vlan4k;
+	int ret;
+	int i;
+
+	/* Try to find an existing MC entry for this VID */
+	for (i = 0; i < smi->num_vlan_mc; i++) {
+		ret = smi->ops->get_vlan_mc(smi, i, &vlanmc);
+		if (ret)
+			return ret;
+
+		if (vid == vlanmc.vid) {
+			ret = smi->ops->set_vlan_mc(smi, i, &vlanmc);
+			if (ret)
+				return ret;
+
+			ret = smi->ops->set_mc_index(smi, port, i);
+			return ret;
+		}
+	}
+
+	/* We have no MC entry for this VID, try to find an empty one */
+	for (i = 0; i < smi->num_vlan_mc; i++) {
+		ret = smi->ops->get_vlan_mc(smi, i, &vlanmc);
+		if (ret)
+			return ret;
+
+		if (vlanmc.vid == 0 && vlanmc.member == 0) {
+			/* Update the entry from the 4K table */
+			ret = smi->ops->get_vlan_4k(smi, vid, &vlan4k);
+			if (ret)
+				return ret;
+
+			vlanmc.vid = vid;
+			vlanmc.member = vlan4k.member;
+			vlanmc.untag = vlan4k.untag;
+			vlanmc.fid = vlan4k.fid;
+			ret = smi->ops->set_vlan_mc(smi, i, &vlanmc);
+			if (ret)
+				return ret;
+
+			ret = smi->ops->set_mc_index(smi, port, i);
+			return ret;
+		}
+	}
+
+	/* MC table is full, try to find an unused entry and replace it */
+	for (i = 0; i < smi->num_vlan_mc; i++) {
+		int used;
+
+		ret = rtl8366_mc_is_used(smi, i, &used);
+		if (ret)
+			return ret;
+
+		if (!used) {
+			/* Update the entry from the 4K table */
+			ret = smi->ops->get_vlan_4k(smi, vid, &vlan4k);
+			if (ret)
+				return ret;
+
+			vlanmc.vid = vid;
+			vlanmc.member = vlan4k.member;
+			vlanmc.untag = vlan4k.untag;
+			vlanmc.fid = vlan4k.fid;
+			ret = smi->ops->set_vlan_mc(smi, i, &vlanmc);
+			if (ret)
+				return ret;
+
+			ret = smi->ops->set_mc_index(smi, port, i);
+			return ret;
+		}
+	}
+
+	dev_err(smi->dev,
+		"all VLAN member configurations are in use\n");
+
+	return -ENOSPC;
+}
+EXPORT_SYMBOL_GPL(rtl8366_set_pvid);
+
+int rtl8366_enable_vlan4k(struct realtek_smi *smi, bool enable)
+{
+	int ret;
+
+	/* To enable 4k VLAN, ordinary VLAN must be enabled first,
+	 * but if we disable 4k VLAN it is fine to leave ordinary
+	 * VLAN enabled.
+	 */
+	if (enable) {
+		/* Make sure VLAN is ON */
+		ret = smi->ops->enable_vlan(smi, true);
+		if (ret)
+			return ret;
+
+		smi->vlan_enabled = true;
+	}
+
+	ret = smi->ops->enable_vlan4k(smi, enable);
+	if (ret)
+		return ret;
+
+	smi->vlan4k_enabled = enable;
+	return 0;
+}
+EXPORT_SYMBOL_GPL(rtl8366_enable_vlan4k);
+
+int rtl8366_enable_vlan(struct realtek_smi *smi, bool enable)
+{
+	int ret;
+
+	ret = smi->ops->enable_vlan(smi, enable);
+	if (ret)
+		return ret;
+
+	smi->vlan_enabled = enable;
+
+	/* If we turn VLAN off, make sure that we turn off
+	 * 4k VLAN as well, if that happened to be on.
+	 */
+	if (!enable) {
+		smi->vlan4k_enabled = false;
+		ret = smi->ops->enable_vlan4k(smi, false);
+	}
+
+	return ret;
+}
+EXPORT_SYMBOL_GPL(rtl8366_enable_vlan);
+
+int rtl8366_reset_vlan(struct realtek_smi *smi)
+{
+	struct rtl8366_vlan_mc vlanmc;
+	struct rtl8366_vlan_4k vlan4k;
+	int ret;
+	int i;
+
+	rtl8366_enable_vlan(smi, false);
+	rtl8366_enable_vlan4k(smi, false);
+
+	/* Clear the 16 VLAN member configurations */
+	vlanmc.vid = 0;
+	vlanmc.priority = 0;
+	vlanmc.member = 0;
+	vlanmc.untag = 0;
+	vlanmc.fid = 0;
+	for (i = 0; i < smi->num_vlan_mc; i++) {
+		ret = smi->ops->set_vlan_mc(smi, i, &vlanmc);
+		if (ret)
+			return ret;
+	}
+
+	return 0;
+}
+EXPORT_SYMBOL_GPL(rtl8366_reset_vlan);
+
+int rtl8366_init_vlan(struct realtek_smi *smi)
+{
+	int port;
+	int ret;
+
+	ret = rtl8366_reset_vlan(smi);
+	if (ret)
+		return ret;
+
+	/* Loop over the available ports, for each port, associate
+	 * it with the VLAN (port+1)
+	 */
+	for (port = 0; port < smi->num_ports; port++) {
+		u32 mask;
+
+		if (port == smi->cpu_port)
+			/* For the CPU port, make all ports members of this
+			 * VLAN.
+			 */
+			mask = GENMASK(smi->num_ports - 1, 0);
+		else
+			/* For all other ports, enable itself plus the
+			 * CPU port.
+			 */
+			mask = BIT(port) | BIT(smi->cpu_port);
+
+		/* For each port, set the port as member of VLAN (port+1)
+		 * and untagged, except for the CPU port: the CPU port (5) is
+		 * member of VLAN 6 and so are ALL the other ports as well.
+		 * Use filter 0 (no filter).
+		 */
+		dev_info(smi->dev, "VLAN%d port mask for port %d, %08x\n",
+			 (port + 1), port, mask);
+		ret = rtl8366_set_vlan(smi, (port + 1), mask, mask, 0);
+		if (ret)
+			return ret;
+
+		dev_info(smi->dev, "VLAN%d port %d, PVID set to %d\n",
+			 (port + 1), port, (port + 1));
+		ret = rtl8366_set_pvid(smi, port, (port + 1));
+		if (ret)
+			return ret;
+	}
+
+	return rtl8366_enable_vlan(smi, true);
+}
+EXPORT_SYMBOL_GPL(rtl8366_init_vlan);
+
+int rtl8366_vlan_filtering(struct dsa_switch *ds, int port, bool vlan_filtering)
+{
+	struct realtek_smi *smi = ds->priv;
+	struct rtl8366_vlan_4k vlan4k;
+	int ret;
+
+	if (!smi->ops->is_vlan_valid(smi, port))
+		return -EINVAL;
+
+	dev_info(smi->dev, "%s filtering on port %d\n",
+		 vlan_filtering ? "enable" : "disable",
+		 port);
+
+	/* TODO:
+	 * The hardware support filter ID (FID) 0..7, I have no clue how to
+	 * support this in the driver when the callback only says on/off.
+	 */
+	ret = smi->ops->get_vlan_4k(smi, port, &vlan4k);
+	if (ret)
+		return ret;
+
+	/* Just set the filter to FID 1 for now then */
+	ret = rtl8366_set_vlan(smi, port,
+			       vlan4k.member,
+			       vlan4k.untag,
+			       1);
+	if (ret)
+		return ret;
+
+	return 0;
+}
+EXPORT_SYMBOL_GPL(rtl8366_vlan_filtering);
+
+int rtl8366_vlan_prepare(struct dsa_switch *ds, int port,
+			 const struct switchdev_obj_port_vlan *vlan)
+{
+	struct realtek_smi *smi = ds->priv;
+	int ret;
+
+	if (!smi->ops->is_vlan_valid(smi, port))
+		return -EINVAL;
+
+	dev_info(smi->dev, "prepare VLANs %04x..%04x\n",
+		 vlan->vid_begin, vlan->vid_end);
+
+	/* Enable VLAN in the hardware
+	 * FIXME: what's with this 4k business?
+	 * Just rtl8366_enable_vlan() seems inconclusive.
+	 */
+	ret = rtl8366_enable_vlan4k(smi, true);
+	if (ret)
+		return ret;
+
+	return 0;
+}
+EXPORT_SYMBOL_GPL(rtl8366_vlan_prepare);
+
+void rtl8366_vlan_add(struct dsa_switch *ds, int port,
+		      const struct switchdev_obj_port_vlan *vlan)
+{
+	bool untagged = !!(vlan->flags & BRIDGE_VLAN_INFO_UNTAGGED);
+	bool pvid = !!(vlan->flags & BRIDGE_VLAN_INFO_PVID);
+	struct realtek_smi *smi = ds->priv;
+	u32 member = 0;
+	u32 untag = 0;
+	u16 vid;
+	int ret;
+
+	if (!smi->ops->is_vlan_valid(smi, port))
+		return;
+
+	dev_info(smi->dev, "add VLAN on port %d, %s, %s\n",
+		 port,
+		 untagged ? "untagged" : "tagged",
+		 pvid ? " PVID" : "no PVID");
+
+	if (dsa_is_dsa_port(ds, port) || dsa_is_cpu_port(ds, port))
+		dev_err(smi->dev, "port is DSA or CPU port\n");
+
+	for (vid = vlan->vid_begin; vid <= vlan->vid_end; ++vid) {
+		int pvid_val = 0;
+
+		dev_info(smi->dev, "add VLAN %04x\n", vid);
+		member |= BIT(port);
+
+		if (untagged)
+			untag |= BIT(port);
+
+		/* To ensure that we have a valid MC entry for this VLAN,
+		 * initialize the port VLAN ID here.
+		 */
+		ret = rtl8366_get_pvid(smi, port, &pvid_val);
+		if (ret < 0) {
+			dev_err(smi->dev, "could not lookup PVID for port %d\n",
+				port);
+			return;
+		}
+		if (pvid_val == 0) {
+			ret = rtl8366_set_pvid(smi, port, vid);
+			if (ret < 0)
+				return;
+		}
+	}
+
+	ret = rtl8366_set_vlan(smi, port, member, untag, 0);
+	if (ret)
+		dev_err(smi->dev,
+			"failed to set up VLAN %04x",
+			vid);
+}
+EXPORT_SYMBOL_GPL(rtl8366_vlan_add);
+
+int rtl8366_vlan_del(struct dsa_switch *ds, int port,
+		     const struct switchdev_obj_port_vlan *vlan)
+{
+	struct realtek_smi *smi = ds->priv;
+	u16 vid;
+	int ret;
+
+	dev_info(smi->dev, "del VLAN on port %d\n", port);
+
+	for (vid = vlan->vid_begin; vid <= vlan->vid_end; ++vid) {
+		int i;
+
+		dev_info(smi->dev, "del VLAN %04x\n", vid);
+
+		for (i = 0; i < smi->num_vlan_mc; i++) {
+			struct rtl8366_vlan_mc vlanmc;
+
+			ret = smi->ops->get_vlan_mc(smi, i, &vlanmc);
+			if (ret)
+				return ret;
+
+			if (vid == vlanmc.vid) {
+				/* clear VLAN member configurations */
+				vlanmc.vid = 0;
+				vlanmc.priority = 0;
+				vlanmc.member = 0;
+				vlanmc.untag = 0;
+				vlanmc.fid = 0;
+
+				ret = smi->ops->set_vlan_mc(smi, i, &vlanmc);
+				if (ret) {
+					dev_err(smi->dev,
+						"failed to remove VLAN %04x\n",
+						vid);
+					return ret;
+				}
+				break;
+			}
+		}
+	}
+
+	return 0;
+}
+EXPORT_SYMBOL_GPL(rtl8366_vlan_del);
+
+void rtl8366_get_strings(struct dsa_switch *ds, int port, u32 stringset,
+			 uint8_t *data)
+{
+	struct realtek_smi *smi = ds->priv;
+	struct rtl8366_mib_counter *mib;
+	int i;
+
+	if (port >= smi->num_ports)
+		return;
+
+	for (i = 0; i < smi->num_mib_counters; i++) {
+		mib = &smi->mib_counters[i];
+		strncpy(data + i * ETH_GSTRING_LEN,
+			mib->name, ETH_GSTRING_LEN);
+	}
+}
+EXPORT_SYMBOL_GPL(rtl8366_get_strings);
+
+int rtl8366_get_sset_count(struct dsa_switch *ds, int port, int sset)
+{
+	struct realtek_smi *smi = ds->priv;
+
+	/* We only support SS_STATS */
+	if (sset != ETH_SS_STATS)
+		return 0;
+	if (port >= smi->num_ports)
+		return -EINVAL;
+
+	return smi->num_mib_counters;
+}
+EXPORT_SYMBOL_GPL(rtl8366_get_sset_count);
+
+void rtl8366_get_ethtool_stats(struct dsa_switch *ds, int port, uint64_t *data)
+{
+	struct realtek_smi *smi = ds->priv;
+	int i;
+	int ret;
+
+	if (port >= smi->num_ports)
+		return;
+
+	for (i = 0; i < smi->num_mib_counters; i++) {
+		struct rtl8366_mib_counter *mib;
+		u64 mibvalue = 0;
+
+		mib = &smi->mib_counters[i];
+		ret = smi->ops->get_mib_counter(smi, port, mib, &mibvalue);
+		if (ret) {
+			dev_err(smi->dev, "error reading MIB counter %s\n",
+				mib->name);
+		}
+		data[i] = mibvalue;
+	}
+}
+EXPORT_SYMBOL_GPL(rtl8366_get_ethtool_stats);
diff --git a/drivers/net/dsa/rtl8366rb.c b/drivers/net/dsa/rtl8366rb.c
new file mode 100644
index 000000000000..1e55b9bf8b56
--- /dev/null
+++ b/drivers/net/dsa/rtl8366rb.c
@@ -0,0 +1,1424 @@
+// SPDX-License-Identifier: GPL-2.0
+/* Realtek SMI subdriver for the Realtek RTL8366RB ethernet switch
+ *
+ * This is a sparsely documented chip, the only viable documentation seems
+ * to be a patched up code drop from the vendor that appear in various
+ * GPL source trees.
+ *
+ * Copyright (C) 2017 Linus Walleij <linus.walleij at linaro.org>
+ * Copyright (C) 2009-2010 Gabor Juhos <juhosg at openwrt.org>
+ * Copyright (C) 2010 Antti Sepp?l? <a.seppala at gmail.com>
+ * Copyright (C) 2010 Roman Yeryomin <roman at advem.lv>
+ * Copyright (C) 2011 Colin Leitner <colin.leitner at googlemail.com>
+ */
+
+#include <linux/bitops.h>
+#include <linux/etherdevice.h>
+#include <linux/interrupt.h>
+#include <linux/irqdomain.h>
+#include <linux/irqchip/chained_irq.h>
+#include <linux/of_irq.h>
+#include <linux/regmap.h>
+
+#include "realtek-smi.h"
+
+#define RTL8366RB_PORT_NUM_CPU		5
+#define RTL8366RB_NUM_PORTS		6
+#define RTL8366RB_PHY_NO_MAX		4
+#define RTL8366RB_PHY_ADDR_MAX		31
+
+/* Switch Global Configuration register */
+#define RTL8366RB_SGCR				0x0000
+#define RTL8366RB_SGCR_EN_BC_STORM_CTRL		BIT(0)
+#define RTL8366RB_SGCR_MAX_LENGTH(a)		((a) << 4)
+#define RTL8366RB_SGCR_MAX_LENGTH_MASK		RTL8366RB_SGCR_MAX_LENGTH(0x3)
+#define RTL8366RB_SGCR_MAX_LENGTH_1522		RTL8366RB_SGCR_MAX_LENGTH(0x0)
+#define RTL8366RB_SGCR_MAX_LENGTH_1536		RTL8366RB_SGCR_MAX_LENGTH(0x1)
+#define RTL8366RB_SGCR_MAX_LENGTH_1552		RTL8366RB_SGCR_MAX_LENGTH(0x2)
+#define RTL8366RB_SGCR_MAX_LENGTH_9216		RTL8366RB_SGCR_MAX_LENGTH(0x3)
+#define RTL8366RB_SGCR_EN_VLAN			BIT(13)
+#define RTL8366RB_SGCR_EN_VLAN_4KTB		BIT(14)
+
+/* Port Enable Control register */
+#define RTL8366RB_PECR				0x0001
+
+/* Switch Security Control registers */
+#define RTL8366RB_SSCR0				0x0002
+#define RTL8366RB_SSCR1				0x0003
+#define RTL8366RB_SSCR2				0x0004
+#define RTL8366RB_SSCR2_DROP_UNKNOWN_DA		BIT(0)
+
+/* Port Mirror Control Register */
+#define RTL8366RB_PMCR				0x0007
+#define RTL8366RB_PMCR_SOURCE_PORT(a)		(a)
+#define RTL8366RB_PMCR_SOURCE_PORT_MASK		0x000f
+#define RTL8366RB_PMCR_MONITOR_PORT(a)		((a) << 4)
+#define RTL8366RB_PMCR_MONITOR_PORT_MASK	0x00f0
+#define RTL8366RB_PMCR_MIRROR_RX		BIT(8)
+#define RTL8366RB_PMCR_MIRROR_TX		BIT(9)
+#define RTL8366RB_PMCR_MIRROR_SPC		BIT(10)
+#define RTL8366RB_PMCR_MIRROR_ISO		BIT(11)
+
+/* bits 0..7 = port 0, bits 8..15 = port 1 */
+#define RTL8366RB_PAACR0		0x0010
+/* bits 0..7 = port 2, bits 8..15 = port 3 */
+#define RTL8366RB_PAACR1		0x0011
+/* bits 0..7 = port 4, bits 8..15 = port 5 */
+#define RTL8366RB_PAACR2		0x0012
+#define RTL8366RB_PAACR_SPEED_10M	0
+#define RTL8366RB_PAACR_SPEED_100M	1
+#define RTL8366RB_PAACR_SPEED_1000M	2
+#define RTL8366RB_PAACR_FULL_DUPLEX	BIT(2)
+#define RTL8366RB_PAACR_LINK_UP		BIT(4)
+#define RTL8366RB_PAACR_TX_PAUSE	BIT(5)
+#define RTL8366RB_PAACR_RX_PAUSE	BIT(6)
+#define RTL8366RB_PAACR_AN		BIT(7)
+
+#define RTL8366RB_PAACR_CPU_PORT	(RTL8366RB_PAACR_SPEED_1000M | \
+					 RTL8366RB_PAACR_FULL_DUPLEX | \
+					 RTL8366RB_PAACR_LINK_UP | \
+					 RTL8366RB_PAACR_TX_PAUSE | \
+					 RTL8366RB_PAACR_RX_PAUSE)
+
+/* bits 0..7 = port 0, bits 8..15 = port 1 */
+#define RTL8366RB_PSTAT0		0x0014
+/* bits 0..7 = port 2, bits 8..15 = port 3 */
+#define RTL8366RB_PSTAT1		0x0015
+/* bits 0..7 = port 4, bits 8..15 = port 5 */
+#define RTL8366RB_PSTAT2		0x0016
+
+#define RTL8366RB_POWER_SAVING_REG	0x0021
+
+/* CPU port control reg */
+#define RTL8368RB_CPU_CTRL_REG		0x0061
+#define RTL8368RB_CPU_PORTS_MSK		0x00FF
+/* Enables inserting custom tag length/type 0x8899 */
+#define RTL8368RB_CPU_INSTAG		BIT(15)
+
+#define RTL8366RB_SMAR0			0x0070 /* bits 0..15 */
+#define RTL8366RB_SMAR1			0x0071 /* bits 16..31 */
+#define RTL8366RB_SMAR2			0x0072 /* bits 32..47 */
+
+#define RTL8366RB_RESET_CTRL_REG		0x0100
+#define RTL8366RB_CHIP_CTRL_RESET_HW		BIT(0)
+#define RTL8366RB_CHIP_CTRL_RESET_SW		BIT(1)
+
+#define RTL8366RB_CHIP_ID_REG			0x0509
+#define RTL8366RB_CHIP_ID_8366			0x5937
+#define RTL8366RB_CHIP_VERSION_CTRL_REG		0x050A
+#define RTL8366RB_CHIP_VERSION_MASK		0xf
+
+/* PHY registers control */
+#define RTL8366RB_PHY_ACCESS_CTRL_REG		0x8000
+#define RTL8366RB_PHY_CTRL_READ			BIT(0)
+#define RTL8366RB_PHY_CTRL_WRITE		0
+#define RTL8366RB_PHY_ACCESS_BUSY_REG		0x8001
+#define RTL8366RB_PHY_INT_BUSY			BIT(0)
+#define RTL8366RB_PHY_EXT_BUSY			BIT(4)
+#define RTL8366RB_PHY_ACCESS_DATA_REG		0x8002
+#define RTL8366RB_PHY_EXT_CTRL_REG		0x8010
+#define RTL8366RB_PHY_EXT_WRDATA_REG		0x8011
+#define RTL8366RB_PHY_EXT_RDDATA_REG		0x8012
+
+#define RTL8366RB_PHY_REG_MASK			0x1f
+#define RTL8366RB_PHY_PAGE_OFFSET		5
+#define RTL8366RB_PHY_PAGE_MASK			(0xf << 5)
+#define RTL8366RB_PHY_NO_OFFSET			9
+#define RTL8366RB_PHY_NO_MASK			(0x1f << 9)
+
+#define RTL8366RB_VLAN_INGRESS_CTRL2_REG	0x037f
+
+/* LED control registers */
+#define RTL8366RB_LED_BLINKRATE_REG		0x0430
+#define RTL8366RB_LED_BLINKRATE_MASK		0x0007
+#define RTL8366RB_LED_BLINKRATE_28MS		0x0000
+#define RTL8366RB_LED_BLINKRATE_56MS		0x0001
+#define RTL8366RB_LED_BLINKRATE_84MS		0x0002
+#define RTL8366RB_LED_BLINKRATE_111MS		0x0003
+#define RTL8366RB_LED_BLINKRATE_222MS		0x0004
+#define RTL8366RB_LED_BLINKRATE_446MS		0x0005
+
+#define RTL8366RB_LED_CTRL_REG			0x0431
+#define RTL8366RB_LED_OFF			0x0
+#define RTL8366RB_LED_DUP_COL			0x1
+#define RTL8366RB_LED_LINK_ACT			0x2
+#define RTL8366RB_LED_SPD1000			0x3
+#define RTL8366RB_LED_SPD100			0x4
+#define RTL8366RB_LED_SPD10			0x5
+#define RTL8366RB_LED_SPD1000_ACT		0x6
+#define RTL8366RB_LED_SPD100_ACT		0x7
+#define RTL8366RB_LED_SPD10_ACT			0x8
+#define RTL8366RB_LED_SPD100_10_ACT		0x9
+#define RTL8366RB_LED_FIBER			0xa
+#define RTL8366RB_LED_AN_FAULT			0xb
+#define RTL8366RB_LED_LINK_RX			0xc
+#define RTL8366RB_LED_LINK_TX			0xd
+#define RTL8366RB_LED_MASTER			0xe
+#define RTL8366RB_LED_FORCE			0xf
+#define RTL8366RB_LED_0_1_CTRL_REG		0x0432
+#define RTL8366RB_LED_1_OFFSET			6
+#define RTL8366RB_LED_2_3_CTRL_REG		0x0433
+#define RTL8366RB_LED_3_OFFSET			6
+
+#define RTL8366RB_MIB_COUNT			33
+#define RTL8366RB_GLOBAL_MIB_COUNT		1
+#define RTL8366RB_MIB_COUNTER_PORT_OFFSET	0x0050
+#define RTL8366RB_MIB_COUNTER_BASE		0x1000
+#define RTL8366RB_MIB_CTRL_REG			0x13F0
+#define RTL8366RB_MIB_CTRL_USER_MASK		0x0FFC
+#define RTL8366RB_MIB_CTRL_BUSY_MASK		BIT(0)
+#define RTL8366RB_MIB_CTRL_RESET_MASK		BIT(1)
+#define RTL8366RB_MIB_CTRL_PORT_RESET(_p)	BIT(2 + (_p))
+#define RTL8366RB_MIB_CTRL_GLOBAL_RESET		BIT(11)
+
+#define RTL8366RB_PORT_VLAN_CTRL_BASE		0x0063
+#define RTL8366RB_PORT_VLAN_CTRL_REG(_p)  \
+		(RTL8366RB_PORT_VLAN_CTRL_BASE + (_p) / 4)
+#define RTL8366RB_PORT_VLAN_CTRL_MASK		0xf
+#define RTL8366RB_PORT_VLAN_CTRL_SHIFT(_p)	(4 * ((_p) % 4))
+
+#define RTL8366RB_VLAN_TABLE_READ_BASE		0x018C
+#define RTL8366RB_VLAN_TABLE_WRITE_BASE		0x0185
+
+#define RTL8366RB_TABLE_ACCESS_CTRL_REG		0x0180
+#define RTL8366RB_TABLE_VLAN_READ_CTRL		0x0E01
+#define RTL8366RB_TABLE_VLAN_WRITE_CTRL		0x0F01
+
+#define RTL8366RB_VLAN_MC_BASE(_x)		(0x0020 + (_x) * 3)
+
+#define RTL8366RB_PORT_LINK_STATUS_BASE		0x0014
+#define RTL8366RB_PORT_STATUS_SPEED_MASK	0x0003
+#define RTL8366RB_PORT_STATUS_DUPLEX_MASK	0x0004
+#define RTL8366RB_PORT_STATUS_LINK_MASK		0x0010
+#define RTL8366RB_PORT_STATUS_TXPAUSE_MASK	0x0020
+#define RTL8366RB_PORT_STATUS_RXPAUSE_MASK	0x0040
+#define RTL8366RB_PORT_STATUS_AN_MASK		0x0080
+
+#define RTL8366RB_NUM_VLANS		16
+#define RTL8366RB_NUM_LEDGROUPS		4
+#define RTL8366RB_NUM_VIDS		4096
+#define RTL8366RB_PRIORITYMAX		7
+#define RTL8366RB_FIDMAX		7
+
+#define RTL8366RB_PORT_1		BIT(0) /* In userspace port 0 */
+#define RTL8366RB_PORT_2		BIT(1) /* In userspace port 1 */
+#define RTL8366RB_PORT_3		BIT(2) /* In userspace port 2 */
+#define RTL8366RB_PORT_4		BIT(3) /* In userspace port 3 */
+#define RTL8366RB_PORT_5		BIT(4) /* In userspace port 4 */
+
+#define RTL8366RB_PORT_CPU		BIT(5) /* CPU port */
+
+#define RTL8366RB_PORT_ALL		(RTL8366RB_PORT_1 |	\
+					 RTL8366RB_PORT_2 |	\
+					 RTL8366RB_PORT_3 |	\
+					 RTL8366RB_PORT_4 |	\
+					 RTL8366RB_PORT_5 |	\
+					 RTL8366RB_PORT_CPU)
+
+#define RTL8366RB_PORT_ALL_BUT_CPU	(RTL8366RB_PORT_1 |	\
+					 RTL8366RB_PORT_2 |	\
+					 RTL8366RB_PORT_3 |	\
+					 RTL8366RB_PORT_4 |	\
+					 RTL8366RB_PORT_5)
+
+#define RTL8366RB_PORT_ALL_EXTERNAL	(RTL8366RB_PORT_1 |	\
+					 RTL8366RB_PORT_2 |	\
+					 RTL8366RB_PORT_3 |	\
+					 RTL8366RB_PORT_4)
+
+#define RTL8366RB_PORT_ALL_INTERNAL	 RTL8366RB_PORT_CPU
+
+/* First configuration word per member config, VID and prio */
+#define RTL8366RB_VLAN_VID_MASK		0xfff
+#define RTL8366RB_VLAN_PRIORITY_SHIFT	12
+#define RTL8366RB_VLAN_PRIORITY_MASK	0x7
+/* Second configuration word per member config, member and untagged */
+#define RTL8366RB_VLAN_UNTAG_SHIFT	8
+#define RTL8366RB_VLAN_UNTAG_MASK	0xff
+#define RTL8366RB_VLAN_MEMBER_MASK	0xff
+/* Third config word per member config, STAG currently unused */
+#define RTL8366RB_VLAN_STAG_MBR_MASK	0xff
+#define RTL8366RB_VLAN_STAG_MBR_SHIFT	8
+#define RTL8366RB_VLAN_STAG_IDX_MASK	0x7
+#define RTL8366RB_VLAN_STAG_IDX_SHIFT	5
+#define RTL8366RB_VLAN_FID_MASK		0x7
+
+/* Port ingress bandwidth control */
+#define RTL8366RB_IB_BASE		0x0200
+#define RTL8366RB_IB_REG(pnum)		(RTL8366RB_IB_BASE + (pnum))
+#define RTL8366RB_IB_BDTH_MASK		0x3fff
+#define RTL8366RB_IB_PREIFG		BIT(14)
+
+/* Port egress bandwidth control */
+#define RTL8366RB_EB_BASE		0x02d1
+#define RTL8366RB_EB_REG(pnum)		(RTL8366RB_EB_BASE + (pnum))
+#define RTL8366RB_EB_BDTH_MASK		0x3fff
+#define RTL8366RB_EB_PREIFG_REG		0x02f8
+#define RTL8366RB_EB_PREIFG		BIT(9)
+
+#define RTL8366RB_BDTH_SW_MAX		1048512 /* 1048576? */
+#define RTL8366RB_BDTH_UNIT		64
+#define RTL8366RB_BDTH_REG_DEFAULT	16383
+
+/* QOS */
+#define RTL8366RB_QOS			BIT(15)
+/* Include/Exclude Preamble and IFG (20 bytes). 0:Exclude, 1:Include. */
+#define RTL8366RB_QOS_DEFAULT_PREIFG	1
+
+/* Interrupt handling */
+#define RTL8366RB_INTERRUPT_CONTROL_REG	0x0440
+#define RTL8366RB_INTERRUPT_POLARITY	BIT(0)
+#define RTL8366RB_P4_RGMII_LED		BIT(2)
+#define RTL8366RB_INTERRUPT_MASK_REG	0x0441
+#define RTL8366RB_INTERRUPT_LINK_CHGALL	GENMASK(11, 0)
+#define RTL8366RB_INTERRUPT_ACLEXCEED	BIT(8)
+#define RTL8366RB_INTERRUPT_STORMEXCEED	BIT(9)
+#define RTL8366RB_INTERRUPT_P4_FIBER	BIT(12)
+#define RTL8366RB_INTERRUPT_P4_UTP	BIT(13)
+#define RTL8366RB_INTERRUPT_VALID	(RTL8366RB_INTERRUPT_LINK_CHGALL | \
+					 RTL8366RB_INTERRUPT_ACLEXCEED | \
+					 RTL8366RB_INTERRUPT_STORMEXCEED | \
+					 RTL8366RB_INTERRUPT_P4_FIBER | \
+					 RTL8366RB_INTERRUPT_P4_UTP)
+#define RTL8366RB_INTERRUPT_STATUS_REG	0x0442
+#define RTL8366RB_NUM_INTERRUPT		14 /* 0..13 */
+
+/* bits 0..5 enable force when cleared */
+#define RTL8366RB_MAC_FORCE_CTRL_REG	0x0F11
+
+#define RTL8366RB_OAM_PARSER_REG	0x0F14
+#define RTL8366RB_OAM_MULTIPLEXER_REG	0x0F15
+
+#define RTL8366RB_GREEN_FEATURE_REG	0x0F51
+#define RTL8366RB_GREEN_FEATURE_MSK	0x0007
+#define RTL8366RB_GREEN_FEATURE_TX	BIT(0)
+#define RTL8366RB_GREEN_FEATURE_RX	BIT(2)
+
+static struct rtl8366_mib_counter rtl8366rb_mib_counters[] = {
+	{ 0,  0, 4, "IfInOctets"				},
+	{ 0,  4, 4, "EtherStatsOctets"				},
+	{ 0,  8, 2, "EtherStatsUnderSizePkts"			},
+	{ 0, 10, 2, "EtherFragments"				},
+	{ 0, 12, 2, "EtherStatsPkts64Octets"			},
+	{ 0, 14, 2, "EtherStatsPkts65to127Octets"		},
+	{ 0, 16, 2, "EtherStatsPkts128to255Octets"		},
+	{ 0, 18, 2, "EtherStatsPkts256to511Octets"		},
+	{ 0, 20, 2, "EtherStatsPkts512to1023Octets"		},
+	{ 0, 22, 2, "EtherStatsPkts1024to1518Octets"		},
+	{ 0, 24, 2, "EtherOversizeStats"			},
+	{ 0, 26, 2, "EtherStatsJabbers"				},
+	{ 0, 28, 2, "IfInUcastPkts"				},
+	{ 0, 30, 2, "EtherStatsMulticastPkts"			},
+	{ 0, 32, 2, "EtherStatsBroadcastPkts"			},
+	{ 0, 34, 2, "EtherStatsDropEvents"			},
+	{ 0, 36, 2, "Dot3StatsFCSErrors"			},
+	{ 0, 38, 2, "Dot3StatsSymbolErrors"			},
+	{ 0, 40, 2, "Dot3InPauseFrames"				},
+	{ 0, 42, 2, "Dot3ControlInUnknownOpcodes"		},
+	{ 0, 44, 4, "IfOutOctets"				},
+	{ 0, 48, 2, "Dot3StatsSingleCollisionFrames"		},
+	{ 0, 50, 2, "Dot3StatMultipleCollisionFrames"		},
+	{ 0, 52, 2, "Dot3sDeferredTransmissions"		},
+	{ 0, 54, 2, "Dot3StatsLateCollisions"			},
+	{ 0, 56, 2, "EtherStatsCollisions"			},
+	{ 0, 58, 2, "Dot3StatsExcessiveCollisions"		},
+	{ 0, 60, 2, "Dot3OutPauseFrames"			},
+	{ 0, 62, 2, "Dot1dBasePortDelayExceededDiscards"	},
+	{ 0, 64, 2, "Dot1dTpPortInDiscards"			},
+	{ 0, 66, 2, "IfOutUcastPkts"				},
+	{ 0, 68, 2, "IfOutMulticastPkts"			},
+	{ 0, 70, 2, "IfOutBroadcastPkts"			},
+};
+
+static int rtl8366rb_get_mib_counter(struct realtek_smi *smi,
+				     int port,
+				     struct rtl8366_mib_counter *mib,
+				     u64 *mibvalue)
+{
+	u32 addr, val;
+	int ret;
+	int i;
+
+	addr = RTL8366RB_MIB_COUNTER_BASE +
+		RTL8366RB_MIB_COUNTER_PORT_OFFSET * (port) +
+		mib->offset;
+
+	/* Writing access counter address first
+	 * then ASIC will prepare 64bits counter wait for being retrived
+	 */
+	ret = regmap_write(smi->map, addr, 0); /* Write whatever */
+	if (ret)
+		return ret;
+
+	/* Read MIB control register */
+	ret = regmap_read(smi->map, RTL8366RB_MIB_CTRL_REG, &val);
+	if (ret)
+		return -EIO;
+
+	if (val & RTL8366RB_MIB_CTRL_BUSY_MASK)
+		return -EBUSY;
+
+	if (val & RTL8366RB_MIB_CTRL_RESET_MASK)
+		return -EIO;
+
+	/* Read each individual MIB 16 bits at the time */
+	*mibvalue = 0;
+	for (i = mib->length; i > 0; i--) {
+		ret = regmap_read(smi->map, addr + (i - 1), &val);
+		if (ret)
+			return ret;
+		*mibvalue = (*mibvalue << 16) | (val & 0xFFFF);
+	}
+	return 0;
+}
+
+static u32 rtl8366rb_get_irqmask(struct irq_data *d)
+{
+	int line = irqd_to_hwirq(d);
+	u32 val;
+
+	/* For line interrupts we combine link down in bits
+	 * 6..11 with link up in bits 0..5 into one interrupt.
+	 */
+	if (line < 12)
+		val = BIT(line) | BIT(line + 6);
+	else
+		val = BIT(line);
+	return val;
+}
+
+static void rtl8366rb_mask_irq(struct irq_data *d)
+{
+	struct realtek_smi *smi = irq_data_get_irq_chip_data(d);
+	int ret;
+
+	ret = regmap_update_bits(smi->map, RTL8366RB_INTERRUPT_MASK_REG,
+				 rtl8366rb_get_irqmask(d), 0);
+	if (ret)
+		dev_err(smi->dev, "could not mask IRQ\n");
+}
+
+static void rtl8366rb_unmask_irq(struct irq_data *d)
+{
+	struct realtek_smi *smi = irq_data_get_irq_chip_data(d);
+	int ret;
+
+	ret = regmap_update_bits(smi->map, RTL8366RB_INTERRUPT_MASK_REG,
+				 rtl8366rb_get_irqmask(d),
+				 rtl8366rb_get_irqmask(d));
+	if (ret)
+		dev_err(smi->dev, "could not unmask IRQ\n");
+}
+
+static irqreturn_t rtl8366rb_irq(int irq, void *data)
+{
+	struct realtek_smi *smi = data;
+	u32 stat;
+	int ret;
+
+	/* This clears the IRQ status register */
+	ret = regmap_read(smi->map, RTL8366RB_INTERRUPT_STATUS_REG,
+			  &stat);
+	if (ret) {
+		dev_err(smi->dev, "can't read interrupt status\n");
+		return IRQ_NONE;
+	}
+	stat &= RTL8366RB_INTERRUPT_VALID;
+	if (!stat)
+		return IRQ_NONE;
+	while (stat) {
+		int line = __ffs(stat);
+		int child_irq;
+
+		stat &= ~BIT(line);
+		/* For line interrupts we combine link down in bits
+		 * 6..11 with link up in bits 0..5 into one interrupt.
+		 */
+		if (line < 12 && line > 5)
+			line -= 5;
+		child_irq = irq_find_mapping(smi->irqdomain, line);
+		handle_nested_irq(child_irq);
+	}
+	return IRQ_HANDLED;
+}
+
+static struct irq_chip rtl8366rb_irq_chip = {
+	.name = "RTL8366RB",
+	.irq_mask = rtl8366rb_mask_irq,
+	.irq_unmask = rtl8366rb_unmask_irq,
+};
+
+static int rtl8366rb_irq_map(struct irq_domain *domain, unsigned int irq,
+			     irq_hw_number_t hwirq)
+{
+	irq_set_chip_data(irq, domain->host_data);
+	irq_set_chip_and_handler(irq, &rtl8366rb_irq_chip, handle_simple_irq);
+	irq_set_nested_thread(irq, 1);
+	irq_set_noprobe(irq);
+
+	return 0;
+}
+
+static void rtl8366rb_irq_unmap(struct irq_domain *d, unsigned int irq)
+{
+	irq_set_nested_thread(irq, 0);
+	irq_set_chip_and_handler(irq, NULL, NULL);
+	irq_set_chip_data(irq, NULL);
+}
+
+static const struct irq_domain_ops rtl8366rb_irqdomain_ops = {
+	.map = rtl8366rb_irq_map,
+	.unmap = rtl8366rb_irq_unmap,
+	.xlate  = irq_domain_xlate_onecell,
+};
+
+static int rtl8366rb_setup_cascaded_irq(struct realtek_smi *smi)
+{
+	struct device_node *intc;
+	unsigned long irq_trig;
+	int irq;
+	int ret;
+	u32 val;
+	int i;
+
+	intc = of_get_child_by_name(smi->dev->of_node, "interrupt-controller");
+	if (!intc) {
+		dev_err(smi->dev, "missing child interrupt-controller node\n");
+		return -EINVAL;
+	}
+	/* RB8366RB IRQs cascade off this one */
+	irq = of_irq_get(intc, 0);
+	if (irq <= 0) {
+		dev_err(smi->dev, "failed to get parent IRQ\n");
+		return irq ? irq : -EINVAL;
+	}
+
+	/* This clears the IRQ status register */
+	ret = regmap_read(smi->map, RTL8366RB_INTERRUPT_STATUS_REG,
+			  &val);
+	if (ret) {
+		dev_err(smi->dev, "can't read interrupt status\n");
+		return ret;
+	}
+
+	/* Fetch IRQ edge information from the descriptor */
+	irq_trig = irqd_get_trigger_type(irq_get_irq_data(irq));
+	switch (irq_trig) {
+	case IRQF_TRIGGER_RISING:
+	case IRQF_TRIGGER_HIGH:
+		dev_info(smi->dev, "active high/rising IRQ\n");
+		val = 0;
+		break;
+	case IRQF_TRIGGER_FALLING:
+	case IRQF_TRIGGER_LOW:
+		dev_info(smi->dev, "active low/falling IRQ\n");
+		val = RTL8366RB_INTERRUPT_POLARITY;
+		break;
+	}
+	ret = regmap_update_bits(smi->map, RTL8366RB_INTERRUPT_CONTROL_REG,
+				 RTL8366RB_INTERRUPT_POLARITY,
+				 val);
+	if (ret) {
+		dev_err(smi->dev, "could not configure IRQ polarity\n");
+		return ret;
+	}
+
+	ret = devm_request_threaded_irq(smi->dev, irq, NULL,
+					rtl8366rb_irq, IRQF_ONESHOT,
+					"RTL8366RB", smi);
+	if (ret) {
+		dev_err(smi->dev, "unable to request irq: %d\n", ret);
+		return ret;
+	}
+	smi->irqdomain = irq_domain_add_linear(intc,
+					       RTL8366RB_NUM_INTERRUPT,
+					       &rtl8366rb_irqdomain_ops,
+					       smi);
+	if (!smi->irqdomain) {
+		dev_err(smi->dev, "failed to create IRQ domain\n");
+		return -EINVAL;
+	}
+	for (i = 0; i < smi->num_ports; i++)
+		irq_set_parent(irq_create_mapping(smi->irqdomain, i), irq);
+
+	return 0;
+}
+
+static int rtl8366rb_set_addr(struct realtek_smi *smi)
+{
+	u8 addr[ETH_ALEN];
+	u16 val;
+	int ret;
+
+	eth_random_addr(addr);
+
+	dev_info(smi->dev, "set MAC: %02X:%02X:%02X:%02X:%02X:%02X\n",
+		 addr[0], addr[1], addr[2], addr[3], addr[4], addr[5]);
+	val = addr[0] << 8 | addr[1];
+	ret = regmap_write(smi->map, RTL8366RB_SMAR0, val);
+	if (ret)
+		return ret;
+	val = addr[2] << 8 | addr[3];
+	ret = regmap_write(smi->map, RTL8366RB_SMAR1, val);
+	if (ret)
+		return ret;
+	val = addr[4] << 8 | addr[5];
+	ret = regmap_write(smi->map, RTL8366RB_SMAR2, val);
+	if (ret)
+		return ret;
+
+	return 0;
+}
+
+/* Found in a vendor driver */
+
+/* For the "version 0" early silicon, appear in most source releases */
+static const u16 rtl8366rb_init_jam_ver_0[] = {
+	0x000B, 0x0001, 0x03A6, 0x0100, 0x03A7, 0x0001, 0x02D1, 0x3FFF,
+	0x02D2, 0x3FFF, 0x02D3, 0x3FFF, 0x02D4, 0x3FFF, 0x02D5, 0x3FFF,
+	0x02D6, 0x3FFF, 0x02D7, 0x3FFF, 0x02D8, 0x3FFF, 0x022B, 0x0688,
+	0x022C, 0x0FAC, 0x03D0, 0x4688, 0x03D1, 0x01F5, 0x0000, 0x0830,
+	0x02F9, 0x0200, 0x02F7, 0x7FFF, 0x02F8, 0x03FF, 0x0080, 0x03E8,
+	0x0081, 0x00CE, 0x0082, 0x00DA, 0x0083, 0x0230, 0xBE0F, 0x2000,
+	0x0231, 0x422A, 0x0232, 0x422A, 0x0233, 0x422A, 0x0234, 0x422A,
+	0x0235, 0x422A, 0x0236, 0x422A, 0x0237, 0x422A, 0x0238, 0x422A,
+	0x0239, 0x422A, 0x023A, 0x422A, 0x023B, 0x422A, 0x023C, 0x422A,
+	0x023D, 0x422A, 0x023E, 0x422A, 0x023F, 0x422A, 0x0240, 0x422A,
+	0x0241, 0x422A, 0x0242, 0x422A, 0x0243, 0x422A, 0x0244, 0x422A,
+	0x0245, 0x422A, 0x0246, 0x422A, 0x0247, 0x422A, 0x0248, 0x422A,
+	0x0249, 0x0146, 0x024A, 0x0146, 0x024B, 0x0146, 0xBE03, 0xC961,
+	0x024D, 0x0146, 0x024E, 0x0146, 0x024F, 0x0146, 0x0250, 0x0146,
+	0xBE64, 0x0226, 0x0252, 0x0146, 0x0253, 0x0146, 0x024C, 0x0146,
+	0x0251, 0x0146, 0x0254, 0x0146, 0xBE62, 0x3FD0, 0x0084, 0x0320,
+	0x0255, 0x0146, 0x0256, 0x0146, 0x0257, 0x0146, 0x0258, 0x0146,
+	0x0259, 0x0146, 0x025A, 0x0146, 0x025B, 0x0146, 0x025C, 0x0146,
+	0x025D, 0x0146, 0x025E, 0x0146, 0x025F, 0x0146, 0x0260, 0x0146,
+	0x0261, 0xA23F, 0x0262, 0x0294, 0x0263, 0xA23F, 0x0264, 0x0294,
+	0x0265, 0xA23F, 0x0266, 0x0294, 0x0267, 0xA23F, 0x0268, 0x0294,
+	0x0269, 0xA23F, 0x026A, 0x0294, 0x026B, 0xA23F, 0x026C, 0x0294,
+	0x026D, 0xA23F, 0x026E, 0x0294, 0x026F, 0xA23F, 0x0270, 0x0294,
+	0x02F5, 0x0048, 0xBE09, 0x0E00, 0xBE1E, 0x0FA0, 0xBE14, 0x8448,
+	0xBE15, 0x1007, 0xBE4A, 0xA284, 0xC454, 0x3F0B, 0xC474, 0x3F0B,
+	0xBE48, 0x3672, 0xBE4B, 0x17A7, 0xBE4C, 0x0B15, 0xBE52, 0x0EDD,
+	0xBE49, 0x8C00, 0xBE5B, 0x785C, 0xBE5C, 0x785C, 0xBE5D, 0x785C,
+	0xBE61, 0x368A, 0xBE63, 0x9B84, 0xC456, 0xCC13, 0xC476, 0xCC13,
+	0xBE65, 0x307D, 0xBE6D, 0x0005, 0xBE6E, 0xE120, 0xBE2E, 0x7BAF,
+};
+
+/* This v1 init sequence is from Belkin F5D8235 U-Boot release */
+static const u16 rtl8366rb_init_jam_ver_1[] = {
+	0x0000, 0x0830, 0x0001, 0x8000, 0x0400, 0x8130, 0xBE78, 0x3C3C,
+	0x0431, 0x5432, 0xBE37, 0x0CE4, 0x02FA, 0xFFDF, 0x02FB, 0xFFE0,
+	0xC44C, 0x1585, 0xC44C, 0x1185, 0xC44C, 0x1585, 0xC46C, 0x1585,
+	0xC46C, 0x1185, 0xC46C, 0x1585, 0xC451, 0x2135, 0xC471, 0x2135,
+	0xBE10, 0x8140, 0xBE15, 0x0007, 0xBE6E, 0xE120, 0xBE69, 0xD20F,
+	0xBE6B, 0x0320, 0xBE24, 0xB000, 0xBE23, 0xFF51, 0xBE22, 0xDF20,
+	0xBE21, 0x0140, 0xBE20, 0x00BB, 0xBE24, 0xB800, 0xBE24, 0x0000,
+	0xBE24, 0x7000, 0xBE23, 0xFF51, 0xBE22, 0xDF60, 0xBE21, 0x0140,
+	0xBE20, 0x0077, 0xBE24, 0x7800, 0xBE24, 0x0000, 0xBE2E, 0x7B7A,
+	0xBE36, 0x0CE4, 0x02F5, 0x0048, 0xBE77, 0x2940, 0x000A, 0x83E0,
+	0xBE79, 0x3C3C, 0xBE00, 0x1340,
+};
+
+/* This v2 init sequence is from Belkin F5D8235 U-Boot release */
+static const u16 rtl8366rb_init_jam_ver_2[] = {
+	0x0450, 0x0000, 0x0400, 0x8130, 0x000A, 0x83ED, 0x0431, 0x5432,
+	0xC44F, 0x6250, 0xC46F, 0x6250, 0xC456, 0x0C14, 0xC476, 0x0C14,
+	0xC44C, 0x1C85, 0xC44C, 0x1885, 0xC44C, 0x1C85, 0xC46C, 0x1C85,
+	0xC46C, 0x1885, 0xC46C, 0x1C85, 0xC44C, 0x0885, 0xC44C, 0x0881,
+	0xC44C, 0x0885, 0xC46C, 0x0885, 0xC46C, 0x0881, 0xC46C, 0x0885,
+	0xBE2E, 0x7BA7, 0xBE36, 0x1000, 0xBE37, 0x1000, 0x8000, 0x0001,
+	0xBE69, 0xD50F, 0x8000, 0x0000, 0xBE69, 0xD50F, 0xBE6E, 0x0320,
+	0xBE77, 0x2940, 0xBE78, 0x3C3C, 0xBE79, 0x3C3C, 0xBE6E, 0xE120,
+	0x8000, 0x0001, 0xBE15, 0x1007, 0x8000, 0x0000, 0xBE15, 0x1007,
+	0xBE14, 0x0448, 0xBE1E, 0x00A0, 0xBE10, 0x8160, 0xBE10, 0x8140,
+	0xBE00, 0x1340, 0x0F51, 0x0010,
+};
+
+/* Appears in a DDWRT code dump */
+static const u16 rtl8366rb_init_jam_ver_3[] = {
+	0x0000, 0x0830, 0x0400, 0x8130, 0x000A, 0x83ED, 0x0431, 0x5432,
+	0x0F51, 0x0017, 0x02F5, 0x0048, 0x02FA, 0xFFDF, 0x02FB, 0xFFE0,
+	0xC456, 0x0C14, 0xC476, 0x0C14, 0xC454, 0x3F8B, 0xC474, 0x3F8B,
+	0xC450, 0x2071, 0xC470, 0x2071, 0xC451, 0x226B, 0xC471, 0x226B,
+	0xC452, 0xA293, 0xC472, 0xA293, 0xC44C, 0x1585, 0xC44C, 0x1185,
+	0xC44C, 0x1585, 0xC46C, 0x1585, 0xC46C, 0x1185, 0xC46C, 0x1585,
+	0xC44C, 0x0185, 0xC44C, 0x0181, 0xC44C, 0x0185, 0xC46C, 0x0185,
+	0xC46C, 0x0181, 0xC46C, 0x0185, 0xBE24, 0xB000, 0xBE23, 0xFF51,
+	0xBE22, 0xDF20, 0xBE21, 0x0140, 0xBE20, 0x00BB, 0xBE24, 0xB800,
+	0xBE24, 0x0000, 0xBE24, 0x7000, 0xBE23, 0xFF51, 0xBE22, 0xDF60,
+	0xBE21, 0x0140, 0xBE20, 0x0077, 0xBE24, 0x7800, 0xBE24, 0x0000,
+	0xBE2E, 0x7BA7, 0xBE36, 0x1000, 0xBE37, 0x1000, 0x8000, 0x0001,
+	0xBE69, 0xD50F, 0x8000, 0x0000, 0xBE69, 0xD50F, 0xBE6B, 0x0320,
+	0xBE77, 0x2800, 0xBE78, 0x3C3C, 0xBE79, 0x3C3C, 0xBE6E, 0xE120,
+	0x8000, 0x0001, 0xBE10, 0x8140, 0x8000, 0x0000, 0xBE10, 0x8140,
+	0xBE15, 0x1007, 0xBE14, 0x0448, 0xBE1E, 0x00A0, 0xBE10, 0x8160,
+	0xBE10, 0x8140, 0xBE00, 0x1340, 0x0450, 0x0000, 0x0401, 0x0000,
+};
+
+/* Belkin F5D8235 v1, "belkin,f5d8235-v1" */
+static const u16 rtl8366rb_init_jam_f5d8235[] = {
+	0x0242, 0x02BF, 0x0245, 0x02BF, 0x0248, 0x02BF, 0x024B, 0x02BF,
+	0x024E, 0x02BF, 0x0251, 0x02BF, 0x0254, 0x0A3F, 0x0256, 0x0A3F,
+	0x0258, 0x0A3F, 0x025A, 0x0A3F, 0x025C, 0x0A3F, 0x025E, 0x0A3F,
+	0x0263, 0x007C, 0x0100, 0x0004, 0xBE5B, 0x3500, 0x800E, 0x200F,
+	0xBE1D, 0x0F00, 0x8001, 0x5011, 0x800A, 0xA2F4, 0x800B, 0x17A3,
+	0xBE4B, 0x17A3, 0xBE41, 0x5011, 0xBE17, 0x2100, 0x8000, 0x8304,
+	0xBE40, 0x8304, 0xBE4A, 0xA2F4, 0x800C, 0xA8D5, 0x8014, 0x5500,
+	0x8015, 0x0004, 0xBE4C, 0xA8D5, 0xBE59, 0x0008, 0xBE09, 0x0E00,
+	0xBE36, 0x1036, 0xBE37, 0x1036, 0x800D, 0x00FF, 0xBE4D, 0x00FF,
+};
+
+/* DGN3500, "netgear,dgn3500", "netgear,dgn3500b" */
+static const u16 rtl8366rb_init_jam_dgn3500[] = {
+	0x0000, 0x0830, 0x0400, 0x8130, 0x000A, 0x83ED, 0x0F51, 0x0017,
+	0x02F5, 0x0048, 0x02FA, 0xFFDF, 0x02FB, 0xFFE0, 0x0450, 0x0000,
+	0x0401, 0x0000, 0x0431, 0x0960,
+};
+
+/* This jam table activates "green ethernet", which means low power mode
+ * and is claimed to detect the cable length and not use more power than
+ * necessary, and the ports should enter power saving mode 10 seconds after
+ * a cable is disconnected. Seems to always be the same.
+ */
+static const u16 rtl8366rb_green_jam[][2] = {
+	{0xBE78, 0x323C}, {0xBE77, 0x5000}, {0xBE2E, 0x7BA7},
+	{0xBE59, 0x3459}, {0xBE5A, 0x745A}, {0xBE5B, 0x785C},
+	{0xBE5C, 0x785C}, {0xBE6E, 0xE120}, {0xBE79, 0x323C},
+};
+
+static int rtl8366rb_setup(struct dsa_switch *ds)
+{
+	struct realtek_smi *smi = ds->priv;
+	const u16 *jam_table;
+	u32 chip_ver = 0;
+	u32 chip_id = 0;
+	int jam_size;
+	u32 val;
+	int ret;
+	int i;
+
+	ret = regmap_read(smi->map, RTL8366RB_CHIP_ID_REG, &chip_id);
+	if (ret) {
+		dev_err(smi->dev, "unable to read chip id\n");
+		return ret;
+	}
+
+	switch (chip_id) {
+	case RTL8366RB_CHIP_ID_8366:
+		break;
+	default:
+		dev_err(smi->dev, "unknown chip id (%04x)\n", chip_id);
+		return -ENODEV;
+	}
+
+	ret = regmap_read(smi->map, RTL8366RB_CHIP_VERSION_CTRL_REG,
+			  &chip_ver);
+	if (ret) {
+		dev_err(smi->dev, "unable to read chip version\n");
+		return ret;
+	}
+
+	dev_info(smi->dev, "RTL%04x ver %u chip found\n",
+		 chip_id, chip_ver & RTL8366RB_CHIP_VERSION_MASK);
+
+	/* Do the init dance using the right jam table */
+	switch (chip_ver) {
+	case 0:
+		jam_table = rtl8366rb_init_jam_ver_0;
+		jam_size = ARRAY_SIZE(rtl8366rb_init_jam_ver_0);
+		break;
+	case 1:
+		jam_table = rtl8366rb_init_jam_ver_1;
+		jam_size = ARRAY_SIZE(rtl8366rb_init_jam_ver_1);
+		break;
+	case 2:
+		jam_table = rtl8366rb_init_jam_ver_2;
+		jam_size = ARRAY_SIZE(rtl8366rb_init_jam_ver_2);
+		break;
+	default:
+		jam_table = rtl8366rb_init_jam_ver_3;
+		jam_size = ARRAY_SIZE(rtl8366rb_init_jam_ver_3);
+		break;
+	}
+
+	/* Special jam tables for special routers
+	 * TODO: are these necessary? Maintainers, please test
+	 * without them, using just the off-the-shelf tables.
+	 */
+	if (of_machine_is_compatible("belkin,f5d8235-v1")) {
+		jam_table = rtl8366rb_init_jam_f5d8235;
+		jam_size = ARRAY_SIZE(rtl8366rb_init_jam_f5d8235);
+	}
+	if (of_machine_is_compatible("netgear,dgn3500") ||
+	    of_machine_is_compatible("netgear,dgn3500b")) {
+		jam_table = rtl8366rb_init_jam_dgn3500;
+		jam_size = ARRAY_SIZE(rtl8366rb_init_jam_dgn3500);
+	}
+
+	i = 0;
+	while (i < jam_size) {
+		if ((jam_table[i] & 0xBE00) == 0xBE00) {
+			ret = regmap_read(smi->map,
+					  RTL8366RB_PHY_ACCESS_BUSY_REG,
+					  &val);
+			if (ret)
+				return ret;
+			if (!(val & RTL8366RB_PHY_INT_BUSY)) {
+				ret = regmap_write(smi->map,
+						RTL8366RB_PHY_ACCESS_CTRL_REG,
+						RTL8366RB_PHY_CTRL_WRITE);
+				if (ret)
+					return ret;
+			}
+		}
+		dev_dbg(smi->dev, "jam %04x into register %04x\n",
+			jam_table[i + 1],
+			jam_table[i]);
+		ret = regmap_write(smi->map,
+				   jam_table[i],
+				   jam_table[i + 1]);
+		if (ret)
+			return ret;
+		i += 2;
+	}
+
+	/* Set up the "green ethernet" feature */
+	i = 0;
+	while (i < ARRAY_SIZE(rtl8366rb_green_jam)) {
+		ret = regmap_read(smi->map, RTL8366RB_PHY_ACCESS_BUSY_REG,
+				  &val);
+		if (ret)
+			return ret;
+		if (!(val & RTL8366RB_PHY_INT_BUSY)) {
+			ret = regmap_write(smi->map,
+					   RTL8366RB_PHY_ACCESS_CTRL_REG,
+					   RTL8366RB_PHY_CTRL_WRITE);
+			if (ret)
+				return ret;
+			ret = regmap_write(smi->map,
+					   rtl8366rb_green_jam[i][0],
+					   rtl8366rb_green_jam[i][1]);
+			if (ret)
+				return ret;
+			i++;
+		}
+	}
+	ret = regmap_write(smi->map,
+			   RTL8366RB_GREEN_FEATURE_REG,
+			   (chip_ver == 1) ? 0x0007 : 0x0003);
+	if (ret)
+		return ret;
+
+	/* Vendor driver sets 0x240 in registers 0xc and 0xd (undocumented) */
+	ret = regmap_write(smi->map, 0x0c, 0x240);
+	if (ret)
+		return ret;
+	ret = regmap_write(smi->map, 0x0d, 0x240);
+	if (ret)
+		return ret;
+
+	/* Set some random MAC address */
+	ret = rtl8366rb_set_addr(smi);
+	if (ret)
+		return ret;
+
+	/* Enable CPU port and enable inserting CPU tag
+	 *
+	 * Disabling RTL8368RB_CPU_INSTAG here will change the behaviour
+	 * of the switch totally and it will start talking Realtek RRCP
+	 * internally. It is probably possible to experiment with this,
+	 * but then the kernel needs to understand and handle RRCP first.
+	 */
+	ret = regmap_update_bits(smi->map, RTL8368RB_CPU_CTRL_REG,
+				 0xFFFF,
+				 RTL8368RB_CPU_INSTAG | BIT(smi->cpu_port));
+	if (ret)
+		return ret;
+
+	/* Make sure we default-enable the fixed CPU port */
+	ret = regmap_update_bits(smi->map, RTL8366RB_PECR,
+				 BIT(smi->cpu_port),
+				 0);
+	if (ret)
+		return ret;
+
+	/* Set maximum packet length to 1536 bytes */
+	ret = regmap_update_bits(smi->map, RTL8366RB_SGCR,
+				 RTL8366RB_SGCR_MAX_LENGTH_MASK,
+				 RTL8366RB_SGCR_MAX_LENGTH_1536);
+	if (ret)
+		return ret;
+
+	/* Enable learning for all ports */
+	ret = regmap_write(smi->map, RTL8366RB_SSCR0, 0);
+	if (ret)
+		return ret;
+
+	/* Enable auto ageing for all ports */
+	ret = regmap_write(smi->map, RTL8366RB_SSCR1, 0);
+	if (ret)
+		return ret;
+
+	/* Discard VLAN tagged packets if the port is not a member of
+	 * the VLAN with which the packets is associated.
+	 */
+	ret = regmap_write(smi->map, RTL8366RB_VLAN_INGRESS_CTRL2_REG,
+			   RTL8366RB_PORT_ALL);
+	if (ret)
+		return ret;
+
+	/* Don't drop packets whose DA has not been learned */
+	ret = regmap_update_bits(smi->map, RTL8366RB_SSCR2,
+				 RTL8366RB_SSCR2_DROP_UNKNOWN_DA, 0);
+	if (ret)
+		return ret;
+
+	/* Set blinking, TODO: make this configurable */
+	ret = regmap_update_bits(smi->map, RTL8366RB_LED_BLINKRATE_REG,
+				 RTL8366RB_LED_BLINKRATE_MASK,
+				 RTL8366RB_LED_BLINKRATE_56MS);
+	if (ret)
+		return ret;
+
+	/* Set up LED activity:
+	 * Each port has 4 LEDs, we configure all ports to the same
+	 * behaviour (no individual config) but we can set up each
+	 * LED separately.
+	 */
+	if (smi->leds_disabled) {
+		/* Turn everything off */
+		regmap_update_bits(smi->map,
+				   RTL8366RB_LED_0_1_CTRL_REG,
+				   0x0FFF, 0);
+		regmap_update_bits(smi->map,
+				   RTL8366RB_LED_2_3_CTRL_REG,
+				   0x0FFF, 0);
+		regmap_update_bits(smi->map,
+				   RTL8366RB_INTERRUPT_CONTROL_REG,
+				   RTL8366RB_P4_RGMII_LED,
+				   0);
+		val = RTL8366RB_LED_OFF;
+	} else {
+		/* TODO: make this configurable per LED */
+		val = RTL8366RB_LED_FORCE;
+	}
+	for (i = 0; i < 4; i++) {
+		ret = regmap_update_bits(smi->map,
+					 RTL8366RB_LED_CTRL_REG,
+					 0xf << (i * 4),
+					 val << (i * 4));
+		if (ret)
+			return ret;
+	}
+
+	ret = rtl8366_init_vlan(smi);
+	if (ret)
+		return ret;
+
+	ret = rtl8366rb_setup_cascaded_irq(smi);
+	if (ret)
+		dev_info(smi->dev, "no interrupt support\n");
+
+	ret = realtek_smi_setup_mdio(smi);
+	if (ret) {
+		dev_info(smi->dev, "could not set up MDIO bus\n");
+		return -ENODEV;
+	}
+
+	return 0;
+}
+
+static enum dsa_tag_protocol rtl8366_get_tag_protocol(struct dsa_switch *ds,
+						      int port)
+{
+	/* For now, the RTL switches are handled without any custom tags.
+	 *
+	 * It is possible to turn on "custom tags" by removing the
+	 * RTL8368RB_CPU_INSTAG flag when enabling the port but what it
+	 * does is unfamiliar to DSA: ethernet frames of type 8899, the Realtek
+	 * Remote Control Protocol (RRCP) start to appear on the CPU port of
+	 * the device. So this is not the ordinary few extra bytes in the
+	 * frame. Instead it appears that the switch starts to talk Realtek
+	 * RRCP internally which means a pretty complex RRCP implementation
+	 * decoding and responding the RRCP protocol is needed to exploit this.
+	 *
+	 * The OpenRRCP project (dormant since 2009) have reverse-egineered
+	 * parts of the protocol.
+	 */
+	return DSA_TAG_PROTO_NONE;
+}
+
+static void rtl8366rb_adjust_link(struct dsa_switch *ds, int port,
+				  struct phy_device *phydev)
+{
+	struct realtek_smi *smi = ds->priv;
+	int ret;
+
+	if (port != smi->cpu_port)
+		return;
+
+	dev_info(smi->dev, "adjust link on CPU port (%d)\n", port);
+
+	/* Force the fixed CPU port into 1Gbit mode, no autonegotiation */
+	ret = regmap_update_bits(smi->map, RTL8366RB_MAC_FORCE_CTRL_REG,
+				 BIT(port), BIT(port));
+	if (ret)
+		return;
+
+	ret = regmap_update_bits(smi->map, RTL8366RB_PAACR2,
+				 0xFF00U,
+				 RTL8366RB_PAACR_CPU_PORT << 8);
+	if (ret)
+		return;
+
+	/* Enable the CPU port */
+	ret = regmap_update_bits(smi->map, RTL8366RB_PECR, BIT(port),
+				 0);
+	if (ret)
+		return;
+}
+
+static void rb8366rb_set_port_led(struct realtek_smi *smi,
+				  int port, bool enable)
+{
+	u16 val = enable ? 0x3f : 0;
+	int ret;
+
+	if (smi->leds_disabled)
+		return;
+
+	switch (port) {
+	case 0:
+		ret = regmap_update_bits(smi->map,
+					 RTL8366RB_LED_0_1_CTRL_REG,
+					 0x3F, val);
+		break;
+	case 1:
+		ret = regmap_update_bits(smi->map,
+					 RTL8366RB_LED_0_1_CTRL_REG,
+					 0x3F << RTL8366RB_LED_1_OFFSET,
+					 val << RTL8366RB_LED_1_OFFSET);
+		break;
+	case 2:
+		ret = regmap_update_bits(smi->map,
+					 RTL8366RB_LED_2_3_CTRL_REG,
+					 0x3F, val);
+		break;
+	case 3:
+		ret = regmap_update_bits(smi->map,
+					 RTL8366RB_LED_2_3_CTRL_REG,
+					 0x3F << RTL8366RB_LED_3_OFFSET,
+					 val << RTL8366RB_LED_3_OFFSET);
+		break;
+	case 4:
+		ret = regmap_update_bits(smi->map,
+					 RTL8366RB_INTERRUPT_CONTROL_REG,
+					 RTL8366RB_P4_RGMII_LED,
+					 enable ? RTL8366RB_P4_RGMII_LED : 0);
+		break;
+	default:
+		dev_err(smi->dev, "no LED for port %d\n", port);
+		return;
+	}
+	if (ret)
+		dev_err(smi->dev, "error updating LED on port %d\n", port);
+}
+
+static int
+rtl8366rb_port_enable(struct dsa_switch *ds, int port,
+		      struct phy_device *phy)
+{
+	struct realtek_smi *smi = ds->priv;
+	int ret;
+
+	dev_dbg(smi->dev, "enable port %d\n", port);
+	ret = regmap_update_bits(smi->map, RTL8366RB_PECR, BIT(port),
+				 0);
+	if (ret)
+		return ret;
+
+	rb8366rb_set_port_led(smi, port, true);
+	return 0;
+}
+
+static void
+rtl8366rb_port_disable(struct dsa_switch *ds, int port,
+		       struct phy_device *phy)
+{
+	struct realtek_smi *smi = ds->priv;
+	int ret;
+
+	dev_dbg(smi->dev, "disable port %d\n", port);
+	ret = regmap_update_bits(smi->map, RTL8366RB_PECR, BIT(port),
+				 BIT(port));
+	if (ret)
+		return;
+
+	rb8366rb_set_port_led(smi, port, false);
+}
+
+static int rtl8366rb_get_vlan_4k(struct realtek_smi *smi, u32 vid,
+				 struct rtl8366_vlan_4k *vlan4k)
+{
+	u32 data[3];
+	int ret;
+	int i;
+
+	memset(vlan4k, '\0', sizeof(struct rtl8366_vlan_4k));
+
+	if (vid >= RTL8366RB_NUM_VIDS)
+		return -EINVAL;
+
+	/* write VID */
+	ret = regmap_write(smi->map, RTL8366RB_VLAN_TABLE_WRITE_BASE,
+			   vid & RTL8366RB_VLAN_VID_MASK);
+	if (ret)
+		return ret;
+
+	/* write table access control word */
+	ret = regmap_write(smi->map, RTL8366RB_TABLE_ACCESS_CTRL_REG,
+			   RTL8366RB_TABLE_VLAN_READ_CTRL);
+	if (ret)
+		return ret;
+
+	for (i = 0; i < 3; i++) {
+		ret = regmap_read(smi->map,
+				  RTL8366RB_VLAN_TABLE_READ_BASE + i,
+				  &data[i]);
+		if (ret)
+			return ret;
+	}
+
+	vlan4k->vid = vid;
+	vlan4k->untag = (data[1] >> RTL8366RB_VLAN_UNTAG_SHIFT) &
+			RTL8366RB_VLAN_UNTAG_MASK;
+	vlan4k->member = data[1] & RTL8366RB_VLAN_MEMBER_MASK;
+	vlan4k->fid = data[2] & RTL8366RB_VLAN_FID_MASK;
+
+	return 0;
+}
+
+static int rtl8366rb_set_vlan_4k(struct realtek_smi *smi,
+				 const struct rtl8366_vlan_4k *vlan4k)
+{
+	u32 data[3];
+	int ret;
+	int i;
+
+	if (vlan4k->vid >= RTL8366RB_NUM_VIDS ||
+	    vlan4k->member > RTL8366RB_VLAN_MEMBER_MASK ||
+	    vlan4k->untag > RTL8366RB_VLAN_UNTAG_MASK ||
+	    vlan4k->fid > RTL8366RB_FIDMAX)
+		return -EINVAL;
+
+	data[0] = vlan4k->vid & RTL8366RB_VLAN_VID_MASK;
+	data[1] = (vlan4k->member & RTL8366RB_VLAN_MEMBER_MASK) |
+		  ((vlan4k->untag & RTL8366RB_VLAN_UNTAG_MASK) <<
+			RTL8366RB_VLAN_UNTAG_SHIFT);
+	data[2] = vlan4k->fid & RTL8366RB_VLAN_FID_MASK;
+
+	for (i = 0; i < 3; i++) {
+		ret = regmap_write(smi->map,
+				   RTL8366RB_VLAN_TABLE_WRITE_BASE + i,
+				   data[i]);
+		if (ret)
+			return ret;
+	}
+
+	/* write table access control word */
+	ret = regmap_write(smi->map, RTL8366RB_TABLE_ACCESS_CTRL_REG,
+			   RTL8366RB_TABLE_VLAN_WRITE_CTRL);
+
+	return ret;
+}
+
+static int rtl8366rb_get_vlan_mc(struct realtek_smi *smi, u32 index,
+				 struct rtl8366_vlan_mc *vlanmc)
+{
+	u32 data[3];
+	int ret;
+	int i;
+
+	memset(vlanmc, '\0', sizeof(struct rtl8366_vlan_mc));
+
+	if (index >= RTL8366RB_NUM_VLANS)
+		return -EINVAL;
+
+	for (i = 0; i < 3; i++) {
+		ret = regmap_read(smi->map,
+				  RTL8366RB_VLAN_MC_BASE(index) + i,
+				  &data[i]);
+		if (ret)
+			return ret;
+	}
+
+	vlanmc->vid = data[0] & RTL8366RB_VLAN_VID_MASK;
+	vlanmc->priority = (data[0] >> RTL8366RB_VLAN_PRIORITY_SHIFT) &
+		RTL8366RB_VLAN_PRIORITY_MASK;
+	vlanmc->untag = (data[1] >> RTL8366RB_VLAN_UNTAG_SHIFT) &
+		RTL8366RB_VLAN_UNTAG_MASK;
+	vlanmc->member = data[1] & RTL8366RB_VLAN_MEMBER_MASK;
+	vlanmc->fid = data[2] & RTL8366RB_VLAN_FID_MASK;
+
+	return 0;
+}
+
+static int rtl8366rb_set_vlan_mc(struct realtek_smi *smi, u32 index,
+				 const struct rtl8366_vlan_mc *vlanmc)
+{
+	u32 data[3];
+	int ret;
+	int i;
+
+	if (index >= RTL8366RB_NUM_VLANS ||
+	    vlanmc->vid >= RTL8366RB_NUM_VIDS ||
+	    vlanmc->priority > RTL8366RB_PRIORITYMAX ||
+	    vlanmc->member > RTL8366RB_VLAN_MEMBER_MASK ||
+	    vlanmc->untag > RTL8366RB_VLAN_UNTAG_MASK ||
+	    vlanmc->fid > RTL8366RB_FIDMAX)
+		return -EINVAL;
+
+	data[0] = (vlanmc->vid & RTL8366RB_VLAN_VID_MASK) |
+		  ((vlanmc->priority & RTL8366RB_VLAN_PRIORITY_MASK) <<
+			RTL8366RB_VLAN_PRIORITY_SHIFT);
+	data[1] = (vlanmc->member & RTL8366RB_VLAN_MEMBER_MASK) |
+		  ((vlanmc->untag & RTL8366RB_VLAN_UNTAG_MASK) <<
+			RTL8366RB_VLAN_UNTAG_SHIFT);
+	data[2] = vlanmc->fid & RTL8366RB_VLAN_FID_MASK;
+
+	for (i = 0; i < 3; i++) {
+		ret = regmap_write(smi->map,
+				   RTL8366RB_VLAN_MC_BASE(index) + i,
+				   data[i]);
+		if (ret)
+			return ret;
+	}
+
+	return 0;
+}
+
+static int rtl8366rb_get_mc_index(struct realtek_smi *smi, int port, int *val)
+{
+	u32 data;
+	int ret;
+
+	if (port >= smi->num_ports)
+		return -EINVAL;
+
+	ret = regmap_read(smi->map, RTL8366RB_PORT_VLAN_CTRL_REG(port),
+			  &data);
+	if (ret)
+		return ret;
+
+	*val = (data >> RTL8366RB_PORT_VLAN_CTRL_SHIFT(port)) &
+		RTL8366RB_PORT_VLAN_CTRL_MASK;
+
+	return 0;
+}
+
+static int rtl8366rb_set_mc_index(struct realtek_smi *smi, int port, int index)
+{
+	if (port >= smi->num_ports || index >= RTL8366RB_NUM_VLANS)
+		return -EINVAL;
+
+	return regmap_update_bits(smi->map, RTL8366RB_PORT_VLAN_CTRL_REG(port),
+				RTL8366RB_PORT_VLAN_CTRL_MASK <<
+					RTL8366RB_PORT_VLAN_CTRL_SHIFT(port),
+				(index & RTL8366RB_PORT_VLAN_CTRL_MASK) <<
+					RTL8366RB_PORT_VLAN_CTRL_SHIFT(port));
+}
+
+static bool rtl8366rb_is_vlan_valid(struct realtek_smi *smi, unsigned int vlan)
+{
+	unsigned int max = RTL8366RB_NUM_VLANS;
+
+	if (smi->vlan4k_enabled)
+		max = RTL8366RB_NUM_VIDS - 1;
+
+	if (vlan == 0 || vlan >= max)
+		return false;
+
+	return true;
+}
+
+static int rtl8366rb_enable_vlan(struct realtek_smi *smi, bool enable)
+{
+	dev_dbg(smi->dev, "%s VLAN\n", enable ? "enable" : "disable");
+	return regmap_update_bits(smi->map,
+				  RTL8366RB_SGCR, RTL8366RB_SGCR_EN_VLAN,
+				  enable ? RTL8366RB_SGCR_EN_VLAN : 0);
+}
+
+static int rtl8366rb_enable_vlan4k(struct realtek_smi *smi, bool enable)
+{
+	dev_dbg(smi->dev, "%s VLAN 4k\n", enable ? "enable" : "disable");
+	return regmap_update_bits(smi->map, RTL8366RB_SGCR,
+				  RTL8366RB_SGCR_EN_VLAN_4KTB,
+				  enable ? RTL8366RB_SGCR_EN_VLAN_4KTB : 0);
+}
+
+static int rtl8366rb_phy_read(struct realtek_smi *smi, int phy, int regnum)
+{
+	u32 val;
+	u32 reg;
+	int ret;
+
+	if (phy > RTL8366RB_PHY_NO_MAX)
+		return -EINVAL;
+
+	ret = regmap_write(smi->map, RTL8366RB_PHY_ACCESS_CTRL_REG,
+			   RTL8366RB_PHY_CTRL_READ);
+	if (ret)
+		return ret;
+
+	reg = 0x8000 | (1 << (phy + RTL8366RB_PHY_NO_OFFSET)) | regnum;
+
+	ret = regmap_write(smi->map, reg, 0);
+	if (ret) {
+		dev_err(smi->dev,
+			"failed to write PHY%d reg %04x @ %04x, ret %d\n",
+			phy, regnum, reg, ret);
+		return ret;
+	}
+
+	ret = regmap_read(smi->map, RTL8366RB_PHY_ACCESS_DATA_REG, &val);
+	if (ret)
+		return ret;
+
+	dev_dbg(smi->dev, "read PHY%d register 0x%04x @ %08x, val <- %04x\n",
+		phy, regnum, reg, val);
+
+	return val;
+}
+
+static int rtl8366rb_phy_write(struct realtek_smi *smi, int phy, int regnum,
+			       u16 val)
+{
+	u32 reg;
+	int ret;
+
+	if (phy > RTL8366RB_PHY_NO_MAX)
+		return -EINVAL;
+
+	ret = regmap_write(smi->map, RTL8366RB_PHY_ACCESS_CTRL_REG,
+			   RTL8366RB_PHY_CTRL_WRITE);
+	if (ret)
+		return ret;
+
+	reg = 0x8000 | (1 << (phy + RTL8366RB_PHY_NO_OFFSET)) | regnum;
+
+	dev_dbg(smi->dev, "write PHY%d register 0x%04x @ %04x, val -> %04x\n",
+		phy, regnum, reg, val);
+
+	ret = regmap_write(smi->map, reg, val);
+	if (ret)
+		return ret;
+
+	return 0;
+}
+
+static int rtl8366rb_reset_chip(struct realtek_smi *smi)
+{
+	int timeout = 10;
+	u32 val;
+	int ret;
+
+	realtek_smi_write_reg_noack(smi, RTL8366RB_RESET_CTRL_REG,
+				    RTL8366RB_CHIP_CTRL_RESET_HW);
+	do {
+		usleep_range(20000, 25000);
+		ret = regmap_read(smi->map, RTL8366RB_RESET_CTRL_REG, &val);
+		if (ret)
+			return ret;
+
+		if (!(val & RTL8366RB_CHIP_CTRL_RESET_HW))
+			break;
+	} while (--timeout);
+
+	if (!timeout) {
+		dev_err(smi->dev, "timeout waiting for the switch to reset\n");
+		return -EIO;
+	}
+
+	return 0;
+}
+
+static int rtl8366rb_detect(struct realtek_smi *smi)
+{
+	struct device *dev = smi->dev;
+	int ret;
+	u32 val;
+
+	/* Detect device */
+	ret = regmap_read(smi->map, 0x5c, &val);
+	if (ret) {
+		dev_err(dev, "can't get chip ID (%d)\n", ret);
+		return ret;
+	}
+
+	switch (val) {
+	case 0x6027:
+		dev_info(dev, "found an RTL8366S switch\n");
+		dev_err(dev, "this switch is not yet supported, submit patches!\n");
+		return -ENODEV;
+	case 0x5937:
+		dev_info(dev, "found an RTL8366RB switch\n");
+		smi->cpu_port = RTL8366RB_PORT_NUM_CPU;
+		smi->num_ports = RTL8366RB_NUM_PORTS;
+		smi->num_vlan_mc = RTL8366RB_NUM_VLANS;
+		smi->mib_counters = rtl8366rb_mib_counters;
+		smi->num_mib_counters = ARRAY_SIZE(rtl8366rb_mib_counters);
+		break;
+	default:
+		dev_info(dev, "found an Unknown Realtek switch (id=0x%04x)\n",
+			 val);
+		break;
+	}
+
+	ret = rtl8366rb_reset_chip(smi);
+	if (ret)
+		return ret;
+
+	return 0;
+}
+
+static const struct dsa_switch_ops rtl8366rb_switch_ops = {
+	.get_tag_protocol = rtl8366_get_tag_protocol,
+	.setup = rtl8366rb_setup,
+	.adjust_link = rtl8366rb_adjust_link,
+	.get_strings = rtl8366_get_strings,
+	.get_ethtool_stats = rtl8366_get_ethtool_stats,
+	.get_sset_count = rtl8366_get_sset_count,
+	.port_vlan_filtering = rtl8366_vlan_filtering,
+	.port_vlan_prepare = rtl8366_vlan_prepare,
+	.port_vlan_add = rtl8366_vlan_add,
+	.port_vlan_del = rtl8366_vlan_del,
+	.port_enable = rtl8366rb_port_enable,
+	.port_disable = rtl8366rb_port_disable,
+};
+
+static const struct realtek_smi_ops rtl8366rb_smi_ops = {
+	.detect		= rtl8366rb_detect,
+	.get_vlan_mc	= rtl8366rb_get_vlan_mc,
+	.set_vlan_mc	= rtl8366rb_set_vlan_mc,
+	.get_vlan_4k	= rtl8366rb_get_vlan_4k,
+	.set_vlan_4k	= rtl8366rb_set_vlan_4k,
+	.get_mc_index	= rtl8366rb_get_mc_index,
+	.set_mc_index	= rtl8366rb_set_mc_index,
+	.get_mib_counter = rtl8366rb_get_mib_counter,
+	.is_vlan_valid	= rtl8366rb_is_vlan_valid,
+	.enable_vlan	= rtl8366rb_enable_vlan,
+	.enable_vlan4k	= rtl8366rb_enable_vlan4k,
+	.phy_read	= rtl8366rb_phy_read,
+	.phy_write	= rtl8366rb_phy_write,
+};
+
+const struct realtek_smi_variant rtl8366rb_variant = {
+	.ds_ops = &rtl8366rb_switch_ops,
+	.ops = &rtl8366rb_smi_ops,
+	.clk_delay = 10,
+	.cmd_read = 0xa9,
+	.cmd_write = 0xa8,
+};
+EXPORT_SYMBOL_GPL(rtl8366rb_variant);
-- 
2.17.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From linus.walleij at linaro.org  Sat Jul 14 05:45:55 2018
From: linus.walleij at linaro.org (Linus Walleij)
Date: Sat, 14 Jul 2018 11:45:55 +0200
Subject: [OpenWrt-Devel] [PATCH 3/4 v1] net: dsa: realtek-smi: Add Realtek
 SMI driver
In-Reply-To: <20180714094556.30791-1-linus.walleij@linaro.org>
References: <20180714094556.30791-1-linus.walleij@linaro.org>
Message-ID: <20180714094556.30791-3-linus.walleij@linaro.org>

This adds a driver core for the Realtek SMI chips and a
subdriver for the RTL8366RB. I just added this chip simply
because it is all I can test.

The code is a massaged variant of the code that has been
sitting out-of-tree in OpenWRT for years in the absence of
a proper switch subsystem. This creates a DSA driver for it.
I have tried to credit the original authors wherever
possible.

The main changes I've done from the OpenWRT code:

- Added an IRQ chip inside the RTL8366RB switch to demux and
  handle the line state IRQs.

- Distributed the phy handling out to the PHY driver.

- Added some RTL8366RB code that was missing in the driver at
  the time, such as setting up "green ethernet" with a funny
  jam table and forcing MAC5 (the CPU port) into 1 GBit.

- Select jam table and add the default jam table from the
  vendor driver, also for ASIC "version 0" if need be.

- Do not store jam tables in the device tree, store them
  in the driver.

- Pick in the "initvals" jam tables from OpenWRT's driver
  and make those get selected per compatible for the
  whole system. It's apparently about electrical settings
  for this system and whatnot, not really configuration
  from device tree.

- Implemented LED control: beware of bugs because there are
  no LEDs on the device I am using!

We do not implement custom DSA tags. This is explained in
a comment in the driver as well: this "tagging protocol" is
not simply a few extra bytes tagged on to the ethernet
frame as DSA is used to. Instead, enabling the CPU tags
will make the switch start talking Realtek RRCP internally.
For example a simple ping will make this kind of packets
appear inside the switch:

0000   ff ff ff ff ff ff bc ae c5 6b a8 3d 88 99 a2 00
0010   08 06 00 01 08 00 06 04 00 01 bc ae c5 6b a8 3d
0020   a9 fe 01 01 00 00 00 00 00 00 a9 fe 01 02 00 00
0030   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

As you can see a custom "8899" tagged packet using the
protocol 0xa2. Norm RRCP appears to always have this
protocol set to 0x01 according to OpenRRCP. You can also
see that this is not a ping packet at all, instead the
switch is starting to talk network management issues
with the CPU port.

So for now custom "tagging" is disabled.

This was tested on the D-Link DIR-685 with initramfs and
OpenWRT userspaces and works fine on all the LAN ports
(lan0 .. lan3). The WAN port is yet not working.

Cc: Antti Sepp?l? <a.seppala at gmail.com>
Cc: Roman Yeryomin <roman at advem.lv>
Cc: Colin Leitner <colin.leitner at googlemail.com>
Cc: Gabor Juhos <juhosg at openwrt.org>
Cc: Florian Fainelli <f.fainelli at gmail.com>
Signed-off-by: Linus Walleij <linus.walleij at linaro.org>
---
ChangeLog RFCv2->v1
- Drop the debugfs leftovers in the state container.
- Use strncpy() to get the MIB strings.
- Renamed Kconfig symbol to NET_DSA_REALTEK_SMI to match
  the PHY symbol better.
- Fixed a ton of checkpatch warnings and errors.
ChangeLog RFCv1->RFCv2:
- Create the internal MDIO bus from the new MDIO node in
  the device tree
- Support disabling all LEDs and LED setup
- Run the per-device "jam tables" to set up registers to
  initial predictable states.
- Fix a bunch of warnings from the static checkers that
  picked up the RFC patch for test immediately
---
 MAINTAINERS                   |    7 +
 drivers/net/dsa/Kconfig       |   11 +
 drivers/net/dsa/Makefile      |    2 +
 drivers/net/dsa/realtek-smi.c |  487 +++++++++++
 drivers/net/dsa/realtek-smi.h |  144 ++++
 drivers/net/dsa/rtl8366.c     |  516 ++++++++++++
 drivers/net/dsa/rtl8366rb.c   | 1424 +++++++++++++++++++++++++++++++++
 7 files changed, 2591 insertions(+)
 create mode 100644 drivers/net/dsa/realtek-smi.c
 create mode 100644 drivers/net/dsa/realtek-smi.h
 create mode 100644 drivers/net/dsa/rtl8366.c
 create mode 100644 drivers/net/dsa/rtl8366rb.c

diff --git a/MAINTAINERS b/MAINTAINERS
index 9d5eeff51b5f..174749b9ef96 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -12048,6 +12048,13 @@ S:	Maintained
 F:	sound/soc/codecs/rt*
 F:	include/sound/rt*.h
 
+REALTEK RTL83xx SMI DSA ROUTER CHIPS
+M:	Linus Walleij <linus.walleij at linaro.org>
+S:	Maintained
+F:	Documentation/devicetree/bindings/net/dsa/realtek-smi.txt
+F:	drivers/net/dsa/realtek-smi*
+F:	drivers/net/dsa/rtl83*
+
 REGISTER MAP ABSTRACTION
 M:	Mark Brown <broonie at kernel.org>
 L:	linux-kernel at vger.kernel.org
diff --git a/drivers/net/dsa/Kconfig b/drivers/net/dsa/Kconfig
index 2b81b97e994f..6bf4de83b34c 100644
--- a/drivers/net/dsa/Kconfig
+++ b/drivers/net/dsa/Kconfig
@@ -52,6 +52,17 @@ config NET_DSA_QCA8K
 	  This enables support for the Qualcomm Atheros QCA8K Ethernet
 	  switch chips.
 
+config NET_DSA_REALTEK_SMI
+	tristate "Realtek SMI Ethernet switch family support"
+	depends on NET_DSA
+	select FIXED_PHY
+	select IRQ_DOMAIN
+	select REALTEK_PHY
+	select REGMAP
+	---help---
+	  This enables support for the Realtek SMI-based switch
+	  chips, currently only RTL8366RB.
+
 config NET_DSA_SMSC_LAN9303
 	tristate
 	select NET_DSA_TAG_LAN9303
diff --git a/drivers/net/dsa/Makefile b/drivers/net/dsa/Makefile
index 15c2a831edf1..89891727579a 100644
--- a/drivers/net/dsa/Makefile
+++ b/drivers/net/dsa/Makefile
@@ -8,6 +8,8 @@ endif
 obj-$(CONFIG_NET_DSA_MT7530)	+= mt7530.o
 obj-$(CONFIG_NET_DSA_MV88E6060) += mv88e6060.o
 obj-$(CONFIG_NET_DSA_QCA8K)	+= qca8k.o
+obj-$(CONFIG_NET_DSA_REALTEK_SMI) += realtek.o
+realtek-objs			:= realtek-smi.o rtl8366.o rtl8366rb.o
 obj-$(CONFIG_NET_DSA_SMSC_LAN9303) += lan9303-core.o
 obj-$(CONFIG_NET_DSA_SMSC_LAN9303_I2C) += lan9303_i2c.o
 obj-$(CONFIG_NET_DSA_SMSC_LAN9303_MDIO) += lan9303_mdio.o
diff --git a/drivers/net/dsa/realtek-smi.c b/drivers/net/dsa/realtek-smi.c
new file mode 100644
index 000000000000..f941f4582825
--- /dev/null
+++ b/drivers/net/dsa/realtek-smi.c
@@ -0,0 +1,487 @@
+// SPDX-License-Identifier: GPL-2.0+
+/* Realtek Simple Management Interface (SMI) driver
+ * It can be discussed how "simple" this interface is.
+ *
+ * The SMI protocol piggy-backs the MDIO MDC and MDIO signals levels
+ * but the protocol is not MDIO at all. Instead it is a Realtek
+ * pecularity that need to bit-bang the lines in a special way to
+ * communicate with the switch.
+ *
+ * ASICs we intend to support with this driver:
+ *
+ * RTL8366   - The original version, apparently
+ * RTL8369   - Similar enough to have the same datsheet as RTL8366
+ * RTL8366RB - Probably reads out "RTL8366 revision B", has a quite
+ *             different register layout from the other two
+ * RTL8366S  - Is this "RTL8366 super"?
+ * RTL8367   - Has an OpenWRT driver as well
+ * RTL8368S  - Seems to be an alternative name for RTL8366RB
+ * RTL8370   - Also uses SMI
+ *
+ * Copyright (C) 2017 Linus Walleij <linus.walleij at linaro.org>
+ * Copyright (C) 2010 Antti Sepp?l? <a.seppala at gmail.com>
+ * Copyright (C) 2010 Roman Yeryomin <roman at advem.lv>
+ * Copyright (C) 2011 Colin Leitner <colin.leitner at googlemail.com>
+ * Copyright (C) 2009-2010 Gabor Juhos <juhosg at openwrt.org>
+ */
+
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/device.h>
+#include <linux/spinlock.h>
+#include <linux/skbuff.h>
+#include <linux/of.h>
+#include <linux/of_device.h>
+#include <linux/of_mdio.h>
+#include <linux/delay.h>
+#include <linux/gpio/consumer.h>
+#include <linux/platform_device.h>
+#include <linux/regmap.h>
+#include <linux/bitops.h>
+#include <linux/if_bridge.h>
+
+#include "realtek-smi.h"
+
+#define REALTEK_SMI_ACK_RETRY_COUNT		5
+#define REALTEK_SMI_HW_STOP_DELAY		25	/* msecs */
+#define REALTEK_SMI_HW_START_DELAY		100	/* msecs */
+
+static inline void realtek_smi_clk_delay(struct realtek_smi *smi)
+{
+	ndelay(smi->clk_delay);
+}
+
+static void realtek_smi_start(struct realtek_smi *smi)
+{
+	/* Set GPIO pins to output mode, with initial state:
+	 * SCK = 0, SDA = 1
+	 */
+	gpiod_direction_output(smi->mdc, 0);
+	gpiod_direction_output(smi->mdio, 1);
+	realtek_smi_clk_delay(smi);
+
+	/* CLK 1: 0 -> 1, 1 -> 0 */
+	gpiod_set_value(smi->mdc, 1);
+	realtek_smi_clk_delay(smi);
+	gpiod_set_value(smi->mdc, 0);
+	realtek_smi_clk_delay(smi);
+
+	/* CLK 2: */
+	gpiod_set_value(smi->mdc, 1);
+	realtek_smi_clk_delay(smi);
+	gpiod_set_value(smi->mdio, 0);
+	realtek_smi_clk_delay(smi);
+	gpiod_set_value(smi->mdc, 0);
+	realtek_smi_clk_delay(smi);
+	gpiod_set_value(smi->mdio, 1);
+}
+
+static void realtek_smi_stop(struct realtek_smi *smi)
+{
+	realtek_smi_clk_delay(smi);
+	gpiod_set_value(smi->mdio, 0);
+	gpiod_set_value(smi->mdc, 1);
+	realtek_smi_clk_delay(smi);
+	gpiod_set_value(smi->mdio, 1);
+	realtek_smi_clk_delay(smi);
+	gpiod_set_value(smi->mdc, 1);
+	realtek_smi_clk_delay(smi);
+	gpiod_set_value(smi->mdc, 0);
+	realtek_smi_clk_delay(smi);
+	gpiod_set_value(smi->mdc, 1);
+
+	/* Add a click */
+	realtek_smi_clk_delay(smi);
+	gpiod_set_value(smi->mdc, 0);
+	realtek_smi_clk_delay(smi);
+	gpiod_set_value(smi->mdc, 1);
+
+	/* Set GPIO pins to input mode */
+	gpiod_direction_input(smi->mdio);
+	gpiod_direction_input(smi->mdc);
+}
+
+static void realtek_smi_write_bits(struct realtek_smi *smi, u32 data, u32 len)
+{
+	for (; len > 0; len--) {
+		realtek_smi_clk_delay(smi);
+
+		/* Prepare data */
+		gpiod_set_value(smi->mdio, !!(data & (1 << (len - 1))));
+		realtek_smi_clk_delay(smi);
+
+		/* Clocking */
+		gpiod_set_value(smi->mdc, 1);
+		realtek_smi_clk_delay(smi);
+		gpiod_set_value(smi->mdc, 0);
+	}
+}
+
+static void realtek_smi_read_bits(struct realtek_smi *smi, u32 len, u32 *data)
+{
+	gpiod_direction_input(smi->mdio);
+
+	for (*data = 0; len > 0; len--) {
+		u32 u;
+
+		realtek_smi_clk_delay(smi);
+
+		/* Clocking */
+		gpiod_set_value(smi->mdc, 1);
+		realtek_smi_clk_delay(smi);
+		u = !!gpiod_get_value(smi->mdio);
+		gpiod_set_value(smi->mdc, 0);
+
+		*data |= (u << (len - 1));
+	}
+
+	gpiod_direction_output(smi->mdio, 0);
+}
+
+static int realtek_smi_wait_for_ack(struct realtek_smi *smi)
+{
+	int retry_cnt;
+
+	retry_cnt = 0;
+	do {
+		u32 ack;
+
+		realtek_smi_read_bits(smi, 1, &ack);
+		if (ack == 0)
+			break;
+
+		if (++retry_cnt > REALTEK_SMI_ACK_RETRY_COUNT) {
+			dev_err(smi->dev, "ACK timeout\n");
+			return -ETIMEDOUT;
+		}
+	} while (1);
+
+	return 0;
+}
+
+static int realtek_smi_write_byte(struct realtek_smi *smi, u8 data)
+{
+	realtek_smi_write_bits(smi, data, 8);
+	return realtek_smi_wait_for_ack(smi);
+}
+
+static int realtek_smi_write_byte_noack(struct realtek_smi *smi, u8 data)
+{
+	realtek_smi_write_bits(smi, data, 8);
+	return 0;
+}
+
+static int realtek_smi_read_byte0(struct realtek_smi *smi, u8 *data)
+{
+	u32 t;
+
+	/* Read data */
+	realtek_smi_read_bits(smi, 8, &t);
+	*data = (t & 0xff);
+
+	/* Send an ACK */
+	realtek_smi_write_bits(smi, 0x00, 1);
+
+	return 0;
+}
+
+static int realtek_smi_read_byte1(struct realtek_smi *smi, u8 *data)
+{
+	u32 t;
+
+	/* Read data */
+	realtek_smi_read_bits(smi, 8, &t);
+	*data = (t & 0xff);
+
+	/* Send an ACK */
+	realtek_smi_write_bits(smi, 0x01, 1);
+
+	return 0;
+}
+
+static int realtek_smi_read_reg(struct realtek_smi *smi, u32 addr, u32 *data)
+{
+	unsigned long flags;
+	u8 lo = 0;
+	u8 hi = 0;
+	int ret;
+
+	spin_lock_irqsave(&smi->lock, flags);
+
+	realtek_smi_start(smi);
+
+	/* Send READ command */
+	ret = realtek_smi_write_byte(smi, smi->cmd_read);
+	if (ret)
+		goto out;
+
+	/* Set ADDR[7:0] */
+	ret = realtek_smi_write_byte(smi, addr & 0xff);
+	if (ret)
+		goto out;
+
+	/* Set ADDR[15:8] */
+	ret = realtek_smi_write_byte(smi, addr >> 8);
+	if (ret)
+		goto out;
+
+	/* Read DATA[7:0] */
+	realtek_smi_read_byte0(smi, &lo);
+	/* Read DATA[15:8] */
+	realtek_smi_read_byte1(smi, &hi);
+
+	*data = ((u32)lo) | (((u32)hi) << 8);
+
+	ret = 0;
+
+ out:
+	realtek_smi_stop(smi);
+	spin_unlock_irqrestore(&smi->lock, flags);
+
+	return ret;
+}
+
+static int realtek_smi_write_reg(struct realtek_smi *smi,
+				 u32 addr, u32 data, bool ack)
+{
+	unsigned long flags;
+	int ret;
+
+	spin_lock_irqsave(&smi->lock, flags);
+
+	realtek_smi_start(smi);
+
+	/* Send WRITE command */
+	ret = realtek_smi_write_byte(smi, smi->cmd_write);
+	if (ret)
+		goto out;
+
+	/* Set ADDR[7:0] */
+	ret = realtek_smi_write_byte(smi, addr & 0xff);
+	if (ret)
+		goto out;
+
+	/* Set ADDR[15:8] */
+	ret = realtek_smi_write_byte(smi, addr >> 8);
+	if (ret)
+		goto out;
+
+	/* Write DATA[7:0] */
+	ret = realtek_smi_write_byte(smi, data & 0xff);
+	if (ret)
+		goto out;
+
+	/* Write DATA[15:8] */
+	if (ack)
+		ret = realtek_smi_write_byte(smi, data >> 8);
+	else
+		ret = realtek_smi_write_byte_noack(smi, data >> 8);
+	if (ret)
+		goto out;
+
+	ret = 0;
+
+ out:
+	realtek_smi_stop(smi);
+	spin_unlock_irqrestore(&smi->lock, flags);
+
+	return ret;
+}
+
+/* There is one single case when we need to use this accessor and that
+ * is when issueing soft reset. Since the device reset as soon as we write
+ * that bit, no ACK will come back for natural reasons.
+ */
+int realtek_smi_write_reg_noack(struct realtek_smi *smi, u32 addr,
+				u32 data)
+{
+	return realtek_smi_write_reg(smi, addr, data, false);
+}
+EXPORT_SYMBOL_GPL(realtek_smi_write_reg_noack);
+
+/* Regmap accessors */
+
+static int realtek_smi_write(void *ctx, u32 reg, u32 val)
+{
+	struct realtek_smi *smi = ctx;
+
+	return realtek_smi_write_reg(smi, reg, val, true);
+}
+
+static int realtek_smi_read(void *ctx, u32 reg, u32 *val)
+{
+	struct realtek_smi *smi = ctx;
+
+	return realtek_smi_read_reg(smi, reg, val);
+}
+
+static const struct regmap_config realtek_smi_mdio_regmap_config = {
+	.reg_bits = 10, /* A4..A0 R4..R0 */
+	.val_bits = 16,
+	.reg_stride = 1,
+	/* PHY regs are at 0x8000 */
+	.max_register = 0xffff,
+	.reg_format_endian = REGMAP_ENDIAN_BIG,
+	.reg_read = realtek_smi_read,
+	.reg_write = realtek_smi_write,
+	.cache_type = REGCACHE_NONE,
+};
+
+static int realtek_smi_mdio_read(struct mii_bus *bus, int addr, int regnum)
+{
+	struct realtek_smi *smi = bus->priv;
+
+	return smi->ops->phy_read(smi, addr, regnum);
+}
+
+static int realtek_smi_mdio_write(struct mii_bus *bus, int addr, int regnum,
+				  u16 val)
+{
+	struct realtek_smi *smi = bus->priv;
+
+	return smi->ops->phy_write(smi, addr, regnum, val);
+}
+
+int realtek_smi_setup_mdio(struct realtek_smi *smi)
+{
+	struct device_node *mdio_np;
+	int ret;
+
+	mdio_np = of_find_compatible_node(smi->dev->of_node, NULL,
+					  "realtek,smi-mdio");
+	if (!mdio_np) {
+		dev_err(smi->dev, "no MDIO bus node\n");
+		return -ENODEV;
+	}
+
+	smi->slave_mii_bus = devm_mdiobus_alloc(smi->dev);
+	if (!smi->slave_mii_bus)
+		return -ENOMEM;
+	smi->slave_mii_bus->priv = smi;
+	smi->slave_mii_bus->name = "SMI slave MII";
+	smi->slave_mii_bus->read = realtek_smi_mdio_read;
+	smi->slave_mii_bus->write = realtek_smi_mdio_write;
+	snprintf(smi->slave_mii_bus->id, MII_BUS_ID_SIZE, "SMI-%d",
+		 smi->ds->index);
+	smi->slave_mii_bus->dev.of_node = mdio_np;
+	smi->slave_mii_bus->parent = smi->dev;
+	smi->ds->slave_mii_bus = smi->slave_mii_bus;
+
+	ret = of_mdiobus_register(smi->slave_mii_bus, mdio_np);
+	if (ret) {
+		dev_err(smi->dev, "unable to register MDIO bus %s\n",
+			smi->slave_mii_bus->id);
+		of_node_put(mdio_np);
+	}
+
+	return 0;
+}
+
+static int realtek_smi_probe(struct platform_device *pdev)
+{
+	const struct realtek_smi_variant *var;
+	struct device *dev = &pdev->dev;
+	struct realtek_smi *smi;
+	struct device_node *np;
+	int ret;
+
+	var = of_device_get_match_data(dev);
+	np = dev->of_node;
+
+	smi = devm_kzalloc(dev, sizeof(*smi), GFP_KERNEL);
+	if (!smi)
+		return -ENOMEM;
+	smi->map = devm_regmap_init(dev, NULL, smi,
+				    &realtek_smi_mdio_regmap_config);
+	if (IS_ERR(smi->map)) {
+		ret = PTR_ERR(smi->map);
+		dev_err(dev, "regmap init failed: %d\n", ret);
+		return ret;
+	}
+
+	/* Link forward and backward */
+	smi->dev = dev;
+	smi->clk_delay = var->clk_delay;
+	smi->cmd_read = var->cmd_read;
+	smi->cmd_write = var->cmd_write;
+	smi->ops = var->ops;
+
+	dev_set_drvdata(dev, smi);
+	spin_lock_init(&smi->lock);
+
+	/* TODO: if power is software controlled, set up any regulators here */
+
+	/* Assert then deassert RESET */
+	smi->reset = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_HIGH);
+	if (IS_ERR(smi->reset)) {
+		dev_err(dev, "failed to get RESET GPIO\n");
+		return PTR_ERR(smi->reset);
+	}
+	msleep(REALTEK_SMI_HW_STOP_DELAY);
+	gpiod_set_value(smi->reset, 0);
+	msleep(REALTEK_SMI_HW_START_DELAY);
+	dev_info(dev, "deasserted RESET\n");
+
+	/* Fetch MDIO pins */
+	smi->mdc = devm_gpiod_get_optional(dev, "mdc", GPIOD_OUT_LOW);
+	if (IS_ERR(smi->mdc))
+		return PTR_ERR(smi->mdc);
+	smi->mdio = devm_gpiod_get_optional(dev, "mdio", GPIOD_OUT_LOW);
+	if (IS_ERR(smi->mdio))
+		return PTR_ERR(smi->mdio);
+
+	smi->leds_disabled = of_property_read_bool(np, "realtek,disable-leds");
+
+	ret = smi->ops->detect(smi);
+	if (ret) {
+		dev_err(dev, "unable to detect switch\n");
+		return ret;
+	}
+
+	smi->ds = dsa_switch_alloc(dev, smi->num_ports);
+	if (!smi->ds)
+		return -ENOMEM;
+	smi->ds->priv = smi;
+
+	smi->ds->ops = var->ds_ops;
+	ret = dsa_register_switch(smi->ds);
+	if (ret) {
+		dev_err(dev, "unable to register switch ret = %d\n", ret);
+		return ret;
+	}
+	return 0;
+}
+
+static int realtek_smi_remove(struct platform_device *pdev)
+{
+	struct realtek_smi *smi = dev_get_drvdata(&pdev->dev);
+
+	dsa_unregister_switch(smi->ds);
+	gpiod_set_value(smi->reset, 1);
+
+	return 0;
+}
+
+static const struct of_device_id realtek_smi_of_match[] = {
+	{
+		.compatible = "realtek,rtl8366rb",
+		.data = &rtl8366rb_variant,
+	},
+	{
+		/* FIXME: add support for RTL8366S and more */
+		.compatible = "realtek,rtl8366s",
+		.data = NULL,
+	},
+	{ /* sentinel */ },
+};
+MODULE_DEVICE_TABLE(of, realtek_smi_of_match);
+
+static struct platform_driver realtek_smi_driver = {
+	.driver = {
+		.name = "realtek-smi",
+		.of_match_table = of_match_ptr(realtek_smi_of_match),
+	},
+	.probe  = realtek_smi_probe,
+	.remove = realtek_smi_remove,
+};
+module_platform_driver(realtek_smi_driver);
diff --git a/drivers/net/dsa/realtek-smi.h b/drivers/net/dsa/realtek-smi.h
new file mode 100644
index 000000000000..9a63b51e1d82
--- /dev/null
+++ b/drivers/net/dsa/realtek-smi.h
@@ -0,0 +1,144 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/* Realtek SMI interface driver defines
+ *
+ * Copyright (C) 2017 Linus Walleij <linus.walleij at linaro.org>
+ * Copyright (C) 2009-2010 Gabor Juhos <juhosg at openwrt.org>
+ */
+
+#ifndef _REALTEK_SMI_H
+#define _REALTEK_SMI_H
+
+#include <linux/phy.h>
+#include <linux/platform_device.h>
+#include <linux/gpio/consumer.h>
+#include <net/dsa.h>
+
+struct realtek_smi_ops;
+struct dentry;
+struct inode;
+struct file;
+
+struct rtl8366_mib_counter {
+	unsigned int	base;
+	unsigned int	offset;
+	unsigned int	length;
+	const char	*name;
+};
+
+struct rtl8366_vlan_mc {
+	u16	vid;
+	u16	untag;
+	u16	member;
+	u8	fid;
+	u8	priority;
+};
+
+struct rtl8366_vlan_4k {
+	u16	vid;
+	u16	untag;
+	u16	member;
+	u8	fid;
+};
+
+struct realtek_smi {
+	struct device		*dev;
+	struct gpio_desc	*reset;
+	struct gpio_desc	*mdc;
+	struct gpio_desc	*mdio;
+	struct regmap		*map;
+	struct mii_bus		*slave_mii_bus;
+
+	unsigned int		clk_delay;
+	u8			cmd_read;
+	u8			cmd_write;
+	spinlock_t		lock; /* Locks around command writes */
+	struct dsa_switch	*ds;
+	struct irq_domain	*irqdomain;
+	bool			leds_disabled;
+
+	unsigned int		cpu_port;
+	unsigned int		num_ports;
+	unsigned int		num_vlan_mc;
+	unsigned int		num_mib_counters;
+	struct rtl8366_mib_counter *mib_counters;
+
+	const struct realtek_smi_ops *ops;
+
+	int			vlan_enabled;
+	int			vlan4k_enabled;
+
+	char			buf[4096];
+};
+
+/**
+ * struct realtek_smi_ops - vtable for the per-SMI-chiptype operations
+ * @detect: detects the chiptype
+ */
+struct realtek_smi_ops {
+	int	(*detect)(struct realtek_smi *smi);
+	int	(*reset_chip)(struct realtek_smi *smi);
+	int	(*setup)(struct realtek_smi *smi);
+	void	(*cleanup)(struct realtek_smi *smi);
+	int	(*get_mib_counter)(struct realtek_smi *smi,
+				   int port,
+				   struct rtl8366_mib_counter *mib,
+				   u64 *mibvalue);
+	int	(*get_vlan_mc)(struct realtek_smi *smi, u32 index,
+			       struct rtl8366_vlan_mc *vlanmc);
+	int	(*set_vlan_mc)(struct realtek_smi *smi, u32 index,
+			       const struct rtl8366_vlan_mc *vlanmc);
+	int	(*get_vlan_4k)(struct realtek_smi *smi, u32 vid,
+			       struct rtl8366_vlan_4k *vlan4k);
+	int	(*set_vlan_4k)(struct realtek_smi *smi,
+			       const struct rtl8366_vlan_4k *vlan4k);
+	int	(*get_mc_index)(struct realtek_smi *smi, int port, int *val);
+	int	(*set_mc_index)(struct realtek_smi *smi, int port, int index);
+	bool	(*is_vlan_valid)(struct realtek_smi *smi, unsigned int vlan);
+	int	(*enable_vlan)(struct realtek_smi *smi, bool enable);
+	int	(*enable_vlan4k)(struct realtek_smi *smi, bool enable);
+	int	(*enable_port)(struct realtek_smi *smi, int port, bool enable);
+	int	(*phy_read)(struct realtek_smi *smi, int phy, int regnum);
+	int	(*phy_write)(struct realtek_smi *smi, int phy, int regnum,
+			     u16 val);
+};
+
+struct realtek_smi_variant {
+	const struct dsa_switch_ops *ds_ops;
+	const struct realtek_smi_ops *ops;
+	unsigned int clk_delay;
+	u8 cmd_read;
+	u8 cmd_write;
+};
+
+/* SMI core calls */
+int realtek_smi_write_reg_noack(struct realtek_smi *smi, u32 addr,
+				u32 data);
+int realtek_smi_setup_mdio(struct realtek_smi *smi);
+
+/* RTL8366 library helpers */
+int rtl8366_mc_is_used(struct realtek_smi *smi, int mc_index, int *used);
+int rtl8366_set_vlan(struct realtek_smi *smi, int vid, u32 member,
+		     u32 untag, u32 fid);
+int rtl8366_get_pvid(struct realtek_smi *smi, int port, int *val);
+int rtl8366_set_pvid(struct realtek_smi *smi, unsigned int port,
+		     unsigned int vid);
+int rtl8366_enable_vlan4k(struct realtek_smi *smi, bool enable);
+int rtl8366_enable_vlan(struct realtek_smi *smi, bool enable);
+int rtl8366_reset_vlan(struct realtek_smi *smi);
+int rtl8366_init_vlan(struct realtek_smi *smi);
+int rtl8366_vlan_filtering(struct dsa_switch *ds, int port,
+			   bool vlan_filtering);
+int rtl8366_vlan_prepare(struct dsa_switch *ds, int port,
+			 const struct switchdev_obj_port_vlan *vlan);
+void rtl8366_vlan_add(struct dsa_switch *ds, int port,
+		      const struct switchdev_obj_port_vlan *vlan);
+int rtl8366_vlan_del(struct dsa_switch *ds, int port,
+		     const struct switchdev_obj_port_vlan *vlan);
+void rtl8366_get_strings(struct dsa_switch *ds, int port, u32 stringset,
+			 uint8_t *data);
+int rtl8366_get_sset_count(struct dsa_switch *ds, int port, int sset);
+void rtl8366_get_ethtool_stats(struct dsa_switch *ds, int port, uint64_t *data);
+
+extern const struct realtek_smi_variant rtl8366rb_variant;
+
+#endif /*  _REALTEK_SMI_H */
diff --git a/drivers/net/dsa/rtl8366.c b/drivers/net/dsa/rtl8366.c
new file mode 100644
index 000000000000..58d8534f7ecb
--- /dev/null
+++ b/drivers/net/dsa/rtl8366.c
@@ -0,0 +1,516 @@
+// SPDX-License-Identifier: GPL-2.0
+/* Realtek SMI library helpers for the RTL8366x variants
+ * RTL8366RB and RTL8366S
+ *
+ * Copyright (C) 2017 Linus Walleij <linus.walleij at linaro.org>
+ * Copyright (C) 2009-2010 Gabor Juhos <juhosg at openwrt.org>
+ * Copyright (C) 2010 Antti Sepp?l? <a.seppala at gmail.com>
+ * Copyright (C) 2010 Roman Yeryomin <roman at advem.lv>
+ * Copyright (C) 2011 Colin Leitner <colin.leitner at googlemail.com>
+ */
+#include <linux/if_bridge.h>
+#include <net/dsa.h>
+
+#include "realtek-smi.h"
+
+int rtl8366_mc_is_used(struct realtek_smi *smi, int mc_index, int *used)
+{
+	int ret;
+	int i;
+
+	*used = 0;
+	for (i = 0; i < smi->num_ports; i++) {
+		int index = 0;
+
+		ret = smi->ops->get_mc_index(smi, i, &index);
+		if (ret)
+			return ret;
+
+		if (mc_index == index) {
+			*used = 1;
+			break;
+		}
+	}
+
+	return 0;
+}
+EXPORT_SYMBOL_GPL(rtl8366_mc_is_used);
+
+int rtl8366_set_vlan(struct realtek_smi *smi, int vid, u32 member,
+		     u32 untag, u32 fid)
+{
+	struct rtl8366_vlan_4k vlan4k;
+	int ret;
+	int i;
+
+	/* Update the 4K table */
+	ret = smi->ops->get_vlan_4k(smi, vid, &vlan4k);
+	if (ret)
+		return ret;
+
+	vlan4k.member = member;
+	vlan4k.untag = untag;
+	vlan4k.fid = fid;
+	ret = smi->ops->set_vlan_4k(smi, &vlan4k);
+	if (ret)
+		return ret;
+
+	/* Try to find an existing MC entry for this VID */
+	for (i = 0; i < smi->num_vlan_mc; i++) {
+		struct rtl8366_vlan_mc vlanmc;
+
+		ret = smi->ops->get_vlan_mc(smi, i, &vlanmc);
+		if (ret)
+			return ret;
+
+		if (vid == vlanmc.vid) {
+			/* update the MC entry */
+			vlanmc.member = member;
+			vlanmc.untag = untag;
+			vlanmc.fid = fid;
+
+			ret = smi->ops->set_vlan_mc(smi, i, &vlanmc);
+			break;
+		}
+	}
+
+	return ret;
+}
+EXPORT_SYMBOL_GPL(rtl8366_set_vlan);
+
+int rtl8366_get_pvid(struct realtek_smi *smi, int port, int *val)
+{
+	struct rtl8366_vlan_mc vlanmc;
+	int ret;
+	int index;
+
+	ret = smi->ops->get_mc_index(smi, port, &index);
+	if (ret)
+		return ret;
+
+	ret = smi->ops->get_vlan_mc(smi, index, &vlanmc);
+	if (ret)
+		return ret;
+
+	*val = vlanmc.vid;
+	return 0;
+}
+EXPORT_SYMBOL_GPL(rtl8366_get_pvid);
+
+int rtl8366_set_pvid(struct realtek_smi *smi, unsigned int port,
+		     unsigned int vid)
+{
+	struct rtl8366_vlan_mc vlanmc;
+	struct rtl8366_vlan_4k vlan4k;
+	int ret;
+	int i;
+
+	/* Try to find an existing MC entry for this VID */
+	for (i = 0; i < smi->num_vlan_mc; i++) {
+		ret = smi->ops->get_vlan_mc(smi, i, &vlanmc);
+		if (ret)
+			return ret;
+
+		if (vid == vlanmc.vid) {
+			ret = smi->ops->set_vlan_mc(smi, i, &vlanmc);
+			if (ret)
+				return ret;
+
+			ret = smi->ops->set_mc_index(smi, port, i);
+			return ret;
+		}
+	}
+
+	/* We have no MC entry for this VID, try to find an empty one */
+	for (i = 0; i < smi->num_vlan_mc; i++) {
+		ret = smi->ops->get_vlan_mc(smi, i, &vlanmc);
+		if (ret)
+			return ret;
+
+		if (vlanmc.vid == 0 && vlanmc.member == 0) {
+			/* Update the entry from the 4K table */
+			ret = smi->ops->get_vlan_4k(smi, vid, &vlan4k);
+			if (ret)
+				return ret;
+
+			vlanmc.vid = vid;
+			vlanmc.member = vlan4k.member;
+			vlanmc.untag = vlan4k.untag;
+			vlanmc.fid = vlan4k.fid;
+			ret = smi->ops->set_vlan_mc(smi, i, &vlanmc);
+			if (ret)
+				return ret;
+
+			ret = smi->ops->set_mc_index(smi, port, i);
+			return ret;
+		}
+	}
+
+	/* MC table is full, try to find an unused entry and replace it */
+	for (i = 0; i < smi->num_vlan_mc; i++) {
+		int used;
+
+		ret = rtl8366_mc_is_used(smi, i, &used);
+		if (ret)
+			return ret;
+
+		if (!used) {
+			/* Update the entry from the 4K table */
+			ret = smi->ops->get_vlan_4k(smi, vid, &vlan4k);
+			if (ret)
+				return ret;
+
+			vlanmc.vid = vid;
+			vlanmc.member = vlan4k.member;
+			vlanmc.untag = vlan4k.untag;
+			vlanmc.fid = vlan4k.fid;
+			ret = smi->ops->set_vlan_mc(smi, i, &vlanmc);
+			if (ret)
+				return ret;
+
+			ret = smi->ops->set_mc_index(smi, port, i);
+			return ret;
+		}
+	}
+
+	dev_err(smi->dev,
+		"all VLAN member configurations are in use\n");
+
+	return -ENOSPC;
+}
+EXPORT_SYMBOL_GPL(rtl8366_set_pvid);
+
+int rtl8366_enable_vlan4k(struct realtek_smi *smi, bool enable)
+{
+	int ret;
+
+	/* To enable 4k VLAN, ordinary VLAN must be enabled first,
+	 * but if we disable 4k VLAN it is fine to leave ordinary
+	 * VLAN enabled.
+	 */
+	if (enable) {
+		/* Make sure VLAN is ON */
+		ret = smi->ops->enable_vlan(smi, true);
+		if (ret)
+			return ret;
+
+		smi->vlan_enabled = true;
+	}
+
+	ret = smi->ops->enable_vlan4k(smi, enable);
+	if (ret)
+		return ret;
+
+	smi->vlan4k_enabled = enable;
+	return 0;
+}
+EXPORT_SYMBOL_GPL(rtl8366_enable_vlan4k);
+
+int rtl8366_enable_vlan(struct realtek_smi *smi, bool enable)
+{
+	int ret;
+
+	ret = smi->ops->enable_vlan(smi, enable);
+	if (ret)
+		return ret;
+
+	smi->vlan_enabled = enable;
+
+	/* If we turn VLAN off, make sure that we turn off
+	 * 4k VLAN as well, if that happened to be on.
+	 */
+	if (!enable) {
+		smi->vlan4k_enabled = false;
+		ret = smi->ops->enable_vlan4k(smi, false);
+	}
+
+	return ret;
+}
+EXPORT_SYMBOL_GPL(rtl8366_enable_vlan);
+
+int rtl8366_reset_vlan(struct realtek_smi *smi)
+{
+	struct rtl8366_vlan_mc vlanmc;
+	struct rtl8366_vlan_4k vlan4k;
+	int ret;
+	int i;
+
+	rtl8366_enable_vlan(smi, false);
+	rtl8366_enable_vlan4k(smi, false);
+
+	/* Clear the 16 VLAN member configurations */
+	vlanmc.vid = 0;
+	vlanmc.priority = 0;
+	vlanmc.member = 0;
+	vlanmc.untag = 0;
+	vlanmc.fid = 0;
+	for (i = 0; i < smi->num_vlan_mc; i++) {
+		ret = smi->ops->set_vlan_mc(smi, i, &vlanmc);
+		if (ret)
+			return ret;
+	}
+
+	return 0;
+}
+EXPORT_SYMBOL_GPL(rtl8366_reset_vlan);
+
+int rtl8366_init_vlan(struct realtek_smi *smi)
+{
+	int port;
+	int ret;
+
+	ret = rtl8366_reset_vlan(smi);
+	if (ret)
+		return ret;
+
+	/* Loop over the available ports, for each port, associate
+	 * it with the VLAN (port+1)
+	 */
+	for (port = 0; port < smi->num_ports; port++) {
+		u32 mask;
+
+		if (port == smi->cpu_port)
+			/* For the CPU port, make all ports members of this
+			 * VLAN.
+			 */
+			mask = GENMASK(smi->num_ports - 1, 0);
+		else
+			/* For all other ports, enable itself plus the
+			 * CPU port.
+			 */
+			mask = BIT(port) | BIT(smi->cpu_port);
+
+		/* For each port, set the port as member of VLAN (port+1)
+		 * and untagged, except for the CPU port: the CPU port (5) is
+		 * member of VLAN 6 and so are ALL the other ports as well.
+		 * Use filter 0 (no filter).
+		 */
+		dev_info(smi->dev, "VLAN%d port mask for port %d, %08x\n",
+			 (port + 1), port, mask);
+		ret = rtl8366_set_vlan(smi, (port + 1), mask, mask, 0);
+		if (ret)
+			return ret;
+
+		dev_info(smi->dev, "VLAN%d port %d, PVID set to %d\n",
+			 (port + 1), port, (port + 1));
+		ret = rtl8366_set_pvid(smi, port, (port + 1));
+		if (ret)
+			return ret;
+	}
+
+	return rtl8366_enable_vlan(smi, true);
+}
+EXPORT_SYMBOL_GPL(rtl8366_init_vlan);
+
+int rtl8366_vlan_filtering(struct dsa_switch *ds, int port, bool vlan_filtering)
+{
+	struct realtek_smi *smi = ds->priv;
+	struct rtl8366_vlan_4k vlan4k;
+	int ret;
+
+	if (!smi->ops->is_vlan_valid(smi, port))
+		return -EINVAL;
+
+	dev_info(smi->dev, "%s filtering on port %d\n",
+		 vlan_filtering ? "enable" : "disable",
+		 port);
+
+	/* TODO:
+	 * The hardware support filter ID (FID) 0..7, I have no clue how to
+	 * support this in the driver when the callback only says on/off.
+	 */
+	ret = smi->ops->get_vlan_4k(smi, port, &vlan4k);
+	if (ret)
+		return ret;
+
+	/* Just set the filter to FID 1 for now then */
+	ret = rtl8366_set_vlan(smi, port,
+			       vlan4k.member,
+			       vlan4k.untag,
+			       1);
+	if (ret)
+		return ret;
+
+	return 0;
+}
+EXPORT_SYMBOL_GPL(rtl8366_vlan_filtering);
+
+int rtl8366_vlan_prepare(struct dsa_switch *ds, int port,
+			 const struct switchdev_obj_port_vlan *vlan)
+{
+	struct realtek_smi *smi = ds->priv;
+	int ret;
+
+	if (!smi->ops->is_vlan_valid(smi, port))
+		return -EINVAL;
+
+	dev_info(smi->dev, "prepare VLANs %04x..%04x\n",
+		 vlan->vid_begin, vlan->vid_end);
+
+	/* Enable VLAN in the hardware
+	 * FIXME: what's with this 4k business?
+	 * Just rtl8366_enable_vlan() seems inconclusive.
+	 */
+	ret = rtl8366_enable_vlan4k(smi, true);
+	if (ret)
+		return ret;
+
+	return 0;
+}
+EXPORT_SYMBOL_GPL(rtl8366_vlan_prepare);
+
+void rtl8366_vlan_add(struct dsa_switch *ds, int port,
+		      const struct switchdev_obj_port_vlan *vlan)
+{
+	bool untagged = !!(vlan->flags & BRIDGE_VLAN_INFO_UNTAGGED);
+	bool pvid = !!(vlan->flags & BRIDGE_VLAN_INFO_PVID);
+	struct realtek_smi *smi = ds->priv;
+	u32 member = 0;
+	u32 untag = 0;
+	u16 vid;
+	int ret;
+
+	if (!smi->ops->is_vlan_valid(smi, port))
+		return;
+
+	dev_info(smi->dev, "add VLAN on port %d, %s, %s\n",
+		 port,
+		 untagged ? "untagged" : "tagged",
+		 pvid ? " PVID" : "no PVID");
+
+	if (dsa_is_dsa_port(ds, port) || dsa_is_cpu_port(ds, port))
+		dev_err(smi->dev, "port is DSA or CPU port\n");
+
+	for (vid = vlan->vid_begin; vid <= vlan->vid_end; ++vid) {
+		int pvid_val = 0;
+
+		dev_info(smi->dev, "add VLAN %04x\n", vid);
+		member |= BIT(port);
+
+		if (untagged)
+			untag |= BIT(port);
+
+		/* To ensure that we have a valid MC entry for this VLAN,
+		 * initialize the port VLAN ID here.
+		 */
+		ret = rtl8366_get_pvid(smi, port, &pvid_val);
+		if (ret < 0) {
+			dev_err(smi->dev, "could not lookup PVID for port %d\n",
+				port);
+			return;
+		}
+		if (pvid_val == 0) {
+			ret = rtl8366_set_pvid(smi, port, vid);
+			if (ret < 0)
+				return;
+		}
+	}
+
+	ret = rtl8366_set_vlan(smi, port, member, untag, 0);
+	if (ret)
+		dev_err(smi->dev,
+			"failed to set up VLAN %04x",
+			vid);
+}
+EXPORT_SYMBOL_GPL(rtl8366_vlan_add);
+
+int rtl8366_vlan_del(struct dsa_switch *ds, int port,
+		     const struct switchdev_obj_port_vlan *vlan)
+{
+	struct realtek_smi *smi = ds->priv;
+	u16 vid;
+	int ret;
+
+	dev_info(smi->dev, "del VLAN on port %d\n", port);
+
+	for (vid = vlan->vid_begin; vid <= vlan->vid_end; ++vid) {
+		int i;
+
+		dev_info(smi->dev, "del VLAN %04x\n", vid);
+
+		for (i = 0; i < smi->num_vlan_mc; i++) {
+			struct rtl8366_vlan_mc vlanmc;
+
+			ret = smi->ops->get_vlan_mc(smi, i, &vlanmc);
+			if (ret)
+				return ret;
+
+			if (vid == vlanmc.vid) {
+				/* clear VLAN member configurations */
+				vlanmc.vid = 0;
+				vlanmc.priority = 0;
+				vlanmc.member = 0;
+				vlanmc.untag = 0;
+				vlanmc.fid = 0;
+
+				ret = smi->ops->set_vlan_mc(smi, i, &vlanmc);
+				if (ret) {
+					dev_err(smi->dev,
+						"failed to remove VLAN %04x\n",
+						vid);
+					return ret;
+				}
+				break;
+			}
+		}
+	}
+
+	return 0;
+}
+EXPORT_SYMBOL_GPL(rtl8366_vlan_del);
+
+void rtl8366_get_strings(struct dsa_switch *ds, int port, u32 stringset,
+			 uint8_t *data)
+{
+	struct realtek_smi *smi = ds->priv;
+	struct rtl8366_mib_counter *mib;
+	int i;
+
+	if (port >= smi->num_ports)
+		return;
+
+	for (i = 0; i < smi->num_mib_counters; i++) {
+		mib = &smi->mib_counters[i];
+		strncpy(data + i * ETH_GSTRING_LEN,
+			mib->name, ETH_GSTRING_LEN);
+	}
+}
+EXPORT_SYMBOL_GPL(rtl8366_get_strings);
+
+int rtl8366_get_sset_count(struct dsa_switch *ds, int port, int sset)
+{
+	struct realtek_smi *smi = ds->priv;
+
+	/* We only support SS_STATS */
+	if (sset != ETH_SS_STATS)
+		return 0;
+	if (port >= smi->num_ports)
+		return -EINVAL;
+
+	return smi->num_mib_counters;
+}
+EXPORT_SYMBOL_GPL(rtl8366_get_sset_count);
+
+void rtl8366_get_ethtool_stats(struct dsa_switch *ds, int port, uint64_t *data)
+{
+	struct realtek_smi *smi = ds->priv;
+	int i;
+	int ret;
+
+	if (port >= smi->num_ports)
+		return;
+
+	for (i = 0; i < smi->num_mib_counters; i++) {
+		struct rtl8366_mib_counter *mib;
+		u64 mibvalue = 0;
+
+		mib = &smi->mib_counters[i];
+		ret = smi->ops->get_mib_counter(smi, port, mib, &mibvalue);
+		if (ret) {
+			dev_err(smi->dev, "error reading MIB counter %s\n",
+				mib->name);
+		}
+		data[i] = mibvalue;
+	}
+}
+EXPORT_SYMBOL_GPL(rtl8366_get_ethtool_stats);
diff --git a/drivers/net/dsa/rtl8366rb.c b/drivers/net/dsa/rtl8366rb.c
new file mode 100644
index 000000000000..1e55b9bf8b56
--- /dev/null
+++ b/drivers/net/dsa/rtl8366rb.c
@@ -0,0 +1,1424 @@
+// SPDX-License-Identifier: GPL-2.0
+/* Realtek SMI subdriver for the Realtek RTL8366RB ethernet switch
+ *
+ * This is a sparsely documented chip, the only viable documentation seems
+ * to be a patched up code drop from the vendor that appear in various
+ * GPL source trees.
+ *
+ * Copyright (C) 2017 Linus Walleij <linus.walleij at linaro.org>
+ * Copyright (C) 2009-2010 Gabor Juhos <juhosg at openwrt.org>
+ * Copyright (C) 2010 Antti Sepp?l? <a.seppala at gmail.com>
+ * Copyright (C) 2010 Roman Yeryomin <roman at advem.lv>
+ * Copyright (C) 2011 Colin Leitner <colin.leitner at googlemail.com>
+ */
+
+#include <linux/bitops.h>
+#include <linux/etherdevice.h>
+#include <linux/interrupt.h>
+#include <linux/irqdomain.h>
+#include <linux/irqchip/chained_irq.h>
+#include <linux/of_irq.h>
+#include <linux/regmap.h>
+
+#include "realtek-smi.h"
+
+#define RTL8366RB_PORT_NUM_CPU		5
+#define RTL8366RB_NUM_PORTS		6
+#define RTL8366RB_PHY_NO_MAX		4
+#define RTL8366RB_PHY_ADDR_MAX		31
+
+/* Switch Global Configuration register */
+#define RTL8366RB_SGCR				0x0000
+#define RTL8366RB_SGCR_EN_BC_STORM_CTRL		BIT(0)
+#define RTL8366RB_SGCR_MAX_LENGTH(a)		((a) << 4)
+#define RTL8366RB_SGCR_MAX_LENGTH_MASK		RTL8366RB_SGCR_MAX_LENGTH(0x3)
+#define RTL8366RB_SGCR_MAX_LENGTH_1522		RTL8366RB_SGCR_MAX_LENGTH(0x0)
+#define RTL8366RB_SGCR_MAX_LENGTH_1536		RTL8366RB_SGCR_MAX_LENGTH(0x1)
+#define RTL8366RB_SGCR_MAX_LENGTH_1552		RTL8366RB_SGCR_MAX_LENGTH(0x2)
+#define RTL8366RB_SGCR_MAX_LENGTH_9216		RTL8366RB_SGCR_MAX_LENGTH(0x3)
+#define RTL8366RB_SGCR_EN_VLAN			BIT(13)
+#define RTL8366RB_SGCR_EN_VLAN_4KTB		BIT(14)
+
+/* Port Enable Control register */
+#define RTL8366RB_PECR				0x0001
+
+/* Switch Security Control registers */
+#define RTL8366RB_SSCR0				0x0002
+#define RTL8366RB_SSCR1				0x0003
+#define RTL8366RB_SSCR2				0x0004
+#define RTL8366RB_SSCR2_DROP_UNKNOWN_DA		BIT(0)
+
+/* Port Mirror Control Register */
+#define RTL8366RB_PMCR				0x0007
+#define RTL8366RB_PMCR_SOURCE_PORT(a)		(a)
+#define RTL8366RB_PMCR_SOURCE_PORT_MASK		0x000f
+#define RTL8366RB_PMCR_MONITOR_PORT(a)		((a) << 4)
+#define RTL8366RB_PMCR_MONITOR_PORT_MASK	0x00f0
+#define RTL8366RB_PMCR_MIRROR_RX		BIT(8)
+#define RTL8366RB_PMCR_MIRROR_TX		BIT(9)
+#define RTL8366RB_PMCR_MIRROR_SPC		BIT(10)
+#define RTL8366RB_PMCR_MIRROR_ISO		BIT(11)
+
+/* bits 0..7 = port 0, bits 8..15 = port 1 */
+#define RTL8366RB_PAACR0		0x0010
+/* bits 0..7 = port 2, bits 8..15 = port 3 */
+#define RTL8366RB_PAACR1		0x0011
+/* bits 0..7 = port 4, bits 8..15 = port 5 */
+#define RTL8366RB_PAACR2		0x0012
+#define RTL8366RB_PAACR_SPEED_10M	0
+#define RTL8366RB_PAACR_SPEED_100M	1
+#define RTL8366RB_PAACR_SPEED_1000M	2
+#define RTL8366RB_PAACR_FULL_DUPLEX	BIT(2)
+#define RTL8366RB_PAACR_LINK_UP		BIT(4)
+#define RTL8366RB_PAACR_TX_PAUSE	BIT(5)
+#define RTL8366RB_PAACR_RX_PAUSE	BIT(6)
+#define RTL8366RB_PAACR_AN		BIT(7)
+
+#define RTL8366RB_PAACR_CPU_PORT	(RTL8366RB_PAACR_SPEED_1000M | \
+					 RTL8366RB_PAACR_FULL_DUPLEX | \
+					 RTL8366RB_PAACR_LINK_UP | \
+					 RTL8366RB_PAACR_TX_PAUSE | \
+					 RTL8366RB_PAACR_RX_PAUSE)
+
+/* bits 0..7 = port 0, bits 8..15 = port 1 */
+#define RTL8366RB_PSTAT0		0x0014
+/* bits 0..7 = port 2, bits 8..15 = port 3 */
+#define RTL8366RB_PSTAT1		0x0015
+/* bits 0..7 = port 4, bits 8..15 = port 5 */
+#define RTL8366RB_PSTAT2		0x0016
+
+#define RTL8366RB_POWER_SAVING_REG	0x0021
+
+/* CPU port control reg */
+#define RTL8368RB_CPU_CTRL_REG		0x0061
+#define RTL8368RB_CPU_PORTS_MSK		0x00FF
+/* Enables inserting custom tag length/type 0x8899 */
+#define RTL8368RB_CPU_INSTAG		BIT(15)
+
+#define RTL8366RB_SMAR0			0x0070 /* bits 0..15 */
+#define RTL8366RB_SMAR1			0x0071 /* bits 16..31 */
+#define RTL8366RB_SMAR2			0x0072 /* bits 32..47 */
+
+#define RTL8366RB_RESET_CTRL_REG		0x0100
+#define RTL8366RB_CHIP_CTRL_RESET_HW		BIT(0)
+#define RTL8366RB_CHIP_CTRL_RESET_SW		BIT(1)
+
+#define RTL8366RB_CHIP_ID_REG			0x0509
+#define RTL8366RB_CHIP_ID_8366			0x5937
+#define RTL8366RB_CHIP_VERSION_CTRL_REG		0x050A
+#define RTL8366RB_CHIP_VERSION_MASK		0xf
+
+/* PHY registers control */
+#define RTL8366RB_PHY_ACCESS_CTRL_REG		0x8000
+#define RTL8366RB_PHY_CTRL_READ			BIT(0)
+#define RTL8366RB_PHY_CTRL_WRITE		0
+#define RTL8366RB_PHY_ACCESS_BUSY_REG		0x8001
+#define RTL8366RB_PHY_INT_BUSY			BIT(0)
+#define RTL8366RB_PHY_EXT_BUSY			BIT(4)
+#define RTL8366RB_PHY_ACCESS_DATA_REG		0x8002
+#define RTL8366RB_PHY_EXT_CTRL_REG		0x8010
+#define RTL8366RB_PHY_EXT_WRDATA_REG		0x8011
+#define RTL8366RB_PHY_EXT_RDDATA_REG		0x8012
+
+#define RTL8366RB_PHY_REG_MASK			0x1f
+#define RTL8366RB_PHY_PAGE_OFFSET		5
+#define RTL8366RB_PHY_PAGE_MASK			(0xf << 5)
+#define RTL8366RB_PHY_NO_OFFSET			9
+#define RTL8366RB_PHY_NO_MASK			(0x1f << 9)
+
+#define RTL8366RB_VLAN_INGRESS_CTRL2_REG	0x037f
+
+/* LED control registers */
+#define RTL8366RB_LED_BLINKRATE_REG		0x0430
+#define RTL8366RB_LED_BLINKRATE_MASK		0x0007
+#define RTL8366RB_LED_BLINKRATE_28MS		0x0000
+#define RTL8366RB_LED_BLINKRATE_56MS		0x0001
+#define RTL8366RB_LED_BLINKRATE_84MS		0x0002
+#define RTL8366RB_LED_BLINKRATE_111MS		0x0003
+#define RTL8366RB_LED_BLINKRATE_222MS		0x0004
+#define RTL8366RB_LED_BLINKRATE_446MS		0x0005
+
+#define RTL8366RB_LED_CTRL_REG			0x0431
+#define RTL8366RB_LED_OFF			0x0
+#define RTL8366RB_LED_DUP_COL			0x1
+#define RTL8366RB_LED_LINK_ACT			0x2
+#define RTL8366RB_LED_SPD1000			0x3
+#define RTL8366RB_LED_SPD100			0x4
+#define RTL8366RB_LED_SPD10			0x5
+#define RTL8366RB_LED_SPD1000_ACT		0x6
+#define RTL8366RB_LED_SPD100_ACT		0x7
+#define RTL8366RB_LED_SPD10_ACT			0x8
+#define RTL8366RB_LED_SPD100_10_ACT		0x9
+#define RTL8366RB_LED_FIBER			0xa
+#define RTL8366RB_LED_AN_FAULT			0xb
+#define RTL8366RB_LED_LINK_RX			0xc
+#define RTL8366RB_LED_LINK_TX			0xd
+#define RTL8366RB_LED_MASTER			0xe
+#define RTL8366RB_LED_FORCE			0xf
+#define RTL8366RB_LED_0_1_CTRL_REG		0x0432
+#define RTL8366RB_LED_1_OFFSET			6
+#define RTL8366RB_LED_2_3_CTRL_REG		0x0433
+#define RTL8366RB_LED_3_OFFSET			6
+
+#define RTL8366RB_MIB_COUNT			33
+#define RTL8366RB_GLOBAL_MIB_COUNT		1
+#define RTL8366RB_MIB_COUNTER_PORT_OFFSET	0x0050
+#define RTL8366RB_MIB_COUNTER_BASE		0x1000
+#define RTL8366RB_MIB_CTRL_REG			0x13F0
+#define RTL8366RB_MIB_CTRL_USER_MASK		0x0FFC
+#define RTL8366RB_MIB_CTRL_BUSY_MASK		BIT(0)
+#define RTL8366RB_MIB_CTRL_RESET_MASK		BIT(1)
+#define RTL8366RB_MIB_CTRL_PORT_RESET(_p)	BIT(2 + (_p))
+#define RTL8366RB_MIB_CTRL_GLOBAL_RESET		BIT(11)
+
+#define RTL8366RB_PORT_VLAN_CTRL_BASE		0x0063
+#define RTL8366RB_PORT_VLAN_CTRL_REG(_p)  \
+		(RTL8366RB_PORT_VLAN_CTRL_BASE + (_p) / 4)
+#define RTL8366RB_PORT_VLAN_CTRL_MASK		0xf
+#define RTL8366RB_PORT_VLAN_CTRL_SHIFT(_p)	(4 * ((_p) % 4))
+
+#define RTL8366RB_VLAN_TABLE_READ_BASE		0x018C
+#define RTL8366RB_VLAN_TABLE_WRITE_BASE		0x0185
+
+#define RTL8366RB_TABLE_ACCESS_CTRL_REG		0x0180
+#define RTL8366RB_TABLE_VLAN_READ_CTRL		0x0E01
+#define RTL8366RB_TABLE_VLAN_WRITE_CTRL		0x0F01
+
+#define RTL8366RB_VLAN_MC_BASE(_x)		(0x0020 + (_x) * 3)
+
+#define RTL8366RB_PORT_LINK_STATUS_BASE		0x0014
+#define RTL8366RB_PORT_STATUS_SPEED_MASK	0x0003
+#define RTL8366RB_PORT_STATUS_DUPLEX_MASK	0x0004
+#define RTL8366RB_PORT_STATUS_LINK_MASK		0x0010
+#define RTL8366RB_PORT_STATUS_TXPAUSE_MASK	0x0020
+#define RTL8366RB_PORT_STATUS_RXPAUSE_MASK	0x0040
+#define RTL8366RB_PORT_STATUS_AN_MASK		0x0080
+
+#define RTL8366RB_NUM_VLANS		16
+#define RTL8366RB_NUM_LEDGROUPS		4
+#define RTL8366RB_NUM_VIDS		4096
+#define RTL8366RB_PRIORITYMAX		7
+#define RTL8366RB_FIDMAX		7
+
+#define RTL8366RB_PORT_1		BIT(0) /* In userspace port 0 */
+#define RTL8366RB_PORT_2		BIT(1) /* In userspace port 1 */
+#define RTL8366RB_PORT_3		BIT(2) /* In userspace port 2 */
+#define RTL8366RB_PORT_4		BIT(3) /* In userspace port 3 */
+#define RTL8366RB_PORT_5		BIT(4) /* In userspace port 4 */
+
+#define RTL8366RB_PORT_CPU		BIT(5) /* CPU port */
+
+#define RTL8366RB_PORT_ALL		(RTL8366RB_PORT_1 |	\
+					 RTL8366RB_PORT_2 |	\
+					 RTL8366RB_PORT_3 |	\
+					 RTL8366RB_PORT_4 |	\
+					 RTL8366RB_PORT_5 |	\
+					 RTL8366RB_PORT_CPU)
+
+#define RTL8366RB_PORT_ALL_BUT_CPU	(RTL8366RB_PORT_1 |	\
+					 RTL8366RB_PORT_2 |	\
+					 RTL8366RB_PORT_3 |	\
+					 RTL8366RB_PORT_4 |	\
+					 RTL8366RB_PORT_5)
+
+#define RTL8366RB_PORT_ALL_EXTERNAL	(RTL8366RB_PORT_1 |	\
+					 RTL8366RB_PORT_2 |	\
+					 RTL8366RB_PORT_3 |	\
+					 RTL8366RB_PORT_4)
+
+#define RTL8366RB_PORT_ALL_INTERNAL	 RTL8366RB_PORT_CPU
+
+/* First configuration word per member config, VID and prio */
+#define RTL8366RB_VLAN_VID_MASK		0xfff
+#define RTL8366RB_VLAN_PRIORITY_SHIFT	12
+#define RTL8366RB_VLAN_PRIORITY_MASK	0x7
+/* Second configuration word per member config, member and untagged */
+#define RTL8366RB_VLAN_UNTAG_SHIFT	8
+#define RTL8366RB_VLAN_UNTAG_MASK	0xff
+#define RTL8366RB_VLAN_MEMBER_MASK	0xff
+/* Third config word per member config, STAG currently unused */
+#define RTL8366RB_VLAN_STAG_MBR_MASK	0xff
+#define RTL8366RB_VLAN_STAG_MBR_SHIFT	8
+#define RTL8366RB_VLAN_STAG_IDX_MASK	0x7
+#define RTL8366RB_VLAN_STAG_IDX_SHIFT	5
+#define RTL8366RB_VLAN_FID_MASK		0x7
+
+/* Port ingress bandwidth control */
+#define RTL8366RB_IB_BASE		0x0200
+#define RTL8366RB_IB_REG(pnum)		(RTL8366RB_IB_BASE + (pnum))
+#define RTL8366RB_IB_BDTH_MASK		0x3fff
+#define RTL8366RB_IB_PREIFG		BIT(14)
+
+/* Port egress bandwidth control */
+#define RTL8366RB_EB_BASE		0x02d1
+#define RTL8366RB_EB_REG(pnum)		(RTL8366RB_EB_BASE + (pnum))
+#define RTL8366RB_EB_BDTH_MASK		0x3fff
+#define RTL8366RB_EB_PREIFG_REG		0x02f8
+#define RTL8366RB_EB_PREIFG		BIT(9)
+
+#define RTL8366RB_BDTH_SW_MAX		1048512 /* 1048576? */
+#define RTL8366RB_BDTH_UNIT		64
+#define RTL8366RB_BDTH_REG_DEFAULT	16383
+
+/* QOS */
+#define RTL8366RB_QOS			BIT(15)
+/* Include/Exclude Preamble and IFG (20 bytes). 0:Exclude, 1:Include. */
+#define RTL8366RB_QOS_DEFAULT_PREIFG	1
+
+/* Interrupt handling */
+#define RTL8366RB_INTERRUPT_CONTROL_REG	0x0440
+#define RTL8366RB_INTERRUPT_POLARITY	BIT(0)
+#define RTL8366RB_P4_RGMII_LED		BIT(2)
+#define RTL8366RB_INTERRUPT_MASK_REG	0x0441
+#define RTL8366RB_INTERRUPT_LINK_CHGALL	GENMASK(11, 0)
+#define RTL8366RB_INTERRUPT_ACLEXCEED	BIT(8)
+#define RTL8366RB_INTERRUPT_STORMEXCEED	BIT(9)
+#define RTL8366RB_INTERRUPT_P4_FIBER	BIT(12)
+#define RTL8366RB_INTERRUPT_P4_UTP	BIT(13)
+#define RTL8366RB_INTERRUPT_VALID	(RTL8366RB_INTERRUPT_LINK_CHGALL | \
+					 RTL8366RB_INTERRUPT_ACLEXCEED | \
+					 RTL8366RB_INTERRUPT_STORMEXCEED | \
+					 RTL8366RB_INTERRUPT_P4_FIBER | \
+					 RTL8366RB_INTERRUPT_P4_UTP)
+#define RTL8366RB_INTERRUPT_STATUS_REG	0x0442
+#define RTL8366RB_NUM_INTERRUPT		14 /* 0..13 */
+
+/* bits 0..5 enable force when cleared */
+#define RTL8366RB_MAC_FORCE_CTRL_REG	0x0F11
+
+#define RTL8366RB_OAM_PARSER_REG	0x0F14
+#define RTL8366RB_OAM_MULTIPLEXER_REG	0x0F15
+
+#define RTL8366RB_GREEN_FEATURE_REG	0x0F51
+#define RTL8366RB_GREEN_FEATURE_MSK	0x0007
+#define RTL8366RB_GREEN_FEATURE_TX	BIT(0)
+#define RTL8366RB_GREEN_FEATURE_RX	BIT(2)
+
+static struct rtl8366_mib_counter rtl8366rb_mib_counters[] = {
+	{ 0,  0, 4, "IfInOctets"				},
+	{ 0,  4, 4, "EtherStatsOctets"				},
+	{ 0,  8, 2, "EtherStatsUnderSizePkts"			},
+	{ 0, 10, 2, "EtherFragments"				},
+	{ 0, 12, 2, "EtherStatsPkts64Octets"			},
+	{ 0, 14, 2, "EtherStatsPkts65to127Octets"		},
+	{ 0, 16, 2, "EtherStatsPkts128to255Octets"		},
+	{ 0, 18, 2, "EtherStatsPkts256to511Octets"		},
+	{ 0, 20, 2, "EtherStatsPkts512to1023Octets"		},
+	{ 0, 22, 2, "EtherStatsPkts1024to1518Octets"		},
+	{ 0, 24, 2, "EtherOversizeStats"			},
+	{ 0, 26, 2, "EtherStatsJabbers"				},
+	{ 0, 28, 2, "IfInUcastPkts"				},
+	{ 0, 30, 2, "EtherStatsMulticastPkts"			},
+	{ 0, 32, 2, "EtherStatsBroadcastPkts"			},
+	{ 0, 34, 2, "EtherStatsDropEvents"			},
+	{ 0, 36, 2, "Dot3StatsFCSErrors"			},
+	{ 0, 38, 2, "Dot3StatsSymbolErrors"			},
+	{ 0, 40, 2, "Dot3InPauseFrames"				},
+	{ 0, 42, 2, "Dot3ControlInUnknownOpcodes"		},
+	{ 0, 44, 4, "IfOutOctets"				},
+	{ 0, 48, 2, "Dot3StatsSingleCollisionFrames"		},
+	{ 0, 50, 2, "Dot3StatMultipleCollisionFrames"		},
+	{ 0, 52, 2, "Dot3sDeferredTransmissions"		},
+	{ 0, 54, 2, "Dot3StatsLateCollisions"			},
+	{ 0, 56, 2, "EtherStatsCollisions"			},
+	{ 0, 58, 2, "Dot3StatsExcessiveCollisions"		},
+	{ 0, 60, 2, "Dot3OutPauseFrames"			},
+	{ 0, 62, 2, "Dot1dBasePortDelayExceededDiscards"	},
+	{ 0, 64, 2, "Dot1dTpPortInDiscards"			},
+	{ 0, 66, 2, "IfOutUcastPkts"				},
+	{ 0, 68, 2, "IfOutMulticastPkts"			},
+	{ 0, 70, 2, "IfOutBroadcastPkts"			},
+};
+
+static int rtl8366rb_get_mib_counter(struct realtek_smi *smi,
+				     int port,
+				     struct rtl8366_mib_counter *mib,
+				     u64 *mibvalue)
+{
+	u32 addr, val;
+	int ret;
+	int i;
+
+	addr = RTL8366RB_MIB_COUNTER_BASE +
+		RTL8366RB_MIB_COUNTER_PORT_OFFSET * (port) +
+		mib->offset;
+
+	/* Writing access counter address first
+	 * then ASIC will prepare 64bits counter wait for being retrived
+	 */
+	ret = regmap_write(smi->map, addr, 0); /* Write whatever */
+	if (ret)
+		return ret;
+
+	/* Read MIB control register */
+	ret = regmap_read(smi->map, RTL8366RB_MIB_CTRL_REG, &val);
+	if (ret)
+		return -EIO;
+
+	if (val & RTL8366RB_MIB_CTRL_BUSY_MASK)
+		return -EBUSY;
+
+	if (val & RTL8366RB_MIB_CTRL_RESET_MASK)
+		return -EIO;
+
+	/* Read each individual MIB 16 bits at the time */
+	*mibvalue = 0;
+	for (i = mib->length; i > 0; i--) {
+		ret = regmap_read(smi->map, addr + (i - 1), &val);
+		if (ret)
+			return ret;
+		*mibvalue = (*mibvalue << 16) | (val & 0xFFFF);
+	}
+	return 0;
+}
+
+static u32 rtl8366rb_get_irqmask(struct irq_data *d)
+{
+	int line = irqd_to_hwirq(d);
+	u32 val;
+
+	/* For line interrupts we combine link down in bits
+	 * 6..11 with link up in bits 0..5 into one interrupt.
+	 */
+	if (line < 12)
+		val = BIT(line) | BIT(line + 6);
+	else
+		val = BIT(line);
+	return val;
+}
+
+static void rtl8366rb_mask_irq(struct irq_data *d)
+{
+	struct realtek_smi *smi = irq_data_get_irq_chip_data(d);
+	int ret;
+
+	ret = regmap_update_bits(smi->map, RTL8366RB_INTERRUPT_MASK_REG,
+				 rtl8366rb_get_irqmask(d), 0);
+	if (ret)
+		dev_err(smi->dev, "could not mask IRQ\n");
+}
+
+static void rtl8366rb_unmask_irq(struct irq_data *d)
+{
+	struct realtek_smi *smi = irq_data_get_irq_chip_data(d);
+	int ret;
+
+	ret = regmap_update_bits(smi->map, RTL8366RB_INTERRUPT_MASK_REG,
+				 rtl8366rb_get_irqmask(d),
+				 rtl8366rb_get_irqmask(d));
+	if (ret)
+		dev_err(smi->dev, "could not unmask IRQ\n");
+}
+
+static irqreturn_t rtl8366rb_irq(int irq, void *data)
+{
+	struct realtek_smi *smi = data;
+	u32 stat;
+	int ret;
+
+	/* This clears the IRQ status register */
+	ret = regmap_read(smi->map, RTL8366RB_INTERRUPT_STATUS_REG,
+			  &stat);
+	if (ret) {
+		dev_err(smi->dev, "can't read interrupt status\n");
+		return IRQ_NONE;
+	}
+	stat &= RTL8366RB_INTERRUPT_VALID;
+	if (!stat)
+		return IRQ_NONE;
+	while (stat) {
+		int line = __ffs(stat);
+		int child_irq;
+
+		stat &= ~BIT(line);
+		/* For line interrupts we combine link down in bits
+		 * 6..11 with link up in bits 0..5 into one interrupt.
+		 */
+		if (line < 12 && line > 5)
+			line -= 5;
+		child_irq = irq_find_mapping(smi->irqdomain, line);
+		handle_nested_irq(child_irq);
+	}
+	return IRQ_HANDLED;
+}
+
+static struct irq_chip rtl8366rb_irq_chip = {
+	.name = "RTL8366RB",
+	.irq_mask = rtl8366rb_mask_irq,
+	.irq_unmask = rtl8366rb_unmask_irq,
+};
+
+static int rtl8366rb_irq_map(struct irq_domain *domain, unsigned int irq,
+			     irq_hw_number_t hwirq)
+{
+	irq_set_chip_data(irq, domain->host_data);
+	irq_set_chip_and_handler(irq, &rtl8366rb_irq_chip, handle_simple_irq);
+	irq_set_nested_thread(irq, 1);
+	irq_set_noprobe(irq);
+
+	return 0;
+}
+
+static void rtl8366rb_irq_unmap(struct irq_domain *d, unsigned int irq)
+{
+	irq_set_nested_thread(irq, 0);
+	irq_set_chip_and_handler(irq, NULL, NULL);
+	irq_set_chip_data(irq, NULL);
+}
+
+static const struct irq_domain_ops rtl8366rb_irqdomain_ops = {
+	.map = rtl8366rb_irq_map,
+	.unmap = rtl8366rb_irq_unmap,
+	.xlate  = irq_domain_xlate_onecell,
+};
+
+static int rtl8366rb_setup_cascaded_irq(struct realtek_smi *smi)
+{
+	struct device_node *intc;
+	unsigned long irq_trig;
+	int irq;
+	int ret;
+	u32 val;
+	int i;
+
+	intc = of_get_child_by_name(smi->dev->of_node, "interrupt-controller");
+	if (!intc) {
+		dev_err(smi->dev, "missing child interrupt-controller node\n");
+		return -EINVAL;
+	}
+	/* RB8366RB IRQs cascade off this one */
+	irq = of_irq_get(intc, 0);
+	if (irq <= 0) {
+		dev_err(smi->dev, "failed to get parent IRQ\n");
+		return irq ? irq : -EINVAL;
+	}
+
+	/* This clears the IRQ status register */
+	ret = regmap_read(smi->map, RTL8366RB_INTERRUPT_STATUS_REG,
+			  &val);
+	if (ret) {
+		dev_err(smi->dev, "can't read interrupt status\n");
+		return ret;
+	}
+
+	/* Fetch IRQ edge information from the descriptor */
+	irq_trig = irqd_get_trigger_type(irq_get_irq_data(irq));
+	switch (irq_trig) {
+	case IRQF_TRIGGER_RISING:
+	case IRQF_TRIGGER_HIGH:
+		dev_info(smi->dev, "active high/rising IRQ\n");
+		val = 0;
+		break;
+	case IRQF_TRIGGER_FALLING:
+	case IRQF_TRIGGER_LOW:
+		dev_info(smi->dev, "active low/falling IRQ\n");
+		val = RTL8366RB_INTERRUPT_POLARITY;
+		break;
+	}
+	ret = regmap_update_bits(smi->map, RTL8366RB_INTERRUPT_CONTROL_REG,
+				 RTL8366RB_INTERRUPT_POLARITY,
+				 val);
+	if (ret) {
+		dev_err(smi->dev, "could not configure IRQ polarity\n");
+		return ret;
+	}
+
+	ret = devm_request_threaded_irq(smi->dev, irq, NULL,
+					rtl8366rb_irq, IRQF_ONESHOT,
+					"RTL8366RB", smi);
+	if (ret) {
+		dev_err(smi->dev, "unable to request irq: %d\n", ret);
+		return ret;
+	}
+	smi->irqdomain = irq_domain_add_linear(intc,
+					       RTL8366RB_NUM_INTERRUPT,
+					       &rtl8366rb_irqdomain_ops,
+					       smi);
+	if (!smi->irqdomain) {
+		dev_err(smi->dev, "failed to create IRQ domain\n");
+		return -EINVAL;
+	}
+	for (i = 0; i < smi->num_ports; i++)
+		irq_set_parent(irq_create_mapping(smi->irqdomain, i), irq);
+
+	return 0;
+}
+
+static int rtl8366rb_set_addr(struct realtek_smi *smi)
+{
+	u8 addr[ETH_ALEN];
+	u16 val;
+	int ret;
+
+	eth_random_addr(addr);
+
+	dev_info(smi->dev, "set MAC: %02X:%02X:%02X:%02X:%02X:%02X\n",
+		 addr[0], addr[1], addr[2], addr[3], addr[4], addr[5]);
+	val = addr[0] << 8 | addr[1];
+	ret = regmap_write(smi->map, RTL8366RB_SMAR0, val);
+	if (ret)
+		return ret;
+	val = addr[2] << 8 | addr[3];
+	ret = regmap_write(smi->map, RTL8366RB_SMAR1, val);
+	if (ret)
+		return ret;
+	val = addr[4] << 8 | addr[5];
+	ret = regmap_write(smi->map, RTL8366RB_SMAR2, val);
+	if (ret)
+		return ret;
+
+	return 0;
+}
+
+/* Found in a vendor driver */
+
+/* For the "version 0" early silicon, appear in most source releases */
+static const u16 rtl8366rb_init_jam_ver_0[] = {
+	0x000B, 0x0001, 0x03A6, 0x0100, 0x03A7, 0x0001, 0x02D1, 0x3FFF,
+	0x02D2, 0x3FFF, 0x02D3, 0x3FFF, 0x02D4, 0x3FFF, 0x02D5, 0x3FFF,
+	0x02D6, 0x3FFF, 0x02D7, 0x3FFF, 0x02D8, 0x3FFF, 0x022B, 0x0688,
+	0x022C, 0x0FAC, 0x03D0, 0x4688, 0x03D1, 0x01F5, 0x0000, 0x0830,
+	0x02F9, 0x0200, 0x02F7, 0x7FFF, 0x02F8, 0x03FF, 0x0080, 0x03E8,
+	0x0081, 0x00CE, 0x0082, 0x00DA, 0x0083, 0x0230, 0xBE0F, 0x2000,
+	0x0231, 0x422A, 0x0232, 0x422A, 0x0233, 0x422A, 0x0234, 0x422A,
+	0x0235, 0x422A, 0x0236, 0x422A, 0x0237, 0x422A, 0x0238, 0x422A,
+	0x0239, 0x422A, 0x023A, 0x422A, 0x023B, 0x422A, 0x023C, 0x422A,
+	0x023D, 0x422A, 0x023E, 0x422A, 0x023F, 0x422A, 0x0240, 0x422A,
+	0x0241, 0x422A, 0x0242, 0x422A, 0x0243, 0x422A, 0x0244, 0x422A,
+	0x0245, 0x422A, 0x0246, 0x422A, 0x0247, 0x422A, 0x0248, 0x422A,
+	0x0249, 0x0146, 0x024A, 0x0146, 0x024B, 0x0146, 0xBE03, 0xC961,
+	0x024D, 0x0146, 0x024E, 0x0146, 0x024F, 0x0146, 0x0250, 0x0146,
+	0xBE64, 0x0226, 0x0252, 0x0146, 0x0253, 0x0146, 0x024C, 0x0146,
+	0x0251, 0x0146, 0x0254, 0x0146, 0xBE62, 0x3FD0, 0x0084, 0x0320,
+	0x0255, 0x0146, 0x0256, 0x0146, 0x0257, 0x0146, 0x0258, 0x0146,
+	0x0259, 0x0146, 0x025A, 0x0146, 0x025B, 0x0146, 0x025C, 0x0146,
+	0x025D, 0x0146, 0x025E, 0x0146, 0x025F, 0x0146, 0x0260, 0x0146,
+	0x0261, 0xA23F, 0x0262, 0x0294, 0x0263, 0xA23F, 0x0264, 0x0294,
+	0x0265, 0xA23F, 0x0266, 0x0294, 0x0267, 0xA23F, 0x0268, 0x0294,
+	0x0269, 0xA23F, 0x026A, 0x0294, 0x026B, 0xA23F, 0x026C, 0x0294,
+	0x026D, 0xA23F, 0x026E, 0x0294, 0x026F, 0xA23F, 0x0270, 0x0294,
+	0x02F5, 0x0048, 0xBE09, 0x0E00, 0xBE1E, 0x0FA0, 0xBE14, 0x8448,
+	0xBE15, 0x1007, 0xBE4A, 0xA284, 0xC454, 0x3F0B, 0xC474, 0x3F0B,
+	0xBE48, 0x3672, 0xBE4B, 0x17A7, 0xBE4C, 0x0B15, 0xBE52, 0x0EDD,
+	0xBE49, 0x8C00, 0xBE5B, 0x785C, 0xBE5C, 0x785C, 0xBE5D, 0x785C,
+	0xBE61, 0x368A, 0xBE63, 0x9B84, 0xC456, 0xCC13, 0xC476, 0xCC13,
+	0xBE65, 0x307D, 0xBE6D, 0x0005, 0xBE6E, 0xE120, 0xBE2E, 0x7BAF,
+};
+
+/* This v1 init sequence is from Belkin F5D8235 U-Boot release */
+static const u16 rtl8366rb_init_jam_ver_1[] = {
+	0x0000, 0x0830, 0x0001, 0x8000, 0x0400, 0x8130, 0xBE78, 0x3C3C,
+	0x0431, 0x5432, 0xBE37, 0x0CE4, 0x02FA, 0xFFDF, 0x02FB, 0xFFE0,
+	0xC44C, 0x1585, 0xC44C, 0x1185, 0xC44C, 0x1585, 0xC46C, 0x1585,
+	0xC46C, 0x1185, 0xC46C, 0x1585, 0xC451, 0x2135, 0xC471, 0x2135,
+	0xBE10, 0x8140, 0xBE15, 0x0007, 0xBE6E, 0xE120, 0xBE69, 0xD20F,
+	0xBE6B, 0x0320, 0xBE24, 0xB000, 0xBE23, 0xFF51, 0xBE22, 0xDF20,
+	0xBE21, 0x0140, 0xBE20, 0x00BB, 0xBE24, 0xB800, 0xBE24, 0x0000,
+	0xBE24, 0x7000, 0xBE23, 0xFF51, 0xBE22, 0xDF60, 0xBE21, 0x0140,
+	0xBE20, 0x0077, 0xBE24, 0x7800, 0xBE24, 0x0000, 0xBE2E, 0x7B7A,
+	0xBE36, 0x0CE4, 0x02F5, 0x0048, 0xBE77, 0x2940, 0x000A, 0x83E0,
+	0xBE79, 0x3C3C, 0xBE00, 0x1340,
+};
+
+/* This v2 init sequence is from Belkin F5D8235 U-Boot release */
+static const u16 rtl8366rb_init_jam_ver_2[] = {
+	0x0450, 0x0000, 0x0400, 0x8130, 0x000A, 0x83ED, 0x0431, 0x5432,
+	0xC44F, 0x6250, 0xC46F, 0x6250, 0xC456, 0x0C14, 0xC476, 0x0C14,
+	0xC44C, 0x1C85, 0xC44C, 0x1885, 0xC44C, 0x1C85, 0xC46C, 0x1C85,
+	0xC46C, 0x1885, 0xC46C, 0x1C85, 0xC44C, 0x0885, 0xC44C, 0x0881,
+	0xC44C, 0x0885, 0xC46C, 0x0885, 0xC46C, 0x0881, 0xC46C, 0x0885,
+	0xBE2E, 0x7BA7, 0xBE36, 0x1000, 0xBE37, 0x1000, 0x8000, 0x0001,
+	0xBE69, 0xD50F, 0x8000, 0x0000, 0xBE69, 0xD50F, 0xBE6E, 0x0320,
+	0xBE77, 0x2940, 0xBE78, 0x3C3C, 0xBE79, 0x3C3C, 0xBE6E, 0xE120,
+	0x8000, 0x0001, 0xBE15, 0x1007, 0x8000, 0x0000, 0xBE15, 0x1007,
+	0xBE14, 0x0448, 0xBE1E, 0x00A0, 0xBE10, 0x8160, 0xBE10, 0x8140,
+	0xBE00, 0x1340, 0x0F51, 0x0010,
+};
+
+/* Appears in a DDWRT code dump */
+static const u16 rtl8366rb_init_jam_ver_3[] = {
+	0x0000, 0x0830, 0x0400, 0x8130, 0x000A, 0x83ED, 0x0431, 0x5432,
+	0x0F51, 0x0017, 0x02F5, 0x0048, 0x02FA, 0xFFDF, 0x02FB, 0xFFE0,
+	0xC456, 0x0C14, 0xC476, 0x0C14, 0xC454, 0x3F8B, 0xC474, 0x3F8B,
+	0xC450, 0x2071, 0xC470, 0x2071, 0xC451, 0x226B, 0xC471, 0x226B,
+	0xC452, 0xA293, 0xC472, 0xA293, 0xC44C, 0x1585, 0xC44C, 0x1185,
+	0xC44C, 0x1585, 0xC46C, 0x1585, 0xC46C, 0x1185, 0xC46C, 0x1585,
+	0xC44C, 0x0185, 0xC44C, 0x0181, 0xC44C, 0x0185, 0xC46C, 0x0185,
+	0xC46C, 0x0181, 0xC46C, 0x0185, 0xBE24, 0xB000, 0xBE23, 0xFF51,
+	0xBE22, 0xDF20, 0xBE21, 0x0140, 0xBE20, 0x00BB, 0xBE24, 0xB800,
+	0xBE24, 0x0000, 0xBE24, 0x7000, 0xBE23, 0xFF51, 0xBE22, 0xDF60,
+	0xBE21, 0x0140, 0xBE20, 0x0077, 0xBE24, 0x7800, 0xBE24, 0x0000,
+	0xBE2E, 0x7BA7, 0xBE36, 0x1000, 0xBE37, 0x1000, 0x8000, 0x0001,
+	0xBE69, 0xD50F, 0x8000, 0x0000, 0xBE69, 0xD50F, 0xBE6B, 0x0320,
+	0xBE77, 0x2800, 0xBE78, 0x3C3C, 0xBE79, 0x3C3C, 0xBE6E, 0xE120,
+	0x8000, 0x0001, 0xBE10, 0x8140, 0x8000, 0x0000, 0xBE10, 0x8140,
+	0xBE15, 0x1007, 0xBE14, 0x0448, 0xBE1E, 0x00A0, 0xBE10, 0x8160,
+	0xBE10, 0x8140, 0xBE00, 0x1340, 0x0450, 0x0000, 0x0401, 0x0000,
+};
+
+/* Belkin F5D8235 v1, "belkin,f5d8235-v1" */
+static const u16 rtl8366rb_init_jam_f5d8235[] = {
+	0x0242, 0x02BF, 0x0245, 0x02BF, 0x0248, 0x02BF, 0x024B, 0x02BF,
+	0x024E, 0x02BF, 0x0251, 0x02BF, 0x0254, 0x0A3F, 0x0256, 0x0A3F,
+	0x0258, 0x0A3F, 0x025A, 0x0A3F, 0x025C, 0x0A3F, 0x025E, 0x0A3F,
+	0x0263, 0x007C, 0x0100, 0x0004, 0xBE5B, 0x3500, 0x800E, 0x200F,
+	0xBE1D, 0x0F00, 0x8001, 0x5011, 0x800A, 0xA2F4, 0x800B, 0x17A3,
+	0xBE4B, 0x17A3, 0xBE41, 0x5011, 0xBE17, 0x2100, 0x8000, 0x8304,
+	0xBE40, 0x8304, 0xBE4A, 0xA2F4, 0x800C, 0xA8D5, 0x8014, 0x5500,
+	0x8015, 0x0004, 0xBE4C, 0xA8D5, 0xBE59, 0x0008, 0xBE09, 0x0E00,
+	0xBE36, 0x1036, 0xBE37, 0x1036, 0x800D, 0x00FF, 0xBE4D, 0x00FF,
+};
+
+/* DGN3500, "netgear,dgn3500", "netgear,dgn3500b" */
+static const u16 rtl8366rb_init_jam_dgn3500[] = {
+	0x0000, 0x0830, 0x0400, 0x8130, 0x000A, 0x83ED, 0x0F51, 0x0017,
+	0x02F5, 0x0048, 0x02FA, 0xFFDF, 0x02FB, 0xFFE0, 0x0450, 0x0000,
+	0x0401, 0x0000, 0x0431, 0x0960,
+};
+
+/* This jam table activates "green ethernet", which means low power mode
+ * and is claimed to detect the cable length and not use more power than
+ * necessary, and the ports should enter power saving mode 10 seconds after
+ * a cable is disconnected. Seems to always be the same.
+ */
+static const u16 rtl8366rb_green_jam[][2] = {
+	{0xBE78, 0x323C}, {0xBE77, 0x5000}, {0xBE2E, 0x7BA7},
+	{0xBE59, 0x3459}, {0xBE5A, 0x745A}, {0xBE5B, 0x785C},
+	{0xBE5C, 0x785C}, {0xBE6E, 0xE120}, {0xBE79, 0x323C},
+};
+
+static int rtl8366rb_setup(struct dsa_switch *ds)
+{
+	struct realtek_smi *smi = ds->priv;
+	const u16 *jam_table;
+	u32 chip_ver = 0;
+	u32 chip_id = 0;
+	int jam_size;
+	u32 val;
+	int ret;
+	int i;
+
+	ret = regmap_read(smi->map, RTL8366RB_CHIP_ID_REG, &chip_id);
+	if (ret) {
+		dev_err(smi->dev, "unable to read chip id\n");
+		return ret;
+	}
+
+	switch (chip_id) {
+	case RTL8366RB_CHIP_ID_8366:
+		break;
+	default:
+		dev_err(smi->dev, "unknown chip id (%04x)\n", chip_id);
+		return -ENODEV;
+	}
+
+	ret = regmap_read(smi->map, RTL8366RB_CHIP_VERSION_CTRL_REG,
+			  &chip_ver);
+	if (ret) {
+		dev_err(smi->dev, "unable to read chip version\n");
+		return ret;
+	}
+
+	dev_info(smi->dev, "RTL%04x ver %u chip found\n",
+		 chip_id, chip_ver & RTL8366RB_CHIP_VERSION_MASK);
+
+	/* Do the init dance using the right jam table */
+	switch (chip_ver) {
+	case 0:
+		jam_table = rtl8366rb_init_jam_ver_0;
+		jam_size = ARRAY_SIZE(rtl8366rb_init_jam_ver_0);
+		break;
+	case 1:
+		jam_table = rtl8366rb_init_jam_ver_1;
+		jam_size = ARRAY_SIZE(rtl8366rb_init_jam_ver_1);
+		break;
+	case 2:
+		jam_table = rtl8366rb_init_jam_ver_2;
+		jam_size = ARRAY_SIZE(rtl8366rb_init_jam_ver_2);
+		break;
+	default:
+		jam_table = rtl8366rb_init_jam_ver_3;
+		jam_size = ARRAY_SIZE(rtl8366rb_init_jam_ver_3);
+		break;
+	}
+
+	/* Special jam tables for special routers
+	 * TODO: are these necessary? Maintainers, please test
+	 * without them, using just the off-the-shelf tables.
+	 */
+	if (of_machine_is_compatible("belkin,f5d8235-v1")) {
+		jam_table = rtl8366rb_init_jam_f5d8235;
+		jam_size = ARRAY_SIZE(rtl8366rb_init_jam_f5d8235);
+	}
+	if (of_machine_is_compatible("netgear,dgn3500") ||
+	    of_machine_is_compatible("netgear,dgn3500b")) {
+		jam_table = rtl8366rb_init_jam_dgn3500;
+		jam_size = ARRAY_SIZE(rtl8366rb_init_jam_dgn3500);
+	}
+
+	i = 0;
+	while (i < jam_size) {
+		if ((jam_table[i] & 0xBE00) == 0xBE00) {
+			ret = regmap_read(smi->map,
+					  RTL8366RB_PHY_ACCESS_BUSY_REG,
+					  &val);
+			if (ret)
+				return ret;
+			if (!(val & RTL8366RB_PHY_INT_BUSY)) {
+				ret = regmap_write(smi->map,
+						RTL8366RB_PHY_ACCESS_CTRL_REG,
+						RTL8366RB_PHY_CTRL_WRITE);
+				if (ret)
+					return ret;
+			}
+		}
+		dev_dbg(smi->dev, "jam %04x into register %04x\n",
+			jam_table[i + 1],
+			jam_table[i]);
+		ret = regmap_write(smi->map,
+				   jam_table[i],
+				   jam_table[i + 1]);
+		if (ret)
+			return ret;
+		i += 2;
+	}
+
+	/* Set up the "green ethernet" feature */
+	i = 0;
+	while (i < ARRAY_SIZE(rtl8366rb_green_jam)) {
+		ret = regmap_read(smi->map, RTL8366RB_PHY_ACCESS_BUSY_REG,
+				  &val);
+		if (ret)
+			return ret;
+		if (!(val & RTL8366RB_PHY_INT_BUSY)) {
+			ret = regmap_write(smi->map,
+					   RTL8366RB_PHY_ACCESS_CTRL_REG,
+					   RTL8366RB_PHY_CTRL_WRITE);
+			if (ret)
+				return ret;
+			ret = regmap_write(smi->map,
+					   rtl8366rb_green_jam[i][0],
+					   rtl8366rb_green_jam[i][1]);
+			if (ret)
+				return ret;
+			i++;
+		}
+	}
+	ret = regmap_write(smi->map,
+			   RTL8366RB_GREEN_FEATURE_REG,
+			   (chip_ver == 1) ? 0x0007 : 0x0003);
+	if (ret)
+		return ret;
+
+	/* Vendor driver sets 0x240 in registers 0xc and 0xd (undocumented) */
+	ret = regmap_write(smi->map, 0x0c, 0x240);
+	if (ret)
+		return ret;
+	ret = regmap_write(smi->map, 0x0d, 0x240);
+	if (ret)
+		return ret;
+
+	/* Set some random MAC address */
+	ret = rtl8366rb_set_addr(smi);
+	if (ret)
+		return ret;
+
+	/* Enable CPU port and enable inserting CPU tag
+	 *
+	 * Disabling RTL8368RB_CPU_INSTAG here will change the behaviour
+	 * of the switch totally and it will start talking Realtek RRCP
+	 * internally. It is probably possible to experiment with this,
+	 * but then the kernel needs to understand and handle RRCP first.
+	 */
+	ret = regmap_update_bits(smi->map, RTL8368RB_CPU_CTRL_REG,
+				 0xFFFF,
+				 RTL8368RB_CPU_INSTAG | BIT(smi->cpu_port));
+	if (ret)
+		return ret;
+
+	/* Make sure we default-enable the fixed CPU port */
+	ret = regmap_update_bits(smi->map, RTL8366RB_PECR,
+				 BIT(smi->cpu_port),
+				 0);
+	if (ret)
+		return ret;
+
+	/* Set maximum packet length to 1536 bytes */
+	ret = regmap_update_bits(smi->map, RTL8366RB_SGCR,
+				 RTL8366RB_SGCR_MAX_LENGTH_MASK,
+				 RTL8366RB_SGCR_MAX_LENGTH_1536);
+	if (ret)
+		return ret;
+
+	/* Enable learning for all ports */
+	ret = regmap_write(smi->map, RTL8366RB_SSCR0, 0);
+	if (ret)
+		return ret;
+
+	/* Enable auto ageing for all ports */
+	ret = regmap_write(smi->map, RTL8366RB_SSCR1, 0);
+	if (ret)
+		return ret;
+
+	/* Discard VLAN tagged packets if the port is not a member of
+	 * the VLAN with which the packets is associated.
+	 */
+	ret = regmap_write(smi->map, RTL8366RB_VLAN_INGRESS_CTRL2_REG,
+			   RTL8366RB_PORT_ALL);
+	if (ret)
+		return ret;
+
+	/* Don't drop packets whose DA has not been learned */
+	ret = regmap_update_bits(smi->map, RTL8366RB_SSCR2,
+				 RTL8366RB_SSCR2_DROP_UNKNOWN_DA, 0);
+	if (ret)
+		return ret;
+
+	/* Set blinking, TODO: make this configurable */
+	ret = regmap_update_bits(smi->map, RTL8366RB_LED_BLINKRATE_REG,
+				 RTL8366RB_LED_BLINKRATE_MASK,
+				 RTL8366RB_LED_BLINKRATE_56MS);
+	if (ret)
+		return ret;
+
+	/* Set up LED activity:
+	 * Each port has 4 LEDs, we configure all ports to the same
+	 * behaviour (no individual config) but we can set up each
+	 * LED separately.
+	 */
+	if (smi->leds_disabled) {
+		/* Turn everything off */
+		regmap_update_bits(smi->map,
+				   RTL8366RB_LED_0_1_CTRL_REG,
+				   0x0FFF, 0);
+		regmap_update_bits(smi->map,
+				   RTL8366RB_LED_2_3_CTRL_REG,
+				   0x0FFF, 0);
+		regmap_update_bits(smi->map,
+				   RTL8366RB_INTERRUPT_CONTROL_REG,
+				   RTL8366RB_P4_RGMII_LED,
+				   0);
+		val = RTL8366RB_LED_OFF;
+	} else {
+		/* TODO: make this configurable per LED */
+		val = RTL8366RB_LED_FORCE;
+	}
+	for (i = 0; i < 4; i++) {
+		ret = regmap_update_bits(smi->map,
+					 RTL8366RB_LED_CTRL_REG,
+					 0xf << (i * 4),
+					 val << (i * 4));
+		if (ret)
+			return ret;
+	}
+
+	ret = rtl8366_init_vlan(smi);
+	if (ret)
+		return ret;
+
+	ret = rtl8366rb_setup_cascaded_irq(smi);
+	if (ret)
+		dev_info(smi->dev, "no interrupt support\n");
+
+	ret = realtek_smi_setup_mdio(smi);
+	if (ret) {
+		dev_info(smi->dev, "could not set up MDIO bus\n");
+		return -ENODEV;
+	}
+
+	return 0;
+}
+
+static enum dsa_tag_protocol rtl8366_get_tag_protocol(struct dsa_switch *ds,
+						      int port)
+{
+	/* For now, the RTL switches are handled without any custom tags.
+	 *
+	 * It is possible to turn on "custom tags" by removing the
+	 * RTL8368RB_CPU_INSTAG flag when enabling the port but what it
+	 * does is unfamiliar to DSA: ethernet frames of type 8899, the Realtek
+	 * Remote Control Protocol (RRCP) start to appear on the CPU port of
+	 * the device. So this is not the ordinary few extra bytes in the
+	 * frame. Instead it appears that the switch starts to talk Realtek
+	 * RRCP internally which means a pretty complex RRCP implementation
+	 * decoding and responding the RRCP protocol is needed to exploit this.
+	 *
+	 * The OpenRRCP project (dormant since 2009) have reverse-egineered
+	 * parts of the protocol.
+	 */
+	return DSA_TAG_PROTO_NONE;
+}
+
+static void rtl8366rb_adjust_link(struct dsa_switch *ds, int port,
+				  struct phy_device *phydev)
+{
+	struct realtek_smi *smi = ds->priv;
+	int ret;
+
+	if (port != smi->cpu_port)
+		return;
+
+	dev_info(smi->dev, "adjust link on CPU port (%d)\n", port);
+
+	/* Force the fixed CPU port into 1Gbit mode, no autonegotiation */
+	ret = regmap_update_bits(smi->map, RTL8366RB_MAC_FORCE_CTRL_REG,
+				 BIT(port), BIT(port));
+	if (ret)
+		return;
+
+	ret = regmap_update_bits(smi->map, RTL8366RB_PAACR2,
+				 0xFF00U,
+				 RTL8366RB_PAACR_CPU_PORT << 8);
+	if (ret)
+		return;
+
+	/* Enable the CPU port */
+	ret = regmap_update_bits(smi->map, RTL8366RB_PECR, BIT(port),
+				 0);
+	if (ret)
+		return;
+}
+
+static void rb8366rb_set_port_led(struct realtek_smi *smi,
+				  int port, bool enable)
+{
+	u16 val = enable ? 0x3f : 0;
+	int ret;
+
+	if (smi->leds_disabled)
+		return;
+
+	switch (port) {
+	case 0:
+		ret = regmap_update_bits(smi->map,
+					 RTL8366RB_LED_0_1_CTRL_REG,
+					 0x3F, val);
+		break;
+	case 1:
+		ret = regmap_update_bits(smi->map,
+					 RTL8366RB_LED_0_1_CTRL_REG,
+					 0x3F << RTL8366RB_LED_1_OFFSET,
+					 val << RTL8366RB_LED_1_OFFSET);
+		break;
+	case 2:
+		ret = regmap_update_bits(smi->map,
+					 RTL8366RB_LED_2_3_CTRL_REG,
+					 0x3F, val);
+		break;
+	case 3:
+		ret = regmap_update_bits(smi->map,
+					 RTL8366RB_LED_2_3_CTRL_REG,
+					 0x3F << RTL8366RB_LED_3_OFFSET,
+					 val << RTL8366RB_LED_3_OFFSET);
+		break;
+	case 4:
+		ret = regmap_update_bits(smi->map,
+					 RTL8366RB_INTERRUPT_CONTROL_REG,
+					 RTL8366RB_P4_RGMII_LED,
+					 enable ? RTL8366RB_P4_RGMII_LED : 0);
+		break;
+	default:
+		dev_err(smi->dev, "no LED for port %d\n", port);
+		return;
+	}
+	if (ret)
+		dev_err(smi->dev, "error updating LED on port %d\n", port);
+}
+
+static int
+rtl8366rb_port_enable(struct dsa_switch *ds, int port,
+		      struct phy_device *phy)
+{
+	struct realtek_smi *smi = ds->priv;
+	int ret;
+
+	dev_dbg(smi->dev, "enable port %d\n", port);
+	ret = regmap_update_bits(smi->map, RTL8366RB_PECR, BIT(port),
+				 0);
+	if (ret)
+		return ret;
+
+	rb8366rb_set_port_led(smi, port, true);
+	return 0;
+}
+
+static void
+rtl8366rb_port_disable(struct dsa_switch *ds, int port,
+		       struct phy_device *phy)
+{
+	struct realtek_smi *smi = ds->priv;
+	int ret;
+
+	dev_dbg(smi->dev, "disable port %d\n", port);
+	ret = regmap_update_bits(smi->map, RTL8366RB_PECR, BIT(port),
+				 BIT(port));
+	if (ret)
+		return;
+
+	rb8366rb_set_port_led(smi, port, false);
+}
+
+static int rtl8366rb_get_vlan_4k(struct realtek_smi *smi, u32 vid,
+				 struct rtl8366_vlan_4k *vlan4k)
+{
+	u32 data[3];
+	int ret;
+	int i;
+
+	memset(vlan4k, '\0', sizeof(struct rtl8366_vlan_4k));
+
+	if (vid >= RTL8366RB_NUM_VIDS)
+		return -EINVAL;
+
+	/* write VID */
+	ret = regmap_write(smi->map, RTL8366RB_VLAN_TABLE_WRITE_BASE,
+			   vid & RTL8366RB_VLAN_VID_MASK);
+	if (ret)
+		return ret;
+
+	/* write table access control word */
+	ret = regmap_write(smi->map, RTL8366RB_TABLE_ACCESS_CTRL_REG,
+			   RTL8366RB_TABLE_VLAN_READ_CTRL);
+	if (ret)
+		return ret;
+
+	for (i = 0; i < 3; i++) {
+		ret = regmap_read(smi->map,
+				  RTL8366RB_VLAN_TABLE_READ_BASE + i,
+				  &data[i]);
+		if (ret)
+			return ret;
+	}
+
+	vlan4k->vid = vid;
+	vlan4k->untag = (data[1] >> RTL8366RB_VLAN_UNTAG_SHIFT) &
+			RTL8366RB_VLAN_UNTAG_MASK;
+	vlan4k->member = data[1] & RTL8366RB_VLAN_MEMBER_MASK;
+	vlan4k->fid = data[2] & RTL8366RB_VLAN_FID_MASK;
+
+	return 0;
+}
+
+static int rtl8366rb_set_vlan_4k(struct realtek_smi *smi,
+				 const struct rtl8366_vlan_4k *vlan4k)
+{
+	u32 data[3];
+	int ret;
+	int i;
+
+	if (vlan4k->vid >= RTL8366RB_NUM_VIDS ||
+	    vlan4k->member > RTL8366RB_VLAN_MEMBER_MASK ||
+	    vlan4k->untag > RTL8366RB_VLAN_UNTAG_MASK ||
+	    vlan4k->fid > RTL8366RB_FIDMAX)
+		return -EINVAL;
+
+	data[0] = vlan4k->vid & RTL8366RB_VLAN_VID_MASK;
+	data[1] = (vlan4k->member & RTL8366RB_VLAN_MEMBER_MASK) |
+		  ((vlan4k->untag & RTL8366RB_VLAN_UNTAG_MASK) <<
+			RTL8366RB_VLAN_UNTAG_SHIFT);
+	data[2] = vlan4k->fid & RTL8366RB_VLAN_FID_MASK;
+
+	for (i = 0; i < 3; i++) {
+		ret = regmap_write(smi->map,
+				   RTL8366RB_VLAN_TABLE_WRITE_BASE + i,
+				   data[i]);
+		if (ret)
+			return ret;
+	}
+
+	/* write table access control word */
+	ret = regmap_write(smi->map, RTL8366RB_TABLE_ACCESS_CTRL_REG,
+			   RTL8366RB_TABLE_VLAN_WRITE_CTRL);
+
+	return ret;
+}
+
+static int rtl8366rb_get_vlan_mc(struct realtek_smi *smi, u32 index,
+				 struct rtl8366_vlan_mc *vlanmc)
+{
+	u32 data[3];
+	int ret;
+	int i;
+
+	memset(vlanmc, '\0', sizeof(struct rtl8366_vlan_mc));
+
+	if (index >= RTL8366RB_NUM_VLANS)
+		return -EINVAL;
+
+	for (i = 0; i < 3; i++) {
+		ret = regmap_read(smi->map,
+				  RTL8366RB_VLAN_MC_BASE(index) + i,
+				  &data[i]);
+		if (ret)
+			return ret;
+	}
+
+	vlanmc->vid = data[0] & RTL8366RB_VLAN_VID_MASK;
+	vlanmc->priority = (data[0] >> RTL8366RB_VLAN_PRIORITY_SHIFT) &
+		RTL8366RB_VLAN_PRIORITY_MASK;
+	vlanmc->untag = (data[1] >> RTL8366RB_VLAN_UNTAG_SHIFT) &
+		RTL8366RB_VLAN_UNTAG_MASK;
+	vlanmc->member = data[1] & RTL8366RB_VLAN_MEMBER_MASK;
+	vlanmc->fid = data[2] & RTL8366RB_VLAN_FID_MASK;
+
+	return 0;
+}
+
+static int rtl8366rb_set_vlan_mc(struct realtek_smi *smi, u32 index,
+				 const struct rtl8366_vlan_mc *vlanmc)
+{
+	u32 data[3];
+	int ret;
+	int i;
+
+	if (index >= RTL8366RB_NUM_VLANS ||
+	    vlanmc->vid >= RTL8366RB_NUM_VIDS ||
+	    vlanmc->priority > RTL8366RB_PRIORITYMAX ||
+	    vlanmc->member > RTL8366RB_VLAN_MEMBER_MASK ||
+	    vlanmc->untag > RTL8366RB_VLAN_UNTAG_MASK ||
+	    vlanmc->fid > RTL8366RB_FIDMAX)
+		return -EINVAL;
+
+	data[0] = (vlanmc->vid & RTL8366RB_VLAN_VID_MASK) |
+		  ((vlanmc->priority & RTL8366RB_VLAN_PRIORITY_MASK) <<
+			RTL8366RB_VLAN_PRIORITY_SHIFT);
+	data[1] = (vlanmc->member & RTL8366RB_VLAN_MEMBER_MASK) |
+		  ((vlanmc->untag & RTL8366RB_VLAN_UNTAG_MASK) <<
+			RTL8366RB_VLAN_UNTAG_SHIFT);
+	data[2] = vlanmc->fid & RTL8366RB_VLAN_FID_MASK;
+
+	for (i = 0; i < 3; i++) {
+		ret = regmap_write(smi->map,
+				   RTL8366RB_VLAN_MC_BASE(index) + i,
+				   data[i]);
+		if (ret)
+			return ret;
+	}
+
+	return 0;
+}
+
+static int rtl8366rb_get_mc_index(struct realtek_smi *smi, int port, int *val)
+{
+	u32 data;
+	int ret;
+
+	if (port >= smi->num_ports)
+		return -EINVAL;
+
+	ret = regmap_read(smi->map, RTL8366RB_PORT_VLAN_CTRL_REG(port),
+			  &data);
+	if (ret)
+		return ret;
+
+	*val = (data >> RTL8366RB_PORT_VLAN_CTRL_SHIFT(port)) &
+		RTL8366RB_PORT_VLAN_CTRL_MASK;
+
+	return 0;
+}
+
+static int rtl8366rb_set_mc_index(struct realtek_smi *smi, int port, int index)
+{
+	if (port >= smi->num_ports || index >= RTL8366RB_NUM_VLANS)
+		return -EINVAL;
+
+	return regmap_update_bits(smi->map, RTL8366RB_PORT_VLAN_CTRL_REG(port),
+				RTL8366RB_PORT_VLAN_CTRL_MASK <<
+					RTL8366RB_PORT_VLAN_CTRL_SHIFT(port),
+				(index & RTL8366RB_PORT_VLAN_CTRL_MASK) <<
+					RTL8366RB_PORT_VLAN_CTRL_SHIFT(port));
+}
+
+static bool rtl8366rb_is_vlan_valid(struct realtek_smi *smi, unsigned int vlan)
+{
+	unsigned int max = RTL8366RB_NUM_VLANS;
+
+	if (smi->vlan4k_enabled)
+		max = RTL8366RB_NUM_VIDS - 1;
+
+	if (vlan == 0 || vlan >= max)
+		return false;
+
+	return true;
+}
+
+static int rtl8366rb_enable_vlan(struct realtek_smi *smi, bool enable)
+{
+	dev_dbg(smi->dev, "%s VLAN\n", enable ? "enable" : "disable");
+	return regmap_update_bits(smi->map,
+				  RTL8366RB_SGCR, RTL8366RB_SGCR_EN_VLAN,
+				  enable ? RTL8366RB_SGCR_EN_VLAN : 0);
+}
+
+static int rtl8366rb_enable_vlan4k(struct realtek_smi *smi, bool enable)
+{
+	dev_dbg(smi->dev, "%s VLAN 4k\n", enable ? "enable" : "disable");
+	return regmap_update_bits(smi->map, RTL8366RB_SGCR,
+				  RTL8366RB_SGCR_EN_VLAN_4KTB,
+				  enable ? RTL8366RB_SGCR_EN_VLAN_4KTB : 0);
+}
+
+static int rtl8366rb_phy_read(struct realtek_smi *smi, int phy, int regnum)
+{
+	u32 val;
+	u32 reg;
+	int ret;
+
+	if (phy > RTL8366RB_PHY_NO_MAX)
+		return -EINVAL;
+
+	ret = regmap_write(smi->map, RTL8366RB_PHY_ACCESS_CTRL_REG,
+			   RTL8366RB_PHY_CTRL_READ);
+	if (ret)
+		return ret;
+
+	reg = 0x8000 | (1 << (phy + RTL8366RB_PHY_NO_OFFSET)) | regnum;
+
+	ret = regmap_write(smi->map, reg, 0);
+	if (ret) {
+		dev_err(smi->dev,
+			"failed to write PHY%d reg %04x @ %04x, ret %d\n",
+			phy, regnum, reg, ret);
+		return ret;
+	}
+
+	ret = regmap_read(smi->map, RTL8366RB_PHY_ACCESS_DATA_REG, &val);
+	if (ret)
+		return ret;
+
+	dev_dbg(smi->dev, "read PHY%d register 0x%04x @ %08x, val <- %04x\n",
+		phy, regnum, reg, val);
+
+	return val;
+}
+
+static int rtl8366rb_phy_write(struct realtek_smi *smi, int phy, int regnum,
+			       u16 val)
+{
+	u32 reg;
+	int ret;
+
+	if (phy > RTL8366RB_PHY_NO_MAX)
+		return -EINVAL;
+
+	ret = regmap_write(smi->map, RTL8366RB_PHY_ACCESS_CTRL_REG,
+			   RTL8366RB_PHY_CTRL_WRITE);
+	if (ret)
+		return ret;
+
+	reg = 0x8000 | (1 << (phy + RTL8366RB_PHY_NO_OFFSET)) | regnum;
+
+	dev_dbg(smi->dev, "write PHY%d register 0x%04x @ %04x, val -> %04x\n",
+		phy, regnum, reg, val);
+
+	ret = regmap_write(smi->map, reg, val);
+	if (ret)
+		return ret;
+
+	return 0;
+}
+
+static int rtl8366rb_reset_chip(struct realtek_smi *smi)
+{
+	int timeout = 10;
+	u32 val;
+	int ret;
+
+	realtek_smi_write_reg_noack(smi, RTL8366RB_RESET_CTRL_REG,
+				    RTL8366RB_CHIP_CTRL_RESET_HW);
+	do {
+		usleep_range(20000, 25000);
+		ret = regmap_read(smi->map, RTL8366RB_RESET_CTRL_REG, &val);
+		if (ret)
+			return ret;
+
+		if (!(val & RTL8366RB_CHIP_CTRL_RESET_HW))
+			break;
+	} while (--timeout);
+
+	if (!timeout) {
+		dev_err(smi->dev, "timeout waiting for the switch to reset\n");
+		return -EIO;
+	}
+
+	return 0;
+}
+
+static int rtl8366rb_detect(struct realtek_smi *smi)
+{
+	struct device *dev = smi->dev;
+	int ret;
+	u32 val;
+
+	/* Detect device */
+	ret = regmap_read(smi->map, 0x5c, &val);
+	if (ret) {
+		dev_err(dev, "can't get chip ID (%d)\n", ret);
+		return ret;
+	}
+
+	switch (val) {
+	case 0x6027:
+		dev_info(dev, "found an RTL8366S switch\n");
+		dev_err(dev, "this switch is not yet supported, submit patches!\n");
+		return -ENODEV;
+	case 0x5937:
+		dev_info(dev, "found an RTL8366RB switch\n");
+		smi->cpu_port = RTL8366RB_PORT_NUM_CPU;
+		smi->num_ports = RTL8366RB_NUM_PORTS;
+		smi->num_vlan_mc = RTL8366RB_NUM_VLANS;
+		smi->mib_counters = rtl8366rb_mib_counters;
+		smi->num_mib_counters = ARRAY_SIZE(rtl8366rb_mib_counters);
+		break;
+	default:
+		dev_info(dev, "found an Unknown Realtek switch (id=0x%04x)\n",
+			 val);
+		break;
+	}
+
+	ret = rtl8366rb_reset_chip(smi);
+	if (ret)
+		return ret;
+
+	return 0;
+}
+
+static const struct dsa_switch_ops rtl8366rb_switch_ops = {
+	.get_tag_protocol = rtl8366_get_tag_protocol,
+	.setup = rtl8366rb_setup,
+	.adjust_link = rtl8366rb_adjust_link,
+	.get_strings = rtl8366_get_strings,
+	.get_ethtool_stats = rtl8366_get_ethtool_stats,
+	.get_sset_count = rtl8366_get_sset_count,
+	.port_vlan_filtering = rtl8366_vlan_filtering,
+	.port_vlan_prepare = rtl8366_vlan_prepare,
+	.port_vlan_add = rtl8366_vlan_add,
+	.port_vlan_del = rtl8366_vlan_del,
+	.port_enable = rtl8366rb_port_enable,
+	.port_disable = rtl8366rb_port_disable,
+};
+
+static const struct realtek_smi_ops rtl8366rb_smi_ops = {
+	.detect		= rtl8366rb_detect,
+	.get_vlan_mc	= rtl8366rb_get_vlan_mc,
+	.set_vlan_mc	= rtl8366rb_set_vlan_mc,
+	.get_vlan_4k	= rtl8366rb_get_vlan_4k,
+	.set_vlan_4k	= rtl8366rb_set_vlan_4k,
+	.get_mc_index	= rtl8366rb_get_mc_index,
+	.set_mc_index	= rtl8366rb_set_mc_index,
+	.get_mib_counter = rtl8366rb_get_mib_counter,
+	.is_vlan_valid	= rtl8366rb_is_vlan_valid,
+	.enable_vlan	= rtl8366rb_enable_vlan,
+	.enable_vlan4k	= rtl8366rb_enable_vlan4k,
+	.phy_read	= rtl8366rb_phy_read,
+	.phy_write	= rtl8366rb_phy_write,
+};
+
+const struct realtek_smi_variant rtl8366rb_variant = {
+	.ds_ops = &rtl8366rb_switch_ops,
+	.ops = &rtl8366rb_smi_ops,
+	.clk_delay = 10,
+	.cmd_read = 0xa9,
+	.cmd_write = 0xa8,
+};
+EXPORT_SYMBOL_GPL(rtl8366rb_variant);
-- 
2.17.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From linus.walleij at linaro.org  Sat Jul 14 05:45:56 2018
From: linus.walleij at linaro.org (Linus Walleij)
Date: Sat, 14 Jul 2018 11:45:56 +0200
Subject: [OpenWrt-Devel] [PATCH 4/4 v1] ARM: dts: Add ethernet and switch to
 D-Link DIR-685
In-Reply-To: <20180714094556.30791-1-linus.walleij@linaro.org>
References: <20180714094556.30791-1-linus.walleij@linaro.org>
Message-ID: <20180714094556.30791-4-linus.walleij@linaro.org>

This adds the Ethernet and Realtek switch device to the
D-Link DIR-685 Gemini-based device.

Signed-off-by: Linus Walleij <linus.walleij at linaro.org>
---
ChangeLog RFCv2->v1
- Use a fixed link on the ethernet port towards the
  router chip.
ChangeLog RFCv1->RFCv2
- Rebased, use the new DT bindings
---
 arch/arm/boot/dts/gemini-dlink-dir-685.dts | 140 ++++++++++++++++++++-
 1 file changed, 139 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/gemini-dlink-dir-685.dts b/arch/arm/boot/dts/gemini-dlink-dir-685.dts
index fb5c954ab95a..6f258b50eb44 100644
--- a/arch/arm/boot/dts/gemini-dlink-dir-685.dts
+++ b/arch/arm/boot/dts/gemini-dlink-dir-685.dts
@@ -156,6 +156,100 @@
 		};
 	};
 
+	/* This is a RealTek RTL8366RB switch and PHY using SMI over GPIO */
+	switch {
+		compatible = "realtek,rtl8366rb";
+		/* 22 = MDIO (has input reads), 21 = MDC (clock, output only) */
+		mdc-gpios = <&gpio0 21 GPIO_ACTIVE_HIGH>;
+		mdio-gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>;
+		reset-gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
+		realtek,disable-leds;
+
+		switch_intc: interrupt-controller {
+			/* GPIO 15 provides the interrupt */
+			interrupt-parent = <&gpio0>;
+			interrupts = <15 IRQ_TYPE_LEVEL_LOW>;
+			interrupt-controller;
+			#address-cells = <0>;
+			#interrupt-cells = <1>;
+		};
+
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			port at 0 {
+				reg = <0>;
+				label = "lan0";
+				phy-handle = <&phy0>;
+			};
+			port at 1 {
+				reg = <1>;
+				label = "lan1";
+				phy-handle = <&phy1>;
+			};
+			port at 2 {
+				reg = <2>;
+				label = "lan2";
+				phy-handle = <&phy2>;
+			};
+			port at 3 {
+				reg = <3>;
+				label = "lan3";
+				phy-handle = <&phy3>;
+			};
+			port at 4 {
+				reg = <4>;
+				label = "wan";
+				phy-handle = <&phy4>;
+			};
+			rtl8366rb_cpu_port: port at 5 {
+				reg = <5>;
+				label = "cpu";
+				ethernet = <&gmac0>;
+				phy-mode = "rgmii";
+				fixed-link {
+					speed = <1000>;
+					full-duplex;
+					pause;
+				};
+			};
+
+		};
+
+		mdio {
+			compatible = "realtek,smi-mdio";
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			phy0: phy at 0 {
+				reg = <0>;
+				interrupt-parent = <&switch_intc>;
+				interrupts = <0>;
+			};
+			phy1: phy at 1 {
+				reg = <1>;
+				interrupt-parent = <&switch_intc>;
+				interrupts = <1>;
+			};
+			phy2: phy at 2 {
+				reg = <2>;
+				interrupt-parent = <&switch_intc>;
+				interrupts = <2>;
+			};
+			phy3: phy at 3 {
+				reg = <3>;
+				interrupt-parent = <&switch_intc>;
+				interrupts = <3>;
+			};
+			phy4: phy at 4 {
+				reg = <4>;
+				interrupt-parent = <&switch_intc>;
+				interrupts = <12>;
+			};
+		};
+	};
+
 	soc {
 		flash at 30000000 {
 			/*
@@ -223,10 +317,12 @@
 				 * gpio0bgrp cover line 7 used by WPS LED
 				 * gpio0cgrp cover line 8, 13 used by keys
 				 *           and 11, 12 used by the HD LEDs
+				 *           and line 14, 15 used by RTL8366
+				 *           RESET and phy ready
 				 * gpio0egrp cover line 16 used by VDISP
 				 * gpio0fgrp cover line 17 used by TK IRQ
 				 * gpio0ggrp cover line 20 used by panel CS
-				 * gpio0hgrp cover line 21,22 used by RTL8366RB
+				 * gpio0hgrp cover line 21,22 used by RTL8366RB MDIO
 				 */
 				gpio0_default_pins: pinctrl-gpio0 {
 					mux {
@@ -250,6 +346,32 @@
 						groups = "gpio1bgrp";
 					};
 				};
+				pinctrl-gmii {
+					mux {
+						function = "gmii";
+						groups = "gmii_gmac0_grp";
+					};
+					conf0 {
+						pins = "V8 GMAC0 RXDV", "T10 GMAC1 RXDV",
+						     "Y7 GMAC0 RXC", "Y11 GMAC1 RXC",
+						     "T8 GMAC0 TXEN", "W11 GMAC1 TXEN",
+						     "U8 GMAC0 TXC", "V11 GMAC1 TXC",
+						     "W8 GMAC0 RXD0", "V9 GMAC0 RXD1",
+						     "Y8 GMAC0 RXD2", "U9 GMAC0 RXD3",
+						     "T7 GMAC0 TXD0", "U6 GMAC0 TXD1",
+						     "V7 GMAC0 TXD2", "U7 GMAC0 TXD3",
+						     "Y12 GMAC1 RXD0", "V12 GMAC1 RXD1",
+						     "T11 GMAC1 RXD2", "W12 GMAC1 RXD3",
+						     "U10 GMAC1 TXD0", "Y10 GMAC1 TXD1",
+						     "W10 GMAC1 TXD2", "T9 GMAC1 TXD3";
+						skew-delay = <7>;
+					};
+					/* Set up drive strength on GMAC0 to 16 mA */
+					conf1 {
+						groups = "gmii_gmac0_grp";
+						drive-strength = <16>;
+					};
+				};
 			};
 		};
 
@@ -291,6 +413,22 @@
 				<0x6000 0 0 4 &pci_intc 2>;
 		};
 
+		ethernet at 60000000 {
+			status = "okay";
+
+			ethernet-port at 0 {
+				phy-mode = "rgmii";
+				fixed-link {
+					speed = <1000>;
+					full-duplex;
+					pause;
+				};
+			};
+			ethernet-port at 1 {
+				/* Not used in this platform */
+			};
+		};
+
 		ata at 63000000 {
 			status = "okay";
 		};
-- 
2.17.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From linus.walleij at linaro.org  Sat Jul 14 05:45:56 2018
From: linus.walleij at linaro.org (Linus Walleij)
Date: Sat, 14 Jul 2018 11:45:56 +0200
Subject: [OpenWrt-Devel] [PATCH 4/4 v1] ARM: dts: Add ethernet and switch to
 D-Link DIR-685
In-Reply-To: <20180714094556.30791-1-linus.walleij@linaro.org>
References: <20180714094556.30791-1-linus.walleij@linaro.org>
Message-ID: <20180714094556.30791-4-linus.walleij@linaro.org>

This adds the Ethernet and Realtek switch device to the
D-Link DIR-685 Gemini-based device.

Signed-off-by: Linus Walleij <linus.walleij at linaro.org>
---
ChangeLog RFCv2->v1
- Use a fixed link on the ethernet port towards the
  router chip.
ChangeLog RFCv1->RFCv2
- Rebased, use the new DT bindings
---
 arch/arm/boot/dts/gemini-dlink-dir-685.dts | 140 ++++++++++++++++++++-
 1 file changed, 139 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/gemini-dlink-dir-685.dts b/arch/arm/boot/dts/gemini-dlink-dir-685.dts
index fb5c954ab95a..6f258b50eb44 100644
--- a/arch/arm/boot/dts/gemini-dlink-dir-685.dts
+++ b/arch/arm/boot/dts/gemini-dlink-dir-685.dts
@@ -156,6 +156,100 @@
 		};
 	};
 
+	/* This is a RealTek RTL8366RB switch and PHY using SMI over GPIO */
+	switch {
+		compatible = "realtek,rtl8366rb";
+		/* 22 = MDIO (has input reads), 21 = MDC (clock, output only) */
+		mdc-gpios = <&gpio0 21 GPIO_ACTIVE_HIGH>;
+		mdio-gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>;
+		reset-gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
+		realtek,disable-leds;
+
+		switch_intc: interrupt-controller {
+			/* GPIO 15 provides the interrupt */
+			interrupt-parent = <&gpio0>;
+			interrupts = <15 IRQ_TYPE_LEVEL_LOW>;
+			interrupt-controller;
+			#address-cells = <0>;
+			#interrupt-cells = <1>;
+		};
+
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			port at 0 {
+				reg = <0>;
+				label = "lan0";
+				phy-handle = <&phy0>;
+			};
+			port at 1 {
+				reg = <1>;
+				label = "lan1";
+				phy-handle = <&phy1>;
+			};
+			port at 2 {
+				reg = <2>;
+				label = "lan2";
+				phy-handle = <&phy2>;
+			};
+			port at 3 {
+				reg = <3>;
+				label = "lan3";
+				phy-handle = <&phy3>;
+			};
+			port at 4 {
+				reg = <4>;
+				label = "wan";
+				phy-handle = <&phy4>;
+			};
+			rtl8366rb_cpu_port: port at 5 {
+				reg = <5>;
+				label = "cpu";
+				ethernet = <&gmac0>;
+				phy-mode = "rgmii";
+				fixed-link {
+					speed = <1000>;
+					full-duplex;
+					pause;
+				};
+			};
+
+		};
+
+		mdio {
+			compatible = "realtek,smi-mdio";
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			phy0: phy at 0 {
+				reg = <0>;
+				interrupt-parent = <&switch_intc>;
+				interrupts = <0>;
+			};
+			phy1: phy at 1 {
+				reg = <1>;
+				interrupt-parent = <&switch_intc>;
+				interrupts = <1>;
+			};
+			phy2: phy at 2 {
+				reg = <2>;
+				interrupt-parent = <&switch_intc>;
+				interrupts = <2>;
+			};
+			phy3: phy at 3 {
+				reg = <3>;
+				interrupt-parent = <&switch_intc>;
+				interrupts = <3>;
+			};
+			phy4: phy at 4 {
+				reg = <4>;
+				interrupt-parent = <&switch_intc>;
+				interrupts = <12>;
+			};
+		};
+	};
+
 	soc {
 		flash at 30000000 {
 			/*
@@ -223,10 +317,12 @@
 				 * gpio0bgrp cover line 7 used by WPS LED
 				 * gpio0cgrp cover line 8, 13 used by keys
 				 *           and 11, 12 used by the HD LEDs
+				 *           and line 14, 15 used by RTL8366
+				 *           RESET and phy ready
 				 * gpio0egrp cover line 16 used by VDISP
 				 * gpio0fgrp cover line 17 used by TK IRQ
 				 * gpio0ggrp cover line 20 used by panel CS
-				 * gpio0hgrp cover line 21,22 used by RTL8366RB
+				 * gpio0hgrp cover line 21,22 used by RTL8366RB MDIO
 				 */
 				gpio0_default_pins: pinctrl-gpio0 {
 					mux {
@@ -250,6 +346,32 @@
 						groups = "gpio1bgrp";
 					};
 				};
+				pinctrl-gmii {
+					mux {
+						function = "gmii";
+						groups = "gmii_gmac0_grp";
+					};
+					conf0 {
+						pins = "V8 GMAC0 RXDV", "T10 GMAC1 RXDV",
+						     "Y7 GMAC0 RXC", "Y11 GMAC1 RXC",
+						     "T8 GMAC0 TXEN", "W11 GMAC1 TXEN",
+						     "U8 GMAC0 TXC", "V11 GMAC1 TXC",
+						     "W8 GMAC0 RXD0", "V9 GMAC0 RXD1",
+						     "Y8 GMAC0 RXD2", "U9 GMAC0 RXD3",
+						     "T7 GMAC0 TXD0", "U6 GMAC0 TXD1",
+						     "V7 GMAC0 TXD2", "U7 GMAC0 TXD3",
+						     "Y12 GMAC1 RXD0", "V12 GMAC1 RXD1",
+						     "T11 GMAC1 RXD2", "W12 GMAC1 RXD3",
+						     "U10 GMAC1 TXD0", "Y10 GMAC1 TXD1",
+						     "W10 GMAC1 TXD2", "T9 GMAC1 TXD3";
+						skew-delay = <7>;
+					};
+					/* Set up drive strength on GMAC0 to 16 mA */
+					conf1 {
+						groups = "gmii_gmac0_grp";
+						drive-strength = <16>;
+					};
+				};
 			};
 		};
 
@@ -291,6 +413,22 @@
 				<0x6000 0 0 4 &pci_intc 2>;
 		};
 
+		ethernet at 60000000 {
+			status = "okay";
+
+			ethernet-port at 0 {
+				phy-mode = "rgmii";
+				fixed-link {
+					speed = <1000>;
+					full-duplex;
+					pause;
+				};
+			};
+			ethernet-port at 1 {
+				/* Not used in this platform */
+			};
+		};
+
 		ata at 63000000 {
 			status = "okay";
 		};
-- 
2.17.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From wong.syrone at gmail.com  Sat Jul 14 08:48:29 2018
From: wong.syrone at gmail.com (Syrone Wong)
Date: Sat, 14 Jul 2018 20:48:29 +0800
Subject: [OpenWrt-Devel] iproute2 4.17.0 build error
Message-ID: <CAEaqfobtFYXLcgR96uTO1GXVZ0_CGrvzb2-07gPisuZYNgVYUA@mail.gmail.com>

Hi,

I checked the patchwork, it's added via
https://patchwork.ozlabs.org/patch/877043/

build log below.

tc
    CC       tc.o
    CC       tc_qdisc.o
    CC       tc_class.o
    CC       tc_filter.o
    CC       tc_util.o
    CC       tc_monitor.o
    CC       tc_exec.o
    CC       m_police.o
    CC       m_estimator.o
    CC       m_action.o
    CC       m_ematch.o
    YACC     emp_ematch.yacc.c
    CC       emp_ematch.yacc.o
    LEX      emp_ematch.lex.c
    CC       emp_ematch.lex.o
    CC       q_fifo.o
    CC       q_sfq.o
    CC       q_red.o
    CC       q_prio.o
    CC       q_tbf.o
    CC       q_cbq.o
    CC       q_rr.o
    CC       q_multiq.o
    CC       q_netem.o
    CC       q_choke.o
    CC       q_sfb.o
    CC       f_rsvp.o
    CC       f_u32.o
    CC       f_route.o
    CC       f_fw.o
    CC       f_basic.o
    CC       f_bpf.o
    CC       f_flow.o
    CC       f_cgroup.o
    CC       f_flower.o
In file included from ../include/uapi/linux/netdevice.h:29,
                 from ../include/uapi/linux/if_arp.h:27,
                 from f_flower.c:17:
../include/uapi/linux/if.h:133: warning: "IFF_VOLATILE" redefined
 #define IFF_VOLATILE (IFF_LOOPBACK|IFF_POINTOPOINT|IFF_BROADCAST|IFF_ECHO|\

In file included from f_flower.c:16:
/home/wong/github/lede-1/staging_dir/toolchain-x86_64_gcc-8.1.0_musl/include/net/if.h:48:
note: this is the location of the previous definition
 #define IFF_VOLATILE (IFF_LOOPBACK|IFF_POINTOPOINT|IFF_BROADCAST| \

    CC       q_dsmark.o
    CC       q_gred.o
    CC       f_tcindex.o
    CC       q_ingress.o
    CC       q_hfsc.o
    CC       q_htb.o
    CC       q_drr.o
    CC       q_qfq.o
    CC       m_gact.o
    CC       m_mirred.o
    CC       m_nat.o
    CC       m_pedit.o
    CC       m_ife.o
    CC       m_skbedit.o
    CC       m_skbmod.o
    CC       m_csum.o
    CC       m_simple.o
    CC       m_vlan.o
    CC       m_connmark.o
    CC       m_bpf.o
    CC       m_tunnel_key.o
    CC       m_sample.o
    CC       p_ip.o
    CC       p_ip6.o
    CC       p_icmp.o
    CC       p_eth.o
    CC       p_tcp.o
    CC       p_udp.o
    CC       em_nbyte.o
    CC       em_cmp.o
    CC       em_u32.o
    CC       em_canid.o
    CC       em_meta.o
    CC       q_mqprio.o
    CC       q_codel.o
    CC       q_fq_codel.o
    CC       q_cake.o
    CC       q_fq.o
    CC       q_pie.o
    CC       q_hhf.o
    CC       q_clsact.o
    CC       e_bpf.o
    CC       f_matchall.o
    CC       q_cbs.o
    CC       em_ipt.o
In file included from tc_util.h:7,
                 from m_ematch.h:11,
                 from em_ipt.c:16:
../include/uapi/linux/if.h:133: warning: "IFF_VOLATILE" redefined
 #define IFF_VOLATILE (IFF_LOOPBACK|IFF_POINTOPOINT|IFF_BROADCAST|IFF_ECHO|\

In file included from ../include/xtables.h:17,
                 from em_ipt.c:15:
/home/wong/github/lede-1/staging_dir/toolchain-x86_64_gcc-8.1.0_musl/include/net/if.h:48:
note: this is the location of the previous definition
 #define IFF_VOLATILE (IFF_LOOPBACK|IFF_POINTOPOINT|IFF_BROADCAST| \

    CC       em_ipset.o
In file included from tc_util.h:7,
                 from m_ematch.h:11,
                 from em_ipset.c:42:
../include/uapi/linux/if.h:133: warning: "IFF_VOLATILE" redefined
 #define IFF_VOLATILE (IFF_LOOPBACK|IFF_POINTOPOINT|IFF_BROADCAST|IFF_ECHO|\

In file included from ../include/xtables.h:17,
                 from em_ipset.c:26:
/home/wong/github/lede-1/staging_dir/toolchain-x86_64_gcc-8.1.0_musl/include/net/if.h:48:
note: this is the location of the previous definition
 #define IFF_VOLATILE (IFF_LOOPBACK|IFF_POINTOPOINT|IFF_BROADCAST| \

    CC       tc_core.o
    CC       tc_red.o
    CC       tc_cbq.o
    CC       tc_estimator.o
    CC       tc_stab.o
    AR       libtc.a
files="m_police.c m_gact.c m_tunnel_key.c q_sfq.c q_hfsc.c q_fifo.c
q_pie.c tc_estimator.c m_mirred.c f_u32.c tc_qdisc.c m_action.c
q_fq_codel.c q_codel.c f_flow.c f_bpf.c f_tcindex.c q_clsact.c
q_dsmark.c m_nat.c tc_util.c m_ematch.c em_ipt.c tc_cbq.c f_route.c
f_fw.c m_simple.c p_ip6.c q_drr.c q_cbs.c static-syms.c p_ip.c m_bpf.c
q_rr.c f_matchall.c q_htb.c q_choke.c q_cake.c m_connmark.c m_ipt.c
m_skbmod.c m_ife.c q_sfb.c q_atm.c m_sample.c q_qfq.c em_cmp.c q_cbq.c
em_nbyte.c q_fq.c m_skbedit.c em_meta.c f_rsvp.c q_tbf.c m_pedit.c
tc_stab.c p_tcp.c em_u32.c q_hhf.c p_icmp.c tc_filter.c m_xt.c
q_multiq.c p_eth.c tc_red.c em_canid.c q_gred.c tc_exec.c tc_monitor.c
f_cgroup.c m_xt_old.c tc.c q_prio.c q_ingress.c f_flower.c p_udp.c
em_ipset.c m_vlan.c m_estimator.c q_netem.c tc_core.c m_csum.c
f_basic.c e_bpf.c q_red.c q_mqprio.c tc_class.c" ; \
for s in `grep -B 3 '\<dlsym' $files | sed -n
'/snprintf/{s:.*"\([^"]*\)".*:\1:;s:%s::;p}'` ; do \
        sed -n '/'$s'[^ ]* =/{s:.* \([^ ]*'$s'[^ ]*\) .*:extern char
\1[] __attribute__((weak)); if (!strcmp(sym, "\1")) return \1;:;p}'
$files ; \
done > static-syms.h
    CC       static-syms.o
    LINK     tc
em_ipt.o: In function `em_ipt_print_epot':
em_ipt.c:(.text.em_ipt_print_epot+0x2e): undefined reference to
`xtables_init_all'
em_ipt.c:(.text.em_ipt_print_epot+0x44): undefined reference to
`xtables_find_match'
em_ipt.c:(.text.em_ipt_print_epot+0x70): undefined reference to `xtables_calloc'
em_ipt.o: In function `em_ipt_parse_eopt_argv':
em_ipt.c:(.text.em_ipt_parse_eopt_argv+0x74): undefined reference to
`xtables_init_all'
em_ipt.c:(.text.em_ipt_parse_eopt_argv+0x88): undefined reference to
`xtables_find_match'
em_ipt.c:(.text.em_ipt_parse_eopt_argv+0xbe): undefined reference to
`xtables_calloc'
em_ipt.c:(.text.em_ipt_parse_eopt_argv+0x118): undefined reference to
`xtables_options_xfrm'
em_ipt.c:(.text.em_ipt_parse_eopt_argv+0x186): undefined reference to
`xtables_option_mpcall'
em_ipt.c:(.text.em_ipt_parse_eopt_argv+0x1b5): undefined reference to
`xtables_option_mfcall'
em_ipt.c:(.text.em_ipt_parse_eopt_argv+0x265): undefined reference to
`xtables_free_opts'
em_ipt.o:(.data.em_tc_ipt_globals+0x30): undefined reference to
`xtables_compatible_revision'
collect2: error: ld returned 1 exit status
make[4]: *** [Makefile:134: tc] Error 1
rm emp_ematch.lex.c
make[3]: *** [Makefile:70: all] Error 2
make[3]: Leaving directory
'/home/wong/github/lede-1/build_dir/target-x86_64_musl/iproute2-full/iproute2-4.17.0'
make[2]: *** [Makefile:192:
/home/wong/github/lede-1/build_dir/target-x86_64_musl/iproute2-full/iproute2-4.17.0/.built]
Error 2
make[2]: Leaving directory
'/home/wong/github/lede-1/package/network/utils/iproute2'
Command exited with non-zero status 2
time: package/network/utils/iproute2/full/compile#17.35#1.89#18.56
make[1]: *** [package/Makefile:109:
package/network/utils/iproute2/compile] Error 2


Best Regards,
Syrone Wong

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From wong.syrone at gmail.com  Sat Jul 14 09:38:46 2018
From: wong.syrone at gmail.com (Syrone Wong)
Date: Sat, 14 Jul 2018 21:38:46 +0800
Subject: [OpenWrt-Devel] iproute2 4.17.0 build error
In-Reply-To: <CAEaqfobtFYXLcgR96uTO1GXVZ0_CGrvzb2-07gPisuZYNgVYUA@mail.gmail.com>
References: <CAEaqfobtFYXLcgR96uTO1GXVZ0_CGrvzb2-07gPisuZYNgVYUA@mail.gmail.com>
Message-ID: <CAEaqfoYjWq5Br4Em82ovxLFfNo3icCpqXKooprcgACDtCuGinA@mail.gmail.com>

> em_ipt.o: In function `em_ipt_print_epot':
> em_ipt.c:(.text.em_ipt_print_epot+0x2e): undefined reference to
> `xtables_init_all'

em_ipt.c gets involved when TC_CONFIG_XT=y, which requires xtables,
while  tc/Makefile doesn't pass flags correctly.

I added a patch to fix this.

--- a/tc/Makefile
+++ b/tc/Makefile
@@ -168,7 +168,7 @@ em_ipset.o: CFLAGS += $$($(PKG_CONFIG) x
 em_ipt.o: CFLAGS += $$($(PKG_CONFIG) xtables --cflags)

 ifeq ($(TC_CONFIG_XT),y)
-  LDFLAGS += $$($(PKG_CONFIG) xtables --libs)
+  LDLIBS += $$($(PKG_CONFIG) xtables --libs)
 endif

 %.yacc.c: %.y

The original one adds `-lxtables` to LDFLAGS instead of LDLIBS. The
compilation succeeds afterward but the packaging
fails.

Package tc is missing dependencies for the following libraries:
libxtables.so.12

I think we'd better exclude em_ipt.c when TC_CONFIG_XT is enabled.

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From wong.syrone at gmail.com  Sat Jul 14 10:12:38 2018
From: wong.syrone at gmail.com (Syrone Wong)
Date: Sat, 14 Jul 2018 22:12:38 +0800
Subject: [OpenWrt-Devel] [PATCH 1/3] toolchain/gcc: add GCC 8.1.0
In-Reply-To: <ff68b072-e49e-3294-160b-aa0582701e1b@nbd.name>
References: <20180621150812.3477-1-wong.syrone@gmail.com>
 <973d2283-8d8f-0817-4b93-7144c14c07d9@nbd.name>
 <CAEaqfoZrbHVW7_v1B3eX66QdiAF0avtoZb0AxnOut_Lw-ODqeA@mail.gmail.com>
 <af365dcd-d308-4d02-2b47-3288dba7682d@nbd.name>
 <ff68b072-e49e-3294-160b-aa0582701e1b@nbd.name>
Message-ID: <CAEaqfob6ERXnGB7qrcFNfgWhgvCpf=Vq9k47dfFcpy3EY677MQ@mail.gmail.com>

> some new warnings triggered by syscall related macros.
>
> - Felix

Do you mean something like https://patchwork.kernel.org/patch/10093317/ ?
It's fixed via https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82435

Forgot to mention, to build grub2 for x86_64, there is another patch
should be backported to fix packed-not-aligned error.
https://git.archlinux.org/svntogit/packages.git/tree/trunk/0008-Fix-packed-not-aligned-error-on-GCC-8.patch?h=packages/grub

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From chunkeey at gmail.com  Sat Jul 14 11:21:55 2018
From: chunkeey at gmail.com (Christian Lamparter)
Date: Sat, 14 Jul 2018 17:21:55 +0200
Subject: [OpenWrt-Devel] [PATCH 1/2][master+18.06] apm821xx: fix usb-otg on
 4.14
Message-ID: <ca1c4d38641c5a0be7f686c76cdb25412b1ba4ed.1531581259.git.chunkeey@gmail.com>

Starting with 4.14, the "amcc,dwc-otg" needs to be used
in order to get the usb-otg to work.

Signed-off-by: Christian Lamparter <chunkeey at gmail.com>
---
Please add this patch to the current openwrt-18.06 branch.
---
 target/linux/apm821xx/dts/apm82181.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/apm821xx/dts/apm82181.dtsi b/target/linux/apm821xx/dts/apm82181.dtsi
index cc48d200d7..be8ace9207 100644
--- a/target/linux/apm821xx/dts/apm82181.dtsi
+++ b/target/linux/apm821xx/dts/apm82181.dtsi
@@ -248,7 +248,7 @@
 		};
 
 		USBOTG0: usbotg at bff80000 {
-			compatible = "amcc,usb-otg-405ex";
+			compatible = "amcc,dwc-otg";
 			reg = <4 0xbff80000 0x10000>;
 			interrupt-parent = <&USBOTG0>;
 			interrupts = <0 1 2>;
-- 
2.18.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From chunkeey at gmail.com  Sat Jul 14 11:21:56 2018
From: chunkeey at gmail.com (Christian Lamparter)
Date: Sat, 14 Jul 2018 17:21:56 +0200
Subject: [OpenWrt-Devel] [PATCH 2/2] apm821xx: attempt to fix sata access
 freezes
In-Reply-To: <ca1c4d38641c5a0be7f686c76cdb25412b1ba4ed.1531581259.git.chunkeey@gmail.com>
References: <ca1c4d38641c5a0be7f686c76cdb25412b1ba4ed.1531581259.git.chunkeey@gmail.com>
Message-ID: <e674ca144430b2985e6b0b75c1c6830fab8df314.1531581259.git.chunkeey@gmail.com>

The original vendor's driver programmed the dma controller's
AHB HPROT values to enable bufferable, privileged mode. This
along with the "same priorty for both channels" could very
well fix the freezes that have been reported on the forum by
@ticerex and @takimata.

<https://forum.lede-project.org/t/wd-mybook-live-duo-two-disks/16195/46>
Signed-off-by: Christian Lamparter <chunkeey at gmail.com>
---
Awaiting confirmation from the original reporters. But if
this turns out to fix the issue, I'll do a separate patch for
18.06 and lede-17.01.
---
 ...-dw-dma-hprot-fix-and-equal-priortiy.patch | 25 +++++++++++++++++++
 1 file changed, 25 insertions(+)
 create mode 100644 target/linux/apm821xx/patches-4.14/302-dw-dma-hprot-fix-and-equal-priortiy.patch

diff --git a/target/linux/apm821xx/patches-4.14/302-dw-dma-hprot-fix-and-equal-priortiy.patch b/target/linux/apm821xx/patches-4.14/302-dw-dma-hprot-fix-and-equal-priortiy.patch
new file mode 100644
index 0000000000..c6e4331aa9
--- /dev/null
+++ b/target/linux/apm821xx/patches-4.14/302-dw-dma-hprot-fix-and-equal-priortiy.patch
@@ -0,0 +1,25 @@
+--- a/drivers/dma/dw/core.c
++++ b/drivers/dma/dw/core.c
+@@ -167,6 +167,8 @@ static void dwc_initialize_chan_dw(struc
+ 	cfghi |= DWC_CFGH_DST_PER(dwc->dws.dst_id);
+ 	cfghi |= DWC_CFGH_SRC_PER(dwc->dws.src_id);
+ 
++	cfghi |= DWC_CFGH_PROTCTL(3); /* bufferable + privileged access */
++
+ 	/* Set polarity of handshake interface */
+ 	cfglo |= hs_polarity ? DWC_CFGL_HS_DST_POL | DWC_CFGL_HS_SRC_POL : 0;
+ 
+@@ -1293,11 +1295,8 @@ int dw_dma_probe(struct dw_dma_chip *chi
+ 		else
+ 			list_add(&dwc->chan.device_node, &dw->dma.channels);
+ 
+-		/* 7 is highest priority & 0 is lowest. */
+-		if (pdata->chan_priority == CHAN_PRIORITY_ASCENDING)
+-			dwc->priority = pdata->nr_channels - i - 1;
+-		else
+-			dwc->priority = i;
++		/* set all channels to the same priority */
++		dwc->priority = pdata->nr_channels - 1;
+ 
+ 		dwc->ch_regs = &__dw_regs(dw)->CHAN[i];
+ 		spin_lock_init(&dwc->lock);
-- 
2.18.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From openwrt-devel at lists.openwrt.org  Sat Jul 14 17:53:47 2018
From: openwrt-devel at lists.openwrt.org (=?UTF-8?q?Andrius=20=C5=A0tikonas?= via openwrt-devel)
Date: Sat, 14 Jul 2018 21:53:47 +0000
Subject: [OpenWrt-Devel] [PATCH] brcm63xx: initial support for Sky SR102
 router
Message-ID: <mailman.10478.1531605201.25356.openwrt-devel@lists.openwrt.org>

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.
-------------- next part --------------
An embedded message was scrubbed...
From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= <andrius at stikonas.eu>
Subject: [PATCH] brcm63xx: initial support for Sky SR102 router
Date: Sat, 14 Jul 2018 18:44:04 +0100
Size: 11314
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20180714/7b7de3b3/attachment.eml>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From openwrt-devel at lists.openwrt.org  Sun Jul 15 14:20:38 2018
From: openwrt-devel at lists.openwrt.org (=?utf-8?B?TWljaGHFgiBLxJlwaWXFhA==?= via openwrt-devel)
Date: Sun, 15 Jul 2018 18:20:38 +0000
Subject: [OpenWrt-Devel] [PATCH] odhcpd: allow specifying lease trigger
 mode
In-Reply-To: <CAJLcKsHfAea_va3tCSWShTW=EY768EmiDTfWuxbRba_Bm604iw@mail.gmail.com>
References: <mailman.6910.1530045246.25356.openwrt-devel@lists.openwrt.org>
 <CAJLcKsHfAea_va3tCSWShTW=EY768EmiDTfWuxbRba_Bm604iw@mail.gmail.com>
Message-ID: <mailman.10547.1531678838.25356.openwrt-devel@lists.openwrt.org>

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.
-------------- next part --------------
An embedded message was scrubbed...
From: =?utf-8?B?TWljaGHFgiBLxJlwaWXFhA==?= <lede at kempniu.pl>
Subject: Re: [OpenWrt-Devel] [PATCH] odhcpd: allow specifying lease trigger mode
Date: Sun, 15 Jul 2018 20:20:19 +0200
Size: 4704
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20180715/078eb4c4/attachment.eml>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From jo at mein.io  Sun Jul 15 14:56:00 2018
From: jo at mein.io (Jo-Philipp Wich)
Date: Sun, 15 Jul 2018 20:56:00 +0200
Subject: [OpenWrt-Devel] [PATCH 1/2] add htmodelist for scan results
In-Reply-To: <20180713085738.25259-1-yshvedov@wimarksystems.com>
References: <20180713085738.25259-1-yshvedov@wimarksystems.com>
Message-ID: <03716f5d-e5d5-7c5d-c39a-bf1920f19671@mein.io>

Hi,

comments inline.

On 07/13/2018 10:57 AM, Yury Shvedov wrote:

> diff --git a/include/iwinfo.h b/include/iwinfo.h
> index 929f697..c3c25ff 100644
> --- a/include/iwinfo.h
> +++ b/include/iwinfo.h
> @@ -154,6 +154,7 @@ struct iwinfo_scanlist_entry {
>  	uint8_t signal;
>  	uint8_t quality;
>  	uint8_t quality_max;
> +    int htmodelist;

Do we really need a full int here? I think an u8 or u16 should suffice.

>  	struct iwinfo_crypto_entry crypto;
>  };
>  
> diff --git a/iwinfo_cli.c b/iwinfo_cli.c
> index 49c9035..2d58020 100644
> --- a/iwinfo_cli.c
> +++ b/iwinfo_cli.c
> @@ -572,7 +572,7 @@ static void print_info(const struct iwinfo_ops *iw, const char *ifname)
>  
>  static void print_scanlist(const struct iwinfo_ops *iw, const char *ifname)
>  {
> -	int i, x, len;
> +	int i, h, x, len;
>  	char buf[IWINFO_BUFSIZE];
>  	struct iwinfo_scanlist_entry *e;
>  
> @@ -603,8 +603,17 @@ static void print_scanlist(const struct iwinfo_ops *iw, const char *ifname)
>  			format_signal(e->signal - 0x100),
>  			format_quality(e->quality),
>  			format_quality_max(e->quality_max));
> -		printf("          Encryption: %s\n\n",
> +		printf("          Encryption: %s\n",
>  			format_encryption(&e->crypto));
> +		if (e->htmodelist)
> +		{
> +			printf("          HT Capabilities: ");
> +			for (h = 0; h < ARRAY_SIZE(IWINFO_HTMODE_NAMES); h++)
> +				if (e->htmodelist & (1 << h))
> +					printf("%s ", IWINFO_HTMODE_NAMES[h]);
> +			printf ("\n");
> +		}
> +		printf ("\n");

Please adhere to the coding style and remove the space between "printf"
and the opening paren.
>  	}
>  }
>  
> diff --git a/iwinfo_lua.c b/iwinfo_lua.c
> index eebab8e..01581a3 100644
> --- a/iwinfo_lua.c
> +++ b/iwinfo_lua.c
> @@ -378,7 +378,7 @@ static int iwinfo_L_txpwrlist(lua_State *L, int (*func)(const char *, char *, in
>  /* Wrapper for scan list */
>  static int iwinfo_L_scanlist(lua_State *L, int (*func)(const char *, char *, int *))
>  {
> -	int i, x, len = 0;
> +	int i, x, h, len = 0;
>  	char rv[IWINFO_BUFSIZE];
>  	char macstr[18];
>  	const char *ifname = luaL_checkstring(L, 1);
> @@ -432,6 +432,20 @@ static int iwinfo_L_scanlist(lua_State *L, int (*func)(const char *, char *, int
>  			iwinfo_L_cryptotable(L, &e->crypto);
>  			lua_setfield(L, -2, "encryption");
>  
> +			/* HT Modes */
> +			if (e->htmodelist)
> +			{
> +				lua_newtable(L);
> +				for (h = 0; h < ARRAY_SIZE(IWINFO_HTMODE_NAMES); h++)
> +				{
> +					lua_pushboolean(L, e->htmodelist & (1 << h));
> +					lua_setfield(L, -2, IWINFO_HTMODE_NAMES[h]);
> +				}
> +			}
> +			else
> +				lua_pushnil(L);
> +			lua_setfield(L, -2, "htmodelist");

Please move the lua_setfield() into the if-condition and drop the else case.

> +
>  			lua_rawseti(L, -2, x);
>  		}
>  	}
> diff --git a/iwinfo_nl80211.c b/iwinfo_nl80211.c
> index ecd2d6a..542ac7d 100644
> --- a/iwinfo_nl80211.c
> +++ b/iwinfo_nl80211.c
> @@ -1980,6 +1980,71 @@ struct nl80211_scanlist {
>  	int len;
>  };
>  
> +static void nl80211_parse_ht_capa(struct iwinfo_scanlist_entry *e,
> +								  unsigned char *ie,
> +								  int len)
> +{
> +	int capa;
> +	if (len < 2)
> +		return;
> +	e->htmodelist |= IWINFO_HTMODE_HT20;
> +	capa = ie[0] | (ie[8] << 8);
> +	if (capa & (1 << 1))
> +	{
> +		e->htmodelist |= IWINFO_HTMODE_HT40;
> +		if (e->htmodelist & IWINFO_HTMODE_VHT20)
> +			e->htmodelist |= IWINFO_HTMODE_VHT40;
> +	}
> +}
> +static void nl80211_parse_vht_capa(struct iwinfo_scanlist_entry *e,
> +								   unsigned char *ie,
> +								   int len)
> +{
> +	int capa;
> +	if (len < 4)
> +		return;
> +	capa = ie[0] | (ie[1] << 8) | (ie[2] << 16) | (ie[3] << 24);
> +
> +	e->htmodelist |= IWINFO_HTMODE_VHT20;
> +	if (e->htmodelist & IWINFO_HTMODE_HT40)
> +		e->htmodelist |= IWINFO_HTMODE_VHT40;
> +
> +	switch ((capa >> 2) & 3) {
> +	/*case 0: neither 160 nor 80+80 */
> +	case 1:
> +		e->htmodelist |= IWINFO_HTMODE_VHT160;
> +		break;
> +	case 2:
> +		e->htmodelist |= IWINFO_HTMODE_VHT80_80;
> +		break;
> +	}
> +}
> +static void nl80211_parse_vht_oper(struct iwinfo_scanlist_entry *e,
> +								   unsigned char *ie,
> +								   int len)
> +{
> +	int chanwidth;
> +	if (len < 1)
> +		return;
> +	chanwidth = ie[0];
> +
> +	e->htmodelist |= IWINFO_HTMODE_VHT20;
> +	if (e->htmodelist & IWINFO_HTMODE_HT40)
> +		e->htmodelist |= IWINFO_HTMODE_VHT40;
> +
> +	switch (chanwidth) {
> +	/*case 0: 20 or 40 MHz */
> +	case 1:
> +		e->htmodelist |= IWINFO_HTMODE_VHT80;
> +		break;
> +	case 2:
> +		e->htmodelist |= IWINFO_HTMODE_VHT160;
> +		break;
> +	case 3:
> +		e->htmodelist |= IWINFO_HTMODE_VHT80_80;
> +		break;
> +	}
> +}
>  
>  static void nl80211_get_scanlist_ie(struct nlattr **bss,
>                                      struct iwinfo_scanlist_entry *e)
> @@ -1999,11 +2064,23 @@ static void nl80211_get_scanlist_ie(struct nlattr **bss,
>  			e->ssid[len] = 0;
>  			break;
>  
> +		case 45: /* HT Capabilities */
> +			nl80211_parse_ht_capa(e, ie + 2, ie[1]);
> +			break;
> +
>  		case 48: /* RSN */
>  			iwinfo_parse_rsn(&e->crypto, ie + 2, ie[1],
>  			                 IWINFO_CIPHER_CCMP, IWINFO_KMGMT_8021x);
>  			break;
>  
> +		case 191: /* VHT Capabilities */
> +			nl80211_parse_vht_capa(e, ie + 2, ie[1]);
> +			break;
> +
> +		case 192: /* VHT Operation */
> +			nl80211_parse_vht_oper(e, ie + 2, ie[1]);
> +			break;
> +
>  		case 221: /* Vendor */
>  			if (ie[1] >= 4 && !memcmp(ie + 2, ms_oui, 3) && ie[5] == 1)
>  				iwinfo_parse_rsn(&e->crypto, ie + 6, ie[1] - 4,
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20180715/c2b2cab6/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From jo at mein.io  Sun Jul 15 14:59:28 2018
From: jo at mein.io (Jo-Philipp Wich)
Date: Sun, 15 Jul 2018 20:59:28 +0200
Subject: [OpenWrt-Devel] [PATCH 2/2] add channel information for scan
 results
In-Reply-To: <20180713085738.25259-2-yshvedov@wimarksystems.com>
References: <20180713085738.25259-1-yshvedov@wimarksystems.com>
 <20180713085738.25259-2-yshvedov@wimarksystems.com>
Message-ID: <118c587f-ed00-a593-f892-d947b8384ebd@mein.io>

Hi,

comments inline.

~ Jo

> diff --git a/include/iwinfo.h b/include/iwinfo.h
> index c3c25ff..b1b39a1 100644
> --- a/include/iwinfo.h
> +++ b/include/iwinfo.h
> @@ -145,6 +145,24 @@ struct iwinfo_crypto_entry {
>  	uint8_t auth_suites;
>  	uint8_t auth_algs;
>  };
> +struct iwinfo_channel_info_entry {
> +	/**
> +	 * sec_channel_offset - Secondary channel offset for HT40
> +	 *
> +	 * 0 = HT40 disabled,
> +	 * -1 = HT40 enabled, secondary channel below primary,
> +	 * 1 = HT40 enabled, secondary channel above primary
> +	 */
> +	int sec_channel_offset;
> +	/**
> +	 * Center channel for VHT80
> +	 */
> +	int center_idx0;
> +	/**
> +	 * Center channel for VHT160
> +	 */
> +	int center_idx1;
> +};

Do we really need three ints? I think the sec_channel_offset could be an
u8 and the channel indexes u8 or u16 values.

>  
>  struct iwinfo_scanlist_entry {
>  	uint8_t mac[6];
> @@ -154,8 +172,9 @@ struct iwinfo_scanlist_entry {
>  	uint8_t signal;
>  	uint8_t quality;
>  	uint8_t quality_max;
> -    int htmodelist;
> +	int htmodelist;

Please use an u8 here.

>  	struct iwinfo_crypto_entry crypto;
> +	struct iwinfo_channel_info_entry channel_info;
>  };
>  
>  struct iwinfo_country_entry {
> diff --git a/iwinfo_cli.c b/iwinfo_cli.c
> index 2d58020..0d899e0 100644
> --- a/iwinfo_cli.c
> +++ b/iwinfo_cli.c
> @@ -612,6 +612,16 @@ static void print_scanlist(const struct iwinfo_ops *iw, const char *ifname)
>  				if (e->htmodelist & (1 << h))
>  					printf("%s ", IWINFO_HTMODE_NAMES[h]);
>  			printf ("\n");
> +			if (e->channel_info.sec_channel_offset)
> +				printf ("              HT secondary channel is %s\n",
> +						e->channel_info.sec_channel_offset < 0 ? "below" :
> +							"above");
> +			if (e->channel_info.center_idx0)
> +				printf ("              VHT Center IDX0: %d\n",
> +						e->channel_info.center_idx0);
> +			if (e->channel_info.center_idx1)
> +				printf ("              VHT Center IDX1: %d\n",
> +						e->channel_info.center_idx1);
>  		}
>  		printf ("\n");
>  	}
> diff --git a/iwinfo_lua.c b/iwinfo_lua.c
> index 01581a3..bd7f0d3 100644
> --- a/iwinfo_lua.c
> +++ b/iwinfo_lua.c
> @@ -446,6 +446,17 @@ static int iwinfo_L_scanlist(lua_State *L, int (*func)(const char *, char *, int
>  				lua_pushnil(L);
>  			lua_setfield(L, -2, "htmodelist");
>  
> +			lua_pushinteger(L, e->channel_info.sec_channel_offset);
> +			lua_setfield(L, -2, "sec_channel_offset");
> +			if (e->channel_info.center_idx0) {
> +				lua_pushinteger(L, e->channel_info.center_idx0);
> +				lua_setfield(L, -2, "center_idx0");
> +			}
> +			if (e->channel_info.center_idx1) {
> +				lua_pushinteger(L, e->channel_info.center_idx1);
> +				lua_setfield(L, -2, "center_idx1");
> +			}
> +
>  			lua_rawseti(L, -2, x);
>  		}
>  	}
> diff --git a/iwinfo_nl80211.c b/iwinfo_nl80211.c
> index 542ac7d..fb137b2 100644
> --- a/iwinfo_nl80211.c
> +++ b/iwinfo_nl80211.c
> @@ -1996,6 +1996,27 @@ static void nl80211_parse_ht_capa(struct iwinfo_scanlist_entry *e,
>  			e->htmodelist |= IWINFO_HTMODE_VHT40;
>  	}
>  }
> +static void nl80211_parse_ht_oper(struct iwinfo_scanlist_entry *e,
> +								  unsigned char *ie,
> +								  int len)
> +{
> +	uint8_t oper_info;
> +
> +	if (len < 6)
> +		return;
> +	oper_info = ie[1];
> +	switch (oper_info & 3) {
> +	case 0:
> +		e->channel_info.sec_channel_offset = 0;
> +		break;
> +	case 1:
> +		e->channel_info.sec_channel_offset = 1;
> +		break;
> +	case 3:
> +		e->channel_info.sec_channel_offset = -1;
> +		break;
> +	}
> +}
>  static void nl80211_parse_vht_capa(struct iwinfo_scanlist_entry *e,
>  								   unsigned char *ie,
>  								   int len)
> @@ -2024,7 +2045,7 @@ static void nl80211_parse_vht_oper(struct iwinfo_scanlist_entry *e,
>  								   int len)
>  {
>  	int chanwidth;
> -	if (len < 1)
> +	if (len < 3)
>  		return;
>  	chanwidth = ie[0];
>  
> @@ -2036,6 +2057,7 @@ static void nl80211_parse_vht_oper(struct iwinfo_scanlist_entry *e,
>  	/*case 0: 20 or 40 MHz */
>  	case 1:
>  		e->htmodelist |= IWINFO_HTMODE_VHT80;
> +		e->channel_info.center_idx0 = ie[1];
>  		break;
>  	case 2:
>  		e->htmodelist |= IWINFO_HTMODE_VHT160;
> @@ -2044,10 +2066,12 @@ static void nl80211_parse_vht_oper(struct iwinfo_scanlist_entry *e,
>  		e->htmodelist |= IWINFO_HTMODE_VHT80_80;
>  		break;
>  	}
> +	e->channel_info.center_idx0 = ie[1];
> +	e->channel_info.center_idx1 = ie[2];
>  }
>  
>  static void nl80211_get_scanlist_ie(struct nlattr **bss,
> -                                    struct iwinfo_scanlist_entry *e)
> +									struct iwinfo_scanlist_entry *e)
>  {
>  	int ielen = nla_len(bss[NL80211_BSS_INFORMATION_ELEMENTS]);
>  	unsigned char *ie = nla_data(bss[NL80211_BSS_INFORMATION_ELEMENTS]);
> @@ -2073,6 +2097,10 @@ static void nl80211_get_scanlist_ie(struct nlattr **bss,
>  			                 IWINFO_CIPHER_CCMP, IWINFO_KMGMT_8021x);
>  			break;
>  
> +		case 61: /* HT Operation */
> +			nl80211_parse_ht_oper(e, ie + 2, ie[1]);
> +			break;
> +
>  		case 191: /* VHT Capabilities */
>  			nl80211_parse_vht_capa(e, ie + 2, ie[1]);
>  			break;
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20180715/27f258df/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From yshvedov at wimarksystems.com  Mon Jul 16 03:48:54 2018
From: yshvedov at wimarksystems.com (Yury Shvedov)
Date: Mon, 16 Jul 2018 10:48:54 +0300
Subject: [OpenWrt-Devel] [PATCH 1/2] add htmodelist for scan results
In-Reply-To: <03716f5d-e5d5-7c5d-c39a-bf1920f19671@mein.io>
References: <03716f5d-e5d5-7c5d-c39a-bf1920f19671@mein.io>
Message-ID: <20180716074854.11321-1-yshvedov@wimarksystems.com>

The knowledge about HT and VHT modes could be useful for user experience.
So grab it via nl80211 and make it available in both C and LUA APIs,
and show htmodelist on CLI scan results.

Signed-off-by: Yury Shvedov <yshvedov at wimarksystems.com>
---
 include/iwinfo.h |  1 +
 iwinfo_cli.c     | 13 ++++++--
 iwinfo_lua.c     | 14 ++++++++-
 iwinfo_nl80211.c | 77 ++++++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 102 insertions(+), 3 deletions(-)

diff --git a/include/iwinfo.h b/include/iwinfo.h
index 929f697..b3f5470 100644
--- a/include/iwinfo.h
+++ b/include/iwinfo.h
@@ -154,6 +154,7 @@ struct iwinfo_scanlist_entry {
 	uint8_t signal;
 	uint8_t quality;
 	uint8_t quality_max;
+    uint16_t htmodelist;
 	struct iwinfo_crypto_entry crypto;
 };
 
diff --git a/iwinfo_cli.c b/iwinfo_cli.c
index 49c9035..0429fbc 100644
--- a/iwinfo_cli.c
+++ b/iwinfo_cli.c
@@ -572,7 +572,7 @@ static void print_info(const struct iwinfo_ops *iw, const char *ifname)
 
 static void print_scanlist(const struct iwinfo_ops *iw, const char *ifname)
 {
-	int i, x, len;
+	int i, h, x, len;
 	char buf[IWINFO_BUFSIZE];
 	struct iwinfo_scanlist_entry *e;
 
@@ -603,8 +603,17 @@ static void print_scanlist(const struct iwinfo_ops *iw, const char *ifname)
 			format_signal(e->signal - 0x100),
 			format_quality(e->quality),
 			format_quality_max(e->quality_max));
-		printf("          Encryption: %s\n\n",
+		printf("          Encryption: %s\n",
 			format_encryption(&e->crypto));
+		if (e->htmodelist)
+		{
+			printf("          HT Capabilities: ");
+			for (h = 0; h < ARRAY_SIZE(IWINFO_HTMODE_NAMES); h++)
+				if (e->htmodelist & (1 << h))
+					printf("%s ", IWINFO_HTMODE_NAMES[h]);
+			printf("\n");
+		}
+		printf("\n");
 	}
 }
 
diff --git a/iwinfo_lua.c b/iwinfo_lua.c
index eebab8e..303fd08 100644
--- a/iwinfo_lua.c
+++ b/iwinfo_lua.c
@@ -378,7 +378,7 @@ static int iwinfo_L_txpwrlist(lua_State *L, int (*func)(const char *, char *, in
 /* Wrapper for scan list */
 static int iwinfo_L_scanlist(lua_State *L, int (*func)(const char *, char *, int *))
 {
-	int i, x, len = 0;
+	int i, x, h, len = 0;
 	char rv[IWINFO_BUFSIZE];
 	char macstr[18];
 	const char *ifname = luaL_checkstring(L, 1);
@@ -432,6 +432,18 @@ static int iwinfo_L_scanlist(lua_State *L, int (*func)(const char *, char *, int
 			iwinfo_L_cryptotable(L, &e->crypto);
 			lua_setfield(L, -2, "encryption");
 
+			/* HT Modes */
+			if (e->htmodelist)
+			{
+				lua_newtable(L);
+				for (h = 0; h < ARRAY_SIZE(IWINFO_HTMODE_NAMES); h++)
+				{
+					lua_pushboolean(L, e->htmodelist & (1 << h));
+					lua_setfield(L, -2, IWINFO_HTMODE_NAMES[h]);
+				}
+                lua_setfield(L, -2, "htmodelist");
+			}
+
 			lua_rawseti(L, -2, x);
 		}
 	}
diff --git a/iwinfo_nl80211.c b/iwinfo_nl80211.c
index ecd2d6a..542ac7d 100644
--- a/iwinfo_nl80211.c
+++ b/iwinfo_nl80211.c
@@ -1980,6 +1980,71 @@ struct nl80211_scanlist {
 	int len;
 };
 
+static void nl80211_parse_ht_capa(struct iwinfo_scanlist_entry *e,
+								  unsigned char *ie,
+								  int len)
+{
+	int capa;
+	if (len < 2)
+		return;
+	e->htmodelist |= IWINFO_HTMODE_HT20;
+	capa = ie[0] | (ie[8] << 8);
+	if (capa & (1 << 1))
+	{
+		e->htmodelist |= IWINFO_HTMODE_HT40;
+		if (e->htmodelist & IWINFO_HTMODE_VHT20)
+			e->htmodelist |= IWINFO_HTMODE_VHT40;
+	}
+}
+static void nl80211_parse_vht_capa(struct iwinfo_scanlist_entry *e,
+								   unsigned char *ie,
+								   int len)
+{
+	int capa;
+	if (len < 4)
+		return;
+	capa = ie[0] | (ie[1] << 8) | (ie[2] << 16) | (ie[3] << 24);
+
+	e->htmodelist |= IWINFO_HTMODE_VHT20;
+	if (e->htmodelist & IWINFO_HTMODE_HT40)
+		e->htmodelist |= IWINFO_HTMODE_VHT40;
+
+	switch ((capa >> 2) & 3) {
+	/*case 0: neither 160 nor 80+80 */
+	case 1:
+		e->htmodelist |= IWINFO_HTMODE_VHT160;
+		break;
+	case 2:
+		e->htmodelist |= IWINFO_HTMODE_VHT80_80;
+		break;
+	}
+}
+static void nl80211_parse_vht_oper(struct iwinfo_scanlist_entry *e,
+								   unsigned char *ie,
+								   int len)
+{
+	int chanwidth;
+	if (len < 1)
+		return;
+	chanwidth = ie[0];
+
+	e->htmodelist |= IWINFO_HTMODE_VHT20;
+	if (e->htmodelist & IWINFO_HTMODE_HT40)
+		e->htmodelist |= IWINFO_HTMODE_VHT40;
+
+	switch (chanwidth) {
+	/*case 0: 20 or 40 MHz */
+	case 1:
+		e->htmodelist |= IWINFO_HTMODE_VHT80;
+		break;
+	case 2:
+		e->htmodelist |= IWINFO_HTMODE_VHT160;
+		break;
+	case 3:
+		e->htmodelist |= IWINFO_HTMODE_VHT80_80;
+		break;
+	}
+}
 
 static void nl80211_get_scanlist_ie(struct nlattr **bss,
                                     struct iwinfo_scanlist_entry *e)
@@ -1999,11 +2064,23 @@ static void nl80211_get_scanlist_ie(struct nlattr **bss,
 			e->ssid[len] = 0;
 			break;
 
+		case 45: /* HT Capabilities */
+			nl80211_parse_ht_capa(e, ie + 2, ie[1]);
+			break;
+
 		case 48: /* RSN */
 			iwinfo_parse_rsn(&e->crypto, ie + 2, ie[1],
 			                 IWINFO_CIPHER_CCMP, IWINFO_KMGMT_8021x);
 			break;
 
+		case 191: /* VHT Capabilities */
+			nl80211_parse_vht_capa(e, ie + 2, ie[1]);
+			break;
+
+		case 192: /* VHT Operation */
+			nl80211_parse_vht_oper(e, ie + 2, ie[1]);
+			break;
+
 		case 221: /* Vendor */
 			if (ie[1] >= 4 && !memcmp(ie + 2, ms_oui, 3) && ie[5] == 1)
 				iwinfo_parse_rsn(&e->crypto, ie + 6, ie[1] - 4,
-- 
2.17.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From yshvedov at wimarksystems.com  Mon Jul 16 03:49:45 2018
From: yshvedov at wimarksystems.com (Yury Shvedov)
Date: Mon, 16 Jul 2018 10:49:45 +0300
Subject: [OpenWrt-Devel] [PATCH 2/2] add channel information for scan results
In-Reply-To: <118c587f-ed00-a593-f892-d947b8384ebd@mein.io>
References: <118c587f-ed00-a593-f892-d947b8384ebd@mein.io>
Message-ID: <20180716074945.11422-1-yshvedov@wimarksystems.com>

Besides channel number the secondary channel for HT40 and center idx0
and idx1 gives full understanding about real channel position and width
on the spectra. So grab it via nl80211 and make it available in both C
and LUA APIs, and show detailed channel information on CLI scan results.

Signed-off-by: Yury Shvedov <yshvedov at wimarksystems.com>
---
 include/iwinfo.h | 19 +++++++++++++++++++
 iwinfo_cli.c     | 10 ++++++++++
 iwinfo_lua.c     | 11 +++++++++++
 iwinfo_nl80211.c | 32 ++++++++++++++++++++++++++++++--
 4 files changed, 70 insertions(+), 2 deletions(-)

diff --git a/include/iwinfo.h b/include/iwinfo.h
index b3f5470..1559837 100644
--- a/include/iwinfo.h
+++ b/include/iwinfo.h
@@ -145,6 +145,24 @@ struct iwinfo_crypto_entry {
 	uint8_t auth_suites;
 	uint8_t auth_algs;
 };
+struct iwinfo_channel_info_entry {
+	/**
+	 * sec_channel_offset - Secondary channel offset for HT40
+	 *
+	 * 0 = HT40 disabled,
+	 * -1 = HT40 enabled, secondary channel below primary,
+	 * 1 = HT40 enabled, secondary channel above primary
+	 */
+	int8_t sec_channel_offset;
+	/**
+	 * Center channel for VHT80
+	 */
+	uint8_t center_idx0;
+	/**
+	 * Center channel for VHT160
+	 */
+	uint8_t center_idx1;
+};
 
 struct iwinfo_scanlist_entry {
 	uint8_t mac[6];
@@ -156,6 +174,7 @@ struct iwinfo_scanlist_entry {
 	uint8_t quality_max;
     uint16_t htmodelist;
 	struct iwinfo_crypto_entry crypto;
+	struct iwinfo_channel_info_entry channel_info;
 };
 
 struct iwinfo_country_entry {
diff --git a/iwinfo_cli.c b/iwinfo_cli.c
index 0429fbc..7bd2da2 100644
--- a/iwinfo_cli.c
+++ b/iwinfo_cli.c
@@ -612,6 +612,16 @@ static void print_scanlist(const struct iwinfo_ops *iw, const char *ifname)
 				if (e->htmodelist & (1 << h))
 					printf("%s ", IWINFO_HTMODE_NAMES[h]);
 			printf("\n");
+			if (e->channel_info.sec_channel_offset)
+				printf("              HT secondary channel is %s\n",
+						e->channel_info.sec_channel_offset < 0 ? "below" :
+							"above");
+			if (e->channel_info.center_idx0)
+				printf("              VHT Center IDX0: %d\n",
+						e->channel_info.center_idx0);
+			if (e->channel_info.center_idx1)
+				printf("              VHT Center IDX1: %d\n",
+						e->channel_info.center_idx1);
 		}
 		printf("\n");
 	}
diff --git a/iwinfo_lua.c b/iwinfo_lua.c
index 303fd08..9f95017 100644
--- a/iwinfo_lua.c
+++ b/iwinfo_lua.c
@@ -444,6 +444,17 @@ static int iwinfo_L_scanlist(lua_State *L, int (*func)(const char *, char *, int
                 lua_setfield(L, -2, "htmodelist");
 			}
 
+			lua_pushinteger(L, e->channel_info.sec_channel_offset);
+			lua_setfield(L, -2, "sec_channel_offset");
+			if (e->channel_info.center_idx0) {
+				lua_pushinteger(L, e->channel_info.center_idx0);
+				lua_setfield(L, -2, "center_idx0");
+			}
+			if (e->channel_info.center_idx1) {
+				lua_pushinteger(L, e->channel_info.center_idx1);
+				lua_setfield(L, -2, "center_idx1");
+			}
+
 			lua_rawseti(L, -2, x);
 		}
 	}
diff --git a/iwinfo_nl80211.c b/iwinfo_nl80211.c
index 542ac7d..fb137b2 100644
--- a/iwinfo_nl80211.c
+++ b/iwinfo_nl80211.c
@@ -1996,6 +1996,27 @@ static void nl80211_parse_ht_capa(struct iwinfo_scanlist_entry *e,
 			e->htmodelist |= IWINFO_HTMODE_VHT40;
 	}
 }
+static void nl80211_parse_ht_oper(struct iwinfo_scanlist_entry *e,
+								  unsigned char *ie,
+								  int len)
+{
+	uint8_t oper_info;
+
+	if (len < 6)
+		return;
+	oper_info = ie[1];
+	switch (oper_info & 3) {
+	case 0:
+		e->channel_info.sec_channel_offset = 0;
+		break;
+	case 1:
+		e->channel_info.sec_channel_offset = 1;
+		break;
+	case 3:
+		e->channel_info.sec_channel_offset = -1;
+		break;
+	}
+}
 static void nl80211_parse_vht_capa(struct iwinfo_scanlist_entry *e,
 								   unsigned char *ie,
 								   int len)
@@ -2024,7 +2045,7 @@ static void nl80211_parse_vht_oper(struct iwinfo_scanlist_entry *e,
 								   int len)
 {
 	int chanwidth;
-	if (len < 1)
+	if (len < 3)
 		return;
 	chanwidth = ie[0];
 
@@ -2036,6 +2057,7 @@ static void nl80211_parse_vht_oper(struct iwinfo_scanlist_entry *e,
 	/*case 0: 20 or 40 MHz */
 	case 1:
 		e->htmodelist |= IWINFO_HTMODE_VHT80;
+		e->channel_info.center_idx0 = ie[1];
 		break;
 	case 2:
 		e->htmodelist |= IWINFO_HTMODE_VHT160;
@@ -2044,10 +2066,12 @@ static void nl80211_parse_vht_oper(struct iwinfo_scanlist_entry *e,
 		e->htmodelist |= IWINFO_HTMODE_VHT80_80;
 		break;
 	}
+	e->channel_info.center_idx0 = ie[1];
+	e->channel_info.center_idx1 = ie[2];
 }
 
 static void nl80211_get_scanlist_ie(struct nlattr **bss,
-                                    struct iwinfo_scanlist_entry *e)
+									struct iwinfo_scanlist_entry *e)
 {
 	int ielen = nla_len(bss[NL80211_BSS_INFORMATION_ELEMENTS]);
 	unsigned char *ie = nla_data(bss[NL80211_BSS_INFORMATION_ELEMENTS]);
@@ -2073,6 +2097,10 @@ static void nl80211_get_scanlist_ie(struct nlattr **bss,
 			                 IWINFO_CIPHER_CCMP, IWINFO_KMGMT_8021x);
 			break;
 
+		case 61: /* HT Operation */
+			nl80211_parse_ht_oper(e, ie + 2, ie[1]);
+			break;
+
 		case 191: /* VHT Capabilities */
 			nl80211_parse_vht_capa(e, ie + 2, ie[1]);
 			break;
-- 
2.17.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From yshvedov at wimarksystems.com  Mon Jul 16 04:28:49 2018
From: yshvedov at wimarksystems.com (Yury Shvedov)
Date: Mon, 16 Jul 2018 11:28:49 +0300
Subject: [OpenWrt-Devel] [PATCH 2/2] add channel information for scan results
In-Reply-To: <20180716074945.11422-1-yshvedov@wimarksystems.com>
References: <20180716074945.11422-1-yshvedov@wimarksystems.com>
Message-ID: <cae97ed2d836e67dba7e2926dce5cd6b6a9b6908.1531729530.git.yshvedov@wimarksystems.com>

Sorry, some mistakes in previous patch.

Besides channel number the secondary channel for HT40 and center idx0
and idx1 gives full understanding about real channel position and width
on the spectra. So grab it via nl80211 and make it available in both C
and LUA APIs, and show detailed channel information on CLI scan results.

Signed-off-by: Yury Shvedov <yshvedov at wimarksystems.com>
---
 include/iwinfo.h | 19 +++++++++++++++++++
 iwinfo_cli.c     | 10 ++++++++++
 iwinfo_lua.c     | 11 +++++++++++
 iwinfo_nl80211.c | 32 ++++++++++++++++++++++++++++++--
 4 files changed, 70 insertions(+), 2 deletions(-)

diff --git a/include/iwinfo.h b/include/iwinfo.h
index b3f5470..1559837 100644
--- a/include/iwinfo.h
+++ b/include/iwinfo.h
@@ -145,6 +145,24 @@ struct iwinfo_crypto_entry {
 	uint8_t auth_suites;
 	uint8_t auth_algs;
 };
+struct iwinfo_channel_info_entry {
+	/**
+	 * sec_channel_offset - Secondary channel offset for HT40
+	 *
+	 * 0 = HT40 disabled,
+	 * -1 = HT40 enabled, secondary channel below primary,
+	 * 1 = HT40 enabled, secondary channel above primary
+	 */
+	int8_t sec_channel_offset;
+	/**
+	 * Center channel for VHT80
+	 */
+	uint8_t center_idx0;
+	/**
+	 * Center channel for VHT160
+	 */
+	uint8_t center_idx1;
+};
 
 struct iwinfo_scanlist_entry {
 	uint8_t mac[6];
@@ -156,6 +174,7 @@ struct iwinfo_scanlist_entry {
 	uint8_t quality_max;
     uint16_t htmodelist;
 	struct iwinfo_crypto_entry crypto;
+	struct iwinfo_channel_info_entry channel_info;
 };
 
 struct iwinfo_country_entry {
diff --git a/iwinfo_cli.c b/iwinfo_cli.c
index 0429fbc..7f897c1 100644
--- a/iwinfo_cli.c
+++ b/iwinfo_cli.c
@@ -612,6 +612,16 @@ static void print_scanlist(const struct iwinfo_ops *iw, const char *ifname)
 				if (e->htmodelist & (1 << h))
 					printf("%s ", IWINFO_HTMODE_NAMES[h]);
 			printf("\n");
+			if (e->channel_info.sec_channel_offset)
+				printf("              HT secondary channel is %s\n",
+						e->channel_info.sec_channel_offset < 0 ? "below" :
+							"above");
+			if (e->channel_info.center_idx0)
+				printf("              VHT Center IDX0: %hhu\n",
+						e->channel_info.center_idx0);
+			if (e->channel_info.center_idx1)
+				printf("              VHT Center IDX1: %hhu\n",
+						e->channel_info.center_idx1);
 		}
 		printf("\n");
 	}
diff --git a/iwinfo_lua.c b/iwinfo_lua.c
index 303fd08..9f95017 100644
--- a/iwinfo_lua.c
+++ b/iwinfo_lua.c
@@ -444,6 +444,17 @@ static int iwinfo_L_scanlist(lua_State *L, int (*func)(const char *, char *, int
                 lua_setfield(L, -2, "htmodelist");
 			}
 
+			lua_pushinteger(L, e->channel_info.sec_channel_offset);
+			lua_setfield(L, -2, "sec_channel_offset");
+			if (e->channel_info.center_idx0) {
+				lua_pushinteger(L, e->channel_info.center_idx0);
+				lua_setfield(L, -2, "center_idx0");
+			}
+			if (e->channel_info.center_idx1) {
+				lua_pushinteger(L, e->channel_info.center_idx1);
+				lua_setfield(L, -2, "center_idx1");
+			}
+
 			lua_rawseti(L, -2, x);
 		}
 	}
diff --git a/iwinfo_nl80211.c b/iwinfo_nl80211.c
index 542ac7d..fb137b2 100644
--- a/iwinfo_nl80211.c
+++ b/iwinfo_nl80211.c
@@ -1996,6 +1996,27 @@ static void nl80211_parse_ht_capa(struct iwinfo_scanlist_entry *e,
 			e->htmodelist |= IWINFO_HTMODE_VHT40;
 	}
 }
+static void nl80211_parse_ht_oper(struct iwinfo_scanlist_entry *e,
+								  unsigned char *ie,
+								  int len)
+{
+	uint8_t oper_info;
+
+	if (len < 6)
+		return;
+	oper_info = ie[1];
+	switch (oper_info & 3) {
+	case 0:
+		e->channel_info.sec_channel_offset = 0;
+		break;
+	case 1:
+		e->channel_info.sec_channel_offset = 1;
+		break;
+	case 3:
+		e->channel_info.sec_channel_offset = -1;
+		break;
+	}
+}
 static void nl80211_parse_vht_capa(struct iwinfo_scanlist_entry *e,
 								   unsigned char *ie,
 								   int len)
@@ -2024,7 +2045,7 @@ static void nl80211_parse_vht_oper(struct iwinfo_scanlist_entry *e,
 								   int len)
 {
 	int chanwidth;
-	if (len < 1)
+	if (len < 3)
 		return;
 	chanwidth = ie[0];
 
@@ -2036,6 +2057,7 @@ static void nl80211_parse_vht_oper(struct iwinfo_scanlist_entry *e,
 	/*case 0: 20 or 40 MHz */
 	case 1:
 		e->htmodelist |= IWINFO_HTMODE_VHT80;
+		e->channel_info.center_idx0 = ie[1];
 		break;
 	case 2:
 		e->htmodelist |= IWINFO_HTMODE_VHT160;
@@ -2044,10 +2066,12 @@ static void nl80211_parse_vht_oper(struct iwinfo_scanlist_entry *e,
 		e->htmodelist |= IWINFO_HTMODE_VHT80_80;
 		break;
 	}
+	e->channel_info.center_idx0 = ie[1];
+	e->channel_info.center_idx1 = ie[2];
 }
 
 static void nl80211_get_scanlist_ie(struct nlattr **bss,
-                                    struct iwinfo_scanlist_entry *e)
+									struct iwinfo_scanlist_entry *e)
 {
 	int ielen = nla_len(bss[NL80211_BSS_INFORMATION_ELEMENTS]);
 	unsigned char *ie = nla_data(bss[NL80211_BSS_INFORMATION_ELEMENTS]);
@@ -2073,6 +2097,10 @@ static void nl80211_get_scanlist_ie(struct nlattr **bss,
 			                 IWINFO_CIPHER_CCMP, IWINFO_KMGMT_8021x);
 			break;
 
+		case 61: /* HT Operation */
+			nl80211_parse_ht_oper(e, ie + 2, ie[1]);
+			break;
+
 		case 191: /* VHT Capabilities */
 			nl80211_parse_vht_capa(e, ie + 2, ie[1]);
 			break;
-- 
2.17.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From john at phrozen.org  Mon Jul 16 04:33:50 2018
From: john at phrozen.org (John Crispin)
Date: Mon, 16 Jul 2018 10:33:50 +0200
Subject: [OpenWrt-Devel] [PATCH] netifd: make sure the vlan ifnmae fits into
 the buffer
Message-ID: <20180716083350.15696-1-john@phrozen.org>

Signed-off-by: John Crispin <john at phrozen.org>
---
 vlan.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/vlan.c b/vlan.c
index 067f624..43526d8 100644
--- a/vlan.c
+++ b/vlan.c
@@ -104,6 +104,9 @@ static struct device *get_vlan_device(struct device *dev, int id, bool create)
 	struct vlan_device *vldev;
 	struct device_user *dep;
 
+	if (strlen(dev->ifname) > (IFNAMSIZ - 6))
+		return -ENAMETOOLONG;
+
 	/* look for an existing interface before creating a new one */
 	list_for_each_entry(dep, &dev->users.list, list.list) {
 		if (dep->cb != vlan_dev_cb)
-- 
2.11.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From zajec5 at gmail.com  Mon Jul 16 05:00:39 2018
From: zajec5 at gmail.com (=?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?=)
Date: Mon, 16 Jul 2018 11:00:39 +0200
Subject: [OpenWrt-Devel] [PATCH] netifd: make sure the vlan ifnmae fits
 into the buffer
In-Reply-To: <20180716083350.15696-1-john@phrozen.org>
References: <20180716083350.15696-1-john@phrozen.org>
Message-ID: <CACna6rztNG6+Ad6wmn4=ScDR+s79wAn7PeSwB4Z456H8UwzwNQ@mail.gmail.com>

Some nitpicking ;)

s/ifnmae/ifname/

On Mon, 16 Jul 2018 at 10:34, John Crispin <john at phrozen.org> wrote:
> Signed-off-by: John Crispin <john at phrozen.org>
> ---
>  vlan.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/vlan.c b/vlan.c
> index 067f624..43526d8 100644
> --- a/vlan.c
> +++ b/vlan.c
> @@ -104,6 +104,9 @@ static struct device *get_vlan_device(struct device *dev, int id, bool create)
>         struct vlan_device *vldev;
>         struct device_user *dep;
>
> +       if (strlen(dev->ifname) > (IFNAMSIZ - 6))
> +               return -ENAMETOOLONG;

You don't need braces around IFNAMSIZ - 6.

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From zajec5 at gmail.com  Mon Jul 16 05:14:12 2018
From: zajec5 at gmail.com (=?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?=)
Date: Mon, 16 Jul 2018 11:14:12 +0200
Subject: [OpenWrt-Devel] [PATCH 2/2] add channel information for scan
 results
In-Reply-To: <cae97ed2d836e67dba7e2926dce5cd6b6a9b6908.1531729530.git.yshvedov@wimarksystems.com>
References: <20180716074945.11422-1-yshvedov@wimarksystems.com>
 <cae97ed2d836e67dba7e2926dce5cd6b6a9b6908.1531729530.git.yshvedov@wimarksystems.com>
Message-ID: <e2f67380-3fdd-c10c-19fd-290fef850460@gmail.com>

On 16.07.2018 10:28, Yury Shvedov wrote:
> Sorry, some mistakes in previous patch.

Put your comments between tear line & the diff. They shouldn't go into
the repo history (log).


> Besides channel number the secondary channel for HT40 and center idx0
> and idx1 gives full understanding about real channel position and width
> on the spectra. So grab it via nl80211 and make it available in both C
> and LUA APIs, and show detailed channel information on CLI scan results.
> 
> Signed-off-by: Yury Shvedov <yshvedov at wimarksystems.com>
> ---
>   include/iwinfo.h | 19 +++++++++++++++++++
>   iwinfo_cli.c     | 10 ++++++++++
>   iwinfo_lua.c     | 11 +++++++++++
>   iwinfo_nl80211.c | 32 ++++++++++++++++++++++++++++++--
>   4 files changed, 70 insertions(+), 2 deletions(-)
> 
> diff --git a/include/iwinfo.h b/include/iwinfo.h
> index b3f5470..1559837 100644
> --- a/include/iwinfo.h
> +++ b/include/iwinfo.h
> @@ -145,6 +145,24 @@ struct iwinfo_crypto_entry {
>   	uint8_t auth_suites;
>   	uint8_t auth_algs;
>   };
> +struct iwinfo_channel_info_entry {
> +	/**
> +	 * sec_channel_offset - Secondary channel offset for HT40
> +	 *
> +	 * 0 = HT40 disabled,
> +	 * -1 = HT40 enabled, secondary channel below primary,
> +	 * 1 = HT40 enabled, secondary channel above primary
> +	 */
> +	int8_t sec_channel_offset;
> +	/**
> +	 * Center channel for VHT80
> +	 */
> +	uint8_t center_idx0;
> +	/**
> +	 * Center channel for VHT160
> +	 */
> +	uint8_t center_idx1;
> +};

Why 3 different fields for that (one per bandwidth)? It seems a single
field would work.

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From yshvedov at wimarksystems.com  Mon Jul 16 05:32:10 2018
From: yshvedov at wimarksystems.com (Yury Shvedov)
Date: Mon, 16 Jul 2018 12:32:10 +0300
Subject: [OpenWrt-Devel] [PATCH 2/2] add channel information for scan results
In-Reply-To: <e2f67380-3fdd-c10c-19fd-290fef850460@gmail.com>
References: <e2f67380-3fdd-c10c-19fd-290fef850460@gmail.com>
Message-ID: <cae97ed2d836e67dba7e2926dce5cd6b6a9b6908.1531733442.git.yshvedov@wimarksystems.com>

Besides channel number the secondary channel for HT40 and center idx0
and idx1 gives full understanding about real channel position and width
on the spectra. So grab it via nl80211 and make it available in both C
and LUA APIs, and show detailed channel information on CLI scan results.

Signed-off-by: Yury Shvedov <yshvedov at wimarksystems.com>
---

Sorry, I do not use git mailer frequently. Is this a right place for
comments?

 include/iwinfo.h | 19 +++++++++++++++++++
 iwinfo_cli.c     | 10 ++++++++++
 iwinfo_lua.c     | 11 +++++++++++
 iwinfo_nl80211.c | 32 ++++++++++++++++++++++++++++++--
 4 files changed, 70 insertions(+), 2 deletions(-)

diff --git a/include/iwinfo.h b/include/iwinfo.h
index b3f5470..1559837 100644
--- a/include/iwinfo.h
+++ b/include/iwinfo.h
@@ -145,6 +145,24 @@ struct iwinfo_crypto_entry {
 	uint8_t auth_suites;
 	uint8_t auth_algs;
 };
+struct iwinfo_channel_info_entry {
+	/**
+	 * sec_channel_offset - Secondary channel offset for HT40
+	 *
+	 * 0 = HT40 disabled,
+	 * -1 = HT40 enabled, secondary channel below primary,
+	 * 1 = HT40 enabled, secondary channel above primary
+	 */
+	int8_t sec_channel_offset;
+	/**
+	 * Center channel for VHT80
+	 */
+	uint8_t center_idx0;
+	/**
+	 * Center channel for VHT160
+	 */
+	uint8_t center_idx1;
+};
 
 struct iwinfo_scanlist_entry {
 	uint8_t mac[6];
@@ -156,6 +174,7 @@ struct iwinfo_scanlist_entry {
 	uint8_t quality_max;
     uint16_t htmodelist;
 	struct iwinfo_crypto_entry crypto;
+	struct iwinfo_channel_info_entry channel_info;
 };
 
 struct iwinfo_country_entry {
diff --git a/iwinfo_cli.c b/iwinfo_cli.c
index 0429fbc..7f897c1 100644
--- a/iwinfo_cli.c
+++ b/iwinfo_cli.c
@@ -612,6 +612,16 @@ static void print_scanlist(const struct iwinfo_ops *iw, const char *ifname)
 				if (e->htmodelist & (1 << h))
 					printf("%s ", IWINFO_HTMODE_NAMES[h]);
 			printf("\n");
+			if (e->channel_info.sec_channel_offset)
+				printf("              HT secondary channel is %s\n",
+						e->channel_info.sec_channel_offset < 0 ? "below" :
+							"above");
+			if (e->channel_info.center_idx0)
+				printf("              VHT Center IDX0: %hhu\n",
+						e->channel_info.center_idx0);
+			if (e->channel_info.center_idx1)
+				printf("              VHT Center IDX1: %hhu\n",
+						e->channel_info.center_idx1);
 		}
 		printf("\n");
 	}
diff --git a/iwinfo_lua.c b/iwinfo_lua.c
index 303fd08..9f95017 100644
--- a/iwinfo_lua.c
+++ b/iwinfo_lua.c
@@ -444,6 +444,17 @@ static int iwinfo_L_scanlist(lua_State *L, int (*func)(const char *, char *, int
                 lua_setfield(L, -2, "htmodelist");
 			}
 
+			lua_pushinteger(L, e->channel_info.sec_channel_offset);
+			lua_setfield(L, -2, "sec_channel_offset");
+			if (e->channel_info.center_idx0) {
+				lua_pushinteger(L, e->channel_info.center_idx0);
+				lua_setfield(L, -2, "center_idx0");
+			}
+			if (e->channel_info.center_idx1) {
+				lua_pushinteger(L, e->channel_info.center_idx1);
+				lua_setfield(L, -2, "center_idx1");
+			}
+
 			lua_rawseti(L, -2, x);
 		}
 	}
diff --git a/iwinfo_nl80211.c b/iwinfo_nl80211.c
index 542ac7d..fb137b2 100644
--- a/iwinfo_nl80211.c
+++ b/iwinfo_nl80211.c
@@ -1996,6 +1996,27 @@ static void nl80211_parse_ht_capa(struct iwinfo_scanlist_entry *e,
 			e->htmodelist |= IWINFO_HTMODE_VHT40;
 	}
 }
+static void nl80211_parse_ht_oper(struct iwinfo_scanlist_entry *e,
+								  unsigned char *ie,
+								  int len)
+{
+	uint8_t oper_info;
+
+	if (len < 6)
+		return;
+	oper_info = ie[1];
+	switch (oper_info & 3) {
+	case 0:
+		e->channel_info.sec_channel_offset = 0;
+		break;
+	case 1:
+		e->channel_info.sec_channel_offset = 1;
+		break;
+	case 3:
+		e->channel_info.sec_channel_offset = -1;
+		break;
+	}
+}
 static void nl80211_parse_vht_capa(struct iwinfo_scanlist_entry *e,
 								   unsigned char *ie,
 								   int len)
@@ -2024,7 +2045,7 @@ static void nl80211_parse_vht_oper(struct iwinfo_scanlist_entry *e,
 								   int len)
 {
 	int chanwidth;
-	if (len < 1)
+	if (len < 3)
 		return;
 	chanwidth = ie[0];
 
@@ -2036,6 +2057,7 @@ static void nl80211_parse_vht_oper(struct iwinfo_scanlist_entry *e,
 	/*case 0: 20 or 40 MHz */
 	case 1:
 		e->htmodelist |= IWINFO_HTMODE_VHT80;
+		e->channel_info.center_idx0 = ie[1];
 		break;
 	case 2:
 		e->htmodelist |= IWINFO_HTMODE_VHT160;
@@ -2044,10 +2066,12 @@ static void nl80211_parse_vht_oper(struct iwinfo_scanlist_entry *e,
 		e->htmodelist |= IWINFO_HTMODE_VHT80_80;
 		break;
 	}
+	e->channel_info.center_idx0 = ie[1];
+	e->channel_info.center_idx1 = ie[2];
 }
 
 static void nl80211_get_scanlist_ie(struct nlattr **bss,
-                                    struct iwinfo_scanlist_entry *e)
+									struct iwinfo_scanlist_entry *e)
 {
 	int ielen = nla_len(bss[NL80211_BSS_INFORMATION_ELEMENTS]);
 	unsigned char *ie = nla_data(bss[NL80211_BSS_INFORMATION_ELEMENTS]);
@@ -2073,6 +2097,10 @@ static void nl80211_get_scanlist_ie(struct nlattr **bss,
 			                 IWINFO_CIPHER_CCMP, IWINFO_KMGMT_8021x);
 			break;
 
+		case 61: /* HT Operation */
+			nl80211_parse_ht_oper(e, ie + 2, ie[1]);
+			break;
+
 		case 191: /* VHT Capabilities */
 			nl80211_parse_vht_capa(e, ie + 2, ie[1]);
 			break;
-- 
2.17.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From yshvedov at wimarksystems.com  Mon Jul 16 08:15:10 2018
From: yshvedov at wimarksystems.com (Yury Shvedov)
Date: Mon, 16 Jul 2018 15:15:10 +0300
Subject: [OpenWrt-Devel] [PATCH] hostapd: process all CSA parameters
Message-ID: <20180716121510.10904-1-yshvedov@wimarksystems.com>

This adds processing of all CSA arguments from ubus switch_chan request
in the same manner as in the control interface API.

Signed-off-by: Yury Shvedov <yshvedov at wimarksystems.com>
---
 .../services/hostapd/src/src/ap/ubus.c        | 37 ++++++++++++++++---
 1 file changed, 31 insertions(+), 6 deletions(-)

diff --git a/package/network/services/hostapd/src/src/ap/ubus.c b/package/network/services/hostapd/src/src/ap/ubus.c
index 37a20ed774..4ce4ca5742 100644
--- a/package/network/services/hostapd/src/src/ap/ubus.c
+++ b/package/network/services/hostapd/src/src/ap/ubus.c
@@ -367,16 +367,26 @@ hostapd_bss_update_beacon(struct ubus_context *ctx, struct ubus_object *obj,
 enum {
 	CSA_FREQ,
 	CSA_BCN_COUNT,
+	CSA_CENTER_FREQ1,
+	CSA_CENTER_FREQ2,
+	CSA_BANDWIDTH,
+	CSA_SEC_CHANNEL_OFFSET,
+	CSA_HT,
+	CSA_VHT,
+	CSA_BLOCK_TX,
 	__CSA_MAX
 };
 
 static const struct blobmsg_policy csa_policy[__CSA_MAX] = {
-	/*
-	 * for now, frequency and beacon count are enough, add more
-	 * parameters on demand
-	 */
 	[CSA_FREQ] = { "freq", BLOBMSG_TYPE_INT32 },
 	[CSA_BCN_COUNT] = { "bcn_count", BLOBMSG_TYPE_INT32 },
+	[CSA_CENTER_FREQ1] = { "center_freq1", BLOBMSG_TYPE_INT32 },
+	[CSA_CENTER_FREQ2] = { "center_freq2", BLOBMSG_TYPE_INT32 },
+	[CSA_BANDWIDTH] = { "bandwidth", BLOBMSG_TYPE_INT32 },
+	[CSA_SEC_CHANNEL_OFFSET] = { "sec_channel_offset", BLOBMSG_TYPE_INT32 },
+	[CSA_HT] = { "ht", BLOBMSG_TYPE_BOOL },
+	[CSA_VHT] = { "vht", BLOBMSG_TYPE_BOOL },
+	[CSA_BLOCK_TX] = { "block_tx", BLOBMSG_TYPE_BOOL },
 };
 
 #ifdef NEED_AP_MLME
@@ -396,12 +406,27 @@ hostapd_switch_chan(struct ubus_context *ctx, struct ubus_object *obj,
 
 	memset(&css, 0, sizeof(css));
 	css.freq_params.freq = blobmsg_get_u32(tb[CSA_FREQ]);
-	if (tb[CSA_BCN_COUNT])
-		css.cs_count = blobmsg_get_u32(tb[CSA_BCN_COUNT]);
+
+#define SET_CSA_SETTING(name, field, type) \
+	do { \
+		if (tb[name]) \
+			css.field = blobmsg_get_ ## type(tb[name]); \
+	} while(0)
+
+	SET_CSA_SETTING(CSA_BCN_COUNT, cs_count, u32);
+	SET_CSA_SETTING(CSA_CENTER_FREQ1, freq_params.center_freq1, u32);
+	SET_CSA_SETTING(CSA_CENTER_FREQ2, freq_params.center_freq2, u32);
+	SET_CSA_SETTING(CSA_BANDWIDTH, freq_params.bandwidth, u32);
+	SET_CSA_SETTING(CSA_SEC_CHANNEL_OFFSET, freq_params.sec_channel_offset, u32);
+	SET_CSA_SETTING(CSA_HT, freq_params.ht_enabled, bool);
+	SET_CSA_SETTING(CSA_VHT, freq_params.vht_enabled, bool);
+	SET_CSA_SETTING(CSA_BLOCK_TX, block_tx, bool);
+
 
 	if (hostapd_switch_channel(hapd, &css) != 0)
 		return UBUS_STATUS_NOT_SUPPORTED;
 	return UBUS_STATUS_OK;
+#undef SET_CSA_SETTING
 }
 #endif
 
-- 
2.17.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From philipp_subx at redfish-solutions.com  Mon Jul 16 09:24:52 2018
From: philipp_subx at redfish-solutions.com (Philip Prindeville)
Date: Mon, 16 Jul 2018 09:24:52 -0400
Subject: [OpenWrt-Devel] IETF #102 Montreal
Message-ID: <00FC02CF-A051-416C-B4FD-A64D74467441@redfish-solutions.com>

Hi,

If anyone else is at the IETF #102 in Montreal this week, especially the ANRW (Advanced Networking Research Workshop) and you want to stop by and say hello, I?m around.  Today I?m wearing a gray T-shirt and sporting a beard?  Linkedin has a picture of me posted a couple of days ago at the hackathon working with the NTP working group.

The workshop is about to start in 5 minutes with an explanation of TLS 1.3 functionality and status?

-Philip


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From rosenp at gmail.com  Mon Jul 16 14:16:12 2018
From: rosenp at gmail.com (Rosen Penev)
Date: Mon, 16 Jul 2018 11:16:12 -0700
Subject: [OpenWrt-Devel] [PATCH] f2fs-tools: Update to 1.11.0
Message-ID: <20180716181612.6059-1-rosenp@gmail.com>

Tested on ipq806x.

Signed-off-by: Rosen Penev <rosenp at gmail.com>
---
 package/utils/f2fs-tools/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/utils/f2fs-tools/Makefile b/package/utils/f2fs-tools/Makefile
index 391eb61b89..659b3d244c 100644
--- a/package/utils/f2fs-tools/Makefile
+++ b/package/utils/f2fs-tools/Makefile
@@ -8,14 +8,14 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=f2fs-tools
-PKG_VERSION:=1.10.0
+PKG_VERSION:=1.11.0
 PKG_RELEASE:=1
 
 PKG_LICENSE:=GPLv2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-tools.git/snapshot/
-PKG_HASH:=e841b086dbe02e3553b2c2ecb8c11a7990cfa9ca835c3d7aea6d600c6a543316
+PKG_HASH:=b916ac7cda902502cf18de98da94921f71edbab40fb0437d757f0716191c79e3
 
 PKG_FIXUP:=autoreconf
 PKG_BUILD_PARALLEL:=1
-- 
2.17.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From rosenp at gmail.com  Mon Jul 16 14:17:08 2018
From: rosenp at gmail.com (Rosen Penev)
Date: Mon, 16 Jul 2018 11:17:08 -0700
Subject: [OpenWrt-Devel] [PATCH] ipq806x: dts: Remove device_type =
 "ethernet-phy"
Message-ID: <20180716181708.6326-1-rosenp@gmail.com>

device_type is deprecated. Upstream doesn't seem to like it either.

Signed-off-by: Rosen Penev <rosenp at gmail.com>
---
 .../files-4.14/arch/arm/boot/dts/qcom-ipq8064-ap148.dts       | 2 --
 .../files-4.14/arch/arm/boot/dts/qcom-ipq8064-c2600.dts       | 2 --
 .../files-4.14/arch/arm/boot/dts/qcom-ipq8064-d7800.dts       | 2 --
 .../files-4.14/arch/arm/boot/dts/qcom-ipq8064-db149.dts       | 4 ----
 .../files-4.14/arch/arm/boot/dts/qcom-ipq8064-ea8500.dts      | 2 --
 .../files-4.14/arch/arm/boot/dts/qcom-ipq8064-r7500.dts       | 2 --
 .../files-4.14/arch/arm/boot/dts/qcom-ipq8064-r7500v2.dts     | 2 --
 .../files-4.14/arch/arm/boot/dts/qcom-ipq8064-vr2600v.dts     | 2 --
 .../files-4.14/arch/arm/boot/dts/qcom-ipq8064-wg2600hp.dts    | 2 --
 .../files-4.14/arch/arm/boot/dts/qcom-ipq8064-wpq864.dts      | 2 --
 .../files-4.14/arch/arm/boot/dts/qcom-ipq8065-nbg6817.dts     | 2 --
 .../files-4.14/arch/arm/boot/dts/qcom-ipq8065-r7800.dts       | 2 --
 12 files changed, 26 deletions(-)

diff --git a/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064-ap148.dts b/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064-ap148.dts
index a3df82909e..3eaa90db2e 100644
--- a/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064-ap148.dts
+++ b/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064-ap148.dts
@@ -199,7 +199,6 @@
 			pinctrl-names = "default";
 
 			phy0: ethernet-phy at 0 {
-				device_type = "ethernet-phy";
 				reg = <0>;
 				qca,ar8327-initvals = <
 					0x00004 0x7600000   /* PAD0_MODE */
@@ -213,7 +212,6 @@
 			};
 
 			phy4: ethernet-phy at 4 {
-				device_type = "ethernet-phy";
 				reg = <4>;
 			};
 		};
diff --git a/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064-c2600.dts b/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064-c2600.dts
index b683f0275b..c32115934f 100644
--- a/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064-c2600.dts
+++ b/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064-c2600.dts
@@ -362,7 +362,6 @@
 			pinctrl-names = "default";
 
 			phy0: ethernet-phy at 0 {
-				device_type = "ethernet-phy";
 				reg = <0>;
 				qca,ar8327-initvals = <
 					0x00004 0x7600000   /* PAD0_MODE */
@@ -376,7 +375,6 @@
 			};
 
 			phy4: ethernet-phy at 4 {
-				device_type = "ethernet-phy";
 				reg = <4>;
 			};
 		};
diff --git a/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064-d7800.dts b/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064-d7800.dts
index 209d513f1b..7c829babbb 100644
--- a/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064-d7800.dts
+++ b/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064-d7800.dts
@@ -283,7 +283,6 @@
 			pinctrl-names = "default";
 
 			phy0: ethernet-phy at 0 {
-				device_type = "ethernet-phy";
 				reg = <0>;
 				qca,ar8327-initvals = <
 					0x00004 0x7600000   /* PAD0_MODE */
@@ -297,7 +296,6 @@
 			};
 
 			phy4: ethernet-phy at 4 {
-				device_type = "ethernet-phy";
 				reg = <4>;
 			};
 		};
diff --git a/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064-db149.dts b/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064-db149.dts
index 4c56866077..562659fef9 100644
--- a/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064-db149.dts
+++ b/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064-db149.dts
@@ -169,7 +169,6 @@
 			pinctrl-names = "default";
 
 			phy0: ethernet-phy at 0 {
-				device_type = "ethernet-phy";
 				reg = <0>;
 				qca,ar8327-initvals = <
 					0x00004 0x7600000   /* PAD0_MODE */
@@ -183,17 +182,14 @@
 			};
 
 			phy4: ethernet-phy at 4 {
-				device_type = "ethernet-phy";
 				reg = <4>;
 			};
 
 			phy6: ethernet-phy at 6 {
-				device_type = "ethernet-phy";
 				reg = <6>;
 			};
 
 			phy7: ethernet-phy at 7 {
-				device_type = "ethernet-phy";
 				reg = <7>;
 			};
 		};
diff --git a/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064-ea8500.dts b/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064-ea8500.dts
index 1e82a48dbf..a1e0f9a48b 100644
--- a/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064-ea8500.dts
+++ b/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064-ea8500.dts
@@ -309,7 +309,6 @@
 			pinctrl-names = "default";
 
 			phy0: ethernet-phy at 0 {
-				device_type = "ethernet-phy";
 				reg = <0>;
 				qca,ar8327-initvals = <
 					0x00004 0x7600000   /* PAD0_MODE */
@@ -323,7 +322,6 @@
 			};
 
 			phy4: ethernet-phy at 4 {
-				device_type = "ethernet-phy";
 				reg = <4>;
 			};
 		};
diff --git a/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064-r7500.dts b/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064-r7500.dts
index 9ce572bd89..1c7cf792c3 100644
--- a/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064-r7500.dts
+++ b/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064-r7500.dts
@@ -248,7 +248,6 @@
 			pinctrl-names = "default";
 
 			phy0: ethernet-phy at 0 {
-				device_type = "ethernet-phy";
 				reg = <0>;
 				qca,ar8327-initvals = <
 					0x00004 0x7600000   /* PAD0_MODE */
@@ -262,7 +261,6 @@
 			};
 
 			phy4: ethernet-phy at 4 {
-				device_type = "ethernet-phy";
 				reg = <4>;
 			};
 		};
diff --git a/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064-r7500v2.dts b/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064-r7500v2.dts
index 30bf0abd4b..aafe258c83 100644
--- a/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064-r7500v2.dts
+++ b/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064-r7500v2.dts
@@ -284,7 +284,6 @@
 			pinctrl-names = "default";
 
 			phy0: ethernet-phy at 0 {
-				device_type = "ethernet-phy";
 				reg = <0>;
 				qca,ar8327-initvals = <
 					0x00004 0x7600000   /* PAD0_MODE */
@@ -298,7 +297,6 @@
 			};
 
 			phy4: ethernet-phy at 4 {
-				device_type = "ethernet-phy";
 				reg = <4>;
 			};
 		};
diff --git a/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064-vr2600v.dts b/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064-vr2600v.dts
index 0877527332..e8f74c35de 100644
--- a/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064-vr2600v.dts
+++ b/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064-vr2600v.dts
@@ -275,7 +275,6 @@
 			pinctrl-names = "default";
 
 			phy0: ethernet-phy at 0 {
-				device_type = "ethernet-phy";
 				reg = <0>;
 				qca,ar8327-initvals = <
 					0x00004 0x7600000   /* PAD0_MODE */
@@ -289,7 +288,6 @@
 			};
 
 			phy4: ethernet-phy at 4 {
-				device_type = "ethernet-phy";
 				reg = <4>;
 			};
 		};
diff --git a/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064-wg2600hp.dts b/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064-wg2600hp.dts
index b643014b45..a6606a0f1d 100644
--- a/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064-wg2600hp.dts
+++ b/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064-wg2600hp.dts
@@ -295,7 +295,6 @@
 			pinctrl-names = "default";
 
 			phy0: ethernet-phy at 0 {
-				device_type = "ethernet-phy";
 				reg = <0>;
 				qca,ar8327-initvals = <
 					0x00004 0x7600000   /* PAD0_MODE */
@@ -309,7 +308,6 @@
 			};
 
 			phy4: ethernet-phy at 4 {
-				device_type = "ethernet-phy";
 				reg = <4>;
 			};
 		};
diff --git a/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064-wpq864.dts b/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064-wpq864.dts
index 9440de5b8f..ed26074a78 100644
--- a/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064-wpq864.dts
+++ b/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064-wpq864.dts
@@ -229,7 +229,6 @@
 		gpios = <&qcom_pinmux 1 GPIO_ACTIVE_HIGH &qcom_pinmux 0 GPIO_ACTIVE_HIGH>;
 
 		ethernet-phy at 0 {
-			device_type = "ethernet-phy";
 			reg = <0>;
 			qca,ar8327-initvals = <
 				0x00004 0x7600000   /* PAD0_MODE */
@@ -243,7 +242,6 @@
 		};
 
 		ethernet-phy at 4 {
-			device_type = "ethernet-phy";
 			reg = <4>;
 		};
 	};
diff --git a/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8065-nbg6817.dts b/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8065-nbg6817.dts
index 0b96ba64c6..35ee40c0a3 100644
--- a/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8065-nbg6817.dts
+++ b/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8065-nbg6817.dts
@@ -243,7 +243,6 @@
 			pinctrl-names = "default";
 
 			phy0: ethernet-phy at 0 {
-				device_type = "ethernet-phy";
 				reg = <0>;
 				qca,ar8327-initvals = <
 					0x00004 0x7600000   /* PAD0_MODE */
@@ -271,7 +270,6 @@
 			};
 
 			phy4: ethernet-phy at 4 {
-				device_type = "ethernet-phy";
 				reg = <4>;
 				qca,ar8327-initvals = <
 					0x000e4 0x6a545     /* MAC_POWER_SEL */
diff --git a/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8065-r7800.dts b/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8065-r7800.dts
index 29b14df4d2..5b741598e3 100644
--- a/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8065-r7800.dts
+++ b/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8065-r7800.dts
@@ -341,7 +341,6 @@
 
 
 			phy0: ethernet-phy at 0 {
-				device_type = "ethernet-phy";
 				reg = <0>;
 				qca,ar8327-initvals = <
 					0x00004 0x7600000   /* PAD0_MODE */
@@ -373,7 +372,6 @@
 			};
 
 			phy4: ethernet-phy at 4 {
-				device_type = "ethernet-phy";
 				reg = <4>;
 				qca,ar8327-initvals = <
 					0x000e4 0x6a545     /* MAC_POWER_SEL */
-- 
2.17.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From dedeckeh at gmail.com  Mon Jul 16 14:50:04 2018
From: dedeckeh at gmail.com (Hans Dedecker)
Date: Mon, 16 Jul 2018 20:50:04 +0200
Subject: [OpenWrt-Devel] [PATCH] f2fs-tools: Update to 1.11.0
In-Reply-To: <20180716181612.6059-1-rosenp@gmail.com>
References: <20180716181612.6059-1-rosenp@gmail.com>
Message-ID: <CAJLcKsFwAuq_68ydZ9ph3BDU0B6raYe8yaTJH+EK6SPDWyW3rA@mail.gmail.com>

On Mon, Jul 16, 2018 at 8:16 PM Rosen Penev <rosenp at gmail.com> wrote:
>
> Tested on ipq806x.
>
> Signed-off-by: Rosen Penev <rosenp at gmail.com>
> ---
>  package/utils/f2fs-tools/Makefile | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/package/utils/f2fs-tools/Makefile b/package/utils/f2fs-tools/Makefile
> index 391eb61b89..659b3d244c 100644
> --- a/package/utils/f2fs-tools/Makefile
> +++ b/package/utils/f2fs-tools/Makefile
> @@ -8,14 +8,14 @@
>  include $(TOPDIR)/rules.mk
>
>  PKG_NAME:=f2fs-tools
> -PKG_VERSION:=1.10.0
> +PKG_VERSION:=1.11.0
>  PKG_RELEASE:=1
>
>  PKG_LICENSE:=GPLv2
>
>  PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
>  PKG_SOURCE_URL:=https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-tools.git/snapshot/
> -PKG_HASH:=e841b086dbe02e3553b2c2ecb8c11a7990cfa9ca835c3d7aea6d600c6a543316
> +PKG_HASH:=b916ac7cda902502cf18de98da94921f71edbab40fb0437d757f0716191c79e3
Superseded by https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=0a4cd1a6828f61acdc12348c69ca5c97fcb54c1d

Hans
>
>  PKG_FIXUP:=autoreconf
>  PKG_BUILD_PARALLEL:=1
> --
> 2.17.1
>
>
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From robh at kernel.org  Mon Jul 16 16:45:35 2018
From: robh at kernel.org (Rob Herring)
Date: Mon, 16 Jul 2018 14:45:35 -0600
Subject: [OpenWrt-Devel] [PATCH 2/4 v1] net: dsa: Add bindings for
 Realtek SMI DSAs
In-Reply-To: <20180714094556.30791-2-linus.walleij@linaro.org>
References: <20180714094556.30791-1-linus.walleij@linaro.org>
 <20180714094556.30791-2-linus.walleij@linaro.org>
Message-ID: <20180716204535.GA22125@rob-hp-laptop>

On Sat, Jul 14, 2018 at 11:45:54AM +0200, Linus Walleij wrote:
> The Realtek SMI family is a set of DSA chips that provide
> switching in routers. This binding just follows the pattern
> set by other switches but with the introduction of an embedded
> irqchip to demux and handle the interrupts fired by the single
> line from the chip.
> 
> This interrupt construction is similar to how we handle
> interrupt controllers inside PCI bridges etc.
> 
> Cc: Antti Sepp?l? <a.seppala at gmail.com>
> Cc: Roman Yeryomin <roman at advem.lv>
> Cc: Colin Leitner <colin.leitner at googlemail.com>
> Cc: Gabor Juhos <juhosg at openwrt.org>
> Cc: Florian Fainelli <f.fainelli at gmail.com>
> Cc: devicetree at vger.kernel.org
> Signed-off-by: Linus Walleij <linus.walleij at linaro.org>
> ---
> ChangeLog RFCv2->v1:
> - No changes, we agree on these bindings.
> ChangeLog RFCv1->RFCv2:
> - Switch to Andrew's suggestion to have a local MDIO bus
>   definition inside of the DSA device node
> - Add realtek,disabled-leds
> - Correct WAN IRQ to 12 in the example
> ---
>  .../bindings/net/dsa/realtek-smi.txt          | 153 ++++++++++++++++++
>  1 file changed, 153 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/net/dsa/realtek-smi.txt
> 
> diff --git a/Documentation/devicetree/bindings/net/dsa/realtek-smi.txt b/Documentation/devicetree/bindings/net/dsa/realtek-smi.txt
> new file mode 100644
> index 000000000000..b6ae8541bd55
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/net/dsa/realtek-smi.txt
> @@ -0,0 +1,153 @@
> +Realtek SMI-based Switches
> +==========================
> +
> +The SMI "Simple Management Interface" is a two-wire protocol using

At least for some other Realtek chips, the documentation I find says the 
S stands for Serial. And Wikipedia says SMI is the same thing as MDIO.

Just want to make sure we don't define GPIOs directly when there should 
be a layer of abstraction like mdio-gpio.

> +bit-banged GPIO that while it reuses the MDIO lines MCK and MDIO does
> +not use the MDIO protocol. This binding defines how to specify the
> +SMI-based Realtek devices.
> +
> +Required properties:
> +
> +- compatible: must be exactly one of:
> +      "realtek,rtl8366"
> +      "realtek,rtl8366rb" (4+1 ports)
> +      "realtek,rtl8366s"  (4+1 ports)
> +      "realtek,rtl8367"
> +      "realtek,rtl8367b"
> +      "realtek,rtl8368s"  (8 port)
> +      "realtek,rtl8369"
> +      "realtek,rtl8370"   (8 port)
> +
> +Required properties:
> +- mdc-gpios: GPIO line for the MDC clock line.
> +- mdio-gpios: GPIO line for the MDIO data line.
> +- reset-gpios: GPIO line for the reset signal.
> +
> +Optional properties:
> +- realtek,disable-leds: if the LED drivers are not used in the
> +  hardware design this will disable them so they are not turned on
> +  and wasting power.
> +
> +Required subnodes:
> +
> +- interrupt-controller
> +
> +  This defines an interrupt controller with an IRQ line (typically
> +  a GPIO) that will demultiplex and handle the interrupt from the single
> +  interrupt line coming out of one of the SMI-based chips. It most
> +  importantly provides link up/down interrupts to the PHY blocks inside
> +  the ASIC.
> +
> +Required properties of interrupt-controller:
> +
> +- interrupt: parent interrupt, see interrupt-controller/interrupts.txt
> +- interrupt-controller: see interrupt-controller/interrupts.txt
> +- #address-cells: should be <0>
> +- #interrupt-cells: should be <1>
> +
> +- mdio
> +
> +  This defines the internal MDIO bus of the SMI device, mostly for the
> +  purpose of being able to hook the interrupts to the right PHY and
> +  the right PHY to the corresponding port.
> +
> +Required properties of mdio:
> +
> +- compatible: should be set to "realtek,smi-mdio" for all SMI devices
> +
> +See net/mdio.txt for additional MDIO bus properties.
> +
> +See net/dsa/dsa.txt for a list of additional required and optional properties
> +and subnodes of DSA switches.
> +
> +Examples:
> +
> +switch {
> +	compatible = "realtek,rtl8366rb";
> +	/* 22 = MDIO (has input reads), 21 = MDC (clock, output only) */
> +	mdc-gpios = <&gpio0 21 GPIO_ACTIVE_HIGH>;
> +	mdio-gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>;
> +	reset-gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
> +
> +	switch_intc: interrupt-controller {
> +		/* GPIO 15 provides the interrupt */
> +		interrupt-parent = <&gpio0>;
> +		interrupts = <15 IRQ_TYPE_LEVEL_LOW>;
> +		interrupt-controller;
> +		#address-cells = <0>;
> +		#interrupt-cells = <1>;
> +	};
> +
> +	ports {
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +		reg = <0>;
> +		port at 0 {
> +			reg = <0>;
> +			label = "lan0";
> +			phy-handle = <&phy0>;
> +		};
> +		port at 1 {
> +			reg = <1>;
> +			label = "lan1";
> +			phy-handle = <&phy1>;
> +		};
> +		port at 2 {
> +			reg = <2>;
> +			label = "lan2";
> +			phy-handle = <&phy2>;
> +		};
> +		port at 3 {
> +			reg = <3>;
> +			label = "lan3";
> +			phy-handle = <&phy3>;
> +		};
> +		port at 4 {
> +			reg = <4>;
> +			label = "wan";
> +			phy-handle = <&phy4>;
> +		};
> +		port at 5 {
> +			reg = <5>;
> +			label = "cpu";
> +			ethernet = <&gmac0>;
> +			phy-mode = "rgmii";
> +			fixed-link {
> +				speed = <1000>;
> +				full-duplex;
> +			};
> +		};
> +	};
> +
> +	mdio {
> +		compatible = "realtek,smi-mdio", "dsa-mdio";
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +
> +		phy0: phy at 0 {
> +			reg = <0>;
> +			interrupt-parent = <&switch_intc>;
> +			interrupts = <0>;
> +		};
> +		phy1: phy at 1 {
> +			reg = <1>;
> +			interrupt-parent = <&switch_intc>;
> +			interrupts = <1>;
> +		};
> +		phy2: phy at 2 {
> +			reg = <2>;
> +			interrupt-parent = <&switch_intc>;
> +			interrupts = <2>;
> +		};
> +		phy3: phy at 3 {
> +			reg = <3>;
> +			interrupt-parent = <&switch_intc>;
> +			interrupts = <3>;
> +		};
> +		phy4: phy at 4 {
> +			reg = <4>;
> +			interrupt-parent = <&switch_intc>;
> +			interrupts = <12>;
> +		};
> +	};
> +};
> -- 
> 2.17.1
> 
> --
> To unsubscribe from this list: send the line "unsubscribe devicetree" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From robh at kernel.org  Mon Jul 16 16:45:35 2018
From: robh at kernel.org (Rob Herring)
Date: Mon, 16 Jul 2018 14:45:35 -0600
Subject: [OpenWrt-Devel] [PATCH 2/4 v1] net: dsa: Add bindings for
 Realtek SMI DSAs
In-Reply-To: <20180714094556.30791-2-linus.walleij@linaro.org>
References: <20180714094556.30791-1-linus.walleij@linaro.org>
 <20180714094556.30791-2-linus.walleij@linaro.org>
Message-ID: <20180716204535.GA22125@rob-hp-laptop>

On Sat, Jul 14, 2018 at 11:45:54AM +0200, Linus Walleij wrote:
> The Realtek SMI family is a set of DSA chips that provide
> switching in routers. This binding just follows the pattern
> set by other switches but with the introduction of an embedded
> irqchip to demux and handle the interrupts fired by the single
> line from the chip.
> 
> This interrupt construction is similar to how we handle
> interrupt controllers inside PCI bridges etc.
> 
> Cc: Antti Sepp?l? <a.seppala at gmail.com>
> Cc: Roman Yeryomin <roman at advem.lv>
> Cc: Colin Leitner <colin.leitner at googlemail.com>
> Cc: Gabor Juhos <juhosg at openwrt.org>
> Cc: Florian Fainelli <f.fainelli at gmail.com>
> Cc: devicetree at vger.kernel.org
> Signed-off-by: Linus Walleij <linus.walleij at linaro.org>
> ---
> ChangeLog RFCv2->v1:
> - No changes, we agree on these bindings.
> ChangeLog RFCv1->RFCv2:
> - Switch to Andrew's suggestion to have a local MDIO bus
>   definition inside of the DSA device node
> - Add realtek,disabled-leds
> - Correct WAN IRQ to 12 in the example
> ---
>  .../bindings/net/dsa/realtek-smi.txt          | 153 ++++++++++++++++++
>  1 file changed, 153 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/net/dsa/realtek-smi.txt
> 
> diff --git a/Documentation/devicetree/bindings/net/dsa/realtek-smi.txt b/Documentation/devicetree/bindings/net/dsa/realtek-smi.txt
> new file mode 100644
> index 000000000000..b6ae8541bd55
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/net/dsa/realtek-smi.txt
> @@ -0,0 +1,153 @@
> +Realtek SMI-based Switches
> +==========================
> +
> +The SMI "Simple Management Interface" is a two-wire protocol using

At least for some other Realtek chips, the documentation I find says the 
S stands for Serial. And Wikipedia says SMI is the same thing as MDIO.

Just want to make sure we don't define GPIOs directly when there should 
be a layer of abstraction like mdio-gpio.

> +bit-banged GPIO that while it reuses the MDIO lines MCK and MDIO does
> +not use the MDIO protocol. This binding defines how to specify the
> +SMI-based Realtek devices.
> +
> +Required properties:
> +
> +- compatible: must be exactly one of:
> +      "realtek,rtl8366"
> +      "realtek,rtl8366rb" (4+1 ports)
> +      "realtek,rtl8366s"  (4+1 ports)
> +      "realtek,rtl8367"
> +      "realtek,rtl8367b"
> +      "realtek,rtl8368s"  (8 port)
> +      "realtek,rtl8369"
> +      "realtek,rtl8370"   (8 port)
> +
> +Required properties:
> +- mdc-gpios: GPIO line for the MDC clock line.
> +- mdio-gpios: GPIO line for the MDIO data line.
> +- reset-gpios: GPIO line for the reset signal.
> +
> +Optional properties:
> +- realtek,disable-leds: if the LED drivers are not used in the
> +  hardware design this will disable them so they are not turned on
> +  and wasting power.
> +
> +Required subnodes:
> +
> +- interrupt-controller
> +
> +  This defines an interrupt controller with an IRQ line (typically
> +  a GPIO) that will demultiplex and handle the interrupt from the single
> +  interrupt line coming out of one of the SMI-based chips. It most
> +  importantly provides link up/down interrupts to the PHY blocks inside
> +  the ASIC.
> +
> +Required properties of interrupt-controller:
> +
> +- interrupt: parent interrupt, see interrupt-controller/interrupts.txt
> +- interrupt-controller: see interrupt-controller/interrupts.txt
> +- #address-cells: should be <0>
> +- #interrupt-cells: should be <1>
> +
> +- mdio
> +
> +  This defines the internal MDIO bus of the SMI device, mostly for the
> +  purpose of being able to hook the interrupts to the right PHY and
> +  the right PHY to the corresponding port.
> +
> +Required properties of mdio:
> +
> +- compatible: should be set to "realtek,smi-mdio" for all SMI devices
> +
> +See net/mdio.txt for additional MDIO bus properties.
> +
> +See net/dsa/dsa.txt for a list of additional required and optional properties
> +and subnodes of DSA switches.
> +
> +Examples:
> +
> +switch {
> +	compatible = "realtek,rtl8366rb";
> +	/* 22 = MDIO (has input reads), 21 = MDC (clock, output only) */
> +	mdc-gpios = <&gpio0 21 GPIO_ACTIVE_HIGH>;
> +	mdio-gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>;
> +	reset-gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
> +
> +	switch_intc: interrupt-controller {
> +		/* GPIO 15 provides the interrupt */
> +		interrupt-parent = <&gpio0>;
> +		interrupts = <15 IRQ_TYPE_LEVEL_LOW>;
> +		interrupt-controller;
> +		#address-cells = <0>;
> +		#interrupt-cells = <1>;
> +	};
> +
> +	ports {
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +		reg = <0>;
> +		port at 0 {
> +			reg = <0>;
> +			label = "lan0";
> +			phy-handle = <&phy0>;
> +		};
> +		port at 1 {
> +			reg = <1>;
> +			label = "lan1";
> +			phy-handle = <&phy1>;
> +		};
> +		port at 2 {
> +			reg = <2>;
> +			label = "lan2";
> +			phy-handle = <&phy2>;
> +		};
> +		port at 3 {
> +			reg = <3>;
> +			label = "lan3";
> +			phy-handle = <&phy3>;
> +		};
> +		port at 4 {
> +			reg = <4>;
> +			label = "wan";
> +			phy-handle = <&phy4>;
> +		};
> +		port at 5 {
> +			reg = <5>;
> +			label = "cpu";
> +			ethernet = <&gmac0>;
> +			phy-mode = "rgmii";
> +			fixed-link {
> +				speed = <1000>;
> +				full-duplex;
> +			};
> +		};
> +	};
> +
> +	mdio {
> +		compatible = "realtek,smi-mdio", "dsa-mdio";
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +
> +		phy0: phy at 0 {
> +			reg = <0>;
> +			interrupt-parent = <&switch_intc>;
> +			interrupts = <0>;
> +		};
> +		phy1: phy at 1 {
> +			reg = <1>;
> +			interrupt-parent = <&switch_intc>;
> +			interrupts = <1>;
> +		};
> +		phy2: phy at 2 {
> +			reg = <2>;
> +			interrupt-parent = <&switch_intc>;
> +			interrupts = <2>;
> +		};
> +		phy3: phy at 3 {
> +			reg = <3>;
> +			interrupt-parent = <&switch_intc>;
> +			interrupts = <3>;
> +		};
> +		phy4: phy at 4 {
> +			reg = <4>;
> +			interrupt-parent = <&switch_intc>;
> +			interrupts = <12>;
> +		};
> +	};
> +};
> -- 
> 2.17.1
> 
> --
> To unsubscribe from this list: send the line "unsubscribe devicetree" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From chunkeey at gmail.com  Mon Jul 16 16:56:34 2018
From: chunkeey at gmail.com (Christian Lamparter)
Date: Mon, 16 Jul 2018 22:56:34 +0200
Subject: [OpenWrt-Devel] [PATCH][for openwrt-18.06] apm821xx: fix sata
 access freezes
Message-ID: <20180716205636.21726-1-chunkeey@gmail.com>

The original vendor's driver programmed the dma controller's
AHB HPROT values to enable bufferable, privileged mode. This
along with the "same priorty for both channels" fixes the
freezes according to @takimata, @And.short, that have been
reported on the forum by @ticerex.

Furtheremore, @takimata reported that the patch also improved
the performance of the HDDs considerably:
|<https://forum.lede-project.org/t/wd-mybook-live-duo-two-disks/16195/55>
|It seems your patch unleashed the full power of the SATA port.
|Where I was previously hitting a really hard limit at around
|82 MB/s for reading and 27 MB/s for writing, I am now getting this:
|
|root at OpenWrt:/mnt# time dd if=/dev/zero of=tempfile bs=1M count=1024
|1024+0 records in
|1024+0 records out
|real    0m 13.65s
|user    0m 0.01s
|sys     0m 11.89s
|
|root at OpenWrt:/mnt# time dd if=tempfile of=/dev/null bs=1M count=1024
|1024+0 records in
|1024+0 records out
|real    0m 8.41s
|user    0m 0.01s
|sys     0m 4.70s
|
|This means: 121 MB/s reading and 75 MB/s writing!
|
|[...]
|
|The drive is a WD Green WD10EARX taken from an older MBL Single.
|I repeated the test a few times with even larger files to rule out
|any caching, I'm still seeing the same great performance. OpenWrt is
|now completely on par with the original MBL firmware's performance.

Signed-off-by: Christian Lamparter <chunkeey at gmail.com>
---
 ...-dw-dma-hprot-fix-and-equal-priortiy.patch | 25 +++++++++++++++++++
 1 file changed, 25 insertions(+)
 create mode 100644 target/linux/apm821xx/patches-4.14/302-dw-dma-hprot-fix-and-equal-priortiy.patch

diff --git a/target/linux/apm821xx/patches-4.14/302-dw-dma-hprot-fix-and-equal-priortiy.patch b/target/linux/apm821xx/patches-4.14/302-dw-dma-hprot-fix-and-equal-priortiy.patch
new file mode 100644
index 0000000000..c6e4331aa9
--- /dev/null
+++ b/target/linux/apm821xx/patches-4.14/302-dw-dma-hprot-fix-and-equal-priortiy.patch
@@ -0,0 +1,25 @@
+--- a/drivers/dma/dw/core.c
++++ b/drivers/dma/dw/core.c
+@@ -167,6 +167,8 @@ static void dwc_initialize_chan_dw(struc
+ 	cfghi |= DWC_CFGH_DST_PER(dwc->dws.dst_id);
+ 	cfghi |= DWC_CFGH_SRC_PER(dwc->dws.src_id);
+ 
++	cfghi |= DWC_CFGH_PROTCTL(3); /* bufferable + privileged access */
++
+ 	/* Set polarity of handshake interface */
+ 	cfglo |= hs_polarity ? DWC_CFGL_HS_DST_POL | DWC_CFGL_HS_SRC_POL : 0;
+ 
+@@ -1293,11 +1295,8 @@ int dw_dma_probe(struct dw_dma_chip *chi
+ 		else
+ 			list_add(&dwc->chan.device_node, &dw->dma.channels);
+ 
+-		/* 7 is highest priority & 0 is lowest. */
+-		if (pdata->chan_priority == CHAN_PRIORITY_ASCENDING)
+-			dwc->priority = pdata->nr_channels - i - 1;
+-		else
+-			dwc->priority = i;
++		/* set all channels to the same priority */
++		dwc->priority = pdata->nr_channels - 1;
+ 
+ 		dwc->ch_regs = &__dw_regs(dw)->CHAN[i];
+ 		spin_lock_init(&dwc->lock);
-- 
2.18.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From chunkeey at gmail.com  Mon Jul 16 16:56:35 2018
From: chunkeey at gmail.com (Christian Lamparter)
Date: Mon, 16 Jul 2018 22:56:35 +0200
Subject: [OpenWrt-Devel] [PATCH][for lede-17.01] apm821xx: fix sata access
 freezes
In-Reply-To: <20180716205636.21726-1-chunkeey@gmail.com>
References: <20180716205636.21726-1-chunkeey@gmail.com>
Message-ID: <20180716205636.21726-2-chunkeey@gmail.com>

The original vendor's driver programmed the dma controller's
AHB HPROT values to enable bufferable, privileged mode. This
along with the "same priorty for both channels" fixes the
freezes according to @takimata, @And.short, that have been
reported on the forum by @ticerex.

Furtheremore, @takimata reported that the patch also improved
the performance of the HDDs considerably:
|<https://forum.lede-project.org/t/wd-mybook-live-duo-two-disks/16195/55>
|It seems your patch unleashed the full power of the SATA port.
|Where I was previously hitting a really hard limit at around
|82 MB/s for reading and 27 MB/s for writing, I am now getting this:
|
|root at OpenWrt:/mnt# time dd if=/dev/zero of=tempfile bs=1M count=1024
|1024+0 records in
|1024+0 records out
|real    0m 13.65s
|user    0m 0.01s
|sys     0m 11.89s
|
|root at OpenWrt:/mnt# time dd if=tempfile of=/dev/null bs=1M count=1024
|1024+0 records in
|1024+0 records out
|real    0m 8.41s
|user    0m 0.01s
|sys     0m 4.70s
|
|This means: 121 MB/s reading and 75 MB/s writing!
|
|[...]
|
|The drive is a WD Green WD10EARX taken from an older MBL Single.
|I repeated the test a few times with even larger files to rule out
|any caching, I'm still seeing the same great performance. OpenWrt is
|now completely on par with the original MBL firmware's performance.

Signed-off-by: Christian Lamparter <chunkeey at gmail.com>
---
Same patch content as commit "apm821xx: attempt to fix sata access freezes".
c3f9a1ac0e7ae536552e2745582dc47098cefc07 in master. But with a better commit
log.
---
 ...-dw-dma-hprot-fix-and-equal-priortiy.patch | 25 +++++++++++++++++++
 1 file changed, 25 insertions(+)
 create mode 100644 target/linux/apm821xx/patches-4.4/302-dw-dma-hprot-fix-and-equal-priortiy.patch

diff --git a/target/linux/apm821xx/patches-4.4/302-dw-dma-hprot-fix-and-equal-priortiy.patch b/target/linux/apm821xx/patches-4.4/302-dw-dma-hprot-fix-and-equal-priortiy.patch
new file mode 100644
index 0000000000..1e76813225
--- /dev/null
+++ b/target/linux/apm821xx/patches-4.4/302-dw-dma-hprot-fix-and-equal-priortiy.patch
@@ -0,0 +1,25 @@
+--- a/drivers/dma/dw/core.c
++++ b/drivers/dma/dw/core.c
+@@ -150,6 +150,8 @@ static void dwc_initialize(struct dw_dma
+ 	cfghi |= DWC_CFGH_DST_PER(dwc->dst_id);
+ 	cfghi |= DWC_CFGH_SRC_PER(dwc->src_id);
+ 
++	cfghi |= DWC_CFGH_PROTCTL(3); /* bufferable + privileged access */
++
+ 	channel_writel(dwc, CFG_LO, cfglo);
+ 	channel_writel(dwc, CFG_HI, cfghi);
+ 
+@@ -1539,11 +1541,8 @@ int dw_dma_probe(struct dw_dma_chip *chi
+ 		else
+ 			list_add(&dwc->chan.device_node, &dw->dma.channels);
+ 
+-		/* 7 is highest priority & 0 is lowest. */
+-		if (pdata->chan_priority == CHAN_PRIORITY_ASCENDING)
+-			dwc->priority = pdata->nr_channels - i - 1;
+-		else
+-			dwc->priority = i;
++		/* set all channels to the same priority */
++		dwc->priority = pdata->nr_channels - 1;
+ 
+ 		dwc->ch_regs = &__dw_regs(dw)->CHAN[i];
+ 		spin_lock_init(&dwc->lock);
-- 
2.18.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From chunkeey at gmail.com  Mon Jul 16 16:56:36 2018
From: chunkeey at gmail.com (Christian Lamparter)
Date: Mon, 16 Jul 2018 22:56:36 +0200
Subject: [OpenWrt-Devel] [PATCH][for master] apm821xx: unify My Book Live
 Single + Duo images
In-Reply-To: <20180716205636.21726-1-chunkeey@gmail.com>
References: <20180716205636.21726-1-chunkeey@gmail.com>
Message-ID: <20180716205636.21726-3-chunkeey@gmail.com>

By takimata:
"Come to think of it, an MBL Single board boots up just fine on an
MBL Duo image, and the MBL Single board identifies completely
identical to the MBL Duo
(Board: Apollo-3G - APM82181 Board, 2*SATA, 1*USB).
I wonder if there is any downside to just using the MBL Duo firmware
on a MBL Single. I wonder if the two firmwares could even be unified."

<https://forum.lede-project.org/t/wd-mybook-live-duo-two-disks/16195/9>

Signed-off-by: Christian Lamparter <chunkeey at gmail.com>
---
 target/linux/apm821xx/dts/apollo3g.dtsi       | 189 ------------------
 .../linux/apm821xx/dts/wd-mybooklive-duo.dts  |  38 ----
 target/linux/apm821xx/dts/wd-mybooklive.dts   | 183 ++++++++++++++++-
 target/linux/apm821xx/image/Makefile          |  23 +--
 4 files changed, 187 insertions(+), 246 deletions(-)
 delete mode 100644 target/linux/apm821xx/dts/apollo3g.dtsi
 delete mode 100644 target/linux/apm821xx/dts/wd-mybooklive-duo.dts

diff --git a/target/linux/apm821xx/dts/apollo3g.dtsi b/target/linux/apm821xx/dts/apollo3g.dtsi
deleted file mode 100644
index e88973f8d2..0000000000
--- a/target/linux/apm821xx/dts/apollo3g.dtsi
+++ /dev/null
@@ -1,189 +0,0 @@
-/*
- * Copyright 2008 DENX Software Engineering, Stefan Roese <sr at denx.de>
- * (c) Copyright 2010 Western Digital Technologies, Inc. All Rights Reserved.
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2.  This program is licensed "as is" without
- * any warranty of any kind, whether express or implied.
- */
-
-#include "apm82181.dtsi"
-
-/ {
-	compatible = "amcc,apollo3g";
-
-	aliases {
-		serial0 = &UART0;
-		led-boot = &status;
-		led-failsafe = &status;
-		led-running = &status;
-		led-upgrade = &status;
-	};
-};
-
-&POB0 {
-	ebc {
-		nor_flash at 0,0 {
-			status = "okay";
-			compatible = "amd,s29gl512n", "jedec-probe", "cfi-flash", "mtd-rom";
-			bank-width = <1>;
-			reg = <0x00000000 0x00000000 0x00080000>;
-			#address-cells = <1>;
-			#size-cells = <1>;
-
-			partition at 0 {
-				/* Part of bootrom - Don't use it without a jump */
-				label = "free";
-				reg = <0x00000000 0x0001e000>;
-			};
-
-			partition at 1 {
-				label = "env";
-				reg = <0x0001e000 0x00002000>;
-			};
-
-			partition at 2 {
-				label = "uboot";
-				reg = <0x00020000 0x00050000>;
-			};
-		};
-	};
-
-	GPIO1: gpio1 at e0000000 {
-		compatible = "wd,mbl-gpio", "ti,74273";
-		reg-names = "dat";
-		reg = <0xe0000000 0x1>;
-		#gpio-cells = <2>;
-		gpio-controller;
-
-		enable-phy {
-			/* toggle to reset EMAC PHY */
-			gpio-hog;
-			line-name = "enable EMAC PHY";
-			gpios = <0 GPIO_ACTIVE_LOW>;
-			output-low;
-		};
-
-		enable-button {
-			/* Defined in u-boot as: NOT_NOR
-			 * "enables features other than NOR
-			 * specifically, the buffer at CS2"
-			 * (button).
-			 *
-			 * Note: This option is disabled as
-			 * it prevents the system from being
-			 * rebooted successfully.
-			 */
-
-			gpio-hog;
-			line-name = "Enable Reset Button, disable NOR";
-			gpios = <1 GPIO_ACTIVE_HIGH>;
-			output-low;
-		};
-
-		enable-usb {
-			gpio-hog;
-			line-name = "Power USB Core";
-			gpios = <2 GPIO_ACTIVE_LOW>;
-			output-low;
-			status = "disabled";
-		};
-
-		enable-port1 {
-			gpio-hog;
-			line-name = "Power Drive Port 1";
-			gpios = <3 GPIO_ACTIVE_LOW>;
-			output-low;
-		};
-
-		enable-port0 {
-			gpio-hog;
-			line-name = "Power Drive Port 0";
-			gpios = <7 GPIO_ACTIVE_LOW>;
-			output-low;
-			status = "disabled";
-		};
-	};
-
-	GPIO2: gpio2 at e0100000 {
-		compatible = "wd,mbl-gpio", "ti,74244";
-		reg-names = "dat";
-		reg = <0xe0100000 0x1>;
-		#gpio-cells = <2>;
-		gpio-controller;
-		no-output;
-	};
-
-	gpio-leds {
-		compatible = "gpio-leds";
-
-		failsafe: power-red {
-			label = "mbl:red:power";
-			gpios = <&GPIO1 4 GPIO_ACTIVE_HIGH>;
-			linux,default-trigger = "panic";
-		};
-
-		status: power-green {
-			label = "mbl:green:power";
-			gpios = <&GPIO1 5 GPIO_ACTIVE_HIGH>;
-		};
-
-		power-blue {
-			label = "mbl:blue:power";
-			gpios = <&GPIO1 6 GPIO_ACTIVE_HIGH>;
-		};
-	};
-
-	gpio_keys_polled {
-		compatible = "gpio-keys-polled";
-		#address-cells = <1>;
-		#size-cells = <0>;
-		poll-interval = <60>;	/* 3 * 20 = 60ms */
-		autorepeat;
-
-		button at 1 {
-			label = "Reset button";
-			linux,code = <KEY_RESTART>;
-			gpios = <&GPIO2 2 GPIO_ACTIVE_LOW>;
-		};
-	};
-};
-
-&CRYPTO {
-	status = "okay";
-};
-
-&PKA {
-	status = "okay";
-};
-
-&TRNG {
-	status = "okay";
-};
-
-&SATA1 {
-	status = "okay";
-};
-
-&UART0 {
-	status = "okay";
-};
-
-&EMAC0 {
-	status = "okay";
-
-	phy-map = <0x2>;
-	phy-address = <0x1>;
-	phy-handle = <&phy>;
-
-	mdio {
-		phy: phy at 1 {
-			compatible = "ethernet-phy-ieee802.3-c22";
-			reg = <1>;
-		};
-	};
-};
-
-&SATA1 {
-	status = "okay";
-};
diff --git a/target/linux/apm821xx/dts/wd-mybooklive-duo.dts b/target/linux/apm821xx/dts/wd-mybooklive-duo.dts
deleted file mode 100644
index 4f6cc506f5..0000000000
--- a/target/linux/apm821xx/dts/wd-mybooklive-duo.dts
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Device Tree Source for AMCC Canyonlands (460EX)
- *
- * Copyright 2008 DENX Software Engineering, Stefan Roese <sr at denx.de>
- * (c) Copyright 2010 Western Digital Technologies, Inc. All Rights Reserved.
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2.  This program is licensed "as is" without
- * any warranty of any kind, whether express or implied.
- */
-
-/dts-v1/;
-
-#include "apollo3g.dtsi"
-
-/ {
-	compatible = "wd,mybooklive-duo", "amcc,apollo3g";
-	model = "MyBook Live Duo";
-};
-
-&SATA0 {
-	status = "okay";
-};
-
-&USBOTG0 {
-	status = "okay";
-	dr_mode = "host";
-};
-
-&GPIO1 {
-	enable-usb {
-		status = "okay";
-	};
-
-	enable-port0 {
-		status = "okay";
-	};
-};
diff --git a/target/linux/apm821xx/dts/wd-mybooklive.dts b/target/linux/apm821xx/dts/wd-mybooklive.dts
index d841352292..aee0d3266d 100644
--- a/target/linux/apm821xx/dts/wd-mybooklive.dts
+++ b/target/linux/apm821xx/dts/wd-mybooklive.dts
@@ -9,9 +9,190 @@
 
 /dts-v1/;
 
-#include "apollo3g.dtsi"
+#include "apm82181.dtsi"
 
 / {
 	compatible = "wd,mybooklive", "amcc,apollo3g";
 	model = "MyBook Live";
+
+	aliases {
+		serial0 = &UART0;
+		led-boot = &status;
+		led-failsafe = &status;
+		led-running = &status;
+		led-upgrade = &status;
+	};
+};
+
+&POB0 {
+	ebc {
+		nor_flash at 0,0 {
+			status = "okay";
+			compatible = "amd,s29gl512n", "jedec-probe", "cfi-flash", "mtd-rom";
+			bank-width = <1>;
+			reg = <0x00000000 0x00000000 0x00080000>;
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition at 0 {
+				/* Part of bootrom - Don't use it without a jump */
+				label = "free";
+				reg = <0x00000000 0x0001e000>;
+			};
+
+			partition at 1 {
+				label = "env";
+				reg = <0x0001e000 0x00002000>;
+			};
+
+			partition at 2 {
+				label = "uboot";
+				reg = <0x00020000 0x00050000>;
+			};
+		};
+	};
+
+	GPIO1: gpio1 at e0000000 {
+		compatible = "wd,mbl-gpio", "ti,74273";
+		reg-names = "dat";
+		reg = <0xe0000000 0x1>;
+		#gpio-cells = <2>;
+		gpio-controller;
+
+		enable-phy {
+			/* toggle to reset EMAC PHY */
+			gpio-hog;
+			line-name = "enable EMAC PHY";
+			gpios = <0 GPIO_ACTIVE_LOW>;
+			output-low;
+		};
+
+		enable-button {
+			/* Defined in u-boot as: NOT_NOR
+			 * "enables features other than NOR
+			 * specifically, the buffer at CS2"
+			 * (button).
+			 *
+			 * Note: This option is disabled as
+			 * it prevents the system from being
+			 * rebooted successfully.
+			 */
+
+			gpio-hog;
+			line-name = "Enable Reset Button, disable NOR";
+			gpios = <1 GPIO_ACTIVE_HIGH>;
+			output-low;
+		};
+
+		enable-usb {
+			gpio-hog;
+			line-name = "Power USB Core";
+			gpios = <2 GPIO_ACTIVE_LOW>;
+			output-low;
+		};
+
+		enable-port1 {
+			gpio-hog;
+			line-name = "Power Drive Port 1";
+			gpios = <3 GPIO_ACTIVE_LOW>;
+			output-low;
+		};
+
+		enable-port0 {
+			gpio-hog;
+			line-name = "Power Drive Port 0";
+			gpios = <7 GPIO_ACTIVE_LOW>;
+			output-low;
+		};
+	};
+
+	GPIO2: gpio2 at e0100000 {
+		compatible = "wd,mbl-gpio", "ti,74244";
+		reg-names = "dat";
+		reg = <0xe0100000 0x1>;
+		#gpio-cells = <2>;
+		gpio-controller;
+		no-output;
+	};
+
+	gpio-leds {
+		compatible = "gpio-leds";
+
+		failsafe: power-red {
+			label = "mbl:red:power";
+			gpios = <&GPIO1 4 GPIO_ACTIVE_HIGH>;
+			linux,default-trigger = "panic";
+		};
+
+		status: power-green {
+			label = "mbl:green:power";
+			gpios = <&GPIO1 5 GPIO_ACTIVE_HIGH>;
+		};
+
+		power-blue {
+			label = "mbl:blue:power";
+			gpios = <&GPIO1 6 GPIO_ACTIVE_HIGH>;
+		};
+	};
+
+	gpio_keys_polled {
+		compatible = "gpio-keys-polled";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		poll-interval = <60>;	/* 3 * 20 = 60ms */
+		autorepeat;
+
+		reset-button {
+			label = "Reset button";
+			linux,code = <KEY_RESTART>;
+			gpios = <&GPIO2 2 GPIO_ACTIVE_LOW>;
+		};
+	};
+};
+
+&EMAC0 {
+	status = "okay";
+
+	phy-map = <0x2>;
+	phy-address = <0x1>;
+	phy-handle = <&phy>;
+
+	mdio {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		phy: phy at 1 {
+			compatible = "ethernet-phy-ieee802.3-c22";
+			reg = <1>;
+		};
+	};
+};
+
+&CRYPTO {
+	status = "okay";
+};
+
+&PKA {
+	status = "okay";
+};
+
+&TRNG {
+	status = "okay";
+};
+
+&SATA0 {
+	status = "okay";
+};
+
+&SATA1 {
+	status = "okay";
+};
+
+&UART0 {
+	status = "okay";
+};
+
+&USBOTG0 {
+	status = "okay";
+	dr_mode = "host";
 };
diff --git a/target/linux/apm821xx/image/Makefile b/target/linux/apm821xx/image/Makefile
index 1e94a40918..9d9c0e5ace 100644
--- a/target/linux/apm821xx/image/Makefile
+++ b/target/linux/apm821xx/image/Makefile
@@ -214,7 +214,11 @@ define Build/hdd-img
 	./mbl_gen_hdd_img.sh $@ $@.boot $(IMAGE_ROOTFS)
 endef
 
-define Device/MyBookLiveDefault
+define Device/wd_mybooklive
+  DEVICE_TITLE := Western Digital My Book Live Series (Single + Duo)
+  DEVICE_PACKAGES := kmod-usb-dwc2 kmod-usb-ledtrig-usbport kmod-usb-storage kmod-fs-vfat wpad-mini
+  DEVICE_DTS := wd-mybooklive
+  SUPPORTED_DEVICES += mbl wd_mybooklive-duo
   IMAGE_SIZE := 48m
   BLOCKSIZE := 1k
   DTB_SIZE := 16384
@@ -228,25 +232,8 @@ define Device/MyBookLiveDefault
   IMAGE/rootfs.img.gz := boot-script | boot-img | hdd-img | gzip | append-metadata
 endef
 
-define Device/wd_mybooklive
-$(Device/MyBookLiveDefault)
-  DEVICE_TITLE := Western Digital My Book Live
-  DEVICE_DTS := wd-mybooklive
-  SUPPORTED_DEVICES += mbl
-endef
-
 TARGET_DEVICES += wd_mybooklive
 
-define Device/wd_mybooklive-duo
-$(Device/MyBookLiveDefault)
-  DEVICE_TITLE := Western Digital My Book Live Duo
-  DEVICE_PACKAGES := kmod-usb-dwc2 kmod-usb-ledtrig-usbport kmod-usb-storage kmod-fs-vfat wpad-mini
-  DEVICE_DTS := wd-mybooklive-duo
-  SUPPORTED_DEVICES += mbl
-endef
-
-TARGET_DEVICES += wd_mybooklive-duo
-
 endif
 
 $(eval $(call BuildImage))
-- 
2.18.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From andrew at lunn.ch  Mon Jul 16 18:31:02 2018
From: andrew at lunn.ch (Andrew Lunn)
Date: Tue, 17 Jul 2018 00:31:02 +0200
Subject: [OpenWrt-Devel] [PATCH 2/4 v1] net: dsa: Add bindings for
 Realtek SMI DSAs
In-Reply-To: <20180716204535.GA22125@rob-hp-laptop>
References: <20180714094556.30791-1-linus.walleij@linaro.org>
 <20180714094556.30791-2-linus.walleij@linaro.org>
 <20180716204535.GA22125@rob-hp-laptop>
Message-ID: <20180716223102.GB968@lunn.ch>

> > +Realtek SMI-based Switches
> > +==========================
> > +
> > +The SMI "Simple Management Interface" is a two-wire protocol using
> 
> At least for some other Realtek chips, the documentation I find says the 
> S stands for Serial. And Wikipedia says SMI is the same thing as MDIO.
> 
> Just want to make sure we don't define GPIOs directly when there should 
> be a layer of abstraction like mdio-gpio.

Hi Rob

There was a bit of discussion about this with the RFC patches. The bit
stream protocol used here is not that used by SMI in MDIO. It is
something proprietary to Realtek. I don't expect we will be re-using
the code with other vendors. The only real reason to abstract this out
is if there happens to be other Realtek switches which uses the same
SMI bitstream, but have completely different registers, meaning a
separate DSA driver would be needed. The SMI code is well structured,
so it should not be too hard to turn it into a library which drivers
can share.

So i personally don't see a problem with this.

   Andrew

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From devel-sven at geroedel.de  Mon Jul 16 18:37:00 2018
From: devel-sven at geroedel.de (devel-sven at geroedel.de)
Date: Tue, 17 Jul 2018 00:37:00 +0200
Subject: [OpenWrt-Devel] turris onmia - broken uboot-env
In-Reply-To: <20180702144930.GA3040@sama32.org>
References: <3190836.ufv1y0dHpV@strike> <20180702144930.GA3040@sama32.org>
Message-ID: <744a10e915635e1a99ee801ea34e1b7b@geroedel.de>

On 2018-07-02 16:49, Mirko Langisch wrote:
> On Mon, 02 Jul 2018, Sven Roederer wrote:
> 
>> it's a bit off-topic, but probably someone can share the correct 
>> uboot-env of
>> a Turris-Omnia 2G.
>> Mine is not bootingafter somehow damaging the settings.
>> 
>> A simple printenv would be great.
> 
> does
> 
>     env default -a
>     saveenv
> 
> help?
> 


Thanks, it was _very_ helpful :-)

Sven

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From linus.walleij at linaro.org  Tue Jul 17 02:55:51 2018
From: linus.walleij at linaro.org (Linus Walleij)
Date: Tue, 17 Jul 2018 08:55:51 +0200
Subject: [OpenWrt-Devel] [PATCH 2/4 v1] net: dsa: Add bindings for
 Realtek SMI DSAs
In-Reply-To: <20180716204535.GA22125@rob-hp-laptop>
References: <20180714094556.30791-1-linus.walleij@linaro.org>
 <20180714094556.30791-2-linus.walleij@linaro.org>
 <20180716204535.GA22125@rob-hp-laptop>
Message-ID: <CACRpkdb1ykS=3kiuQzaa6TpEPNB=C6xuusuez6JOCHb-E27Uqg@mail.gmail.com>

On Mon, Jul 16, 2018 at 10:45 PM Rob Herring <robh at kernel.org> wrote:
> On Sat, Jul 14, 2018 at 11:45:54AM +0200, Linus Walleij wrote:

> > +The SMI "Simple Management Interface" is a two-wire protocol using
>
> At least for some other Realtek chips, the documentation I find says the
> S stands for Serial. And Wikipedia says SMI is the same thing as MDIO.

The only datasheet we have mentions both:
http://realtek.info/pdf/rtl8366_8369_datasheet_1-1.pdf
calling it serial management interface when talking to an EEPROM
calling it systems management interface when talking to a
PHY.

(BTW that datsheet has no relation to this driver, that is for
ASICs 8366 and 8369 which of course have nothing to do with
RTL8366RB "revision B" that we are running here, which adds
even more to the confusion.)

Sadly it would not surprise me if Realtek doesn't even know
which one it is themselves, given the state of the code and
documentation that came out of the company.

I just have to pick something. I can rename it the
"S Management Interface" if you prefer, OpenWRT called it
Systems Management Interface.

> Just want to make sure we don't define GPIOs directly when there should
> be a layer of abstraction like mdio-gpio.

OK let's look at it we read a single register with each protocol:

1. MDIO: drivers/net/phy/mdio-bitbang.c
  send_bit is setting data and cycling clock 1-0 (falling edge)
  begins transactions by sending 32 1:s (well 33 for safe measure)
  then sends a start bit 01
  then sends the opcode 10 (read)
  then sends the PHY address (5 bits)
  then sends the register address (5 bits)
  turn around (switch MDIO to input)
  read 16 bit register value
  read stop bit

2. SMI:
   sends the sequence "101" to start transactions. (No initial ones)
   writes a whole byte which is the "command" read is 0xa9
   on RTL8366RB and apparently something else on other chips
   writes low byte of 16bit address
   writes high byte of 16bit address
   turn around (switch MDIO to input)
   reads the low byte of the 16bit data
   reads the high byte of the 16bit data
   sends the stop sequence 01
   then an extra clock pulse

As you can see those are pretty different. PHY always being
addressed in MDIO (the switch chips has PHYs but this
protocol is not defined exclusively for that) and both phy and
reg being 5 bits addressing at most 10 address bits is the most
obvious deviation then 8 bits for command instead of 2 etc.

It's just very different.

Yours,
Linus Walleij

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From linus.walleij at linaro.org  Tue Jul 17 02:55:51 2018
From: linus.walleij at linaro.org (Linus Walleij)
Date: Tue, 17 Jul 2018 08:55:51 +0200
Subject: [OpenWrt-Devel] [PATCH 2/4 v1] net: dsa: Add bindings for
 Realtek SMI DSAs
In-Reply-To: <20180716204535.GA22125@rob-hp-laptop>
References: <20180714094556.30791-1-linus.walleij@linaro.org>
 <20180714094556.30791-2-linus.walleij@linaro.org>
 <20180716204535.GA22125@rob-hp-laptop>
Message-ID: <CACRpkdb1ykS=3kiuQzaa6TpEPNB=C6xuusuez6JOCHb-E27Uqg@mail.gmail.com>

On Mon, Jul 16, 2018 at 10:45 PM Rob Herring <robh at kernel.org> wrote:
> On Sat, Jul 14, 2018 at 11:45:54AM +0200, Linus Walleij wrote:

> > +The SMI "Simple Management Interface" is a two-wire protocol using
>
> At least for some other Realtek chips, the documentation I find says the
> S stands for Serial. And Wikipedia says SMI is the same thing as MDIO.

The only datasheet we have mentions both:
http://realtek.info/pdf/rtl8366_8369_datasheet_1-1.pdf
calling it serial management interface when talking to an EEPROM
calling it systems management interface when talking to a
PHY.

(BTW that datsheet has no relation to this driver, that is for
ASICs 8366 and 8369 which of course have nothing to do with
RTL8366RB "revision B" that we are running here, which adds
even more to the confusion.)

Sadly it would not surprise me if Realtek doesn't even know
which one it is themselves, given the state of the code and
documentation that came out of the company.

I just have to pick something. I can rename it the
"S Management Interface" if you prefer, OpenWRT called it
Systems Management Interface.

> Just want to make sure we don't define GPIOs directly when there should
> be a layer of abstraction like mdio-gpio.

OK let's look at it we read a single register with each protocol:

1. MDIO: drivers/net/phy/mdio-bitbang.c
  send_bit is setting data and cycling clock 1-0 (falling edge)
  begins transactions by sending 32 1:s (well 33 for safe measure)
  then sends a start bit 01
  then sends the opcode 10 (read)
  then sends the PHY address (5 bits)
  then sends the register address (5 bits)
  turn around (switch MDIO to input)
  read 16 bit register value
  read stop bit

2. SMI:
   sends the sequence "101" to start transactions. (No initial ones)
   writes a whole byte which is the "command" read is 0xa9
   on RTL8366RB and apparently something else on other chips
   writes low byte of 16bit address
   writes high byte of 16bit address
   turn around (switch MDIO to input)
   reads the low byte of the 16bit data
   reads the high byte of the 16bit data
   sends the stop sequence 01
   then an extra clock pulse

As you can see those are pretty different. PHY always being
addressed in MDIO (the switch chips has PHYs but this
protocol is not defined exclusively for that) and both phy and
reg being 5 bits addressing at most 10 address bits is the most
obvious deviation then 8 bits for command instead of 2 etc.

It's just very different.

Yours,
Linus Walleij

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From ansuelsmth at gmail.com  Tue Jul 17 11:27:39 2018
From: ansuelsmth at gmail.com (Ansuel Smith)
Date: Tue, 17 Jul 2018 17:27:39 +0200
Subject: [OpenWrt-Devel] PR check
Message-ID: <CA+_ehUwp-wg5+fek-FO7kDOFTDpsLt_-c6kcJ8AcizOM7A5M7Q@mail.gmail.com>

Can someone check this 3 pr?

One is related to an error with the new github download script
One fix error message with firmware loading with ath10k and one is
needed to use the new ath10k firmware



https://github.com/openwrt/openwrt/pull/1163
https://github.com/openwrt/openwrt/pull/1161
https://github.com/openwrt/openwrt/pull/1160

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From devel-sven at geroedel.de  Tue Jul 17 15:16:28 2018
From: devel-sven at geroedel.de (Sven Roederer)
Date: Tue, 17 Jul 2018 21:16:28 +0200
Subject: [OpenWrt-Devel] ar71xx-mikrotik: Imagebuilder fails with
 "VERSIONOPT=y"
In-Reply-To: <6487018.CeAL7n5l3G@strike>
References: <6487018.CeAL7n5l3G@strike>
Message-ID: <1621249.Tb25HXhKjq@strike>

Hi,

anyone has an idea, how to debug the Makefiles of the Imagebuilder? to check 
what's happening when these CONFIG-options are not like:

> CONFIG_VERSION_FILENAMES=n
> CONFIG_VERSION_DIST="OpenWrt"
> CONFIG_VERSION_NUMBER="SNAPSHOT"
> 

Sven

Am Sonntag, 1. Juli 2018, 23:20:12 CEST schrieb Sven Roederer:
> Hi,
> 
> since long time our buildbot hat problems creating images for
> ar71xx-mikrotik with openwrt-master. I'm not sure anymore when it started
> after branching 17.01, as I did not look for this target for long.
> 
> By default we are using the following config-options:
> CONFIG_VERSIONOPT=y
> CONFIG_VERSION_FILENAMES=y
> CONFIG_VERSION_CODE_FILENAMES=y
> CONFIG_VERSION_DIST="Freifunk Berlin"
> CONFIG_VERSION_HWREV=""
> CONFIG_VERSION_MANUFACTURER=""
> CONFIG_VERSION_NICK="Dev"
> CONFIG_VERSION_NUMBER="2018-alpha"
> CONFIG_VERSION_CODE=""
> CONFIG_VERSION_PRODUCT=""
> CONFIG_VERSION_REPO="http://buildbot.berlin.freifunk.net/buildbot/stable/%V/
> %T/packages"
> 
> which fails when we use the imagebuilder to create our firmware. The
> regular compile, by using "make" will work.
> All other targets (e.g. ar71xx-generic, ramips-mt7620) we build for do not
> show this problem.
> 
> This is the error from calling the imagebuilder
> 
> > Building images for ar71xx - Default Profile
> > Packages: wpad community-profiles mtr ip iperf tmux vnstat ethtool
> > dnsmasq qos-scripts firewall iwinfo libiwinfo-lua tcpdump uhttpd
> > uhttpd-mod-ubus px5g-mbedtls libustream-mbedtls luci-app-olsr
> > luci-app-firewall luci-app-olsr-services luci-theme-bootstrap
> > luci-i18n-base-
> de
> 
> > luci-i18n-base-en luci-i18n-firewall-de luci-i18n-firewall-en
> > luci-i18n-olsr-
> de
> 
> > luci-i18n-olsr-en luci-i18n-statistics-de luci-i18n-statistics-en olsrd
> > olsrd-mod-arprefresh olsrd-mod-dyn-gw olsrd-mod-jsoninfo olsrd-mod-txtinfo
> > olsrd-mod-nameservice olsrd-mod-watchdog kmod-ipip kmod-batman-adv
> > alfred batctl luci-app-statistics collectd collectd-mod-interface
> > collectd-mod-iwinfo collectd-mod-network collectd-mod-olsrd
> > collectd-mod-rrdtool collectd-mod-ping collectd-mod-uptime
> > collectd-mod-memory base-files busybox dnsmasq dropbear firewall fstools
> > ip6tables iptables kernel kmod-ath9k kmod-gpio-button-hotplug
> > kmod-usb-core kmod-usb-ledtrig-usbport kmod-usb-ohci kmod-usb2 libc
> > libgcc logd mtd nand-utils netifd odhcp6c odhcpd-ipv6only opkg swconfig
> > uboot-envtools uci uclient-fetch
> > 
> > ...
> > 
> > Parallel mksquashfs: Using 1 processor
> > Creating 4.0 filesystem on /var/lib/buildbot/slaves/slave/ar71xx-mikrotik/
> 
> build/firmware/imgQGH2jj/openwrt-imagebuilder-SNAPSHOT-ar71xx-mikrotik.Linux
> -
> x86_64/build_dir/target-mips_24kc_musl/linux-ar71xx_mikrotik/root.squashfs,
> block size 262144.
> 
> > [|                                                             ]    0/1324
> 
> 0%
> 
> > [====/                                                         ]  100/1324
> 
> 7%
> 
> > [=========/                                                    ]  200/1324
> 
> 15%
> 
> > [=============|                                                ]  300/1324
> 
> 22%
> 
> > [==================|                                           ]  400/1324
> 
> 30%
> 
> > [================================/                             ]  700/1324
> 
> 52%
> 
> > [=======================================================/      ] 1200/1324
> 
> 90%
> 
> > [=============================================================|] 1324/1324
> 
> 100%
> 
> > Exportable Squashfs 4.0 filesystem, xz compressed, data block size 262144
> > 
> > 	compressed data, compressed metadata, compressed fragments, no xattrs
> > 	duplicates are removed
> > 
> > Filesystem size 4145.19 Kbytes (4.05 Mbytes)
> > 
> > 	34.40% of uncompressed filesystem size (12051.00 Kbytes)
> > 
> > Inode table size 11690 bytes (11.42 Kbytes)
> > 
> > 	21.38% of uncompressed inode table size (54688 bytes)
> > 
> > Directory table size 16702 bytes (16.31 Kbytes)
> > 
> > 	46.46% of uncompressed directory table size (35951 bytes)
> > 
> > Number of duplicate files found 174
> > Number of inodes 1664
> > Number of files 1317
> > Number of fragments 38
> > Number of symbolic links  225
> > Number of device nodes 1
> > Number of fifo nodes 0
> > Number of socket nodes 0
> > Number of directories 121
> > Number of ids (unique uids + gids) 1
> > Number of uids 1
> > 
> > 	unknown (0)
> > 
> > Number of gids 1
> > 
> > 	unknown (0)
> > 
> > sysupgrade-routerboard/
> > sysupgrade-routerboard/CONTROL
> > sysupgrade-routerboard/root
> > sysupgrade-routerboard/kernel
> > sysupgrade-routerboard/
> > sysupgrade-routerboard/CONTROL
> > sysupgrade-routerboard/root
> > sysupgrade-routerboard/kernel
> > sysupgrade-routerboard/
> > sysupgrade-routerboard/CONTROL
> > sysupgrade-routerboard/root
> > sysupgrade-routerboard/kernel
> > 2645+1 records in
> > 2645+1 records out
> > 1354744 bytes (1.4 MB) copied, 0.0227269 s, 59.6 MB/s
> > Can't get lstat from kernel file!: No such file or directory
> > make[4]: ***
> > [/var/lib/buildbot/slaves/slave/ar71xx-mikrotik/build/firmware/
> imgQGH2jj/openwrt-imagebuilder-SNAPSHOT-ar71xx-mikrotik.Linux-x86_64/
> build_dir/target-mips_24kc_musl/linux-ar71xx_mikrotik/tmp/openwrt-snapshot-
> bd98d38-ar71xx-mikrotik-rb-nor-flash-16M-squashfs-sysupgrade.bin] Error 255
> 
> > make[3]: *** [build_image] Error 2
> > make[2]: *** [_call_image] Error 2
> > make[1]: *** [image] Error 2
> > make[1]: Leaving directory
> > `/var/lib/buildbot/slaves/slave/ar71xx-mikrotik/
> 
> build/firmware/imgQGH2jj/openwrt-imagebuilder-SNAPSHOT-ar71xx-mikrotik.Linux
> - x86_64'
> 
> > make: *** [.stamp-images] Error 2
> 
> When I change the following options, it will not fail:
> CONFIG_VERSION_FILENAMES=n
> CONFIG_VERSION_DIST="OpenWrt"
> CONFIG_VERSION_NUMBER="SNAPSHOT"
> 
> I looked around in the Makefiles, but was not able to find the relavant
> code.
> 
> 
> Any ideas?
> 
> Sven
> 
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel



_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From hauke at hauke-m.de  Tue Jul 17 18:46:40 2018
From: hauke at hauke-m.de (Hauke Mehrtens)
Date: Wed, 18 Jul 2018 00:46:40 +0200
Subject: [OpenWrt-Devel] OpenWrt/LEDE v17.01.5 service release
Message-ID: <40f4c996-fb53-782e-4ca6-c7e401d1fd0f@hauke-m.de>

The OpenWrt Community is proud to announce the Fifth service release of
stable OpenWrt/LEDE 17.01 series, which is the first service release
after the remerger of the LEDE and OpenWrt projects.

OpenWrt/LEDE 17.01.5 ?Reboot? incorporates a fair number of fixes back
ported from the development branch during the last 9 months.
--

Some selected highlights of the service release are:

 * Linux kernel updated to version 4.4.140 (from 4.4.92 in v17.01.4)
 * Security fixes to openssl, mbedtls, wolfssl, samba, dnsmasq, openvpn,
libunwind and the Linux kernel
 * Update cake scheduler to version from 7. January 2018
 * Update Wireguard VPN software to 0.0.20180519
 * Enable SSL cache in ustream-ssl to improve TLS performance
 * Fixes for building with host glibc 2.27 (Used in Ubuntu 18.04)
 * lantiq: Make ADSL and VDSL SNR configurable
 * x86:  Added Spectre and Meltdown mitigations as well as microcode
loading support
 * Assorted platform fixes for apm821xx, ar71xx, bcm53xx, brcm47xx,
ipq806x, lantiq, mvebu, ramips, rb532, sunxi, x86 and xburst

For a detailed list of changes since 17.01.4 refer to
https://openwrt.org/releases/17.01/changelog-17.01.5

---

For latest information about the 17.01 series, refer to the wiki at:
https://lede-project.org/releases/17.01/

To download the v17.01.5 images, navigate to:
https://downloads.lede-project.org/releases/17.01.5/

Have fun!

The OpenWrt Community

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From masashi.honma at gmail.com  Tue Jul 17 19:40:33 2018
From: masashi.honma at gmail.com (Masashi Honma)
Date: Wed, 18 Jul 2018 08:40:33 +0900
Subject: [OpenWrt-Devel] [PATCH] wwan: Fix teardown for sierra_net driver
Message-ID: <20180717234033.9534-1-masashi.honma@gmail.com>

The sierra_net driver is using proto_directip_setup for setup. So use
proto_directip_teardown for teardown.

Signed-off-by: Masashi Honma <masashi.honma at gmail.com>
---
 package/network/utils/wwan/files/wwan.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/network/utils/wwan/files/wwan.sh b/package/network/utils/wwan/files/wwan.sh
index e0bd4c8727..303fa9e99e 100755
--- a/package/network/utils/wwan/files/wwan.sh
+++ b/package/network/utils/wwan/files/wwan.sh
@@ -110,7 +110,7 @@ proto_wwan_teardown() {
 	case $driver in
 	qmi_wwan)		proto_qmi_teardown $@ ;;
 	cdc_mbim)		proto_mbim_teardown $@ ;;
-	sierra_net)		proto_mbim_teardown $@ ;;
+	sierra_net)		proto_directip_teardown $@ ;;
 	comgt)			proto_3g_teardown $@ ;;
 	cdc_ether|*cdc_ncm)	proto_ncm_teardown $@ ;;
 	esac
-- 
2.17.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From mbak at fxnet.hu  Wed Jul 18 06:26:16 2018
From: mbak at fxnet.hu (Mikael Bak)
Date: Wed, 18 Jul 2018 12:26:16 +0200
Subject: [OpenWrt-Devel] =?utf-8?q?lede-imagebuilder-17=2E01=2E5-ar71xx-ge?=
 =?utf-8?q?neric=2ELinux-x86=5F64_fails_to_build_image?=
Message-ID: <bb967294f3a37a12aab7d4b71cc7fa8c@mail.iszerviz.hu>

Hi,

Image builder for 17.01.5 seems broken.

It works well for 17.01.4 and 18.06.0-rc1 on my system.

Output attached.

TIA,
Mikael
-------------- next part --------------
[mikael at mikael-pc lede-imagebuilder-17.01.5-ar71xx-generic.Linux-x86_64]$ make image PROFILE=tl-wr1043nd-v1 PACKAGES="luci luci-app-firewall luci-base luci-lib-ip luci-lib-jsonc luci-lib-nixio luci-mod-admin-full luci-proto-ipv6 luci-proto-ppp luci-theme-bootstrap luci-app-statistics collectd rrdtool1 collectd-mod-rrdtool collectd-mod-iwinfo collectd-mod-cpu collectd-mod-memory collectd-mod-interface collectd-mod-load collectd-mod-network ddns-scripts wget libpcre zlib libopenssl librt"
Building images for ar71xx - TP-LINK TL-WR1043N/ND v1
Packages: luci luci-app-firewall luci-base luci-lib-ip luci-lib-jsonc luci-lib-nixio luci-mod-admin-full luci-proto-ipv6 luci-proto-ppp luci-theme-bootstrap luci-app-statistics collectd rrdtool1 collectd-mod-rrdtool collectd-mod-iwinfo collectd-mod-cpu collectd-mod-memory collectd-mod-interface collectd-mod-load collectd-mod-network ddns-scripts wget libpcre zlib libopenssl librt base-files busybox dnsmasq dropbear firewall fstools ip6tables iptables kernel kmod-ath9k kmod-gpio-button-hotplug kmod-usb-core kmod-usb-ledtrig-usbport kmod-usb2 libc libgcc logd mtd netifd odhcp6c odhcpd opkg ppp ppp-mod-pppoe swconfig uboot-envtools uci uclient-fetch wpad-mini

Downloading http://downloads.lede-project.org/releases/17.01.5/targets/ar71xx/generic/packages/Packages.gz
Updated list of available packages in /home/mikael/LEDE/stable/lede-imagebuilder-17.01.5-ar71xx-generic.Linux-x86_64/build_dir/target-mips_24kc_musl-1.1.16/root-ar71xx/../../../../../../../../home/mikael/LEDE/stable/lede-imagebuilder-17.01.5-ar71xx-generic.Linux-x86_64/dl/reboot_core
Downloading http://downloads.lede-project.org/releases/17.01.5/packages/mips_24kc/base/Packages.gz
Updated list of available packages in /home/mikael/LEDE/stable/lede-imagebuilder-17.01.5-ar71xx-generic.Linux-x86_64/build_dir/target-mips_24kc_musl-1.1.16/root-ar71xx/../../../../../../../../home/mikael/LEDE/stable/lede-imagebuilder-17.01.5-ar71xx-generic.Linux-x86_64/dl/reboot_base
Downloading http://downloads.lede-project.org/releases/17.01.5/packages/mips_24kc/luci/Packages.gz
Updated list of available packages in /home/mikael/LEDE/stable/lede-imagebuilder-17.01.5-ar71xx-generic.Linux-x86_64/build_dir/target-mips_24kc_musl-1.1.16/root-ar71xx/../../../../../../../../home/mikael/LEDE/stable/lede-imagebuilder-17.01.5-ar71xx-generic.Linux-x86_64/dl/reboot_luci
Downloading http://downloads.lede-project.org/releases/17.01.5/packages/mips_24kc/packages/Packages.gz
Updated list of available packages in /home/mikael/LEDE/stable/lede-imagebuilder-17.01.5-ar71xx-generic.Linux-x86_64/build_dir/target-mips_24kc_musl-1.1.16/root-ar71xx/../../../../../../../../home/mikael/LEDE/stable/lede-imagebuilder-17.01.5-ar71xx-generic.Linux-x86_64/dl/reboot_packages
Downloading http://downloads.lede-project.org/releases/17.01.5/packages/mips_24kc/routing/Packages.gz
Updated list of available packages in /home/mikael/LEDE/stable/lede-imagebuilder-17.01.5-ar71xx-generic.Linux-x86_64/build_dir/target-mips_24kc_musl-1.1.16/root-ar71xx/../../../../../../../../home/mikael/LEDE/stable/lede-imagebuilder-17.01.5-ar71xx-generic.Linux-x86_64/dl/reboot_routing
Downloading http://downloads.lede-project.org/releases/17.01.5/packages/mips_24kc/telephony/Packages.gz
Updated list of available packages in /home/mikael/LEDE/stable/lede-imagebuilder-17.01.5-ar71xx-generic.Linux-x86_64/build_dir/target-mips_24kc_musl-1.1.16/root-ar71xx/../../../../../../../../home/mikael/LEDE/stable/lede-imagebuilder-17.01.5-ar71xx-generic.Linux-x86_64/dl/reboot_telephony
Downloading file:packages/Packages
Updated list of available packages in /home/mikael/LEDE/stable/lede-imagebuilder-17.01.5-ar71xx-generic.Linux-x86_64/build_dir/target-mips_24kc_musl-1.1.16/root-ar71xx/../../../../../../../../home/mikael/LEDE/stable/lede-imagebuilder-17.01.5-ar71xx-generic.Linux-x86_64/dl/imagebuilder

Installing packages...
Installing libc (1.1.16-1) to root...
Installing libgcc (5.4.0-1) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/targets/ar71xx/generic/packages/libgcc_5.4.0-1_mips_24kc.ipk
Configuring libgcc.
Configuring libc.
Installing kernel (4.4.140-1-33d452ad71ac13bc6dc71df37efa5ec7) to root...
Configuring kernel.
Installing luci (git-18.180.55366-b78664c-1) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/packages/mips_24kc/luci/luci_git-18.180.55366-b78664c-1_all.ipk
Installing libubox (2018-01-07-1dafcd78-1) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/packages/mips_24kc/base/libubox_2018-01-07-1dafcd78-1_mips_24kc.ipk
Installing libjson-c (0.12.1-1) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/packages/mips_24kc/base/libjson-c_0.12.1-1_mips_24kc.ipk
Installing libblobmsg-json (2018-01-07-1dafcd78-1) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/packages/mips_24kc/base/libblobmsg-json_2018-01-07-1dafcd78-1_mips_24kc.ipk
Installing libjson-script (2018-01-07-1dafcd78-1) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/packages/mips_24kc/base/libjson-script_2018-01-07-1dafcd78-1_mips_24kc.ipk
Installing uhttpd (2017-11-04-a235636a-1) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/packages/mips_24kc/base/uhttpd_2017-11-04-a235636a-1_mips_24kc.ipk
Installing libubus (2017-02-18-34c6e818-1) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/packages/mips_24kc/base/libubus_2017-02-18-34c6e818-1_mips_24kc.ipk
Installing uhttpd-mod-ubus (2017-11-04-a235636a-1) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/packages/mips_24kc/base/uhttpd-mod-ubus_2017-11-04-a235636a-1_mips_24kc.ipk
Installing liblua (5.1.5-1) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/packages/mips_24kc/base/liblua_5.1.5-1_mips_24kc.ipk
Installing lua (5.1.5-1) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/packages/mips_24kc/base/lua_5.1.5-1_mips_24kc.ipk
Installing libuci (2018-01-01-141b64ef-1) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/packages/mips_24kc/base/libuci_2018-01-01-141b64ef-1_mips_24kc.ipk
Installing libuci-lua (2018-01-01-141b64ef-1) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/packages/mips_24kc/base/libuci-lua_2018-01-01-141b64ef-1_mips_24kc.ipk
Installing luci-lib-nixio (git-18.180.55366-b78664c-1) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/packages/mips_24kc/luci/luci-lib-nixio_git-18.180.55366-b78664c-1_mips_24kc.ipk
Installing libnl-tiny (0.1-5) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/packages/mips_24kc/base/libnl-tiny_0.1-5_mips_24kc.ipk
Installing luci-lib-ip (git-18.180.55366-b78664c-1) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/packages/mips_24kc/luci/luci-lib-ip_git-18.180.55366-b78664c-1_mips_24kc.ipk
Installing rpcd (2018-05-13-82062195-1) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/packages/mips_24kc/base/rpcd_2018-05-13-82062195-1_mips_24kc.ipk
Installing libubus-lua (2017-02-18-34c6e818-1) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/packages/mips_24kc/base/libubus-lua_2017-02-18-34c6e818-1_mips_24kc.ipk
Installing luci-lib-jsonc (git-18.180.55366-b78664c-1) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/packages/mips_24kc/luci/luci-lib-jsonc_git-18.180.55366-b78664c-1_mips_24kc.ipk
Installing luci-base (git-18.180.55366-b78664c-1) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/packages/mips_24kc/luci/luci-base_git-18.180.55366-b78664c-1_mips_24kc.ipk
Installing luci-mod-admin-full (git-18.180.55366-b78664c-1) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/packages/mips_24kc/luci/luci-mod-admin-full_git-18.180.55366-b78664c-1_mips_24kc.ipk
Installing luci-theme-bootstrap (git-18.180.55366-b78664c-1) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/packages/mips_24kc/luci/luci-theme-bootstrap_git-18.180.55366-b78664c-1_all.ipk
Installing libxtables (1.4.21-3) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/packages/mips_24kc/base/libxtables_1.4.21-3_mips_24kc.ipk
Installing libip4tc (1.4.21-3) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/packages/mips_24kc/base/libip4tc_1.4.21-3_mips_24kc.ipk
Installing libip6tc (1.4.21-3) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/packages/mips_24kc/base/libip6tc_1.4.21-3_mips_24kc.ipk
Installing kmod-nf-ipt (4.4.140-1) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/targets/ar71xx/generic/packages/kmod-nf-ipt_4.4.140-1_mips_24kc.ipk
Installing kmod-ipt-core (4.4.140-1) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/targets/ar71xx/generic/packages/kmod-ipt-core_4.4.140-1_mips_24kc.ipk
Installing kmod-nf-conntrack (4.4.140-1) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/targets/ar71xx/generic/packages/kmod-nf-conntrack_4.4.140-1_mips_24kc.ipk
Installing kmod-ipt-conntrack (4.4.140-1) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/targets/ar71xx/generic/packages/kmod-ipt-conntrack_4.4.140-1_mips_24kc.ipk
Installing kmod-nf-nat (4.4.140-1) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/targets/ar71xx/generic/packages/kmod-nf-nat_4.4.140-1_mips_24kc.ipk
Installing kmod-ipt-nat (4.4.140-1) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/targets/ar71xx/generic/packages/kmod-ipt-nat_4.4.140-1_mips_24kc.ipk
Installing firewall (2017-05-27-a4d98aea-1) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/packages/mips_24kc/base/firewall_2017-05-27-a4d98aea-1_mips_24kc.ipk
Installing luci-app-firewall (git-18.180.55366-b78664c-1) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/packages/mips_24kc/luci/luci-app-firewall_git-18.180.55366-b78664c-1_all.ipk
Installing luci-proto-ppp (git-18.180.55366-b78664c-1) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/packages/mips_24kc/luci/luci-proto-ppp_git-18.180.55366-b78664c-1_all.ipk
Installing libiwinfo (2016-09-21-fd9e17be-1) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/targets/ar71xx/generic/packages/libiwinfo_2016-09-21-fd9e17be-1_mips_24kc.ipk
Installing libiwinfo-lua (2016-09-21-fd9e17be-1) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/targets/ar71xx/generic/packages/libiwinfo-lua_2016-09-21-fd9e17be-1_mips_24kc.ipk
Installing luci-proto-ipv6 (git-18.180.55366-b78664c-1) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/packages/mips_24kc/luci/luci-proto-ipv6_git-18.180.55366-b78664c-1_all.ipk
Package luci-app-firewall (git-18.180.55366-b78664c-1) installed in root is up to date.
Package luci-base (git-18.180.55366-b78664c-1) installed in root is up to date.
Package luci-lib-ip (git-18.180.55366-b78664c-1) installed in root is up to date.
Package luci-lib-jsonc (git-18.180.55366-b78664c-1) installed in root is up to date.
Package luci-lib-nixio (git-18.180.55366-b78664c-1) installed in root is up to date.
Package luci-mod-admin-full (git-18.180.55366-b78664c-1) installed in root is up to date.
Package luci-proto-ipv6 (git-18.180.55366-b78664c-1) installed in root is up to date.
Package luci-proto-ppp (git-18.180.55366-b78664c-1) installed in root is up to date.
Package luci-theme-bootstrap (git-18.180.55366-b78664c-1) installed in root is up to date.
Installing luci-app-statistics (git-18.180.55366-b78664c-1) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/packages/mips_24kc/luci/luci-app-statistics_git-18.180.55366-b78664c-1_all.ipk
Installing libpthread (1.1.16-1) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/targets/ar71xx/generic/packages/libpthread_1.1.16-1_mips_24kc.ipk
Installing zlib (1.2.11-1) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/packages/mips_24kc/base/zlib_1.2.11-1_mips_24kc.ipk
Installing libltdl (2.4-2) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/packages/mips_24kc/base/libltdl_2.4-2_mips_24kc.ipk
Installing collectd (5.5.3-4) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/packages/mips_24kc/packages/collectd_5.5.3-4_mips_24kc.ipk
Installing librrd1 (1.0.50-2) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/packages/mips_24kc/packages/librrd1_1.0.50-2_mips_24kc.ipk
Installing rrdtool1 (1.0.50-2) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/packages/mips_24kc/packages/rrdtool1_1.0.50-2_mips_24kc.ipk
Installing collectd-mod-rrdtool (5.5.3-4) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/packages/mips_24kc/packages/collectd-mod-rrdtool_5.5.3-4_mips_24kc.ipk
Installing collectd-mod-iwinfo (5.5.3-4) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/packages/mips_24kc/packages/collectd-mod-iwinfo_5.5.3-4_mips_24kc.ipk
Installing collectd-mod-cpu (5.5.3-4) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/packages/mips_24kc/packages/collectd-mod-cpu_5.5.3-4_mips_24kc.ipk
Installing collectd-mod-memory (5.5.3-4) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/packages/mips_24kc/packages/collectd-mod-memory_5.5.3-4_mips_24kc.ipk
Installing collectd-mod-interface (5.5.3-4) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/packages/mips_24kc/packages/collectd-mod-interface_5.5.3-4_mips_24kc.ipk
Installing collectd-mod-load (5.5.3-4) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/packages/mips_24kc/packages/collectd-mod-load_5.5.3-4_mips_24kc.ipk
Installing collectd-mod-network (5.5.3-4) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/packages/mips_24kc/packages/collectd-mod-network_5.5.3-4_mips_24kc.ipk
Package collectd (5.5.3-4) installed in root is up to date.
Package rrdtool1 (1.0.50-2) installed in root is up to date.
Package collectd-mod-rrdtool (5.5.3-4) installed in root is up to date.
Package collectd-mod-iwinfo (5.5.3-4) installed in root is up to date.
Package collectd-mod-cpu (5.5.3-4) installed in root is up to date.
Package collectd-mod-memory (5.5.3-4) installed in root is up to date.
Package collectd-mod-interface (5.5.3-4) installed in root is up to date.
Package collectd-mod-load (5.5.3-4) installed in root is up to date.
Package collectd-mod-network (5.5.3-4) installed in root is up to date.
Installing ddns-scripts (2.7.6-13) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/packages/mips_24kc/packages/ddns-scripts_2.7.6-13_all.ipk
Installing wget (1.19.2-2) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/packages/mips_24kc/packages/wget_1.19.2-2_mips_24kc.ipk
Installing libpcre (8.41-2) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/packages/mips_24kc/packages/libpcre_8.41-2_mips_24kc.ipk
Installing libopenssl (1.0.2o-1) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/packages/mips_24kc/base/libopenssl_1.0.2o-1_mips_24kc.ipk
Installing librt (1.1.16-1) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/targets/ar71xx/generic/packages/librt_1.1.16-1_mips_24kc.ipk
Package libpcre (8.41-2) installed in root is up to date.
Package zlib (1.2.11-1) installed in root is up to date.
Package libopenssl (1.0.2o-1) installed in root is up to date.
Package librt (1.1.16-1) installed in root is up to date.
Installing base-files (173.6-r3919-38e704be71) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/targets/ar71xx/generic/packages/base-files_173.6-r3919-38e704be71_mips_24kc.ipk
Installing ubusd (2017-02-18-34c6e818-1) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/packages/mips_24kc/base/ubusd_2017-02-18-34c6e818-1_mips_24kc.ipk
Installing ubus (2017-02-18-34c6e818-1) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/packages/mips_24kc/base/ubus_2017-02-18-34c6e818-1_mips_24kc.ipk
Installing jshn (2018-01-07-1dafcd78-1) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/packages/mips_24kc/base/jshn_2018-01-07-1dafcd78-1_mips_24kc.ipk
Installing netifd (2017-01-25-650758b1-1) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/packages/mips_24kc/base/netifd_2017-01-25-650758b1-1_mips_24kc.ipk
Installing ubox (2017-03-10-16f7e161-1) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/packages/mips_24kc/base/ubox_2017-03-10-16f7e161-1_mips_24kc.ipk
Installing procd (2018-01-22-9a4036fb-1) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/targets/ar71xx/generic/packages/procd_2018-01-22-9a4036fb-1_mips_24kc.ipk
Installing jsonfilter (2016-07-02-dea067ad-1) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/packages/mips_24kc/base/jsonfilter_2016-07-02-dea067ad-1_mips_24kc.ipk
Installing usign (2015-07-04-ef641914-1) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/packages/mips_24kc/base/usign_2015-07-04-ef641914-1_mips_24kc.ipk
Installing lede-keyring (2017-01-20-a50b7529-1) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/packages/mips_24kc/base/lede-keyring_2017-01-20-a50b7529-1_mips_24kc.ipk
Installing fstools (2018-04-16-6609e98a-1) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/targets/ar71xx/generic/packages/fstools_2018-04-16-6609e98a-1_mips_24kc.ipk
Installing fwtool (1) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/targets/ar71xx/generic/packages/fwtool_1_mips_24kc.ipk
Installing busybox (1.25.1-4) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/packages/mips_24kc/base/busybox_1.25.1-4_mips_24kc.ipk
Installing dnsmasq (2.78-6) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/packages/mips_24kc/base/dnsmasq_2.78-6_mips_24kc.ipk
Installing dropbear (2017.75-4) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/packages/mips_24kc/base/dropbear_2017.75-4_mips_24kc.ipk
Package firewall (2017-05-27-a4d98aea-1) installed in root is up to date.
Package fstools (2018-04-16-6609e98a-1) installed in root is up to date.
Installing ip6tables (1.4.21-3) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/packages/mips_24kc/base/ip6tables_1.4.21-3_mips_24kc.ipk
Installing kmod-nf-conntrack6 (4.4.140-1) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/targets/ar71xx/generic/packages/kmod-nf-conntrack6_4.4.140-1_mips_24kc.ipk
Installing kmod-nf-ipt6 (4.4.140-1) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/targets/ar71xx/generic/packages/kmod-nf-ipt6_4.4.140-1_mips_24kc.ipk
Installing kmod-ip6tables (4.4.140-1) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/targets/ar71xx/generic/packages/kmod-ip6tables_4.4.140-1_mips_24kc.ipk
Installing iptables (1.4.21-3) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/packages/mips_24kc/base/iptables_1.4.21-3_mips_24kc.ipk
Package iptables (1.4.21-3) installed in root is up to date.
Package kernel (4.4.140-1-33d452ad71ac13bc6dc71df37efa5ec7) installed in root is up to date.
Installing kmod-ath9k (4.4.140+2017-01-31-5) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/targets/ar71xx/generic/packages/kmod-ath9k_4.4.140%2b2017-01-31-5_mips_24kc.ipk
Installing iw (4.9-1) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/packages/mips_24kc/base/iw_4.9-1_mips_24kc.ipk
Installing kmod-cfg80211 (4.4.140+2017-01-31-5) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/targets/ar71xx/generic/packages/kmod-cfg80211_4.4.140%2b2017-01-31-5_mips_24kc.ipk
Installing hostapd-common (2016-12-19-ad02e79d-7) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/packages/mips_24kc/base/hostapd-common_2016-12-19-ad02e79d-7_mips_24kc.ipk
Installing kmod-mac80211 (4.4.140+2017-01-31-5) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/targets/ar71xx/generic/packages/kmod-mac80211_4.4.140%2b2017-01-31-5_mips_24kc.ipk
Installing kmod-ath (4.4.140+2017-01-31-5) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/targets/ar71xx/generic/packages/kmod-ath_4.4.140%2b2017-01-31-5_mips_24kc.ipk
Installing kmod-ath9k-common (4.4.140+2017-01-31-5) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/targets/ar71xx/generic/packages/kmod-ath9k-common_4.4.140%2b2017-01-31-5_mips_24kc.ipk
Installing kmod-gpio-button-hotplug (4.4.140-2) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/targets/ar71xx/generic/packages/kmod-gpio-button-hotplug_4.4.140-2_mips_24kc.ipk
Installing kmod-usb-core (4.4.140-1) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/targets/ar71xx/generic/packages/kmod-usb-core_4.4.140-1_mips_24kc.ipk
Installing kmod-nls-base (4.4.140-1) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/targets/ar71xx/generic/packages/kmod-nls-base_4.4.140-1_mips_24kc.ipk
Installing kmod-usb-ledtrig-usbport (4.4.140-1) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/targets/ar71xx/generic/packages/kmod-usb-ledtrig-usbport_4.4.140-1_mips_24kc.ipk
Installing kmod-usb2 (4.4.140-1) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/targets/ar71xx/generic/packages/kmod-usb2_4.4.140-1_mips_24kc.ipk
Package libc (1.1.16-1) installed in root is up to date.
Package libgcc (5.4.0-1) installed in root is up to date.
Installing logd (2017-03-10-16f7e161-1) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/packages/mips_24kc/base/logd_2017-03-10-16f7e161-1_mips_24kc.ipk
Installing mtd (23) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/packages/mips_24kc/base/mtd_23_mips_24kc.ipk
Package netifd (2017-01-25-650758b1-1) installed in root is up to date.
Installing odhcp6c (2017-01-30-c13b6a05-2) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/packages/mips_24kc/base/odhcp6c_2017-01-30-c13b6a05-2_mips_24kc.ipk
Installing odhcpd (2018-05-27-59339a76-4) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/packages/mips_24kc/base/odhcpd_2018-05-27-59339a76-4_mips_24kc.ipk
Installing opkg (2017-12-08-9f61f7ac-1) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/targets/ar71xx/generic/packages/opkg_2017-12-08-9f61f7ac-1_mips_24kc.ipk
Installing libuclient (2017-11-02-4b87d831-1) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/packages/mips_24kc/base/libuclient_2017-11-02-4b87d831-1_mips_24kc.ipk
Installing uclient-fetch (2017-11-02-4b87d831-1) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/packages/mips_24kc/base/uclient-fetch_2017-11-02-4b87d831-1_mips_24kc.ipk
Installing ppp (2.4.7-12) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/packages/mips_24kc/base/ppp_2.4.7-12_mips_24kc.ipk
Installing kmod-lib-crc-ccitt (4.4.140-1) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/targets/ar71xx/generic/packages/kmod-lib-crc-ccitt_4.4.140-1_mips_24kc.ipk
Installing kmod-slhc (4.4.140-1) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/targets/ar71xx/generic/packages/kmod-slhc_4.4.140-1_mips_24kc.ipk
Installing kmod-ppp (4.4.140-1) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/targets/ar71xx/generic/packages/kmod-ppp_4.4.140-1_mips_24kc.ipk
Installing ppp-mod-pppoe (2.4.7-12) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/packages/mips_24kc/base/ppp-mod-pppoe_2.4.7-12_mips_24kc.ipk
Installing kmod-pppox (4.4.140-1) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/targets/ar71xx/generic/packages/kmod-pppox_4.4.140-1_mips_24kc.ipk
Installing kmod-pppoe (4.4.140-1) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/targets/ar71xx/generic/packages/kmod-pppoe_4.4.140-1_mips_24kc.ipk
Installing swconfig (11) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/packages/mips_24kc/base/swconfig_11_mips_24kc.ipk
Installing uboot-envtools (2015.10-1) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/targets/ar71xx/generic/packages/uboot-envtools_2015.10-1_mips_24kc.ipk
Installing uci (2018-01-01-141b64ef-1) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/packages/mips_24kc/base/uci_2018-01-01-141b64ef-1_mips_24kc.ipk
Package uclient-fetch (2017-11-02-4b87d831-1) installed in root is up to date.
Installing wpad-mini (2016-12-19-ad02e79d-7) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/packages/mips_24kc/base/wpad-mini_2016-12-19-ad02e79d-7_mips_24kc.ipk
Configuring libubox.
Configuring libuci.
Configuring liblua.
Configuring libuci-lua.
Configuring libpthread.
Configuring zlib.
Configuring libltdl.
Configuring libxtables.
Configuring libip4tc.
Configuring collectd.
Configuring librrd1.
Configuring rrdtool1.
Configuring collectd-mod-rrdtool.
Configuring libnl-tiny.
Configuring libiwinfo.
Configuring collectd-mod-iwinfo.
Configuring collectd-mod-cpu.
Configuring collectd-mod-memory.
Configuring collectd-mod-interface.
Configuring collectd-mod-load.
Configuring collectd-mod-network.
Configuring luci-app-statistics.
Configuring libuclient.
Configuring uclient-fetch.
Configuring opkg.
Configuring libpcre.
Configuring libopenssl.
Configuring librt.
Configuring wget.
Configuring kmod-nls-base.
Configuring kmod-usb-core.
Configuring libubus.
Configuring libjson-c.
Configuring libblobmsg-json.
Configuring ubusd.
Configuring ubus.
Configuring iw.
Configuring rpcd.
Configuring busybox.
Configuring odhcpd.
Configuring luci-lib-ip.
Configuring libubus-lua.
Configuring libiwinfo-lua.
Configuring swconfig.
Configuring kmod-lib-crc-ccitt.
Configuring luci-theme-bootstrap.
Configuring kmod-slhc.
Configuring kmod-ppp.
Configuring kmod-pppox.
Configuring kmod-pppoe.
Configuring kmod-nf-ipt.
Configuring kmod-ipt-core.
Configuring kmod-nf-conntrack.
Configuring kmod-ipt-conntrack.
Configuring jshn.
Configuring netifd.
Configuring libjson-script.
Configuring ubox.
Configuring procd.
Configuring jsonfilter.
Configuring usign.
Configuring lede-keyring.
Configuring fstools.
Configuring fwtool.
Configuring base-files.
Configuring kmod-nf-nat.
Configuring ddns-scripts.
Configuring uboot-envtools.
Configuring dnsmasq.
Configuring kmod-usb2.
Configuring libip6tc.
Configuring kmod-ipt-nat.
Configuring firewall.
Configuring luci-app-firewall.
Configuring kmod-nf-conntrack6.
Configuring kmod-nf-ipt6.
Configuring kmod-ip6tables.
Configuring odhcp6c.
Configuring kmod-cfg80211.
Configuring hostapd-common.
Configuring kmod-mac80211.
Configuring kmod-ath.
Configuring kmod-ath9k-common.
Configuring kmod-ath9k.
Configuring uci.
Configuring lua.
Configuring wpad-mini.
Configuring dropbear.
Configuring mtd.
Configuring luci-proto-ppp.
Configuring luci-lib-nixio.
Configuring luci-lib-jsonc.
Configuring luci-base.
Configuring luci-mod-admin-full.
Configuring ppp.
Configuring kmod-gpio-button-hotplug.
Configuring logd.
Configuring luci-proto-ipv6.
Configuring iptables.
Configuring uhttpd.
Configuring ip6tables.
Configuring uhttpd-mod-ubus.
Configuring luci.
Configuring kmod-usb-ledtrig-usbport.
Configuring ppp-mod-pppoe.

Cleaning up

Activating init scripts

Building images...
19+1 records in
20+0 records out
1310720 bytes (1.3 MB, 1.2 MiB) copied, 0.00231619 s, 566 MB/s
Image Name:   MIPS OpenWrt Linux-4.4.140
Created:      Wed Jul 18 11:40:27 2018
Image Type:   MIPS Linux Kernel Image (lzma compressed)
Data Size:    1272581 Bytes = 1242.75 kB = 1.21 MB
Load Address: 80060000
Entry Point:  80060000
Parallel mksquashfs: Using 1 processor
Creating 4.0 filesystem on /home/mikael/LEDE/stable/lede-imagebuilder-17.01.5-ar71xx-generic.Linux-x86_64/build_dir/target-mips_24kc_musl-1.1.16/linux-ar71xx_generic/root.squashfs, block size 262144.
Pseudo file "/dev" exists in source filesystem "/home/mikael/LEDE/stable/lede-imagebuilder-17.01.5-ar71xx-generic.Linux-x86_64/build_dir/target-mips_24kc_musl-1.1.16/root-ar71xx/dev".
Ignoring, exclude it (-e/-ef) to override.
[=======================================================================================================================================================================\] 1030/1030 100%
Exportable Squashfs 4.0 filesystem, xz compressed, data block size 262144
    compressed data, compressed metadata, compressed fragments, no xattrs
    duplicates are removed
Filesystem size 3275.82 Kbytes (3.20 Mbytes)
    32.36% of uncompressed filesystem size (10122.34 Kbytes)
Inode table size 10368 bytes (10.12 Kbytes)
    23.63% of uncompressed inode table size (43884 bytes)
Directory table size 13180 bytes (12.87 Kbytes)
    46.94% of uncompressed directory table size (28080 bytes)
Number of duplicate files found 115
Number of inodes 1332
Number of files 1021
Number of fragments 22
Number of symbolic links  195
Number of device nodes 1
Number of fifo nodes 0
Number of socket nodes 0
Number of directories 115
Number of ids (unique uids + gids) 1
Number of uids 1
Inconsistency detected by ld.so: dl-open.c: 689: _dl_open: Assertion `_dl_debug_initialize (0, args.nsid)->r_state == RT_CONSISTENT' failed!
make[3]: *** [/home/mikael/LEDE/stable/lede-imagebuilder-17.01.5-ar71xx-generic.Linux-x86_64/include/image.mk:310: /home/mikael/LEDE/stable/lede-imagebuilder-17.01.5-ar71xx-generic.Linux-x86_64/build_dir/target-mips_24kc_musl-1.1.16/linux-ar71xx_generic/root.squashfs] Error 127
make[2]: *** [Makefile:178: build_image] Error 2
make[1]: *** [Makefile:118: _call_image] Error 2
make: *** [Makefile:203: image] Error 2
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From mschiffer at universe-factory.net  Wed Jul 18 13:04:39 2018
From: mschiffer at universe-factory.net (Matthias Schiffer)
Date: Wed, 18 Jul 2018 19:04:39 +0200
Subject: [OpenWrt-Devel] ar71xx: add support for UniFi-AC-Mesh-Pro
In-Reply-To: <CAEQ_PoyX2yQGiQgXxCbZcdi0orxLxhPRys-m9Ma8MeNbB5SxGQ@mail.gmail.com>
References: <CAEQ_PoyX2yQGiQgXxCbZcdi0orxLxhPRys-m9Ma8MeNbB5SxGQ@mail.gmail.com>
Message-ID: <98c0994b-1069-9268-414c-25f609352d0a@universe-factory.net>

On 07/07/2018 10:34 PM, Christoph Krapp wrote:
> Hi,
> 
> i'm writing to the mailing list because mkresin closed my github pr[1]
> and pointed me here.
> The PR adds model detection for Ubiquity UniFi-AC-Mesh-Pro to the
> ar71xx target. The source of inspiration was the commit that added
> UniFi-AC-Mesh detection [2].
> This patch is needed for the gluon project as we need to distinguish
> between indoor and outdoor devices. Right now some communities use the
> ap-ac-pro image and have to manually configure the 5GHz channel to
> comply with the local rules. This could be done automatically if the
> detection gets merged.
> mkresin merged the ath79 patch and therefore closed the arth71xx pr.
> As the ath79 target is not finished right now and disabled in
> openwrt-18.06 we need the ar71xx patch as the next gluon version will
> be based on 18.06.
> So please consider to merge this patch and backport it to the 18.06
> branch as it only adds an alias and the model detection was tested
> successfully by multiple people on both devices.
> 
> Thanks,
> achterin
> 
> [1] https://github.com/openwrt/openwrt/pull/1107
> [2] https://github.com/openwrt/openwrt/commit/f8dbafb234c9a0a836ff3bede0540c20914b6d4e
> 


Having a way to get ath79 hardware backports into 18.06 would be nice; I
see three options here:

1) Continue accepting ar71xx patches in the OpenWrt master, backport to 18.06
2) Directly merge ar71xx patches to 18.06 without applying them to master first
3) Backport the ath79 target to 18.06 (I think having ath79 in 18.06 was
planned, but it was removed because it was not ready yet - which might have
changed by now?)

In any case, the ath79 target should take precedence, and we should not
accept ar71xx hardware support patches in either of the branches as long as
the hardware has not been added to ath79 first.

Regards,
Matthias

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20180718/74491f58/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From Jason at zx2c4.com  Wed Jul 18 19:36:33 2018
From: Jason at zx2c4.com (Jason A. Donenfeld)
Date: Thu, 19 Jul 2018 01:36:33 +0200
Subject: [OpenWrt-Devel] [PATCH] wireguard: bump to 0.0.20180718
Message-ID: <20180718233633.32247-1-Jason@zx2c4.com>

Signed-off-by: Jason A. Donenfeld <Jason at zx2c4.com>
---
 package/network/services/wireguard/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/network/services/wireguard/Makefile b/package/network/services/wireguard/Makefile
index 90ecae3..9965002 100644
--- a/package/network/services/wireguard/Makefile
+++ b/package/network/services/wireguard/Makefile
@@ -11,12 +11,12 @@ include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=wireguard
 
-PKG_VERSION:=0.0.20180708
+PKG_VERSION:=0.0.20180718
 PKG_RELEASE:=1
 
 PKG_SOURCE:=WireGuard-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://git.zx2c4.com/WireGuard/snapshot/
-PKG_HASH:=5e38d554f7d1e3a64e3a5319ca1a3b790c84ed89c896586c490a93ac1f953a91
+PKG_HASH:=083c093a6948c8d38f92e7ea5533f9ff926019f24dc2612ea974851ed3e24705
 
 PKG_LICENSE:=GPL-2.0 Apache-2.0
 PKG_LICENSE_FILES:=COPYING
-- 
2.18.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From jo at mein.io  Thu Jul 19 02:08:18 2018
From: jo at mein.io (Jo-Philipp Wich)
Date: Thu, 19 Jul 2018 08:08:18 +0200
Subject: [OpenWrt-Devel]
 lede-imagebuilder-17.01.5-ar71xx-generic.Linux-x86_64 fails to build image
In-Reply-To: <bb967294f3a37a12aab7d4b71cc7fa8c@mail.iszerviz.hu>
References: <bb967294f3a37a12aab7d4b71cc7fa8c@mail.iszerviz.hu>
Message-ID: <14d58aa7-9065-4c88-5d38-7e3c349b773a@mein.io>

Hi,

works for me on Debian 9 und Ubuntu 18. I've got reports that it is
broken on Arch which I am currently trying to install but it seems to be
a pain....

~ Jo

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20180719/210de6d0/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From jo at mein.io  Thu Jul 19 02:49:20 2018
From: jo at mein.io (Jo-Philipp Wich)
Date: Thu, 19 Jul 2018 08:49:20 +0200
Subject: [OpenWrt-Devel]
 lede-imagebuilder-17.01.5-ar71xx-generic.Linux-x86_64 fails to build image
In-Reply-To: <14d58aa7-9065-4c88-5d38-7e3c349b773a@mein.io>
References: <bb967294f3a37a12aab7d4b71cc7fa8c@mail.iszerviz.hu>
 <14d58aa7-9065-4c88-5d38-7e3c349b773a@mein.io>
Message-ID: <31966504-1505-a22d-c133-f5c84ecdddd1@mein.io>

Hi again,

As a workaround, run the following command once within the IB/SDK directory:

sed -i -e 's,/\(usr\|lib\|etc\)/,/###/,g' ./staging_dir/host/lib/libc.so.6


This will prevent the bundled glibc from trying to dlopen() libraries on
the host system which is the root cause of the assertion.

~ Jo


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20180719/83997c1c/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From mbak at fxnet.hu  Thu Jul 19 05:13:43 2018
From: mbak at fxnet.hu (Mikael Bak)
Date: Thu, 19 Jul 2018 11:13:43 +0200
Subject: [OpenWrt-Devel]
 lede-imagebuilder-17.01.5-ar71xx-generic.Linux-x86_64 fails to build image
In-Reply-To: <31966504-1505-a22d-c133-f5c84ecdddd1@mein.io>
References: <bb967294f3a37a12aab7d4b71cc7fa8c@mail.iszerviz.hu>
 <14d58aa7-9065-4c88-5d38-7e3c349b773a@mein.io>
 <31966504-1505-a22d-c133-f5c84ecdddd1@mein.io>
Message-ID: <46d59534-d423-df1d-2996-c03f702ac3e6@fxnet.hu>

Hi,

On 2018-07-19 08:49, Jo-Philipp Wich wrote:
> Hi again,
> 
> As a workaround, run the following command once within the IB/SDK directory:
> 
> sed -i -e 's,/\(usr\|lib\|etc\)/,/###/,g' ./staging_dir/host/lib/libc.so.6
> 

Executing the above command solves the problem on my system (Manjaro - 
similar to Arch).

> 
> This will prevent the bundled glibc from trying to dlopen() libraries on
> the host system which is the root cause of the assertion.
> 

Thank you very much for the quick workaround!

Is it generally recommended to use Debian or Ubuntu for building images? 
I do not have to use Manjaro for that if it's difficult for the project 
to support it.

Cheers,
Mikael

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From hacks at slashdirt.org  Thu Jul 19 08:41:49 2018
From: hacks at slashdirt.org (Thibaut)
Date: Thu, 19 Jul 2018 14:41:49 +0200
Subject: [OpenWrt-Devel] [18.06] ramips: remove RB750GR3 support
Message-ID: <73C96E3C-DB95-448E-B2E7-F741B18DA683@slashdirt.org>

Detailed rationale:
? This code should never have been accepted: it should certainly not be part of a release and if it accidentally was part of one that should absolutely not be reason to continue what is IMO a mistake.
? This code does not support the stock hardware
? This code is a maintenance burden (it's a custom hack, in essence)
? This code will induce confusion with end user when the new code is introduced
? There will be no upgrade path between this code and the new support

Assuming there?s more than a single user for this code (which I doubt considering the wiki suggests using an SPI flash programmer to install), the supplementary rationale from my point of view is thus precisely to break the support chain and make it perfectly clear that current ?support" stops in 18.06 without what could be taken as a sign of a transition ("oh, image has changed name but it should still be the right one"): old support in 17, nothing in 18, new support in 19: clean break.

No replacement is proposed since no such a thing can exist: stock hw uses a different bootloader (routerboot) which expects a different image format, and uses an incompatible mtd flash partitioning.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-ramips-remove-RB750GR3-support.patch
Type: application/octet-stream
Size: 5307 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20180719/e7c95214/attachment.obj>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From hacks at slashdirt.org  Thu Jul 19 12:06:21 2018
From: hacks at slashdirt.org (=?UTF-8?q?Thibaut=20VAR=C3=88NE?=)
Date: Thu, 19 Jul 2018 18:06:21 +0200
Subject: [OpenWrt-Devel] [PATCH] ramips: define common MikroTik RouterBOARD
 image recipe
Message-ID: <20180719160621.43367-1-hacks@slashdirt.org>

All these devices share the exact same image format.

Signed-off-by: Thibaut VAR?NE <hacks at slashdirt.org>
---
 target/linux/ramips/image/mt7621.mk | 20 +++++++++-----------
 1 file changed, 9 insertions(+), 11 deletions(-)

diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk
index fa87e40520..8ac78ad7de 100644
--- a/target/linux/ramips/image/mt7621.mk
+++ b/target/linux/ramips/image/mt7621.mk
@@ -260,11 +260,9 @@ define Device/rb750gr3
 endef
 TARGET_DEVICES += rb750gr3
 
-define Device/mikrotik_rbm33g
-  DTS := RBM33G
+define Device/MikroTik
   BLOCKSIZE := 64k
   IMAGE_SIZE := 16128k
-  DEVICE_TITLE := MikroTik RBM33G
   DEVICE_PACKAGES := kmod-usb3
   LOADER_TYPE := elf
   PLATFORM := mt7621
@@ -272,18 +270,18 @@ define Device/mikrotik_rbm33g
   IMAGE/sysupgrade.bin := append-kernel | kernel2minor -s 1024 | pad-to $$$$(BLOCKSIZE) | \
 	append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
 endef
+
+define Device/mikrotik_rbm33g
+  $(Device/MikroTik)
+  DTS := RBM33G
+  DEVICE_TITLE := MikroTik RouterBOARD M33G
+endef
 TARGET_DEVICES += mikrotik_rbm33g
 
 define Device/mikrotik_rbm11g
+  $(Device/MikroTik)
   DTS := RBM11G
-  BLOCKSIZE := 64k
-  IMAGE_SIZE := 16128k
-  DEVICE_TITLE := MikroTik RBM11G
-  LOADER_TYPE := elf
-  PLATFORM := mt7621
-  KERNEL := kernel-bin | patch-dtb | lzma | loader-kernel
-  IMAGE/sysupgrade.bin := append-kernel | kernel2minor -s 1024 | pad-to $$$$(BLOCKSIZE) | \
-	append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
+  DEVICE_TITLE := MikroTik RouterBOARD M11G
 endef
 TARGET_DEVICES += mikrotik_rbm11g
 
-- 
2.14.3 (Apple Git-98)


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From dev at kresin.me  Thu Jul 19 13:05:32 2018
From: dev at kresin.me (Mathias Kresin)
Date: Thu, 19 Jul 2018 19:05:32 +0200
Subject: [OpenWrt-Devel] [PATCH 1/3] kernel: improve ubi auto attach code
 readability
Message-ID: <1532019934-6284-1-git-send-email-dev@kresin.me>

The early return on failed open of the mtd device allows to get rid of
one level of indentation.

Move the put_mtd_device() called on multiple error conditions to a goto
label to use it later for more error conditions.

While at it, make clear that we only check for the UBI magic if the read
from flash was successful.

Signed-off-by: Mathias Kresin <dev at kresin.me>
---
 ...tach-mtd-device-named-ubi-or-data-on-boot.patch | 54 ++++++++++++----------
 ...tach-mtd-device-named-ubi-or-data-on-boot.patch | 54 ++++++++++++----------
 2 files changed, 58 insertions(+), 50 deletions(-)

diff --git a/target/linux/generic/pending-4.14/490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch b/target/linux/generic/pending-4.14/490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch
index 63afabb..83b0c72 100644
--- a/target/linux/generic/pending-4.14/490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch
+++ b/target/linux/generic/pending-4.14/490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch
@@ -8,7 +8,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
 
 --- a/drivers/mtd/ubi/build.c
 +++ b/drivers/mtd/ubi/build.c
-@@ -1171,6 +1171,49 @@ static struct mtd_info * __init open_mtd
+@@ -1171,6 +1171,53 @@ static struct mtd_info * __init open_mtd
  	return mtd;
  }
  
@@ -20,45 +20,49 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
 +{
 +	int err;
 +	struct mtd_info *mtd;
++	size_t len;
++	char magic[4];
 +
 +	/* try attaching mtd device named "ubi" or "data" */
 +	mtd = open_mtd_device("ubi");
 +	if (IS_ERR(mtd))
 +		mtd = open_mtd_device("data");
 +
-+	if (!IS_ERR(mtd)) {
-+		size_t len;
-+		char magic[4];
++	if (IS_ERR(mtd))
++		return;
 +
-+		/* check for a valid ubi magic */
-+		err = mtd_read(mtd, 0, 4, &len, (void *) magic);
-+		if (!err && len == 4 && strncmp(magic, "UBI#", 4)) {
-+			pr_err("UBI error: no valid UBI magic found inside mtd%d\n", mtd->index);
-+			put_mtd_device(mtd);
-+			return;
-+		}
++	/* check for a valid ubi magic if read from flash was successful */
++	err = mtd_read(mtd, 0, 4, &len, (void *) magic);
++	if (!err && len == 4 && strncmp(magic, "UBI#", 4)) {
++		pr_err("UBI error: no valid UBI magic found inside mtd%d\n", mtd->index);
++		goto cleanup;
++	}
 +
-+		/* auto-add only media types where UBI makes sense */
-+		if (mtd->type == MTD_NANDFLASH ||
-+		    mtd->type == MTD_NORFLASH ||
-+		    mtd->type == MTD_DATAFLASH ||
-+		    mtd->type == MTD_MLCNANDFLASH) {
-+			mutex_lock(&ubi_devices_mutex);
-+			pr_notice("UBI: auto-attach mtd%d\n", mtd->index);
-+			err = ubi_attach_mtd_dev(mtd, UBI_DEV_NUM_AUTO, 0, 0);
-+			mutex_unlock(&ubi_devices_mutex);
-+			if (err < 0) {
-+				pr_err("UBI error: cannot attach mtd%d\n", mtd->index);
-+				put_mtd_device(mtd);
-+			}
++	/* auto-add only media types where UBI makes sense */
++	if (mtd->type == MTD_NANDFLASH ||
++	    mtd->type == MTD_NORFLASH ||
++	    mtd->type == MTD_DATAFLASH ||
++	    mtd->type == MTD_MLCNANDFLASH) {
++		mutex_lock(&ubi_devices_mutex);
++		pr_notice("UBI: auto-attach mtd%d\n", mtd->index);
++		err = ubi_attach_mtd_dev(mtd, UBI_DEV_NUM_AUTO, 0, 0);
++		mutex_unlock(&ubi_devices_mutex);
++		if (err < 0) {
++			pr_err("UBI error: cannot attach mtd%d\n", mtd->index);
++			goto cleanup;
 +		}
 +	}
++
++	return;
++
++cleanup:
++	put_mtd_device(mtd);
 +}
 +
  static int __init ubi_init(void)
  {
  	int err, i, k;
-@@ -1254,6 +1297,12 @@ static int __init ubi_init(void)
+@@ -1254,6 +1301,12 @@ static int __init ubi_init(void)
  		}
  	}
  
diff --git a/target/linux/generic/pending-4.9/490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch b/target/linux/generic/pending-4.9/490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch
index 8b37dba..d6585b1 100644
--- a/target/linux/generic/pending-4.9/490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch
+++ b/target/linux/generic/pending-4.9/490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch
@@ -8,7 +8,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
 
 --- a/drivers/mtd/ubi/build.c
 +++ b/drivers/mtd/ubi/build.c
-@@ -1226,6 +1226,49 @@ static struct mtd_info * __init open_mtd
+@@ -1226,6 +1226,53 @@ static struct mtd_info * __init open_mtd
  	return mtd;
  }
  
@@ -20,45 +20,49 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
 +{
 +	int err;
 +	struct mtd_info *mtd;
++	size_t len;
++	char magic[4];
 +
 +	/* try attaching mtd device named "ubi" or "data" */
 +	mtd = open_mtd_device("ubi");
 +	if (IS_ERR(mtd))
 +		mtd = open_mtd_device("data");
 +
-+	if (!IS_ERR(mtd)) {
-+		size_t len;
-+		char magic[4];
++	if (IS_ERR(mtd))
++		return;
 +
-+		/* check for a valid ubi magic */
-+		err = mtd_read(mtd, 0, 4, &len, (void *) magic);
-+		if (!err && len == 4 && strncmp(magic, "UBI#", 4)) {
-+			pr_err("UBI error: no valid UBI magic found inside mtd%d\n", mtd->index);
-+			put_mtd_device(mtd);
-+			return;
-+		}
++	/* check for a valid ubi magic if read from flash was successful */
++	err = mtd_read(mtd, 0, 4, &len, (void *) magic);
++	if (!err && len == 4 && strncmp(magic, "UBI#", 4)) {
++		pr_err("UBI error: no valid UBI magic found inside mtd%d\n", mtd->index);
++		goto cleanup;
++	}
 +
-+		/* auto-add only media types where UBI makes sense */
-+		if (mtd->type == MTD_NANDFLASH ||
-+		    mtd->type == MTD_NORFLASH ||
-+		    mtd->type == MTD_DATAFLASH ||
-+		    mtd->type == MTD_MLCNANDFLASH) {
-+			mutex_lock(&ubi_devices_mutex);
-+			pr_notice("UBI: auto-attach mtd%d\n", mtd->index);
-+			err = ubi_attach_mtd_dev(mtd, UBI_DEV_NUM_AUTO, 0, 0);
-+			mutex_unlock(&ubi_devices_mutex);
-+			if (err < 0) {
-+				pr_err("UBI error: cannot attach mtd%d\n", mtd->index);
-+				put_mtd_device(mtd);
-+			}
++	/* auto-add only media types where UBI makes sense */
++	if (mtd->type == MTD_NANDFLASH ||
++	    mtd->type == MTD_NORFLASH ||
++	    mtd->type == MTD_DATAFLASH ||
++	    mtd->type == MTD_MLCNANDFLASH) {
++		mutex_lock(&ubi_devices_mutex);
++		pr_notice("UBI: auto-attach mtd%d\n", mtd->index);
++		err = ubi_attach_mtd_dev(mtd, UBI_DEV_NUM_AUTO, 0, 0);
++		mutex_unlock(&ubi_devices_mutex);
++		if (err < 0) {
++			pr_err("UBI error: cannot attach mtd%d\n", mtd->index);
++			goto cleanup;
 +		}
 +	}
++
++	return;
++
++cleanup:
++	put_mtd_device(mtd);
 +}
 +
  static int __init ubi_init(void)
  {
  	int err, i, k;
-@@ -1309,6 +1352,12 @@ static int __init ubi_init(void)
+@@ -1309,6 +1356,12 @@ static int __init ubi_init(void)
  		}
  	}
  
-- 
2.7.4


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From dev at kresin.me  Thu Jul 19 13:05:33 2018
From: dev at kresin.me (Mathias Kresin)
Date: Thu, 19 Jul 2018 19:05:33 +0200
Subject: [OpenWrt-Devel] [PATCH 2/3] kernel: handle bad blocks in ubi auto
 attach code
In-Reply-To: <1532019934-6284-1-git-send-email-dev@kresin.me>
References: <1532019934-6284-1-git-send-email-dev@kresin.me>
Message-ID: <1532019934-6284-2-git-send-email-dev@kresin.me>

The first block(s) of the ubi mtd device might be bad. We need to take
care on our own to skip the bad block(s) and read the next one(s).

Don't treat recoverable read errors as fatal and check for the UBI magic
if the data of a block could be recovered using ECC or similar.

Signed-off-by: Mathias Kresin <dev at kresin.me>
---
 ...tach-mtd-device-named-ubi-or-data-on-boot.patch | 22 ++++++++++++++++++----
 ...tach-mtd-device-named-ubi-or-data-on-boot.patch | 22 ++++++++++++++++++----
 2 files changed, 36 insertions(+), 8 deletions(-)

diff --git a/target/linux/generic/pending-4.14/490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch b/target/linux/generic/pending-4.14/490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch
index 83b0c72..b6890e3 100644
--- a/target/linux/generic/pending-4.14/490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch
+++ b/target/linux/generic/pending-4.14/490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch
@@ -8,7 +8,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
 
 --- a/drivers/mtd/ubi/build.c
 +++ b/drivers/mtd/ubi/build.c
-@@ -1171,6 +1171,53 @@ static struct mtd_info * __init open_mtd
+@@ -1171,6 +1171,67 @@ static struct mtd_info * __init open_mtd
  	return mtd;
  }
  
@@ -20,6 +20,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
 +{
 +	int err;
 +	struct mtd_info *mtd;
++	loff_t offset = 0;
 +	size_t len;
 +	char magic[4];
 +
@@ -31,9 +32,22 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
 +	if (IS_ERR(mtd))
 +		return;
 +
++	/* get the first not bad block */
++	if (mtd_can_have_bb(mtd))
++		while (mtd_block_isbad(mtd, offset)) {
++			offset += mtd->erasesize;
++
++			if (offset > mtd->size) {
++				pr_err("UBI error: Failed to find a non-bad "
++				       "block on mtd%d\n", mtd->index);
++				goto cleanup;
++			}
++		}
++
 +	/* check for a valid ubi magic if read from flash was successful */
-+	err = mtd_read(mtd, 0, 4, &len, (void *) magic);
-+	if (!err && len == 4 && strncmp(magic, "UBI#", 4)) {
++	err = mtd_read(mtd, offset, 4, &len, (void *) magic);
++	if ((!err || mtd_is_bitflip(err)) &&
++	    len == 4 && strncmp(magic, "UBI#", 4)) {
 +		pr_err("UBI error: no valid UBI magic found inside mtd%d\n", mtd->index);
 +		goto cleanup;
 +	}
@@ -62,7 +76,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  static int __init ubi_init(void)
  {
  	int err, i, k;
-@@ -1254,6 +1301,12 @@ static int __init ubi_init(void)
+@@ -1254,6 +1315,12 @@ static int __init ubi_init(void)
  		}
  	}
  
diff --git a/target/linux/generic/pending-4.9/490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch b/target/linux/generic/pending-4.9/490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch
index d6585b1..4051a01 100644
--- a/target/linux/generic/pending-4.9/490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch
+++ b/target/linux/generic/pending-4.9/490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch
@@ -8,7 +8,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
 
 --- a/drivers/mtd/ubi/build.c
 +++ b/drivers/mtd/ubi/build.c
-@@ -1226,6 +1226,53 @@ static struct mtd_info * __init open_mtd
+@@ -1226,6 +1226,67 @@ static struct mtd_info * __init open_mtd
  	return mtd;
  }
  
@@ -20,6 +20,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
 +{
 +	int err;
 +	struct mtd_info *mtd;
++	loff_t offset = 0;
 +	size_t len;
 +	char magic[4];
 +
@@ -31,9 +32,22 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
 +	if (IS_ERR(mtd))
 +		return;
 +
++	/* get the first not bad block */
++	if (mtd_can_have_bb(mtd))
++		while (mtd_block_isbad(mtd, offset)) {
++			offset += mtd->erasesize;
++
++			if (offset > mtd->size) {
++				pr_err("UBI error: Failed to find a non-bad "
++				       "block on mtd%d\n", mtd->index);
++				goto cleanup;
++			}
++		}
++
 +	/* check for a valid ubi magic if read from flash was successful */
-+	err = mtd_read(mtd, 0, 4, &len, (void *) magic);
-+	if (!err && len == 4 && strncmp(magic, "UBI#", 4)) {
++	err = mtd_read(mtd, offset, 4, &len, (void *) magic);
++	if ((!err || mtd_is_bitflip(err)) &&
++	    len == 4 && strncmp(magic, "UBI#", 4)) {
 +		pr_err("UBI error: no valid UBI magic found inside mtd%d\n", mtd->index);
 +		goto cleanup;
 +	}
@@ -62,7 +76,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  static int __init ubi_init(void)
  {
  	int err, i, k;
-@@ -1309,6 +1356,12 @@ static int __init ubi_init(void)
+@@ -1309,6 +1370,12 @@ static int __init ubi_init(void)
  		}
  	}
  
-- 
2.7.4


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From dev at kresin.me  Thu Jul 19 13:05:34 2018
From: dev at kresin.me (Mathias Kresin)
Date: Thu, 19 Jul 2018 19:05:34 +0200
Subject: [OpenWrt-Devel] [PATCH 3/3] kernel: don't auto attach ubi on read
 error
In-Reply-To: <1532019934-6284-1-git-send-email-dev@kresin.me>
References: <1532019934-6284-1-git-send-email-dev@kresin.me>
Message-ID: <1532019934-6284-3-git-send-email-dev@kresin.me>

With a10a204aab26cc ("kernel: make ubi auto-attach check for a tar file
magic") the check for the magic was added without considering a failing
mtd_read(). If the read fails, no check is done and the mount code is
called straight away.

Failing with an error message for such cases seems to me the cleaner way,
as it would allow to spot hidden/workaround issues.

Signed-off-by: Mathias Kresin <dev at kresin.me>
---
 ...auto-attach-mtd-device-named-ubi-or-data-on-boot.patch | 15 ++++++++++-----
 ...auto-attach-mtd-device-named-ubi-or-data-on-boot.patch | 15 ++++++++++-----
 2 files changed, 20 insertions(+), 10 deletions(-)

diff --git a/target/linux/generic/pending-4.14/490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch b/target/linux/generic/pending-4.14/490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch
index b6890e3..ae93d12 100644
--- a/target/linux/generic/pending-4.14/490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch
+++ b/target/linux/generic/pending-4.14/490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch
@@ -8,7 +8,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
 
 --- a/drivers/mtd/ubi/build.c
 +++ b/drivers/mtd/ubi/build.c
-@@ -1171,6 +1171,67 @@ static struct mtd_info * __init open_mtd
+@@ -1171,6 +1171,72 @@ static struct mtd_info * __init open_mtd
  	return mtd;
  }
  
@@ -44,10 +44,15 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
 +			}
 +		}
 +
-+	/* check for a valid ubi magic if read from flash was successful */
++	/* check if the read from flash was successful */
 +	err = mtd_read(mtd, offset, 4, &len, (void *) magic);
-+	if ((!err || mtd_is_bitflip(err)) &&
-+	    len == 4 && strncmp(magic, "UBI#", 4)) {
++	if ((err && !mtd_is_bitflip(err)) || len != 4) {
++		pr_err("UBI error: unable to read from mtd%d\n", mtd->index);
++		goto cleanup;
++	}
++
++	/* check for a valid ubi magic */
++	if (strncmp(magic, "UBI#", 4)) {
 +		pr_err("UBI error: no valid UBI magic found inside mtd%d\n", mtd->index);
 +		goto cleanup;
 +	}
@@ -76,7 +81,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  static int __init ubi_init(void)
  {
  	int err, i, k;
-@@ -1254,6 +1315,12 @@ static int __init ubi_init(void)
+@@ -1254,6 +1320,12 @@ static int __init ubi_init(void)
  		}
  	}
  
diff --git a/target/linux/generic/pending-4.9/490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch b/target/linux/generic/pending-4.9/490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch
index 4051a01..8ce508e 100644
--- a/target/linux/generic/pending-4.9/490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch
+++ b/target/linux/generic/pending-4.9/490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch
@@ -8,7 +8,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
 
 --- a/drivers/mtd/ubi/build.c
 +++ b/drivers/mtd/ubi/build.c
-@@ -1226,6 +1226,67 @@ static struct mtd_info * __init open_mtd
+@@ -1226,6 +1226,72 @@ static struct mtd_info * __init open_mtd
  	return mtd;
  }
  
@@ -44,10 +44,15 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
 +			}
 +		}
 +
-+	/* check for a valid ubi magic if read from flash was successful */
++	/* check if the read from flash was successful */
 +	err = mtd_read(mtd, offset, 4, &len, (void *) magic);
-+	if ((!err || mtd_is_bitflip(err)) &&
-+	    len == 4 && strncmp(magic, "UBI#", 4)) {
++	if ((err && !mtd_is_bitflip(err)) || len != 4) {
++		pr_err("UBI error: unable to read from mtd%d\n", mtd->index);
++		goto cleanup;
++	}
++
++	/* check for a valid ubi magic */
++	if (strncmp(magic, "UBI#", 4)) {
 +		pr_err("UBI error: no valid UBI magic found inside mtd%d\n", mtd->index);
 +		goto cleanup;
 +	}
@@ -76,7 +81,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  static int __init ubi_init(void)
  {
  	int err, i, k;
-@@ -1309,6 +1370,12 @@ static int __init ubi_init(void)
+@@ -1309,6 +1375,12 @@ static int __init ubi_init(void)
  		}
  	}
  
-- 
2.7.4


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From hacks at slashdirt.org  Thu Jul 19 13:12:31 2018
From: hacks at slashdirt.org (=?UTF-8?q?Thibaut=20VAR=C3=88NE?=)
Date: Thu, 19 Jul 2018 19:12:31 +0200
Subject: [OpenWrt-Devel] [PATCH 0/2] ramips: fix RBMxxG name and
 partitionning
Message-ID: <20180719171233.43763-1-hacks@slashdirt.org>

This series fix the DTS files of the MikroTik RouterBOARD M11G and M33G. The
changes are similar in both patches:

 - The model name string is updated to match the hardware-stored (in flash)
   string that we cannot (yet?) extract at runtime.
 - The partition scheme is updated to reflect areas reserved by OEM (as defined
   in their GPL source code) and the reverse-engineered sections contained
   herein.

The proposed partition scheme defines a "top-level" overlapping "RouterBoot"
partition that matches the identically named, OEM-defined segment (in their GPL
code), and then defines extrapolated sub-segments.

The rationale for this is as follows:
 - OEM only defines the 0x0 0x40000 segment in their source: the whole segment
   should thus be considered "reserved by OEM", despite having empty holes.
 - The subsegments are reverse-engineered (initially by Gabor Juhos in
   target/linux/ar71xx/files/arch/mips/ath79/routerboot.c) and may vary from
   hardware to hardware (they are already different in size and offsets between
   ar71xx and ramips).
 - We have no certitude that the empty holes will remain empty: it is desirable
   to make it perfectly clear that they should never be reclaimed as user
   storage space (preferably without having to define a clutter of empty
   partitions).
 - OEM tools might be usable with this top level partition present and named
   identically with OEM.
 - The top level partition is a convenient way to ask for a user dump ("please
   send the content of the RouterBoot partition") and build a database of such
   dumps whose use will become apparent below.
 - I expect it might eventually be possible to split that top level partition
   at runtime with a splitter.

This last point is of particular significance: currently the proposed partition
scheme "emulates" what the purported splitter would produce at runtime. In an
ideal world the DTS would only define the top-level RouterBoot area and the
splitter would produce the exact same partition as is currently defined, in a
fashion very similar to what is done with e.g. the 'firmware' partition.
Regardless, in this situation the partition scheme for these devices would thus
not change.

I cannot immediately provide such a runtime splitter, notably because I would
need to collect several dumps to extract a statistically meaningful working set
to test the splitter code against; and also because of DTS-specific challenges
associated with this proposal (the MAC address and ART data are contained in a
specific sub-partition currently directly referred in DTS).

These subpartitions are nevertheless necessary in their own right: besides the
primary and secondary bootloader (apparently common to all RB devices, across
all platforms) defined as 'routerboot' and 'routerboot2', the 'hard_config'
segment contains the device MAC address, its model name string, its serial
number or its WLAN calibration data for instance.
The 'soft_config' partition contains user-modifiable settings such as boot
delay, boot order, selected bootloader, cpu frequency scaling or uart speed.
These settings can be accessed and modified in OpenWRT via the 'rbcfg' utility,
which relies on the presence of the 'soft_config' partition to operate. This
explains the naming choice for these subpartitions: it's been carried over from
ar71xx for consistency.

Thibaut VAR?NE (2):
  ramips: fix RBM33G name and partitioning
  ramips: fix RBM11G name and partitioning

 target/linux/ramips/dts/RBM11G.dts | 62 ++++++++++++++++++++++++++----------
 target/linux/ramips/dts/RBM33G.dts | 64 +++++++++++++++++++++++++++++---------
 2 files changed, 95 insertions(+), 31 deletions(-)

-- 
2.14.3 (Apple Git-98)


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From hacks at slashdirt.org  Thu Jul 19 13:12:32 2018
From: hacks at slashdirt.org (=?UTF-8?q?Thibaut=20VAR=C3=88NE?=)
Date: Thu, 19 Jul 2018 19:12:32 +0200
Subject: [OpenWrt-Devel] [PATCH 1/2] ramips: fix RBM33G name and partitioning
In-Reply-To: <20180719171233.43763-1-hacks@slashdirt.org>
References: <20180719171233.43763-1-hacks@slashdirt.org>
Message-ID: <20180719171233.43763-2-hacks@slashdirt.org>

This patch improves 5684d087418d176cfdef4e045e1950ca7ba3b09f by setting
the correct partition scheme for the RouterBoot section of the flash.

This section is subdivided in several segments, as they are on ar71xx
RB devices, albeit with different offsets and sizes. The naming convention
from ar71xx has been preserved, with an overlapping "RouterBoot" top level
partition added for clarity due to the many holes.

The OEM source code also define a "fake" partition at the beginning of
the secondary flash chip: to avoid trouble if OEM ever make use of that
space, we define it here.

The resulting partition scheme looks like this:
[    2.355095] Creating 6 MTD partitions on "spi0.0":
[    2.359872] 0x000000000000-0x000000040000 : "RouterBoot"
[    2.366197] 0x000000000000-0x00000000f000 : "routerboot"
[    2.372437] 0x00000000f000-0x000000010000 : "hard_config"
[    2.378818] 0x000000010000-0x00000001f000 : "routerboot2"
[    2.385200] 0x000000020000-0x000000021000 : "soft_config"
[    2.391503] 0x000000030000-0x000000031000 : "bios"
[    2.419283] Creating 2 MTD partitions on "spi0.1":
[    2.424062] 0x000000000000-0x000000040000 : "RouterBootFake"
[    2.430717] 0x000000040000-0x000001000000 : "firmware"

The device name is corrected to match the hardware-stored (in hard_config)
device name.

Leave a note in DTS to mention this device supports hardware crypto.
Leave a note in DTS to explain how the original author selected the SPI speed.

Note: more work is required to get rbcfg working on this device due to
endianness.

Tested-by: Tobias Schramm <tobleminer at gmail.com>
Signed-off-by: Thibaut VAR?NE <hacks at slashdirt.org>
---
 target/linux/ramips/dts/RBM33G.dts | 64 +++++++++++++++++++++++++++++---------
 1 file changed, 50 insertions(+), 14 deletions(-)

diff --git a/target/linux/ramips/dts/RBM33G.dts b/target/linux/ramips/dts/RBM33G.dts
index cc6da267a2..e1de3c8c11 100644
--- a/target/linux/ramips/dts/RBM33G.dts
+++ b/target/linux/ramips/dts/RBM33G.dts
@@ -7,7 +7,7 @@
 
 / {
 	compatible = "mikrotik,rbm33g", "mediatek,mt7621-soc";
-	model = "MikroTik RBM33G";
+	model = "MikroTik RouterBOARD M33G";
 
 	aliases {
 		led-status = &led_usr;
@@ -39,7 +39,7 @@
 		poll-interval = <20>;
 
 		res {
-			label = "res";
+			label = "reset";
 			gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
 			linux,code = <KEY_RESTART>;
 		};
@@ -69,6 +69,7 @@
 		regulator-always-on;
 	};
 
+	// not defined in OEM source, this controls the M.2 slot
 	pcie2_vcc_reg {
 		compatible = "regulator-fixed";
 		regulator-name = "pcie2_vcc";
@@ -104,18 +105,42 @@
 		reg = <0>;
 		spi-max-frequency = <3125000>;
 
-		partition at 0 {
-			label = "routerboot";
-			reg = <0x0 0xf000>;
-			read-only;
-		};
-
-		factory: partition at f000 {
-			label = "factory";
-			reg = <0xf000 0x71000>;
-			read-only;
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition at 0 {
+				label = "RouterBoot";
+				reg = <0x0 0x40000>;
+				read-only;
+			};
+
+			routerboot at 0 {
+				reg = <0x0 0xf000>;
+				read-only;
+			};
+
+			hard_config: hard_config at f000 {
+				reg = <0xf000 0x1000>;
+				read-only;
+			};
+
+			routerboot2 at 10000 {
+				reg = <0x10000 0xf000>;
+				read-only;
+			};
+
+			soft_config at 20000 {
+				reg = <0x20000 0x1000>;
+			};
+
+			// valid data only extends up to 0x4f but make it 0x1000 to match ar71xx
+			bios at 30000 {
+				reg = <0x30000 0x1000>;
+				read-only;
+			};
 		};
-
 	};
 
 	w25q128 at 0 {
@@ -123,8 +148,16 @@
 		#size-cells = <1>;
 		compatible = "jedec,spi-nor";
 		reg = <1>;
+		// XXX empiric value to obtain actual 10MHz SCK at the chip 
 		spi-max-frequency = <3125000>;
 
+		// this contains no data but is defined in OEM source
+		partition at 0 {
+			label = "RouterBootFake";
+			reg = <0x0 0x40000>;
+			read-only;
+		};
+
 		partition at 40000 {
 			label = "firmware";
 			reg = <0x040000 0xFC0000>;
@@ -133,7 +166,7 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x0010>;
+	mtd-mac-address = <&hard_config 0x0010>;
 	mtd-mac-address-increment = <1>;
 };
 
@@ -158,3 +191,6 @@
 &pcie {
 	status = "okay";
 };
+
+// XXX this device has hardware crypto
+//&crypto {};
-- 
2.14.3 (Apple Git-98)


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From hacks at slashdirt.org  Thu Jul 19 13:12:33 2018
From: hacks at slashdirt.org (=?UTF-8?q?Thibaut=20VAR=C3=88NE?=)
Date: Thu, 19 Jul 2018 19:12:33 +0200
Subject: [OpenWrt-Devel] [PATCH 2/2] ramips: fix RBM11G name and partitioning
In-Reply-To: <20180719171233.43763-1-hacks@slashdirt.org>
References: <20180719171233.43763-1-hacks@slashdirt.org>
Message-ID: <20180719171233.43763-3-hacks@slashdirt.org>

This patch improves faf64056ddd46992a75b1e277d94541c7251035c by setting
the correct partition scheme for the RouterBoot section of the flash.

This section is subdivided in several segments, as they are on ar71xx
RB devices, albeit with different offsets and sizes. The naming convention
from ar71xx has been preserved, with an overlapping "RouterBoot" top level
partition added for clarity due to the many holes.

The resulting partition scheme looks like this:
[    2.477826] Creating 7 MTD partitions on "spi0.0":
[    2.482604] 0x000000000000-0x000000040000 : "RouterBoot"
[    2.488948] 0x000000000000-0x00000000f000 : "routerboot"
[    2.495289] 0x00000000f000-0x000000010000 : "hard_config"
[    2.501596] 0x000000010000-0x00000001f000 : "routerboot2"
[    2.507966] 0x000000020000-0x000000021000 : "soft_config"
[    2.514307] 0x000000030000-0x000000031000 : "bios"
[    2.520108] 0x000000040000-0x000001000000 : "firmware"

The device name is corrected to match the hardware-stored (in hard_config)
device name.

Leave a note in DTS to mention this device supports hardware crypto.
Leave a note in DTS to explain how the original author selected the SPI speed.

Note: more work is required to get rbcfg working on this device due to
endianness.

Tested-by: Tobias Schramm <tobleminer at gmail.com>
Signed-off-by: Thibaut VAR?NE <hacks at slashdirt.org>
---
 target/linux/ramips/dts/RBM11G.dts | 62 +++++++++++++++++++++++++++-----------
 1 file changed, 45 insertions(+), 17 deletions(-)

diff --git a/target/linux/ramips/dts/RBM11G.dts b/target/linux/ramips/dts/RBM11G.dts
index f312093a22..079b4fc146 100644
--- a/target/linux/ramips/dts/RBM11G.dts
+++ b/target/linux/ramips/dts/RBM11G.dts
@@ -7,7 +7,7 @@
 
 / {
 	compatible = "mikrotik,rbm11g", "mediatek,mt7621-soc";
-	model = "MikroTik RBM11G";
+	model = "MikroTik RouterBOARD M11G";
 
 	aliases {
 		led-status = &led_usr;
@@ -90,29 +90,54 @@
 		#size-cells = <1>;
 		compatible = "jedec,spi-nor";
 		reg = <0>;
+		// XXX empiric value to obtain actual 10MHz SCK at the chip
 		spi-max-frequency = <3125000>;
 
-		partition at 0 {
-			label = "routerboot";
-			reg = <0x000000 0x00F000>;
-			read-only;
-		};
-
-		factory: partition at f000 {
-			label = "factory";
-			reg = <0x00F000 0x031000>;
-			read-only;
-		};
-
-		partition at 40000 {
-			label = "firmware";
-			reg = <0x040000 0xFC0000>;
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition at 0 {
+				label = "RouterBoot";
+				reg = <0x0 0x40000>;
+				read-only;
+			};
+
+			routerboot at 0 {
+				reg = <0x0 0xf000>;
+				read-only;
+			};
+
+			hard_config: hard_config at f000 {
+				reg = <0xf000 0x1000>;
+				read-only;
+			};
+
+			routerboot2 at 10000 {
+				reg = <0x10000 0xf000>;
+				read-only;
+			};
+
+			soft_config at 20000 {
+				reg = <0x20000 0x1000>;
+			};
+
+			// valid data only extends up to 0x4f but make it 0x1000 to match ar71xx
+			bios at 30000 {
+				reg = <0x30000 0x1000>;
+				read-only;
+			};
+
+			firmware at 40000 {
+				reg = <0x040000 0xFC0000>;
+			};
 		};
 	};
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x0010>;
+	mtd-mac-address = <&hard_config 0x0010>;
 	mtd-mac-address-increment = <1>;
 };
 
@@ -133,3 +158,6 @@
 &pcie {
 	status = "okay";
 };
+
+// XXX this device has hardware crypto
+//&crypto {};
-- 
2.14.3 (Apple Git-98)


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From hacks at slashdirt.org  Thu Jul 19 13:26:17 2018
From: hacks at slashdirt.org (=?UTF-8?q?Thibaut=20VAR=C3=88NE?=)
Date: Thu, 19 Jul 2018 19:26:17 +0200
Subject: [OpenWrt-Devel] [PATCH 0/1] [18.06] ramips: remove RB750GR3 support
Message-ID: <20180719172618.43863-1-hacks@slashdirt.org>

[resending properly formatted]

Detailed rationale:
? This code should never have been accepted: it should certainly not be part of
  a release and if it accidentally was part of one that should not be reason to
  continue what is IMO a mistake.
? This code does not support the stock hardware.
? This code is a maintenance burden (it's a custom hack, in essence).
? This code will induce confusion with end user when the correct code is
  introduced
? There will be no upgrade path between this code and the correct support.

Assuming there?s more than a single user for this code (which I doubt
considering the wiki suggests using an SPI flash programmer to install), the
supplementary rationale from my point of view is thus precisely to break the
support chain and make it perfectly clear that current ?support" stops in 18.06
without what could be taken as a sign of a transition ("oh, image has changed
name but it should still be the right one"): old code in 17, nothing in 18,
support in 19: clean break.

No replacement is proposed since no such a thing can exist: stock hw uses a
different bootloader (routerboot) which expects a different image format, and
uses an incompatible mtd flash partitioning. "New" support code will be exactly
that: new.

Thibaut VAR?NE (1):
  ramips: remove RB750GR3 support

 .../linux/ramips/base-files/etc/board.d/02_network |   1 -
 target/linux/ramips/base-files/lib/ramips.sh       |   3 -
 .../ramips/base-files/lib/upgrade/platform.sh      |   1 -
 target/linux/ramips/dts/RB750Gr3.dts               | 125 ---------------------
 target/linux/ramips/image/mt7621.mk                |   8 --
 5 files changed, 138 deletions(-)
 delete mode 100644 target/linux/ramips/dts/RB750Gr3.dts

-- 
2.14.3 (Apple Git-98)


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From hacks at slashdirt.org  Thu Jul 19 13:26:18 2018
From: hacks at slashdirt.org (=?UTF-8?q?Thibaut=20VAR=C3=88NE?=)
Date: Thu, 19 Jul 2018 19:26:18 +0200
Subject: [OpenWrt-Devel] [PATCH 1/1] ramips: remove RB750GR3 support
In-Reply-To: <20180719172618.43863-1-hacks@slashdirt.org>
References: <20180719172618.43863-1-hacks@slashdirt.org>
Message-ID: <20180719172618.43863-2-hacks@slashdirt.org>

faf94d926e2810f895f2a98d4a49ee2fe8f673e8 added "support" for a hacked
device where the original boot loader (routerboot) has been replaced
by u-boot.

Support for this device with stock bootloader is possible (as evidenced
by support for the RBM33G), and conflicts with this code.

Remove code before release.

Signed-off-by: Thibaut VAR?NE <hacks at slashdirt.org>
---
 .../linux/ramips/base-files/etc/board.d/02_network |   1 -
 target/linux/ramips/base-files/lib/ramips.sh       |   3 -
 .../ramips/base-files/lib/upgrade/platform.sh      |   1 -
 target/linux/ramips/dts/RB750Gr3.dts               | 125 ---------------------
 target/linux/ramips/image/mt7621.mk                |   8 --
 5 files changed, 138 deletions(-)
 delete mode 100644 target/linux/ramips/dts/RB750Gr3.dts

diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network
index 76b6fe9f50..981e001f64 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -200,7 +200,6 @@ ramips_setup_interfaces()
 	jhr-n926r|\
 	mikrotik,rbm33g|\
 	mzk-wdpr|\
-	rb750gr3|\
 	rt-n14u|\
 	tplink,c20-v4|\
 	tplink,c50-v3|\
diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh
index 5741cbd2ee..2dd0388426 100755
--- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -418,9 +418,6 @@ ramips_board_detect() {
 	*"R6220")
 		name="r6220"
 		;;
-	*"RB750Gr3")
-		name="rb750gr3"
-		;;
 	*"RE350 v1")
 		name="re350-v1"
 		;;
diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh
index ffdc5e73e0..59aca60ad0 100755
--- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
@@ -129,7 +129,6 @@ platform_check_image() {
 	psr-680w|\
 	px-4885-4M|\
 	px-4885-8M|\
-	rb750gr3|\
 	re6500|\
 	rp-n53|\
 	rt5350f-olinuxino|\
diff --git a/target/linux/ramips/dts/RB750Gr3.dts b/target/linux/ramips/dts/RB750Gr3.dts
deleted file mode 100644
index dc359b10bb..0000000000
--- a/target/linux/ramips/dts/RB750Gr3.dts
+++ /dev/null
@@ -1,125 +0,0 @@
-/dts-v1/;
-
-#include "mt7621.dtsi"
-
-#include <dt-bindings/input/input.h>
-#include <dt-bindings/gpio/gpio.h>
-
-/ {
-	compatible = "mikrotik,rb750gr3", "mediatek,mt7621-soc";
-	model = "MikroTik RB750Gr3";
-
-	memory at 0 {
-		device_type = "memory";
-		reg = <0x0 0x10000000>;
-	};
-
-	chosen {
-		bootargs = "console=ttyS0,57600";
-	};
-
-	gpio-leds {
-		compatible = "gpio-leds";
-
-		pwr {
-			label = "rb750gr3:blue:pwr";
-			gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>;
-		};
-
-		usr {
-			label = "rb750gr3:green:usr";
-			gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>;
-		};
-	};
-
-	gpio-keys-polled {
-		compatible = "gpio-keys-polled";
-		#address-cells = <1>;
-		#size-cells = <0>;
-		poll-interval = <20>;
-
-		mode {
-			label = "mode";
-			gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
-			linux,code = <KEY_RFKILL>;
-		};
-
-		res {
-			label = "res";
-			gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
-			linux,code = <KEY_RESTART>;
-		};
-	};
-
-	gpio_export {
-		compatible = "gpio-export";
-		#size-cells = <0>;
-
-		buzzer {
-			gpio-export,name = "buzzer";
-			gpio-export,output = <0>;
-			gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
-		};
-
-		usb {
-			gpio-export,name = "usb";
-			gpio-export,output = <1>;
-			gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
-		};
-	};
-};
-
-&spi0 {
-	status = "okay";
-
-	m25p80 at 0 {
-		#address-cells = <1>;
-		#size-cells = <1>;
-		compatible = "jedec,spi-nor";
-		reg = <0>;
-		spi-max-frequency = <10000000>;
-		m25p,chunked-io = <32>;
-
-		partition at 0 {
-			label = "u-boot";
-			reg = <0x0 0x30000>;
-			read-only;
-		};
-
-		partition at 30000 {
-			label = "u-boot-env";
-			reg = <0x30000 0x10000>;
-			read-only;
-		};
-
-		factory: partition at 40000 {
-			label = "factory";
-			reg = <0x40000 0x10000>;
-			read-only;
-		};
-
-		partition at 50000 {
-			label = "firmware";
-			reg = <0x50000 0xfb0000>;
-		};
-
-	};
-};
-
-&ethernet {
-	mtd-mac-address = <&factory 0xe000>;
-	mtd-mac-address-increment = <1>;
-};
-
-&pinctrl {
-	state_default: pinctrl0 {
-		gpio {
-			ralink,group = "i2c", "uart2", "uart3", "pcie", "rgmii2", "jtag";
-			ralink,function = "gpio";
-		};
-	};
-};
-
-&sdhci {
-	status = "okay";
-};
diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk
index e9e2d3ecef..3d1a26e00c 100644
--- a/target/linux/ramips/image/mt7621.mk
+++ b/target/linux/ramips/image/mt7621.mk
@@ -225,14 +225,6 @@ define Device/r6220
 endef
 TARGET_DEVICES += r6220
 
-define Device/rb750gr3
-  DTS := RB750Gr3
-  IMAGE_SIZE := $(ralink_default_fw_size_16M)
-  DEVICE_TITLE := MikroTik RB750Gr3
-  DEVICE_PACKAGES := kmod-usb3 uboot-envtools
-endef
-TARGET_DEVICES += rb750gr3
-
 define Device/mikrotik_rbm33g
   DTS := RBM33G
   BLOCKSIZE := 64k
-- 
2.14.3 (Apple Git-98)


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From dev at kresin.me  Thu Jul 19 13:46:17 2018
From: dev at kresin.me (Mathias Kresin)
Date: Thu, 19 Jul 2018 19:46:17 +0200
Subject: [OpenWrt-Devel] [PATCH 1/2] ramips: fix RBM33G name and
 partitioning
In-Reply-To: <20180719171233.43763-2-hacks@slashdirt.org>
References: <20180719171233.43763-1-hacks@slashdirt.org>
 <20180719171233.43763-2-hacks@slashdirt.org>
Message-ID: <CABwW5nkprKkW50Gmr7bWRBHz924EQWSfYax2pNf+hCbKayDm1Q@mail.gmail.com>

2018-07-19 19:12 GMT+02:00 Thibaut VAR?NE <hacks at slashdirt.org>:
> This patch improves 5684d087418d176cfdef4e045e1950ca7ba3b09f by setting
> the correct partition scheme for the RouterBoot section of the flash.
>
> This section is subdivided in several segments, as they are on ar71xx
> RB devices, albeit with different offsets and sizes. The naming convention
> from ar71xx has been preserved, with an overlapping "RouterBoot" top level
> partition added for clarity due to the many holes.
>
> The OEM source code also define a "fake" partition at the beginning of
> the secondary flash chip: to avoid trouble if OEM ever make use of that
> space, we define it here.
>
> The resulting partition scheme looks like this:
> [    2.355095] Creating 6 MTD partitions on "spi0.0":
> [    2.359872] 0x000000000000-0x000000040000 : "RouterBoot"
> [    2.366197] 0x000000000000-0x00000000f000 : "routerboot"
> [    2.372437] 0x00000000f000-0x000000010000 : "hard_config"
> [    2.378818] 0x000000010000-0x00000001f000 : "routerboot2"
> [    2.385200] 0x000000020000-0x000000021000 : "soft_config"
> [    2.391503] 0x000000030000-0x000000031000 : "bios"
> [    2.419283] Creating 2 MTD partitions on "spi0.1":
> [    2.424062] 0x000000000000-0x000000040000 : "RouterBootFake"
> [    2.430717] 0x000000040000-0x000001000000 : "firmware"
>
> The device name is corrected to match the hardware-stored (in hard_config)
> device name.
>
> Leave a note in DTS to mention this device supports hardware crypto.
> Leave a note in DTS to explain how the original author selected the SPI speed.
>
> Note: more work is required to get rbcfg working on this device due to
> endianness.
>
> Tested-by: Tobias Schramm <tobleminer at gmail.com>
> Signed-off-by: Thibaut VAR?NE <hacks at slashdirt.org>

FYI, I already NAK'ed the very same patch on github after a way to
short conversation on IRC follow by some more words on github.

I neither see the need to add notes for not yet working nodes
[personal preference] to the device tree source file, nor the need to
to create the overlapping partitions "RouterBoot" +
routerboot/hard_config/routerboot2/... [personal preference].

To get the dt compiler accepting the overlapping partitions without a
warning, a style was chosen completely different from all other dts
files in the target [maintenance reason]. Furthermore, nodes sharing
the same reg are usually (always?) expressed as child nodes in the
devicetree similar to [technical reason]:

partitions {
    compatible = "fixed-partitions";

    partition at 0 {
        reg = <0 0x3000>;

        subpartition at 0 {
            reg = <0 0x1000>;
        };

        subpartition at 1000 {
            reg = <0x1000 0x2000>;
        };
    };

    partition at 3000 {
        reg = <0x3000 0x10000>;
    };
};

To my knowledge, the above isn't possible with fixed-partitions. Which
either means fixed-partitions misses a feature or someone tries to use
it in a way not intended.

This time I'll leave it up to someone else to make a call. I tried my
best to turn it into something that I'm fine to accept and failed.

Mathias

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From dev at kresin.me  Thu Jul 19 13:46:42 2018
From: dev at kresin.me (Mathias Kresin)
Date: Thu, 19 Jul 2018 19:46:42 +0200
Subject: [OpenWrt-Devel] [PATCH 2/2] ramips: fix RBM11G name and
 partitioning
In-Reply-To: <20180719171233.43763-3-hacks@slashdirt.org>
References: <20180719171233.43763-1-hacks@slashdirt.org>
 <20180719171233.43763-3-hacks@slashdirt.org>
Message-ID: <CABwW5nkOx0cgXnMwxZfPnUeyLJZzOn+pQK+5si8fb3TXtuCg7g@mail.gmail.com>

2018-07-19 19:12 GMT+02:00 Thibaut VAR?NE <hacks at slashdirt.org>:
> This patch improves faf64056ddd46992a75b1e277d94541c7251035c by setting
> the correct partition scheme for the RouterBoot section of the flash.
>
> This section is subdivided in several segments, as they are on ar71xx
> RB devices, albeit with different offsets and sizes. The naming convention
> from ar71xx has been preserved, with an overlapping "RouterBoot" top level
> partition added for clarity due to the many holes.
>
> The resulting partition scheme looks like this:
> [    2.477826] Creating 7 MTD partitions on "spi0.0":
> [    2.482604] 0x000000000000-0x000000040000 : "RouterBoot"
> [    2.488948] 0x000000000000-0x00000000f000 : "routerboot"
> [    2.495289] 0x00000000f000-0x000000010000 : "hard_config"
> [    2.501596] 0x000000010000-0x00000001f000 : "routerboot2"
> [    2.507966] 0x000000020000-0x000000021000 : "soft_config"
> [    2.514307] 0x000000030000-0x000000031000 : "bios"
> [    2.520108] 0x000000040000-0x000001000000 : "firmware"
>
> The device name is corrected to match the hardware-stored (in hard_config)
> device name.
>
> Leave a note in DTS to mention this device supports hardware crypto.
> Leave a note in DTS to explain how the original author selected the SPI speed.
>
> Note: more work is required to get rbcfg working on this device due to
> endianness.
>
> Tested-by: Tobias Schramm <tobleminer at gmail.com>
> Signed-off-by: Thibaut VAR?NE <hacks at slashdirt.org>

FYI, I already NAK'ed the very same patch on github after a way to
short conversation on IRC follow by some more words on github.

I neither see the need to add notes for not yet working nodes
[personal preference] to the device tree source file, nor the need to
to create the overlapping partitions "RouterBoot" +
routerboot/hard_config/routerboot2/... [personal preference].

To get the dt compiler accepting the overlapping partitions without a
warning, a style was chosen completely different from all other dts
files in the target [maintenance reason]. Furthermore, nodes sharing
the same reg are usually (always?) expressed as child nodes in the
devicetree similar to [technical reason]:

partitions {
    compatible = "fixed-partitions";

    partition at 0 {
        reg = <0 0x3000>;

        subpartition at 0 {
            reg = <0 0x1000>;
        };

        subpartition at 1000 {
            reg = <0x1000 0x2000>;
        };
    };

    partition at 3000 {
        reg = <0x3000 0x10000>;
    };
};

To my knowledge, the above isn't possible with fixed-partitions. Which
either means fixed-partitions misses a feature or someone tries to use
it in a way not intended.

This time I'll leave it up to someone else to make a call. I tried my
best to turn it into something that I'm fine to accept and failed.

Mathias

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From dev at kresin.me  Thu Jul 19 13:52:57 2018
From: dev at kresin.me (Mathias Kresin)
Date: Thu, 19 Jul 2018 19:52:57 +0200
Subject: [OpenWrt-Devel] [PATCH 1/1] ramips: remove RB750GR3 support
In-Reply-To: <20180719172618.43863-2-hacks@slashdirt.org>
References: <20180719172618.43863-1-hacks@slashdirt.org>
 <20180719172618.43863-2-hacks@slashdirt.org>
Message-ID: <CABwW5nmvLfq_dXdBPRWsM_H4TWsVKyYn58sXsRaBuByT5vi5Zw@mail.gmail.com>

2018-07-19 19:26 GMT+02:00 Thibaut VAR?NE <hacks at slashdirt.org>:
> faf94d926e2810f895f2a98d4a49ee2fe8f673e8 added "support" for a hacked
> device where the original boot loader (routerboot) has been replaced
> by u-boot.
>
> Support for this device with stock bootloader is possible (as evidenced
> by support for the RBM33G), and conflicts with this code.
>
> Remove code before release.
>
> Signed-off-by: Thibaut VAR?NE <hacks at slashdirt.org>

FYI, I already NAK'ed the very same patch on github.

I do agree that it can be done better by not requiring the replacement
of the bootloader. Nevertheless, support for this board is already
shipped since LEDE-17.01 and I don't agree to drop support for a board
without providing an alternative/fixed/better image.

Same as with Thibauts other patches, this time I'll leave it up to
someone else to make a call.

Mathias

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From hacks at slashdirt.org  Thu Jul 19 13:54:31 2018
From: hacks at slashdirt.org (Thibaut)
Date: Thu, 19 Jul 2018 19:54:31 +0200
Subject: [OpenWrt-Devel] [PATCH 2/2] ramips: fix RBM11G name and
 partitioning
In-Reply-To: <CABwW5nkOx0cgXnMwxZfPnUeyLJZzOn+pQK+5si8fb3TXtuCg7g@mail.gmail.com>
References: <20180719171233.43763-1-hacks@slashdirt.org>
 <20180719171233.43763-3-hacks@slashdirt.org>
 <CABwW5nkOx0cgXnMwxZfPnUeyLJZzOn+pQK+5si8fb3TXtuCg7g@mail.gmail.com>
Message-ID: <38704515-105B-4132-B408-32E188E6ADCB@slashdirt.org>


> On 19 Jul 2018, at 19:46, Mathias Kresin <dev at kresin.me> wrote:
> 
> 
> To get the dt compiler accepting the overlapping partitions without a
> warning, a style was chosen completely different from all other dts
> files in the target [maintenance reason]. Furthermore, nodes sharing
> the same reg are usually (always?) expressed as child nodes in the
> devicetree similar to [technical reason]:
> 
> partitions {
>    compatible = "fixed-partitions";
> 
>    partition at 0 {
>        reg = <0 0x3000>;
> 
>        subpartition at 0 {
>            reg = <0 0x1000>;
>        };
> 
>        subpartition at 1000 {
>            reg = <0x1000 0x2000>;
>        };
>    };
> 
>    partition at 3000 {
>        reg = <0x3000 0x10000>;
>    };
> };
> 
> To my knowledge, the above isn't possible with fixed-partitions.

I don?t see why. AIUI DTS syntax is respected, all nodes have a unique name and all nodes refer to their top boundary as the unit address.

> Which
> either means fixed-partitions misses a feature or someone tries to use
> it in a way not intended.

The above is in line with the canonical way to define partitions in DTS, as documented in Documentation/devicetree/bindings/mtd/partition.txt

This method is apparently used in all bcm targets, as well as ath79, ipq and lantiq. I?d suggest that _not_ using this method is a bug, and not the correct way to go, as evidenced by the aforementioned documentation. Quoting:

	For backwards compatibility partitions as direct subnodes of the flash device are
	supported. This use is discouraged.

T.
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From hacks at slashdirt.org  Thu Jul 19 13:57:45 2018
From: hacks at slashdirt.org (Thibaut)
Date: Thu, 19 Jul 2018 19:57:45 +0200
Subject: [OpenWrt-Devel] [PATCH 1/2] ramips: fix RBM33G name and
 partitioning
In-Reply-To: <CABwW5nkprKkW50Gmr7bWRBHz924EQWSfYax2pNf+hCbKayDm1Q@mail.gmail.com>
References: <20180719171233.43763-1-hacks@slashdirt.org>
 <20180719171233.43763-2-hacks@slashdirt.org>
 <CABwW5nkprKkW50Gmr7bWRBHz924EQWSfYax2pNf+hCbKayDm1Q@mail.gmail.com>
Message-ID: <21C4127B-D8A6-47B3-86CA-C3B5482890F3@slashdirt.org>


> On 19 Jul 2018, at 19:46, Mathias Kresin <dev at kresin.me> wrote:
> 
> 
> To get the dt compiler accepting the overlapping partitions without a
> warning, a style was chosen completely different from all other dts
> files in the target [maintenance reason]. Furthermore, nodes sharing
> the same reg are usually (always?) expressed as child nodes in the
> devicetree similar to [technical reason]:
> 
> partitions {
>   compatible = "fixed-partitions";
> 
>   partition at 0 {
>       reg = <0 0x3000>;
> 
>       subpartition at 0 {
>           reg = <0 0x1000>;
>       };
> 
>       subpartition at 1000 {
>           reg = <0x1000 0x2000>;
>       };
>   };
> 
>   partition at 3000 {
>       reg = <0x3000 0x10000>;
>   };
> };
> 
> To my knowledge, the above isn't possible with fixed-partitions.

I don?t see why. AIUI DTS syntax is respected, all nodes have a unique name and all nodes refer to their top boundary as the unit address.

> Which
> either means fixed-partitions misses a feature or someone tries to use
> it in a way not intended.

The above is in line with the canonical way to define partitions in DTS, as documented in Documentation/devicetree/bindings/mtd/partition.txt

This method is apparently used in all bcm targets, as well as ath79, ipq and lantiq. I?d suggest that _not_ using this method is a bug, and not the correct way to go, as evidenced by the aforementioned documentation. Quoting:

	For backwards compatibility partitions as direct subnodes of the flash device are
	supported. This use is discouraged.

If this gets accepted it should be cherry-picked for 18.06.

T.
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From hacks at slashdirt.org  Thu Jul 19 14:08:48 2018
From: hacks at slashdirt.org (Thibaut)
Date: Thu, 19 Jul 2018 20:08:48 +0200
Subject: [OpenWrt-Devel] [PATCH 1/1] ramips: remove RB750GR3 support
In-Reply-To: <CABwW5nmvLfq_dXdBPRWsM_H4TWsVKyYn58sXsRaBuByT5vi5Zw@mail.gmail.com>
References: <20180719172618.43863-1-hacks@slashdirt.org>
 <20180719172618.43863-2-hacks@slashdirt.org>
 <CABwW5nmvLfq_dXdBPRWsM_H4TWsVKyYn58sXsRaBuByT5vi5Zw@mail.gmail.com>
Message-ID: <266BDA14-9291-4D4F-9756-CEC86C2CBF70@slashdirt.org>


> On 19 Jul 2018, at 19:52, Mathias Kresin <dev at kresin.me> wrote:
> 
> 2018-07-19 19:26 GMT+02:00 Thibaut VAR?NE <hacks at slashdirt.org>:
>> faf94d926e2810f895f2a98d4a49ee2fe8f673e8 added "support" for a hacked
>> device where the original boot loader (routerboot) has been replaced
>> by u-boot.
>> 
>> Support for this device with stock bootloader is possible (as evidenced
>> by support for the RBM33G), and conflicts with this code.
>> 
>> Remove code before release.
>> 
>> Signed-off-by: Thibaut VAR?NE <hacks at slashdirt.org>
> 
> FYI, I already NAK'ed the very same patch on github.
> 
> I do agree that it can be done better by not requiring the replacement
> of the bootloader. Nevertheless, support for this board is already
> shipped since LEDE-17.01 and I don't agree to drop support for a board
> without providing an alternative/fixed/better image.

Just to clarify: this is not ?support?. This is a user created custom hack that applies only to their modified board.

T.
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From e9hack at gmail.com  Fri Jul 20 04:03:11 2018
From: e9hack at gmail.com (e9hack)
Date: Fri, 20 Jul 2018 10:03:11 +0200
Subject: [OpenWrt-Devel] hostapd fails to compile
Message-ID: <5ac9fff9-84a8-1f5c-67a0-9f1f52c46b26@gmail.com>

Hello,

after this commit:

commit	3838b16943c6021e3ff06d5733df890408ad7158
hostapd: fix conflicts hell

hostapd fails to compile with this error message:

ccp: '/home/xyz/src/openwrt/LEDE/carambola/staging_dir/target-mipsel_24kc_musl/pkginfo/hostapd.provides' and
'/home/xyz/src/openwrt/LEDE/carambola/staging_dir/target-mipsel_24kc_musl/pkginfo/hostapd.provides' are the same file
Makefile:577: recipe for target
'/home/xyz/src/openwrt/LEDE/carambola/bin/packages/mipsel_24kc/base/hostapd_2018-05-21-62566bc2-4_mipsel_24kc.ipk' failed
make[2]: ***
[/home/xyz/src/openwrt/LEDE/carambola/bin/packages/mipsel_24kc/base/hostapd_2018-05-21-62566bc2-4_mipsel_24kc.ipk] Error 1
make[2]: Leaving directory '/home/xyz/src/openwrt/LEDE/carambola/package/network/services/hostapd'
time: package/network/services/hostapd/full-internal/compile#0.75#0.43#1.14
package/Makefile:107: recipe for target 'package/network/services/hostapd/compile' failed
make[1]: *** [package/network/services/hostapd/compile] Error 2
make[1]: Leaving directory '/home/xyz/src/openwrt/LEDE/carambola'
/home/xyz/src/openwrt/LEDE/carambola/include/toplevel.mk:216: recipe for target
'package/network/services/hostapd/compile' failed
make: *** [package/network/services/hostapd/compile] Error 2
xyz at vbox-linux6:~/src/openwrt/LEDE/carambola>

Regards,
Hartmut

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From nbd at nbd.name  Fri Jul 20 04:41:25 2018
From: nbd at nbd.name (Felix Fietkau)
Date: Fri, 20 Jul 2018 10:41:25 +0200
Subject: [OpenWrt-Devel] hostapd fails to compile
In-Reply-To: <5ac9fff9-84a8-1f5c-67a0-9f1f52c46b26@gmail.com>
References: <5ac9fff9-84a8-1f5c-67a0-9f1f52c46b26@gmail.com>
Message-ID: <f8970596-30c7-807f-1e12-a3c471221a9e@nbd.name>

On 2018-07-20 10:03, e9hack wrote:
> Hello,
> 
> after this commit:
> 
> commit	3838b16943c6021e3ff06d5733df890408ad7158
> hostapd: fix conflicts hell
> 
> hostapd fails to compile with this error message:
I just pushed a fix for that.

- Felix

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From nbd at nbd.name  Fri Jul 20 05:39:58 2018
From: nbd at nbd.name (Felix Fietkau)
Date: Fri, 20 Jul 2018 11:39:58 +0200
Subject: [OpenWrt-Devel] [PATCH 1/3] kernel: improve ubi auto attach
 code readability
In-Reply-To: <1532019934-6284-1-git-send-email-dev@kresin.me>
References: <1532019934-6284-1-git-send-email-dev@kresin.me>
Message-ID: <3803f9d0-5261-8957-5919-67c2d33026f2@nbd.name>

On 2018-07-19 19:05, Mathias Kresin wrote:
> The early return on failed open of the mtd device allows to get rid of
> one level of indentation.
> 
> Move the put_mtd_device() called on multiple error conditions to a goto
> label to use it later for more error conditions.
> 
> While at it, make clear that we only check for the UBI magic if the read
> from flash was successful.
> 
> Signed-off-by: Mathias Kresin <dev at kresin.me>
While you're touching this code, you could remove one more level of
indentation (and fix a refcount bug) by writing:

	if (mtd->type != MTD_NANDFLASH &&
	    mtd->type != MTD_NORFLASH &&
	    mtd->type != MTD_DATAFLASH &&
	    mtd->type != MTD_MLCNANDFLASH)
		goto cleanup;

- Felix

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From dev at kresin.me  Fri Jul 20 08:25:50 2018
From: dev at kresin.me (Mathias Kresin)
Date: Fri, 20 Jul 2018 14:25:50 +0200
Subject: [OpenWrt-Devel] hostapd fails to compile
In-Reply-To: <5ac9fff9-84a8-1f5c-67a0-9f1f52c46b26@gmail.com>
References: <5ac9fff9-84a8-1f5c-67a0-9f1f52c46b26@gmail.com>
Message-ID: <CABwW5n=fn8E=8QXuTq5vHn4QUr5CRSTEw1VOUWf7DJ+4ZyqQbA@mail.gmail.com>

2018-07-20 10:03 GMT+02:00 e9hack <e9hack at gmail.com>:
> Hello,
>
> after this commit:
>
> commit  3838b16943c6021e3ff06d5733df890408ad7158
> hostapd: fix conflicts hell
>
> hostapd fails to compile with this error message:
>
> ccp: '/home/xyz/src/openwrt/LEDE/carambola/staging_dir/target-mipsel_24kc_musl/pkginfo/hostapd.provides' and
> '/home/xyz/src/openwrt/LEDE/carambola/staging_dir/target-mipsel_24kc_musl/pkginfo/hostapd.provides' are the same file

Thanks a lot Felix for fixing the fallout.

I'm still curious how to trigger the build failure respectively how I
could missed it. I've done quite a lot builds with the patchset
applied and never saw such an failure.

Mathias

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From dev at kresin.me  Fri Jul 20 09:13:37 2018
From: dev at kresin.me (Mathias Kresin)
Date: Fri, 20 Jul 2018 15:13:37 +0200
Subject: [OpenWrt-Devel] ar71xx: add support for UniFi-AC-Mesh-Pro
In-Reply-To: <98c0994b-1069-9268-414c-25f609352d0a@universe-factory.net>
References: <CAEQ_PoyX2yQGiQgXxCbZcdi0orxLxhPRys-m9Ma8MeNbB5SxGQ@mail.gmail.com>
 <98c0994b-1069-9268-414c-25f609352d0a@universe-factory.net>
Message-ID: <CABwW5nna9HTMqsj99JXpM2kpXdAsKXuJR3+MYsLjoHGp7BxxrQ@mail.gmail.com>

2018-07-18 19:04 GMT+02:00 Matthias Schiffer <mschiffer at universe-factory.net>:
> On 07/07/2018 10:34 PM, Christoph Krapp wrote:
>> Hi,
>>
>> i'm writing to the mailing list because mkresin closed my github pr[1]
>> and pointed me here.
>> The PR adds model detection for Ubiquity UniFi-AC-Mesh-Pro to the
>> ar71xx target. The source of inspiration was the commit that added
>> UniFi-AC-Mesh detection [2].
>> This patch is needed for the gluon project as we need to distinguish
>> between indoor and outdoor devices. Right now some communities use the
>> ap-ac-pro image and have to manually configure the 5GHz channel to
>> comply with the local rules. This could be done automatically if the
>> detection gets merged.
>> mkresin merged the ath79 patch and therefore closed the arth71xx pr.
>> As the ath79 target is not finished right now and disabled in
>> openwrt-18.06 we need the ar71xx patch as the next gluon version will
>> be based on 18.06.
>> So please consider to merge this patch and backport it to the 18.06
>> branch as it only adds an alias and the model detection was tested
>> successfully by multiple people on both devices.
>>
>> Thanks,
>> achterin
>>
>> [1] https://github.com/openwrt/openwrt/pull/1107
>> [2] https://github.com/openwrt/openwrt/commit/f8dbafb234c9a0a836ff3bede0540c20914b6d4e
>>
>
>
> Having a way to get ath79 hardware backports into 18.06 would be nice; I
> see three options here:

To be honest, I don't like the idea of backporting support for new
boards or features to a stable branch with minor releases. In my
opinion it would be better to focus on fixing bugs/security issues.
Especially if we mange to do major releases more often. But as said
before, it's up to the dev who does the work.

>
> 1) Continue accepting ar71xx patches in the OpenWrt master

I'm not saying that we shouldn't accept any ar71xx patches for master
any more. But the situation is the following: More than 20% of the
open pull requests on GitHub are ar71xx related, most of them > 4
weeks old and nobody really cares about them any more.

> backport to 18.06
> 2) Directly merge ar71xx patches to 18.06 without applying them to master first

See my replies above regarding backporting board support. I don't
think a direct merge to 18.06 will work. If nobody adds support for
this particular board to master between two releases, someone has to
do the work twice (at least).

> 3) Backport the ath79 target to 18.06 (I think having ath79 in 18.06 was
> planned, but it was removed because it was not ready yet - which might have
> changed by now?)

I don't think ath79 is stable enough to be included in a release. It
might work for boards which are added so far, but there are still
issues left which prevents adding support for more more
complex/special boards.

> In any case, the ath79 target should take precedence, and we should not
> accept ar71xx hardware support patches in either of the branches as long as
> the hardware has not been added to ath79 first.

Here we both agree.

Mathias

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From nbd at nbd.name  Fri Jul 20 09:30:42 2018
From: nbd at nbd.name (Felix Fietkau)
Date: Fri, 20 Jul 2018 15:30:42 +0200
Subject: [OpenWrt-Devel] hostapd fails to compile
In-Reply-To: <CABwW5n=fn8E=8QXuTq5vHn4QUr5CRSTEw1VOUWf7DJ+4ZyqQbA@mail.gmail.com>
References: <5ac9fff9-84a8-1f5c-67a0-9f1f52c46b26@gmail.com>
 <CABwW5n=fn8E=8QXuTq5vHn4QUr5CRSTEw1VOUWf7DJ+4ZyqQbA@mail.gmail.com>
Message-ID: <83a07899-3302-fe2a-fcfb-d182208d5b2d@nbd.name>

On 2018-07-20 14:25, Mathias Kresin wrote:
> 2018-07-20 10:03 GMT+02:00 e9hack <e9hack at gmail.com>:
>> Hello,
>>
>> after this commit:
>>
>> commit  3838b16943c6021e3ff06d5733df890408ad7158
>> hostapd: fix conflicts hell
>>
>> hostapd fails to compile with this error message:
>>
>> ccp: '/home/xyz/src/openwrt/LEDE/carambola/staging_dir/target-mipsel_24kc_musl/pkginfo/hostapd.provides' and
>> '/home/xyz/src/openwrt/LEDE/carambola/staging_dir/target-mipsel_24kc_musl/pkginfo/hostapd.provides' are the same file
> 
> Thanks a lot Felix for fixing the fallout.
> 
> I'm still curious how to trigger the build failure respectively how I
> could missed it. I've done quite a lot builds with the patchset
> applied and never saw such an failure.
I didn't do anything special. I just took the config that I was already
using and enabled CONFIG_PACKAGE_hostapd=m

- Felix

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From dev at kresin.me  Fri Jul 20 11:37:46 2018
From: dev at kresin.me (Mathias Kresin)
Date: Fri, 20 Jul 2018 17:37:46 +0200
Subject: [OpenWrt-Devel] [PATCH 1/3] kernel: improve ubi auto attach
 code readability
In-Reply-To: <3803f9d0-5261-8957-5919-67c2d33026f2@nbd.name>
References: <1532019934-6284-1-git-send-email-dev@kresin.me>
 <3803f9d0-5261-8957-5919-67c2d33026f2@nbd.name>
Message-ID: <CABwW5nnE9LhaAxDmsBm1NuigYwsMV4++kHvc1KLNRXYLs3XSRw@mail.gmail.com>

2018-07-20 11:39 GMT+02:00 Felix Fietkau <nbd at nbd.name>:
> On 2018-07-19 19:05, Mathias Kresin wrote:
>> The early return on failed open of the mtd device allows to get rid of
>> one level of indentation.
>>
>> Move the put_mtd_device() called on multiple error conditions to a goto
>> label to use it later for more error conditions.
>>
>> While at it, make clear that we only check for the UBI magic if the read
>> from flash was successful.
>>
>> Signed-off-by: Mathias Kresin <dev at kresin.me>
> While you're touching this code, you could remove one more level of
> indentation (and fix a refcount bug) by writing:
>
>         if (mtd->type != MTD_NANDFLASH &&
>             mtd->type != MTD_NORFLASH &&
>             mtd->type != MTD_DATAFLASH &&
>             mtd->type != MTD_MLCNANDFLASH)
>                 goto cleanup;

Woho, I totally missed the refcount bug. Pushed an updated version of
the patch to may staging repo.

Mathias

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From robh at kernel.org  Fri Jul 20 12:17:56 2018
From: robh at kernel.org (Rob Herring)
Date: Fri, 20 Jul 2018 10:17:56 -0600
Subject: [OpenWrt-Devel] [PATCH 2/4 v1] net: dsa: Add bindings for
 Realtek SMI DSAs
In-Reply-To: <CACRpkdb1ykS=3kiuQzaa6TpEPNB=C6xuusuez6JOCHb-E27Uqg@mail.gmail.com>
References: <20180714094556.30791-1-linus.walleij@linaro.org>
 <20180714094556.30791-2-linus.walleij@linaro.org>
 <20180716204535.GA22125@rob-hp-laptop>
 <CACRpkdb1ykS=3kiuQzaa6TpEPNB=C6xuusuez6JOCHb-E27Uqg@mail.gmail.com>
Message-ID: <20180720161756.GA32587@rob-hp-laptop>

On Tue, Jul 17, 2018 at 08:55:51AM +0200, Linus Walleij wrote:
> On Mon, Jul 16, 2018 at 10:45 PM Rob Herring <robh at kernel.org> wrote:
> > On Sat, Jul 14, 2018 at 11:45:54AM +0200, Linus Walleij wrote:
> 
> > > +The SMI "Simple Management Interface" is a two-wire protocol using
> >
> > At least for some other Realtek chips, the documentation I find says the
> > S stands for Serial. And Wikipedia says SMI is the same thing as MDIO.
> 
> The only datasheet we have mentions both:
> http://realtek.info/pdf/rtl8366_8369_datasheet_1-1.pdf
> calling it serial management interface when talking to an EEPROM
> calling it systems management interface when talking to a
> PHY.
> 
> (BTW that datsheet has no relation to this driver, that is for
> ASICs 8366 and 8369 which of course have nothing to do with
> RTL8366RB "revision B" that we are running here, which adds
> even more to the confusion.)
> 
> Sadly it would not surprise me if Realtek doesn't even know
> which one it is themselves, given the state of the code and
> documentation that came out of the company.
> 
> I just have to pick something. I can rename it the
> "S Management Interface" if you prefer, OpenWRT called it
> Systems Management Interface.
> 
> > Just want to make sure we don't define GPIOs directly when there should
> > be a layer of abstraction like mdio-gpio.
> 
> OK let's look at it we read a single register with each protocol:
> 
> 1. MDIO: drivers/net/phy/mdio-bitbang.c
>   send_bit is setting data and cycling clock 1-0 (falling edge)
>   begins transactions by sending 32 1:s (well 33 for safe measure)
>   then sends a start bit 01
>   then sends the opcode 10 (read)
>   then sends the PHY address (5 bits)
>   then sends the register address (5 bits)
>   turn around (switch MDIO to input)
>   read 16 bit register value
>   read stop bit
> 
> 2. SMI:
>    sends the sequence "101" to start transactions. (No initial ones)
>    writes a whole byte which is the "command" read is 0xa9
>    on RTL8366RB and apparently something else on other chips
>    writes low byte of 16bit address
>    writes high byte of 16bit address
>    turn around (switch MDIO to input)
>    reads the low byte of the 16bit data
>    reads the high byte of the 16bit data
>    sends the stop sequence 01
>    then an extra clock pulse
> 
> As you can see those are pretty different. PHY always being
> addressed in MDIO (the switch chips has PHYs but this
> protocol is not defined exclusively for that) and both phy and
> reg being 5 bits addressing at most 10 address bits is the most
> obvious deviation then 8 bits for command instead of 2 etc.
> 
> It's just very different.

Okay. Just wanted to make sure.

Reviewed-by: Rob Herring <robh at kernel.org>

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From robh at kernel.org  Fri Jul 20 12:17:56 2018
From: robh at kernel.org (Rob Herring)
Date: Fri, 20 Jul 2018 10:17:56 -0600
Subject: [OpenWrt-Devel] [PATCH 2/4 v1] net: dsa: Add bindings for
 Realtek SMI DSAs
In-Reply-To: <CACRpkdb1ykS=3kiuQzaa6TpEPNB=C6xuusuez6JOCHb-E27Uqg@mail.gmail.com>
References: <20180714094556.30791-1-linus.walleij@linaro.org>
 <20180714094556.30791-2-linus.walleij@linaro.org>
 <20180716204535.GA22125@rob-hp-laptop>
 <CACRpkdb1ykS=3kiuQzaa6TpEPNB=C6xuusuez6JOCHb-E27Uqg@mail.gmail.com>
Message-ID: <20180720161756.GA32587@rob-hp-laptop>

On Tue, Jul 17, 2018 at 08:55:51AM +0200, Linus Walleij wrote:
> On Mon, Jul 16, 2018 at 10:45 PM Rob Herring <robh at kernel.org> wrote:
> > On Sat, Jul 14, 2018 at 11:45:54AM +0200, Linus Walleij wrote:
> 
> > > +The SMI "Simple Management Interface" is a two-wire protocol using
> >
> > At least for some other Realtek chips, the documentation I find says the
> > S stands for Serial. And Wikipedia says SMI is the same thing as MDIO.
> 
> The only datasheet we have mentions both:
> http://realtek.info/pdf/rtl8366_8369_datasheet_1-1.pdf
> calling it serial management interface when talking to an EEPROM
> calling it systems management interface when talking to a
> PHY.
> 
> (BTW that datsheet has no relation to this driver, that is for
> ASICs 8366 and 8369 which of course have nothing to do with
> RTL8366RB "revision B" that we are running here, which adds
> even more to the confusion.)
> 
> Sadly it would not surprise me if Realtek doesn't even know
> which one it is themselves, given the state of the code and
> documentation that came out of the company.
> 
> I just have to pick something. I can rename it the
> "S Management Interface" if you prefer, OpenWRT called it
> Systems Management Interface.
> 
> > Just want to make sure we don't define GPIOs directly when there should
> > be a layer of abstraction like mdio-gpio.
> 
> OK let's look at it we read a single register with each protocol:
> 
> 1. MDIO: drivers/net/phy/mdio-bitbang.c
>   send_bit is setting data and cycling clock 1-0 (falling edge)
>   begins transactions by sending 32 1:s (well 33 for safe measure)
>   then sends a start bit 01
>   then sends the opcode 10 (read)
>   then sends the PHY address (5 bits)
>   then sends the register address (5 bits)
>   turn around (switch MDIO to input)
>   read 16 bit register value
>   read stop bit
> 
> 2. SMI:
>    sends the sequence "101" to start transactions. (No initial ones)
>    writes a whole byte which is the "command" read is 0xa9
>    on RTL8366RB and apparently something else on other chips
>    writes low byte of 16bit address
>    writes high byte of 16bit address
>    turn around (switch MDIO to input)
>    reads the low byte of the 16bit data
>    reads the high byte of the 16bit data
>    sends the stop sequence 01
>    then an extra clock pulse
> 
> As you can see those are pretty different. PHY always being
> addressed in MDIO (the switch chips has PHYs but this
> protocol is not defined exclusively for that) and both phy and
> reg being 5 bits addressing at most 10 address bits is the most
> obvious deviation then 8 bits for command instead of 2 etc.
> 
> It's just very different.

Okay. Just wanted to make sure.

Reviewed-by: Rob Herring <robh at kernel.org>

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From openwrt-devel at lists.openwrt.org  Fri Jul 20 13:57:26 2018
From: openwrt-devel at lists.openwrt.org (Martin Blumenstingl via openwrt-devel)
Date: Fri, 20 Jul 2018 17:57:26 +0000
Subject: [OpenWrt-Devel] [PATCH 2/2] ramips: fix RBM11G name and
 partitioning
In-Reply-To: <20180719171233.43763-3-hacks@slashdirt.org>
References: <20180719171233.43763-1-hacks@slashdirt.org>
 <20180719171233.43763-3-hacks@slashdirt.org>
Message-ID: <mailman.11931.1532109434.25356.openwrt-devel@lists.openwrt.org>

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.
-------------- next part --------------
An embedded message was scrubbed...
From: Martin Blumenstingl <martin.blumenstingl at googlemail.com>
Subject: Re: [OpenWrt-Devel] [PATCH 2/2] ramips: fix RBM11G name and partitioning
Date: Fri, 20 Jul 2018 19:56:50 +0200
Size: 8927
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20180720/44b905e4/attachment.eml>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From hacks at slashdirt.org  Fri Jul 20 15:10:13 2018
From: hacks at slashdirt.org (Thibaut)
Date: Fri, 20 Jul 2018 21:10:13 +0200
Subject: [OpenWrt-Devel] [PATCH 2/2] ramips: fix RBM11G name and
 partitioning
In-Reply-To: <CAFBinCA9p2HmQuenYR89qSyNKDdWSQCS40-hvrrniiSxfLWsSw@mail.gmail.com>
References: <20180719171233.43763-1-hacks@slashdirt.org>
 <20180719171233.43763-3-hacks@slashdirt.org>
 <CAFBinCA9p2HmQuenYR89qSyNKDdWSQCS40-hvrrniiSxfLWsSw@mail.gmail.com>
Message-ID: <DB76C73C-3CF6-4F8F-BCF6-54DD565E1EF1@slashdirt.org>


> Le 20 juil. 2018 ? 19:56, Martin Blumenstingl <martin.blumenstingl at googlemail.com> a ?crit :
> 
>> On Thu, Jul 19, 2018 at 7:12 PM Thibaut VAR?NE <hacks at slashdirt.org> wrote:
>> 
>> This patch improves faf64056ddd46992a75b1e277d94541c7251035c by setting
>> the correct partition scheme for the RouterBoot section of the flash.
>> 
>> This section is subdivided in several segments, as they are on ar71xx
>> RB devices, albeit with different offsets and sizes. The naming convention
>> from ar71xx has been preserved, with an overlapping "RouterBoot" top level
>> partition added for clarity due to the many holes.
>> 
>> The resulting partition scheme looks like this:
>> [    2.477826] Creating 7 MTD partitions on "spi0.0":
>> [    2.482604] 0x000000000000-0x000000040000 : "RouterBoot"
>> [    2.488948] 0x000000000000-0x00000000f000 : "routerboot"
>> [    2.495289] 0x00000000f000-0x000000010000 : "hard_config"
>> [    2.501596] 0x000000010000-0x00000001f000 : "routerboot2"
>> [    2.507966] 0x000000020000-0x000000021000 : "soft_config"
>> [    2.514307] 0x000000030000-0x000000031000 : "bios"
>> [    2.520108] 0x000000040000-0x000001000000 : "firmware"
>> 
>> The device name is corrected to match the hardware-stored (in hard_config)
>> device name.
>> 
>> Leave a note in DTS to mention this device supports hardware crypto.
> I find this bit of information strange since it has nothing to do with
> the other changes. also: what kind of hardware crypto does it support?

Documentation note as there?s ongoing work to support these devices: easier to grep than to check individual devices specs. If all mt7621s have this onboard device then indeed the note is unnecessary.

>> Leave a note in DTS to explain how the original author selected the SPI speed.
>> 
>> Note: more work is required to get rbcfg working on this device due to
>> endianness.
>> 
>> Tested-by: Tobias Schramm <tobleminer at gmail.com>
>> Signed-off-by: Thibaut VAR?NE <hacks at slashdirt.org>
>> ---
>> target/linux/ramips/dts/RBM11G.dts | 62 +++++++++++++++++++++++++++-----------
>> 1 file changed, 45 insertions(+), 17 deletions(-)
>> 
>> diff --git a/target/linux/ramips/dts/RBM11G.dts b/target/linux/ramips/dts/RBM11G.dts
>> index f312093a22..079b4fc146 100644
>> --- a/target/linux/ramips/dts/RBM11G.dts
>> +++ b/target/linux/ramips/dts/RBM11G.dts
>> @@ -7,7 +7,7 @@
>> 
>> / {
>>        compatible = "mikrotik,rbm11g", "mediatek,mt7621-soc";
>> -       model = "MikroTik RBM11G";
>> +       model = "MikroTik RouterBOARD M11G";
> why do you need to change the model when updating the partitions? the
> commit message doesn't explain this

This started as a cleanup patch which I didn?t expect to be this controversial so I didn?t split out this one liner.

>>        aliases {
>>                led-status = &led_usr;
>> @@ -90,29 +90,54 @@
>>                #size-cells = <1>;
>>                compatible = "jedec,spi-nor";
>>                reg = <0>;
>> +               // XXX empiric value to obtain actual 10MHz SCK at the chip
>>                spi-max-frequency = <3125000>;
>> 
>> -               partition at 0 {
>> -                       label = "routerboot";
>> -                       reg = <0x000000 0x00F000>;
>> -                       read-only;
>> -               };
>> -
>> -               factory: partition at f000 {
>> -                       label = "factory";
>> -                       reg = <0x00F000 0x031000>;
>> -                       read-only;
>> -               };
>> -
>> -               partition at 40000 {
>> -                       label = "firmware";
>> -                       reg = <0x040000 0xFC0000>;
>> +               partitions {
>> +                       compatible = "fixed-partitions";
>> +                       #address-cells = <1>;
>> +                       #size-cells = <1>;
>> +
>> +                       partition at 0 {
>> +                               label = "RouterBoot";
>> +                               reg = <0x0 0x40000>;
>> +                               read-only;
>> +                       };
>> +
>> +                       routerboot at 0 {
>> +                               reg = <0x0 0xf000>;
>> +                               read-only;
>> +                       };
> isn't the recommended node name "partition" nowadays?

Not according to kernel documentation.

> both partitions above would then become "partition at 0" -> whether the
> second node overwrites the first one (since both node names and
> addresses/offsets are identical) or both are added to the resulting
> .dtb depends on the dtc (device tree compiler) version, so I highly
> recommend *NOT* doing this
> 
>> +                       hard_config: hard_config at f000 {
>> +                               reg = <0xf000 0x1000>;
>> +                               read-only;
>> +                       };
>> +
>> +                       routerboot2 at 10000 {
>> +                               reg = <0x10000 0xf000>;
>> +                               read-only;
>> +                       };
>> +
>> +                       soft_config at 20000 {
>> +                               reg = <0x20000 0x1000>;
>> +                       };
>> +
>> +                       // valid data only extends up to 0x4f but make it 0x1000 to match ar71xx
>> +                       bios at 30000 {
>> +                               reg = <0x30000 0x1000>;
>> +                               read-only;
>> +                       };
>> +
>> +                       firmware at 40000 {
>> +                               reg = <0x040000 0xFC0000>;
>> +                       };
>>                };
>>        };
>> };
>> 
>> &ethernet {
>> -       mtd-mac-address = <&factory 0x0010>;
>> +       mtd-mac-address = <&hard_config 0x0010>;
> if you keep only the big RouterBoot partition you can simply use that
> here (you just have to add 0xf000 to the offset)

I explained in the cover letter why both the top level and the subpartitions are useful. Please refer to that.

Best,
T.



_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From openwrt-devel at lists.openwrt.org  Fri Jul 20 15:42:36 2018
From: openwrt-devel at lists.openwrt.org (Martin Blumenstingl via openwrt-devel)
Date: Fri, 20 Jul 2018 19:42:36 +0000
Subject: [OpenWrt-Devel] [PATCH 0/2] ramips: fix RBMxxG name and
 partitionning
In-Reply-To: <20180719171233.43763-1-hacks@slashdirt.org>
References: <20180719171233.43763-1-hacks@slashdirt.org>
Message-ID: <mailman.11944.1532115755.25356.openwrt-devel@lists.openwrt.org>

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.
-------------- next part --------------
An embedded message was scrubbed...
From: Martin Blumenstingl <martin.blumenstingl at googlemail.com>
Subject: Re: [OpenWrt-Devel] [PATCH 0/2] ramips: fix RBMxxG name and partitionning
Date: Fri, 20 Jul 2018 21:42:10 +0200
Size: 7912
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20180720/9bdf8e54/attachment.eml>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From linus.walleij at linaro.org  Fri Jul 20 16:26:26 2018
From: linus.walleij at linaro.org (Linus Walleij)
Date: Fri, 20 Jul 2018 22:26:26 +0200
Subject: [OpenWrt-Devel] [PATCH 2/4 v1] net: dsa: Add bindings for
 Realtek SMI DSAs
In-Reply-To: <20180720161756.GA32587@rob-hp-laptop>
References: <20180714094556.30791-1-linus.walleij@linaro.org>
 <20180714094556.30791-2-linus.walleij@linaro.org>
 <20180716204535.GA22125@rob-hp-laptop>
 <CACRpkdb1ykS=3kiuQzaa6TpEPNB=C6xuusuez6JOCHb-E27Uqg@mail.gmail.com>
 <20180720161756.GA32587@rob-hp-laptop>
Message-ID: <CACRpkdZuu-eaMDTanR1FAVVwyHOb0Gv9NEzx+7Z9fNVuJYnDow@mail.gmail.com>

On Fri, Jul 20, 2018 at 6:17 PM Rob Herring <robh at kernel.org> wrote:
> On Tue, Jul 17, 2018 at 08:55:51AM +0200, Linus Walleij wrote:

> > It's just very different.
>
> Okay. Just wanted to make sure.
>
> Reviewed-by: Rob Herring <robh at kernel.org>

Thanks Rob! And thanks for asking the critical questions, more
often than not I am wrong (like that TPO screen with "custom"
wire protocol that turned out to be an SPI dialect), so it's good
to take this time to go back and check things over.

Yours,
Linus Walleij

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From linus.walleij at linaro.org  Fri Jul 20 16:26:26 2018
From: linus.walleij at linaro.org (Linus Walleij)
Date: Fri, 20 Jul 2018 22:26:26 +0200
Subject: [OpenWrt-Devel] [PATCH 2/4 v1] net: dsa: Add bindings for
 Realtek SMI DSAs
In-Reply-To: <20180720161756.GA32587@rob-hp-laptop>
References: <20180714094556.30791-1-linus.walleij@linaro.org>
 <20180714094556.30791-2-linus.walleij@linaro.org>
 <20180716204535.GA22125@rob-hp-laptop>
 <CACRpkdb1ykS=3kiuQzaa6TpEPNB=C6xuusuez6JOCHb-E27Uqg@mail.gmail.com>
 <20180720161756.GA32587@rob-hp-laptop>
Message-ID: <CACRpkdZuu-eaMDTanR1FAVVwyHOb0Gv9NEzx+7Z9fNVuJYnDow@mail.gmail.com>

On Fri, Jul 20, 2018 at 6:17 PM Rob Herring <robh at kernel.org> wrote:
> On Tue, Jul 17, 2018 at 08:55:51AM +0200, Linus Walleij wrote:

> > It's just very different.
>
> Okay. Just wanted to make sure.
>
> Reviewed-by: Rob Herring <robh at kernel.org>

Thanks Rob! And thanks for asking the critical questions, more
often than not I am wrong (like that TPO screen with "custom"
wire protocol that turned out to be an SPI dialect), so it's good
to take this time to go back and check things over.

Yours,
Linus Walleij

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From mail at david-bauer.net  Fri Jul 20 18:04:08 2018
From: mail at david-bauer.net (David Bauer)
Date: Sat, 21 Jul 2018 00:04:08 +0200
Subject: [OpenWrt-Devel] [PATCH] ath79: fix OCEDO Raccoon
Message-ID: <20180720220408.27528-1-mail@david-bauer.net>

The OCEDO Raccoon only has one ethernet port, but currently uci sections
for WAN and LAN are created.

Additionally, newer versions of the devices U-Boot (units with SteelWRT)
set the kernel-cmdline and therefore overwrite the partition-layout.
We fix this by overwriting the cmdline supplied by the bootloader.

Signed-off-by: David Bauer <mail at david-bauer.net>
---
 target/linux/ath79/base-files/etc/board.d/02_network | 1 +
 target/linux/ath79/dts/ar9344_ocedo_raccoon.dts      | 4 ++++
 2 files changed, 5 insertions(+)

diff --git a/target/linux/ath79/base-files/etc/board.d/02_network b/target/linux/ath79/base-files/etc/board.d/02_network
index dd75a55b73..c5e23e4e50 100755
--- a/target/linux/ath79/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/base-files/etc/board.d/02_network
@@ -13,6 +13,7 @@ ath79_setup_interfaces()
 		ucidef_set_interface_lan "eth0" "dhcp"
 		;;
 	"avm,fritz300e"|\
+	"ocedo,raccoon"|\
 	"tplink,re450-v2"|\
 	"tplink,tl-mr10u"|\
 	"tplink,tl-wr703n"|\
diff --git a/target/linux/ath79/dts/ar9344_ocedo_raccoon.dts b/target/linux/ath79/dts/ar9344_ocedo_raccoon.dts
index a98f251e34..01d5dae307 100644
--- a/target/linux/ath79/dts/ar9344_ocedo_raccoon.dts
+++ b/target/linux/ath79/dts/ar9344_ocedo_raccoon.dts
@@ -10,6 +10,10 @@
 	model = "OCEDO Raccoon";
 	compatible = "ocedo,raccoon", "qca,ar9344";
 
+	chosen {
+		bootargs = "console=ttyS0,115200n8";
+	};
+
 	aliases {
 		led-status = &system;
 	};
-- 
2.18.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From john at phrozen.org  Sat Jul 21 03:24:31 2018
From: john at phrozen.org (John Crispin)
Date: Sat, 21 Jul 2018 09:24:31 +0200
Subject: [OpenWrt-Devel] [PATCH 1/1] ramips: remove RB750GR3 support
In-Reply-To: <266BDA14-9291-4D4F-9756-CEC86C2CBF70@slashdirt.org>
References: <20180719172618.43863-1-hacks@slashdirt.org>
 <20180719172618.43863-2-hacks@slashdirt.org>
 <CABwW5nmvLfq_dXdBPRWsM_H4TWsVKyYn58sXsRaBuByT5vi5Zw@mail.gmail.com>
 <266BDA14-9291-4D4F-9756-CEC86C2CBF70@slashdirt.org>
Message-ID: <06f179eb-44fc-b487-003f-a2cefcfe8ef3@phrozen.org>



On 19/07/18 20:08, Thibaut wrote:
>> On 19 Jul 2018, at 19:52, Mathias Kresin <dev at kresin.me> wrote:
>>
>> 2018-07-19 19:26 GMT+02:00 Thibaut VAR?NE <hacks at slashdirt.org>:
>>> faf94d926e2810f895f2a98d4a49ee2fe8f673e8 added "support" for a hacked
>>> device where the original boot loader (routerboot) has been replaced
>>> by u-boot.
>>>
>>> Support for this device with stock bootloader is possible (as evidenced
>>> by support for the RBM33G), and conflicts with this code.
>>>
>>> Remove code before release.
>>>
>>> Signed-off-by: Thibaut VAR?NE <hacks at slashdirt.org>
>> FYI, I already NAK'ed the very same patch on github.
>>
>> I do agree that it can be done better by not requiring the replacement
>> of the bootloader. Nevertheless, support for this board is already
>> shipped since LEDE-17.01 and I don't agree to drop support for a board
>> without providing an alternative/fixed/better image.
> Just to clarify: this is not ?support?. This is a user created custom hack that applies only to their modified board.
>
> T.
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Hi,
I agree that proper support for none modified boards is far better and I 
am always for having such support in tree. what i am failing to 
understand here is why it is so important to remove this support or 
none-support patch from the tree ? in general our stance was that if 
there is at least one user we'll try to carry the functionality as long 
as we can. So why not remove this when a better replacement is in place ?
 ??? John

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From hacks at slashdirt.org  Sat Jul 21 03:44:45 2018
From: hacks at slashdirt.org (Thibaut)
Date: Sat, 21 Jul 2018 09:44:45 +0200
Subject: [OpenWrt-Devel] [PATCH 1/1] ramips: remove RB750GR3 support
In-Reply-To: <06f179eb-44fc-b487-003f-a2cefcfe8ef3@phrozen.org>
References: <20180719172618.43863-1-hacks@slashdirt.org>
 <20180719172618.43863-2-hacks@slashdirt.org>
 <CABwW5nmvLfq_dXdBPRWsM_H4TWsVKyYn58sXsRaBuByT5vi5Zw@mail.gmail.com>
 <266BDA14-9291-4D4F-9756-CEC86C2CBF70@slashdirt.org>
 <06f179eb-44fc-b487-003f-a2cefcfe8ef3@phrozen.org>
Message-ID: <0C3714F4-A3A9-454B-8C9E-DEA280B0D40E@slashdirt.org>


> Le 21 juil. 2018 ? 09:24, John Crispin <john at phrozen.org> a ?crit :
> 
> 
> 
> On 19/07/18 20:08, Thibaut wrote:
>>> On 19 Jul 2018, at 19:52, Mathias Kresin <dev at kresin.me> wrote:
>>> 
>>> 2018-07-19 19:26 GMT+02:00 Thibaut VAR?NE <hacks at slashdirt.org>:
>>>> faf94d926e2810f895f2a98d4a49ee2fe8f673e8 added "support" for a hacked
>>>> device where the original boot loader (routerboot) has been replaced
>>>> by u-boot.
>>>> 
>>>> Support for this device with stock bootloader is possible (as evidenced
>>>> by support for the RBM33G), and conflicts with this code.
>>>> 
>>>> Remove code before release.
>>>> 
>>>> Signed-off-by: Thibaut VAR?NE <hacks at slashdirt.org>
>>> FYI, I already NAK'ed the very same patch on github.
>>> 
>>> I do agree that it can be done better by not requiring the replacement
>>> of the bootloader. Nevertheless, support for this board is already
>>> shipped since LEDE-17.01 and I don't agree to drop support for a board
>>> without providing an alternative/fixed/better image.
>> Just to clarify: this is not ?support?. This is a user created custom hack that applies only to their modified board.
>> 
>> T.
>> _______________________________________________
>> openwrt-devel mailing list
>> openwrt-devel at lists.openwrt.org
>> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
> Hi,
> I agree that proper support for none modified boards is far better and I am always for having such support in tree. what i am failing to understand here is why it is so important to remove this support or none-support patch from the tree ? in general our stance was that if there is at least one user we'll try to carry the functionality as long as we can. So why not remove this when a better replacement is in place ?

Because there will be no replacement and I certainly don?t want to confuse the end users into thinking there will be one.

I don?t know yet another way to say this more clearly: this patch doesn?t ?drop support?: support was _never there_. There will be no ?replacement?: there is no upgrade path.

What this patch does is dropping bad code. What there will be is proper, correct NEW support for the hardware this code /pretends/ to offer support for but doesn?t.

At the end of the day the device covered by this code is a /different/ device than the one support will be provided for. It?s A Frankendevice, that by the way doesn?t even pass the ?hardware available?? question. The installation instructions on the wiki do not even provision a way to revert the hack.

On a side note, if it?s a policy to support every user hack and bastardized hardware for which there is only one user _in tree_, then we have a fundamental difference in opinion and I?m afraid openwrt is then inflicting on itself a maintenance nightmare it can?t afford.

My 2c,
T

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From john at phrozen.org  Sat Jul 21 04:17:28 2018
From: john at phrozen.org (John Crispin)
Date: Sat, 21 Jul 2018 10:17:28 +0200
Subject: [OpenWrt-Devel] [PATCH 1/1] ramips: remove RB750GR3 support
In-Reply-To: <0C3714F4-A3A9-454B-8C9E-DEA280B0D40E@slashdirt.org>
References: <20180719172618.43863-1-hacks@slashdirt.org>
 <20180719172618.43863-2-hacks@slashdirt.org>
 <CABwW5nmvLfq_dXdBPRWsM_H4TWsVKyYn58sXsRaBuByT5vi5Zw@mail.gmail.com>
 <266BDA14-9291-4D4F-9756-CEC86C2CBF70@slashdirt.org>
 <06f179eb-44fc-b487-003f-a2cefcfe8ef3@phrozen.org>
 <0C3714F4-A3A9-454B-8C9E-DEA280B0D40E@slashdirt.org>
Message-ID: <0d273c19-cd66-2030-f089-f1b1abe6bf98@phrozen.org>



On 21/07/18 09:44, Thibaut wrote:
>> Le 21 juil. 2018 ? 09:24, John Crispin <john at phrozen.org> a ?crit :
>>
>>
>>
>> On 19/07/18 20:08, Thibaut wrote:
>>>> On 19 Jul 2018, at 19:52, Mathias Kresin <dev at kresin.me> wrote:
>>>>
>>>> 2018-07-19 19:26 GMT+02:00 Thibaut VAR?NE <hacks at slashdirt.org>:
>>>>> faf94d926e2810f895f2a98d4a49ee2fe8f673e8 added "support" for a hacked
>>>>> device where the original boot loader (routerboot) has been replaced
>>>>> by u-boot.
>>>>>
>>>>> Support for this device with stock bootloader is possible (as evidenced
>>>>> by support for the RBM33G), and conflicts with this code.
>>>>>
>>>>> Remove code before release.
>>>>>
>>>>> Signed-off-by: Thibaut VAR?NE <hacks at slashdirt.org>
>>>> FYI, I already NAK'ed the very same patch on github.
>>>>
>>>> I do agree that it can be done better by not requiring the replacement
>>>> of the bootloader. Nevertheless, support for this board is already
>>>> shipped since LEDE-17.01 and I don't agree to drop support for a board
>>>> without providing an alternative/fixed/better image.
>>> Just to clarify: this is not ?support?. This is a user created custom hack that applies only to their modified board.
>>>
>>> T.
>>> _______________________________________________
>>> openwrt-devel mailing list
>>> openwrt-devel at lists.openwrt.org
>>> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
>> Hi,
>> I agree that proper support for none modified boards is far better and I am always for having such support in tree. what i am failing to understand here is why it is so important to remove this support or none-support patch from the tree ? in general our stance was that if there is at least one user we'll try to carry the functionality as long as we can. So why not remove this when a better replacement is in place ?
> Because there will be no replacement and I certainly don?t want to confuse the end users into thinking there will be one.
>
> I don?t know yet another way to say this more clearly: this patch doesn?t ?drop support?: support was _never there_. There will be no ?replacement?: there is no upgrade path.
>
> What this patch does is dropping bad code. What there will be is proper, correct NEW support for the hardware this code /pretends/ to offer support for but doesn?t.
>
> At the end of the day the device covered by this code is a /different/ device than the one support will be provided for. It?s A Frankendevice, that by the way doesn?t even pass the ?hardware available?? question. The installation instructions on the wiki do not even provision a way to revert the hack.
>
> On a side note, if it?s a policy to support every user hack and bastardized hardware for which there is only one user _in tree_, then we have a fundamental difference in opinion and I?m afraid openwrt is then inflicting on itself a maintenance nightmare it can?t afford.
>
> My 2c,
> T
well, that certainly killed the discussion ....


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From hacks at slashdirt.org  Sat Jul 21 04:43:17 2018
From: hacks at slashdirt.org (Thibaut)
Date: Sat, 21 Jul 2018 10:43:17 +0200
Subject: [OpenWrt-Devel] [PATCH 1/1] ramips: remove RB750GR3 support
In-Reply-To: <0d273c19-cd66-2030-f089-f1b1abe6bf98@phrozen.org>
References: <20180719172618.43863-1-hacks@slashdirt.org>
 <20180719172618.43863-2-hacks@slashdirt.org>
 <CABwW5nmvLfq_dXdBPRWsM_H4TWsVKyYn58sXsRaBuByT5vi5Zw@mail.gmail.com>
 <266BDA14-9291-4D4F-9756-CEC86C2CBF70@slashdirt.org>
 <06f179eb-44fc-b487-003f-a2cefcfe8ef3@phrozen.org>
 <0C3714F4-A3A9-454B-8C9E-DEA280B0D40E@slashdirt.org>
 <0d273c19-cd66-2030-f089-f1b1abe6bf98@phrozen.org>
Message-ID: <072F7C00-74A1-4CD4-9EDD-F5D96B9094FE@slashdirt.org>



> Le 21 juil. 2018 ? 10:17, John Crispin <john at phrozen.org> a ?crit :
> 
> 
> 
> On 21/07/18 09:44, Thibaut wrote:
>>> Le 21 juil. 2018 ? 09:24, John Crispin <john at phrozen.org> a ?crit :
>>> 
>>> 
>>> 
>>> On 19/07/18 20:08, Thibaut wrote:
>>>>> On 19 Jul 2018, at 19:52, Mathias Kresin <dev at kresin.me> wrote:
>>>>> 
>>>>> 2018-07-19 19:26 GMT+02:00 Thibaut VAR?NE <hacks at slashdirt.org>:
>>>>>> faf94d926e2810f895f2a98d4a49ee2fe8f673e8 added "support" for a hacked
>>>>>> device where the original boot loader (routerboot) has been replaced
>>>>>> by u-boot.
>>>>>> 
>>>>>> Support for this device with stock bootloader is possible (as evidenced
>>>>>> by support for the RBM33G), and conflicts with this code.
>>>>>> 
>>>>>> Remove code before release.
>>>>>> 
>>>>>> Signed-off-by: Thibaut VAR?NE <hacks at slashdirt.org>
>>>>> FYI, I already NAK'ed the very same patch on github.
>>>>> 
>>>>> I do agree that it can be done better by not requiring the replacement
>>>>> of the bootloader. Nevertheless, support for this board is already
>>>>> shipped since LEDE-17.01 and I don't agree to drop support for a board
>>>>> without providing an alternative/fixed/better image.
>>>> Just to clarify: this is not ?support?. This is a user created custom hack that applies only to their modified board.
>>>> 
>>>> T.
>>>> _______________________________________________
>>>> openwrt-devel mailing list
>>>> openwrt-devel at lists.openwrt.org
>>>> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
>>> Hi,
>>> I agree that proper support for none modified boards is far better and I am always for having such support in tree. what i am failing to understand here is why it is so important to remove this support or none-support patch from the tree ? in general our stance was that if there is at least one user we'll try to carry the functionality as long as we can. So why not remove this when a better replacement is in place ?
>> Because there will be no replacement and I certainly don?t want to confuse the end users into thinking there will be one.
>> 
>> I don?t know yet another way to say this more clearly: this patch doesn?t ?drop support?: support was _never there_. There will be no ?replacement?: there is no upgrade path.
>> 
>> What this patch does is dropping bad code. What there will be is proper, correct NEW support for the hardware this code /pretends/ to offer support for but doesn?t.
>> 
>> At the end of the day the device covered by this code is a /different/ device than the one support will be provided for. It?s A Frankendevice, that by the way doesn?t even pass the ?hardware available?? question. The installation instructions on the wiki do not even provision a way to revert the hack.
>> 
>> On a side note, if it?s a policy to support every user hack and bastardized hardware for which there is only one user _in tree_, then we have a fundamental difference in opinion and I?m afraid openwrt is then inflicting on itself a maintenance nightmare it can?t afford.
>> 
>> My 2c,
>> T
> well, that certainly killed the discussion ....

Trying hard to explain my reasoning kills the discussion? I?m frankly baffled.


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From sscapi at gmail.com  Sat Jul 21 10:42:58 2018
From: sscapi at gmail.com (Sylwester Petela)
Date: Sat, 21 Jul 2018 16:42:58 +0200
Subject: [OpenWrt-Devel] [PATCH 1/1] ramips: remove RB750GR3 support
In-Reply-To: <072F7C00-74A1-4CD4-9EDD-F5D96B9094FE@slashdirt.org>
References: <20180719172618.43863-1-hacks@slashdirt.org>
 <20180719172618.43863-2-hacks@slashdirt.org>
 <CABwW5nmvLfq_dXdBPRWsM_H4TWsVKyYn58sXsRaBuByT5vi5Zw@mail.gmail.com>
 <266BDA14-9291-4D4F-9756-CEC86C2CBF70@slashdirt.org>
 <06f179eb-44fc-b487-003f-a2cefcfe8ef3@phrozen.org>
 <0C3714F4-A3A9-454B-8C9E-DEA280B0D40E@slashdirt.org>
 <0d273c19-cd66-2030-f089-f1b1abe6bf98@phrozen.org>
 <072F7C00-74A1-4CD4-9EDD-F5D96B9094FE@slashdirt.org>
Message-ID: <3d2d007f-c246-7694-e0e8-a3e8832bcb40@gmail.com>

W dniu 21.07.2018 o?10:43, Thibaut pisze:
>
>> Le 21 juil. 2018 ? 10:17, John Crispin <john at phrozen.org> a ?crit :
>>
>>
>>
>> On 21/07/18 09:44, Thibaut wrote:
>>>> Le 21 juil. 2018 ? 09:24, John Crispin <john at phrozen.org> a ?crit :
>>>>
>>>>
>>>>
>>>> On 19/07/18 20:08, Thibaut wrote:
>>>>>> On 19 Jul 2018, at 19:52, Mathias Kresin <dev at kresin.me> wrote:
>>>>>>
>>>>>> 2018-07-19 19:26 GMT+02:00 Thibaut VAR?NE <hacks at slashdirt.org>:
>>>>>>> faf94d926e2810f895f2a98d4a49ee2fe8f673e8 added "support" for a hacked
>>>>>>> device where the original boot loader (routerboot) has been replaced
>>>>>>> by u-boot.
>>>>>>>
>>>>>>> Support for this device with stock bootloader is possible (as evidenced
>>>>>>> by support for the RBM33G), and conflicts with this code.
>>>>>>>
>>>>>>> Remove code before release.
>>>>>>>
>>>>>>> Signed-off-by: Thibaut VAR?NE <hacks at slashdirt.org>
>>>>>> FYI, I already NAK'ed the very same patch on github.
>>>>>>
>>>>>> I do agree that it can be done better by not requiring the replacement
>>>>>> of the bootloader. Nevertheless, support for this board is already
>>>>>> shipped since LEDE-17.01 and I don't agree to drop support for a board
>>>>>> without providing an alternative/fixed/better image.
>>>>> Just to clarify: this is not ?support?. This is a user created custom hack that applies only to their modified board.
>>>>>
>>>>> T.
>>>>> _______________________________________________
>>>>> openwrt-devel mailing list
>>>>> openwrt-devel at lists.openwrt.org
>>>>> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
>>>> Hi,
>>>> I agree that proper support for none modified boards is far better and I am always for having such support in tree. what i am failing to understand here is why it is so important to remove this support or none-support patch from the tree ? in general our stance was that if there is at least one user we'll try to carry the functionality as long as we can. So why not remove this when a better replacement is in place ?
>>> Because there will be no replacement and I certainly don?t want to confuse the end users into thinking there will be one.
>>>
>>> I don?t know yet another way to say this more clearly: this patch doesn?t ?drop support?: support was _never there_. There will be no ?replacement?: there is no upgrade path.
>>>
>>> What this patch does is dropping bad code. What there will be is proper, correct NEW support for the hardware this code /pretends/ to offer support for but doesn?t.
>>>
>>> At the end of the day the device covered by this code is a /different/ device than the one support will be provided for. It?s A Frankendevice, that by the way doesn?t even pass the ?hardware available?? question. The installation instructions on the wiki do not even provision a way to revert the hack.
>>>
>>> On a side note, if it?s a policy to support every user hack and bastardized hardware for which there is only one user _in tree_, then we have a fundamental difference in opinion and I?m afraid openwrt is then inflicting on itself a maintenance nightmare it can?t afford.
>>>
>>> My 2c,
>>> T
>> well, that certainly killed the discussion ....
> Trying hard to explain my reasoning kills the discussion? I?m frankly baffled.
What John and others probably meant is that killing device support 
(replacing u-boot IMHO isn't "hardware mod" as You described(look at 
lantiq devices)) isn't best approach, instead if You have hardware in 
discussion You can help develop better support for questioned device and 
REPLACE/FIX it's implementation in OpenWRT.

Every device hack/introduction to OpenWRT has to began somewhere.
>
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From darkman.hr at gmail.com  Sat Jul 21 12:20:31 2018
From: darkman.hr at gmail.com (=?UTF-8?Q?Denis_Peri=C5=A1a?=)
Date: Sat, 21 Jul 2018 18:20:31 +0200
Subject: [OpenWrt-Devel] [PATCH 1/1] ramips: remove RB750GR3 support
In-Reply-To: <3d2d007f-c246-7694-e0e8-a3e8832bcb40@gmail.com>
References: <20180719172618.43863-1-hacks@slashdirt.org>
 <20180719172618.43863-2-hacks@slashdirt.org>
 <CABwW5nmvLfq_dXdBPRWsM_H4TWsVKyYn58sXsRaBuByT5vi5Zw@mail.gmail.com>
 <266BDA14-9291-4D4F-9756-CEC86C2CBF70@slashdirt.org>
 <06f179eb-44fc-b487-003f-a2cefcfe8ef3@phrozen.org>
 <0C3714F4-A3A9-454B-8C9E-DEA280B0D40E@slashdirt.org>
 <0d273c19-cd66-2030-f089-f1b1abe6bf98@phrozen.org>
 <072F7C00-74A1-4CD4-9EDD-F5D96B9094FE@slashdirt.org>
 <3d2d007f-c246-7694-e0e8-a3e8832bcb40@gmail.com>
Message-ID: <CAC8mBSX2Tq_426n068_W=CmmTsx8w7HF-E-3kiBfDe1=7Pc7PQ@mail.gmail.com>

I use this on two devices. Flashed by changing bootloader from tftpd image.
Works like a charm. I don't agree with removal.

On Sat, Jul 21, 2018 at 4:42 PM, Sylwester Petela <sscapi at gmail.com> wrote:
> W dniu 21.07.2018 o 10:43, Thibaut pisze:
>
>>
>>> Le 21 juil. 2018 ? 10:17, John Crispin <john at phrozen.org> a ?crit :
>>>
>>>
>>>
>>> On 21/07/18 09:44, Thibaut wrote:
>>>>>
>>>>> Le 21 juil. 2018 ? 09:24, John Crispin <john at phrozen.org> a ?crit :
>>>>>
>>>>>
>>>>>
>>>>> On 19/07/18 20:08, Thibaut wrote:
>>>>>>>
>>>>>>> On 19 Jul 2018, at 19:52, Mathias Kresin <dev at kresin.me> wrote:
>>>>>>>
>>>>>>> 2018-07-19 19:26 GMT+02:00 Thibaut VAR?NE <hacks at slashdirt.org>:
>>>>>>>>
>>>>>>>> faf94d926e2810f895f2a98d4a49ee2fe8f673e8 added "support" for a
>>>>>>>> hacked
>>>>>>>> device where the original boot loader (routerboot) has been replaced
>>>>>>>> by u-boot.
>>>>>>>>
>>>>>>>> Support for this device with stock bootloader is possible (as
>>>>>>>> evidenced
>>>>>>>> by support for the RBM33G), and conflicts with this code.
>>>>>>>>
>>>>>>>> Remove code before release.
>>>>>>>>
>>>>>>>> Signed-off-by: Thibaut VAR?NE <hacks at slashdirt.org>
>>>>>>>
>>>>>>> FYI, I already NAK'ed the very same patch on github.
>>>>>>>
>>>>>>> I do agree that it can be done better by not requiring the
>>>>>>> replacement
>>>>>>> of the bootloader. Nevertheless, support for this board is already
>>>>>>> shipped since LEDE-17.01 and I don't agree to drop support for a
>>>>>>> board
>>>>>>> without providing an alternative/fixed/better image.
>>>>>>
>>>>>> Just to clarify: this is not ?support?. This is a user created custom
>>>>>> hack that applies only to their modified board.
>>>>>>
>>>>>> T.
>>>>>> _______________________________________________
>>>>>> openwrt-devel mailing list
>>>>>> openwrt-devel at lists.openwrt.org
>>>>>> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
>>>>>
>>>>> Hi,
>>>>> I agree that proper support for none modified boards is far better and
>>>>> I am always for having such support in tree. what i am failing to understand
>>>>> here is why it is so important to remove this support or none-support patch
>>>>> from the tree ? in general our stance was that if there is at least one user
>>>>> we'll try to carry the functionality as long as we can. So why not remove
>>>>> this when a better replacement is in place ?
>>>>
>>>> Because there will be no replacement and I certainly don?t want to
>>>> confuse the end users into thinking there will be one.
>>>>
>>>> I don?t know yet another way to say this more clearly: this patch
>>>> doesn?t ?drop support?: support was _never there_. There will be no
>>>> ?replacement?: there is no upgrade path.
>>>>
>>>> What this patch does is dropping bad code. What there will be is proper,
>>>> correct NEW support for the hardware this code /pretends/ to offer support
>>>> for but doesn?t.
>>>>
>>>> At the end of the day the device covered by this code is a /different/
>>>> device than the one support will be provided for. It?s A Frankendevice, that
>>>> by the way doesn?t even pass the ?hardware available?? question. The
>>>> installation instructions on the wiki do not even provision a way to revert
>>>> the hack.
>>>>
>>>> On a side note, if it?s a policy to support every user hack and
>>>> bastardized hardware for which there is only one user _in tree_, then we
>>>> have a fundamental difference in opinion and I?m afraid openwrt is then
>>>> inflicting on itself a maintenance nightmare it can?t afford.
>>>>
>>>> My 2c,
>>>> T
>>>
>>> well, that certainly killed the discussion ....
>>
>> Trying hard to explain my reasoning kills the discussion? I?m frankly
>> baffled.
>
> What John and others probably meant is that killing device support
> (replacing u-boot IMHO isn't "hardware mod" as You described(look at lantiq
> devices)) isn't best approach, instead if You have hardware in discussion
> You can help develop better support for questioned device and REPLACE/FIX
> it's implementation in OpenWRT.
>
> Every device hack/introduction to OpenWRT has to began somewhere.
>
>>
>> _______________________________________________
>> openwrt-devel mailing list
>> openwrt-devel at lists.openwrt.org
>> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
>
>
>
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From tomereliyahu1 at gmail.com  Sat Jul 21 17:49:57 2018
From: tomereliyahu1 at gmail.com (Tomer Eliyahu)
Date: Sun, 22 Jul 2018 00:49:57 +0300
Subject: [OpenWrt-Devel] Packaging multi-version package (Openwrt Makefile)
Message-ID: <CA+eXE3y9L+jCDpsYn5=RDmt=d8rto1PKOoqOdQ=XCVRALqHdFg@mail.gmail.com>

Hi,

What is the correct way to package a multi-version application in Openwrt?
We are using git, so each version differs only in the PKG_SOURCE_VERSION.

I initially added a choice to select the package version (out of 3
supported versions) in the package/config section, but this stopped working
once one version had different dependencies (apparently the config section
is called after the DEPENDS section is parsed).

I would very much like to avoid using different package Makefiles, but for
now it looks like the only way.

Help please:)

Thanks,
Tomer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20180722/ce0091cc/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From ansuelsmth at gmail.com  Sun Jul 22 14:15:40 2018
From: ansuelsmth at gmail.com (Ansuel Smith)
Date: Sun, 22 Jul 2018 20:15:40 +0200
Subject: [OpenWrt-Devel] gcc 8.1 mvebu compilation error
Message-ID: <CA+_ehUxjXZjUeMkfi69cHbRkusDu-f9QEnkRc+++Kt3pFxiavw@mail.gmail.com>

Today i tried to compile a wrt3200acs (mvebu) build with gcc 8.1.0
i got this errors...

/home/Ansuel/openwrt/tmp/ccyVnmrs.s:204: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccyVnmrs.s:215: Error: architectural
extension `mp' is not allowed for the current base architecture
/home/Ansuel/openwrt/tmp/ccyVnmrs.s:216: Error: selected processor
does not support `pldw [r4]' in ARM mode
/home/Ansuel/openwrt/tmp/ccyVnmrs.s:219: Error: selected processor
does not support `pld [r4]' in ARM mode
/home/Ansuel/openwrt/tmp/ccyVnmrs.s:230: Error: selected processor
does not support `ldrex r3,[r4]' in ARM mode
/home/Ansuel/openwrt/tmp/ccyVnmrs.s:232: Error: selected processor
does not support `strex r2,r3,[r4]' in ARM mode
/home/Ansuel/openwrt/tmp/ccyVnmrs.s:248: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccyVnmrs.s:252: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccyVnmrs.s:350: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccyVnmrs.s:360: Error: architectural
extension `mp' is not allowed for the current base architecture
/home/Ansuel/openwrt/tmp/ccyVnmrs.s:361: Error: selected processor
does not support `pldw [r5]' in ARM mode
/home/Ansuel/openwrt/tmp/ccyVnmrs.s:364: Error: selected processor
does not support `pld [r5]' in ARM mode
/home/Ansuel/openwrt/tmp/ccyVnmrs.s:375: Error: selected processor
does not support `ldrex r3,[r5]' in ARM mode
/home/Ansuel/openwrt/tmp/ccyVnmrs.s:377: Error: selected processor
does not support `strex r2,r3,[r5]' in ARM mode
/home/Ansuel/openwrt/tmp/ccyVnmrs.s:393: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccyVnmrs.s:397: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccyVnmrs.s:441: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccyVnmrs.s:451: Error: architectural
extension `mp' is not allowed for the current base architecture
/home/Ansuel/openwrt/tmp/ccyVnmrs.s:452: Error: selected processor
does not support `pldw [r5]' in ARM mode
/home/Ansuel/openwrt/tmp/ccyVnmrs.s:455: Error: selected processor
does not support `pld [r5]' in ARM mode
/home/Ansuel/openwrt/tmp/ccyVnmrs.s:466: Error: selected processor
does not support `ldrex r3,[r5]' in ARM mode
/home/Ansuel/openwrt/tmp/ccyVnmrs.s:468: Error: selected processor
does not support `strex r2,r3,[r5]' in ARM mode
/home/Ansuel/openwrt/tmp/ccyVnmrs.s:484: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccyVnmrs.s:488: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccyVnmrs.s:631: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccyVnmrs.s:641: Error: architectural
extension `mp' is not allowed for the current base architecture
/home/Ansuel/openwrt/tmp/ccyVnmrs.s:642: Error: selected processor
does not support `pldw [r8]' in ARM mode
/home/Ansuel/openwrt/tmp/ccyVnmrs.s:645: Error: selected processor
does not support `pld [r8]' in ARM mode
/home/Ansuel/openwrt/tmp/ccyVnmrs.s:656: Error: selected processor
does not support `ldrex r3,[r8]' in ARM mode
/home/Ansuel/openwrt/tmp/ccyVnmrs.s:658: Error: selected processor
does not support `strex r2,r3,[r8]' in ARM mode
/home/Ansuel/openwrt/tmp/ccyVnmrs.s:674: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccyVnmrs.s:678: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccyVnmrs.s:722: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccyVnmrs.s:732: Error: architectural
extension `mp' is not allowed for the current base architecture
/home/Ansuel/openwrt/tmp/ccyVnmrs.s:733: Error: selected processor
does not support `pldw [r8]' in ARM mode
/home/Ansuel/openwrt/tmp/ccyVnmrs.s:736: Error: selected processor
does not support `pld [r8]' in ARM mode
/home/Ansuel/openwrt/tmp/ccyVnmrs.s:747: Error: selected processor
does not support `ldrex r3,[r8]' in ARM mode
/home/Ansuel/openwrt/tmp/ccyVnmrs.s:749: Error: selected processor
does not support `strex r2,r3,[r8]' in ARM mode
/home/Ansuel/openwrt/tmp/ccyVnmrs.s:765: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccyVnmrs.s:769: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccyVnmrs.s:1359: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccyVnmrs.s:1369: Error: architectural
extension `mp' is not allowed for the current base architecture
/home/Ansuel/openwrt/tmp/ccyVnmrs.s:1370: Error: selected processor
does not support `pldw [r5]' in ARM mode
/home/Ansuel/openwrt/tmp/ccyVnmrs.s:1373: Error: selected processor
does not support `pld [r5]' in ARM mode
/home/Ansuel/openwrt/tmp/ccyVnmrs.s:1384: Error: selected processor
does not support `ldrex r3,[r5]' in ARM mode
/home/Ansuel/openwrt/tmp/ccyVnmrs.s:1386: Error: selected processor
does not support `strex r2,r3,[r5]' in ARM mode
/home/Ansuel/openwrt/tmp/ccyVnmrs.s:1402: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccyVnmrs.s:1406: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccyVnmrs.s:1858: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccyVnmrs.s:1868: Error: architectural
extension `mp' is not allowed for the current base architecture
/home/Ansuel/openwrt/tmp/ccyVnmrs.s:1869: Error: selected processor
does not support `pldw [r10]' in ARM mode
/home/Ansuel/openwrt/tmp/ccyVnmrs.s:1872: Error: selected processor
does not support `pld [r10]' in ARM mode
/home/Ansuel/openwrt/tmp/ccyVnmrs.s:1883: Error: selected processor
does not support `ldrex r3,[r10]' in ARM mode
/home/Ansuel/openwrt/tmp/ccyVnmrs.s:1885: Error: selected processor
does not support `strex r2,r3,[r10]' in ARM mode
/home/Ansuel/openwrt/tmp/ccyVnmrs.s:1901: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccyVnmrs.s:1905: Error: selected processor
does not support `sev' in ARM mode
make[7]: *** [scripts/Makefile.build:328: drivers/bluetooth/hci_ldisc.o] Error 1
make[6]: *** [scripts/Makefile.build:587: drivers/bluetooth] Error 2
/home/Ansuel/openwrt/tmp/cciL0qi6.s: Assembler messages:
/home/Ansuel/openwrt/tmp/cciL0qi6.s:1807: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/cciL0qi6.s:1822: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/cciL0qi6.s:1826: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/cciL0qi6.s:1944: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/cciL0qi6.s:4244: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/cciL0qi6.s:4259: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/cciL0qi6.s:4263: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/cciL0qi6.s:4491: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/cciL0qi6.s:4506: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/cciL0qi6.s:4510: Error: selected processor
does not support `sev' in ARM mode
make[5]: *** [Makefile:1034: drivers] Error 2
make[5]: *** Waiting for unfinished jobs....
  CC [M]  fs/btrfs/extent-tree.o
make[7]: *** [scripts/Makefile.build:328: fs/btrfs/super.o] Error 1
make[7]: *** Waiting for unfinished jobs....
  CC [M]  crypto/kpp.o
  CC [M]  crypto/cmac.o
  CC [M]  crypto/hmac.o
/home/Ansuel/openwrt/tmp/ccQrDnIa.s: Assembler messages:
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:163: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:178: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:182: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:322: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:337: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:341: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:554: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:565: Error: architectural
extension `mp' is not allowed for the current base architecture
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:566: Error: selected processor
does not support `pldw [r8]' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:569: Error: selected processor
does not support `pld [r8]' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:580: Error: selected processor
does not support `ldrex r3,[r8]' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:582: Error: selected processor
does not support `strex r2,r3,[r8]' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:598: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:602: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:1285: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:1300: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:1304: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:1606: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:1624: Error: architectural
extension `mp' is not allowed for the current base architecture
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:1625: Error: selected processor
does not support `pldw [r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:1628: Error: selected processor
does not support `pld [r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:1642: Error: selected processor
does not support `ldrexd r8,r9,[r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:1645: Error: selected processor
does not support `strexd r2,r8,r9,[r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:1657: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:1833: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:1956: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:2073: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:2093: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:2097: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:2187: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:2207: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:2211: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:2309: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:2597: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:2702: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:2722: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:2726: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:2815: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:2835: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:2839: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:3061: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:3154: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:3261: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:3280: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:3284: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:3327: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:3346: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:3350: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:3495: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:3726: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:3866: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:3885: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:3889: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:3962: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:3977: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:3981: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:4070: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:4095: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:4099: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:4177: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:4359: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:4457: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:4476: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:4480: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:4550: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:4647: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:4673: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:4677: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:5621: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:5673: Error: architectural
extension `mp' is not allowed for the current base architecture
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:5674: Error: selected processor
does not support `pldw [r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:5677: Error: selected processor
does not support `pld [r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:5689: Error: selected processor
does not support `ldrex r2,[r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:5691: Error: selected processor
does not support `strex r1,r2,[r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:7929: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:7940: Error: architectural
extension `mp' is not allowed for the current base architecture
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:7941: Error: selected processor
does not support `pldw [r1]' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:7944: Error: selected processor
does not support `pld [r1]' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:7955: Error: selected processor
does not support `ldrex r3,[r1]' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:7957: Error: selected processor
does not support `strex r2,r3,[r1]' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:7973: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:7977: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:10741: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:10751: Error: architectural
extension `mp' is not allowed for the current base architecture
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:10752: Error: selected processor
does not support `pldw [r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:10755: Error: selected processor
does not support `pld [r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:10767: Error: selected processor
does not support `ldrex r2,[r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:10771: Error: selected processor
does not support `strex ip,r1,[r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:10809: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:11684: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:11700: Error: architectural
extension `mp' is not allowed for the current base architecture
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:11701: Error: selected processor
does not support `pldw [ip]' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:11704: Error: selected processor
does not support `pld [ip]' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:11718: Error: selected processor
does not support `ldrexd r0,r1,[ip]' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:11721: Error: selected processor
does not support `strexd lr,r0,r1,[ip]' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:11733: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:11811: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:11826: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:11830: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:11869: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:11888: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:11892: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:12092: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:12107: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:12111: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:12184: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:12199: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:12203: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:12309: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:12324: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:12328: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:13849: Error: architectural
extension `mp' is not allowed for the current base architecture
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:13850: Error: selected processor
does not support `pldw [r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:13853: Error: selected processor
does not support `pld [r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:13865: Error: selected processor
does not support `ldrex r2,[r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:13867: Error: selected processor
does not support `strex r1,r2,[r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:13898: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:14386: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:16321: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:17005: Error: architectural
extension `mp' is not allowed for the current base architecture
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:17006: Error: selected processor
does not support `pldw [r2]' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:17009: Error: selected processor
does not support `pld [r2]' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:17021: Error: selected processor
does not support `ldrex r1,[r2]' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:17023: Error: selected processor
does not support `strex r0,r1,[r2]' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:19586: Error: architectural
extension `mp' is not allowed for the current base architecture
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:19587: Error: selected processor
does not support `pldw [r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:19590: Error: selected processor
does not support `pld [r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:19602: Error: selected processor
does not support `ldrex r2,[r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:19604: Error: selected processor
does not support `strex r1,r2,[r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:24768: Error: architectural
extension `mp' is not allowed for the current base architecture
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:24769: Error: selected processor
does not support `pldw [r2]' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:24772: Error: selected processor
does not support `pld [r2]' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:24784: Error: selected processor
does not support `ldrex r1,[r2]' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:24786: Error: selected processor
does not support `strex r0,r1,[r2]' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:25005: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:26380: Error: architectural
extension `mp' is not allowed for the current base architecture
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:26381: Error: selected processor
does not support `pldw [r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:26384: Error: selected processor
does not support `pld [r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:26396: Error: selected processor
does not support `ldrex r2,[r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:26398: Error: selected processor
does not support `strex r1,r2,[r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:27323: Error: architectural
extension `mp' is not allowed for the current base architecture
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:27324: Error: selected processor
does not support `pldw [r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:27327: Error: selected processor
does not support `pld [r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:27339: Error: selected processor
does not support `ldrex r2,[r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:27341: Error: selected processor
does not support `strex r1,r2,[r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:32824: Error: architectural
extension `mp' is not allowed for the current base architecture
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:32825: Error: selected processor
does not support `pldw [r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:32828: Error: selected processor
does not support `pld [r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:32840: Error: selected processor
does not support `ldrex r2,[r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:32842: Error: selected processor
does not support `strex r1,r2,[r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:33483: Error: architectural
extension `mp' is not allowed for the current base architecture
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:33484: Error: selected processor
does not support `pldw [r2]' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:33487: Error: selected processor
does not support `pld [r2]' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:33499: Error: selected processor
does not support `ldrex r1,[r2]' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:33501: Error: selected processor
does not support `strex r0,r1,[r2]' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:33570: Error: architectural
extension `mp' is not allowed for the current base architecture
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:33571: Error: selected processor
does not support `pldw [r2]' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:33574: Error: selected processor
does not support `pld [r2]' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:33586: Error: selected processor
does not support `ldrex r1,[r2]' in ARM mode
/home/Ansuel/openwrt/tmp/ccQrDnIa.s:33588: Error: selected processor
does not support `strex r0,r1,[r2]' in ARM mode
make[7]: *** [scripts/Makefile.build:328: fs/btrfs/ctree.o] Error 1
  CC [M]  crypto/md5.o
  CC [M]  crypto/sha256_generic.o
  CC [M]  crypto/sha512_generic.o
  CC [M]  crypto/ecb.o
  CC [M]  crypto/cbc.o
  CC [M]  crypto/ctr.o
  CC [M]  crypto/fcrypt.o
  CC [M]  crypto/authenc.o
  CC [M]  crypto/authencesn.o
  CC [M]  crypto/drbg.o
/home/Ansuel/openwrt/tmp/ccmyifio.s: Assembler messages:
/home/Ansuel/openwrt/tmp/ccmyifio.s:64: Error: selected processor does
not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:264: Error: architectural
extension `mp' is not allowed for the current base architecture
/home/Ansuel/openwrt/tmp/ccmyifio.s:265: Error: selected processor
does not support `pldw [r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:268: Error: selected processor
does not support `pld [r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:280: Error: selected processor
does not support `ldrex r2,[r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:282: Error: selected processor
does not support `strex r1,r2,[r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:331: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:346: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:350: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:493: Error: selected processor
does not support `dmb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:564: Error: selected processor
does not support `dmb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:601: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:616: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:620: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:836: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:894: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:990: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:1005: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:1009: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:1078: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:1093: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:1097: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:1837: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:1852: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:1856: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:1979: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:1994: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:1998: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:2475: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:2490: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:2494: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:2540: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:2555: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:2559: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:2710: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:2725: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:2729: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:2775: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:2790: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:2794: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:3168: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:3183: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:3187: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:3233: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:3248: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:3252: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:3307: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:3323: Error: architectural
extension `mp' is not allowed for the current base architecture
/home/Ansuel/openwrt/tmp/ccmyifio.s:3324: Error: selected processor
does not support `pldw [r2]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:3327: Error: selected processor
does not support `pld [r2]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:3339: Error: selected processor
does not support `ldrex r1,[r2]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:3341: Error: selected processor
does not support `strex ip,r1,[r2]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:3353: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:4530: Error: architectural
extension `mp' is not allowed for the current base architecture
/home/Ansuel/openwrt/tmp/ccmyifio.s:4531: Error: selected processor
does not support `pldw [r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:4534: Error: selected processor
does not support `pld [r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:4546: Error: selected processor
does not support `ldrex r2,[r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:4548: Error: selected processor
does not support `strex r1,r2,[r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:4597: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:4612: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:4616: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:4662: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:4677: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:4681: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:4792: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:4808: Error: architectural
extension `mp' is not allowed for the current base architecture
/home/Ansuel/openwrt/tmp/ccmyifio.s:4809: Error: selected processor
does not support `pldw [r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:4812: Error: selected processor
does not support `pld [r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:4824: Error: selected processor
does not support `ldrex r2,[r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:4826: Error: selected processor
does not support `strex r1,r2,[r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:4838: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:4942: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:4957: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:4961: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:5008: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:5023: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:5027: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:7460: Error: architectural
extension `mp' is not allowed for the current base architecture
/home/Ansuel/openwrt/tmp/ccmyifio.s:7461: Error: selected processor
does not support `pldw [r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:7464: Error: selected processor
does not support `pld [r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:7476: Error: selected processor
does not support `ldrex r1,[r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:7478: Error: selected processor
does not support `strex r0,r1,[r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:7520: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:7535: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:7539: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:7617: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:7632: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:7636: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:7712: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:7727: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:7731: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:7852: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:7867: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:7871: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:7972: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:7987: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:7991: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:8057: Error: architectural
extension `mp' is not allowed for the current base architecture
/home/Ansuel/openwrt/tmp/ccmyifio.s:8058: Error: selected processor
does not support `pldw [r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:8061: Error: selected processor
does not support `pld [r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:8073: Error: selected processor
does not support `ldrex r2,[r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:8075: Error: selected processor
does not support `strex r1,r2,[r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:8165: Error: architectural
extension `mp' is not allowed for the current base architecture
/home/Ansuel/openwrt/tmp/ccmyifio.s:8166: Error: selected processor
does not support `pldw [r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:8169: Error: selected processor
does not support `pld [r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:8181: Error: selected processor
does not support `ldrex r2,[r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:8183: Error: selected processor
does not support `strex r1,r2,[r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:8443: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:8458: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:8462: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:8510: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:8525: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:8529: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:10975: Error: architectural
extension `mp' is not allowed for the current base architecture
/home/Ansuel/openwrt/tmp/ccmyifio.s:10976: Error: selected processor
does not support `pldw [r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:10979: Error: selected processor
does not support `pld [r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:10991: Error: selected processor
does not support `ldrex r2,[r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:10993: Error: selected processor
does not support `strex r1,r2,[r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:11026: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:11042: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:11046: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:11115: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:11130: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:11134: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:11190: Error: architectural
extension `mp' is not allowed for the current base architecture
/home/Ansuel/openwrt/tmp/ccmyifio.s:11191: Error: selected processor
does not support `pldw [r5]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:11194: Error: selected processor
does not support `pld [r5]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:11206: Error: selected processor
does not support `ldrex r3,[r5]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:11208: Error: selected processor
does not support `strex r2,r3,[r5]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:11239: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:11254: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:11258: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:11345: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:11360: Error: architectural
extension `mp' is not allowed for the current base architecture
/home/Ansuel/openwrt/tmp/ccmyifio.s:11361: Error: selected processor
does not support `pldw [r5]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:11364: Error: selected processor
does not support `pld [r5]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:11376: Error: selected processor
does not support `ldrex r3,[r5]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:11378: Error: selected processor
does not support `strex r2,r3,[r5]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:11390: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:11502: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:11517: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:11521: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:11709: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:11724: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:11728: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:12241: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:12465: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:12480: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:12484: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:12653: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:12668: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:12672: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:13806: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:13821: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:13825: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:13935: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:13950: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:13954: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:14078: Error: architectural
extension `mp' is not allowed for the current base architecture
/home/Ansuel/openwrt/tmp/ccmyifio.s:14079: Error: selected processor
does not support `pldw [r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:14082: Error: selected processor
does not support `pld [r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:14094: Error: selected processor
does not support `ldrex r2,[r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:14096: Error: selected processor
does not support `strex r1,r2,[r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:14128: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:14143: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:14147: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:16200: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:16215: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:16219: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:16270: Error: selected processor
does not support `ldrexd r2,r3,[ip]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:16490: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:16505: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:16509: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:16632: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:16647: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:16651: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:17105: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:17120: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:17124: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:17736: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:17751: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:17755: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:17855: Error: architectural
extension `mp' is not allowed for the current base architecture
/home/Ansuel/openwrt/tmp/ccmyifio.s:17856: Error: selected processor
does not support `pldw [r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:17859: Error: selected processor
does not support `pld [r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:17871: Error: selected processor
does not support `ldrex r2,[r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:17873: Error: selected processor
does not support `strex r1,r2,[r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:17911: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:17927: Error: architectural
extension `mp' is not allowed for the current base architecture
/home/Ansuel/openwrt/tmp/ccmyifio.s:17928: Error: selected processor
does not support `pldw [r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:17931: Error: selected processor
does not support `pld [r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:17943: Error: selected processor
does not support `ldrex r2,[r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:17945: Error: selected processor
does not support `strex r1,r2,[r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:17957: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:18142: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:18157: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:18161: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:18252: Error: architectural
extension `mp' is not allowed for the current base architecture
/home/Ansuel/openwrt/tmp/ccmyifio.s:18253: Error: selected processor
does not support `pldw [r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:18256: Error: selected processor
does not support `pld [r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:18268: Error: selected processor
does not support `ldrex r2,[r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:18270: Error: selected processor
does not support `strex r1,r2,[r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:18303: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:18318: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:18322: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:18511: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:18526: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:18530: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:18871: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:18886: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:18890: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:18938: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:18953: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:18957: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:19088: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:19103: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:19107: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:19155: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:19170: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:19174: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:19399: Error: architectural
extension `mp' is not allowed for the current base architecture
/home/Ansuel/openwrt/tmp/ccmyifio.s:19400: Error: selected processor
does not support `pldw [r2]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:19403: Error: selected processor
does not support `pld [r2]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:19415: Error: selected processor
does not support `ldrex r2,[r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:19417: Error: selected processor
does not support `strex r1,r2,[r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:19452: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:19467: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:19471: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:19566: Error: architectural
extension `mp' is not allowed for the current base architecture
/home/Ansuel/openwrt/tmp/ccmyifio.s:19567: Error: selected processor
does not support `pldw [r2]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:19570: Error: selected processor
does not support `pld [r2]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:19582: Error: selected processor
does not support `ldrex r1,[r2]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:19584: Error: selected processor
does not support `strex r0,r1,[r2]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:19672: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:19687: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:19691: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:20934: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:20949: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:20953: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:21094: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:21109: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:21113: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:21248: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:21263: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:21267: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:21326: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:21341: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:21345: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:22590: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:22605: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:22609: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:23769: Error: architectural
extension `mp' is not allowed for the current base architecture
/home/Ansuel/openwrt/tmp/ccmyifio.s:23770: Error: selected processor
does not support `pldw [r8]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:23773: Error: selected processor
does not support `pld [r8]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:23785: Error: selected processor
does not support `ldrex r2,[r8]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:23787: Error: selected processor
does not support `strex r1,r2,[r8]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:23818: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:23833: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:23837: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:23924: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:23939: Error: architectural
extension `mp' is not allowed for the current base architecture
/home/Ansuel/openwrt/tmp/ccmyifio.s:23940: Error: selected processor
does not support `pldw [r8]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:23943: Error: selected processor
does not support `pld [r8]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:23955: Error: selected processor
does not support `ldrex r2,[r8]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:23957: Error: selected processor
does not support `strex r1,r2,[r8]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:23969: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:24114: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:24129: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:24133: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:24183: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:24198: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:24202: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:32394: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:32409: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:32413: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:32489: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:33741: Error: architectural
extension `mp' is not allowed for the current base architecture
/home/Ansuel/openwrt/tmp/ccmyifio.s:33742: Error: selected processor
does not support `pldw [r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:33745: Error: selected processor
does not support `pld [r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:33757: Error: selected processor
does not support `ldrex r2,[r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:33759: Error: selected processor
does not support `strex r1,r2,[r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:33790: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:33805: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:33809: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:33896: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:33912: Error: architectural
extension `mp' is not allowed for the current base architecture
/home/Ansuel/openwrt/tmp/ccmyifio.s:33913: Error: selected processor
does not support `pldw [r0]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:33916: Error: selected processor
does not support `pld [r0]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:33928: Error: selected processor
does not support `ldrex r3,[r0]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:33930: Error: selected processor
does not support `strex r2,r3,[r0]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:33942: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:34198: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:34213: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:34217: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:34636: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:34651: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:34655: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:34725: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:34740: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:34744: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:35457: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:35472: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:35476: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:36155: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:36170: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:36174: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:37716: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:37731: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:37735: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:37788: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:37803: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:37807: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:38007: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:38022: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:38026: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:38090: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:38105: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:38109: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:38244: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:38259: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:38263: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:39035: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:39050: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:39054: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:39114: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:39129: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:39133: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:39224: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:39239: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:39243: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:39289: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:39304: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:39308: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:39378: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:39393: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:39397: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:39488: Error: architectural
extension `mp' is not allowed for the current base architecture
/home/Ansuel/openwrt/tmp/ccmyifio.s:39489: Error: selected processor
does not support `pldw [r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:39492: Error: selected processor
does not support `pld [r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:39504: Error: selected processor
does not support `ldrex r2,[r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:39506: Error: selected processor
does not support `strex r1,r2,[r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:39585: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:39600: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:39604: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:41499: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:41514: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:41518: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:41604: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:41620: Error: architectural
extension `mp' is not allowed for the current base architecture
/home/Ansuel/openwrt/tmp/ccmyifio.s:41621: Error: selected processor
does not support `pldw [r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:41624: Error: selected processor
does not support `pld [r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:41636: Error: selected processor
does not support `ldrex r2,[r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:41638: Error: selected processor
does not support `strex r1,r2,[r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:41650: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:41792: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:41807: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:41811: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:41902: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:41918: Error: architectural
extension `mp' is not allowed for the current base architecture
/home/Ansuel/openwrt/tmp/ccmyifio.s:41919: Error: selected processor
does not support `pldw [r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:41922: Error: selected processor
does not support `pld [r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:41934: Error: selected processor
does not support `ldrex r2,[r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:41936: Error: selected processor
does not support `strex r1,r2,[r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:41948: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:42122: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:42137: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:42141: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:42972: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:42988: Error: architectural
extension `mp' is not allowed for the current base architecture
/home/Ansuel/openwrt/tmp/ccmyifio.s:42989: Error: selected processor
does not support `pldw [r0]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:42992: Error: selected processor
does not support `pld [r0]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:43004: Error: selected processor
does not support `ldrex r3,[r0]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:43006: Error: selected processor
does not support `strex r2,r3,[r0]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:43018: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:45998: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:46013: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:46017: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:46063: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:46078: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:46082: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:47152: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:47168: Error: architectural
extension `mp' is not allowed for the current base architecture
/home/Ansuel/openwrt/tmp/ccmyifio.s:47169: Error: selected processor
does not support `pldw [r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:47172: Error: selected processor
does not support `pld [r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:47184: Error: selected processor
does not support `ldrex r2,[r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:47186: Error: selected processor
does not support `strex r1,r2,[r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:47198: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:47510: Error: architectural
extension `mp' is not allowed for the current base architecture
/home/Ansuel/openwrt/tmp/ccmyifio.s:47511: Error: selected processor
does not support `pldw [r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:47514: Error: selected processor
does not support `pld [r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:47526: Error: selected processor
does not support `ldrex r2,[r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:47528: Error: selected processor
does not support `strex r1,r2,[r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:47970: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:47985: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:47989: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:48068: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:48083: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:48087: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:48401: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:48416: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:48420: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:48466: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:48481: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:48485: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:48726: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:48741: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:48745: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:48801: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:48816: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:48820: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:49273: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:49288: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:49292: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:49389: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:49404: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:49408: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:49783: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:49798: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:49802: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:49877: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:49892: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:49896: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:50056: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:50071: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:50075: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:51014: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:51024: Error: architectural
extension `mp' is not allowed for the current base architecture
/home/Ansuel/openwrt/tmp/ccmyifio.s:51025: Error: selected processor
does not support `pldw [r6]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:51028: Error: selected processor
does not support `pld [r6]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:51039: Error: selected processor
does not support `ldrex r3,[r6]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:51041: Error: selected processor
does not support `strex r2,r3,[r6]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:51057: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:51061: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:51713: Error: architectural
extension `mp' is not allowed for the current base architecture
/home/Ansuel/openwrt/tmp/ccmyifio.s:51714: Error: selected processor
does not support `pldw [r2]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:51717: Error: selected processor
does not support `pld [r2]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:51729: Error: selected processor
does not support `ldrex r1,[r2]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:51731: Error: selected processor
does not support `strex r0,r1,[r2]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:51818: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:51833: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:51837: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:52503: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:52518: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:52522: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:52999: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:53014: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:53018: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:53088: Error: architectural
extension `mp' is not allowed for the current base architecture
/home/Ansuel/openwrt/tmp/ccmyifio.s:53089: Error: selected processor
does not support `pldw [r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:53092: Error: selected processor
does not support `pld [r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:53104: Error: selected processor
does not support `ldrex r2,[r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:53106: Error: selected processor
does not support `strex r1,r2,[r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:53142: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:53157: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:53161: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:53257: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:53272: Error: architectural
extension `mp' is not allowed for the current base architecture
/home/Ansuel/openwrt/tmp/ccmyifio.s:53273: Error: selected processor
does not support `pldw [r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:53276: Error: selected processor
does not support `pld [r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:53288: Error: selected processor
does not support `ldrex r2,[r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:53290: Error: selected processor
does not support `strex r1,r2,[r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:53302: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:53429: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:53444: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:53448: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:53921: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:53936: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:53940: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:53999: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:54014: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:54018: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:54313: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:54328: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:54332: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:54650: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:54665: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:54669: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:54809: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:54824: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:54828: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:54994: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:55009: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:55013: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:55279: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:55294: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:55298: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:55590: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:55608: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:55695: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:55712: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:55800: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:55815: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:55819: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:55869: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:55884: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:55888: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:56062: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:56077: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:56081: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:56483: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:56498: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:56502: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:56737: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:56752: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:56756: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:57086: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:57101: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:57105: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:57903: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:57918: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:57922: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:57982: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:57997: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:58001: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:58299: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:58314: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:58318: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:58448: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:58463: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:58467: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:58528: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:58543: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:58547: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:59504: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:59519: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:59523: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:59635: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:59650: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:59654: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:60619: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:60634: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:60638: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:62365: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:62380: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:62384: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:62531: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:62546: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:62550: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:63642: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:63657: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:63661: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:63805: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:63820: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:63824: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:63869: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:63884: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:63888: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:64126: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:64141: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:64145: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:64656: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:64671: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:64675: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:65538: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:65553: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:65557: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:65694: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:65709: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:65713: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:65948: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:65963: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:65967: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:66252: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:66267: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:66271: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:66657: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:66672: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:66676: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:66732: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:66747: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:66751: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:66842: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:66857: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:66861: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:66940: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:66955: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:66959: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:67265: Error: architectural
extension `mp' is not allowed for the current base architecture
/home/Ansuel/openwrt/tmp/ccmyifio.s:67266: Error: selected processor
does not support `pldw [r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:67269: Error: selected processor
does not support `pld [r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:67281: Error: selected processor
does not support `ldrex r2,[r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:67283: Error: selected processor
does not support `strex r1,r2,[r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:67505: Error: architectural
extension `mp' is not allowed for the current base architecture
/home/Ansuel/openwrt/tmp/ccmyifio.s:67506: Error: selected processor
does not support `pldw [r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:67509: Error: selected processor
does not support `pld [r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:67521: Error: selected processor
does not support `ldrex r2,[r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:67523: Error: selected processor
does not support `strex r1,r2,[r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:67582: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:67597: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:67601: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:67717: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:67732: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:67736: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:67852: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:67867: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:67871: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:67982: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:67997: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:68001: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:68120: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:68135: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:68139: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:68219: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:68234: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:68238: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:68329: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:68395: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:68410: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:68414: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:68527: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:68543: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:68547: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:68610: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:68625: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:68629: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:68968: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:68983: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:68987: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:69051: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:69066: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:69070: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:69145: Error: architectural
extension `mp' is not allowed for the current base architecture
/home/Ansuel/openwrt/tmp/ccmyifio.s:69146: Error: selected processor
does not support `pldw [r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:69149: Error: selected processor
does not support `pld [r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:69161: Error: selected processor
does not support `ldrex r2,[r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:69163: Error: selected processor
does not support `strex r1,r2,[r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:69452: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:69467: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:69471: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:69788: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:69803: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:69807: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:71791: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:71806: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:71810: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:71948: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:71963: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:71967: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:72280: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:72295: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:72299: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:72517: Error: architectural
extension `mp' is not allowed for the current base architecture
/home/Ansuel/openwrt/tmp/ccmyifio.s:72518: Error: selected processor
does not support `pldw [r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:72521: Error: selected processor
does not support `pld [r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:72533: Error: selected processor
does not support `ldrex r2,[r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:72535: Error: selected processor
does not support `strex r1,r2,[r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:72567: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:72582: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:72586: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:72852: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:72867: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:72871: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:72924: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:72939: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:72943: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:73771: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:73786: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:73790: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:73850: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:73865: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:73869: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:74072: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:74087: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:74091: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:74272: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:74287: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:74291: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:74401: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:74416: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:74420: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:74471: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:74486: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:74490: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:74650: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:74665: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:74669: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:74971: Error: selected processor
does not support `dmb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:75053: Error: selected processor
does not support `dmb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:75098: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:75113: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:75117: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:75243: Error: architectural
extension `mp' is not allowed for the current base architecture
/home/Ansuel/openwrt/tmp/ccmyifio.s:75244: Error: selected processor
does not support `pldw [r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:75247: Error: selected processor
does not support `pld [r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:75259: Error: selected processor
does not support `ldrex r2,[r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:75261: Error: selected processor
does not support `strex r1,r2,[r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:75486: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:75501: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:75505: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:75806: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:75821: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:75825: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:76082: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:76097: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:76101: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:76156: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:76171: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:76175: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:76372: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:76382: Error: architectural
extension `mp' is not allowed for the current base architecture
/home/Ansuel/openwrt/tmp/ccmyifio.s:76383: Error: selected processor
does not support `pldw [r4]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:76386: Error: selected processor
does not support `pld [r4]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:76397: Error: selected processor
does not support `ldrex r3,[r4]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:76399: Error: selected processor
does not support `strex r2,r3,[r4]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:76415: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:76419: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:76762: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:76777: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:76781: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:76849: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:76864: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:76868: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:77148: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:77163: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:77167: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:77219: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:77234: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:77238: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:77433: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:77449: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:77453: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:77495: Error: architectural
extension `mp' is not allowed for the current base architecture
/home/Ansuel/openwrt/tmp/ccmyifio.s:77496: Error: selected processor
does not support `pldw [r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:77499: Error: selected processor
does not support `pld [r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:77511: Error: selected processor
does not support `ldrex r2,[r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:77513: Error: selected processor
does not support `strex r1,r2,[r3]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:77588: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:77603: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:77607: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:77676: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:77692: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:77696: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:78386: Error: architectural
extension `mp' is not allowed for the current base architecture
/home/Ansuel/openwrt/tmp/ccmyifio.s:78387: Error: selected processor
does not support `pldw [r2]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:78390: Error: selected processor
does not support `pld [r2]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:78402: Error: selected processor
does not support `ldrex r1,[r2]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:78404: Error: selected processor
does not support `strex r0,r1,[r2]' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:78448: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:78463: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:78467: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:78861: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccmyifio.s:78991: Error: selected processor
does not support `dmb ish' in ARM mode
make[7]: *** [scripts/Makefile.build:328: fs/btrfs/extent-tree.o] Error 1
make[6]: *** [scripts/Makefile.build:587: fs/btrfs] Error 2
make[5]: *** [Makefile:1034: fs] Error 2
  CC [M]  crypto/jitterentropy.o
  CC [M]  crypto/jitterentropy-kcapi.o
  CC [M]  crypto/ecc.o
  CC [M]  crypto/ecdh.o
  CC [M]  crypto/ecdh_helper.o
/home/Ansuel/openwrt/tmp/ccbRR5D8.s: Assembler messages:
/home/Ansuel/openwrt/tmp/ccbRR5D8.s:138: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccbRR5D8.s:153: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccbRR5D8.s:157: Error: selected processor
does not support `sev' in ARM mode
/home/Ansuel/openwrt/tmp/ccbRR5D8.s:303: Error: selected processor
does not support `dmb ish' in ARM mode
/home/Ansuel/openwrt/tmp/ccbRR5D8.s:318: Error: selected processor
does not support `dsb ishst' in ARM mode
/home/Ansuel/openwrt/tmp/ccbRR5D8.s:322: Error: selected processor
does not support `sev' in ARM mode
  CC [M]  crypto/xor.o
  LD [M]  crypto/ecdh_generic.o
make[6]: *** [scripts/Makefile.build:328: crypto/jitterentropy-kcapi.o] Error 1
make[6]: *** Waiting for unfinished jobs....
/home/Ansuel/openwrt/tmp/ccj5Vfto.s: Assembler messages:
/home/Ansuel/openwrt/tmp/ccj5Vfto.s:1819: Error: selected processor
does not support `dsb ' in ARM mode
/home/Ansuel/openwrt/tmp/ccj5Vfto.s:1835: Error: selected processor
does not support `dsb ' in ARM mode
/home/Ansuel/openwrt/tmp/ccj5Vfto.s:1848: Error: selected processor
does not support `dsb ' in ARM mode
make[6]: *** [scripts/Makefile.build:335: crypto/xor.o] Error 1
make[5]: *** [Makefile:1034: crypto] Error 2
make[5]: Leaving directory
'/home/Ansuel/openwrt/build_dir/target-arm_cortex-a9+vfpv3_musl_eabi/linux-mvebu_cortexa9/linux-4.14.54'
make[4]: *** [Makefile:22:
/home/Ansuel/openwrt/build_dir/target-arm_cortex-a9+vfpv3_musl_eabi/linux-mvebu_cortexa9/linux-4.14.54/.modules]
Error 2
make[4]: Leaving directory '/home/Ansuel/openwrt/target/linux/mvebu'
make[3]: *** [Makefile:13: compile] Error 2
make[3]: Leaving directory '/home/Ansuel/openwrt/target/linux'

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From foss at volatilesystems.org  Sun Jul 22 18:45:18 2018
From: foss at volatilesystems.org (Stijn Segers)
Date: Mon, 23 Jul 2018 00:45:18 +0200
Subject: [OpenWrt-Devel] [PATCH 1/2] kernel: bump 4.9 to 4.9.114 for 18.06
Message-ID: <20180722224519.1814-1-foss@volatilesystems.org>

* Refreshed patches.
* Removed patches:
  - target/linux/ar71xx/patches-4.9/403-mtd_fix_cfi_cmdset_0002_status_check.patch made redundant by upstream changes
  - target/linux/brcm63xx/patches-4.9/001-4.11-01-mtd-m25p80-consider-max-message-size-in-m25p80_read.patch accepted upstream
  - target/linux/brcm63xx/patches-4.9/001-4.15-08-bcm63xx_enet-correct-clock-usage.patch accepted upstream
  - target/linux/brcm63xx/patches-4.9/001-4.15-09-bcm63xx_enet-do-not-write-to-random-DMA-channel-on-B.patch accepted upstream

Compile-tested on: ar71xx
Run-tested on: ar71xx

Signed-off-by: Stijn Segers <foss at volatilesystems.org>
---
 include/kernel-version.mk                          |   4 +-
 .../403-mtd_fix_cfi_cmdset_0002_status_check.patch |  69 -----
 ...low-to-pass-probe-types-via-platform-data.patch |   4 +-
 .../411-mtd-cfi_cmdset_0002-force-word-write.patch |   8 +-
 .../patches-4.9/910-unaligned_access_hacks.patch   |   2 +-
 ...gnore-dtco-targets-when-filtering-symbols.patch |   2 +-
 ...-consider-max-message-size-in-m25p80_read.patch |  30 --
 ...-4.15-08-bcm63xx_enet-correct-clock-usage.patch | 101 ------
 ...t-do-not-write-to-random-DMA-channel-on-B.patch |  29 --
 ...ort-for-releasing-multiple-instances-of-a.patch |   2 +-
 ..._alloc_page_frag-to-page_frag_alloc-and-_.patch |   4 +-
 ..._page_frag-functions-to-__page_frag_cache.patch |   6 +-
 .../090-net-generalize-napi_complete_done.patch    |   2 +-
 .../hack-4.9/211-host_tools_portability.patch      |   2 +-
 ...c_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch |   2 +-
 ...610-netfilter_match_bypass_default_checks.patch |   6 +-
 .../pending-4.9/630-packet_socket_type.patch       |   6 +-
 .../generic/pending-4.9/834-ledtrig-libata.patch   |  10 +-
 ...MTD-m25p80-allow-loading-mtd-name-from-OF.patch |   4 +-
 .../patches-4.9/817-usb-support-layerscape.patch   |   2 +-
 .../sunxi/patches-4.9/0052-stmmac-form-4-12.patch  | 344 ++++++++++-----------
 21 files changed, 194 insertions(+), 445 deletions(-)
 delete mode 100644 target/linux/ar71xx/patches-4.9/403-mtd_fix_cfi_cmdset_0002_status_check.patch
 delete mode 100644 target/linux/brcm63xx/patches-4.9/001-4.11-01-mtd-m25p80-consider-max-message-size-in-m25p80_read.patch
 delete mode 100644 target/linux/brcm63xx/patches-4.9/001-4.15-08-bcm63xx_enet-correct-clock-usage.patch
 delete mode 100644 target/linux/brcm63xx/patches-4.9/001-4.15-09-bcm63xx_enet-do-not-write-to-random-DMA-channel-on-B.patch

diff --git a/include/kernel-version.mk b/include/kernel-version.mk
index f0d8160e34..ec108656e4 100644
--- a/include/kernel-version.mk
+++ b/include/kernel-version.mk
@@ -4,12 +4,12 @@ LINUX_RELEASE?=1
 
 LINUX_VERSION-3.18 = .71
 LINUX_VERSION-4.4 = .121
-LINUX_VERSION-4.9 = .111
+LINUX_VERSION-4.9 = .114
 LINUX_VERSION-4.14 = .54
 
 LINUX_KERNEL_HASH-3.18.71 = 5abc9778ad44ce02ed6c8ab52ece8a21c6d20d21f6ed8a19287b4a38a50c1240
 LINUX_KERNEL_HASH-4.4.121 = 44a88268b5088dc326b30c9b9133ac35a9a200b636b7268d08f32abeae6ca729
-LINUX_KERNEL_HASH-4.9.111 = 5966558959dc580f163766f3fdefd7e57c01b2b45d51202d00b3807c253759dd
+LINUX_KERNEL_HASH-4.9.114 = e6e83644b0d9ea5ae4ba7968372b4c8096ad27ac2144a1cb5c0348cbb24072b0
 LINUX_KERNEL_HASH-4.14.54 = 451642ac28c539a91072f1fb83b1c061d6d44df870ddf5562400ade5e1c4b6c6
 
 remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
diff --git a/target/linux/ar71xx/patches-4.9/403-mtd_fix_cfi_cmdset_0002_status_check.patch b/target/linux/ar71xx/patches-4.9/403-mtd_fix_cfi_cmdset_0002_status_check.patch
deleted file mode 100644
index 3a7fe99e65..0000000000
--- a/target/linux/ar71xx/patches-4.9/403-mtd_fix_cfi_cmdset_0002_status_check.patch
+++ /dev/null
@@ -1,69 +0,0 @@
---- a/drivers/mtd/chips/cfi_cmdset_0002.c
-+++ b/drivers/mtd/chips/cfi_cmdset_0002.c
-@@ -1631,8 +1631,8 @@ static int __xipram do_write_oneword(str
- 			break;
- 		}
- 
--		if (chip_ready(map, adr))
--			break;
-+		if (chip_good(map, adr, datum))
-+			goto enable_xip;
- 
- 		/* Latency issues. Drop the lock, wait a while and retry */
- 		UDELAY(map, chip, adr, 1);
-@@ -1648,6 +1648,8 @@ static int __xipram do_write_oneword(str
- 
- 		ret = -EIO;
- 	}
-+
-+ enable_xip:
- 	xip_enable(map, chip, adr);
-  op_done:
- 	if (mode == FL_OTP_WRITE)
-@@ -2226,7 +2228,6 @@ static int cfi_amdstd_panic_write(struct
- 	return 0;
- }
- 
--
- /*
-  * Handle devices with one erase region, that only implement
-  * the chip erase command.
-@@ -2291,8 +2292,8 @@ static int __xipram do_erase_chip(struct
- 			chip->erase_suspended = 0;
- 		}
- 
--		if (chip_ready(map, adr))
--			break;
-+		if (chip_good(map, adr, map_word_ff(map)))
-+			goto op_done;
- 
- 		if (time_after(jiffies, timeo)) {
- 			printk(KERN_WARNING "MTD %s(): software timeout\n",
-@@ -2312,6 +2313,7 @@ static int __xipram do_erase_chip(struct
- 		ret = -EIO;
- 	}
- 
-+ op_done:
- 	chip->state = FL_READY;
- 	xip_enable(map, chip, adr);
- 	DISABLE_VPP(map);
-@@ -2381,9 +2383,9 @@ static int __xipram do_erase_oneblock(st
- 			chip->erase_suspended = 0;
- 		}
- 
--		if (chip_ready(map, adr)) {
-+		if (chip_good(map, adr, map_word_ff(map))) {
- 			xip_enable(map, chip, adr);
--			break;
-+			goto op_done;
- 		}
- 
- 		if (time_after(jiffies, timeo)) {
-@@ -2405,6 +2407,7 @@ static int __xipram do_erase_oneblock(st
- 		ret = -EIO;
- 	}
- 
-+ op_done:
- 	chip->state = FL_READY;
- 	DISABLE_VPP(map);
- 	put_chip(map, chip, adr);
diff --git a/target/linux/ar71xx/patches-4.9/407-mtd-m25p80-allow-to-pass-probe-types-via-platform-data.patch b/target/linux/ar71xx/patches-4.9/407-mtd-m25p80-allow-to-pass-probe-types-via-platform-data.patch
index 418db2a2bf..cfc84c4afa 100644
--- a/target/linux/ar71xx/patches-4.9/407-mtd-m25p80-allow-to-pass-probe-types-via-platform-data.patch
+++ b/target/linux/ar71xx/patches-4.9/407-mtd-m25p80-allow-to-pass-probe-types-via-platform-data.patch
@@ -1,6 +1,6 @@
 --- a/drivers/mtd/devices/m25p80.c
 +++ b/drivers/mtd/devices/m25p80.c
-@@ -194,6 +194,7 @@ static ssize_t m25p80_read(struct spi_no
+@@ -195,6 +195,7 @@ static ssize_t m25p80_read(struct spi_no
   */
  static int m25p_probe(struct spi_device *spi)
  {
@@ -8,7 +8,7 @@
  	struct flash_platform_data	*data;
  	struct m25p *flash;
  	struct spi_nor *nor;
-@@ -246,8 +247,11 @@ static int m25p_probe(struct spi_device
+@@ -247,8 +248,11 @@ static int m25p_probe(struct spi_device
  	if (ret)
  		return ret;
  
diff --git a/target/linux/ar71xx/patches-4.9/411-mtd-cfi_cmdset_0002-force-word-write.patch b/target/linux/ar71xx/patches-4.9/411-mtd-cfi_cmdset_0002-force-word-write.patch
index 25a73dcdff..ddd69f17e1 100644
--- a/target/linux/ar71xx/patches-4.9/411-mtd-cfi_cmdset_0002-force-word-write.patch
+++ b/target/linux/ar71xx/patches-4.9/411-mtd-cfi_cmdset_0002-force-word-write.patch
@@ -7,7 +7,7 @@
 -#define FORCE_WORD_WRITE 0
 +#define FORCE_WORD_WRITE 1
  
- #define MAX_WORD_RETRIES 3
+ #define MAX_RETRIES 3
  
 @@ -51,7 +51,9 @@
  
@@ -35,7 +35,7 @@
  
  /* Atmel chips don't use the same PRI format as AMD chips */
  static void fixup_convert_atmel_pri(struct mtd_info *mtd)
-@@ -1790,6 +1794,7 @@ static int cfi_amdstd_write_words(struct
+@@ -1788,6 +1792,7 @@ static int cfi_amdstd_write_words(struct
  /*
   * FIXME: interleaved mode not tested, and probably not supported!
   */
@@ -43,7 +43,7 @@
  static int __xipram do_write_buffer(struct map_info *map, struct flchip *chip,
  				    unsigned long adr, const u_char *buf,
  				    int len)
-@@ -1918,7 +1923,6 @@ static int __xipram do_write_buffer(stru
+@@ -1916,7 +1921,6 @@ static int __xipram do_write_buffer(stru
  	return ret;
  }
  
@@ -51,7 +51,7 @@
  static int cfi_amdstd_write_buffers(struct mtd_info *mtd, loff_t to, size_t len,
  				    size_t *retlen, const u_char *buf)
  {
-@@ -1993,6 +1997,7 @@ static int cfi_amdstd_write_buffers(stru
+@@ -1991,6 +1995,7 @@ static int cfi_amdstd_write_buffers(stru
  
  	return 0;
  }
diff --git a/target/linux/ar71xx/patches-4.9/910-unaligned_access_hacks.patch b/target/linux/ar71xx/patches-4.9/910-unaligned_access_hacks.patch
index 1815ccb1d3..4e1edd2af1 100644
--- a/target/linux/ar71xx/patches-4.9/910-unaligned_access_hacks.patch
+++ b/target/linux/ar71xx/patches-4.9/910-unaligned_access_hacks.patch
@@ -795,7 +795,7 @@
  
 --- a/net/ipv4/tcp_input.c
 +++ b/net/ipv4/tcp_input.c
-@@ -3896,14 +3896,16 @@ static bool tcp_parse_aligned_timestamp(
+@@ -3905,14 +3905,16 @@ static bool tcp_parse_aligned_timestamp(
  {
  	const __be32 *ptr = (const __be32 *)(th + 1);
  
diff --git a/target/linux/brcm2708/patches-4.9/950-0028-kbuild-Ignore-dtco-targets-when-filtering-symbols.patch b/target/linux/brcm2708/patches-4.9/950-0028-kbuild-Ignore-dtco-targets-when-filtering-symbols.patch
index 0f5afac4ea..52fe8a2281 100644
--- a/target/linux/brcm2708/patches-4.9/950-0028-kbuild-Ignore-dtco-targets-when-filtering-symbols.patch
+++ b/target/linux/brcm2708/patches-4.9/950-0028-kbuild-Ignore-dtco-targets-when-filtering-symbols.patch
@@ -9,7 +9,7 @@ Subject: [PATCH] kbuild: Ignore dtco targets when filtering symbols
 
 --- a/scripts/Kbuild.include
 +++ b/scripts/Kbuild.include
-@@ -284,7 +284,7 @@ ksym_dep_filter =
+@@ -285,7 +285,7 @@ ksym_dep_filter =
  	    $(CPP) $(call flags_nodeps,c_flags) -D__KSYM_DEPS__ $< ;;        \
  	  as_*_S|cpp_s_S)                                                    \
  	    $(CPP) $(call flags_nodeps,a_flags) -D__KSYM_DEPS__ $< ;;        \
diff --git a/target/linux/brcm63xx/patches-4.9/001-4.11-01-mtd-m25p80-consider-max-message-size-in-m25p80_read.patch b/target/linux/brcm63xx/patches-4.9/001-4.11-01-mtd-m25p80-consider-max-message-size-in-m25p80_read.patch
deleted file mode 100644
index 9d41b3cce4..0000000000
--- a/target/linux/brcm63xx/patches-4.9/001-4.11-01-mtd-m25p80-consider-max-message-size-in-m25p80_read.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 80a79a889ce5df16c5261ab2f1e8e63b94b78102 Mon Sep 17 00:00:00 2001
-From: Heiner Kallweit <hkallweit1 at gmail.com>
-Date: Fri, 28 Oct 2016 07:58:46 +0200
-Subject: [PATCH 1/8] mtd: m25p80: consider max message size in m25p80_read
-
-Consider a message size limit when calculating the maximum amount
-of data that can be read.
-
-The message size limit has been introduced with 4.9, so cc it
-to stable.
-
-Signed-off-by: Heiner Kallweit <hkallweit1 at gmail.com>
-Cc: <stable at vger.kernel.org> # 4.9.x
-Signed-off-by: Cyrille Pitchen <cyrille.pitchen at atmel.com>
----
- drivers/mtd/devices/m25p80.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
---- a/drivers/mtd/devices/m25p80.c
-+++ b/drivers/mtd/devices/m25p80.c
-@@ -174,7 +174,8 @@ static ssize_t m25p80_read(struct spi_no
- 
- 	t[1].rx_buf = buf;
- 	t[1].rx_nbits = m25p80_rx_nbits(nor);
--	t[1].len = min(len, spi_max_transfer_size(spi));
-+	t[1].len = min3(len, spi_max_transfer_size(spi),
-+			spi_max_message_size(spi) - t[0].len);
- 	spi_message_add_tail(&t[1], &m);
- 
- 	ret = spi_sync(spi, &m);
diff --git a/target/linux/brcm63xx/patches-4.9/001-4.15-08-bcm63xx_enet-correct-clock-usage.patch b/target/linux/brcm63xx/patches-4.9/001-4.15-08-bcm63xx_enet-correct-clock-usage.patch
deleted file mode 100644
index d1d8516789..0000000000
--- a/target/linux/brcm63xx/patches-4.9/001-4.15-08-bcm63xx_enet-correct-clock-usage.patch
+++ /dev/null
@@ -1,101 +0,0 @@
-From d0423d3e4fa7ae305729cb50369427f075ccb279 Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jonas.gorski at gmail.com>
-Date: Sat, 25 Feb 2017 12:41:28 +0100
-Subject: [PATCH 1/6] bcm63xx_enet: correct clock usage
-
-Check the return code of prepare_enable and change one last instance of
-enable only to prepare_enable. Also properly disable and release the
-clock in error paths and on remove for enetsw.
-
-Signed-off-by: Jonas Gorski <jonas.gorski at gmail.com>
----
- drivers/net/ethernet/broadcom/bcm63xx_enet.c | 31 +++++++++++++++++++++-------
- 1 file changed, 23 insertions(+), 8 deletions(-)
-
---- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c
-+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
-@@ -1790,7 +1790,9 @@ static int bcm_enet_probe(struct platfor
- 		ret = PTR_ERR(priv->mac_clk);
- 		goto out;
- 	}
--	clk_prepare_enable(priv->mac_clk);
-+	ret = clk_prepare_enable(priv->mac_clk);
-+	if (ret)
-+		goto out_put_clk_mac;
- 
- 	/* initialize default and fetch platform data */
- 	priv->rx_ring_size = BCMENET_DEF_RX_DESC;
-@@ -1822,9 +1824,11 @@ static int bcm_enet_probe(struct platfor
- 		if (IS_ERR(priv->phy_clk)) {
- 			ret = PTR_ERR(priv->phy_clk);
- 			priv->phy_clk = NULL;
--			goto out_put_clk_mac;
-+			goto out_disable_clk_mac;
- 		}
--		clk_prepare_enable(priv->phy_clk);
-+		ret = clk_prepare_enable(priv->phy_clk);
-+		if (ret)
-+			goto out_put_clk_phy;
- 	}
- 
- 	/* do minimal hardware init to be able to probe mii bus */
-@@ -1915,13 +1919,16 @@ out_free_mdio:
- out_uninit_hw:
- 	/* turn off mdc clock */
- 	enet_writel(priv, 0, ENET_MIISC_REG);
--	if (priv->phy_clk) {
-+	if (priv->phy_clk)
- 		clk_disable_unprepare(priv->phy_clk);
-+
-+out_put_clk_phy:
-+	if (priv->phy_clk)
- 		clk_put(priv->phy_clk);
--	}
- 
--out_put_clk_mac:
-+out_disable_clk_mac:
- 	clk_disable_unprepare(priv->mac_clk);
-+out_put_clk_mac:
- 	clk_put(priv->mac_clk);
- out:
- 	free_netdev(dev);
-@@ -2766,7 +2773,9 @@ static int bcm_enetsw_probe(struct platf
- 		ret = PTR_ERR(priv->mac_clk);
- 		goto out_unmap;
- 	}
--	clk_enable(priv->mac_clk);
-+	ret = clk_prepare_enable(priv->mac_clk);
-+	if (ret)
-+		goto out_put_clk;
- 
- 	priv->rx_chan = 0;
- 	priv->tx_chan = 1;
-@@ -2787,7 +2796,7 @@ static int bcm_enetsw_probe(struct platf
- 
- 	ret = register_netdev(dev);
- 	if (ret)
--		goto out_put_clk;
-+		goto out_disable_clk;
- 
- 	netif_carrier_off(dev);
- 	platform_set_drvdata(pdev, dev);
-@@ -2796,6 +2805,9 @@ static int bcm_enetsw_probe(struct platf
- 
- 	return 0;
- 
-+out_disable_clk:
-+	clk_disable_unprepare(priv->mac_clk);
-+
- out_put_clk:
- 	clk_put(priv->mac_clk);
- 
-@@ -2827,6 +2839,9 @@ static int bcm_enetsw_remove(struct plat
- 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- 	release_mem_region(res->start, resource_size(res));
- 
-+	clk_disable_unprepare(priv->mac_clk);
-+	clk_put(priv->mac_clk);
-+
- 	free_netdev(dev);
- 	return 0;
- }
diff --git a/target/linux/brcm63xx/patches-4.9/001-4.15-09-bcm63xx_enet-do-not-write-to-random-DMA-channel-on-B.patch b/target/linux/brcm63xx/patches-4.9/001-4.15-09-bcm63xx_enet-do-not-write-to-random-DMA-channel-on-B.patch
deleted file mode 100644
index 22c6d01873..0000000000
--- a/target/linux/brcm63xx/patches-4.9/001-4.15-09-bcm63xx_enet-do-not-write-to-random-DMA-channel-on-B.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 23d94cb855b6f4f0ee1c01679224472104ac6440 Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jonas.gorski at gmail.com>
-Date: Sat, 30 Sep 2017 14:10:18 +0200
-Subject: [PATCH 2/6] bcm63xx_enet: do not write to random DMA channel on
- BCM6345
-
-The DMA controller regs actually point to DMA channel 0, so the write to
-ENETDMA_CFG_REG will actually modify a random DMA channel.
-
-Since DMA controller registers do not exist on BCM6345, guard the write
-with the usual check for dma_has_sram.
-
-Signed-off-by: Jonas Gorski <jonas.gorski at gmail.com>
----
- drivers/net/ethernet/broadcom/bcm63xx_enet.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
---- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c
-+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
-@@ -1063,7 +1063,8 @@ static int bcm_enet_open(struct net_devi
- 	val = enet_readl(priv, ENET_CTL_REG);
- 	val |= ENET_CTL_ENABLE_MASK;
- 	enet_writel(priv, val, ENET_CTL_REG);
--	enet_dma_writel(priv, ENETDMA_CFG_EN_MASK, ENETDMA_CFG_REG);
-+	if (priv->dma_has_sram)
-+		enet_dma_writel(priv, ENETDMA_CFG_EN_MASK, ENETDMA_CFG_REG);
- 	enet_dmac_writel(priv, priv->dma_chan_en_mask,
- 			 ENETDMAC_CHANCFG, priv->rx_chan);
- 
diff --git a/target/linux/generic/backport-4.9/040-mm-add-support-for-releasing-multiple-instances-of-a.patch b/target/linux/generic/backport-4.9/040-mm-add-support-for-releasing-multiple-instances-of-a.patch
index 84714ce1e1..7a971169bc 100644
--- a/target/linux/generic/backport-4.9/040-mm-add-support-for-releasing-multiple-instances-of-a.patch
+++ b/target/linux/generic/backport-4.9/040-mm-add-support-for-releasing-multiple-instances-of-a.patch
@@ -52,7 +52,7 @@ Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
  extern void __free_page_frag(void *addr);
 --- a/mm/page_alloc.c
 +++ b/mm/page_alloc.c
-@@ -3946,6 +3946,20 @@ static struct page *__page_frag_refill(s
+@@ -3945,6 +3945,20 @@ static struct page *__page_frag_refill(s
  	return page;
  }
  
diff --git a/target/linux/generic/backport-4.9/041-mm-rename-__alloc_page_frag-to-page_frag_alloc-and-_.patch b/target/linux/generic/backport-4.9/041-mm-rename-__alloc_page_frag-to-page_frag_alloc-and-_.patch
index 896ba415fe..fbd3316016 100644
--- a/target/linux/generic/backport-4.9/041-mm-rename-__alloc_page_frag-to-page_frag_alloc-and-_.patch
+++ b/target/linux/generic/backport-4.9/041-mm-rename-__alloc_page_frag-to-page_frag_alloc-and-_.patch
@@ -63,7 +63,7 @@ Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
  void *napi_alloc_frag(unsigned int fragsz);
 --- a/mm/page_alloc.c
 +++ b/mm/page_alloc.c
-@@ -3960,8 +3960,8 @@ void __page_frag_drain(struct page *page
+@@ -3959,8 +3959,8 @@ void __page_frag_drain(struct page *page
  }
  EXPORT_SYMBOL(__page_frag_drain);
  
@@ -74,7 +74,7 @@ Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
  {
  	unsigned int size = PAGE_SIZE;
  	struct page *page;
-@@ -4012,19 +4012,19 @@ refill:
+@@ -4011,19 +4011,19 @@ refill:
  
  	return nc->va + offset;
  }
diff --git a/target/linux/generic/backport-4.9/042-mm-rename-__page_frag-functions-to-__page_frag_cache.patch b/target/linux/generic/backport-4.9/042-mm-rename-__page_frag-functions-to-__page_frag_cache.patch
index 117b01d504..64fdc7606c 100644
--- a/target/linux/generic/backport-4.9/042-mm-rename-__page_frag-functions-to-__page_frag_cache.patch
+++ b/target/linux/generic/backport-4.9/042-mm-rename-__page_frag-functions-to-__page_frag_cache.patch
@@ -33,7 +33,7 @@ Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
  extern void page_frag_free(void *addr);
 --- a/mm/page_alloc.c
 +++ b/mm/page_alloc.c
-@@ -3925,8 +3925,8 @@ EXPORT_SYMBOL(free_pages);
+@@ -3924,8 +3924,8 @@ EXPORT_SYMBOL(free_pages);
   * drivers to provide a backing region of memory for use as either an
   * sk_buff->head, or to be used in the "frags" portion of skb_shared_info.
   */
@@ -44,7 +44,7 @@ Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
  {
  	struct page *page = NULL;
  	gfp_t gfp = gfp_mask;
-@@ -3946,19 +3946,20 @@ static struct page *__page_frag_refill(s
+@@ -3945,19 +3945,20 @@ static struct page *__page_frag_refill(s
  	return page;
  }
  
@@ -68,7 +68,7 @@ Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
  
  void *page_frag_alloc(struct page_frag_cache *nc,
  		      unsigned int fragsz, gfp_t gfp_mask)
-@@ -3969,7 +3970,7 @@ void *page_frag_alloc(struct page_frag_c
+@@ -3968,7 +3969,7 @@ void *page_frag_alloc(struct page_frag_c
  
  	if (unlikely(!nc->va)) {
  refill:
diff --git a/target/linux/generic/backport-4.9/090-net-generalize-napi_complete_done.patch b/target/linux/generic/backport-4.9/090-net-generalize-napi_complete_done.patch
index 5c0388ed0f..4b340bfba0 100644
--- a/target/linux/generic/backport-4.9/090-net-generalize-napi_complete_done.patch
+++ b/target/linux/generic/backport-4.9/090-net-generalize-napi_complete_done.patch
@@ -1117,7 +1117,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	return work_done;
 --- a/drivers/net/ethernet/sun/sungem.c
 +++ b/drivers/net/ethernet/sun/sungem.c
-@@ -922,7 +922,7 @@ static int gem_poll(struct napi_struct *
+@@ -924,7 +924,7 @@ static int gem_poll(struct napi_struct *
  		gp->status = readl(gp->regs + GREG_STAT);
  	} while (gp->status & GREG_STAT_NAPI);
  
diff --git a/target/linux/generic/hack-4.9/211-host_tools_portability.patch b/target/linux/generic/hack-4.9/211-host_tools_portability.patch
index e6fd328431..e4d6851418 100644
--- a/target/linux/generic/hack-4.9/211-host_tools_portability.patch
+++ b/target/linux/generic/hack-4.9/211-host_tools_portability.patch
@@ -12,7 +12,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/tools/build/Build.include
 +++ b/tools/build/Build.include
-@@ -95,4 +95,4 @@ cxx_flags = -Wp,-MD,$(depfile),-MT,$@ $(
+@@ -96,4 +96,4 @@ cxx_flags = -Wp,-MD,$(depfile),-MT,$@ $(
  ###
  ## HOSTCC C flags
  
diff --git a/target/linux/generic/pending-4.9/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch b/target/linux/generic/pending-4.9/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch
index adae2e049c..5b886b30fd 100644
--- a/target/linux/generic/pending-4.9/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch
+++ b/target/linux/generic/pending-4.9/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch
@@ -71,7 +71,7 @@ Signed-off-by: Tobias Wolf <dev-NTEO at vplace.de>
 
 --- a/mm/page_alloc.c
 +++ b/mm/page_alloc.c
-@@ -5918,7 +5918,7 @@ static void __ref alloc_node_mem_map(str
+@@ -5932,7 +5932,7 @@ static void __ref alloc_node_mem_map(str
  		mem_map = NODE_DATA(0)->node_mem_map;
  #if defined(CONFIG_HAVE_MEMBLOCK_NODE_MAP) || defined(CONFIG_FLATMEM)
  		if (page_to_pfn(mem_map) != pgdat->node_start_pfn)
diff --git a/target/linux/generic/pending-4.9/610-netfilter_match_bypass_default_checks.patch b/target/linux/generic/pending-4.9/610-netfilter_match_bypass_default_checks.patch
index 217d20ec5d..d3a6afa804 100644
--- a/target/linux/generic/pending-4.9/610-netfilter_match_bypass_default_checks.patch
+++ b/target/linux/generic/pending-4.9/610-netfilter_match_bypass_default_checks.patch
@@ -68,7 +68,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	if (!xt_percpu_counter_alloc(alloc_state, &e->counters))
  		return -ENOMEM;
  
-@@ -829,6 +857,7 @@ copy_entries_to_user(unsigned int total_
+@@ -830,6 +858,7 @@ copy_entries_to_user(unsigned int total_
  	const struct xt_table_info *private = table->private;
  	int ret = 0;
  	const void *loc_cpu_entry;
@@ -76,7 +76,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  
  	counters = alloc_counters(table);
  	if (IS_ERR(counters))
-@@ -856,6 +885,14 @@ copy_entries_to_user(unsigned int total_
+@@ -857,6 +886,14 @@ copy_entries_to_user(unsigned int total_
  			goto free_counters;
  		}
  
@@ -91,7 +91,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  		for (i = sizeof(struct ipt_entry);
  		     i < e->target_offset;
  		     i += m->u.match_size) {
-@@ -1245,12 +1282,15 @@ compat_copy_entry_to_user(struct ipt_ent
+@@ -1246,12 +1283,15 @@ compat_copy_entry_to_user(struct ipt_ent
  	compat_uint_t origsize;
  	const struct xt_entry_match *ematch;
  	int ret = 0;
diff --git a/target/linux/generic/pending-4.9/630-packet_socket_type.patch b/target/linux/generic/pending-4.9/630-packet_socket_type.patch
index 0bf9339d11..08d730ac31 100644
--- a/target/linux/generic/pending-4.9/630-packet_socket_type.patch
+++ b/target/linux/generic/pending-4.9/630-packet_socket_type.patch
@@ -87,7 +87,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	if (!net_eq(dev_net(dev), sock_net(sk)))
  		goto drop;
  
-@@ -3262,6 +3264,7 @@ static int packet_create(struct net *net
+@@ -3260,6 +3262,7 @@ static int packet_create(struct net *net
  	mutex_init(&po->pg_vec_lock);
  	po->rollover = NULL;
  	po->prot_hook.func = packet_rcv;
@@ -95,7 +95,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  
  	if (sock->type == SOCK_PACKET)
  		po->prot_hook.func = packet_rcv_spkt;
-@@ -3875,6 +3878,16 @@ packet_setsockopt(struct socket *sock, i
+@@ -3873,6 +3876,16 @@ packet_setsockopt(struct socket *sock, i
  		po->xmit = val ? packet_direct_xmit : dev_queue_xmit;
  		return 0;
  	}
@@ -112,7 +112,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	default:
  		return -ENOPROTOOPT;
  	}
-@@ -3927,6 +3940,13 @@ static int packet_getsockopt(struct sock
+@@ -3925,6 +3938,13 @@ static int packet_getsockopt(struct sock
  	case PACKET_VNET_HDR:
  		val = po->has_vnet_hdr;
  		break;
diff --git a/target/linux/generic/pending-4.9/834-ledtrig-libata.patch b/target/linux/generic/pending-4.9/834-ledtrig-libata.patch
index 4b319bd399..b2c0b48980 100644
--- a/target/linux/generic/pending-4.9/834-ledtrig-libata.patch
+++ b/target/linux/generic/pending-4.9/834-ledtrig-libata.patch
@@ -65,7 +65,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  /**
   *	ata_build_rw_tf - Build ATA taskfile for given read/write request
   *	@tf: Target ATA taskfile
-@@ -4991,6 +5004,9 @@ struct ata_queued_cmd *ata_qc_new_init(s
+@@ -4994,6 +5007,9 @@ struct ata_queued_cmd *ata_qc_new_init(s
  		if (tag < 0)
  			return NULL;
  	}
@@ -75,7 +75,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  
  	qc = __ata_qc_from_tag(ap, tag);
  	qc->tag = tag;
-@@ -5892,6 +5908,9 @@ struct ata_port *ata_port_alloc(struct a
+@@ -5895,6 +5911,9 @@ struct ata_port *ata_port_alloc(struct a
  	ap->stats.unhandled_irq = 1;
  	ap->stats.idle_irq = 1;
  #endif
@@ -85,7 +85,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  	ata_sff_port_init(ap);
  
  	return ap;
-@@ -5913,6 +5932,12 @@ static void ata_host_release(struct devi
+@@ -5916,6 +5935,12 @@ static void ata_host_release(struct devi
  
  		kfree(ap->pmp_link);
  		kfree(ap->slave_link);
@@ -98,7 +98,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  		kfree(ap);
  		host->ports[i] = NULL;
  	}
-@@ -6359,7 +6384,23 @@ int ata_host_register(struct ata_host *h
+@@ -6362,7 +6387,23 @@ int ata_host_register(struct ata_host *h
  		host->ports[i]->print_id = atomic_inc_return(&ata_print_id);
  		host->ports[i]->local_port_no = i + 1;
  	}
@@ -134,7 +134,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  
  /*
   * Define if arch has non-standard setup.  This is a _PCI_ standard
-@@ -883,6 +886,12 @@ struct ata_port {
+@@ -884,6 +887,12 @@ struct ata_port {
  #ifdef CONFIG_ATA_ACPI
  	struct ata_acpi_gtm	__acpi_init_gtm; /* use ata_acpi_init_gtm() */
  #endif
diff --git a/target/linux/lantiq/patches-4.9/0022-MTD-m25p80-allow-loading-mtd-name-from-OF.patch b/target/linux/lantiq/patches-4.9/0022-MTD-m25p80-allow-loading-mtd-name-from-OF.patch
index 7617c14ddb..cfeded1ebc 100644
--- a/target/linux/lantiq/patches-4.9/0022-MTD-m25p80-allow-loading-mtd-name-from-OF.patch
+++ b/target/linux/lantiq/patches-4.9/0022-MTD-m25p80-allow-loading-mtd-name-from-OF.patch
@@ -22,7 +22,7 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
  
  #include <linux/mtd/mtd.h>
  #include <linux/mtd/partitions.h>
-@@ -200,6 +201,10 @@ static int m25p_probe(struct spi_device
+@@ -201,6 +202,10 @@ static int m25p_probe(struct spi_device
  	enum read_mode mode = SPI_NOR_NORMAL;
  	char *flash_name;
  	int ret;
@@ -33,7 +33,7 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
  
  	data = dev_get_platdata(&spi->dev);
  
-@@ -229,6 +234,8 @@ static int m25p_probe(struct spi_device
+@@ -230,6 +235,8 @@ static int m25p_probe(struct spi_device
  
  	if (data && data->name)
  		nor->mtd.name = data->name;
diff --git a/target/linux/layerscape/patches-4.9/817-usb-support-layerscape.patch b/target/linux/layerscape/patches-4.9/817-usb-support-layerscape.patch
index 3ec91b4982..6903b7a1e3 100644
--- a/target/linux/layerscape/patches-4.9/817-usb-support-layerscape.patch
+++ b/target/linux/layerscape/patches-4.9/817-usb-support-layerscape.patch
@@ -87,7 +87,7 @@ Signed-off-by: Yangbo Lu <yangbo.lu at nxp.com>
  			pkt_len = le32_to_cpu(rx_desc->opts1) & RX_LEN_MASK;
  			if (pkt_len < ETH_ZLEN)
  				break;
-@@ -4509,6 +4514,7 @@ static struct usb_device_id rtl8152_tabl
+@@ -4510,6 +4515,7 @@ static struct usb_device_id rtl8152_tabl
  	{REALTEK_USB_DEVICE(VENDOR_ID_LENOVO,  0x304f)},
  	{REALTEK_USB_DEVICE(VENDOR_ID_LINKSYS, 0x0041)},
  	{REALTEK_USB_DEVICE(VENDOR_ID_NVIDIA,  0x09ff)},
diff --git a/target/linux/sunxi/patches-4.9/0052-stmmac-form-4-12.patch b/target/linux/sunxi/patches-4.9/0052-stmmac-form-4-12.patch
index 1ed1294694..a1b018186f 100644
--- a/target/linux/sunxi/patches-4.9/0052-stmmac-form-4-12.patch
+++ b/target/linux/sunxi/patches-4.9/0052-stmmac-form-4-12.patch
@@ -3095,7 +3095,7 @@
  
  	if (priv->hw->mode->set_16kib_bfsize)
  		bfsize = priv->hw->mode->set_16kib_bfsize(dev->mtu);
-@@ -1033,257 +1234,516 @@ static int init_dma_desc_rings(struct ne
+@@ -1033,235 +1234,409 @@ static int init_dma_desc_rings(struct ne
  
  	priv->dma_buf_sz = bfsize;
  
@@ -3351,10 +3351,17 @@
 -						 priv->tx_skbuff_dma[i].buf,
 -						 priv->tx_skbuff_dma[i].len,
 -						 DMA_TO_DEVICE);
+-		}
 +	for (i = 0; i < DMA_TX_SIZE; i++)
 +		stmmac_free_tx_buffer(priv, queue, i);
 +}
-+
+ 
+-		if (priv->tx_skbuff[i]) {
+-			dev_kfree_skb_any(priv->tx_skbuff[i]);
+-			priv->tx_skbuff[i] = NULL;
+-			priv->tx_skbuff_dma[i].buf = 0;
+-			priv->tx_skbuff_dma[i].map_as_page = false;
+-		}
 +/**
 + * free_dma_rx_desc_resources - free RX dma desc resources
 + * @priv: private structure
@@ -3383,10 +3390,11 @@
 +
 +		kfree(rx_q->rx_skbuff_dma);
 +		kfree(rx_q->rx_skbuff);
-+	}
-+}
-+
-+/**
+ 	}
+ }
+ 
+ /**
+- * alloc_dma_desc_resources - alloc TX/RX resources.
 + * free_dma_tx_desc_resources - free TX dma desc resources
 + * @priv: private structure
 + */
@@ -3419,36 +3427,90 @@
 +
 +/**
 + * alloc_dma_rx_desc_resources - alloc RX resources.
-+ * @priv: private structure
-+ * Description: according to which descriptor can be used (extend or basic)
-+ * this function allocates the resources for TX and RX paths. In case of
-+ * reception, for example, it pre-allocated the RX socket buffer in order to
-+ * allow zero-copy mechanism.
-+ */
+  * @priv: private structure
+  * Description: according to which descriptor can be used (extend or basic)
+  * this function allocates the resources for TX and RX paths. In case of
+  * reception, for example, it pre-allocated the RX socket buffer in order to
+  * allow zero-copy mechanism.
+  */
+-static int alloc_dma_desc_resources(struct stmmac_priv *priv)
 +static int alloc_dma_rx_desc_resources(struct stmmac_priv *priv)
-+{
+ {
 +	u32 rx_count = priv->plat->rx_queues_to_use;
-+	int ret = -ENOMEM;
+ 	int ret = -ENOMEM;
 +	u32 queue;
-+
+ 
+-	priv->rx_skbuff_dma = kmalloc_array(DMA_RX_SIZE, sizeof(dma_addr_t),
+-					    GFP_KERNEL);
+-	if (!priv->rx_skbuff_dma)
+-		return -ENOMEM;
 +	/* RX queues buffers and DMA */
 +	for (queue = 0; queue < rx_count; queue++) {
 +		struct stmmac_rx_queue *rx_q = &priv->rx_queue[queue];
-+
+ 
+-	priv->rx_skbuff = kmalloc_array(DMA_RX_SIZE, sizeof(struct sk_buff *),
+-					GFP_KERNEL);
+-	if (!priv->rx_skbuff)
+-		goto err_rx_skbuff;
+-
+-	priv->tx_skbuff_dma = kmalloc_array(DMA_TX_SIZE,
+-					    sizeof(*priv->tx_skbuff_dma),
+-					    GFP_KERNEL);
+-	if (!priv->tx_skbuff_dma)
+-		goto err_tx_skbuff_dma;
+-
+-	priv->tx_skbuff = kmalloc_array(DMA_TX_SIZE, sizeof(struct sk_buff *),
+-					GFP_KERNEL);
+-	if (!priv->tx_skbuff)
+-		goto err_tx_skbuff;
+-
+-	if (priv->extend_desc) {
+-		priv->dma_erx = dma_zalloc_coherent(priv->device, DMA_RX_SIZE *
+-						    sizeof(struct
+-							   dma_extended_desc),
+-						    &priv->dma_rx_phy,
+-						    GFP_KERNEL);
+-		if (!priv->dma_erx)
+-			goto err_dma;
 +		rx_q->queue_index = queue;
 +		rx_q->priv_data = priv;
-+
+ 
+-		priv->dma_etx = dma_zalloc_coherent(priv->device, DMA_TX_SIZE *
+-						    sizeof(struct
+-							   dma_extended_desc),
+-						    &priv->dma_tx_phy,
 +		rx_q->rx_skbuff_dma = kmalloc_array(DMA_RX_SIZE,
 +						    sizeof(dma_addr_t),
-+						    GFP_KERNEL);
+ 						    GFP_KERNEL);
+-		if (!priv->dma_etx) {
+-			dma_free_coherent(priv->device, DMA_RX_SIZE *
+-					  sizeof(struct dma_extended_desc),
+-					  priv->dma_erx, priv->dma_rx_phy);
+-			goto err_dma;
+-		}
+-	} else {
+-		priv->dma_rx = dma_zalloc_coherent(priv->device, DMA_RX_SIZE *
+-						   sizeof(struct dma_desc),
+-						   &priv->dma_rx_phy,
+-						   GFP_KERNEL);
+-		if (!priv->dma_rx)
+-			goto err_dma;
 +		if (!rx_q->rx_skbuff_dma)
 +			return -ENOMEM;
-+
+ 
+-		priv->dma_tx = dma_zalloc_coherent(priv->device, DMA_TX_SIZE *
+-						   sizeof(struct dma_desc),
+-						   &priv->dma_tx_phy,
+-						   GFP_KERNEL);
+-		if (!priv->dma_tx) {
+-			dma_free_coherent(priv->device, DMA_RX_SIZE *
+-					  sizeof(struct dma_desc),
+-					  priv->dma_rx, priv->dma_rx_phy);
 +		rx_q->rx_skbuff = kmalloc_array(DMA_RX_SIZE,
 +						sizeof(struct sk_buff *),
 +						GFP_KERNEL);
 +		if (!rx_q->rx_skbuff)
-+			goto err_dma;
+ 			goto err_dma;
 +
 +		if (priv->extend_desc) {
 +			rx_q->dma_erx = dma_zalloc_coherent(priv->device,
@@ -3469,12 +3531,19 @@
 +							   GFP_KERNEL);
 +			if (!rx_q->dma_rx)
 +				goto err_dma;
-+		}
-+	}
-+
-+	return 0;
-+
-+err_dma:
+ 		}
+ 	}
+ 
+ 	return 0;
+ 
+ err_dma:
+-	kfree(priv->tx_skbuff);
+-err_tx_skbuff:
+-	kfree(priv->tx_skbuff_dma);
+-err_tx_skbuff_dma:
+-	kfree(priv->rx_skbuff);
+-err_rx_skbuff:
+-	kfree(priv->rx_skbuff_dma);
 +	free_dma_rx_desc_resources(priv);
 +
 +	return ret;
@@ -3531,7 +3600,7 @@
 +							   GFP_KERNEL);
 +			if (!tx_q->dma_tx)
 +				goto err_dma_buffers;
- 		}
++		}
 +	}
 +
 +	return 0;
@@ -3560,126 +3629,85 @@
 +
 +	ret = alloc_dma_tx_desc_resources(priv);
 +
-+	return ret;
-+}
-+
+ 	return ret;
+ }
+ 
 +/**
 + * free_dma_desc_resources - free dma desc resources
 + * @priv: private structure
 + */
-+static void free_dma_desc_resources(struct stmmac_priv *priv)
-+{
+ static void free_dma_desc_resources(struct stmmac_priv *priv)
+ {
+-	/* Release the DMA TX/RX socket buffers */
+-	dma_free_rx_skbufs(priv);
+-	dma_free_tx_skbufs(priv);
+-
+-	/* Free DMA regions of consistent memory previously allocated */
+-	if (!priv->extend_desc) {
+-		dma_free_coherent(priv->device,
+-				  DMA_TX_SIZE * sizeof(struct dma_desc),
+-				  priv->dma_tx, priv->dma_tx_phy);
+-		dma_free_coherent(priv->device,
+-				  DMA_RX_SIZE * sizeof(struct dma_desc),
+-				  priv->dma_rx, priv->dma_rx_phy);
+-	} else {
+-		dma_free_coherent(priv->device, DMA_TX_SIZE *
+-				  sizeof(struct dma_extended_desc),
+-				  priv->dma_etx, priv->dma_tx_phy);
+-		dma_free_coherent(priv->device, DMA_RX_SIZE *
+-				  sizeof(struct dma_extended_desc),
+-				  priv->dma_erx, priv->dma_rx_phy);
+-	}
+-	kfree(priv->rx_skbuff_dma);
+-	kfree(priv->rx_skbuff);
+-	kfree(priv->tx_skbuff_dma);
+-	kfree(priv->tx_skbuff);
 +	/* Release the DMA RX socket buffers */
 +	free_dma_rx_desc_resources(priv);
 +
 +	/* Release the DMA TX socket buffers */
 +	free_dma_tx_desc_resources(priv);
-+}
-+
-+/**
-+ *  stmmac_mac_enable_rx_queues - Enable MAC rx queues
-+ *  @priv: driver private structure
-+ *  Description: It is used for enabling the rx queues in the MAC
-+ */
-+static void stmmac_mac_enable_rx_queues(struct stmmac_priv *priv)
-+{
+ }
+ 
+ /**
+@@ -1271,19 +1646,104 @@ static void free_dma_desc_resources(stru
+  */
+ static void stmmac_mac_enable_rx_queues(struct stmmac_priv *priv)
+ {
+-	int rx_count = priv->dma_cap.number_rx_queues;
+-	int queue = 0;
 +	u32 rx_queues_count = priv->plat->rx_queues_to_use;
 +	int queue;
 +	u8 mode;
  
--		if (priv->tx_skbuff[i]) {
--			dev_kfree_skb_any(priv->tx_skbuff[i]);
--			priv->tx_skbuff[i] = NULL;
--			priv->tx_skbuff_dma[i].buf = 0;
--			priv->tx_skbuff_dma[i].map_as_page = false;
--		}
+-	/* If GMAC does not have multiple queues, then this is not necessary*/
+-	if (rx_count == 1)
+-		return;
 +	for (queue = 0; queue < rx_queues_count; queue++) {
 +		mode = priv->plat->rx_queues_cfg[queue].mode_to_use;
 +		priv->hw->mac->rx_queue_enable(priv->hw, mode, queue);
- 	}
- }
++	}
++}
  
- /**
-- * alloc_dma_desc_resources - alloc TX/RX resources.
-- * @priv: private structure
-- * Description: according to which descriptor can be used (extend or basic)
-- * this function allocates the resources for TX and RX paths. In case of
-- * reception, for example, it pre-allocated the RX socket buffer in order to
-- * allow zero-copy mechanism.
+-	/**
+-	 *  If the core is synthesized with multiple rx queues / multiple
+-	 *  dma channels, then rx queues will be disabled by default.
+-	 *  For now only rx queue 0 is enabled.
+-	 */
+-	priv->hw->mac->rx_queue_enable(priv->hw, queue);
++/**
 + * stmmac_start_rx_dma - start RX DMA channel
 + * @priv: driver private structure
 + * @chan: RX channel index
 + * Description:
 + * This starts a RX DMA channel
-  */
--static int alloc_dma_desc_resources(struct stmmac_priv *priv)
++ */
 +static void stmmac_start_rx_dma(struct stmmac_priv *priv, u32 chan)
- {
--	int ret = -ENOMEM;
--
--	priv->rx_skbuff_dma = kmalloc_array(DMA_RX_SIZE, sizeof(dma_addr_t),
--					    GFP_KERNEL);
--	if (!priv->rx_skbuff_dma)
--		return -ENOMEM;
--
--	priv->rx_skbuff = kmalloc_array(DMA_RX_SIZE, sizeof(struct sk_buff *),
--					GFP_KERNEL);
--	if (!priv->rx_skbuff)
--		goto err_rx_skbuff;
--
--	priv->tx_skbuff_dma = kmalloc_array(DMA_TX_SIZE,
--					    sizeof(*priv->tx_skbuff_dma),
--					    GFP_KERNEL);
--	if (!priv->tx_skbuff_dma)
--		goto err_tx_skbuff_dma;
--
--	priv->tx_skbuff = kmalloc_array(DMA_TX_SIZE, sizeof(struct sk_buff *),
--					GFP_KERNEL);
--	if (!priv->tx_skbuff)
--		goto err_tx_skbuff;
--
--	if (priv->extend_desc) {
--		priv->dma_erx = dma_zalloc_coherent(priv->device, DMA_RX_SIZE *
--						    sizeof(struct
--							   dma_extended_desc),
--						    &priv->dma_rx_phy,
--						    GFP_KERNEL);
--		if (!priv->dma_erx)
--			goto err_dma;
--
--		priv->dma_etx = dma_zalloc_coherent(priv->device, DMA_TX_SIZE *
--						    sizeof(struct
--							   dma_extended_desc),
--						    &priv->dma_tx_phy,
--						    GFP_KERNEL);
--		if (!priv->dma_etx) {
--			dma_free_coherent(priv->device, DMA_RX_SIZE *
--					  sizeof(struct dma_extended_desc),
--					  priv->dma_erx, priv->dma_rx_phy);
--			goto err_dma;
--		}
--	} else {
--		priv->dma_rx = dma_zalloc_coherent(priv->device, DMA_RX_SIZE *
--						   sizeof(struct dma_desc),
--						   &priv->dma_rx_phy,
--						   GFP_KERNEL);
--		if (!priv->dma_rx)
--			goto err_dma;
++{
 +	netdev_dbg(priv->dev, "DMA RX processes started in channel %d\n", chan);
 +	priv->hw->dma->start_rx(priv->ioaddr, chan);
 +}
- 
--		priv->dma_tx = dma_zalloc_coherent(priv->device, DMA_TX_SIZE *
--						   sizeof(struct dma_desc),
--						   &priv->dma_tx_phy,
--						   GFP_KERNEL);
--		if (!priv->dma_tx) {
--			dma_free_coherent(priv->device, DMA_RX_SIZE *
--					  sizeof(struct dma_desc),
--					  priv->dma_rx, priv->dma_rx_phy);
--			goto err_dma;
--		}
--	}
++
 +/**
 + * stmmac_start_tx_dma - start TX DMA channel
 + * @priv: driver private structure
@@ -3692,8 +3720,7 @@
 +	netdev_dbg(priv->dev, "DMA TX processes started in channel %d\n", chan);
 +	priv->hw->dma->start_tx(priv->ioaddr, chan);
 +}
- 
--	return 0;
++
 +/**
 + * stmmac_stop_rx_dma - stop RX DMA channel
 + * @priv: driver private structure
@@ -3706,16 +3733,7 @@
 +	netdev_dbg(priv->dev, "DMA RX processes stopped in channel %d\n", chan);
 +	priv->hw->dma->stop_rx(priv->ioaddr, chan);
 +}
- 
--err_dma:
--	kfree(priv->tx_skbuff);
--err_tx_skbuff:
--	kfree(priv->tx_skbuff_dma);
--err_tx_skbuff_dma:
--	kfree(priv->rx_skbuff);
--err_rx_skbuff:
--	kfree(priv->rx_skbuff_dma);
--	return ret;
++
 +/**
 + * stmmac_stop_tx_dma - stop TX DMA channel
 + * @priv: driver private structure
@@ -3727,9 +3745,8 @@
 +{
 +	netdev_dbg(priv->dev, "DMA TX processes stopped in channel %d\n", chan);
 +	priv->hw->dma->stop_tx(priv->ioaddr, chan);
- }
- 
--static void free_dma_desc_resources(struct stmmac_priv *priv)
++}
++
 +/**
 + * stmmac_start_all_dma - start all RX and TX DMA channels
 + * @priv: driver private structure
@@ -3737,31 +3754,7 @@
 + * This starts all the RX and TX DMA channels
 + */
 +static void stmmac_start_all_dma(struct stmmac_priv *priv)
- {
--	/* Release the DMA TX/RX socket buffers */
--	dma_free_rx_skbufs(priv);
--	dma_free_tx_skbufs(priv);
--
--	/* Free DMA regions of consistent memory previously allocated */
--	if (!priv->extend_desc) {
--		dma_free_coherent(priv->device,
--				  DMA_TX_SIZE * sizeof(struct dma_desc),
--				  priv->dma_tx, priv->dma_tx_phy);
--		dma_free_coherent(priv->device,
--				  DMA_RX_SIZE * sizeof(struct dma_desc),
--				  priv->dma_rx, priv->dma_rx_phy);
--	} else {
--		dma_free_coherent(priv->device, DMA_TX_SIZE *
--				  sizeof(struct dma_extended_desc),
--				  priv->dma_etx, priv->dma_tx_phy);
--		dma_free_coherent(priv->device, DMA_RX_SIZE *
--				  sizeof(struct dma_extended_desc),
--				  priv->dma_erx, priv->dma_rx_phy);
--	}
--	kfree(priv->rx_skbuff_dma);
--	kfree(priv->rx_skbuff);
--	kfree(priv->tx_skbuff_dma);
--	kfree(priv->tx_skbuff);
++{
 +	u32 rx_channels_count = priv->plat->rx_queues_to_use;
 +	u32 tx_channels_count = priv->plat->tx_queues_to_use;
 +	u32 chan = 0;
@@ -3771,38 +3764,23 @@
 +
 +	for (chan = 0; chan < tx_channels_count; chan++)
 +		stmmac_start_tx_dma(priv, chan);
- }
- 
- /**
-- *  stmmac_mac_enable_rx_queues - Enable MAC rx queues
-- *  @priv: driver private structure
-- *  Description: It is used for enabling the rx queues in the MAC
++}
++
++/**
 + * stmmac_stop_all_dma - stop all RX and TX DMA channels
 + * @priv: driver private structure
 + * Description:
 + * This stops the RX and TX DMA channels
-  */
--static void stmmac_mac_enable_rx_queues(struct stmmac_priv *priv)
++ */
 +static void stmmac_stop_all_dma(struct stmmac_priv *priv)
- {
--	int rx_count = priv->dma_cap.number_rx_queues;
--	int queue = 0;
++{
 +	u32 rx_channels_count = priv->plat->rx_queues_to_use;
 +	u32 tx_channels_count = priv->plat->tx_queues_to_use;
 +	u32 chan = 0;
- 
--	/* If GMAC does not have multiple queues, then this is not necessary*/
--	if (rx_count == 1)
--		return;
++
 +	for (chan = 0; chan < rx_channels_count; chan++)
 +		stmmac_stop_rx_dma(priv, chan);
- 
--	/**
--	 *  If the core is synthesized with multiple rx queues / multiple
--	 *  dma channels, then rx queues will be disabled by default.
--	 *  For now only rx queue 0 is enabled.
--	 */
--	priv->hw->mac->rx_queue_enable(priv->hw, queue);
++
 +	for (chan = 0; chan < tx_channels_count; chan++)
 +		stmmac_stop_tx_dma(priv, chan);
  }
-- 
2.11.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From foss at volatilesystems.org  Sun Jul 22 18:45:19 2018
From: foss at volatilesystems.org (Stijn Segers)
Date: Mon, 23 Jul 2018 00:45:19 +0200
Subject: [OpenWrt-Devel] [PATCH 2/2] kernel: bump 4.14 to 4.14.57 for 18.06
In-Reply-To: <20180722224519.1814-1-foss@volatilesystems.org>
References: <20180722224519.1814-1-foss@volatilesystems.org>
Message-ID: <20180722224519.1814-2-foss@volatilesystems.org>

* Refreshed patches.
* Patches made redundant by changes upstream: target/linux/ramips/patches-4.14/0036-mtd-fix-cfi-cmdset-0002-erase-status-check.patch
* Patches accepted upstream:
  - target/linux/apm821xx/patches-4.14/020-0001-crypto-crypto4xx-remove-bad-list_del.patch
  - target/linux/apm821xx/patches-4.14/020-0011-crypto-crypto4xx-fix-crypto4xx_build_pdr-crypto4xx_b.patch
  - target/linux/brcm63xx/patches-4.14/001-4.15-08-bcm63xx_enet-correct-clock-usage.patch
  - target/linux/brcm63xx/patches-4.14/001-4.15-09-bcm63xx_enet-do-not-write-to-random-DMA-channel-on-B.patch
  - target/linux/generic/backport-4.14/080-net-convert-sock.sk_wmem_alloc-from-atomic_t-to-refc.patch

Compile-tested on: ramips/mt7621, x86/64
Run-tested on: ramips/mt7621, x86/64

Signed-off-by: Stijn Segers <foss at volatilesystems.org>
---

FYI: ldir's 'exp' branch had something about broken ext4 images in it. When asked he said
it might come from stintel's bump. I have tested the combined-squashfs-ext4 image on x86/64
and this works without any issues. Haven't gotten a hold of stintel yet to comment on this
(this feels like a piece for the Guardian almost ;-) ).


 include/kernel-version.mk                          |   4 +-
 ...0001-crypto-crypto4xx-remove-bad-list_del.patch |  32 ----
 ...to4xx-remove-unused-definitions-and-write.patch |   2 +-
 ...to4xx-set-CRYPTO_ALG_KERN_DRIVER_ONLY-fla.patch |   2 +-
 ...to4xx-remove-double-assignment-of-pd_uinf.patch |   2 +-
 ...to4xx-enable-AES-RFC3686-ECB-CFB-and-OFB-.patch |   2 +-
 ...pto4xx-refactor-crypto4xx_copy_pkt_to_dst.patch |   2 +-
 ...to4xx-replace-crypto4xx_dev-s-scatter_buf.patch |   8 +-
 ...to4xx-fix-crypto4xx_build_pdr-crypto4xx_b.patch |  84 ----------
 ...-4.15-08-bcm63xx_enet-correct-clock-usage.patch | 101 ------------
 ...t-do-not-write-to-random-DMA-channel-on-B.patch |  29 ----
 ...-sock.sk_wmem_alloc-from-atomic_t-to-refc.patch | 172 ---------------------
 ...15-netfilter-exit_net-cleanup-check-added.patch |   2 +-
 .../hack-4.14/211-host_tools_portability.patch     |   2 +-
 .../linux/generic/hack-4.14/902-debloat_proc.patch |   2 +-
 ...rocess-negative-stack-offsets-on-stack-tr.patch |   2 +-
 ...610-netfilter_match_bypass_default_checks.patch |   6 +-
 .../pending-4.14/630-packet_socket_type.patch      |   6 +-
 .../generic/pending-4.14/834-ledtrig-libata.patch  |  10 +-
 .../oxnas/patches-4.14/999-libata-hacks.patch      |   8 +-
 ...td-fix-cfi-cmdset-0002-erase-status-check.patch |  29 ----
 ...0037-mtd-cfi-cmdset-0002-force-word-write.patch |   2 +-
 22 files changed, 31 insertions(+), 478 deletions(-)
 delete mode 100644 target/linux/apm821xx/patches-4.14/020-0001-crypto-crypto4xx-remove-bad-list_del.patch
 delete mode 100644 target/linux/apm821xx/patches-4.14/020-0011-crypto-crypto4xx-fix-crypto4xx_build_pdr-crypto4xx_b.patch
 delete mode 100644 target/linux/brcm63xx/patches-4.14/001-4.15-08-bcm63xx_enet-correct-clock-usage.patch
 delete mode 100644 target/linux/brcm63xx/patches-4.14/001-4.15-09-bcm63xx_enet-do-not-write-to-random-DMA-channel-on-B.patch
 delete mode 100644 target/linux/generic/backport-4.14/080-net-convert-sock.sk_wmem_alloc-from-atomic_t-to-refc.patch
 delete mode 100644 target/linux/ramips/patches-4.14/0036-mtd-fix-cfi-cmdset-0002-erase-status-check.patch

diff --git a/include/kernel-version.mk b/include/kernel-version.mk
index ec108656e4..0d74c32208 100644
--- a/include/kernel-version.mk
+++ b/include/kernel-version.mk
@@ -5,12 +5,12 @@ LINUX_RELEASE?=1
 LINUX_VERSION-3.18 = .71
 LINUX_VERSION-4.4 = .121
 LINUX_VERSION-4.9 = .114
-LINUX_VERSION-4.14 = .54
+LINUX_VERSION-4.14 = .57
 
 LINUX_KERNEL_HASH-3.18.71 = 5abc9778ad44ce02ed6c8ab52ece8a21c6d20d21f6ed8a19287b4a38a50c1240
 LINUX_KERNEL_HASH-4.4.121 = 44a88268b5088dc326b30c9b9133ac35a9a200b636b7268d08f32abeae6ca729
 LINUX_KERNEL_HASH-4.9.114 = e6e83644b0d9ea5ae4ba7968372b4c8096ad27ac2144a1cb5c0348cbb24072b0
-LINUX_KERNEL_HASH-4.14.54 = 451642ac28c539a91072f1fb83b1c061d6d44df870ddf5562400ade5e1c4b6c6
+LINUX_KERNEL_HASH-4.14.57 = 4a9540f256b8ee91d49c3d55def90be3af8c0ddb1ff274d20bc56a42dcdbd810
 
 remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
 sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1)))))))
diff --git a/target/linux/apm821xx/patches-4.14/020-0001-crypto-crypto4xx-remove-bad-list_del.patch b/target/linux/apm821xx/patches-4.14/020-0001-crypto-crypto4xx-remove-bad-list_del.patch
deleted file mode 100644
index 8df0937e4d..0000000000
--- a/target/linux/apm821xx/patches-4.14/020-0001-crypto-crypto4xx-remove-bad-list_del.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From a728a196d253530f17da5c86dc7dfbe58c5f7094 Mon Sep 17 00:00:00 2001
-From: Christian Lamparter <chunkeey at googlemail.com>
-Date: Fri, 25 Aug 2017 15:47:14 +0200
-Subject: [PATCH 01/25] crypto: crypto4xx - remove bad list_del
-
-alg entries are only added to the list, after the registration
-was successful. If the registration failed, it was never added
-to the list in the first place.
-
-Signed-off-by: Christian Lamparter <chunkeey at googlemail.com>
-Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
----
- drivers/crypto/amcc/crypto4xx_core.c | 6 ++----
- 1 file changed, 2 insertions(+), 4 deletions(-)
-
---- a/drivers/crypto/amcc/crypto4xx_core.c
-+++ b/drivers/crypto/amcc/crypto4xx_core.c
-@@ -1033,12 +1033,10 @@ int crypto4xx_register_alg(struct crypto
- 			break;
- 		}
- 
--		if (rc) {
--			list_del(&alg->entry);
-+		if (rc)
- 			kfree(alg);
--		} else {
-+		else
- 			list_add_tail(&alg->entry, &sec_dev->alg_list);
--		}
- 	}
- 
- 	return 0;
diff --git a/target/linux/apm821xx/patches-4.14/020-0002-crypto-crypto4xx-remove-unused-definitions-and-write.patch b/target/linux/apm821xx/patches-4.14/020-0002-crypto-crypto4xx-remove-unused-definitions-and-write.patch
index 5983246344..466f0a0a78 100644
--- a/target/linux/apm821xx/patches-4.14/020-0002-crypto-crypto4xx-remove-unused-definitions-and-write.patch
+++ b/target/linux/apm821xx/patches-4.14/020-0002-crypto-crypto4xx-remove-unused-definitions-and-write.patch
@@ -67,7 +67,7 @@ Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
  
 --- a/drivers/crypto/amcc/crypto4xx_core.c
 +++ b/drivers/crypto/amcc/crypto4xx_core.c
-@@ -962,7 +962,7 @@ u32 crypto4xx_build_pd(struct crypto_asy
+@@ -964,7 +964,7 @@ u32 crypto4xx_build_pd(struct crypto_asy
  
  	sa->sa_command_1.bf.hash_crypto_offset = 0;
  	pd->pd_ctl.w = ctx->pd_ctl;
diff --git a/target/linux/apm821xx/patches-4.14/020-0003-crypto-crypto4xx-set-CRYPTO_ALG_KERN_DRIVER_ONLY-fla.patch b/target/linux/apm821xx/patches-4.14/020-0003-crypto-crypto4xx-set-CRYPTO_ALG_KERN_DRIVER_ONLY-fla.patch
index e50a418284..c195b88c2f 100644
--- a/target/linux/apm821xx/patches-4.14/020-0003-crypto-crypto4xx-set-CRYPTO_ALG_KERN_DRIVER_ONLY-fla.patch
+++ b/target/linux/apm821xx/patches-4.14/020-0003-crypto-crypto4xx-set-CRYPTO_ALG_KERN_DRIVER_ONLY-fla.patch
@@ -18,7 +18,7 @@ Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
 
 --- a/drivers/crypto/amcc/crypto4xx_core.c
 +++ b/drivers/crypto/amcc/crypto4xx_core.c
-@@ -1114,7 +1114,9 @@ struct crypto4xx_alg_common crypto4xx_al
+@@ -1116,7 +1116,9 @@ struct crypto4xx_alg_common crypto4xx_al
  		.cra_name 	= "cbc(aes)",
  		.cra_driver_name = "cbc-aes-ppc4xx",
  		.cra_priority 	= CRYPTO4XX_CRYPTO_PRIORITY,
diff --git a/target/linux/apm821xx/patches-4.14/020-0005-crypto-crypto4xx-remove-double-assignment-of-pd_uinf.patch b/target/linux/apm821xx/patches-4.14/020-0005-crypto-crypto4xx-remove-double-assignment-of-pd_uinf.patch
index 4fc3617576..03c402d975 100644
--- a/target/linux/apm821xx/patches-4.14/020-0005-crypto-crypto4xx-remove-double-assignment-of-pd_uinf.patch
+++ b/target/linux/apm821xx/patches-4.14/020-0005-crypto-crypto4xx-remove-double-assignment-of-pd_uinf.patch
@@ -14,7 +14,7 @@ Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
 
 --- a/drivers/crypto/amcc/crypto4xx_core.c
 +++ b/drivers/crypto/amcc/crypto4xx_core.c
-@@ -1079,7 +1079,6 @@ static void crypto4xx_bh_tasklet_cb(unsi
+@@ -1081,7 +1081,6 @@ static void crypto4xx_bh_tasklet_cb(unsi
  			pd->pd_ctl.bf.pe_done = 0;
  			crypto4xx_pd_done(core_dev->dev, tail);
  			crypto4xx_put_pd_to_pdr(core_dev->dev, tail);
diff --git a/target/linux/apm821xx/patches-4.14/020-0008-crypto-crypto4xx-enable-AES-RFC3686-ECB-CFB-and-OFB-.patch b/target/linux/apm821xx/patches-4.14/020-0008-crypto-crypto4xx-enable-AES-RFC3686-ECB-CFB-and-OFB-.patch
index 9977c60d26..d19a41ec13 100644
--- a/target/linux/apm821xx/patches-4.14/020-0008-crypto-crypto4xx-enable-AES-RFC3686-ECB-CFB-and-OFB-.patch
+++ b/target/linux/apm821xx/patches-4.14/020-0008-crypto-crypto4xx-enable-AES-RFC3686-ECB-CFB-and-OFB-.patch
@@ -109,7 +109,7 @@ Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
  #include <crypto/sha.h>
  #include "crypto4xx_reg_def.h"
  #include "crypto4xx_core.h"
-@@ -1133,6 +1134,103 @@ struct crypto4xx_alg_common crypto4xx_al
+@@ -1135,6 +1136,103 @@ struct crypto4xx_alg_common crypto4xx_al
  			}
  		}
  	}},
diff --git a/target/linux/apm821xx/patches-4.14/020-0009-crypto-crypto4xx-refactor-crypto4xx_copy_pkt_to_dst.patch b/target/linux/apm821xx/patches-4.14/020-0009-crypto-crypto4xx-refactor-crypto4xx_copy_pkt_to_dst.patch
index c6ccade8c1..e74ed7f56b 100644
--- a/target/linux/apm821xx/patches-4.14/020-0009-crypto-crypto4xx-refactor-crypto4xx_copy_pkt_to_dst.patch
+++ b/target/linux/apm821xx/patches-4.14/020-0009-crypto-crypto4xx-refactor-crypto4xx_copy_pkt_to_dst.patch
@@ -27,7 +27,7 @@ Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
  #include "crypto4xx_reg_def.h"
  #include "crypto4xx_core.h"
  #include "crypto4xx_sa.h"
-@@ -481,111 +482,44 @@ static inline struct ce_sd *crypto4xx_ge
+@@ -483,111 +484,44 @@ static inline struct ce_sd *crypto4xx_ge
  	return  (struct ce_sd *)(dev->sdr + sizeof(struct ce_sd) * idx);
  }
  
diff --git a/target/linux/apm821xx/patches-4.14/020-0010-crypto-crypto4xx-replace-crypto4xx_dev-s-scatter_buf.patch b/target/linux/apm821xx/patches-4.14/020-0010-crypto-crypto4xx-replace-crypto4xx_dev-s-scatter_buf.patch
index 90a6dab2d7..5ca3faa4dc 100644
--- a/target/linux/apm821xx/patches-4.14/020-0010-crypto-crypto4xx-replace-crypto4xx_dev-s-scatter_buf.patch
+++ b/target/linux/apm821xx/patches-4.14/020-0010-crypto-crypto4xx-replace-crypto4xx_dev-s-scatter_buf.patch
@@ -17,7 +17,7 @@ Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
 
 --- a/drivers/crypto/amcc/crypto4xx_core.c
 +++ b/drivers/crypto/amcc/crypto4xx_core.c
-@@ -394,10 +394,9 @@ static u32 crypto4xx_build_sdr(struct cr
+@@ -396,10 +396,9 @@ static u32 crypto4xx_build_sdr(struct cr
  	if (!dev->sdr)
  		return -ENOMEM;
  
@@ -29,7 +29,7 @@ Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
  			&dev->scatter_buffer_pa, GFP_ATOMIC);
  	if (!dev->scatter_buffer_va) {
  		dma_free_coherent(dev->core_dev->device,
-@@ -410,7 +409,7 @@ static u32 crypto4xx_build_sdr(struct cr
+@@ -412,7 +411,7 @@ static u32 crypto4xx_build_sdr(struct cr
  
  	for (i = 0; i < PPC4XX_NUM_SD; i++) {
  		sd_array[i].ptr = dev->scatter_buffer_pa +
@@ -38,9 +38,9 @@ Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
  	}
  
  	return 0;
-@@ -425,7 +424,7 @@ static void crypto4xx_destroy_sdr(struct
+@@ -427,7 +426,7 @@ static void crypto4xx_destroy_sdr(struct
  
- 	if (dev->scatter_buffer_va != NULL)
+ 	if (dev->scatter_buffer_va)
  		dma_free_coherent(dev->core_dev->device,
 -				  dev->scatter_buffer_size * PPC4XX_NUM_SD,
 +				  PPC4XX_SD_BUFFER_SIZE * PPC4XX_NUM_SD,
diff --git a/target/linux/apm821xx/patches-4.14/020-0011-crypto-crypto4xx-fix-crypto4xx_build_pdr-crypto4xx_b.patch b/target/linux/apm821xx/patches-4.14/020-0011-crypto-crypto4xx-fix-crypto4xx_build_pdr-crypto4xx_b.patch
deleted file mode 100644
index 837fbdc547..0000000000
--- a/target/linux/apm821xx/patches-4.14/020-0011-crypto-crypto4xx-fix-crypto4xx_build_pdr-crypto4xx_b.patch
+++ /dev/null
@@ -1,84 +0,0 @@
-From 5d59ad6eea82ef8df92b4109615a0dde9d8093e9 Mon Sep 17 00:00:00 2001
-From: Christian Lamparter <chunkeey at googlemail.com>
-Date: Fri, 25 Aug 2017 15:47:24 +0200
-Subject: [PATCH 11/25] crypto: crypto4xx - fix crypto4xx_build_pdr,
- crypto4xx_build_sdr leak
-
-If one of the later memory allocations in rypto4xx_build_pdr()
-fails: dev->pdr (and/or) dev->pdr_uinfo wouldn't be freed.
-
-crypto4xx_build_sdr() has the same issue with dev->sdr.
-
-Signed-off-by: Christian Lamparter <chunkeey at googlemail.com>
-Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
----
- drivers/crypto/amcc/crypto4xx_core.c | 17 +++++++++--------
- 1 file changed, 9 insertions(+), 8 deletions(-)
-
---- a/drivers/crypto/amcc/crypto4xx_core.c
-+++ b/drivers/crypto/amcc/crypto4xx_core.c
-@@ -209,7 +209,7 @@ static u32 crypto4xx_build_pdr(struct cr
- 				  dev->pdr_pa);
- 		return -ENOMEM;
- 	}
--	memset(dev->pdr, 0,  sizeof(struct ce_pd) * PPC4XX_NUM_PD);
-+	memset(dev->pdr, 0, sizeof(struct ce_pd) * PPC4XX_NUM_PD);
- 	dev->shadow_sa_pool = dma_alloc_coherent(dev->core_dev->device,
- 				   256 * PPC4XX_NUM_PD,
- 				   &dev->shadow_sa_pool_pa,
-@@ -242,13 +242,15 @@ static u32 crypto4xx_build_pdr(struct cr
- 
- static void crypto4xx_destroy_pdr(struct crypto4xx_device *dev)
- {
--	if (dev->pdr != NULL)
-+	if (dev->pdr)
- 		dma_free_coherent(dev->core_dev->device,
- 				  sizeof(struct ce_pd) * PPC4XX_NUM_PD,
- 				  dev->pdr, dev->pdr_pa);
-+
- 	if (dev->shadow_sa_pool)
- 		dma_free_coherent(dev->core_dev->device, 256 * PPC4XX_NUM_PD,
- 				  dev->shadow_sa_pool, dev->shadow_sa_pool_pa);
-+
- 	if (dev->shadow_sr_pool)
- 		dma_free_coherent(dev->core_dev->device,
- 			sizeof(struct sa_state_record) * PPC4XX_NUM_PD,
-@@ -417,12 +419,12 @@ static u32 crypto4xx_build_sdr(struct cr
- 
- static void crypto4xx_destroy_sdr(struct crypto4xx_device *dev)
- {
--	if (dev->sdr != NULL)
-+	if (dev->sdr)
- 		dma_free_coherent(dev->core_dev->device,
- 				  sizeof(struct ce_sd) * PPC4XX_NUM_SD,
- 				  dev->sdr, dev->sdr_pa);
- 
--	if (dev->scatter_buffer_va != NULL)
-+	if (dev->scatter_buffer_va)
- 		dma_free_coherent(dev->core_dev->device,
- 				  PPC4XX_SD_BUFFER_SIZE * PPC4XX_NUM_SD,
- 				  dev->scatter_buffer_va,
-@@ -1223,7 +1225,7 @@ static int crypto4xx_probe(struct platfo
- 
- 	rc = crypto4xx_build_gdr(core_dev->dev);
- 	if (rc)
--		goto err_build_gdr;
-+		goto err_build_pdr;
- 
- 	rc = crypto4xx_build_sdr(core_dev->dev);
- 	if (rc)
-@@ -1266,12 +1268,11 @@ err_iomap:
- err_request_irq:
- 	irq_dispose_mapping(core_dev->irq);
- 	tasklet_kill(&core_dev->tasklet);
--	crypto4xx_destroy_sdr(core_dev->dev);
- err_build_sdr:
-+	crypto4xx_destroy_sdr(core_dev->dev);
- 	crypto4xx_destroy_gdr(core_dev->dev);
--err_build_gdr:
--	crypto4xx_destroy_pdr(core_dev->dev);
- err_build_pdr:
-+	crypto4xx_destroy_pdr(core_dev->dev);
- 	kfree(core_dev->dev);
- err_alloc_dev:
- 	kfree(core_dev);
diff --git a/target/linux/brcm63xx/patches-4.14/001-4.15-08-bcm63xx_enet-correct-clock-usage.patch b/target/linux/brcm63xx/patches-4.14/001-4.15-08-bcm63xx_enet-correct-clock-usage.patch
deleted file mode 100644
index bd66e72c91..0000000000
--- a/target/linux/brcm63xx/patches-4.14/001-4.15-08-bcm63xx_enet-correct-clock-usage.patch
+++ /dev/null
@@ -1,101 +0,0 @@
-From d0423d3e4fa7ae305729cb50369427f075ccb279 Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jonas.gorski at gmail.com>
-Date: Sat, 25 Feb 2017 12:41:28 +0100
-Subject: [PATCH 1/6] bcm63xx_enet: correct clock usage
-
-Check the return code of prepare_enable and change one last instance of
-enable only to prepare_enable. Also properly disable and release the
-clock in error paths and on remove for enetsw.
-
-Signed-off-by: Jonas Gorski <jonas.gorski at gmail.com>
----
- drivers/net/ethernet/broadcom/bcm63xx_enet.c | 31 +++++++++++++++++++++-------
- 1 file changed, 23 insertions(+), 8 deletions(-)
-
---- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c
-+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
-@@ -1773,7 +1773,9 @@ static int bcm_enet_probe(struct platfor
- 		ret = PTR_ERR(priv->mac_clk);
- 		goto out;
- 	}
--	clk_prepare_enable(priv->mac_clk);
-+	ret = clk_prepare_enable(priv->mac_clk);
-+	if (ret)
-+		goto out_put_clk_mac;
- 
- 	/* initialize default and fetch platform data */
- 	priv->rx_ring_size = BCMENET_DEF_RX_DESC;
-@@ -1805,9 +1807,11 @@ static int bcm_enet_probe(struct platfor
- 		if (IS_ERR(priv->phy_clk)) {
- 			ret = PTR_ERR(priv->phy_clk);
- 			priv->phy_clk = NULL;
--			goto out_put_clk_mac;
-+			goto out_disable_clk_mac;
- 		}
--		clk_prepare_enable(priv->phy_clk);
-+		ret = clk_prepare_enable(priv->phy_clk);
-+		if (ret)
-+			goto out_put_clk_phy;
- 	}
- 
- 	/* do minimal hardware init to be able to probe mii bus */
-@@ -1901,13 +1905,16 @@ out_free_mdio:
- out_uninit_hw:
- 	/* turn off mdc clock */
- 	enet_writel(priv, 0, ENET_MIISC_REG);
--	if (priv->phy_clk) {
-+	if (priv->phy_clk)
- 		clk_disable_unprepare(priv->phy_clk);
-+
-+out_put_clk_phy:
-+	if (priv->phy_clk)
- 		clk_put(priv->phy_clk);
--	}
- 
--out_put_clk_mac:
-+out_disable_clk_mac:
- 	clk_disable_unprepare(priv->mac_clk);
-+out_put_clk_mac:
- 	clk_put(priv->mac_clk);
- out:
- 	free_netdev(dev);
-@@ -2752,7 +2759,9 @@ static int bcm_enetsw_probe(struct platf
- 		ret = PTR_ERR(priv->mac_clk);
- 		goto out_unmap;
- 	}
--	clk_enable(priv->mac_clk);
-+	ret = clk_prepare_enable(priv->mac_clk);
-+	if (ret)
-+		goto out_put_clk;
- 
- 	priv->rx_chan = 0;
- 	priv->tx_chan = 1;
-@@ -2773,7 +2782,7 @@ static int bcm_enetsw_probe(struct platf
- 
- 	ret = register_netdev(dev);
- 	if (ret)
--		goto out_put_clk;
-+		goto out_disable_clk;
- 
- 	netif_carrier_off(dev);
- 	platform_set_drvdata(pdev, dev);
-@@ -2782,6 +2791,9 @@ static int bcm_enetsw_probe(struct platf
- 
- 	return 0;
- 
-+out_disable_clk:
-+	clk_disable_unprepare(priv->mac_clk);
-+
- out_put_clk:
- 	clk_put(priv->mac_clk);
- 
-@@ -2813,6 +2825,9 @@ static int bcm_enetsw_remove(struct plat
- 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- 	release_mem_region(res->start, resource_size(res));
- 
-+	clk_disable_unprepare(priv->mac_clk);
-+	clk_put(priv->mac_clk);
-+
- 	free_netdev(dev);
- 	return 0;
- }
diff --git a/target/linux/brcm63xx/patches-4.14/001-4.15-09-bcm63xx_enet-do-not-write-to-random-DMA-channel-on-B.patch b/target/linux/brcm63xx/patches-4.14/001-4.15-09-bcm63xx_enet-do-not-write-to-random-DMA-channel-on-B.patch
deleted file mode 100644
index 22b3a732f9..0000000000
--- a/target/linux/brcm63xx/patches-4.14/001-4.15-09-bcm63xx_enet-do-not-write-to-random-DMA-channel-on-B.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 23d94cb855b6f4f0ee1c01679224472104ac6440 Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jonas.gorski at gmail.com>
-Date: Sat, 30 Sep 2017 14:10:18 +0200
-Subject: [PATCH 2/6] bcm63xx_enet: do not write to random DMA channel on
- BCM6345
-
-The DMA controller regs actually point to DMA channel 0, so the write to
-ENETDMA_CFG_REG will actually modify a random DMA channel.
-
-Since DMA controller registers do not exist on BCM6345, guard the write
-with the usual check for dma_has_sram.
-
-Signed-off-by: Jonas Gorski <jonas.gorski at gmail.com>
----
- drivers/net/ethernet/broadcom/bcm63xx_enet.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
---- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c
-+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
-@@ -1062,7 +1062,8 @@ static int bcm_enet_open(struct net_devi
- 	val = enet_readl(priv, ENET_CTL_REG);
- 	val |= ENET_CTL_ENABLE_MASK;
- 	enet_writel(priv, val, ENET_CTL_REG);
--	enet_dma_writel(priv, ENETDMA_CFG_EN_MASK, ENETDMA_CFG_REG);
-+	if (priv->dma_has_sram)
-+		enet_dma_writel(priv, ENETDMA_CFG_EN_MASK, ENETDMA_CFG_REG);
- 	enet_dmac_writel(priv, priv->dma_chan_en_mask,
- 			 ENETDMAC_CHANCFG, priv->rx_chan);
- 
diff --git a/target/linux/generic/backport-4.14/080-net-convert-sock.sk_wmem_alloc-from-atomic_t-to-refc.patch b/target/linux/generic/backport-4.14/080-net-convert-sock.sk_wmem_alloc-from-atomic_t-to-refc.patch
deleted file mode 100644
index 06d00886f1..0000000000
--- a/target/linux/generic/backport-4.14/080-net-convert-sock.sk_wmem_alloc-from-atomic_t-to-refc.patch
+++ /dev/null
@@ -1,172 +0,0 @@
-From 9bbe60a67be5a1c6f79b3c9be5003481a50529ff Mon Sep 17 00:00:00 2001
-From: David Woodhouse <dwmw2 at infradead.org>
-Date: Sat, 16 Jun 2018 11:55:44 +0100
-Subject: atm: Preserve value of skb->truesize when accounting to vcc
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-ATM accounts for in-flight TX packets in sk_wmem_alloc of the VCC on
-which they are to be sent. But it doesn't take ownership of those
-packets from the sock (if any) which originally owned them. They should
-remain owned by their actual sender until they've left the box.
-
-There's a hack in pskb_expand_head() to avoid adjusting skb->truesize
-for certain skbs, precisely to avoid messing up sk_wmem_alloc
-accounting. Ideally that hack would cover the ATM use case too, but it
-doesn't ? skbs which aren't owned by any sock, for example PPP control
-frames, still get their truesize adjusted when the low-level ATM driver
-adds headroom.
-
-This has always been an issue, it seems. The truesize of a packet
-increases, and sk_wmem_alloc on the VCC goes negative. But this wasn't
-for normal traffic, only for control frames. So I think we just got away
-with it, and we probably needed to send 2GiB of LCP echo frames before
-the misaccounting would ever have caused a problem and caused
-atm_may_send() to start refusing packets.
-
-Commit 14afee4b609 ("net: convert sock.sk_wmem_alloc from atomic_t to
-refcount_t") did exactly what it was intended to do, and turned this
-mostly-theoretical problem into a real one, causing PPPoATM to fail
-immediately as sk_wmem_alloc underflows and atm_may_send() *immediately*
-starts refusing to allow new packets.
-
-The least intrusive solution to this problem is to stash the value of
-skb->truesize that was accounted to the VCC, in a new member of the
-ATM_SKB(skb) structure. Then in atm_pop_raw() subtract precisely that
-value instead of the then-current value of skb->truesize.
-
-Fixes: 158f323b9868 ("net: adjust skb->truesize in pskb_expand_head()")
-Signed-off-by: David Woodhouse <dwmw2 at infradead.org>
-Tested-by: Kevin Darbyshire-Bryant <ldir at darbyshire-bryant.me.uk>
-Signed-off-by: David S. Miller <davem at davemloft.net>
----
- include/linux/atmdev.h | 15 +++++++++++++++
- net/atm/br2684.c       |  3 +--
- net/atm/clip.c         |  3 +--
- net/atm/common.c       |  3 +--
- net/atm/lec.c          |  3 +--
- net/atm/mpc.c          |  3 +--
- net/atm/pppoatm.c      |  3 +--
- net/atm/raw.c          |  4 ++--
- 8 files changed, 23 insertions(+), 14 deletions(-)
-
---- a/include/linux/atmdev.h
-+++ b/include/linux/atmdev.h
-@@ -214,6 +214,7 @@ struct atmphy_ops {
- struct atm_skb_data {
- 	struct atm_vcc	*vcc;		/* ATM VCC */
- 	unsigned long	atm_options;	/* ATM layer options */
-+	unsigned int	acct_truesize;  /* truesize accounted to vcc */
- };
- 
- #define VCC_HTABLE_SIZE 32
-@@ -241,6 +242,20 @@ void vcc_insert_socket(struct sock *sk);
- 
- void atm_dev_release_vccs(struct atm_dev *dev);
- 
-+static inline void atm_account_tx(struct atm_vcc *vcc, struct sk_buff *skb)
-+{
-+	/*
-+	 * Because ATM skbs may not belong to a sock (and we don't
-+	 * necessarily want to), skb->truesize may be adjusted,
-+	 * escaping the hack in pskb_expand_head() which avoids
-+	 * doing so for some cases. So stash the value of truesize
-+	 * at the time we accounted it, and atm_pop_raw() can use
-+	 * that value later, in case it changes.
-+	 */
-+	refcount_add(skb->truesize, &sk_atm(vcc)->sk_wmem_alloc);
-+	ATM_SKB(skb)->acct_truesize = skb->truesize;
-+	ATM_SKB(skb)->atm_options = vcc->atm_options;
-+}
- 
- static inline void atm_force_charge(struct atm_vcc *vcc,int truesize)
- {
---- a/net/atm/br2684.c
-+++ b/net/atm/br2684.c
-@@ -252,8 +252,7 @@ static int br2684_xmit_vcc(struct sk_buf
- 
- 	ATM_SKB(skb)->vcc = atmvcc = brvcc->atmvcc;
- 	pr_debug("atm_skb(%p)->vcc(%p)->dev(%p)\n", skb, atmvcc, atmvcc->dev);
--	refcount_add(skb->truesize, &sk_atm(atmvcc)->sk_wmem_alloc);
--	ATM_SKB(skb)->atm_options = atmvcc->atm_options;
-+	atm_account_tx(atmvcc, skb);
- 	dev->stats.tx_packets++;
- 	dev->stats.tx_bytes += skb->len;
- 
---- a/net/atm/clip.c
-+++ b/net/atm/clip.c
-@@ -381,8 +381,7 @@ static netdev_tx_t clip_start_xmit(struc
- 		memcpy(here, llc_oui, sizeof(llc_oui));
- 		((__be16 *) here)[3] = skb->protocol;
- 	}
--	refcount_add(skb->truesize, &sk_atm(vcc)->sk_wmem_alloc);
--	ATM_SKB(skb)->atm_options = vcc->atm_options;
-+	atm_account_tx(vcc, skb);
- 	entry->vccs->last_use = jiffies;
- 	pr_debug("atm_skb(%p)->vcc(%p)->dev(%p)\n", skb, vcc, vcc->dev);
- 	old = xchg(&entry->vccs->xoff, 1);	/* assume XOFF ... */
---- a/net/atm/common.c
-+++ b/net/atm/common.c
-@@ -630,10 +630,9 @@ int vcc_sendmsg(struct socket *sock, str
- 		goto out;
- 	}
- 	pr_debug("%d += %d\n", sk_wmem_alloc_get(sk), skb->truesize);
--	refcount_add(skb->truesize, &sk->sk_wmem_alloc);
-+	atm_account_tx(vcc, skb);
- 
- 	skb->dev = NULL; /* for paths shared with net_device interfaces */
--	ATM_SKB(skb)->atm_options = vcc->atm_options;
- 	if (!copy_from_iter_full(skb_put(skb, size), size, &m->msg_iter)) {
- 		kfree_skb(skb);
- 		error = -EFAULT;
---- a/net/atm/lec.c
-+++ b/net/atm/lec.c
-@@ -182,9 +182,8 @@ lec_send(struct atm_vcc *vcc, struct sk_
- 	struct net_device *dev = skb->dev;
- 
- 	ATM_SKB(skb)->vcc = vcc;
--	ATM_SKB(skb)->atm_options = vcc->atm_options;
-+	atm_account_tx(vcc, skb);
- 
--	refcount_add(skb->truesize, &sk_atm(vcc)->sk_wmem_alloc);
- 	if (vcc->send(vcc, skb) < 0) {
- 		dev->stats.tx_dropped++;
- 		return;
---- a/net/atm/mpc.c
-+++ b/net/atm/mpc.c
-@@ -555,8 +555,7 @@ static int send_via_shortcut(struct sk_b
- 					sizeof(struct llc_snap_hdr));
- 	}
- 
--	refcount_add(skb->truesize, &sk_atm(entry->shortcut)->sk_wmem_alloc);
--	ATM_SKB(skb)->atm_options = entry->shortcut->atm_options;
-+	atm_account_tx(entry->shortcut, skb);
- 	entry->shortcut->send(entry->shortcut, skb);
- 	entry->packets_fwded++;
- 	mpc->in_ops->put(entry);
---- a/net/atm/pppoatm.c
-+++ b/net/atm/pppoatm.c
-@@ -350,8 +350,7 @@ static int pppoatm_send(struct ppp_chann
- 		return 1;
- 	}
- 
--	refcount_add(skb->truesize, &sk_atm(ATM_SKB(skb)->vcc)->sk_wmem_alloc);
--	ATM_SKB(skb)->atm_options = ATM_SKB(skb)->vcc->atm_options;
-+	atm_account_tx(vcc, skb);
- 	pr_debug("atm_skb(%p)->vcc(%p)->dev(%p)\n",
- 		 skb, ATM_SKB(skb)->vcc, ATM_SKB(skb)->vcc->dev);
- 	ret = ATM_SKB(skb)->vcc->send(ATM_SKB(skb)->vcc, skb)
---- a/net/atm/raw.c
-+++ b/net/atm/raw.c
-@@ -35,8 +35,8 @@ static void atm_pop_raw(struct atm_vcc *
- 	struct sock *sk = sk_atm(vcc);
- 
- 	pr_debug("(%d) %d -= %d\n",
--		 vcc->vci, sk_wmem_alloc_get(sk), skb->truesize);
--	WARN_ON(refcount_sub_and_test(skb->truesize, &sk->sk_wmem_alloc));
-+		 vcc->vci, sk_wmem_alloc_get(sk), ATM_SKB(skb)->acct_truesize);
-+	WARN_ON(refcount_sub_and_test(ATM_SKB(skb)->acct_truesize, &sk->sk_wmem_alloc));
- 	dev_kfree_skb_any(skb);
- 	sk->sk_write_space(sk);
- }
diff --git a/target/linux/generic/backport-4.14/336-v4.15-netfilter-exit_net-cleanup-check-added.patch b/target/linux/generic/backport-4.14/336-v4.15-netfilter-exit_net-cleanup-check-added.patch
index 37975ae038..5c942e3a54 100644
--- a/target/linux/generic/backport-4.14/336-v4.15-netfilter-exit_net-cleanup-check-added.patch
+++ b/target/linux/generic/backport-4.14/336-v4.15-netfilter-exit_net-cleanup-check-added.patch
@@ -62,7 +62,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  static struct pernet_operations nfnl_log_net_ops = {
 --- a/net/netfilter/nfnetlink_queue.c
 +++ b/net/netfilter/nfnetlink_queue.c
-@@ -1512,10 +1512,15 @@ static int __net_init nfnl_queue_net_ini
+@@ -1515,10 +1515,15 @@ static int __net_init nfnl_queue_net_ini
  
  static void __net_exit nfnl_queue_net_exit(struct net *net)
  {
diff --git a/target/linux/generic/hack-4.14/211-host_tools_portability.patch b/target/linux/generic/hack-4.14/211-host_tools_portability.patch
index 59f1479436..d806df8a5f 100644
--- a/target/linux/generic/hack-4.14/211-host_tools_portability.patch
+++ b/target/linux/generic/hack-4.14/211-host_tools_portability.patch
@@ -12,7 +12,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/tools/build/Build.include
 +++ b/tools/build/Build.include
-@@ -97,4 +97,4 @@ cxx_flags = -Wp,-MD,$(depfile) -Wp,-MT,$
+@@ -98,4 +98,4 @@ cxx_flags = -Wp,-MD,$(depfile) -Wp,-MT,$
  ###
  ## HOSTCC C flags
  
diff --git a/target/linux/generic/hack-4.14/902-debloat_proc.patch b/target/linux/generic/hack-4.14/902-debloat_proc.patch
index 3f47d22355..4f5fb7022c 100644
--- a/target/linux/generic/hack-4.14/902-debloat_proc.patch
+++ b/target/linux/generic/hack-4.14/902-debloat_proc.patch
@@ -243,7 +243,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  }
 --- a/mm/vmstat.c
 +++ b/mm/vmstat.c
-@@ -1946,10 +1946,12 @@ void __init init_mm_internals(void)
+@@ -1944,10 +1944,12 @@ void __init init_mm_internals(void)
  	start_shepherd_timer();
  #endif
  #ifdef CONFIG_PROC_FS
diff --git a/target/linux/generic/pending-4.14/102-MIPS-only-process-negative-stack-offsets-on-stack-tr.patch b/target/linux/generic/pending-4.14/102-MIPS-only-process-negative-stack-offsets-on-stack-tr.patch
index cc17053121..b3dc43ea68 100644
--- a/target/linux/generic/pending-4.14/102-MIPS-only-process-negative-stack-offsets-on-stack-tr.patch
+++ b/target/linux/generic/pending-4.14/102-MIPS-only-process-negative-stack-offsets-on-stack-tr.patch
@@ -46,7 +46,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/arch/mips/kernel/process.c
 +++ b/arch/mips/kernel/process.c
-@@ -357,6 +357,8 @@ static inline int is_sp_move_ins(union m
+@@ -358,6 +358,8 @@ static inline int is_sp_move_ins(union m
  
  	if (ip->i_format.opcode == addiu_op ||
  	    ip->i_format.opcode == daddiu_op) {
diff --git a/target/linux/generic/pending-4.14/610-netfilter_match_bypass_default_checks.patch b/target/linux/generic/pending-4.14/610-netfilter_match_bypass_default_checks.patch
index 3611879609..2541230ff5 100644
--- a/target/linux/generic/pending-4.14/610-netfilter_match_bypass_default_checks.patch
+++ b/target/linux/generic/pending-4.14/610-netfilter_match_bypass_default_checks.patch
@@ -68,7 +68,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	if (!xt_percpu_counter_alloc(alloc_state, &e->counters))
  		return -ENOMEM;
  
-@@ -817,6 +845,7 @@ copy_entries_to_user(unsigned int total_
+@@ -818,6 +846,7 @@ copy_entries_to_user(unsigned int total_
  	const struct xt_table_info *private = table->private;
  	int ret = 0;
  	const void *loc_cpu_entry;
@@ -76,7 +76,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  
  	counters = alloc_counters(table);
  	if (IS_ERR(counters))
-@@ -844,6 +873,14 @@ copy_entries_to_user(unsigned int total_
+@@ -845,6 +874,14 @@ copy_entries_to_user(unsigned int total_
  			goto free_counters;
  		}
  
@@ -91,7 +91,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  		for (i = sizeof(struct ipt_entry);
  		     i < e->target_offset;
  		     i += m->u.match_size) {
-@@ -1226,12 +1263,15 @@ compat_copy_entry_to_user(struct ipt_ent
+@@ -1227,12 +1264,15 @@ compat_copy_entry_to_user(struct ipt_ent
  	compat_uint_t origsize;
  	const struct xt_entry_match *ematch;
  	int ret = 0;
diff --git a/target/linux/generic/pending-4.14/630-packet_socket_type.patch b/target/linux/generic/pending-4.14/630-packet_socket_type.patch
index e1736214f5..82e2c51afd 100644
--- a/target/linux/generic/pending-4.14/630-packet_socket_type.patch
+++ b/target/linux/generic/pending-4.14/630-packet_socket_type.patch
@@ -87,7 +87,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	if (!net_eq(dev_net(dev), sock_net(sk)))
  		goto drop;
  
-@@ -3262,6 +3264,7 @@ static int packet_create(struct net *net
+@@ -3260,6 +3262,7 @@ static int packet_create(struct net *net
  	mutex_init(&po->pg_vec_lock);
  	po->rollover = NULL;
  	po->prot_hook.func = packet_rcv;
@@ -95,7 +95,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  
  	if (sock->type == SOCK_PACKET)
  		po->prot_hook.func = packet_rcv_spkt;
-@@ -3875,6 +3878,16 @@ packet_setsockopt(struct socket *sock, i
+@@ -3873,6 +3876,16 @@ packet_setsockopt(struct socket *sock, i
  		po->xmit = val ? packet_direct_xmit : dev_queue_xmit;
  		return 0;
  	}
@@ -112,7 +112,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	default:
  		return -ENOPROTOOPT;
  	}
-@@ -3927,6 +3940,13 @@ static int packet_getsockopt(struct sock
+@@ -3925,6 +3938,13 @@ static int packet_getsockopt(struct sock
  	case PACKET_VNET_HDR:
  		val = po->has_vnet_hdr;
  		break;
diff --git a/target/linux/generic/pending-4.14/834-ledtrig-libata.patch b/target/linux/generic/pending-4.14/834-ledtrig-libata.patch
index 280536e1e6..2eec024b72 100644
--- a/target/linux/generic/pending-4.14/834-ledtrig-libata.patch
+++ b/target/linux/generic/pending-4.14/834-ledtrig-libata.patch
@@ -65,7 +65,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  /**
   *	ata_build_rw_tf - Build ATA taskfile for given read/write request
   *	@tf: Target ATA taskfile
-@@ -5117,6 +5130,9 @@ struct ata_queued_cmd *ata_qc_new_init(s
+@@ -5120,6 +5133,9 @@ struct ata_queued_cmd *ata_qc_new_init(s
  		if (tag < 0)
  			return NULL;
  	}
@@ -75,7 +75,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  
  	qc = __ata_qc_from_tag(ap, tag);
  	qc->tag = tag;
-@@ -6018,6 +6034,9 @@ struct ata_port *ata_port_alloc(struct a
+@@ -6021,6 +6037,9 @@ struct ata_port *ata_port_alloc(struct a
  	ap->stats.unhandled_irq = 1;
  	ap->stats.idle_irq = 1;
  #endif
@@ -85,7 +85,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  	ata_sff_port_init(ap);
  
  	return ap;
-@@ -6039,6 +6058,12 @@ static void ata_host_release(struct devi
+@@ -6042,6 +6061,12 @@ static void ata_host_release(struct devi
  
  		kfree(ap->pmp_link);
  		kfree(ap->slave_link);
@@ -98,7 +98,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  		kfree(ap);
  		host->ports[i] = NULL;
  	}
-@@ -6485,7 +6510,23 @@ int ata_host_register(struct ata_host *h
+@@ -6488,7 +6513,23 @@ int ata_host_register(struct ata_host *h
  		host->ports[i]->print_id = atomic_inc_return(&ata_print_id);
  		host->ports[i]->local_port_no = i + 1;
  	}
@@ -134,7 +134,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  
  /*
   * Define if arch has non-standard setup.  This is a _PCI_ standard
-@@ -889,6 +892,12 @@ struct ata_port {
+@@ -890,6 +893,12 @@ struct ata_port {
  #ifdef CONFIG_ATA_ACPI
  	struct ata_acpi_gtm	__acpi_init_gtm; /* use ata_acpi_init_gtm() */
  #endif
diff --git a/target/linux/oxnas/patches-4.14/999-libata-hacks.patch b/target/linux/oxnas/patches-4.14/999-libata-hacks.patch
index da3660fada..e490dbf7c1 100644
--- a/target/linux/oxnas/patches-4.14/999-libata-hacks.patch
+++ b/target/linux/oxnas/patches-4.14/999-libata-hacks.patch
@@ -15,7 +15,7 @@
  	/* initialize internal qc */
  
  	/* XXX: Tag 0 is used for drivers with legacy EH as some
-@@ -5124,6 +5132,9 @@ struct ata_queued_cmd *ata_qc_new_init(s
+@@ -5127,6 +5135,9 @@ struct ata_queued_cmd *ata_qc_new_init(s
  	if (unlikely(ap->pflags & ATA_PFLAG_FROZEN))
  		return NULL;
  
@@ -25,7 +25,7 @@
  	/* libsas case */
  	if (ap->flags & ATA_FLAG_SAS_HOST) {
  		tag = ata_sas_allocate_tag(ap);
-@@ -5169,6 +5180,8 @@ void ata_qc_free(struct ata_queued_cmd *
+@@ -5172,6 +5183,8 @@ void ata_qc_free(struct ata_queued_cmd *
  		qc->tag = ATA_TAG_POISON;
  		if (ap->flags & ATA_FLAG_SAS_HOST)
  			ata_sas_free_tag(tag, ap);
@@ -36,7 +36,7 @@
  
 --- a/include/linux/libata.h
 +++ b/include/linux/libata.h
-@@ -918,6 +918,8 @@ struct ata_port_operations {
+@@ -919,6 +919,8 @@ struct ata_port_operations {
  	void (*qc_prep)(struct ata_queued_cmd *qc);
  	unsigned int (*qc_issue)(struct ata_queued_cmd *qc);
  	bool (*qc_fill_rtf)(struct ata_queued_cmd *qc);
@@ -45,7 +45,7 @@
  
  	/*
  	 * Configuration and exception handling
-@@ -1008,6 +1010,9 @@ struct ata_port_operations {
+@@ -1009,6 +1011,9 @@ struct ata_port_operations {
  	void (*phy_reset)(struct ata_port *ap);
  	void (*eng_timeout)(struct ata_port *ap);
  
diff --git a/target/linux/ramips/patches-4.14/0036-mtd-fix-cfi-cmdset-0002-erase-status-check.patch b/target/linux/ramips/patches-4.14/0036-mtd-fix-cfi-cmdset-0002-erase-status-check.patch
deleted file mode 100644
index 9226202b7f..0000000000
--- a/target/linux/ramips/patches-4.14/0036-mtd-fix-cfi-cmdset-0002-erase-status-check.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 8e72a3a1be8f6328bd7ef491332ba541547b6086 Mon Sep 17 00:00:00 2001
-From: John Crispin <blogic at openwrt.org>
-Date: Mon, 15 Jul 2013 00:38:51 +0200
-Subject: [PATCH 36/53] mtd: fix cfi cmdset 0002 erase status check
-
----
- drivers/mtd/chips/cfi_cmdset_0002.c |    4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
---- a/drivers/mtd/chips/cfi_cmdset_0002.c
-+++ b/drivers/mtd/chips/cfi_cmdset_0002.c
-@@ -2295,7 +2295,7 @@ static int __xipram do_erase_chip(struct
- 			chip->erase_suspended = 0;
- 		}
- 
--		if (chip_ready(map, adr))
-+		if (chip_good(map, adr, map_word_ff(map)))
- 			break;
- 
- 		if (time_after(jiffies, timeo)) {
-@@ -2385,7 +2385,7 @@ static int __xipram do_erase_oneblock(st
- 			chip->erase_suspended = 0;
- 		}
- 
--		if (chip_ready(map, adr)) {
-+		if (chip_good(map, adr, map_word_ff(map))) {
- 			xip_enable(map, chip, adr);
- 			break;
- 		}
diff --git a/target/linux/ramips/patches-4.14/0037-mtd-cfi-cmdset-0002-force-word-write.patch b/target/linux/ramips/patches-4.14/0037-mtd-cfi-cmdset-0002-force-word-write.patch
index 7ee8284535..1cadfcdb00 100644
--- a/target/linux/ramips/patches-4.14/0037-mtd-cfi-cmdset-0002-force-word-write.patch
+++ b/target/linux/ramips/patches-4.14/0037-mtd-cfi-cmdset-0002-force-word-write.patch
@@ -16,7 +16,7 @@ Subject: [PATCH 37/53] mtd: cfi cmdset 0002 force word write
 -#define FORCE_WORD_WRITE 0
 +#define FORCE_WORD_WRITE 1
  
- #define MAX_WORD_RETRIES 3
+ #define MAX_RETRIES 3
  
 @@ -51,7 +51,9 @@
  
-- 
2.11.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From wong.syrone at gmail.com  Sun Jul 22 20:35:00 2018
From: wong.syrone at gmail.com (Syrone Wong)
Date: Mon, 23 Jul 2018 08:35:00 +0800
Subject: [OpenWrt-Devel] gcc 8.1 mvebu compilation error
In-Reply-To: <CA+_ehUxjXZjUeMkfi69cHbRkusDu-f9QEnkRc+++Kt3pFxiavw@mail.gmail.com>
References: <CA+_ehUxjXZjUeMkfi69cHbRkusDu-f9QEnkRc+++Kt3pFxiavw@mail.gmail.com>
Message-ID: <CAEaqfoawykNr4XQ_-4_g9EM9kg1U2Bkixy=rWrHZFnRjKOL5SA@mail.gmail.com>

> /home/Ansuel/openwrt/tmp/ccyVnmrs.s:204: Error: selected processor
> does not support `dmb ish' in ARM mode

It looks like you are using malformed compilation flags, please post more info.

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From zajec5 at gmail.com  Wed Jul 25 07:33:14 2018
From: zajec5 at gmail.com (=?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?=)
Date: Wed, 25 Jul 2018 13:33:14 +0200
Subject: [OpenWrt-Devel] Modifying & recompiling musl
Message-ID: <CACna6ryHJ7WsJOJLnjuWDW_KmOwgvkFU-z2S5v6V+JGhq=ZO4A@mail.gmail.com>

I had to fix some issue in musl so I edited:
build_dir/toolchain-arm_cortex-a9_gcc-5.4.0_musl-1.1.16_eabi/musl-1.1.16/src/time/strptime.c
and started looking for a way to recompile it & rebuilding images.

From what I heard from jow it should be sufficient to:
rm build_dir/toolchain-*/musl/.built
make toolchain/musl/compile V=s
make package/toolchain/{clean,compile} V=s
make V=s
but it didn't work. My images didn't include updated (fixed) libc.so.
That seems to work for Felix from what he said.

Any idea why it doesn't work for me (and bcm53xx target)? What else
may I need to remove/clean?

FWIW following commands helped:
rm build_dir/toolchain-*/musl/.built
rm -R build_dir/target-*/toolchain/
rm -R staging_dir/toolchain-*/
but I think it could be handled with less recompiling.

-- 
Rafa?

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From devel-sven at geroedel.de  Wed Jul 25 14:38:03 2018
From: devel-sven at geroedel.de (devel-sven at geroedel.de)
Date: Wed, 25 Jul 2018 20:38:03 +0200
Subject: [OpenWrt-Devel] [PATCH 1/1] ramips: remove RB750GR3 support
In-Reply-To: <CABwW5nmvLfq_dXdBPRWsM_H4TWsVKyYn58sXsRaBuByT5vi5Zw@mail.gmail.com>
References: <20180719172618.43863-1-hacks@slashdirt.org>
 <20180719172618.43863-2-hacks@slashdirt.org>
 <CABwW5nmvLfq_dXdBPRWsM_H4TWsVKyYn58sXsRaBuByT5vi5Zw@mail.gmail.com>
Message-ID: <0ac3799294c1c0d49bf9686dcf917bda@geroedel.de>

On 2018-07-19 19:52, Mathias Kresin wrote:
> 2018-07-19 19:26 GMT+02:00 Thibaut VAR?NE <hacks at slashdirt.org>:
>> faf94d926e2810f895f2a98d4a49ee2fe8f673e8 added "support" for a hacked
>> device where the original boot loader (routerboot) has been replaced
>> by u-boot.
>> 
>> Support for this device with stock bootloader is possible (as 
>> evidenced
>> by support for the RBM33G), and conflicts with this code.
>> 
>> Remove code before release.
>> 
>> Signed-off-by: Thibaut VAR?NE <hacks at slashdirt.org>
> 
> FYI, I already NAK'ed the very same patch on github.
> 
> I do agree that it can be done better by not requiring the replacement
> of the bootloader. Nevertheless, support for this board is already
> shipped since LEDE-17.01 and I don't agree to drop support for a board
> without providing an alternative/fixed/better image.
> 
> Same as with Thibauts other patches, this time I'll leave it up to
> someone else to make a call.
> 
> Mathias

Indeed, a "Flash-and-Play" solution would be fine. But as replacing the
bootloader and the uboot-config is a thing you think of twice. If you
really want to change the software on this level.
I did it on some devices an all running fine. Of course I copied the 
flash,
via the mtd-device, on my hdd, to have a way back. Even this might 
require
an external SPI-writer.
As of the "advanced" installation-steps (in contrast to just uploading a
factory.bin), I would leave it up to the user if he accepts the risk of
a broken / incompatible board and to take the option to use this board 
by
dropping support.

Sven

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From honzabelohlavek at seznam.cz  Wed Jul 25 16:40:50 2018
From: honzabelohlavek at seznam.cz (=?utf-8?Q?Jan_B=C4=9Blohl=C3=A1vek?=)
Date: Wed, 25 Jul 2018 22:40:50 +0200
Subject: [OpenWrt-Devel] support on netis 2880
Message-ID: <40.1}8dlM.7{3ewCF4yRK.1RME1N@seznam.cz>

Hello 
can you help me please ? 

i could not find version of owrt, which fit to router netis 2880 

i checked specs and it would be able to run it 
64 MB RAM and 16 MB flash, Mediatek cpu



i founded only buid for 2780 and 2881 and this is different


thank you very much

Have a nice day 

Jan B?lohl?vek



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20180725/8c3dee08/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From xinglp at gmail.com  Thu Jul 26 03:49:13 2018
From: xinglp at gmail.com (xinglp)
Date: Thu, 26 Jul 2018 15:49:13 +0800
Subject: [OpenWrt-Devel] 'fw3' failed to connect to ubus
Message-ID: <CAHQM783-7Y-yEvbicjzAgLVe2ACv05-xj0SysrVUSgOzb0jLGw@mail.gmail.com>

Since update to ubus-2018-07-25-884be451.tar.xz and
libubox-2018-06-25-c83a84af.tar.xz, I got this error. The firewall not
set properly because of it.

root at xxxxx:~# fw3 flush
Warning: Failed to connect to ubus
Warning: Unable to locate ipset utility, disabling ipset support
Warning: Section 'zone_lan' cannot resolve device of network 'lan'
Warning: Section 'zone_wan' cannot resolve device of network 'wan'
Warning: Section 'zone_wan' cannot resolve device of network 'wan6'
Warning: Section 'zone_wan' cannot resolve device of network '6to4'
 * Flushing IPv4 filter table
 * Flushing IPv4 nat table
 * Flushing IPv4 mangle table
 * Flushing IPv6 filter table
 * Flushing IPv6 mangle table
 * Flushing conntrack table ...

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From jo at mein.io  Thu Jul 26 04:33:00 2018
From: jo at mein.io (Jo-Philipp Wich)
Date: Thu, 26 Jul 2018 10:33:00 +0200
Subject: [OpenWrt-Devel] 'fw3' failed to connect to ubus
In-Reply-To: <CAHQM783-7Y-yEvbicjzAgLVe2ACv05-xj0SysrVUSgOzb0jLGw@mail.gmail.com>
References: <CAHQM783-7Y-yEvbicjzAgLVe2ACv05-xj0SysrVUSgOzb0jLGw@mail.gmail.com>
Message-ID: <988303e0-6ed6-aa1e-844c-d910fd4f4cd0@mein.io>

Hi,

see https://bugs.openwrt.org/index.php?do=details&task_id=1693 - fixed
with https://git.openwrt.org/3ee2c76ae0 (https://git.openwrt.org/aa8846bb10)

Regards,
Jo

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From wong.syrone at gmail.com  Thu Jul 26 10:38:57 2018
From: wong.syrone at gmail.com (wong.syrone at gmail.com)
Date: Thu, 26 Jul 2018 22:38:57 +0800
Subject: [OpenWrt-Devel] [PATCH] toolchain/gcc: add config symbol to
 determine how to apply path remapping
Message-ID: <20180726143857.13311-1-wong.syrone@gmail.com>

From: Syrone Wong <wong.syrone at gmail.com>

Added boolean symbol for GCC 8 and higher, when we add newer GCC, we don't have
to modify rules.mk to keep things consistant.

Fixes: da9d760 ("rules.mk: replace iremap when using GCC 8")

Signed-off-by: Syrone Wong <wong.syrone at gmail.com>
---
 rules.mk                     | 6 +++---
 toolchain/gcc/Config.version | 5 +++++
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/rules.mk b/rules.mk
index d90e0ffed0..2af6352016 100644
--- a/rules.mk
+++ b/rules.mk
@@ -140,10 +140,10 @@ else
 endif
 
 ifeq ($(or $(CONFIG_EXTERNAL_TOOLCHAIN),$(CONFIG_GCC_VERSION_4_8),$(CONFIG_TARGET_uml)),)
-  iremap = -iremap$(1):$(2)
-  # just overwrite iremap for GCC 8.1 and higher to keep backward compatibility
-  ifeq ($(CONFIG_GCC_VERSION_8),y)
+  ifeq ($(CONFIG_GCC_USE_EMBEDDED_PATH_REMAP),y)
     iremap = -fmacro-prefix-map=$(1)=$(2)
+  else
+    iremap = -iremap$(1):$(2)
   endif
 endif
 
diff --git a/toolchain/gcc/Config.version b/toolchain/gcc/Config.version
index 97c5e50dad..6413e85219 100644
--- a/toolchain/gcc/Config.version
+++ b/toolchain/gcc/Config.version
@@ -10,6 +10,11 @@ config GCC_VERSION_8
 	default y if GCC_USE_VERSION_8
 	bool
 
+config GCC_USE_EMBEDDED_PATH_REMAP
+	default y if GCC_VERSION_8
+	default n
+	bool
+
 config GCC_VERSION
 	string
 	default "5.5.0"		if GCC_VERSION_5
-- 
2.18.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From wong.syrone at gmail.com  Thu Jul 26 10:46:38 2018
From: wong.syrone at gmail.com (wong.syrone at gmail.com)
Date: Thu, 26 Jul 2018 22:46:38 +0800
Subject: [OpenWrt-Devel] [PATCH 1/2] libpcap: update to 1.9.0
Message-ID: <20180726144639.14491-1-wong.syrone@gmail.com>

From: Syrone Wong <wong.syrone at gmail.com>

001-Fix-compiler_state_t.ai-usage-when-INET6-is-not-defi.patch dropped due to upstream
002-Add-missing-compiler_state_t-parameter.patch dropped due to upstream

202-protocol_api.patch dropped due to implemented upstream by another way
upstream commit: https://github.com/the-tcpdump-group/libpcap/commit/55c690f6f834b4762697d7a134de439c9096c921
and renamed via: https://github.com/the-tcpdump-group/libpcap/commit/697b1f7e9b1d6f5a5be04f821d7c5dc62458bb3b

ead is the only user who use the protocol api, we have to use the new api since libpcap 1.9.0

Signed-off-by: Syrone Wong <wong.syrone at gmail.com>
---
 package/libs/libpcap/Makefile                 |   4 +-
 ...te_t.ai-usage-when-INET6-is-not-defi.patch |  41 -----
 ...d-missing-compiler_state_t-parameter.patch |  67 ---------
 .../patches/100-debian_shared_lib.patch       |  81 +++++-----
 .../102-makefile_disable_manpages.patch       |   9 +-
 .../103-makefile_flex_workaround.patch        |   8 +-
 .../patches/201-space_optimization.patch      |   2 +-
 .../libpcap/patches/202-protocol_api.patch    | 142 ------------------
 .../libpcap/patches/204-usb-bus-path.patch    |   2 +-
 9 files changed, 50 insertions(+), 306 deletions(-)
 delete mode 100644 package/libs/libpcap/patches/001-Fix-compiler_state_t.ai-usage-when-INET6-is-not-defi.patch
 delete mode 100644 package/libs/libpcap/patches/002-Add-missing-compiler_state_t-parameter.patch
 delete mode 100644 package/libs/libpcap/patches/202-protocol_api.patch

diff --git a/package/libs/libpcap/Makefile b/package/libs/libpcap/Makefile
index e702d5c059..1c0fb8e694 100644
--- a/package/libs/libpcap/Makefile
+++ b/package/libs/libpcap/Makefile
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libpcap
-PKG_VERSION:=1.8.1
+PKG_VERSION:=1.9.0
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://www.us.tcpdump.org/release/ \
         http://www.tcpdump.org/release/
-PKG_HASH:=673dbc69fdc3f5a86fb5759ab19899039a8e5e6c631749e48dcd9c6f0c83541e
+PKG_HASH:=2edb88808e5913fdaa8e9c1fcaf272e19b2485338742b5074b9fe44d68f37019
 PKG_FIXUP:=patch-libtool
 
 PKG_MAINTAINER:=Felix Fietkau <nbd at nbd.name>
diff --git a/package/libs/libpcap/patches/001-Fix-compiler_state_t.ai-usage-when-INET6-is-not-defi.patch b/package/libs/libpcap/patches/001-Fix-compiler_state_t.ai-usage-when-INET6-is-not-defi.patch
deleted file mode 100644
index edb6ae5667..0000000000
--- a/package/libs/libpcap/patches/001-Fix-compiler_state_t.ai-usage-when-INET6-is-not-defi.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 64aa033a061c43fc15c711f2490ae41d23b868c3 Mon Sep 17 00:00:00 2001
-From: Fabio Berton <fabio.berton at ossystems.com.br>
-Date: Thu, 17 Nov 2016 09:44:42 -0200
-Subject: [PATCH 1/2] Fix compiler_state_t.ai usage when INET6 is not defined
-Organization: O.S. Systems Software LTDA.
-
-Fix error:
-
-/
-| ../libpcap-1.8.1/gencode.c: In function 'pcap_compile':
-| ../libpcap-1.8.1/gencode.c:693:8: error: 'compiler_state_t
-| {aka struct _compiler_state}' has no member named 'ai'
-|   cstate.ai = NULL;
-\
-
-Upstream-Status: Submitted [1]
-
-[1] https://github.com/the-tcpdump-group/libpcap/pull/541
-
-Signed-off-by: Fabio Berton <fabio.berton at ossystems.com.br>
----
- gencode.c | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/gencode.c b/gencode.c
-index a887f27..e103c70 100644
---- a/gencode.c
-+++ b/gencode.c
-@@ -690,7 +690,9 @@ pcap_compile(pcap_t *p, struct bpf_program *program,
- 	}
- 	initchunks(&cstate);
- 	cstate.no_optimize = 0;
-+#ifdef INET6
- 	cstate.ai = NULL;
-+#endif
- 	cstate.ic.root = NULL;
- 	cstate.ic.cur_mark = 0;
- 	cstate.bpf_pcap = p;
--- 
-2.1.4
-
diff --git a/package/libs/libpcap/patches/002-Add-missing-compiler_state_t-parameter.patch b/package/libs/libpcap/patches/002-Add-missing-compiler_state_t-parameter.patch
deleted file mode 100644
index 032b265f05..0000000000
--- a/package/libs/libpcap/patches/002-Add-missing-compiler_state_t-parameter.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-From 50ec0a088d5924a8305b2d70dcba71b0942dee1a Mon Sep 17 00:00:00 2001
-From: Fabio Berton <fabio.berton at ossystems.com.br>
-Date: Thu, 17 Nov 2016 09:47:29 -0200
-Subject: [PATCH 2/2] Add missing compiler_state_t parameter
-Organization: O.S. Systems Software LTDA.
-
-Fix error:
-
-/
-|../libpcap-1.8.1/gencode.c: In function 'gen_gateway':
-|../libpcap-1.8.1/gencode.c:4914:13: error: 'cstate' undeclared
-| (first use in this function)
-|    bpf_error(cstate, "direction applied to 'gateway'");
-\
-
-Upstream-Status: Submitted [1]
-
-[1] https://github.com/the-tcpdump-group/libpcap/pull/541
-
-Signed-off-by: Fabio Berton <fabio.berton at ossystems.com.br>
----
- gencode.c | 15 ++++++++-------
- 1 file changed, 8 insertions(+), 7 deletions(-)
-
-diff --git a/gencode.c b/gencode.c
-index e103c70..f07c0be 100644
---- a/gencode.c
-+++ b/gencode.c
-@@ -523,7 +523,7 @@ static struct block *gen_host6(compiler_state_t *, struct in6_addr *,
-     struct in6_addr *, int, int, int);
- #endif
- #ifndef INET6
--static struct block *gen_gateway(const u_char *, bpf_u_int32 **, int, int);
-+static struct block *gen_gateway(compiler_state_t *, const u_char *, bpf_u_int32 **, int, int);
- #endif
- static struct block *gen_ipfrag(compiler_state_t *);
- static struct block *gen_portatom(compiler_state_t *, int, bpf_int32);
-@@ -4904,11 +4904,12 @@ gen_host6(compiler_state_t *cstate, struct in6_addr *addr,
- 
- #ifndef INET6
- static struct block *
--gen_gateway(eaddr, alist, proto, dir)
--	const u_char *eaddr;
--	bpf_u_int32 **alist;
--	int proto;
--	int dir;
-+gen_gateway(cstate, eaddr, alist, proto, dir)
-+    compiler_state_t *cstate;
-+    const u_char *eaddr;
-+    bpf_u_int32 **alist;
-+    int proto;
-+    int dir;
- {
- 	struct block *b0, *b1, *tmp;
- 
-@@ -6472,7 +6473,7 @@ gen_scode(compiler_state_t *cstate, const char *name, struct qual q)
- 		alist = pcap_nametoaddr(name);
- 		if (alist == NULL || *alist == NULL)
- 			bpf_error(cstate, "unknown host '%s'", name);
--		b = gen_gateway(eaddr, alist, proto, dir);
-+		b = gen_gateway(cstate, eaddr, alist, proto, dir);
- 		free(eaddr);
- 		return b;
- #else
--- 
-2.1.4
-
diff --git a/package/libs/libpcap/patches/100-debian_shared_lib.patch b/package/libs/libpcap/patches/100-debian_shared_lib.patch
index 59d15e6602..9eb38dde7e 100644
--- a/package/libs/libpcap/patches/100-debian_shared_lib.patch
+++ b/package/libs/libpcap/patches/100-debian_shared_lib.patch
@@ -3,7 +3,7 @@ build a shared library.
 
 --- a/Makefile.in
 +++ b/Makefile.in
-@@ -38,6 +38,13 @@ mandir = @mandir@
+@@ -40,6 +40,13 @@ mandir = @mandir@
  srcdir = @srcdir@
  VPATH = @srcdir@
  
@@ -17,17 +17,17 @@ build a shared library.
  #
  # You shouldn't need to edit anything below.
  #
-@@ -62,7 +69,8 @@ DEPENDENCY_CFLAG = @DEPENDENCY_CFLAG@
- PROG=libpcap
+@@ -69,7 +76,8 @@ INSTALL_RPCAPD=@INSTALL_RPCAPD@
+ EXTRA_NETWORK_LIBS=@EXTRA_NETWORK_LIBS@
  
- # Standard CFLAGS
--FULL_CFLAGS = $(CCOPT) $(INCLS) $(DEFS) $(CFLAGS)
-+FULL_CFLAGS = $(CCOPT) $(INCLS) $(DEFS) $(CFLAGS) $(CPPFLAGS)
+ # Standard CFLAGS for building members of a shared library
+-FULL_CFLAGS = $(CCOPT) $(SHLIB_CCOPT) $(INCLS) $(DEFS) $(CFLAGS)
++FULL_CFLAGS = $(CCOPT) $(SHLIB_CCOPT) $(INCLS) $(DEFS) $(CFLAGS) $(CPPFLAGS)
 +CFLAGS_SHARED = -shared -Wl,-soname,$(SHAREDLIB)
  
  INSTALL = @INSTALL@
  INSTALL_PROGRAM = @INSTALL_PROGRAM@
-@@ -77,7 +85,11 @@ YACC = @YACC@
+@@ -84,7 +92,11 @@ YACC = @YACC@
  # problem if you don't own the file but can write to the directory.
  .c.o:
  	@rm -f $@
@@ -38,9 +38,9 @@ build a shared library.
 +	@rm -f $@
 +	$(CC) -fPIC $(FULL_CFLAGS) -c -o $@ $(srcdir)/$*.c
  
- PSRC =	pcap- at V_PCAP@.c @USB_SRC@ @BT_SRC@ @BT_MONITOR_SRC@ @NETFILTER_SRC@ @DBUS_SRC@
+ PSRC =	pcap- at V_PCAP@.c @USB_SRC@ @BT_SRC@ @BT_MONITOR_SRC@ @NETFILTER_SRC@ @DBUS_SRC@ @NETMAP_SRC@ @RDMA_SRC@
  FSRC =  @V_FINDALLDEVS@
-@@ -93,6 +105,7 @@ SRC =	$(PSRC) $(FSRC) $(CSRC) $(SSRC) $(
+@@ -101,6 +113,7 @@ SRC =	$(PSRC) $(FSRC) $(CSRC) $(SSRC) $(
  # We would like to say "OBJ = $(SRC:.c=.o)" but Ultrix's make cannot
  # hack the extra indirection
  OBJ =	$(PSRC:.c=.o) $(FSRC:.c=.o) $(CSRC:.c=.o) $(SSRC:.c=.o) $(GENSRC:.c=.o) $(LIBOBJS)
@@ -48,16 +48,16 @@ build a shared library.
  PUBHDR = \
  	pcap.h \
  	pcap-bpf.h \
-@@ -157,7 +170,7 @@ TAGFILES = \
+@@ -154,7 +167,7 @@ TAGFILES = \
  
- CLEANFILES = $(OBJ) libpcap.* $(TESTS) \
+ CLEANFILES = $(OBJ) libpcap.a libpcap.so.`cat $(srcdir)/VERSION` \
  	$(PROG)-`cat $(srcdir)/VERSION`.tar.gz $(GENSRC) $(GENHDR) \
--	lex.yy.c pcap-config
-+	lex.yy.c pcap-config $(OBJ_PIC)
+-	lex.yy.c pcap-config libpcap.pc
++	lex.yy.c pcap-config libpcap.pc $(OBJ_PIC)
  
  MAN1 = pcap-config.1
  
-@@ -365,7 +378,7 @@ libpcap.a: $(OBJ)
+@@ -386,7 +399,7 @@ libpcap.a: $(OBJ)
  	$(AR) rc $@ $(OBJ) $(ADDLARCHIVEOBJS)
  	$(RANLIB) $@
  
@@ -66,7 +66,7 @@ build a shared library.
  
  libpcap.so: $(OBJ)
  	@rm -f $@
-@@ -443,6 +456,12 @@ libpcap.shareda: $(OBJ)
+@@ -462,6 +475,12 @@ libpcap.shareda: $(OBJ)
  #
  libpcap.none:
  
@@ -79,44 +79,37 @@ build a shared library.
  scanner.c: $(srcdir)/scanner.l
  	$(LEX) -P pcap_ --header-file=scanner.h --nounput -o scanner.c $<
  scanner.h: scanner.c
-@@ -455,6 +474,9 @@ scanner.h: scanner.c
+@@ -474,6 +493,9 @@ scanner.h: scanner.c
  scanner.o: scanner.c grammar.h
  	$(CC) $(FULL_CFLAGS) -c scanner.c
  
 +scanner_pic.o: scanner.c grammar.h
 +	$(CC) -fPIC $(FULL_CFLAGS) -o $@ -c scanner.c
 +
- pcap.o: pcap_version.h
- 
  grammar.c: $(srcdir)/grammar.y
-@@ -472,9 +494,16 @@ grammar.o: grammar.c
+ 	$(YACC) -p pcap_ -o grammar.c -d $<
+ grammar.h: grammar.c
+@@ -486,6 +508,9 @@ grammar.h: grammar.c
+ grammar.o: grammar.c scanner.h
+ 	$(CC) $(FULL_CFLAGS) -c grammar.c
+ 
++grammar_pic.o: grammar.c scanner.h
++	$(CC) -fPIC $(FULL_CFLAGS) -o $@ -c grammar.c
++
  gencode.o: $(srcdir)/gencode.c grammar.h scanner.h
  	$(CC) $(FULL_CFLAGS) -c $(srcdir)/gencode.c
  
-+grammar_pic.o: grammar.c
-+	@rm -f $@
-+	$(CC) -fPIC $(FULL_CFLAGS) -Dyylval=pcap_lval -o $@ -c grammar.c
-+
- version.o: version.c
- 	$(CC) $(FULL_CFLAGS) -c version.c
- 
-+version_pic.o: version.c
-+	$(CC) -fPIC $(FULL_CFLAGS) -c version.c -o $@
-+
- snprintf.o: $(srcdir)/missing/snprintf.c
- 	$(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/snprintf.c
- 
-@@ -501,6 +530,9 @@ bpf_filter.c: $(srcdir)/bpf/net/bpf_filt
- bpf_filter.o: bpf_filter.c
- 	$(CC) $(FULL_CFLAGS) -c bpf_filter.c
+@@ -524,6 +549,9 @@ pcap-config: $(srcdir)/pcap-config.in ./
+ 	mv $@.tmp $@
+ 	chmod a+x $@
  
 +bpf_filter_pic.o: bpf_filter.c
 +	$(CC) -fPIC $(FULL_CFLAGS) -c bpf_filter.c -o $@
 +
  #
- # Generate the pcap-config script.
+ # Remote pcap daemon.
  #
-@@ -623,14 +655,11 @@ install: install-shared install-archive
+@@ -614,14 +642,11 @@ install: install-shared install-archive
  		    $(DESTDIR)$(mandir)/man at MAN_MISC_INFO@/`echo $$i | sed 's/.manmisc.in/. at MAN_MISC_INFO@/'`; done
  
  install-shared: install-shared-$(DYEXT)
@@ -136,27 +129,27 @@ build a shared library.
  	    (mkdir -p $(DESTDIR)$(libdir); chmod 755 $(DESTDIR)$(libdir))
 --- a/aclocal.m4
 +++ b/aclocal.m4
-@@ -470,7 +470,7 @@ AC_DEFUN(AC_LBL_SHLIBS_INIT,
+@@ -507,7 +507,7 @@ AC_DEFUN(AC_LBL_SHLIBS_INIT,
  			esac
  			;;
  		    esac
--		    V_CCOPT="$V_CCOPT $PIC_OPT"
-+		    V_CCOPT="$V_CCOPT"
+-		    V_SHLIB_CCOPT="$V_SHLIB_CCOPT $PIC_OPT"
++		    V_SHLIB_CCOPT="$V_SHLIB_CCOPT"
  		    V_SONAME_OPT="-Wl,-soname,"
  		    V_RPATH_OPT="-Wl,-rpath,"
  		    ;;
-@@ -533,7 +533,7 @@ AC_DEFUN(AC_LBL_SHLIBS_INIT,
+@@ -570,7 +570,7 @@ AC_DEFUN(AC_LBL_SHLIBS_INIT,
  		    #
  		    # "cc" is GCC.
  		    #
--		    V_CCOPT="$V_CCOPT -fpic"
-+		    V_CCOPT="$V_CCOPT"
+-		    V_SHLIB_CCOPT="$V_SHLIB_CCOPT -fpic"
++		    V_SHLIB_CCOPT="$V_SHLIB_CCOPT"
  		    V_SHLIB_CMD="\$(CC)"
  		    V_SHLIB_OPT="-shared"
  		    V_SONAME_OPT="-Wl,-soname,"
 --- a/pcap-config.in
 +++ b/pcap-config.in
-@@ -36,16 +36,6 @@ do
+@@ -41,16 +41,6 @@ do
  	esac
  	shift
  done
diff --git a/package/libs/libpcap/patches/102-makefile_disable_manpages.patch b/package/libs/libpcap/patches/102-makefile_disable_manpages.patch
index c2326b95be..60850df801 100644
--- a/package/libs/libpcap/patches/102-makefile_disable_manpages.patch
+++ b/package/libs/libpcap/patches/102-makefile_disable_manpages.patch
@@ -1,6 +1,6 @@
 --- a/Makefile.in
 +++ b/Makefile.in
-@@ -589,70 +589,12 @@ install: install-shared install-archive
+@@ -573,14 +573,6 @@ install: install-shared install-archive
  	    (mkdir -p $(DESTDIR)$(includedir); chmod 755 $(DESTDIR)$(includedir))
  	[ -d $(DESTDIR)$(includedir)/pcap ] || \
  	    (mkdir -p $(DESTDIR)$(includedir)/pcap; chmod 755 $(DESTDIR)$(includedir)/pcap)
@@ -15,9 +15,10 @@
  	for i in $(PUBHDR); do \
  		$(INSTALL_DATA) $(srcdir)/$$i \
  		    $(DESTDIR)$(includedir)/$$i; done
- 	[ -d $(DESTDIR)$(bindir) ] || \
- 	    (mkdir -p $(DESTDIR)$(bindir); chmod 755 $(DESTDIR)$(bindir))
- 	$(INSTALL_PROGRAM) pcap-config $(DESTDIR)$(bindir)/pcap-config
+@@ -590,56 +582,6 @@ install: install-shared install-archive
+ 	[ -d $(DESTDIR)$(libdir)/pkgconfig ] || \
+ 	    (mkdir -p $(DESTDIR)$(libdir)/pkgconfig; chmod 755 $(DESTDIR)$(libdir)/pkgconfig)
+ 	$(INSTALL_DATA) libpcap.pc $(DESTDIR)$(libdir)/pkgconfig/libpcap.pc
 -	for i in $(MAN1); do \
 -		$(INSTALL_DATA) $(srcdir)/$$i \
 -		    $(DESTDIR)$(mandir)/man1/$$i; done
diff --git a/package/libs/libpcap/patches/103-makefile_flex_workaround.patch b/package/libs/libpcap/patches/103-makefile_flex_workaround.patch
index 5eb6d3fd42..93e07c69c2 100644
--- a/package/libs/libpcap/patches/103-makefile_flex_workaround.patch
+++ b/package/libs/libpcap/patches/103-makefile_flex_workaround.patch
@@ -3,12 +3,12 @@
 
 --- a/Makefile.in
 +++ b/Makefile.in
-@@ -56,7 +56,7 @@ LN_S = @LN_S@
- MKDEP = @MKDEP@
+@@ -59,7 +59,7 @@ MKDEP = @MKDEP@
  CCOPT = @V_CCOPT@
+ SHLIB_CCOPT = @V_SHLIB_CCOPT@
  INCLS = -I. @V_INCLS@
--DEFS = -DBUILDING_PCAP @DEFS@ @V_DEFS@
-+DEFS = -DBUILDING_PCAP -D_BSD_SOURCE @DEFS@ @V_DEFS@
+-DEFS = -DBUILDING_PCAP -Dpcap_EXPORTS @DEFS@ @V_DEFS@
++DEFS = -DBUILDING_PCAP -D_BSD_SOURCE -Dpcap_EXPORTS @DEFS@ @V_DEFS@
  ADDLOBJS = @ADDLOBJS@
  ADDLARCHIVEOBJS = @ADDLARCHIVEOBJS@
  LIBS = @LIBS@
diff --git a/package/libs/libpcap/patches/201-space_optimization.patch b/package/libs/libpcap/patches/201-space_optimization.patch
index b0a91bb0ef..4bec6148f6 100644
--- a/package/libs/libpcap/patches/201-space_optimization.patch
+++ b/package/libs/libpcap/patches/201-space_optimization.patch
@@ -1,6 +1,6 @@
 --- a/pcap-common.c
 +++ b/pcap-common.c
-@@ -1447,14 +1447,23 @@ swap_pseudo_headers(int linktype, struct
+@@ -1524,14 +1524,23 @@ swap_pseudo_headers(int linktype, struct
  		break;
  
  	case DLT_USB_LINUX:
diff --git a/package/libs/libpcap/patches/202-protocol_api.patch b/package/libs/libpcap/patches/202-protocol_api.patch
deleted file mode 100644
index 711dc5ce99..0000000000
--- a/package/libs/libpcap/patches/202-protocol_api.patch
+++ /dev/null
@@ -1,142 +0,0 @@
-This API extension is used by ead (Emergency Access Daemon)
-
---- a/pcap-linux.c
-+++ b/pcap-linux.c
-@@ -425,7 +425,7 @@ static int	iface_get_id(int fd, const ch
- static int	iface_get_mtu(int fd, const char *device, char *ebuf);
- static int 	iface_get_arptype(int fd, const char *device, char *ebuf);
- #ifdef HAVE_PF_PACKET_SOCKETS
--static int 	iface_bind(int fd, int ifindex, char *ebuf);
-+static int 	iface_bind(int fd, int ifindex, char *ebuf, unsigned short proto);
- #ifdef IW_MODE_MONITOR
- static int	has_wext(int sock_fd, const char *device, char *ebuf);
- #endif /* IW_MODE_MONITOR */
-@@ -1059,7 +1059,7 @@ pcap_can_set_rfmon_linux(pcap_t *handle)
- 	 * (We assume that if we have Wireless Extensions support
- 	 * we also have PF_PACKET support.)
- 	 */
--	sock_fd = socket(PF_PACKET, SOCK_RAW, htons(ETH_P_ALL));
-+	sock_fd = socket(PF_PACKET, SOCK_RAW, p->opt.proto);
- 	if (sock_fd == -1) {
- 		(void)pcap_snprintf(handle->errbuf, PCAP_ERRBUF_SIZE,
- 		    "socket: %s", pcap_strerror(errno));
-@@ -1456,6 +1456,9 @@ pcap_activate_linux(pcap_t *handle)
- 	handle->read_op = pcap_read_linux;
- 	handle->stats_op = pcap_stats_linux;
- 
-+	if (handle->opt.proto < 0)
-+		handle->opt.proto = (int) htons(ETH_P_ALL);
-+
- 	/*
- 	 * The "any" device is a special device which causes us not
- 	 * to bind to a particular device and thus to look at all
-@@ -3335,8 +3338,8 @@ activate_new(pcap_t *handle)
- 	 * try a SOCK_RAW socket for the raw interface.
- 	 */
- 	sock_fd = is_any_device ?
--		socket(PF_PACKET, SOCK_DGRAM, htons(ETH_P_ALL)) :
--		socket(PF_PACKET, SOCK_RAW, htons(ETH_P_ALL));
-+		socket(PF_PACKET, SOCK_DGRAM, handle->opt.proto) :
-+		socket(PF_PACKET, SOCK_RAW, handle->opt.proto);
- 
- 	if (sock_fd == -1) {
- 		if (errno == EINVAL || errno == EAFNOSUPPORT) {
-@@ -3454,7 +3457,7 @@ activate_new(pcap_t *handle)
- 				return PCAP_ERROR;
- 			}
- 			sock_fd = socket(PF_PACKET, SOCK_DGRAM,
--			    htons(ETH_P_ALL));
-+			    handle->opt.proto);
- 			if (sock_fd == -1) {
- 				pcap_snprintf(handle->errbuf, PCAP_ERRBUF_SIZE,
- 				    "socket: %s", pcap_strerror(errno));
-@@ -3518,7 +3521,7 @@ activate_new(pcap_t *handle)
- 		}
- 
- 		if ((err = iface_bind(sock_fd, handlep->ifindex,
--		    handle->errbuf)) != 1) {
-+		    handle->errbuf, handle->opt.proto)) != 1) {
- 		    	close(sock_fd);
- 			if (err < 0)
- 				return err;
-@@ -5271,7 +5274,7 @@ iface_get_id(int fd, const char *device,
-  *  or a PCAP_ERROR_ value on a hard error.
-  */
- static int
--iface_bind(int fd, int ifindex, char *ebuf)
-+iface_bind(int fd, int ifindex, char *ebuf, unsigned short proto)
- {
- 	struct sockaddr_ll	sll;
- 	int			err;
-@@ -5280,7 +5283,7 @@ iface_bind(int fd, int ifindex, char *eb
- 	memset(&sll, 0, sizeof(sll));
- 	sll.sll_family		= AF_PACKET;
- 	sll.sll_ifindex		= ifindex;
--	sll.sll_protocol	= htons(ETH_P_ALL);
-+	sll.sll_protocol	= proto;
- 
- 	if (bind(fd, (struct sockaddr *) &sll, sizeof(sll)) == -1) {
- 		if (errno == ENETDOWN) {
-@@ -6325,7 +6328,7 @@ activate_old(pcap_t *handle)
- 
- 	/* Open the socket */
- 
--	handle->fd = socket(PF_INET, SOCK_PACKET, htons(ETH_P_ALL));
-+	handle->fd = socket(PF_INET, SOCK_PACKET, handle->opt.proto);
- 	if (handle->fd == -1) {
- 		pcap_snprintf(handle->errbuf, PCAP_ERRBUF_SIZE,
- 			 "socket: %s", pcap_strerror(errno));
---- a/pcap.c
-+++ b/pcap.c
-@@ -578,6 +578,7 @@ pcap_create_common(char *ebuf, size_t si
- 	p->opt.promisc = 0;
- 	p->opt.rfmon = 0;
- 	p->opt.immediate = 0;
-+	p->opt.proto = -1;
- 	p->opt.tstamp_type = -1;	/* default to not setting time stamp type */
- 	p->opt.tstamp_precision = PCAP_TSTAMP_PRECISION_MICRO;
- 
-@@ -771,6 +772,15 @@ pcap_get_tstamp_precision(pcap_t *p)
- }
- 
- int
-+pcap_set_protocol(pcap_t *p, unsigned short proto)
-+{
-+	if (pcap_check_activated(p))
-+		return PCAP_ERROR_ACTIVATED;
-+	p->opt.proto = proto;
-+	return 0;
-+}
-+
-+int
- pcap_activate(pcap_t *p)
- {
- 	int status;
---- a/pcap/pcap.h
-+++ b/pcap/pcap.h
-@@ -68,6 +68,7 @@ extern "C" {
- #define PCAP_VERSION_MINOR 4
- 
- #define PCAP_ERRBUF_SIZE 256
-+#define HAS_PROTO_EXTENSION
- 
- /*
-  * Compatibility for systems that have a bpf.h that
-@@ -287,6 +288,7 @@ PCAP_API int	pcap_set_timeout(pcap_t *,
- PCAP_API int	pcap_set_tstamp_type(pcap_t *, int);
- PCAP_API int	pcap_set_immediate_mode(pcap_t *, int);
- PCAP_API int	pcap_set_buffer_size(pcap_t *, int);
-+PCAP_API int	pcap_set_protocol(pcap_t *, unsigned short);
- PCAP_API int	pcap_set_tstamp_precision(pcap_t *, int);
- PCAP_API int	pcap_get_tstamp_precision(pcap_t *);
- PCAP_API int	pcap_activate(pcap_t *);
---- a/pcap-int.h
-+++ b/pcap-int.h
-@@ -111,6 +111,7 @@ struct pcap_opt {
- 	char	*device;
- 	int	timeout;	/* timeout for buffering */
- 	u_int	buffer_size;
-+	int	proto;		/* protocol for packet socket (linux) */
- 	int	promisc;
- 	int	rfmon;		/* monitor mode */
- 	int	immediate;	/* immediate mode - deliver packets as soon as they arrive */
diff --git a/package/libs/libpcap/patches/204-usb-bus-path.patch b/package/libs/libpcap/patches/204-usb-bus-path.patch
index d29734f0b6..48a807e1fd 100644
--- a/package/libs/libpcap/patches/204-usb-bus-path.patch
+++ b/package/libs/libpcap/patches/204-usb-bus-path.patch
@@ -2,7 +2,7 @@ Fix USB bus path; /proc/bus/usb is deprecated.
 
 --- a/pcap-usb-linux.c
 +++ b/pcap-usb-linux.c
-@@ -71,7 +71,7 @@
+@@ -72,7 +72,7 @@
  #define USB_TEXT_DIR_OLD "/sys/kernel/debug/usbmon"
  #define USB_TEXT_DIR "/sys/kernel/debug/usb/usbmon"
  #define SYS_USB_BUS_DIR "/sys/bus/usb/devices"
-- 
2.18.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From wong.syrone at gmail.com  Thu Jul 26 10:46:39 2018
From: wong.syrone at gmail.com (wong.syrone at gmail.com)
Date: Thu, 26 Jul 2018 22:46:39 +0800
Subject: [OpenWrt-Devel] [PATCH 2/2] ead: use new protocol setting API since
 libpcap 1.9.0
In-Reply-To: <20180726144639.14491-1-wong.syrone@gmail.com>
References: <20180726144639.14491-1-wong.syrone@gmail.com>
Message-ID: <20180726144639.14491-2-wong.syrone@gmail.com>

From: Syrone Wong <wong.syrone at gmail.com>

Dropped the protocol API specific symbol: HAS_PROTO_EXTENSION and
switch to the official API

Signed-off-by: Syrone Wong <wong.syrone at gmail.com>
---
 package/network/services/ead/src/ead.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/package/network/services/ead/src/ead.c b/package/network/services/ead/src/ead.c
index 46a4625b6d..ad97c543c5 100644
--- a/package/network/services/ead/src/ead.c
+++ b/package/network/services/ead/src/ead.c
@@ -145,9 +145,7 @@ ead_open_pcap(const char *ifname, char *errbuf, bool rx)
 	pcap_set_snaplen(p, PCAP_MRU);
 	pcap_set_promisc(p, rx);
 	pcap_set_timeout(p, PCAP_TIMEOUT);
-#ifdef HAS_PROTO_EXTENSION
-	pcap_set_protocol(p, (rx ? htons(ETH_P_IP) : 0));
-#endif
+	pcap_set_protocol_linux(p, (rx ? htons(ETH_P_IP) : 0));
 	pcap_set_buffer_size(p, (rx ? 10 : 1) * PCAP_MRU);
 	pcap_activate(p);
 	set_recv_type(p, rx);
-- 
2.18.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From wong.syrone at gmail.com  Fri Jul 27 06:32:03 2018
From: wong.syrone at gmail.com (wong.syrone at gmail.com)
Date: Fri, 27 Jul 2018 18:32:03 +0800
Subject: [OpenWrt-Devel] [PATCH] toolchain/gcc: update 8.x to 8.2.0
Message-ID: <20180727103203.31979-1-wong.syrone@gmail.com>

From: Syrone Wong <wong.syrone at gmail.com>

This release fixes LTO link-time performance problems and C++ bug introduced in GCC 8.1

Signed-off-by: Syrone Wong <wong.syrone at gmail.com>
---
 toolchain/gcc/Config.version                              | 2 +-
 toolchain/gcc/common.mk                                   | 4 ++--
 .../patches/{8.1.0 => 8.2.0}/002-case_insensitive.patch   | 0
 .../gcc/patches/{8.1.0 => 8.2.0}/010-documentation.patch  | 0
 .../patches/{8.1.0 => 8.2.0}/110-Fix-MIPS-PR-84790.patch  | 0
 .../gcc/patches/{8.1.0 => 8.2.0}/230-musl_libssp.patch    | 0
 .../{8.1.0 => 8.2.0}/300-mips_Os_cpu_rtx_cost_model.patch | 0
 .../{8.1.0 => 8.2.0}/800-arm_v5te_no_ldrd_strd.patch      | 0
 .../{8.1.0 => 8.2.0}/810-arm-softfloat-libgcc.patch       | 0
 .../gcc/patches/{8.1.0 => 8.2.0}/820-libgcc_pic.patch     | 0
 .../{8.1.0 => 8.2.0}/840-armv4_pass_fix-v4bx_to_ld.patch  | 0
 .../patches/{8.1.0 => 8.2.0}/850-use_shared_libgcc.patch  | 0
 .../patches/{8.1.0 => 8.2.0}/851-libgcc_no_compat.patch   | 0
 .../patches/{8.1.0 => 8.2.0}/870-ppc_no_crtsavres.patch   | 2 +-
 .../gcc/patches/{8.1.0 => 8.2.0}/881-no_tm_section.patch  | 0
 .../gcc/patches/{8.1.0 => 8.2.0}/900-bad-mips16-crt.patch | 0
 .../gcc/patches/{8.1.0 => 8.2.0}/910-mbsd_multi.patch     | 8 ++++----
 .../{8.1.0 => 8.2.0}/920-specs_nonfatal_getenv.patch      | 0
 .../{8.1.0 => 8.2.0}/930-fix-mips-noexecstack.patch       | 0
 .../931-libffi-fix-MIPS-softfloat-build-issue.patch       | 0
 ...tools-fix-compilation-when-making-cross-compiler.patch | 0
 21 files changed, 8 insertions(+), 8 deletions(-)
 rename toolchain/gcc/patches/{8.1.0 => 8.2.0}/002-case_insensitive.patch (100%)
 rename toolchain/gcc/patches/{8.1.0 => 8.2.0}/010-documentation.patch (100%)
 rename toolchain/gcc/patches/{8.1.0 => 8.2.0}/110-Fix-MIPS-PR-84790.patch (100%)
 rename toolchain/gcc/patches/{8.1.0 => 8.2.0}/230-musl_libssp.patch (100%)
 rename toolchain/gcc/patches/{8.1.0 => 8.2.0}/300-mips_Os_cpu_rtx_cost_model.patch (100%)
 rename toolchain/gcc/patches/{8.1.0 => 8.2.0}/800-arm_v5te_no_ldrd_strd.patch (100%)
 rename toolchain/gcc/patches/{8.1.0 => 8.2.0}/810-arm-softfloat-libgcc.patch (100%)
 rename toolchain/gcc/patches/{8.1.0 => 8.2.0}/820-libgcc_pic.patch (100%)
 rename toolchain/gcc/patches/{8.1.0 => 8.2.0}/840-armv4_pass_fix-v4bx_to_ld.patch (100%)
 rename toolchain/gcc/patches/{8.1.0 => 8.2.0}/850-use_shared_libgcc.patch (100%)
 rename toolchain/gcc/patches/{8.1.0 => 8.2.0}/851-libgcc_no_compat.patch (100%)
 rename toolchain/gcc/patches/{8.1.0 => 8.2.0}/870-ppc_no_crtsavres.patch (84%)
 rename toolchain/gcc/patches/{8.1.0 => 8.2.0}/881-no_tm_section.patch (100%)
 rename toolchain/gcc/patches/{8.1.0 => 8.2.0}/900-bad-mips16-crt.patch (100%)
 rename toolchain/gcc/patches/{8.1.0 => 8.2.0}/910-mbsd_multi.patch (95%)
 rename toolchain/gcc/patches/{8.1.0 => 8.2.0}/920-specs_nonfatal_getenv.patch (100%)
 rename toolchain/gcc/patches/{8.1.0 => 8.2.0}/930-fix-mips-noexecstack.patch (100%)
 rename toolchain/gcc/patches/{8.1.0 => 8.2.0}/931-libffi-fix-MIPS-softfloat-build-issue.patch (100%)
 rename toolchain/gcc/patches/{8.1.0 => 8.2.0}/960-gotools-fix-compilation-when-making-cross-compiler.patch (100%)

diff --git a/toolchain/gcc/Config.version b/toolchain/gcc/Config.version
index 6413e85219..55a942660e 100644
--- a/toolchain/gcc/Config.version
+++ b/toolchain/gcc/Config.version
@@ -19,5 +19,5 @@ config GCC_VERSION
 	string
 	default "5.5.0"		if GCC_VERSION_5
 	default "arc-2017.09-release"   if GCC_VERSION_7_1_ARC
-	default "8.1.0"		if GCC_VERSION_8
+	default "8.2.0"		if GCC_VERSION_8
 	default "7.3.0"
diff --git a/toolchain/gcc/common.mk b/toolchain/gcc/common.mk
index 1e17620156..b3e1d8edba 100644
--- a/toolchain/gcc/common.mk
+++ b/toolchain/gcc/common.mk
@@ -36,8 +36,8 @@ ifeq ($(PKG_VERSION),7.3.0)
   PKG_HASH:=832ca6ae04636adbb430e865a1451adf6979ab44ca1c8374f61fba65645ce15c
 endif
 
-ifeq ($(PKG_VERSION),8.1.0)
-  PKG_HASH:=1d1866f992626e61349a1ccd0b8d5253816222cdc13390dcfaa74b093aa2b153
+ifeq ($(PKG_VERSION),8.2.0)
+  PKG_HASH:=196c3c04ba2613f893283977e6011b2345d1cd1af9abeac58e916b1aab3e0080
 endif
 
 ifneq ($(CONFIG_GCC_VERSION_7_1_ARC),)
diff --git a/toolchain/gcc/patches/8.1.0/002-case_insensitive.patch b/toolchain/gcc/patches/8.2.0/002-case_insensitive.patch
similarity index 100%
rename from toolchain/gcc/patches/8.1.0/002-case_insensitive.patch
rename to toolchain/gcc/patches/8.2.0/002-case_insensitive.patch
diff --git a/toolchain/gcc/patches/8.1.0/010-documentation.patch b/toolchain/gcc/patches/8.2.0/010-documentation.patch
similarity index 100%
rename from toolchain/gcc/patches/8.1.0/010-documentation.patch
rename to toolchain/gcc/patches/8.2.0/010-documentation.patch
diff --git a/toolchain/gcc/patches/8.1.0/110-Fix-MIPS-PR-84790.patch b/toolchain/gcc/patches/8.2.0/110-Fix-MIPS-PR-84790.patch
similarity index 100%
rename from toolchain/gcc/patches/8.1.0/110-Fix-MIPS-PR-84790.patch
rename to toolchain/gcc/patches/8.2.0/110-Fix-MIPS-PR-84790.patch
diff --git a/toolchain/gcc/patches/8.1.0/230-musl_libssp.patch b/toolchain/gcc/patches/8.2.0/230-musl_libssp.patch
similarity index 100%
rename from toolchain/gcc/patches/8.1.0/230-musl_libssp.patch
rename to toolchain/gcc/patches/8.2.0/230-musl_libssp.patch
diff --git a/toolchain/gcc/patches/8.1.0/300-mips_Os_cpu_rtx_cost_model.patch b/toolchain/gcc/patches/8.2.0/300-mips_Os_cpu_rtx_cost_model.patch
similarity index 100%
rename from toolchain/gcc/patches/8.1.0/300-mips_Os_cpu_rtx_cost_model.patch
rename to toolchain/gcc/patches/8.2.0/300-mips_Os_cpu_rtx_cost_model.patch
diff --git a/toolchain/gcc/patches/8.1.0/800-arm_v5te_no_ldrd_strd.patch b/toolchain/gcc/patches/8.2.0/800-arm_v5te_no_ldrd_strd.patch
similarity index 100%
rename from toolchain/gcc/patches/8.1.0/800-arm_v5te_no_ldrd_strd.patch
rename to toolchain/gcc/patches/8.2.0/800-arm_v5te_no_ldrd_strd.patch
diff --git a/toolchain/gcc/patches/8.1.0/810-arm-softfloat-libgcc.patch b/toolchain/gcc/patches/8.2.0/810-arm-softfloat-libgcc.patch
similarity index 100%
rename from toolchain/gcc/patches/8.1.0/810-arm-softfloat-libgcc.patch
rename to toolchain/gcc/patches/8.2.0/810-arm-softfloat-libgcc.patch
diff --git a/toolchain/gcc/patches/8.1.0/820-libgcc_pic.patch b/toolchain/gcc/patches/8.2.0/820-libgcc_pic.patch
similarity index 100%
rename from toolchain/gcc/patches/8.1.0/820-libgcc_pic.patch
rename to toolchain/gcc/patches/8.2.0/820-libgcc_pic.patch
diff --git a/toolchain/gcc/patches/8.1.0/840-armv4_pass_fix-v4bx_to_ld.patch b/toolchain/gcc/patches/8.2.0/840-armv4_pass_fix-v4bx_to_ld.patch
similarity index 100%
rename from toolchain/gcc/patches/8.1.0/840-armv4_pass_fix-v4bx_to_ld.patch
rename to toolchain/gcc/patches/8.2.0/840-armv4_pass_fix-v4bx_to_ld.patch
diff --git a/toolchain/gcc/patches/8.1.0/850-use_shared_libgcc.patch b/toolchain/gcc/patches/8.2.0/850-use_shared_libgcc.patch
similarity index 100%
rename from toolchain/gcc/patches/8.1.0/850-use_shared_libgcc.patch
rename to toolchain/gcc/patches/8.2.0/850-use_shared_libgcc.patch
diff --git a/toolchain/gcc/patches/8.1.0/851-libgcc_no_compat.patch b/toolchain/gcc/patches/8.2.0/851-libgcc_no_compat.patch
similarity index 100%
rename from toolchain/gcc/patches/8.1.0/851-libgcc_no_compat.patch
rename to toolchain/gcc/patches/8.2.0/851-libgcc_no_compat.patch
diff --git a/toolchain/gcc/patches/8.1.0/870-ppc_no_crtsavres.patch b/toolchain/gcc/patches/8.2.0/870-ppc_no_crtsavres.patch
similarity index 84%
rename from toolchain/gcc/patches/8.1.0/870-ppc_no_crtsavres.patch
rename to toolchain/gcc/patches/8.2.0/870-ppc_no_crtsavres.patch
index a73081493b..ecaf75a476 100644
--- a/toolchain/gcc/patches/8.1.0/870-ppc_no_crtsavres.patch
+++ b/toolchain/gcc/patches/8.2.0/870-ppc_no_crtsavres.patch
@@ -1,6 +1,6 @@
 --- a/gcc/config/rs6000/rs6000.c
 +++ b/gcc/config/rs6000/rs6000.c
-@@ -24424,7 +24424,7 @@ rs6000_savres_strategy (rs6000_stack_t *
+@@ -24501,7 +24501,7 @@ rs6000_savres_strategy (rs6000_stack_t *
    /* Define cutoff for using out-of-line functions to save registers.  */
    if (DEFAULT_ABI == ABI_V4 || TARGET_ELF)
      {
diff --git a/toolchain/gcc/patches/8.1.0/881-no_tm_section.patch b/toolchain/gcc/patches/8.2.0/881-no_tm_section.patch
similarity index 100%
rename from toolchain/gcc/patches/8.1.0/881-no_tm_section.patch
rename to toolchain/gcc/patches/8.2.0/881-no_tm_section.patch
diff --git a/toolchain/gcc/patches/8.1.0/900-bad-mips16-crt.patch b/toolchain/gcc/patches/8.2.0/900-bad-mips16-crt.patch
similarity index 100%
rename from toolchain/gcc/patches/8.1.0/900-bad-mips16-crt.patch
rename to toolchain/gcc/patches/8.2.0/900-bad-mips16-crt.patch
diff --git a/toolchain/gcc/patches/8.1.0/910-mbsd_multi.patch b/toolchain/gcc/patches/8.2.0/910-mbsd_multi.patch
similarity index 95%
rename from toolchain/gcc/patches/8.1.0/910-mbsd_multi.patch
rename to toolchain/gcc/patches/8.2.0/910-mbsd_multi.patch
index 83d41f2f1a..d9802b6d61 100644
--- a/toolchain/gcc/patches/8.1.0/910-mbsd_multi.patch
+++ b/toolchain/gcc/patches/8.2.0/910-mbsd_multi.patch
@@ -27,7 +27,7 @@ Date:   Tue Jul 31 00:52:27 2007 +0000
  static void handle_OPT_d (const char *);
  static void set_std_cxx98 (int);
  static void set_std_cxx11 (int);
-@@ -461,6 +464,12 @@ c_common_handle_option (size_t scode, co
+@@ -459,6 +462,12 @@ c_common_handle_option (size_t scode, co
        flag_no_builtin = !value;
        break;
  
@@ -40,7 +40,7 @@ Date:   Tue Jul 31 00:52:27 2007 +0000
      case OPT_fconstant_string_class_:
        constant_string_class_name = arg;
        break;
-@@ -1110,6 +1119,47 @@ c_common_init (void)
+@@ -1125,6 +1134,47 @@ c_common_init (void)
        return false;
      }
  
@@ -102,7 +102,7 @@ Date:   Tue Jul 31 00:52:27 2007 +0000
  Assume normal C execution environment.
 --- a/gcc/common.opt
 +++ b/gcc/common.opt
-@@ -1547,6 +1547,9 @@ fguess-branch-probability
+@@ -1551,6 +1551,9 @@ fguess-branch-probability
  Common Report Var(flag_guess_branch_prob) Optimization
  Enable guessing of branch probabilities.
  
@@ -126,7 +126,7 @@ Date:   Tue Jul 31 00:52:27 2007 +0000
        opts->x_warn_larger_than = value != -1;
 --- a/gcc/doc/invoke.texi
 +++ b/gcc/doc/invoke.texi
-@@ -7005,6 +7005,17 @@ This option is only supported for C and
+@@ -7012,6 +7012,17 @@ This option is only supported for C and
  @option{-Wall} and by @option{-Wpedantic}, which can be disabled with
  @option{-Wno-pointer-sign}.
  
diff --git a/toolchain/gcc/patches/8.1.0/920-specs_nonfatal_getenv.patch b/toolchain/gcc/patches/8.2.0/920-specs_nonfatal_getenv.patch
similarity index 100%
rename from toolchain/gcc/patches/8.1.0/920-specs_nonfatal_getenv.patch
rename to toolchain/gcc/patches/8.2.0/920-specs_nonfatal_getenv.patch
diff --git a/toolchain/gcc/patches/8.1.0/930-fix-mips-noexecstack.patch b/toolchain/gcc/patches/8.2.0/930-fix-mips-noexecstack.patch
similarity index 100%
rename from toolchain/gcc/patches/8.1.0/930-fix-mips-noexecstack.patch
rename to toolchain/gcc/patches/8.2.0/930-fix-mips-noexecstack.patch
diff --git a/toolchain/gcc/patches/8.1.0/931-libffi-fix-MIPS-softfloat-build-issue.patch b/toolchain/gcc/patches/8.2.0/931-libffi-fix-MIPS-softfloat-build-issue.patch
similarity index 100%
rename from toolchain/gcc/patches/8.1.0/931-libffi-fix-MIPS-softfloat-build-issue.patch
rename to toolchain/gcc/patches/8.2.0/931-libffi-fix-MIPS-softfloat-build-issue.patch
diff --git a/toolchain/gcc/patches/8.1.0/960-gotools-fix-compilation-when-making-cross-compiler.patch b/toolchain/gcc/patches/8.2.0/960-gotools-fix-compilation-when-making-cross-compiler.patch
similarity index 100%
rename from toolchain/gcc/patches/8.1.0/960-gotools-fix-compilation-when-making-cross-compiler.patch
rename to toolchain/gcc/patches/8.2.0/960-gotools-fix-compilation-when-making-cross-compiler.patch
-- 
2.18.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From torbjorn.jansson at mbox200.swipnet.se  Fri Jul 27 08:36:19 2018
From: torbjorn.jansson at mbox200.swipnet.se (Torbjorn Jansson)
Date: Fri, 27 Jul 2018 14:36:19 +0200
Subject: [OpenWrt-Devel] 6rd issues with 18.06-rc2 on ubnt-erx-sfp
Message-ID: <f2b9bb3c-e94b-2cde-a29b-ad3cba9219d2@mbox200.swipnet.se>

Hello

i decided to try to upgrade my erx-sfp from an old snapshot (probably a year or 
so old) to 18.06-rc2.
for the most part it worked out but there is something odd going on with my 6rd 
wan interface and i'm not sure where to start the troubleshooting.

with luci-proto-ipv6 and 6rd packages installed i get a lot of stuff like this 
in syslog:
14:29:07 2018 daemon.notice netifd: wan6 (24771): Command failed: Unknown error
14:29:07 2018 daemon.notice netifd: Interface 'wan6' is now down
14:29:07 2018 daemon.notice netifd: Interface 'wan6' is setting up now
14:29:08 2018 daemon.notice netifd: wan6 (24856): Command failed: Unknown error
14:29:08 2018 daemon.notice netifd: Interface 'wan6' is now down
14:29:08 2018 daemon.notice netifd: Interface 'wan6' is setting up
(dates removed to make log easier to fit in mail without line breaks)

this repeats every second and 6rd interface seems to get ip adress but it is 
not quite working.

plus i noticed under Network -> Interfaces in webinterface i now have two 
similar looking 6rd interfaces.
one named WAN6 and thats the one i created and another one that cant be edited 
that's called WAN_6

WAN6 is listed as protocol: IPv6-over-IPv4 (6rd)
WAN_6 is listed as protocol: Virtual dynamic interface (IPv6-over-IPv4 (6rd))

the last interface must be something new or a problem or something.
it is also that interface that gets the ipv6 addresses.


any idea whats wrong?
or how to find out what command failed in the log?

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From torbjorn.jansson at mbox200.swipnet.se  Fri Jul 27 09:13:00 2018
From: torbjorn.jansson at mbox200.swipnet.se (Torbjorn Jansson)
Date: Fri, 27 Jul 2018 15:13:00 +0200
Subject: [OpenWrt-Devel] openvpn issues with 18.06-rc2 on ubnt-erx-sfp
Message-ID: <69e6cba4-f582-ed5e-bf40-2e11a754427f@mbox200.swipnet.se>

Hi

i got another issue related to my upgrade to 18.06-rc2.

there is something odd going on with openvpn.
first of all syslog contains "IP packet with unknown IP version=15 seen"
some searching indicates this is related to comp-lzo setting in openvpn.

i already have comp-lzo specified in the config file /etc/config/openvpn but 
this appears to not make it all the way to the generated file.
so generated file under /var/etc/openvpn-vpnserver.conf does not contain 
comp-lzo and that is likely why openvpn server complains with:

WARNING: 'comp-lzo' is present in remote config but missing in local config, 
remote='comp-lzo'
when a client connects (there is also a warning about inconsistent link-mtu but 
i suspect thats something else)

according to this page:
https://community.openvpn.net/openvpn/wiki/DeprecatedOptions
comp-lzo a depreciated option and i suspect i should be using "compress lzo" 
instead to make my openvpn 2.3 client happy.


so, how do i fix the comp-lzo setting?

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From torbjorn.jansson at mbox200.swipnet.se  Fri Jul 27 09:34:05 2018
From: torbjorn.jansson at mbox200.swipnet.se (Torbjorn Jansson)
Date: Fri, 27 Jul 2018 15:34:05 +0200
Subject: [OpenWrt-Devel] openvpn issues with 18.06-rc2 on ubnt-erx-sfp
In-Reply-To: <69e6cba4-f582-ed5e-bf40-2e11a754427f@mbox200.swipnet.se>
References: <69e6cba4-f582-ed5e-bf40-2e11a754427f@mbox200.swipnet.se>
Message-ID: <b0225c93-6956-8343-39a8-677aa51127ec@mbox200.swipnet.se>

On 2018-07-27 15:13, Torbjorn Jansson wrote:
> Hi
> 
> i got another issue related to my upgrade to 18.06-rc2.
> 
> there is something odd going on with openvpn.
> first of all syslog contains "IP packet with unknown IP version=15 seen"
> some searching indicates this is related to comp-lzo setting in openvpn.
> 
> i already have comp-lzo specified in the config file /etc/config/openvpn but 
> this appears to not make it all the way to the generated file.
> so generated file under /var/etc/openvpn-vpnserver.conf does not contain 
> comp-lzo and that is likely why openvpn server complains with:
> 
> WARNING: 'comp-lzo' is present in remote config but missing in local config, 
> remote='comp-lzo'
> when a client connects (there is also a warning about inconsistent link-mtu but 
> i suspect thats something else)
> 
> according to this page:
> https://community.openvpn.net/openvpn/wiki/DeprecatedOptions
> comp-lzo a depreciated option and i suspect i should be using "compress lzo" 
> instead to make my openvpn 2.3 client happy.
> 
> 
> so, how do i fix the comp-lzo setting?
> 

i have figured it out but i still think there is something that needs fixing.
i fixed the problem by setting the "compress" setting manualy to "lzo"
this setting is not available via web gui so you have to use uci
like so:
uci set openvpn.vpnserver.compress='lzo'
uci commit openvpn

since comp-lzo is depreciated i think this option should be removed from luci 
web interface and replaced with compress instead.
possibly adding some logic to convert from "comp-lzo yes" to "compress lzo" or 
similar.
or just leave it and let user deal with it, possibly with a note somewhere that 
you may have to do this manually depending on client versions used.

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From nbd at nbd.name  Fri Jul 27 10:46:56 2018
From: nbd at nbd.name (Felix Fietkau)
Date: Fri, 27 Jul 2018 16:46:56 +0200
Subject: [OpenWrt-Devel] [PATCH] hostapd: Fix compile with OpenSSL 1.1.0
 + no deprecated APIs
In-Reply-To: <20180616014039.14842-1-rosenp@gmail.com>
References: <20180616014039.14842-1-rosenp@gmail.com>
Message-ID: <9e94aa88-0543-d371-5902-190f88eede92@nbd.name>

On 2018-06-16 03:40, Rosen Penev wrote:
> Signed-off-by: Rosen Penev <rosenp at gmail.com>
Did you send this patch upstream?

- Felix

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From torbjorn.jansson at mbox200.swipnet.se  Fri Jul 27 11:26:56 2018
From: torbjorn.jansson at mbox200.swipnet.se (Torbjorn Jansson)
Date: Fri, 27 Jul 2018 17:26:56 +0200
Subject: [OpenWrt-Devel] how to add/package kernel module?
Message-ID: <85184f76-f727-1adf-a5af-dbbeeefb2423@mbox200.swipnet.se>

Hello.

Probably over a year ago i built a rasperry pi and made a custom build of 
openwrt and added a small patch for myself to make module for htu21 temp and 
humidity sensor available.

the patch i made i'm not sure if it is correct or not and even if it still 
works with all the changes that has been done but it would be nice to have the 
kernel module (kmod-iio-htu21) built and available as an option preferably in 
some future release.

i use the htu21 kernel module with a small shell script to push the data out to 
an mqtt server for further handling.
there is probably more iio modules that could be useful to others but for now 
i'm happy if i can make a new version of openwrt with the kernel module added 
and preferably also get it included so i don't need a custom build.


below is my old patch.


diff --git a/package/kernel/linux/modules/other.mk 
b/package/kernel/linux/modules/other.mk
index 38b98f3..3770510 100644
--- a/package/kernel/linux/modules/other.mk
+++ b/package/kernel/linux/modules/other.mk
@@ -329,6 +329,29 @@ endef
  $(eval $(call KernelPackage,iio-dht11))


+define KernelPackage/iio-htu21
+  SUBMENU:=$(OTHER_MENU)
+  DEPENDS:=kmod-i2c-core kmod-iio-core
+  TITLE:=Measurement Specialties HTU21 humidity & temperature sensor
+  KCONFIG:= \
+   CONFIG_HTU21 \
+   CONFIG_IIO_MS_SENSORS_I2C
+  FILES:= \
+   $(LINUX_DIR)/drivers/iio/humidity/htu21.ko \
+   $(LINUX_DIR)/drivers/iio/common/ms_sensors/ms_sensors_i2c.ko
+  AUTOLOAD:=$(call AutoLoad,56,htu21)
+endef
+
+define KernelPackage/iio-htu21/description
+ support for the Measurement Specialties HTU21 humidity and
+ temperature sensor.
+ This driver is also used for MS8607 temperature, pressure & humidity
+ sensor
+endef
+
+$(eval $(call KernelPackage,iio-htu21))
+
+
  define KernelPackage/lp
    SUBMENU:=$(OTHER_MENU)
    TITLE:=Parallel port and line printer support

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From andrew at alacrity-ats.com  Fri Jul 27 11:54:09 2018
From: andrew at alacrity-ats.com (Andrew LaCroix)
Date: Fri, 27 Jul 2018 11:54:09 -0400
Subject: [OpenWrt-Devel] MIPS32 cross-compile problem - unknown symbol
Message-ID: <CAEe3rfDeHTpvjWgZk_k3B9C=Nzw2-sqBewsbZumRDoEFqAN6Mw@mail.gmail.com>

Hello -

I'm new to OpenWRT development and I'm in the process of porting an
application from Ubuntu x86 to OpenWRT.

The target platform is MIPS32 (GL-AR150):

   CONFIG_TARGET_ar71xx_generic_Default=y

I have my package compiling and the desired .ko file is produced, but when
I flash the image and attempt to insmod on the target device, I get the
following error:

   Unknown symbol __sync_val_compare_and_swap_4 (err 0)

This makes sense given the warning I see in the compile log:

WARNING: "__sync_val_compare_and_swap_4" [...] undefined!

I've done a fair bit of googling on this, and I can see that this is a
problem with the atomic builtins as described here:

  https://gcc.gnu.org/onlinedocs/gcc-4.1.2/gcc/Atomic-Builtins.html

"Not all operations are supported by all target processors. If a particular
operation cannot be implemented on the target processor, a warning will be
generated and a call an external function will be generated. The external
function will carry the same name as the builtin, with an additional suffix
`_n' where n is the size of the data type."

Can anyone suggest a solution?  I have tried adding "-latomic" and "-lgcc"
to my linker flags, but that is not helping (first option doesn't change
anything, latter option fails).

Thank you,

- Andrew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20180727/b9c06e16/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From ldir at darbyshire-bryant.me.uk  Fri Jul 27 12:57:52 2018
From: ldir at darbyshire-bryant.me.uk (Kevin Darbyshire-Bryant)
Date: Fri, 27 Jul 2018 17:57:52 +0100
Subject: [OpenWrt-Devel] [PATCH] kernel: bump 4.14 to 4.14.58
Message-ID: <20180727165752.59037-1-ldir@darbyshire-bryant.me.uk>

Drop patch that was superseded upstream:
ramips/0036-mtd-fix-cfi-cmdset-0002-erase-status-check.patch

Drop patch that no longer needs to be backported:
backport-4.14/080-net-convert-sock.sk_wmem_alloc-from-atomic_t-to-refc.patch
pending-4.14/900-gen_stats-fix-netlink-stats-padding.patch

Drop patches that have been superceded upstream & can be reverse-applied:
patches-4.14/020-0001-crypto-crypto4xx-remove-bad-list_del.patch
patches-4.14/020-0011-crypto-crypto4xx-fix-crypto4xx_build_pdr-crypto4xx_b.patch
patches-4.14/001-4.15-08-bcm63xx_enet-correct-clock-usage.patch
patches-4.14/001-4.15-09-bcm63xx_enet-do-not-write-to-random-DMA-channel-on-B.patch

Fixes the following CVEs:
- CVE-2018-10876
- CVE-2018-10877
- CVE-2018-10879
- CVE-2018-10880
- CVE-2018-10881
- CVE-2018-10882
- CVE-2018-10883

Refresh patches.

Run-tested: ath79 Archer C7 v2

This is an amalgam of Stijn Tintel's bump to 4.14.56 & my two
subsequent bumps to 4.14.58

Bump to 4.14.56
Signed-off-by: Stijn Tintel <stijn at linux-ipv6.be>
Subsequent bump to 4.14.58
Signed-off-by: Kevin Darbyshire-Bryant <ldir at darbyshire-bryant.me.uk>
---

NOTE - Stijn's bump to 4.14.56 included a big warning
WARNING: EXT4 IMAGES ARE BROKEN WITH THIS KERNEL!!!
Personally not seen any evidence but this needs MORE TESTING!


 include/kernel-version.mk                          |   4 +-
 ...0001-crypto-crypto4xx-remove-bad-list_del.patch |  32 ----
 ...to4xx-remove-unused-definitions-and-write.patch |   2 +-
 ...to4xx-set-CRYPTO_ALG_KERN_DRIVER_ONLY-fla.patch |   2 +-
 ...to4xx-remove-double-assignment-of-pd_uinf.patch |   2 +-
 ...to4xx-enable-AES-RFC3686-ECB-CFB-and-OFB-.patch |   2 +-
 ...pto4xx-refactor-crypto4xx_copy_pkt_to_dst.patch |   2 +-
 ...to4xx-replace-crypto4xx_dev-s-scatter_buf.patch |   8 +-
 ...to4xx-fix-crypto4xx_build_pdr-crypto4xx_b.patch |  84 ----------
 .../802-usb-xhci-force-msi-renesas-xhci.patch      |   2 +-
 .../patches-4.14/910-unaligned_access_hacks.patch  |   2 +-
 ...-add-support-for-performing-fake-doorbell.patch |   2 +-
 ...-4.15-08-bcm63xx_enet-correct-clock-usage.patch | 101 ------------
 ...t-do-not-write-to-random-DMA-channel-on-B.patch |  29 ----
 ...macro-for-controlling-warnings-to-linux-c.patch |   2 +-
 ...-sock.sk_wmem_alloc-from-atomic_t-to-refc.patch | 172 ---------------------
 ...15-netfilter-exit_net-cleanup-check-added.patch |   2 +-
 .../hack-4.14/211-host_tools_portability.patch     |   2 +-
 .../linux/generic/hack-4.14/902-debloat_proc.patch |   2 +-
 ...rocess-negative-stack-offsets-on-stack-tr.patch |   2 +-
 ...-bridge_allow_receiption_on_disabled_port.patch |   4 +-
 ...610-netfilter_match_bypass_default_checks.patch |   6 +-
 .../pending-4.14/630-packet_socket_type.patch      |   6 +-
 .../generic/pending-4.14/834-ledtrig-libata.patch  |  10 +-
 .../900-gen_stats-fix-netlink-stats-padding.patch  |  49 ------
 .../070-qcom-spm-fix-probe-order.patch             |   7 +-
 ...4019-use-v2-of-the-kpss-bringup-mechanism.patch |  15 +-
 ...9-add-cpu-operating-points-for-cpufreq-su.patch |   6 +-
 ...om-ipq4019-fix-cpu0-s-qcom-saw2-reg-value.patch |   7 +-
 .../074-ARM-qcom-Add-IPQ4019-SoC-support.patch     |  12 +-
 ...-phy-qcom-ipq4019-usb-add-binding-documen.patch |   6 -
 ...m-ipq4019-usb-add-driver-for-QCOM-IPQ4019.patch |  16 +-
 ...077-qcom-ipq4019-add-USB-devicetree-nodes.patch |  11 +-
 ...RM-dts-ipq4019-Add-a-few-peripheral-nodes.patch |  35 ++---
 .../079-ARM-dts-ipq4019-fix-PCI-range.patch        |   4 +-
 ...ctrl-msm-fix-gpio-hog-related-boot-issues.patch |   2 +-
 .../081-clk-fix-apss-cpu-overclocking.patch        |  13 +-
 ...-ipq4019-Add-TZ-and-SMEM-reserved-regions.patch |   4 +-
 ...ubi-add-quirk-to-autoload-ubi-on-rt-ac58u.patch |   6 +-
 .../701-dts-ipq4019-add-mdio-node.patch            |   6 +-
 .../702-dts-ipq4019-add-PHY-switch-nodes.patch     |   6 +-
 ...711-dts-ipq4019-add-ethernet-essedma-node.patch |   6 +-
 .../patches-4.14/900-dts-ipq4019-ap-dk01.1.patch   |  12 +-
 .../patches-4.14/0052-net-phy-add-FC.patch         |   2 +-
 ...ci-allow-imod-interval-to-be-configurable.patch |   2 +-
 .../0227-arm-dts-Add-Unielec-U7623-DTS.patch       |  11 --
 .../oxnas/patches-4.14/999-libata-hacks.patch      |   8 +-
 ...td-fix-cfi-cmdset-0002-erase-status-check.patch |  29 ----
 ...0037-mtd-cfi-cmdset-0002-force-word-write.patch |   2 +-
 49 files changed, 97 insertions(+), 662 deletions(-)
 delete mode 100644 target/linux/apm821xx/patches-4.14/020-0001-crypto-crypto4xx-remove-bad-list_del.patch
 delete mode 100644 target/linux/apm821xx/patches-4.14/020-0011-crypto-crypto4xx-fix-crypto4xx_build_pdr-crypto4xx_b.patch
 delete mode 100644 target/linux/brcm63xx/patches-4.14/001-4.15-08-bcm63xx_enet-correct-clock-usage.patch
 delete mode 100644 target/linux/brcm63xx/patches-4.14/001-4.15-09-bcm63xx_enet-do-not-write-to-random-DMA-channel-on-B.patch
 delete mode 100644 target/linux/generic/backport-4.14/080-net-convert-sock.sk_wmem_alloc-from-atomic_t-to-refc.patch
 delete mode 100644 target/linux/generic/pending-4.14/900-gen_stats-fix-netlink-stats-padding.patch
 delete mode 100644 target/linux/ramips/patches-4.14/0036-mtd-fix-cfi-cmdset-0002-erase-status-check.patch

diff --git a/include/kernel-version.mk b/include/kernel-version.mk
index f0d8160e34..c385bf4388 100644
--- a/include/kernel-version.mk
+++ b/include/kernel-version.mk
@@ -5,12 +5,12 @@ LINUX_RELEASE?=1
 LINUX_VERSION-3.18 = .71
 LINUX_VERSION-4.4 = .121
 LINUX_VERSION-4.9 = .111
-LINUX_VERSION-4.14 = .54
+LINUX_VERSION-4.14 = .58
 
 LINUX_KERNEL_HASH-3.18.71 = 5abc9778ad44ce02ed6c8ab52ece8a21c6d20d21f6ed8a19287b4a38a50c1240
 LINUX_KERNEL_HASH-4.4.121 = 44a88268b5088dc326b30c9b9133ac35a9a200b636b7268d08f32abeae6ca729
 LINUX_KERNEL_HASH-4.9.111 = 5966558959dc580f163766f3fdefd7e57c01b2b45d51202d00b3807c253759dd
-LINUX_KERNEL_HASH-4.14.54 = 451642ac28c539a91072f1fb83b1c061d6d44df870ddf5562400ade5e1c4b6c6
+LINUX_KERNEL_HASH-4.14.58 = ff65e03e74d0065622113865314dc5235dd28a96198629ed0381a4ae1dcbdefd
 
 remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
 sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1)))))))
diff --git a/target/linux/apm821xx/patches-4.14/020-0001-crypto-crypto4xx-remove-bad-list_del.patch b/target/linux/apm821xx/patches-4.14/020-0001-crypto-crypto4xx-remove-bad-list_del.patch
deleted file mode 100644
index 8df0937e4d..0000000000
--- a/target/linux/apm821xx/patches-4.14/020-0001-crypto-crypto4xx-remove-bad-list_del.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From a728a196d253530f17da5c86dc7dfbe58c5f7094 Mon Sep 17 00:00:00 2001
-From: Christian Lamparter <chunkeey at googlemail.com>
-Date: Fri, 25 Aug 2017 15:47:14 +0200
-Subject: [PATCH 01/25] crypto: crypto4xx - remove bad list_del
-
-alg entries are only added to the list, after the registration
-was successful. If the registration failed, it was never added
-to the list in the first place.
-
-Signed-off-by: Christian Lamparter <chunkeey at googlemail.com>
-Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
----
- drivers/crypto/amcc/crypto4xx_core.c | 6 ++----
- 1 file changed, 2 insertions(+), 4 deletions(-)
-
---- a/drivers/crypto/amcc/crypto4xx_core.c
-+++ b/drivers/crypto/amcc/crypto4xx_core.c
-@@ -1033,12 +1033,10 @@ int crypto4xx_register_alg(struct crypto
- 			break;
- 		}
- 
--		if (rc) {
--			list_del(&alg->entry);
-+		if (rc)
- 			kfree(alg);
--		} else {
-+		else
- 			list_add_tail(&alg->entry, &sec_dev->alg_list);
--		}
- 	}
- 
- 	return 0;
diff --git a/target/linux/apm821xx/patches-4.14/020-0002-crypto-crypto4xx-remove-unused-definitions-and-write.patch b/target/linux/apm821xx/patches-4.14/020-0002-crypto-crypto4xx-remove-unused-definitions-and-write.patch
index 5983246344..466f0a0a78 100644
--- a/target/linux/apm821xx/patches-4.14/020-0002-crypto-crypto4xx-remove-unused-definitions-and-write.patch
+++ b/target/linux/apm821xx/patches-4.14/020-0002-crypto-crypto4xx-remove-unused-definitions-and-write.patch
@@ -67,7 +67,7 @@ Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
  
 --- a/drivers/crypto/amcc/crypto4xx_core.c
 +++ b/drivers/crypto/amcc/crypto4xx_core.c
-@@ -962,7 +962,7 @@ u32 crypto4xx_build_pd(struct crypto_asy
+@@ -964,7 +964,7 @@ u32 crypto4xx_build_pd(struct crypto_asy
  
  	sa->sa_command_1.bf.hash_crypto_offset = 0;
  	pd->pd_ctl.w = ctx->pd_ctl;
diff --git a/target/linux/apm821xx/patches-4.14/020-0003-crypto-crypto4xx-set-CRYPTO_ALG_KERN_DRIVER_ONLY-fla.patch b/target/linux/apm821xx/patches-4.14/020-0003-crypto-crypto4xx-set-CRYPTO_ALG_KERN_DRIVER_ONLY-fla.patch
index e50a418284..c195b88c2f 100644
--- a/target/linux/apm821xx/patches-4.14/020-0003-crypto-crypto4xx-set-CRYPTO_ALG_KERN_DRIVER_ONLY-fla.patch
+++ b/target/linux/apm821xx/patches-4.14/020-0003-crypto-crypto4xx-set-CRYPTO_ALG_KERN_DRIVER_ONLY-fla.patch
@@ -18,7 +18,7 @@ Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
 
 --- a/drivers/crypto/amcc/crypto4xx_core.c
 +++ b/drivers/crypto/amcc/crypto4xx_core.c
-@@ -1114,7 +1114,9 @@ struct crypto4xx_alg_common crypto4xx_al
+@@ -1116,7 +1116,9 @@ struct crypto4xx_alg_common crypto4xx_al
  		.cra_name 	= "cbc(aes)",
  		.cra_driver_name = "cbc-aes-ppc4xx",
  		.cra_priority 	= CRYPTO4XX_CRYPTO_PRIORITY,
diff --git a/target/linux/apm821xx/patches-4.14/020-0005-crypto-crypto4xx-remove-double-assignment-of-pd_uinf.patch b/target/linux/apm821xx/patches-4.14/020-0005-crypto-crypto4xx-remove-double-assignment-of-pd_uinf.patch
index 4fc3617576..03c402d975 100644
--- a/target/linux/apm821xx/patches-4.14/020-0005-crypto-crypto4xx-remove-double-assignment-of-pd_uinf.patch
+++ b/target/linux/apm821xx/patches-4.14/020-0005-crypto-crypto4xx-remove-double-assignment-of-pd_uinf.patch
@@ -14,7 +14,7 @@ Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
 
 --- a/drivers/crypto/amcc/crypto4xx_core.c
 +++ b/drivers/crypto/amcc/crypto4xx_core.c
-@@ -1079,7 +1079,6 @@ static void crypto4xx_bh_tasklet_cb(unsi
+@@ -1081,7 +1081,6 @@ static void crypto4xx_bh_tasklet_cb(unsi
  			pd->pd_ctl.bf.pe_done = 0;
  			crypto4xx_pd_done(core_dev->dev, tail);
  			crypto4xx_put_pd_to_pdr(core_dev->dev, tail);
diff --git a/target/linux/apm821xx/patches-4.14/020-0008-crypto-crypto4xx-enable-AES-RFC3686-ECB-CFB-and-OFB-.patch b/target/linux/apm821xx/patches-4.14/020-0008-crypto-crypto4xx-enable-AES-RFC3686-ECB-CFB-and-OFB-.patch
index 9977c60d26..d19a41ec13 100644
--- a/target/linux/apm821xx/patches-4.14/020-0008-crypto-crypto4xx-enable-AES-RFC3686-ECB-CFB-and-OFB-.patch
+++ b/target/linux/apm821xx/patches-4.14/020-0008-crypto-crypto4xx-enable-AES-RFC3686-ECB-CFB-and-OFB-.patch
@@ -109,7 +109,7 @@ Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
  #include <crypto/sha.h>
  #include "crypto4xx_reg_def.h"
  #include "crypto4xx_core.h"
-@@ -1133,6 +1134,103 @@ struct crypto4xx_alg_common crypto4xx_al
+@@ -1135,6 +1136,103 @@ struct crypto4xx_alg_common crypto4xx_al
  			}
  		}
  	}},
diff --git a/target/linux/apm821xx/patches-4.14/020-0009-crypto-crypto4xx-refactor-crypto4xx_copy_pkt_to_dst.patch b/target/linux/apm821xx/patches-4.14/020-0009-crypto-crypto4xx-refactor-crypto4xx_copy_pkt_to_dst.patch
index c6ccade8c1..e74ed7f56b 100644
--- a/target/linux/apm821xx/patches-4.14/020-0009-crypto-crypto4xx-refactor-crypto4xx_copy_pkt_to_dst.patch
+++ b/target/linux/apm821xx/patches-4.14/020-0009-crypto-crypto4xx-refactor-crypto4xx_copy_pkt_to_dst.patch
@@ -27,7 +27,7 @@ Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
  #include "crypto4xx_reg_def.h"
  #include "crypto4xx_core.h"
  #include "crypto4xx_sa.h"
-@@ -481,111 +482,44 @@ static inline struct ce_sd *crypto4xx_ge
+@@ -483,111 +484,44 @@ static inline struct ce_sd *crypto4xx_ge
  	return  (struct ce_sd *)(dev->sdr + sizeof(struct ce_sd) * idx);
  }
  
diff --git a/target/linux/apm821xx/patches-4.14/020-0010-crypto-crypto4xx-replace-crypto4xx_dev-s-scatter_buf.patch b/target/linux/apm821xx/patches-4.14/020-0010-crypto-crypto4xx-replace-crypto4xx_dev-s-scatter_buf.patch
index 90a6dab2d7..5ca3faa4dc 100644
--- a/target/linux/apm821xx/patches-4.14/020-0010-crypto-crypto4xx-replace-crypto4xx_dev-s-scatter_buf.patch
+++ b/target/linux/apm821xx/patches-4.14/020-0010-crypto-crypto4xx-replace-crypto4xx_dev-s-scatter_buf.patch
@@ -17,7 +17,7 @@ Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
 
 --- a/drivers/crypto/amcc/crypto4xx_core.c
 +++ b/drivers/crypto/amcc/crypto4xx_core.c
-@@ -394,10 +394,9 @@ static u32 crypto4xx_build_sdr(struct cr
+@@ -396,10 +396,9 @@ static u32 crypto4xx_build_sdr(struct cr
  	if (!dev->sdr)
  		return -ENOMEM;
  
@@ -29,7 +29,7 @@ Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
  			&dev->scatter_buffer_pa, GFP_ATOMIC);
  	if (!dev->scatter_buffer_va) {
  		dma_free_coherent(dev->core_dev->device,
-@@ -410,7 +409,7 @@ static u32 crypto4xx_build_sdr(struct cr
+@@ -412,7 +411,7 @@ static u32 crypto4xx_build_sdr(struct cr
  
  	for (i = 0; i < PPC4XX_NUM_SD; i++) {
  		sd_array[i].ptr = dev->scatter_buffer_pa +
@@ -38,9 +38,9 @@ Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
  	}
  
  	return 0;
-@@ -425,7 +424,7 @@ static void crypto4xx_destroy_sdr(struct
+@@ -427,7 +426,7 @@ static void crypto4xx_destroy_sdr(struct
  
- 	if (dev->scatter_buffer_va != NULL)
+ 	if (dev->scatter_buffer_va)
  		dma_free_coherent(dev->core_dev->device,
 -				  dev->scatter_buffer_size * PPC4XX_NUM_SD,
 +				  PPC4XX_SD_BUFFER_SIZE * PPC4XX_NUM_SD,
diff --git a/target/linux/apm821xx/patches-4.14/020-0011-crypto-crypto4xx-fix-crypto4xx_build_pdr-crypto4xx_b.patch b/target/linux/apm821xx/patches-4.14/020-0011-crypto-crypto4xx-fix-crypto4xx_build_pdr-crypto4xx_b.patch
deleted file mode 100644
index 837fbdc547..0000000000
--- a/target/linux/apm821xx/patches-4.14/020-0011-crypto-crypto4xx-fix-crypto4xx_build_pdr-crypto4xx_b.patch
+++ /dev/null
@@ -1,84 +0,0 @@
-From 5d59ad6eea82ef8df92b4109615a0dde9d8093e9 Mon Sep 17 00:00:00 2001
-From: Christian Lamparter <chunkeey at googlemail.com>
-Date: Fri, 25 Aug 2017 15:47:24 +0200
-Subject: [PATCH 11/25] crypto: crypto4xx - fix crypto4xx_build_pdr,
- crypto4xx_build_sdr leak
-
-If one of the later memory allocations in rypto4xx_build_pdr()
-fails: dev->pdr (and/or) dev->pdr_uinfo wouldn't be freed.
-
-crypto4xx_build_sdr() has the same issue with dev->sdr.
-
-Signed-off-by: Christian Lamparter <chunkeey at googlemail.com>
-Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
----
- drivers/crypto/amcc/crypto4xx_core.c | 17 +++++++++--------
- 1 file changed, 9 insertions(+), 8 deletions(-)
-
---- a/drivers/crypto/amcc/crypto4xx_core.c
-+++ b/drivers/crypto/amcc/crypto4xx_core.c
-@@ -209,7 +209,7 @@ static u32 crypto4xx_build_pdr(struct cr
- 				  dev->pdr_pa);
- 		return -ENOMEM;
- 	}
--	memset(dev->pdr, 0,  sizeof(struct ce_pd) * PPC4XX_NUM_PD);
-+	memset(dev->pdr, 0, sizeof(struct ce_pd) * PPC4XX_NUM_PD);
- 	dev->shadow_sa_pool = dma_alloc_coherent(dev->core_dev->device,
- 				   256 * PPC4XX_NUM_PD,
- 				   &dev->shadow_sa_pool_pa,
-@@ -242,13 +242,15 @@ static u32 crypto4xx_build_pdr(struct cr
- 
- static void crypto4xx_destroy_pdr(struct crypto4xx_device *dev)
- {
--	if (dev->pdr != NULL)
-+	if (dev->pdr)
- 		dma_free_coherent(dev->core_dev->device,
- 				  sizeof(struct ce_pd) * PPC4XX_NUM_PD,
- 				  dev->pdr, dev->pdr_pa);
-+
- 	if (dev->shadow_sa_pool)
- 		dma_free_coherent(dev->core_dev->device, 256 * PPC4XX_NUM_PD,
- 				  dev->shadow_sa_pool, dev->shadow_sa_pool_pa);
-+
- 	if (dev->shadow_sr_pool)
- 		dma_free_coherent(dev->core_dev->device,
- 			sizeof(struct sa_state_record) * PPC4XX_NUM_PD,
-@@ -417,12 +419,12 @@ static u32 crypto4xx_build_sdr(struct cr
- 
- static void crypto4xx_destroy_sdr(struct crypto4xx_device *dev)
- {
--	if (dev->sdr != NULL)
-+	if (dev->sdr)
- 		dma_free_coherent(dev->core_dev->device,
- 				  sizeof(struct ce_sd) * PPC4XX_NUM_SD,
- 				  dev->sdr, dev->sdr_pa);
- 
--	if (dev->scatter_buffer_va != NULL)
-+	if (dev->scatter_buffer_va)
- 		dma_free_coherent(dev->core_dev->device,
- 				  PPC4XX_SD_BUFFER_SIZE * PPC4XX_NUM_SD,
- 				  dev->scatter_buffer_va,
-@@ -1223,7 +1225,7 @@ static int crypto4xx_probe(struct platfo
- 
- 	rc = crypto4xx_build_gdr(core_dev->dev);
- 	if (rc)
--		goto err_build_gdr;
-+		goto err_build_pdr;
- 
- 	rc = crypto4xx_build_sdr(core_dev->dev);
- 	if (rc)
-@@ -1266,12 +1268,11 @@ err_iomap:
- err_request_irq:
- 	irq_dispose_mapping(core_dev->irq);
- 	tasklet_kill(&core_dev->tasklet);
--	crypto4xx_destroy_sdr(core_dev->dev);
- err_build_sdr:
-+	crypto4xx_destroy_sdr(core_dev->dev);
- 	crypto4xx_destroy_gdr(core_dev->dev);
--err_build_gdr:
--	crypto4xx_destroy_pdr(core_dev->dev);
- err_build_pdr:
-+	crypto4xx_destroy_pdr(core_dev->dev);
- 	kfree(core_dev->dev);
- err_alloc_dev:
- 	kfree(core_dev);
diff --git a/target/linux/apm821xx/patches-4.14/802-usb-xhci-force-msi-renesas-xhci.patch b/target/linux/apm821xx/patches-4.14/802-usb-xhci-force-msi-renesas-xhci.patch
index 3545b99aab..1e781b5dae 100644
--- a/target/linux/apm821xx/patches-4.14/802-usb-xhci-force-msi-renesas-xhci.patch
+++ b/target/linux/apm821xx/patches-4.14/802-usb-xhci-force-msi-renesas-xhci.patch
@@ -44,7 +44,7 @@ produce a noisy warning.
  		hcd->msi_enabled = 1;
 --- a/drivers/usb/host/xhci.h
 +++ b/drivers/usb/host/xhci.h
-@@ -1850,6 +1850,7 @@ struct xhci_hcd {
+@@ -1854,6 +1854,7 @@ struct xhci_hcd {
  	/* support xHCI 0.96 spec USB2 software LPM */
  	unsigned		sw_lpm_support:1;
  	/* support xHCI 1.0 spec USB2 hardware LPM */
diff --git a/target/linux/ath79/patches-4.14/910-unaligned_access_hacks.patch b/target/linux/ath79/patches-4.14/910-unaligned_access_hacks.patch
index 9897679a62..ad9e00dd63 100644
--- a/target/linux/ath79/patches-4.14/910-unaligned_access_hacks.patch
+++ b/target/linux/ath79/patches-4.14/910-unaligned_access_hacks.patch
@@ -737,7 +737,7 @@
  EXPORT_SYMBOL(xfrm_parse_spi);
 --- a/net/ipv4/tcp_input.c
 +++ b/net/ipv4/tcp_input.c
-@@ -3844,14 +3844,16 @@ static bool tcp_parse_aligned_timestamp(
+@@ -3853,14 +3853,16 @@ static bool tcp_parse_aligned_timestamp(
  {
  	const __be32 *ptr = (const __be32 *)(th + 1);
  
diff --git a/target/linux/bcm53xx/patches-4.14/180-usb-xhci-add-support-for-performing-fake-doorbell.patch b/target/linux/bcm53xx/patches-4.14/180-usb-xhci-add-support-for-performing-fake-doorbell.patch
index 3bee392f4f..ac622010ff 100644
--- a/target/linux/bcm53xx/patches-4.14/180-usb-xhci-add-support-for-performing-fake-doorbell.patch
+++ b/target/linux/bcm53xx/patches-4.14/180-usb-xhci-add-support-for-performing-fake-doorbell.patch
@@ -127,7 +127,7 @@ it on BCM4708 family.
  /*
 --- a/drivers/usb/host/xhci.h
 +++ b/drivers/usb/host/xhci.h
-@@ -1831,6 +1831,7 @@ struct xhci_hcd {
+@@ -1835,6 +1835,7 @@ struct xhci_hcd {
  #define XHCI_LIMIT_ENDPOINT_INTERVAL_7	(1 << 26)
  #define XHCI_U2_DISABLE_WAKE	(1 << 27)
  #define XHCI_ASMEDIA_MODIFY_FLOWCONTROL	(1 << 28)
diff --git a/target/linux/brcm63xx/patches-4.14/001-4.15-08-bcm63xx_enet-correct-clock-usage.patch b/target/linux/brcm63xx/patches-4.14/001-4.15-08-bcm63xx_enet-correct-clock-usage.patch
deleted file mode 100644
index bd66e72c91..0000000000
--- a/target/linux/brcm63xx/patches-4.14/001-4.15-08-bcm63xx_enet-correct-clock-usage.patch
+++ /dev/null
@@ -1,101 +0,0 @@
-From d0423d3e4fa7ae305729cb50369427f075ccb279 Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jonas.gorski at gmail.com>
-Date: Sat, 25 Feb 2017 12:41:28 +0100
-Subject: [PATCH 1/6] bcm63xx_enet: correct clock usage
-
-Check the return code of prepare_enable and change one last instance of
-enable only to prepare_enable. Also properly disable and release the
-clock in error paths and on remove for enetsw.
-
-Signed-off-by: Jonas Gorski <jonas.gorski at gmail.com>
----
- drivers/net/ethernet/broadcom/bcm63xx_enet.c | 31 +++++++++++++++++++++-------
- 1 file changed, 23 insertions(+), 8 deletions(-)
-
---- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c
-+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
-@@ -1773,7 +1773,9 @@ static int bcm_enet_probe(struct platfor
- 		ret = PTR_ERR(priv->mac_clk);
- 		goto out;
- 	}
--	clk_prepare_enable(priv->mac_clk);
-+	ret = clk_prepare_enable(priv->mac_clk);
-+	if (ret)
-+		goto out_put_clk_mac;
- 
- 	/* initialize default and fetch platform data */
- 	priv->rx_ring_size = BCMENET_DEF_RX_DESC;
-@@ -1805,9 +1807,11 @@ static int bcm_enet_probe(struct platfor
- 		if (IS_ERR(priv->phy_clk)) {
- 			ret = PTR_ERR(priv->phy_clk);
- 			priv->phy_clk = NULL;
--			goto out_put_clk_mac;
-+			goto out_disable_clk_mac;
- 		}
--		clk_prepare_enable(priv->phy_clk);
-+		ret = clk_prepare_enable(priv->phy_clk);
-+		if (ret)
-+			goto out_put_clk_phy;
- 	}
- 
- 	/* do minimal hardware init to be able to probe mii bus */
-@@ -1901,13 +1905,16 @@ out_free_mdio:
- out_uninit_hw:
- 	/* turn off mdc clock */
- 	enet_writel(priv, 0, ENET_MIISC_REG);
--	if (priv->phy_clk) {
-+	if (priv->phy_clk)
- 		clk_disable_unprepare(priv->phy_clk);
-+
-+out_put_clk_phy:
-+	if (priv->phy_clk)
- 		clk_put(priv->phy_clk);
--	}
- 
--out_put_clk_mac:
-+out_disable_clk_mac:
- 	clk_disable_unprepare(priv->mac_clk);
-+out_put_clk_mac:
- 	clk_put(priv->mac_clk);
- out:
- 	free_netdev(dev);
-@@ -2752,7 +2759,9 @@ static int bcm_enetsw_probe(struct platf
- 		ret = PTR_ERR(priv->mac_clk);
- 		goto out_unmap;
- 	}
--	clk_enable(priv->mac_clk);
-+	ret = clk_prepare_enable(priv->mac_clk);
-+	if (ret)
-+		goto out_put_clk;
- 
- 	priv->rx_chan = 0;
- 	priv->tx_chan = 1;
-@@ -2773,7 +2782,7 @@ static int bcm_enetsw_probe(struct platf
- 
- 	ret = register_netdev(dev);
- 	if (ret)
--		goto out_put_clk;
-+		goto out_disable_clk;
- 
- 	netif_carrier_off(dev);
- 	platform_set_drvdata(pdev, dev);
-@@ -2782,6 +2791,9 @@ static int bcm_enetsw_probe(struct platf
- 
- 	return 0;
- 
-+out_disable_clk:
-+	clk_disable_unprepare(priv->mac_clk);
-+
- out_put_clk:
- 	clk_put(priv->mac_clk);
- 
-@@ -2813,6 +2825,9 @@ static int bcm_enetsw_remove(struct plat
- 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- 	release_mem_region(res->start, resource_size(res));
- 
-+	clk_disable_unprepare(priv->mac_clk);
-+	clk_put(priv->mac_clk);
-+
- 	free_netdev(dev);
- 	return 0;
- }
diff --git a/target/linux/brcm63xx/patches-4.14/001-4.15-09-bcm63xx_enet-do-not-write-to-random-DMA-channel-on-B.patch b/target/linux/brcm63xx/patches-4.14/001-4.15-09-bcm63xx_enet-do-not-write-to-random-DMA-channel-on-B.patch
deleted file mode 100644
index 22b3a732f9..0000000000
--- a/target/linux/brcm63xx/patches-4.14/001-4.15-09-bcm63xx_enet-do-not-write-to-random-DMA-channel-on-B.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 23d94cb855b6f4f0ee1c01679224472104ac6440 Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jonas.gorski at gmail.com>
-Date: Sat, 30 Sep 2017 14:10:18 +0200
-Subject: [PATCH 2/6] bcm63xx_enet: do not write to random DMA channel on
- BCM6345
-
-The DMA controller regs actually point to DMA channel 0, so the write to
-ENETDMA_CFG_REG will actually modify a random DMA channel.
-
-Since DMA controller registers do not exist on BCM6345, guard the write
-with the usual check for dma_has_sram.
-
-Signed-off-by: Jonas Gorski <jonas.gorski at gmail.com>
----
- drivers/net/ethernet/broadcom/bcm63xx_enet.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
---- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c
-+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
-@@ -1062,7 +1062,8 @@ static int bcm_enet_open(struct net_devi
- 	val = enet_readl(priv, ENET_CTL_REG);
- 	val |= ENET_CTL_ENABLE_MASK;
- 	enet_writel(priv, val, ENET_CTL_REG);
--	enet_dma_writel(priv, ENETDMA_CFG_EN_MASK, ENETDMA_CFG_REG);
-+	if (priv->dma_has_sram)
-+		enet_dma_writel(priv, ENETDMA_CFG_EN_MASK, ENETDMA_CFG_REG);
- 	enet_dmac_writel(priv, priv->dma_chan_en_mask,
- 			 ENETDMAC_CHANCFG, priv->rx_chan);
- 
diff --git a/target/linux/generic/backport-4.14/012-kbuild-add-macro-for-controlling-warnings-to-linux-c.patch b/target/linux/generic/backport-4.14/012-kbuild-add-macro-for-controlling-warnings-to-linux-c.patch
index 6b56a68b31..892b65fbc0 100644
--- a/target/linux/generic/backport-4.14/012-kbuild-add-macro-for-controlling-warnings-to-linux-c.patch
+++ b/target/linux/generic/backport-4.14/012-kbuild-add-macro-for-controlling-warnings-to-linux-c.patch
@@ -84,7 +84,7 @@ Signed-off-by: Masahiro Yamada <yamada.masahiro at socionext.com>
 
 --- a/include/linux/compiler-gcc.h
 +++ b/include/linux/compiler-gcc.h
-@@ -343,3 +343,28 @@
+@@ -358,3 +358,28 @@
   * code
   */
  #define uninitialized_var(x) x = x
diff --git a/target/linux/generic/backport-4.14/080-net-convert-sock.sk_wmem_alloc-from-atomic_t-to-refc.patch b/target/linux/generic/backport-4.14/080-net-convert-sock.sk_wmem_alloc-from-atomic_t-to-refc.patch
deleted file mode 100644
index 06d00886f1..0000000000
--- a/target/linux/generic/backport-4.14/080-net-convert-sock.sk_wmem_alloc-from-atomic_t-to-refc.patch
+++ /dev/null
@@ -1,172 +0,0 @@
-From 9bbe60a67be5a1c6f79b3c9be5003481a50529ff Mon Sep 17 00:00:00 2001
-From: David Woodhouse <dwmw2 at infradead.org>
-Date: Sat, 16 Jun 2018 11:55:44 +0100
-Subject: atm: Preserve value of skb->truesize when accounting to vcc
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-ATM accounts for in-flight TX packets in sk_wmem_alloc of the VCC on
-which they are to be sent. But it doesn't take ownership of those
-packets from the sock (if any) which originally owned them. They should
-remain owned by their actual sender until they've left the box.
-
-There's a hack in pskb_expand_head() to avoid adjusting skb->truesize
-for certain skbs, precisely to avoid messing up sk_wmem_alloc
-accounting. Ideally that hack would cover the ATM use case too, but it
-doesn't ? skbs which aren't owned by any sock, for example PPP control
-frames, still get their truesize adjusted when the low-level ATM driver
-adds headroom.
-
-This has always been an issue, it seems. The truesize of a packet
-increases, and sk_wmem_alloc on the VCC goes negative. But this wasn't
-for normal traffic, only for control frames. So I think we just got away
-with it, and we probably needed to send 2GiB of LCP echo frames before
-the misaccounting would ever have caused a problem and caused
-atm_may_send() to start refusing packets.
-
-Commit 14afee4b609 ("net: convert sock.sk_wmem_alloc from atomic_t to
-refcount_t") did exactly what it was intended to do, and turned this
-mostly-theoretical problem into a real one, causing PPPoATM to fail
-immediately as sk_wmem_alloc underflows and atm_may_send() *immediately*
-starts refusing to allow new packets.
-
-The least intrusive solution to this problem is to stash the value of
-skb->truesize that was accounted to the VCC, in a new member of the
-ATM_SKB(skb) structure. Then in atm_pop_raw() subtract precisely that
-value instead of the then-current value of skb->truesize.
-
-Fixes: 158f323b9868 ("net: adjust skb->truesize in pskb_expand_head()")
-Signed-off-by: David Woodhouse <dwmw2 at infradead.org>
-Tested-by: Kevin Darbyshire-Bryant <ldir at darbyshire-bryant.me.uk>
-Signed-off-by: David S. Miller <davem at davemloft.net>
----
- include/linux/atmdev.h | 15 +++++++++++++++
- net/atm/br2684.c       |  3 +--
- net/atm/clip.c         |  3 +--
- net/atm/common.c       |  3 +--
- net/atm/lec.c          |  3 +--
- net/atm/mpc.c          |  3 +--
- net/atm/pppoatm.c      |  3 +--
- net/atm/raw.c          |  4 ++--
- 8 files changed, 23 insertions(+), 14 deletions(-)
-
---- a/include/linux/atmdev.h
-+++ b/include/linux/atmdev.h
-@@ -214,6 +214,7 @@ struct atmphy_ops {
- struct atm_skb_data {
- 	struct atm_vcc	*vcc;		/* ATM VCC */
- 	unsigned long	atm_options;	/* ATM layer options */
-+	unsigned int	acct_truesize;  /* truesize accounted to vcc */
- };
- 
- #define VCC_HTABLE_SIZE 32
-@@ -241,6 +242,20 @@ void vcc_insert_socket(struct sock *sk);
- 
- void atm_dev_release_vccs(struct atm_dev *dev);
- 
-+static inline void atm_account_tx(struct atm_vcc *vcc, struct sk_buff *skb)
-+{
-+	/*
-+	 * Because ATM skbs may not belong to a sock (and we don't
-+	 * necessarily want to), skb->truesize may be adjusted,
-+	 * escaping the hack in pskb_expand_head() which avoids
-+	 * doing so for some cases. So stash the value of truesize
-+	 * at the time we accounted it, and atm_pop_raw() can use
-+	 * that value later, in case it changes.
-+	 */
-+	refcount_add(skb->truesize, &sk_atm(vcc)->sk_wmem_alloc);
-+	ATM_SKB(skb)->acct_truesize = skb->truesize;
-+	ATM_SKB(skb)->atm_options = vcc->atm_options;
-+}
- 
- static inline void atm_force_charge(struct atm_vcc *vcc,int truesize)
- {
---- a/net/atm/br2684.c
-+++ b/net/atm/br2684.c
-@@ -252,8 +252,7 @@ static int br2684_xmit_vcc(struct sk_buf
- 
- 	ATM_SKB(skb)->vcc = atmvcc = brvcc->atmvcc;
- 	pr_debug("atm_skb(%p)->vcc(%p)->dev(%p)\n", skb, atmvcc, atmvcc->dev);
--	refcount_add(skb->truesize, &sk_atm(atmvcc)->sk_wmem_alloc);
--	ATM_SKB(skb)->atm_options = atmvcc->atm_options;
-+	atm_account_tx(atmvcc, skb);
- 	dev->stats.tx_packets++;
- 	dev->stats.tx_bytes += skb->len;
- 
---- a/net/atm/clip.c
-+++ b/net/atm/clip.c
-@@ -381,8 +381,7 @@ static netdev_tx_t clip_start_xmit(struc
- 		memcpy(here, llc_oui, sizeof(llc_oui));
- 		((__be16 *) here)[3] = skb->protocol;
- 	}
--	refcount_add(skb->truesize, &sk_atm(vcc)->sk_wmem_alloc);
--	ATM_SKB(skb)->atm_options = vcc->atm_options;
-+	atm_account_tx(vcc, skb);
- 	entry->vccs->last_use = jiffies;
- 	pr_debug("atm_skb(%p)->vcc(%p)->dev(%p)\n", skb, vcc, vcc->dev);
- 	old = xchg(&entry->vccs->xoff, 1);	/* assume XOFF ... */
---- a/net/atm/common.c
-+++ b/net/atm/common.c
-@@ -630,10 +630,9 @@ int vcc_sendmsg(struct socket *sock, str
- 		goto out;
- 	}
- 	pr_debug("%d += %d\n", sk_wmem_alloc_get(sk), skb->truesize);
--	refcount_add(skb->truesize, &sk->sk_wmem_alloc);
-+	atm_account_tx(vcc, skb);
- 
- 	skb->dev = NULL; /* for paths shared with net_device interfaces */
--	ATM_SKB(skb)->atm_options = vcc->atm_options;
- 	if (!copy_from_iter_full(skb_put(skb, size), size, &m->msg_iter)) {
- 		kfree_skb(skb);
- 		error = -EFAULT;
---- a/net/atm/lec.c
-+++ b/net/atm/lec.c
-@@ -182,9 +182,8 @@ lec_send(struct atm_vcc *vcc, struct sk_
- 	struct net_device *dev = skb->dev;
- 
- 	ATM_SKB(skb)->vcc = vcc;
--	ATM_SKB(skb)->atm_options = vcc->atm_options;
-+	atm_account_tx(vcc, skb);
- 
--	refcount_add(skb->truesize, &sk_atm(vcc)->sk_wmem_alloc);
- 	if (vcc->send(vcc, skb) < 0) {
- 		dev->stats.tx_dropped++;
- 		return;
---- a/net/atm/mpc.c
-+++ b/net/atm/mpc.c
-@@ -555,8 +555,7 @@ static int send_via_shortcut(struct sk_b
- 					sizeof(struct llc_snap_hdr));
- 	}
- 
--	refcount_add(skb->truesize, &sk_atm(entry->shortcut)->sk_wmem_alloc);
--	ATM_SKB(skb)->atm_options = entry->shortcut->atm_options;
-+	atm_account_tx(entry->shortcut, skb);
- 	entry->shortcut->send(entry->shortcut, skb);
- 	entry->packets_fwded++;
- 	mpc->in_ops->put(entry);
---- a/net/atm/pppoatm.c
-+++ b/net/atm/pppoatm.c
-@@ -350,8 +350,7 @@ static int pppoatm_send(struct ppp_chann
- 		return 1;
- 	}
- 
--	refcount_add(skb->truesize, &sk_atm(ATM_SKB(skb)->vcc)->sk_wmem_alloc);
--	ATM_SKB(skb)->atm_options = ATM_SKB(skb)->vcc->atm_options;
-+	atm_account_tx(vcc, skb);
- 	pr_debug("atm_skb(%p)->vcc(%p)->dev(%p)\n",
- 		 skb, ATM_SKB(skb)->vcc, ATM_SKB(skb)->vcc->dev);
- 	ret = ATM_SKB(skb)->vcc->send(ATM_SKB(skb)->vcc, skb)
---- a/net/atm/raw.c
-+++ b/net/atm/raw.c
-@@ -35,8 +35,8 @@ static void atm_pop_raw(struct atm_vcc *
- 	struct sock *sk = sk_atm(vcc);
- 
- 	pr_debug("(%d) %d -= %d\n",
--		 vcc->vci, sk_wmem_alloc_get(sk), skb->truesize);
--	WARN_ON(refcount_sub_and_test(skb->truesize, &sk->sk_wmem_alloc));
-+		 vcc->vci, sk_wmem_alloc_get(sk), ATM_SKB(skb)->acct_truesize);
-+	WARN_ON(refcount_sub_and_test(ATM_SKB(skb)->acct_truesize, &sk->sk_wmem_alloc));
- 	dev_kfree_skb_any(skb);
- 	sk->sk_write_space(sk);
- }
diff --git a/target/linux/generic/backport-4.14/336-v4.15-netfilter-exit_net-cleanup-check-added.patch b/target/linux/generic/backport-4.14/336-v4.15-netfilter-exit_net-cleanup-check-added.patch
index 37975ae038..5c942e3a54 100644
--- a/target/linux/generic/backport-4.14/336-v4.15-netfilter-exit_net-cleanup-check-added.patch
+++ b/target/linux/generic/backport-4.14/336-v4.15-netfilter-exit_net-cleanup-check-added.patch
@@ -62,7 +62,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  static struct pernet_operations nfnl_log_net_ops = {
 --- a/net/netfilter/nfnetlink_queue.c
 +++ b/net/netfilter/nfnetlink_queue.c
-@@ -1512,10 +1512,15 @@ static int __net_init nfnl_queue_net_ini
+@@ -1515,10 +1515,15 @@ static int __net_init nfnl_queue_net_ini
  
  static void __net_exit nfnl_queue_net_exit(struct net *net)
  {
diff --git a/target/linux/generic/hack-4.14/211-host_tools_portability.patch b/target/linux/generic/hack-4.14/211-host_tools_portability.patch
index 59f1479436..d806df8a5f 100644
--- a/target/linux/generic/hack-4.14/211-host_tools_portability.patch
+++ b/target/linux/generic/hack-4.14/211-host_tools_portability.patch
@@ -12,7 +12,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/tools/build/Build.include
 +++ b/tools/build/Build.include
-@@ -97,4 +97,4 @@ cxx_flags = -Wp,-MD,$(depfile) -Wp,-MT,$
+@@ -98,4 +98,4 @@ cxx_flags = -Wp,-MD,$(depfile) -Wp,-MT,$
  ###
  ## HOSTCC C flags
  
diff --git a/target/linux/generic/hack-4.14/902-debloat_proc.patch b/target/linux/generic/hack-4.14/902-debloat_proc.patch
index 3f47d22355..4f5fb7022c 100644
--- a/target/linux/generic/hack-4.14/902-debloat_proc.patch
+++ b/target/linux/generic/hack-4.14/902-debloat_proc.patch
@@ -243,7 +243,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  }
 --- a/mm/vmstat.c
 +++ b/mm/vmstat.c
-@@ -1946,10 +1946,12 @@ void __init init_mm_internals(void)
+@@ -1944,10 +1944,12 @@ void __init init_mm_internals(void)
  	start_shepherd_timer();
  #endif
  #ifdef CONFIG_PROC_FS
diff --git a/target/linux/generic/pending-4.14/102-MIPS-only-process-negative-stack-offsets-on-stack-tr.patch b/target/linux/generic/pending-4.14/102-MIPS-only-process-negative-stack-offsets-on-stack-tr.patch
index cc17053121..b3dc43ea68 100644
--- a/target/linux/generic/pending-4.14/102-MIPS-only-process-negative-stack-offsets-on-stack-tr.patch
+++ b/target/linux/generic/pending-4.14/102-MIPS-only-process-negative-stack-offsets-on-stack-tr.patch
@@ -46,7 +46,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/arch/mips/kernel/process.c
 +++ b/arch/mips/kernel/process.c
-@@ -357,6 +357,8 @@ static inline int is_sp_move_ins(union m
+@@ -358,6 +358,8 @@ static inline int is_sp_move_ins(union m
  
  	if (ip->i_format.opcode == addiu_op ||
  	    ip->i_format.opcode == daddiu_op) {
diff --git a/target/linux/generic/pending-4.14/150-bridge_allow_receiption_on_disabled_port.patch b/target/linux/generic/pending-4.14/150-bridge_allow_receiption_on_disabled_port.patch
index 03267310a0..9fcffdee06 100644
--- a/target/linux/generic/pending-4.14/150-bridge_allow_receiption_on_disabled_port.patch
+++ b/target/linux/generic/pending-4.14/150-bridge_allow_receiption_on_disabled_port.patch
@@ -15,7 +15,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/net/bridge/br_input.c
 +++ b/net/bridge/br_input.c
-@@ -238,7 +238,8 @@ static int br_handle_local_finish(struct
+@@ -239,7 +239,8 @@ static int br_handle_local_finish(struct
  {
  	struct net_bridge_port *p = br_port_get_rcu(skb->dev);
  
@@ -25,7 +25,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  
  	BR_INPUT_SKB_CB(skb)->brdev = p->br->dev;
  	br_pass_frame_up(skb);
-@@ -326,6 +327,15 @@ rx_handler_result_t br_handle_frame(stru
+@@ -327,6 +328,15 @@ rx_handler_result_t br_handle_frame(stru
  
  forward:
  	switch (p->state) {
diff --git a/target/linux/generic/pending-4.14/610-netfilter_match_bypass_default_checks.patch b/target/linux/generic/pending-4.14/610-netfilter_match_bypass_default_checks.patch
index 3611879609..2541230ff5 100644
--- a/target/linux/generic/pending-4.14/610-netfilter_match_bypass_default_checks.patch
+++ b/target/linux/generic/pending-4.14/610-netfilter_match_bypass_default_checks.patch
@@ -68,7 +68,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	if (!xt_percpu_counter_alloc(alloc_state, &e->counters))
  		return -ENOMEM;
  
-@@ -817,6 +845,7 @@ copy_entries_to_user(unsigned int total_
+@@ -818,6 +846,7 @@ copy_entries_to_user(unsigned int total_
  	const struct xt_table_info *private = table->private;
  	int ret = 0;
  	const void *loc_cpu_entry;
@@ -76,7 +76,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  
  	counters = alloc_counters(table);
  	if (IS_ERR(counters))
-@@ -844,6 +873,14 @@ copy_entries_to_user(unsigned int total_
+@@ -845,6 +874,14 @@ copy_entries_to_user(unsigned int total_
  			goto free_counters;
  		}
  
@@ -91,7 +91,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  		for (i = sizeof(struct ipt_entry);
  		     i < e->target_offset;
  		     i += m->u.match_size) {
-@@ -1226,12 +1263,15 @@ compat_copy_entry_to_user(struct ipt_ent
+@@ -1227,12 +1264,15 @@ compat_copy_entry_to_user(struct ipt_ent
  	compat_uint_t origsize;
  	const struct xt_entry_match *ematch;
  	int ret = 0;
diff --git a/target/linux/generic/pending-4.14/630-packet_socket_type.patch b/target/linux/generic/pending-4.14/630-packet_socket_type.patch
index e1736214f5..82e2c51afd 100644
--- a/target/linux/generic/pending-4.14/630-packet_socket_type.patch
+++ b/target/linux/generic/pending-4.14/630-packet_socket_type.patch
@@ -87,7 +87,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	if (!net_eq(dev_net(dev), sock_net(sk)))
  		goto drop;
  
-@@ -3262,6 +3264,7 @@ static int packet_create(struct net *net
+@@ -3260,6 +3262,7 @@ static int packet_create(struct net *net
  	mutex_init(&po->pg_vec_lock);
  	po->rollover = NULL;
  	po->prot_hook.func = packet_rcv;
@@ -95,7 +95,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  
  	if (sock->type == SOCK_PACKET)
  		po->prot_hook.func = packet_rcv_spkt;
-@@ -3875,6 +3878,16 @@ packet_setsockopt(struct socket *sock, i
+@@ -3873,6 +3876,16 @@ packet_setsockopt(struct socket *sock, i
  		po->xmit = val ? packet_direct_xmit : dev_queue_xmit;
  		return 0;
  	}
@@ -112,7 +112,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	default:
  		return -ENOPROTOOPT;
  	}
-@@ -3927,6 +3940,13 @@ static int packet_getsockopt(struct sock
+@@ -3925,6 +3938,13 @@ static int packet_getsockopt(struct sock
  	case PACKET_VNET_HDR:
  		val = po->has_vnet_hdr;
  		break;
diff --git a/target/linux/generic/pending-4.14/834-ledtrig-libata.patch b/target/linux/generic/pending-4.14/834-ledtrig-libata.patch
index 280536e1e6..2eec024b72 100644
--- a/target/linux/generic/pending-4.14/834-ledtrig-libata.patch
+++ b/target/linux/generic/pending-4.14/834-ledtrig-libata.patch
@@ -65,7 +65,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  /**
   *	ata_build_rw_tf - Build ATA taskfile for given read/write request
   *	@tf: Target ATA taskfile
-@@ -5117,6 +5130,9 @@ struct ata_queued_cmd *ata_qc_new_init(s
+@@ -5120,6 +5133,9 @@ struct ata_queued_cmd *ata_qc_new_init(s
  		if (tag < 0)
  			return NULL;
  	}
@@ -75,7 +75,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  
  	qc = __ata_qc_from_tag(ap, tag);
  	qc->tag = tag;
-@@ -6018,6 +6034,9 @@ struct ata_port *ata_port_alloc(struct a
+@@ -6021,6 +6037,9 @@ struct ata_port *ata_port_alloc(struct a
  	ap->stats.unhandled_irq = 1;
  	ap->stats.idle_irq = 1;
  #endif
@@ -85,7 +85,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  	ata_sff_port_init(ap);
  
  	return ap;
-@@ -6039,6 +6058,12 @@ static void ata_host_release(struct devi
+@@ -6042,6 +6061,12 @@ static void ata_host_release(struct devi
  
  		kfree(ap->pmp_link);
  		kfree(ap->slave_link);
@@ -98,7 +98,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  		kfree(ap);
  		host->ports[i] = NULL;
  	}
-@@ -6485,7 +6510,23 @@ int ata_host_register(struct ata_host *h
+@@ -6488,7 +6513,23 @@ int ata_host_register(struct ata_host *h
  		host->ports[i]->print_id = atomic_inc_return(&ata_print_id);
  		host->ports[i]->local_port_no = i + 1;
  	}
@@ -134,7 +134,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  
  /*
   * Define if arch has non-standard setup.  This is a _PCI_ standard
-@@ -889,6 +892,12 @@ struct ata_port {
+@@ -890,6 +893,12 @@ struct ata_port {
  #ifdef CONFIG_ATA_ACPI
  	struct ata_acpi_gtm	__acpi_init_gtm; /* use ata_acpi_init_gtm() */
  #endif
diff --git a/target/linux/generic/pending-4.14/900-gen_stats-fix-netlink-stats-padding.patch b/target/linux/generic/pending-4.14/900-gen_stats-fix-netlink-stats-padding.patch
deleted file mode 100644
index f5ceecca93..0000000000
--- a/target/linux/generic/pending-4.14/900-gen_stats-fix-netlink-stats-padding.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-The gen_stats facility will add a header for the toplevel nlattr of type
-TCA_STATS2 that contains all stats added by qdisc callbacks. A reference
-to this header is stored in the gnet_dump struct, and when all the
-per-qdisc callbacks have finished adding their stats, the length of the
-containing header will be adjusted to the right value.
-
-However, on architectures that need padding (i.e., that don't set
-CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS), the padding nlattr is added
-before the stats, which means that the stored pointer will point to the
-padding, and so when the header is fixed up, the result is just a very
-big padding nlattr. Because most qdiscs also supply the legacy TCA_STATS
-struct, this problem has been mostly invisible, but we exposed it with
-the netlink attribute-based statistics in CAKE.
-
-Fix the issue by fixing up the stored pointer if it points to a padding
-nlattr.
-
-Tested-by: Pete Heist <pete at heistp.net>
-Tested-by: Kevin Darbyshire-Bryant <kevin at darbyshire-bryant.me.uk>
-Signed-off-by: Toke H?iland-J?rgensen <toke at toke.dk>
----
- net/core/gen_stats.c |   16 ++++++++++++++--
- 1 file changed, 14 insertions(+), 2 deletions(-)
-
---- a/net/core/gen_stats.c
-+++ b/net/core/gen_stats.c
-@@ -77,8 +77,20 @@ gnet_stats_start_copy_compat(struct sk_b
- 		d->lock = lock;
- 		spin_lock_bh(lock);
- 	}
--	if (d->tail)
--		return gnet_stats_copy(d, type, NULL, 0, padattr);
-+	if (d->tail) {
-+		int ret = gnet_stats_copy(d, type, NULL, 0, padattr);
-+
-+		/* The initial attribute added in gnet_stats_copy() may be
-+		 * preceded by a padding attribute, in which case d->tail will
-+		 * end up pointing at the padding instead of the real attribute.
-+		 * Fix this so gnet_stats_finish_copy() adjusts the length of
-+		 * the right attribute.
-+		 */
-+		if (ret == 0 && d->tail->nla_type == padattr)
-+			d->tail = (struct nlattr *)((char *)d->tail +
-+						    NLA_ALIGN(d->tail->nla_len));
-+		return ret;
-+	}
- 
- 	return 0;
- }
diff --git a/target/linux/ipq40xx/patches-4.14/070-qcom-spm-fix-probe-order.patch b/target/linux/ipq40xx/patches-4.14/070-qcom-spm-fix-probe-order.patch
index 1e1a83220e..ea8dedb5a4 100644
--- a/target/linux/ipq40xx/patches-4.14/070-qcom-spm-fix-probe-order.patch
+++ b/target/linux/ipq40xx/patches-4.14/070-qcom-spm-fix-probe-order.patch
@@ -12,11 +12,9 @@ Signed-off-by: John Crispin <john at phrozen.org>
  drivers/soc/qcom/spm.c | 3 +++
  1 file changed, 3 insertions(+)
 
-diff --git a/drivers/soc/qcom/spm.c b/drivers/soc/qcom/spm.c
-index f9d7a85b2822..53807e839664 100644
 --- a/drivers/soc/qcom/spm.c
 +++ b/drivers/soc/qcom/spm.c
-@@ -219,6 +219,9 @@ static int __init qcom_cpuidle_init(struct device_node *cpu_node, int cpu)
+@@ -219,6 +219,9 @@ static int __init qcom_cpuidle_init(stru
  	cpumask_t mask;
  	bool use_scm_power_down = false;
  
@@ -26,6 +24,3 @@ index f9d7a85b2822..53807e839664 100644
  	for (i = 0; ; i++) {
  		state_node = of_parse_phandle(cpu_node, "cpu-idle-states", i);
  		if (!state_node)
--- 
-2.11.0
-
diff --git a/target/linux/ipq40xx/patches-4.14/071-qcom-ipq4019-use-v2-of-the-kpss-bringup-mechanism.patch b/target/linux/ipq40xx/patches-4.14/071-qcom-ipq4019-use-v2-of-the-kpss-bringup-mechanism.patch
index f79e99f66f..3cad41ad08 100644
--- a/target/linux/ipq40xx/patches-4.14/071-qcom-ipq4019-use-v2-of-the-kpss-bringup-mechanism.patch
+++ b/target/linux/ipq40xx/patches-4.14/071-qcom-ipq4019-use-v2-of-the-kpss-bringup-mechanism.patch
@@ -13,11 +13,9 @@ Signed-off-by: John Crispin <john at phrozen.org>
  arch/arm/boot/dts/qcom-ipq4019.dtsi | 25 +++++++++++++++++--------
  1 file changed, 17 insertions(+), 8 deletions(-)
 
-diff --git a/arch/arm/boot/dts/qcom-ipq4019.dtsi b/arch/arm/boot/dts/qcom-ipq4019.dtsi
-index 93647db5d90b..06434fd02d40 100644
 --- a/arch/arm/boot/dts/qcom-ipq4019.dtsi
 +++ b/arch/arm/boot/dts/qcom-ipq4019.dtsi
-@@ -52,7 +52,8 @@
+@@ -34,7 +34,8 @@
  		cpu at 0 {
  			device_type = "cpu";
  			compatible = "arm,cortex-a7";
@@ -27,7 +25,7 @@ index 93647db5d90b..06434fd02d40 100644
  			qcom,acc = <&acc0>;
  			qcom,saw = <&saw0>;
  			reg = <0x0>;
-@@ -71,7 +72,8 @@
+@@ -53,7 +54,8 @@
  		cpu at 1 {
  			device_type = "cpu";
  			compatible = "arm,cortex-a7";
@@ -37,7 +35,7 @@ index 93647db5d90b..06434fd02d40 100644
  			qcom,acc = <&acc1>;
  			qcom,saw = <&saw1>;
  			reg = <0x1>;
-@@ -82,7 +84,8 @@
+@@ -64,7 +66,8 @@
  		cpu at 2 {
  			device_type = "cpu";
  			compatible = "arm,cortex-a7";
@@ -47,7 +45,7 @@ index 93647db5d90b..06434fd02d40 100644
  			qcom,acc = <&acc2>;
  			qcom,saw = <&saw2>;
  			reg = <0x2>;
-@@ -93,13 +96,19 @@
+@@ -75,13 +78,19 @@
  		cpu at 3 {
  			device_type = "cpu";
  			compatible = "arm,cortex-a7";
@@ -68,7 +66,7 @@ index 93647db5d90b..06434fd02d40 100644
  	};
  
  	pmu {
-@@ -268,22 +277,22 @@
+@@ -213,22 +222,22 @@
  		};
  
                  acc0: clock-controller at b088000 {
@@ -95,6 +93,3 @@ index 93647db5d90b..06434fd02d40 100644
                          reg = <0x0b0b8000 0x1000>, <0xb008000 0x1000>;
                  };
  
--- 
-2.11.0
-
diff --git a/target/linux/ipq40xx/patches-4.14/072-qcom-ipq4019-add-cpu-operating-points-for-cpufreq-su.patch b/target/linux/ipq40xx/patches-4.14/072-qcom-ipq4019-add-cpu-operating-points-for-cpufreq-su.patch
index 5596e30852..b2f8590dfe 100644
--- a/target/linux/ipq40xx/patches-4.14/072-qcom-ipq4019-add-cpu-operating-points-for-cpufreq-su.patch
+++ b/target/linux/ipq40xx/patches-4.14/072-qcom-ipq4019-add-cpu-operating-points-for-cpufreq-su.patch
@@ -12,10 +12,8 @@ Signed-off-by: John Crispin <john at phrozen.org>
  arch/arm/boot/dts/qcom-ipq4019.dtsi | 34 ++++++++++++++++++++++++++--------
  1 file changed, 26 insertions(+), 8 deletions(-)
 
-Index: linux-4.14.54/arch/arm/boot/dts/qcom-ipq4019.dtsi
-===================================================================
---- linux-4.14.54.orig/arch/arm/boot/dts/qcom-ipq4019.dtsi
-+++ linux-4.14.54/arch/arm/boot/dts/qcom-ipq4019.dtsi
+--- a/arch/arm/boot/dts/qcom-ipq4019.dtsi
++++ b/arch/arm/boot/dts/qcom-ipq4019.dtsi
 @@ -41,14 +41,7 @@
  			reg = <0x0>;
  			clocks = <&gcc GCC_APPS_CLK_SRC>;
diff --git a/target/linux/ipq40xx/patches-4.14/073-qcom-ipq4019-fix-cpu0-s-qcom-saw2-reg-value.patch b/target/linux/ipq40xx/patches-4.14/073-qcom-ipq4019-fix-cpu0-s-qcom-saw2-reg-value.patch
index e92ead5ee2..103705944a 100644
--- a/target/linux/ipq40xx/patches-4.14/073-qcom-ipq4019-fix-cpu0-s-qcom-saw2-reg-value.patch
+++ b/target/linux/ipq40xx/patches-4.14/073-qcom-ipq4019-fix-cpu0-s-qcom-saw2-reg-value.patch
@@ -20,11 +20,9 @@ Signed-off-by: John Crispin <john at phrozen.org>
  arch/arm/boot/dts/qcom-ipq4019.dtsi | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
-diff --git a/arch/arm/boot/dts/qcom-ipq4019.dtsi b/arch/arm/boot/dts/qcom-ipq4019.dtsi
-index 98b9850ed2a0..3289b3a6c10e 100644
 --- a/arch/arm/boot/dts/qcom-ipq4019.dtsi
 +++ b/arch/arm/boot/dts/qcom-ipq4019.dtsi
-@@ -316,7 +316,7 @@
+@@ -261,7 +261,7 @@
  
                  saw0: regulator at b089000 {
                          compatible = "qcom,saw2";
@@ -33,6 +31,3 @@ index 98b9850ed2a0..3289b3a6c10e 100644
                          regulator;
                  };
  
--- 
-2.11.0
-
diff --git a/target/linux/ipq40xx/patches-4.14/074-ARM-qcom-Add-IPQ4019-SoC-support.patch b/target/linux/ipq40xx/patches-4.14/074-ARM-qcom-Add-IPQ4019-SoC-support.patch
index cdecd14293..b3a83957ad 100644
--- a/target/linux/ipq40xx/patches-4.14/074-ARM-qcom-Add-IPQ4019-SoC-support.patch
+++ b/target/linux/ipq40xx/patches-4.14/074-ARM-qcom-Add-IPQ4019-SoC-support.patch
@@ -12,10 +12,8 @@ Signed-off-by: John Crispin <john at phrozen.org>
  arch/arm/mach-qcom/Kconfig | 5 +++++
  2 files changed, 6 insertions(+)
 
-Index: linux-4.14.54/arch/arm/Makefile
-===================================================================
---- linux-4.14.54.orig/arch/arm/Makefile
-+++ linux-4.14.54/arch/arm/Makefile
+--- a/arch/arm/Makefile
++++ b/arch/arm/Makefile
 @@ -150,6 +150,7 @@ endif
  textofs-$(CONFIG_ARCH_MSM8X60) := 0x00208000
  textofs-$(CONFIG_ARCH_MSM8960) := 0x00208000
@@ -24,10 +22,8 @@ Index: linux-4.14.54/arch/arm/Makefile
  
  # Machine directory name.  This list is sorted alphanumerically
  # by CONFIG_* macro name.
-Index: linux-4.14.54/arch/arm/mach-qcom/Kconfig
-===================================================================
---- linux-4.14.54.orig/arch/arm/mach-qcom/Kconfig
-+++ linux-4.14.54/arch/arm/mach-qcom/Kconfig
+--- a/arch/arm/mach-qcom/Kconfig
++++ b/arch/arm/mach-qcom/Kconfig
 @@ -27,4 +27,9 @@ config ARCH_MDM9615
  	bool "Enable support for MDM9615"
  	select CLKSRC_QCOM
diff --git a/target/linux/ipq40xx/patches-4.14/075-dt-bindings-phy-qcom-ipq4019-usb-add-binding-documen.patch b/target/linux/ipq40xx/patches-4.14/075-dt-bindings-phy-qcom-ipq4019-usb-add-binding-documen.patch
index 6710caf657..e7407bcbab 100644
--- a/target/linux/ipq40xx/patches-4.14/075-dt-bindings-phy-qcom-ipq4019-usb-add-binding-documen.patch
+++ b/target/linux/ipq40xx/patches-4.14/075-dt-bindings-phy-qcom-ipq4019-usb-add-binding-documen.patch
@@ -12,9 +12,6 @@ Signed-off-by: John Crispin <john at phrozen.org>
  1 file changed, 21 insertions(+)
  create mode 100644 Documentation/devicetree/bindings/phy/phy-qcom-ipq4019-usb.txt
 
-diff --git a/Documentation/devicetree/bindings/phy/phy-qcom-ipq4019-usb.txt b/Documentation/devicetree/bindings/phy/phy-qcom-ipq4019-usb.txt
-new file mode 100644
-index 000000000000..362877fcafed
 --- /dev/null
 +++ b/Documentation/devicetree/bindings/phy/phy-qcom-ipq4019-usb.txt
 @@ -0,0 +1,21 @@
@@ -39,6 +36,3 @@ index 000000000000..362877fcafed
 +		 <&gcc USB2_HSPHY_S_ARES>;
 +	reset-names = "por_rst", "srif_rst";
 +};
--- 
-2.11.0
-
diff --git a/target/linux/ipq40xx/patches-4.14/076-phy-qcom-ipq4019-usb-add-driver-for-QCOM-IPQ4019.patch b/target/linux/ipq40xx/patches-4.14/076-phy-qcom-ipq4019-usb-add-driver-for-QCOM-IPQ4019.patch
index 4cab66b677..f93c80f52e 100644
--- a/target/linux/ipq40xx/patches-4.14/076-phy-qcom-ipq4019-usb-add-driver-for-QCOM-IPQ4019.patch
+++ b/target/linux/ipq40xx/patches-4.14/076-phy-qcom-ipq4019-usb-add-driver-for-QCOM-IPQ4019.patch
@@ -15,10 +15,8 @@ Signed-off-by: John Crispin <john at phrozen.org>
  3 files changed, 196 insertions(+)
  create mode 100644 drivers/phy/qualcomm/phy-qcom-ipq4019-usb.c
 
-Index: linux-4.14.54/drivers/phy/qualcomm/Kconfig
-===================================================================
---- linux-4.14.54.orig/drivers/phy/qualcomm/Kconfig
-+++ linux-4.14.54/drivers/phy/qualcomm/Kconfig
+--- a/drivers/phy/qualcomm/Kconfig
++++ b/drivers/phy/qualcomm/Kconfig
 @@ -8,6 +8,13 @@ config PHY_QCOM_APQ8064_SATA
  	depends on OF
  	select GENERIC_PHY
@@ -33,10 +31,8 @@ Index: linux-4.14.54/drivers/phy/qualcomm/Kconfig
  config PHY_QCOM_IPQ806X_SATA
  	tristate "Qualcomm IPQ806x SATA SerDes/PHY driver"
  	depends on ARCH_QCOM
-Index: linux-4.14.54/drivers/phy/qualcomm/phy-qcom-ipq4019-usb.c
-===================================================================
 --- /dev/null
-+++ linux-4.14.54/drivers/phy/qualcomm/phy-qcom-ipq4019-usb.c
++++ b/drivers/phy/qualcomm/phy-qcom-ipq4019-usb.c
 @@ -0,0 +1,188 @@
 +/*
 + * Copyright (C) 2018 John Crispin <john at phrozen.org>
@@ -226,10 +222,8 @@ Index: linux-4.14.54/drivers/phy/qualcomm/phy-qcom-ipq4019-usb.c
 +MODULE_DESCRIPTION("QCOM/IPQ4019 USB phy driver");
 +MODULE_AUTHOR("John Crispin <john at phrozen.org>");
 +MODULE_LICENSE("GPL v2");
-Index: linux-4.14.54/drivers/phy/qualcomm/Makefile
-===================================================================
---- linux-4.14.54.orig/drivers/phy/qualcomm/Makefile
-+++ linux-4.14.54/drivers/phy/qualcomm/Makefile
+--- a/drivers/phy/qualcomm/Makefile
++++ b/drivers/phy/qualcomm/Makefile
 @@ -1,5 +1,6 @@
  # SPDX-License-Identifier: GPL-2.0
  obj-$(CONFIG_PHY_QCOM_APQ8064_SATA)	+= phy-qcom-apq8064-sata.o
diff --git a/target/linux/ipq40xx/patches-4.14/077-qcom-ipq4019-add-USB-devicetree-nodes.patch b/target/linux/ipq40xx/patches-4.14/077-qcom-ipq4019-add-USB-devicetree-nodes.patch
index 7cc7d9d5f4..1f0a81bf68 100644
--- a/target/linux/ipq40xx/patches-4.14/077-qcom-ipq4019-add-USB-devicetree-nodes.patch
+++ b/target/linux/ipq40xx/patches-4.14/077-qcom-ipq4019-add-USB-devicetree-nodes.patch
@@ -11,11 +11,9 @@ Signed-off-by: John Crispin <john at phrozen.org>
  arch/arm/boot/dts/qcom-ipq4019.dtsi           | 74 +++++++++++++++++++++++++++
  2 files changed, 94 insertions(+)
 
-diff --git a/arch/arm/boot/dts/qcom-ipq4019-ap.dk01.1.dtsi b/arch/arm/boot/dts/qcom-ipq4019-ap.dk01.1.dtsi
-index 418f9a022336..2ee5f05d5a43 100644
 --- a/arch/arm/boot/dts/qcom-ipq4019-ap.dk01.1.dtsi
 +++ b/arch/arm/boot/dts/qcom-ipq4019-ap.dk01.1.dtsi
-@@ -109,5 +109,25 @@
+@@ -101,5 +101,25 @@
  		wifi at a800000 {
  			status = "ok";
  		};
@@ -41,11 +39,9 @@ index 418f9a022336..2ee5f05d5a43 100644
 +		};
  	};
  };
-diff --git a/arch/arm/boot/dts/qcom-ipq4019.dtsi b/arch/arm/boot/dts/qcom-ipq4019.dtsi
-index e5e52adbd5a3..e6b12129f0e4 100644
 --- a/arch/arm/boot/dts/qcom-ipq4019.dtsi
 +++ b/arch/arm/boot/dts/qcom-ipq4019.dtsi
-@@ -553,5 +553,79 @@
+@@ -403,5 +403,79 @@
  					  "legacy";
  			status = "disabled";
  		};
@@ -125,6 +121,3 @@ index e5e52adbd5a3..e6b12129f0e4 100644
 +		};
  	};
  };
--- 
-2.11.0
-
diff --git a/target/linux/ipq40xx/patches-4.14/078-ARM-dts-ipq4019-Add-a-few-peripheral-nodes.patch b/target/linux/ipq40xx/patches-4.14/078-ARM-dts-ipq4019-Add-a-few-peripheral-nodes.patch
index 6f522ffcad..7014420bf8 100644
--- a/target/linux/ipq40xx/patches-4.14/078-ARM-dts-ipq4019-Add-a-few-peripheral-nodes.patch
+++ b/target/linux/ipq40xx/patches-4.14/078-ARM-dts-ipq4019-Add-a-few-peripheral-nodes.patch
@@ -15,11 +15,9 @@ Signed-off-by: Andy Gross <andy.gross at linaro.org>
  arch/arm/boot/dts/qcom-ipq4019.dtsi           | 156 ++++++++++++++++++++++++--
  2 files changed, 146 insertions(+), 12 deletions(-)
 
-diff --git a/arch/arm/boot/dts/qcom-ipq4019-ap.dk01.1.dtsi b/arch/arm/boot/dts/qcom-ipq4019-ap.dk01.1.dtsi
-index ef8d8c88ed7b..418f9a022336 100644
 --- a/arch/arm/boot/dts/qcom-ipq4019-ap.dk01.1.dtsi
 +++ b/arch/arm/boot/dts/qcom-ipq4019-ap.dk01.1.dtsi
-@@ -69,7 +69,7 @@
+@@ -61,7 +61,7 @@
  			status = "ok";
  		};
  
@@ -28,12 +26,10 @@ index ef8d8c88ed7b..418f9a022336 100644
  			pinctrl-0 = <&spi_0_pins>;
  			pinctrl-names = "default";
  			status = "ok";
-diff --git a/arch/arm/boot/dts/qcom-ipq4019.dtsi b/arch/arm/boot/dts/qcom-ipq4019.dtsi
-index 2efc8a2d41a7..737097e9fb4f 100644
 --- a/arch/arm/boot/dts/qcom-ipq4019.dtsi
 +++ b/arch/arm/boot/dts/qcom-ipq4019.dtsi
-@@ -40,8 +40,10 @@
- 	};
+@@ -24,8 +24,10 @@
+ 	interrupt-parent = <&intc>;
  
  	aliases {
 -		spi0 = &spi_0;
@@ -45,7 +41,7 @@ index 2efc8a2d41a7..737097e9fb4f 100644
  	};
  
  	cpus {
-@@ -120,6 +122,12 @@
+@@ -131,6 +133,12 @@
  		};
  	};
  
@@ -58,7 +54,7 @@ index 2efc8a2d41a7..737097e9fb4f 100644
  	timer {
  		compatible = "arm,armv7-timer";
  		interrupts = <1 2 0xf08>,
-@@ -165,13 +173,13 @@
+@@ -176,13 +184,13 @@
  			#gpio-cells = <2>;
  			interrupt-controller;
  			#interrupt-cells = <2>;
@@ -74,7 +70,7 @@ index 2efc8a2d41a7..737097e9fb4f 100644
  			clocks = <&gcc GCC_BLSP1_AHB_CLK>;
  			clock-names = "bam_clk";
  			#dma-cells = <1>;
-@@ -179,7 +187,7 @@
+@@ -190,7 +198,7 @@
  			status = "disabled";
  		};
  
@@ -83,7 +79,7 @@ index 2efc8a2d41a7..737097e9fb4f 100644
  			compatible = "qcom,spi-qup-v2.2.1";
  			reg = <0x78b5000 0x600>;
  			interrupts = <GIC_SPI 95 IRQ_TYPE_LEVEL_HIGH>;
-@@ -188,10 +196,26 @@
+@@ -199,10 +207,26 @@
  			clock-names = "core", "iface";
  			#address-cells = <1>;
  			#size-cells = <0>;
@@ -111,7 +107,7 @@ index 2efc8a2d41a7..737097e9fb4f 100644
  			compatible = "qcom,i2c-qup-v2.2.1";
  			reg = <0x78b7000 0x600>;
  			interrupts = <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>;
-@@ -200,14 +224,29 @@
+@@ -211,14 +235,29 @@
  			clock-names = "iface", "core";
  			#address-cells = <1>;
  			#size-cells = <0>;
@@ -142,8 +138,8 @@ index 2efc8a2d41a7..737097e9fb4f 100644
  			clocks = <&gcc GCC_CRYPTO_AHB_CLK>;
  			clock-names = "bam_clk";
  			#dma-cells = <1>;
-@@ -275,7 +314,7 @@
- 		blsp1_uart1: serial at 78af000 {
+@@ -286,7 +325,7 @@
+ 		serial at 78af000 {
  			compatible = "qcom,msm-uartdm-v1.4", "qcom,msm-uartdm";
  			reg = <0x78af000 0x200>;
 -			interrupts = <0 107 0>;
@@ -151,7 +147,7 @@ index 2efc8a2d41a7..737097e9fb4f 100644
  			status = "disabled";
  			clocks = <&gcc GCC_BLSP1_UART1_APPS_CLK>,
  				<&gcc GCC_BLSP1_AHB_CLK>;
-@@ -287,7 +326,7 @@
+@@ -298,7 +337,7 @@
  		serial at 78b0000 {
  			compatible = "qcom,msm-uartdm-v1.4", "qcom,msm-uartdm";
  			reg = <0x78b0000 0x200>;
@@ -160,7 +156,7 @@ index 2efc8a2d41a7..737097e9fb4f 100644
  			status = "disabled";
  			clocks = <&gcc GCC_BLSP1_UART2_APPS_CLK>,
  				<&gcc GCC_BLSP1_AHB_CLK>;
-@@ -309,6 +348,101 @@
+@@ -320,6 +359,101 @@
  			reg = <0x4ab000 0x4>;
  		};
  
@@ -262,7 +258,7 @@ index 2efc8a2d41a7..737097e9fb4f 100644
  		wifi0: wifi at a000000 {
  			compatible = "qcom,ipq4019-wifi";
  			reg = <0xa000000 0x200000>;
-@@ -342,7 +476,7 @@
+@@ -353,7 +487,7 @@
  				     <GIC_SPI 45 IRQ_TYPE_EDGE_RISING>,
  				     <GIC_SPI 46 IRQ_TYPE_EDGE_RISING>,
  				     <GIC_SPI 47 IRQ_TYPE_EDGE_RISING>,
@@ -271,7 +267,7 @@ index 2efc8a2d41a7..737097e9fb4f 100644
  			interrupt-names =  "msi0",  "msi1",  "msi2",  "msi3",
  					   "msi4",  "msi5",  "msi6",  "msi7",
  					   "msi8",  "msi9", "msi10", "msi11",
-@@ -384,7 +518,7 @@
+@@ -395,7 +529,7 @@
  				     <GIC_SPI 61 IRQ_TYPE_EDGE_RISING>,
  				     <GIC_SPI 62 IRQ_TYPE_EDGE_RISING>,
  				     <GIC_SPI 63 IRQ_TYPE_EDGE_RISING>,
@@ -280,6 +276,3 @@ index 2efc8a2d41a7..737097e9fb4f 100644
  			interrupt-names =  "msi0",  "msi1",  "msi2",  "msi3",
  					   "msi4",  "msi5",  "msi6",  "msi7",
  					   "msi8",  "msi9", "msi10", "msi11",
--- 
-2.11.0
-
diff --git a/target/linux/ipq40xx/patches-4.14/079-ARM-dts-ipq4019-fix-PCI-range.patch b/target/linux/ipq40xx/patches-4.14/079-ARM-dts-ipq4019-fix-PCI-range.patch
index eaccb00bb0..28cc3f7629 100644
--- a/target/linux/ipq40xx/patches-4.14/079-ARM-dts-ipq4019-fix-PCI-range.patch
+++ b/target/linux/ipq40xx/patches-4.14/079-ARM-dts-ipq4019-fix-PCI-range.patch
@@ -12,12 +12,12 @@ Signed-off-by: Mathias Kresin <dev at kresin.me>
 
 --- a/arch/arm/boot/dts/qcom-ipq4019.dtsi
 +++ b/arch/arm/boot/dts/qcom-ipq4019.dtsi
-@@ -359,7 +359,7 @@
+@@ -374,7 +374,7 @@
  			#size-cells = <2>;
  
  			ranges = <0x81000000 0 0x40200000 0x40200000 0 0x00100000
 -				  0x82000000 0 0x48000000 0x48000000 0 0x10000000>;
 +				  0x82000000 0 0x40300000 0x40300000 0 0x400000>;
  
- 			interrupts = <GIC_SPI 141 IRQ_TYPE_NONE>;
+ 			interrupts = <GIC_SPI 141 IRQ_TYPE_EDGE_RISING>;
  			interrupt-names = "msi";
diff --git a/target/linux/ipq40xx/patches-4.14/080-pinctrl-msm-fix-gpio-hog-related-boot-issues.patch b/target/linux/ipq40xx/patches-4.14/080-pinctrl-msm-fix-gpio-hog-related-boot-issues.patch
index 57ed940fd1..bf619889f7 100644
--- a/target/linux/ipq40xx/patches-4.14/080-pinctrl-msm-fix-gpio-hog-related-boot-issues.patch
+++ b/target/linux/ipq40xx/patches-4.14/080-pinctrl-msm-fix-gpio-hog-related-boot-issues.patch
@@ -61,7 +61,7 @@ Origin: other, https://patchwork.kernel.org/patch/10339127/
 
 --- a/arch/arm/boot/dts/qcom-ipq4019.dtsi
 +++ b/arch/arm/boot/dts/qcom-ipq4019.dtsi
-@@ -166,6 +166,7 @@
+@@ -181,6 +181,7 @@
  			compatible = "qcom,ipq4019-pinctrl";
  			reg = <0x01000000 0x300000>;
  			gpio-controller;
diff --git a/target/linux/ipq40xx/patches-4.14/081-clk-fix-apss-cpu-overclocking.patch b/target/linux/ipq40xx/patches-4.14/081-clk-fix-apss-cpu-overclocking.patch
index dcf17874b3..d71fbbbda2 100644
--- a/target/linux/ipq40xx/patches-4.14/081-clk-fix-apss-cpu-overclocking.patch
+++ b/target/linux/ipq40xx/patches-4.14/081-clk-fix-apss-cpu-overclocking.patch
@@ -42,11 +42,9 @@ Signed-off-by: John Crispin <john at phrozen.org>
  drivers/clk/qcom/gcc-ipq4019.c | 34 +++++++++++++++++++++++++++++++---
  1 file changed, 31 insertions(+), 3 deletions(-)
 
-diff --git a/drivers/clk/qcom/gcc-ipq4019.c b/drivers/clk/qcom/gcc-ipq4019.c
-index 46cb256b4aa2..4ec43f7d2e52 100644
 --- a/drivers/clk/qcom/gcc-ipq4019.c
 +++ b/drivers/clk/qcom/gcc-ipq4019.c
-@@ -1253,6 +1253,29 @@ static const struct clk_fepll_vco gcc_fepll_vco = {
+@@ -1253,6 +1253,29 @@ static const struct clk_fepll_vco gcc_fe
  	.reg = 0x2f020,
  };
  
@@ -76,7 +74,7 @@ index 46cb256b4aa2..4ec43f7d2e52 100644
  /*
   * Round rate function for APSS CPU PLL Clock divider.
   * It looks up the frequency table and returns the next higher frequency
-@@ -1265,7 +1288,7 @@ static long clk_cpu_div_round_rate(struct clk_hw *hw, unsigned long rate,
+@@ -1265,7 +1288,7 @@ static long clk_cpu_div_round_rate(struc
  	struct clk_hw *p_hw;
  	const struct freq_tbl *f;
  
@@ -85,7 +83,7 @@ index 46cb256b4aa2..4ec43f7d2e52 100644
  	if (!f)
  		return -EINVAL;
  
-@@ -1288,7 +1311,7 @@ static int clk_cpu_div_set_rate(struct clk_hw *hw, unsigned long rate,
+@@ -1288,7 +1311,7 @@ static int clk_cpu_div_set_rate(struct c
  	u32 mask;
  	int ret;
  
@@ -102,7 +100,7 @@ index 46cb256b4aa2..4ec43f7d2e52 100644
  	struct clk_fepll *pll = to_clk_fepll(hw);
  	u32 cdiv, pre_div;
  	u64 rate;
-@@ -1335,7 +1359,11 @@ clk_cpu_div_recalc_rate(struct clk_hw *hw,
+@@ -1335,7 +1359,11 @@ clk_cpu_div_recalc_rate(struct clk_hw *h
  	rate = clk_fepll_vco_calc_rate(pll, parent_rate) * 2;
  	do_div(rate, pre_div);
  
@@ -115,6 +113,3 @@ index 46cb256b4aa2..4ec43f7d2e52 100644
  };
  
  static const struct clk_ops clk_regmap_cpu_div_ops = {
--- 
-2.11.0
-
diff --git a/target/linux/ipq40xx/patches-4.14/082-ARM-dts-ipq4019-Add-TZ-and-SMEM-reserved-regions.patch b/target/linux/ipq40xx/patches-4.14/082-ARM-dts-ipq4019-Add-TZ-and-SMEM-reserved-regions.patch
index 56ae66b089..6a595d5ef6 100644
--- a/target/linux/ipq40xx/patches-4.14/082-ARM-dts-ipq4019-Add-TZ-and-SMEM-reserved-regions.patch
+++ b/target/linux/ipq40xx/patches-4.14/082-ARM-dts-ipq4019-Add-TZ-and-SMEM-reserved-regions.patch
@@ -84,5 +84,5 @@ this change qualifies for a stable at vger.kernel.org submission.
 +	};
 +
  	aliases {
- 		spi0 = &spi_0;
- 		spi1 = &spi_1;
+ 		spi0 = &blsp1_spi1;
+ 		spi1 = &blsp1_spi2;
diff --git a/target/linux/ipq40xx/patches-4.14/400-mtd-ubi-add-quirk-to-autoload-ubi-on-rt-ac58u.patch b/target/linux/ipq40xx/patches-4.14/400-mtd-ubi-add-quirk-to-autoload-ubi-on-rt-ac58u.patch
index 4ee79515c9..6a83d79d8c 100644
--- a/target/linux/ipq40xx/patches-4.14/400-mtd-ubi-add-quirk-to-autoload-ubi-on-rt-ac58u.patch
+++ b/target/linux/ipq40xx/patches-4.14/400-mtd-ubi-add-quirk-to-autoload-ubi-on-rt-ac58u.patch
@@ -17,7 +17,7 @@ Signed-off-by: Christian Lamparter <chunkeey at googlemail.com>
 
 --- a/drivers/mtd/ubi/build.c
 +++ b/drivers/mtd/ubi/build.c
-@@ -1184,6 +1184,9 @@ static void __init ubi_auto_attach(void)
+@@ -1187,6 +1187,9 @@ static void __init ubi_auto_attach(void)
  	mtd = open_mtd_device("ubi");
  	if (IS_ERR(mtd))
  		mtd = open_mtd_device("data");
@@ -25,5 +25,5 @@ Signed-off-by: Christian Lamparter <chunkeey at googlemail.com>
 +	if (IS_ERR(mtd))
 +		mtd = open_mtd_device("UBI_DEV");
  
- 	if (!IS_ERR(mtd)) {
- 		size_t len;
+ 	if (IS_ERR(mtd))
+ 		return;
diff --git a/target/linux/ipq40xx/patches-4.14/701-dts-ipq4019-add-mdio-node.patch b/target/linux/ipq40xx/patches-4.14/701-dts-ipq4019-add-mdio-node.patch
index 25f596eaff..be32d70aa8 100644
--- a/target/linux/ipq40xx/patches-4.14/701-dts-ipq4019-add-mdio-node.patch
+++ b/target/linux/ipq40xx/patches-4.14/701-dts-ipq4019-add-mdio-node.patch
@@ -15,7 +15,7 @@ so the info might change.
 
 --- a/arch/arm/boot/dts/qcom-ipq4019.dtsi
 +++ b/arch/arm/boot/dts/qcom-ipq4019.dtsi
-@@ -540,6 +540,34 @@
+@@ -555,6 +555,34 @@
  			status = "disabled";
  		};
  
@@ -48,5 +48,5 @@ so the info might change.
 +		};
 +
  		usb3_ss_phy: ssphy at 9a000 {
- 			compatible = "qca,uni-ssphy";
- 			reg = <0x9a000 0x800>;
+ 			compatible = "qcom,usb-ss-ipq4019-phy";
+ 			#phy-cells = <0>;
diff --git a/target/linux/ipq40xx/patches-4.14/702-dts-ipq4019-add-PHY-switch-nodes.patch b/target/linux/ipq40xx/patches-4.14/702-dts-ipq4019-add-PHY-switch-nodes.patch
index eb3d9be013..b25b775efa 100644
--- a/target/linux/ipq40xx/patches-4.14/702-dts-ipq4019-add-PHY-switch-nodes.patch
+++ b/target/linux/ipq40xx/patches-4.14/702-dts-ipq4019-add-PHY-switch-nodes.patch
@@ -14,7 +14,7 @@ Signed-off-by: Christian Lamparter <chunkeey at gmail.com>
 
 --- a/arch/arm/boot/dts/qcom-ipq4019.dtsi
 +++ b/arch/arm/boot/dts/qcom-ipq4019.dtsi
-@@ -568,6 +568,29 @@
+@@ -583,6 +583,29 @@
  			};
  		};
  
@@ -42,5 +42,5 @@ Signed-off-by: Christian Lamparter <chunkeey at gmail.com>
 +		};
 +
  		usb3_ss_phy: ssphy at 9a000 {
- 			compatible = "qca,uni-ssphy";
- 			reg = <0x9a000 0x800>;
+ 			compatible = "qcom,usb-ss-ipq4019-phy";
+ 			#phy-cells = <0>;
diff --git a/target/linux/ipq40xx/patches-4.14/711-dts-ipq4019-add-ethernet-essedma-node.patch b/target/linux/ipq40xx/patches-4.14/711-dts-ipq4019-add-ethernet-essedma-node.patch
index 6e4137073a..d2d235a940 100644
--- a/target/linux/ipq40xx/patches-4.14/711-dts-ipq4019-add-ethernet-essedma-node.patch
+++ b/target/linux/ipq40xx/patches-4.14/711-dts-ipq4019-add-ethernet-essedma-node.patch
@@ -14,10 +14,8 @@ Signed-off-by: Christian Lamparter <chunkeey at gmail.com>
  arch/arm/boot/dts/qcom-ipq4019.dtsi | 60 +++++++++++++++++++++++++++++++++++++
  1 file changed, 60 insertions(+)
 
-Index: linux-4.14.54/arch/arm/boot/dts/qcom-ipq4019.dtsi
-===================================================================
---- linux-4.14.54.orig/arch/arm/boot/dts/qcom-ipq4019.dtsi
-+++ linux-4.14.54/arch/arm/boot/dts/qcom-ipq4019.dtsi
+--- a/arch/arm/boot/dts/qcom-ipq4019.dtsi
++++ b/arch/arm/boot/dts/qcom-ipq4019.dtsi
 @@ -44,6 +44,8 @@
  		spi1 = &blsp1_spi2;
  		i2c0 = &blsp1_i2c3;
diff --git a/target/linux/ipq40xx/patches-4.14/900-dts-ipq4019-ap-dk01.1.patch b/target/linux/ipq40xx/patches-4.14/900-dts-ipq4019-ap-dk01.1.patch
index b24d85ba13..25652bb2c9 100644
--- a/target/linux/ipq40xx/patches-4.14/900-dts-ipq4019-ap-dk01.1.patch
+++ b/target/linux/ipq40xx/patches-4.14/900-dts-ipq4019-ap-dk01.1.patch
@@ -1,7 +1,5 @@
-Index: linux-4.14.54/arch/arm/boot/dts/qcom-ipq4019-ap.dk01.1.dtsi
-===================================================================
---- linux-4.14.54.orig/arch/arm/boot/dts/qcom-ipq4019-ap.dk01.1.dtsi
-+++ linux-4.14.54/arch/arm/boot/dts/qcom-ipq4019-ap.dk01.1.dtsi
+--- a/arch/arm/boot/dts/qcom-ipq4019-ap.dk01.1.dtsi
++++ b/arch/arm/boot/dts/qcom-ipq4019-ap.dk01.1.dtsi
 @@ -15,12 +15,39 @@
   */
  
@@ -80,10 +78,8 @@ Index: linux-4.14.54/arch/arm/boot/dts/qcom-ipq4019-ap.dk01.1.dtsi
  		usb3_ss_phy: ssphy at 9a000 {
  			status = "ok";
  		};
-Index: linux-4.14.54/arch/arm/boot/dts/qcom-ipq4019-ap.dk01.1-c1.dts
-===================================================================
---- linux-4.14.54.orig/arch/arm/boot/dts/qcom-ipq4019-ap.dk01.1-c1.dts
-+++ linux-4.14.54/arch/arm/boot/dts/qcom-ipq4019-ap.dk01.1-c1.dts
+--- a/arch/arm/boot/dts/qcom-ipq4019-ap.dk01.1-c1.dts
++++ b/arch/arm/boot/dts/qcom-ipq4019-ap.dk01.1-c1.dts
 @@ -18,5 +18,73 @@
  
  / {
diff --git a/target/linux/mediatek/patches-4.14/0052-net-phy-add-FC.patch b/target/linux/mediatek/patches-4.14/0052-net-phy-add-FC.patch
index 3c4fc5a7ce..134d95d992 100644
--- a/target/linux/mediatek/patches-4.14/0052-net-phy-add-FC.patch
+++ b/target/linux/mediatek/patches-4.14/0052-net-phy-add-FC.patch
@@ -10,7 +10,7 @@ Signed-off-by: John Crispin <john at phrozen.org>
 
 --- a/drivers/net/phy/phy_device.c
 +++ b/drivers/net/phy/phy_device.c
-@@ -1929,7 +1929,7 @@ static struct phy_driver genphy_driver =
+@@ -1926,7 +1926,7 @@ static struct phy_driver genphy_driver =
  	.config_init	= genphy_config_init,
  	.features	= PHY_GBIT_FEATURES | SUPPORTED_MII |
  			  SUPPORTED_AUI | SUPPORTED_FIBRE |
diff --git a/target/linux/mediatek/patches-4.14/0191-usb-xhci-allow-imod-interval-to-be-configurable.patch b/target/linux/mediatek/patches-4.14/0191-usb-xhci-allow-imod-interval-to-be-configurable.patch
index c48db55d7f..ee260d2aab 100644
--- a/target/linux/mediatek/patches-4.14/0191-usb-xhci-allow-imod-interval-to-be-configurable.patch
+++ b/target/linux/mediatek/patches-4.14/0191-usb-xhci-allow-imod-interval-to-be-configurable.patch
@@ -127,7 +127,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
  	/* Set the HCD state before we enable the irqs */
 --- a/drivers/usb/host/xhci.h
 +++ b/drivers/usb/host/xhci.h
-@@ -1726,6 +1726,8 @@ struct xhci_hcd {
+@@ -1730,6 +1730,8 @@ struct xhci_hcd {
  	u8		max_interrupters;
  	u8		max_ports;
  	u8		isoc_threshold;
diff --git a/target/linux/mediatek/patches-4.14/0227-arm-dts-Add-Unielec-U7623-DTS.patch b/target/linux/mediatek/patches-4.14/0227-arm-dts-Add-Unielec-U7623-DTS.patch
index 8688a453df..eb864e4657 100644
--- a/target/linux/mediatek/patches-4.14/0227-arm-dts-Add-Unielec-U7623-DTS.patch
+++ b/target/linux/mediatek/patches-4.14/0227-arm-dts-Add-Unielec-U7623-DTS.patch
@@ -11,8 +11,6 @@ Subject: [PATCH] arm: dts: Add Unielec U7623 DTS
  create mode 100644 arch/arm/boot/dts/mt7623a-unielec-u7623-02-emmc-512M.dts
  create mode 100644 arch/arm/boot/dts/mt7623a-unielec-u7623-02-emmc.dtsi
 
-diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
-index 3fec84fa0..e685ce9a4 100644
 --- a/arch/arm/boot/dts/Makefile
 +++ b/arch/arm/boot/dts/Makefile
 @@ -1062,6 +1062,7 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \
@@ -23,9 +21,6 @@ index 3fec84fa0..e685ce9a4 100644
  	mt7623n-rfb-nand.dtb \
  	mt7623n-bananapi-bpi-r2.dtb \
  	mt8127-moose.dtb \
-diff --git a/arch/arm/boot/dts/mt7623a-unielec-u7623-02-emmc-512M.dts b/arch/arm/boot/dts/mt7623a-unielec-u7623-02-emmc-512M.dts
-new file mode 100644
-index 000000000..3b14eccd3
 --- /dev/null
 +++ b/arch/arm/boot/dts/mt7623a-unielec-u7623-02-emmc-512M.dts
 @@ -0,0 +1,17 @@
@@ -46,9 +41,6 @@ index 000000000..3b14eccd3
 +		reg = <0 0x80000000 0 0x20000000>;
 +	};
 +};
-diff --git a/arch/arm/boot/dts/mt7623a-unielec-u7623-02-emmc.dtsi b/arch/arm/boot/dts/mt7623a-unielec-u7623-02-emmc.dtsi
-new file mode 100644
-index 000000000..436b02f2d
 --- /dev/null
 +++ b/arch/arm/boot/dts/mt7623a-unielec-u7623-02-emmc.dtsi
 @@ -0,0 +1,375 @@
@@ -427,6 +419,3 @@ index 000000000..436b02f2d
 +	status = "okay";
 +};
 +
--- 
-2.14.1
-
diff --git a/target/linux/oxnas/patches-4.14/999-libata-hacks.patch b/target/linux/oxnas/patches-4.14/999-libata-hacks.patch
index da3660fada..e490dbf7c1 100644
--- a/target/linux/oxnas/patches-4.14/999-libata-hacks.patch
+++ b/target/linux/oxnas/patches-4.14/999-libata-hacks.patch
@@ -15,7 +15,7 @@
  	/* initialize internal qc */
  
  	/* XXX: Tag 0 is used for drivers with legacy EH as some
-@@ -5124,6 +5132,9 @@ struct ata_queued_cmd *ata_qc_new_init(s
+@@ -5127,6 +5135,9 @@ struct ata_queued_cmd *ata_qc_new_init(s
  	if (unlikely(ap->pflags & ATA_PFLAG_FROZEN))
  		return NULL;
  
@@ -25,7 +25,7 @@
  	/* libsas case */
  	if (ap->flags & ATA_FLAG_SAS_HOST) {
  		tag = ata_sas_allocate_tag(ap);
-@@ -5169,6 +5180,8 @@ void ata_qc_free(struct ata_queued_cmd *
+@@ -5172,6 +5183,8 @@ void ata_qc_free(struct ata_queued_cmd *
  		qc->tag = ATA_TAG_POISON;
  		if (ap->flags & ATA_FLAG_SAS_HOST)
  			ata_sas_free_tag(tag, ap);
@@ -36,7 +36,7 @@
  
 --- a/include/linux/libata.h
 +++ b/include/linux/libata.h
-@@ -918,6 +918,8 @@ struct ata_port_operations {
+@@ -919,6 +919,8 @@ struct ata_port_operations {
  	void (*qc_prep)(struct ata_queued_cmd *qc);
  	unsigned int (*qc_issue)(struct ata_queued_cmd *qc);
  	bool (*qc_fill_rtf)(struct ata_queued_cmd *qc);
@@ -45,7 +45,7 @@
  
  	/*
  	 * Configuration and exception handling
-@@ -1008,6 +1010,9 @@ struct ata_port_operations {
+@@ -1009,6 +1011,9 @@ struct ata_port_operations {
  	void (*phy_reset)(struct ata_port *ap);
  	void (*eng_timeout)(struct ata_port *ap);
  
diff --git a/target/linux/ramips/patches-4.14/0036-mtd-fix-cfi-cmdset-0002-erase-status-check.patch b/target/linux/ramips/patches-4.14/0036-mtd-fix-cfi-cmdset-0002-erase-status-check.patch
deleted file mode 100644
index 9226202b7f..0000000000
--- a/target/linux/ramips/patches-4.14/0036-mtd-fix-cfi-cmdset-0002-erase-status-check.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 8e72a3a1be8f6328bd7ef491332ba541547b6086 Mon Sep 17 00:00:00 2001
-From: John Crispin <blogic at openwrt.org>
-Date: Mon, 15 Jul 2013 00:38:51 +0200
-Subject: [PATCH 36/53] mtd: fix cfi cmdset 0002 erase status check
-
----
- drivers/mtd/chips/cfi_cmdset_0002.c |    4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
---- a/drivers/mtd/chips/cfi_cmdset_0002.c
-+++ b/drivers/mtd/chips/cfi_cmdset_0002.c
-@@ -2295,7 +2295,7 @@ static int __xipram do_erase_chip(struct
- 			chip->erase_suspended = 0;
- 		}
- 
--		if (chip_ready(map, adr))
-+		if (chip_good(map, adr, map_word_ff(map)))
- 			break;
- 
- 		if (time_after(jiffies, timeo)) {
-@@ -2385,7 +2385,7 @@ static int __xipram do_erase_oneblock(st
- 			chip->erase_suspended = 0;
- 		}
- 
--		if (chip_ready(map, adr)) {
-+		if (chip_good(map, adr, map_word_ff(map))) {
- 			xip_enable(map, chip, adr);
- 			break;
- 		}
diff --git a/target/linux/ramips/patches-4.14/0037-mtd-cfi-cmdset-0002-force-word-write.patch b/target/linux/ramips/patches-4.14/0037-mtd-cfi-cmdset-0002-force-word-write.patch
index 7ee8284535..1cadfcdb00 100644
--- a/target/linux/ramips/patches-4.14/0037-mtd-cfi-cmdset-0002-force-word-write.patch
+++ b/target/linux/ramips/patches-4.14/0037-mtd-cfi-cmdset-0002-force-word-write.patch
@@ -16,7 +16,7 @@ Subject: [PATCH 37/53] mtd: cfi cmdset 0002 force word write
 -#define FORCE_WORD_WRITE 0
 +#define FORCE_WORD_WRITE 1
  
- #define MAX_WORD_RETRIES 3
+ #define MAX_RETRIES 3
  
 @@ -51,7 +51,9 @@
  
-- 
2.15.2 (Apple Git-101.1)


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From openwrt-devel at lists.openwrt.org  Fri Jul 27 15:11:24 2018
From: openwrt-devel at lists.openwrt.org (Eneas U de Queiroz via openwrt-devel)
Date: Fri, 27 Jul 2018 19:11:24 +0000
Subject: [OpenWrt-Devel] [PATCH 0/1] ustream-ssl: uniform ciphersuite list
Message-ID: <mailman.13315.1532718684.25356.openwrt-devel@lists.openwrt.org>

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.
-------------- next part --------------
An embedded message was scrubbed...
From: Eneas U de Queiroz <cote2004-github at yahoo.com>
Subject: [PATCH 0/1] ustream-ssl: uniform ciphersuite list
Date: Fri, 27 Jul 2018 16:10:19 -0300
Size: 4603
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20180727/2d990731/attachment.eml>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From openwrt-devel at lists.openwrt.org  Fri Jul 27 15:11:36 2018
From: openwrt-devel at lists.openwrt.org (Eneas U de Queiroz via openwrt-devel)
Date: Fri, 27 Jul 2018 19:11:36 +0000
Subject: [OpenWrt-Devel] [PATCH 1/1] openssl,
 wolfssl: match mbedTLS ciphersuite list
In-Reply-To: <20180727191020.18634-1-cote2004-github@yahoo.com>
References: <20180727191020.18634-1-cote2004-github@yahoo.com>
Message-ID: <mailman.13316.1532718695.25356.openwrt-devel@lists.openwrt.org>

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.
-------------- next part --------------
An embedded message was scrubbed...
From: Eneas U de Queiroz <cote2004-github at yahoo.com>
Subject: [PATCH 1/1] openssl, wolfssl: match mbedTLS ciphersuite list
Date: Fri, 27 Jul 2018 16:10:20 -0300
Size: 6933
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20180727/1fead3af/attachment.eml>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From ldir at darbyshire-bryant.me.uk  Fri Jul 27 17:09:48 2018
From: ldir at darbyshire-bryant.me.uk (Kevin Darbyshire-Bryant)
Date: Fri, 27 Jul 2018 22:09:48 +0100
Subject: [OpenWrt-Devel] [PATCH v1] 6in4: add maxtry option to make more
 persistent updating HE endpoint
Message-ID: <20180727210948.37016-1-ldir@darbyshire-bryant.me.uk>

Add option 'maxtry' to 6in4 interface definition.  Defaults to 3.

Defines maximum number of attempts to update Hurricane Electric
tunnel endpoint address.  Originally unconfigurable and hard coded to 3.

Each update attempt has a 5 second timeout.

Signed-off-by: Kevin Darbyshire-Bryant <ldir at darbyshire-bryant.me.uk>
---
 package/network/ipv6/6in4/files/6in4.sh | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/package/network/ipv6/6in4/files/6in4.sh b/package/network/ipv6/6in4/files/6in4.sh
index 941dc43d68..dce37eb3b3 100755
--- a/package/network/ipv6/6in4/files/6in4.sh
+++ b/package/network/ipv6/6in4/files/6in4.sh
@@ -31,8 +31,8 @@ proto_6in4_setup() {
 	local iface="$2"
 	local link="6in4-$cfg"
 
-	local mtu ttl tos ipaddr peeraddr ip6addr ip6prefix ip6prefixes tunlink tunnelid username password updatekey
-	json_get_vars mtu ttl tos ipaddr peeraddr ip6addr tunlink tunnelid username password updatekey
+	local mtu ttl tos ipaddr peeraddr ip6addr ip6prefix ip6prefixes tunlink tunnelid username password updatekey maxtry
+	json_get_vars mtu ttl tos ipaddr peeraddr ip6addr tunlink tunnelid username password updatekey maxtry
 	json_for_each_item proto_6in4_add_prefix ip6prefix ip6prefixes
 
 	[ -z "$peeraddr" ] && {
@@ -98,7 +98,7 @@ proto_6in4_setup() {
 
 		local url="$http://ipv4.tunnelbroker.net/nic/update?hostname=$tunnelid"
 		local try=0
-		local max=3
+		local max="${maxtry:-3}"
 
 		(
 			set -o pipefail
@@ -134,6 +134,7 @@ proto_6in4_init_config() {
 	proto_config_add_string "username"
 	proto_config_add_string "password"
 	proto_config_add_string "updatekey"
+	proto_config_add_int "maxtry"
 	proto_config_add_int "mtu"
 	proto_config_add_int "ttl"
 	proto_config_add_string "tos"
-- 
2.15.2 (Apple Git-101.1)


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From build+openwrt at de-korte.org  Sat Jul 28 03:29:26 2018
From: build+openwrt at de-korte.org (Arjen de Korte)
Date: Sat, 28 Jul 2018 09:29:26 +0200
Subject: [OpenWrt-Devel] [PATCH v1] 6in4: add maxtry option to make more
 persistent updating HE endpoint
In-Reply-To: <20180727210948.37016-1-ldir@darbyshire-bryant.me.uk>
Message-ID: <20180728092926.Horde.3d16MoDTrx5KKirXMKe0YMA@mail.de-korte.org>

Citeren Kevin Darbyshire-Bryant <ldir at darbyshire-bryant.me.uk>:

> Add option 'maxtry' to 6in4 interface definition.  Defaults to 3.
>
> Defines maximum number of attempts to update Hurricane Electric
> tunnel endpoint address.  Originally unconfigurable and hard coded to 3.
>
> Each update attempt has a 5 second timeout.

I don't think this is a good idea. While I recognize that the update  
is accepted only on the third (and final) try, just upping the number  
of tries is not the solution.

It looks to me that the updates are failing, because the script runs  
too soon. Adding a fixed delay of 15 seconds before it runs, will  
always update on the first try.

So rather than just trying more often, it might be better to fix an  
apparent race condition here.

> Signed-off-by: Kevin Darbyshire-Bryant <ldir at darbyshire-bryant.me.uk>
> ---
>  package/network/ipv6/6in4/files/6in4.sh | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/package/network/ipv6/6in4/files/6in4.sh  
> b/package/network/ipv6/6in4/files/6in4.sh
> index 941dc43d68..dce37eb3b3 100755
> --- a/package/network/ipv6/6in4/files/6in4.sh
> +++ b/package/network/ipv6/6in4/files/6in4.sh
> @@ -31,8 +31,8 @@ proto_6in4_setup() {
>  	local iface="$2"
>  	local link="6in4-$cfg"
>
> -	local mtu ttl tos ipaddr peeraddr ip6addr ip6prefix ip6prefixes  
> tunlink tunnelid username password updatekey
> -	json_get_vars mtu ttl tos ipaddr peeraddr ip6addr tunlink tunnelid  
> username password updatekey
> +	local mtu ttl tos ipaddr peeraddr ip6addr ip6prefix ip6prefixes  
> tunlink tunnelid username password updatekey maxtry
> +	json_get_vars mtu ttl tos ipaddr peeraddr ip6addr tunlink tunnelid  
> username password updatekey maxtry
>  	json_for_each_item proto_6in4_add_prefix ip6prefix ip6prefixes
>
>  	[ -z "$peeraddr" ] && {
> @@ -98,7 +98,7 @@ proto_6in4_setup() {
>
>  		local url="$http://ipv4.tunnelbroker.net/nic/update?hostname=$tunnelid"
>  		local try=0
> -		local max=3
> +		local max="${maxtry:-3}"
>
>  		(
>  			set -o pipefail
> @@ -134,6 +134,7 @@ proto_6in4_init_config() {
>  	proto_config_add_string "username"
>  	proto_config_add_string "password"
>  	proto_config_add_string "updatekey"
> +	proto_config_add_int "maxtry"
>  	proto_config_add_int "mtu"
>  	proto_config_add_int "ttl"
>  	proto_config_add_string "tos"




_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From sebastian_ml at gmx.net  Sat Jul 28 07:59:05 2018
From: sebastian_ml at gmx.net (Sebastian Kemper)
Date: Sat, 28 Jul 2018 11:59:05 +0000
Subject: [OpenWrt-Devel] Disclaimer for user documentation?
Message-ID: <3BB2CBCA-2039-4BC7-989A-140EFBAB8111@gmx.net>

Hi all,

I'm adding a page about FreeSWITCH to the OpenWrt user documentation. I would like to add a guide on setting up a configuration to use freeswitch with Ekiga, along the lines of a testing ground for people to use and play around with before they take on other endeavors.

But I'm a bit reluctant to do it because if somebody sets up SIP connections wrongly it can cost them money (PBX getting hacked etc.). I don't want any blame for that.

Can there maybe be a general disclaimer that disclaims any liability that users adding documentation can link to? I've searched if something like this exists already but didn't find anything.

Kind regards,
Seb

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From bobafetthotmail at gmail.com  Sat Jul 28 08:36:20 2018
From: bobafetthotmail at gmail.com (Alberto Bursi)
Date: Sat, 28 Jul 2018 14:36:20 +0200
Subject: [OpenWrt-Devel] Disclaimer for user documentation?
In-Reply-To: <3BB2CBCA-2039-4BC7-989A-140EFBAB8111@gmx.net>
References: <3BB2CBCA-2039-4BC7-989A-140EFBAB8111@gmx.net>
Message-ID: <f4a2c4d3-e0b3-e2d6-b80b-d94ff2a7b10d@gmail.com>



On 28/07/2018 13:59, Sebastian Kemper wrote:
> Hi all,
>
> I'm adding a page about FreeSWITCH to the OpenWrt user documentation. I would like to add a guide on setting up a configuration to use freeswitch with Ekiga, along the lines of a testing ground for people to use and play around with before they take on other endeavors.
>
> But I'm a bit reluctant to do it because if somebody sets up SIP connections wrongly it can cost them money (PBX getting hacked etc.). I don't want any blame for that.
>
> Can there maybe be a general disclaimer that disclaims any liability that users adding documentation can link to? I've searched if something like this exists already but didn't find anything.
>
> Kind regards,
> Seb
>
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel

In other articles where user error might cause issues we placed a banner 
on top with a warning, like this 
https://openwrt.org/docs/guide-user/network/wan/smartphone.usb.tethering

I personally don't think people writing the articles can be blamed 
unless the guide they wrote is actually wrong. If users screw up that's 
their own responsibility.

But I don't know the legal side of things, can someone actually sue 
OpenWrt or try to go after the contributors if such things happen?

If others agree (I'm CCing this mail to other wiki maintainers) I can 
add a new "Legal" page with link on the menu on the left where such 
disclaimers can be placed.

In the meantime you can place any disclaimer you want in the warning box 
at the top of your article, and be covered by that. A good starting 
point is copy-pasting LineageOS's https://lineageos.org/legal/

-Alberto

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From torbjorn.jansson at mbox200.swipnet.se  Sat Jul 28 10:06:36 2018
From: torbjorn.jansson at mbox200.swipnet.se (Torbjorn Jansson)
Date: Sat, 28 Jul 2018 16:06:36 +0200
Subject: [OpenWrt-Devel] build failure on 18.06 from git (usbip)
Message-ID: <89ccd17d-cb82-e876-c58c-f1731f501987@mbox200.swipnet.se>

Hello

i tried building openwrt 18.06 branch today but i got stuck due to a build 
failure on this:

---------
Applying ./patches-2.0/100-musl-compat.patch using plaintext:
patching file src/usbipd.c
Hunk #1 FAILED at 453.
1 out of 1 hunk FAILED -- saving rejects to file src/usbipd.c.rej
Patch failed!  Please fix ./patches-2.0/100-musl-compat.patch!
---------

any idea whats wrong and how to fix it?

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From ldir at darbyshire-bryant.me.uk  Sat Jul 28 17:07:05 2018
From: ldir at darbyshire-bryant.me.uk (Kevin Darbyshire-Bryant)
Date: Sat, 28 Jul 2018 22:07:05 +0100
Subject: [OpenWrt-Devel] [PATCH] kernel: bump 4.14 to 4.14.59
Message-ID: <20180728210705.13145-1-ldir@darbyshire-bryant.me.uk>

Drop patch that was superseded upstream:
ramips/0036-mtd-fix-cfi-cmdset-0002-erase-status-check.patch

Drop patch that no longer needs to be backported:
backport-4.14/080-net-convert-sock.sk_wmem_alloc-from-atomic_t-to-refc.patch
pending-4.14/900-gen_stats-fix-netlink-stats-padding.patch

Drop patches that have been superceded upstream & can be reverse-applied:
patches-4.14/020-0001-crypto-crypto4xx-remove-bad-list_del.patch
patches-4.14/020-0011-crypto-crypto4xx-fix-crypto4xx_build_pdr-crypto4xx_b.patch
patches-4.14/001-4.15-08-bcm63xx_enet-correct-clock-usage.patch
patches-4.14/001-4.15-09-bcm63xx_enet-do-not-write-to-random-DMA-channel-on-B.patch
ath79/patches-4.14/0011-MIPS-ath79-fix-register-address-in-ath79_ddr_wb_flus.patch
generic/pending-4.14/170-usb-dwc2-Fix-DMA-alignment-to-start-at-allocated-boun.patch

Fixes the following CVEs:
- CVE-2018-10876
- CVE-2018-10877
- CVE-2018-10879
- CVE-2018-10880
- CVE-2018-10881
- CVE-2018-10882
- CVE-2018-10883

Refresh patches.

Run-tested: ath79 Archer C7 v2

This is an amalgam of Stijn Tintel's bump to 4.14.56 & my three
subsequent bumps to 4.14.59

Bump to 4.14.56
Signed-off-by: Stijn Tintel <stijn at linux-ipv6.be>
Subsequent bump to 4.14.59
Signed-off-by: Kevin Darbyshire-Bryant <ldir at darbyshire-bryant.me.uk>
---
NOTE - Stijn's bump to 4.14.56 included a big warning
WARNING: EXT4 IMAGES ARE BROKEN WITH THIS KERNEL!!!
Personally not seen any evidence but this needs MORE TESTING!


 include/kernel-version.mk                          |   4 +-
 ...0001-crypto-crypto4xx-remove-bad-list_del.patch |  32 ----
 ...to4xx-remove-unused-definitions-and-write.patch |   2 +-
 ...to4xx-set-CRYPTO_ALG_KERN_DRIVER_ONLY-fla.patch |   2 +-
 ...to4xx-remove-double-assignment-of-pd_uinf.patch |   2 +-
 ...to4xx-enable-AES-RFC3686-ECB-CFB-and-OFB-.patch |   2 +-
 ...pto4xx-refactor-crypto4xx_copy_pkt_to_dst.patch |   2 +-
 ...to4xx-replace-crypto4xx_dev-s-scatter_buf.patch |   8 +-
 ...to4xx-fix-crypto4xx_build_pdr-crypto4xx_b.patch |  84 ----------
 .../802-usb-xhci-force-msi-renesas-xhci.patch      |   2 +-
 ...fix-register-address-in-ath79_ddr_wb_flus.patch |  27 ----
 .../patches-4.14/910-unaligned_access_hacks.patch  |  10 +-
 ...-add-support-for-performing-fake-doorbell.patch |   2 +-
 .../patches-4.14/830-huawei_e970_support.patch     |   4 +-
 ...-4.15-08-bcm63xx_enet-correct-clock-usage.patch | 101 ------------
 ...t-do-not-write-to-random-DMA-channel-on-B.patch |  29 ----
 ...macro-for-controlling-warnings-to-linux-c.patch |   2 +-
 .../025-tcp-allow-drivers-to-tweak-TSQ-logic.patch |   4 +-
 ...d-support-for-host-mode-external-vbus-sup.patch |  10 +-
 ...wc2-dwc2_vbus_supply_init-fix-error-check.patch |   2 +-
 ...-sock.sk_wmem_alloc-from-atomic_t-to-refc.patch | 172 ---------------------
 ...15-netfilter-exit_net-cleanup-check-added.patch |   2 +-
 .../generic/hack-4.14/207-disable-modorder.patch   |   4 +-
 .../hack-4.14/211-host_tools_portability.patch     |   2 +-
 .../linux/generic/hack-4.14/220-gc_sections.patch  |   2 +-
 .../linux/generic/hack-4.14/902-debloat_proc.patch |   2 +-
 ...rocess-negative-stack-offsets-on-stack-tr.patch |   2 +-
 ...-bridge_allow_receiption_on_disabled_port.patch |   4 +-
 ...-DMA-alignment-to-start-at-allocated-boun.patch | 126 ---------------
 .../pending-4.14/201-extra_optimization.patch      |   2 +-
 ...610-netfilter_match_bypass_default_checks.patch |   6 +-
 .../pending-4.14/630-packet_socket_type.patch      |   6 +-
 .../generic/pending-4.14/834-ledtrig-libata.patch  |  10 +-
 .../900-gen_stats-fix-netlink-stats-padding.patch  |  49 ------
 .../070-qcom-spm-fix-probe-order.patch             |   7 +-
 ...4019-use-v2-of-the-kpss-bringup-mechanism.patch |  15 +-
 ...9-add-cpu-operating-points-for-cpufreq-su.patch |   6 +-
 ...om-ipq4019-fix-cpu0-s-qcom-saw2-reg-value.patch |   7 +-
 .../074-ARM-qcom-Add-IPQ4019-SoC-support.patch     |  12 +-
 ...-phy-qcom-ipq4019-usb-add-binding-documen.patch |   6 -
 ...m-ipq4019-usb-add-driver-for-QCOM-IPQ4019.patch |  16 +-
 ...077-qcom-ipq4019-add-USB-devicetree-nodes.patch |  11 +-
 ...RM-dts-ipq4019-Add-a-few-peripheral-nodes.patch |  35 ++---
 .../079-ARM-dts-ipq4019-fix-PCI-range.patch        |   4 +-
 ...ctrl-msm-fix-gpio-hog-related-boot-issues.patch |   2 +-
 .../081-clk-fix-apss-cpu-overclocking.patch        |  13 +-
 ...-ipq4019-Add-TZ-and-SMEM-reserved-regions.patch |   4 +-
 ...ubi-add-quirk-to-autoload-ubi-on-rt-ac58u.patch |   6 +-
 .../701-dts-ipq4019-add-mdio-node.patch            |   6 +-
 .../702-dts-ipq4019-add-PHY-switch-nodes.patch     |   6 +-
 ...711-dts-ipq4019-add-ethernet-essedma-node.patch |   6 +-
 .../patches-4.14/900-dts-ipq4019-ap-dk01.1.patch   |  12 +-
 .../patches-4.14/0052-net-phy-add-FC.patch         |   2 +-
 ...ci-allow-imod-interval-to-be-configurable.patch |   2 +-
 .../0227-arm-dts-Add-Unielec-U7623-DTS.patch       |  11 --
 .../oxnas/patches-4.14/999-libata-hacks.patch      |   8 +-
 ...td-fix-cfi-cmdset-0002-erase-status-check.patch |  29 ----
 ...0037-mtd-cfi-cmdset-0002-force-word-write.patch |   2 +-
 58 files changed, 115 insertions(+), 833 deletions(-)
 delete mode 100644 target/linux/apm821xx/patches-4.14/020-0001-crypto-crypto4xx-remove-bad-list_del.patch
 delete mode 100644 target/linux/apm821xx/patches-4.14/020-0011-crypto-crypto4xx-fix-crypto4xx_build_pdr-crypto4xx_b.patch
 delete mode 100644 target/linux/ath79/patches-4.14/0011-MIPS-ath79-fix-register-address-in-ath79_ddr_wb_flus.patch
 delete mode 100644 target/linux/brcm63xx/patches-4.14/001-4.15-08-bcm63xx_enet-correct-clock-usage.patch
 delete mode 100644 target/linux/brcm63xx/patches-4.14/001-4.15-09-bcm63xx_enet-do-not-write-to-random-DMA-channel-on-B.patch
 delete mode 100644 target/linux/generic/backport-4.14/080-net-convert-sock.sk_wmem_alloc-from-atomic_t-to-refc.patch
 delete mode 100644 target/linux/generic/pending-4.14/170-usb-dwc2-Fix-DMA-alignment-to-start-at-allocated-boun.patch
 delete mode 100644 target/linux/generic/pending-4.14/900-gen_stats-fix-netlink-stats-padding.patch
 delete mode 100644 target/linux/ramips/patches-4.14/0036-mtd-fix-cfi-cmdset-0002-erase-status-check.patch

diff --git a/include/kernel-version.mk b/include/kernel-version.mk
index f0d8160e34..5eeee613b6 100644
--- a/include/kernel-version.mk
+++ b/include/kernel-version.mk
@@ -5,12 +5,12 @@ LINUX_RELEASE?=1
 LINUX_VERSION-3.18 = .71
 LINUX_VERSION-4.4 = .121
 LINUX_VERSION-4.9 = .111
-LINUX_VERSION-4.14 = .54
+LINUX_VERSION-4.14 = .59
 
 LINUX_KERNEL_HASH-3.18.71 = 5abc9778ad44ce02ed6c8ab52ece8a21c6d20d21f6ed8a19287b4a38a50c1240
 LINUX_KERNEL_HASH-4.4.121 = 44a88268b5088dc326b30c9b9133ac35a9a200b636b7268d08f32abeae6ca729
 LINUX_KERNEL_HASH-4.9.111 = 5966558959dc580f163766f3fdefd7e57c01b2b45d51202d00b3807c253759dd
-LINUX_KERNEL_HASH-4.14.54 = 451642ac28c539a91072f1fb83b1c061d6d44df870ddf5562400ade5e1c4b6c6
+LINUX_KERNEL_HASH-4.14.59 = 7ec633c661bba941239e340bb35391d356eda541fb4c323d07034d09d05b319b
 
 remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
 sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1)))))))
diff --git a/target/linux/apm821xx/patches-4.14/020-0001-crypto-crypto4xx-remove-bad-list_del.patch b/target/linux/apm821xx/patches-4.14/020-0001-crypto-crypto4xx-remove-bad-list_del.patch
deleted file mode 100644
index 8df0937e4d..0000000000
--- a/target/linux/apm821xx/patches-4.14/020-0001-crypto-crypto4xx-remove-bad-list_del.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From a728a196d253530f17da5c86dc7dfbe58c5f7094 Mon Sep 17 00:00:00 2001
-From: Christian Lamparter <chunkeey at googlemail.com>
-Date: Fri, 25 Aug 2017 15:47:14 +0200
-Subject: [PATCH 01/25] crypto: crypto4xx - remove bad list_del
-
-alg entries are only added to the list, after the registration
-was successful. If the registration failed, it was never added
-to the list in the first place.
-
-Signed-off-by: Christian Lamparter <chunkeey at googlemail.com>
-Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
----
- drivers/crypto/amcc/crypto4xx_core.c | 6 ++----
- 1 file changed, 2 insertions(+), 4 deletions(-)
-
---- a/drivers/crypto/amcc/crypto4xx_core.c
-+++ b/drivers/crypto/amcc/crypto4xx_core.c
-@@ -1033,12 +1033,10 @@ int crypto4xx_register_alg(struct crypto
- 			break;
- 		}
- 
--		if (rc) {
--			list_del(&alg->entry);
-+		if (rc)
- 			kfree(alg);
--		} else {
-+		else
- 			list_add_tail(&alg->entry, &sec_dev->alg_list);
--		}
- 	}
- 
- 	return 0;
diff --git a/target/linux/apm821xx/patches-4.14/020-0002-crypto-crypto4xx-remove-unused-definitions-and-write.patch b/target/linux/apm821xx/patches-4.14/020-0002-crypto-crypto4xx-remove-unused-definitions-and-write.patch
index 5983246344..466f0a0a78 100644
--- a/target/linux/apm821xx/patches-4.14/020-0002-crypto-crypto4xx-remove-unused-definitions-and-write.patch
+++ b/target/linux/apm821xx/patches-4.14/020-0002-crypto-crypto4xx-remove-unused-definitions-and-write.patch
@@ -67,7 +67,7 @@ Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
  
 --- a/drivers/crypto/amcc/crypto4xx_core.c
 +++ b/drivers/crypto/amcc/crypto4xx_core.c
-@@ -962,7 +962,7 @@ u32 crypto4xx_build_pd(struct crypto_asy
+@@ -964,7 +964,7 @@ u32 crypto4xx_build_pd(struct crypto_asy
  
  	sa->sa_command_1.bf.hash_crypto_offset = 0;
  	pd->pd_ctl.w = ctx->pd_ctl;
diff --git a/target/linux/apm821xx/patches-4.14/020-0003-crypto-crypto4xx-set-CRYPTO_ALG_KERN_DRIVER_ONLY-fla.patch b/target/linux/apm821xx/patches-4.14/020-0003-crypto-crypto4xx-set-CRYPTO_ALG_KERN_DRIVER_ONLY-fla.patch
index e50a418284..c195b88c2f 100644
--- a/target/linux/apm821xx/patches-4.14/020-0003-crypto-crypto4xx-set-CRYPTO_ALG_KERN_DRIVER_ONLY-fla.patch
+++ b/target/linux/apm821xx/patches-4.14/020-0003-crypto-crypto4xx-set-CRYPTO_ALG_KERN_DRIVER_ONLY-fla.patch
@@ -18,7 +18,7 @@ Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
 
 --- a/drivers/crypto/amcc/crypto4xx_core.c
 +++ b/drivers/crypto/amcc/crypto4xx_core.c
-@@ -1114,7 +1114,9 @@ struct crypto4xx_alg_common crypto4xx_al
+@@ -1116,7 +1116,9 @@ struct crypto4xx_alg_common crypto4xx_al
  		.cra_name 	= "cbc(aes)",
  		.cra_driver_name = "cbc-aes-ppc4xx",
  		.cra_priority 	= CRYPTO4XX_CRYPTO_PRIORITY,
diff --git a/target/linux/apm821xx/patches-4.14/020-0005-crypto-crypto4xx-remove-double-assignment-of-pd_uinf.patch b/target/linux/apm821xx/patches-4.14/020-0005-crypto-crypto4xx-remove-double-assignment-of-pd_uinf.patch
index 4fc3617576..03c402d975 100644
--- a/target/linux/apm821xx/patches-4.14/020-0005-crypto-crypto4xx-remove-double-assignment-of-pd_uinf.patch
+++ b/target/linux/apm821xx/patches-4.14/020-0005-crypto-crypto4xx-remove-double-assignment-of-pd_uinf.patch
@@ -14,7 +14,7 @@ Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
 
 --- a/drivers/crypto/amcc/crypto4xx_core.c
 +++ b/drivers/crypto/amcc/crypto4xx_core.c
-@@ -1079,7 +1079,6 @@ static void crypto4xx_bh_tasklet_cb(unsi
+@@ -1081,7 +1081,6 @@ static void crypto4xx_bh_tasklet_cb(unsi
  			pd->pd_ctl.bf.pe_done = 0;
  			crypto4xx_pd_done(core_dev->dev, tail);
  			crypto4xx_put_pd_to_pdr(core_dev->dev, tail);
diff --git a/target/linux/apm821xx/patches-4.14/020-0008-crypto-crypto4xx-enable-AES-RFC3686-ECB-CFB-and-OFB-.patch b/target/linux/apm821xx/patches-4.14/020-0008-crypto-crypto4xx-enable-AES-RFC3686-ECB-CFB-and-OFB-.patch
index 9977c60d26..d19a41ec13 100644
--- a/target/linux/apm821xx/patches-4.14/020-0008-crypto-crypto4xx-enable-AES-RFC3686-ECB-CFB-and-OFB-.patch
+++ b/target/linux/apm821xx/patches-4.14/020-0008-crypto-crypto4xx-enable-AES-RFC3686-ECB-CFB-and-OFB-.patch
@@ -109,7 +109,7 @@ Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
  #include <crypto/sha.h>
  #include "crypto4xx_reg_def.h"
  #include "crypto4xx_core.h"
-@@ -1133,6 +1134,103 @@ struct crypto4xx_alg_common crypto4xx_al
+@@ -1135,6 +1136,103 @@ struct crypto4xx_alg_common crypto4xx_al
  			}
  		}
  	}},
diff --git a/target/linux/apm821xx/patches-4.14/020-0009-crypto-crypto4xx-refactor-crypto4xx_copy_pkt_to_dst.patch b/target/linux/apm821xx/patches-4.14/020-0009-crypto-crypto4xx-refactor-crypto4xx_copy_pkt_to_dst.patch
index c6ccade8c1..e74ed7f56b 100644
--- a/target/linux/apm821xx/patches-4.14/020-0009-crypto-crypto4xx-refactor-crypto4xx_copy_pkt_to_dst.patch
+++ b/target/linux/apm821xx/patches-4.14/020-0009-crypto-crypto4xx-refactor-crypto4xx_copy_pkt_to_dst.patch
@@ -27,7 +27,7 @@ Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
  #include "crypto4xx_reg_def.h"
  #include "crypto4xx_core.h"
  #include "crypto4xx_sa.h"
-@@ -481,111 +482,44 @@ static inline struct ce_sd *crypto4xx_ge
+@@ -483,111 +484,44 @@ static inline struct ce_sd *crypto4xx_ge
  	return  (struct ce_sd *)(dev->sdr + sizeof(struct ce_sd) * idx);
  }
  
diff --git a/target/linux/apm821xx/patches-4.14/020-0010-crypto-crypto4xx-replace-crypto4xx_dev-s-scatter_buf.patch b/target/linux/apm821xx/patches-4.14/020-0010-crypto-crypto4xx-replace-crypto4xx_dev-s-scatter_buf.patch
index 90a6dab2d7..5ca3faa4dc 100644
--- a/target/linux/apm821xx/patches-4.14/020-0010-crypto-crypto4xx-replace-crypto4xx_dev-s-scatter_buf.patch
+++ b/target/linux/apm821xx/patches-4.14/020-0010-crypto-crypto4xx-replace-crypto4xx_dev-s-scatter_buf.patch
@@ -17,7 +17,7 @@ Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
 
 --- a/drivers/crypto/amcc/crypto4xx_core.c
 +++ b/drivers/crypto/amcc/crypto4xx_core.c
-@@ -394,10 +394,9 @@ static u32 crypto4xx_build_sdr(struct cr
+@@ -396,10 +396,9 @@ static u32 crypto4xx_build_sdr(struct cr
  	if (!dev->sdr)
  		return -ENOMEM;
  
@@ -29,7 +29,7 @@ Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
  			&dev->scatter_buffer_pa, GFP_ATOMIC);
  	if (!dev->scatter_buffer_va) {
  		dma_free_coherent(dev->core_dev->device,
-@@ -410,7 +409,7 @@ static u32 crypto4xx_build_sdr(struct cr
+@@ -412,7 +411,7 @@ static u32 crypto4xx_build_sdr(struct cr
  
  	for (i = 0; i < PPC4XX_NUM_SD; i++) {
  		sd_array[i].ptr = dev->scatter_buffer_pa +
@@ -38,9 +38,9 @@ Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
  	}
  
  	return 0;
-@@ -425,7 +424,7 @@ static void crypto4xx_destroy_sdr(struct
+@@ -427,7 +426,7 @@ static void crypto4xx_destroy_sdr(struct
  
- 	if (dev->scatter_buffer_va != NULL)
+ 	if (dev->scatter_buffer_va)
  		dma_free_coherent(dev->core_dev->device,
 -				  dev->scatter_buffer_size * PPC4XX_NUM_SD,
 +				  PPC4XX_SD_BUFFER_SIZE * PPC4XX_NUM_SD,
diff --git a/target/linux/apm821xx/patches-4.14/020-0011-crypto-crypto4xx-fix-crypto4xx_build_pdr-crypto4xx_b.patch b/target/linux/apm821xx/patches-4.14/020-0011-crypto-crypto4xx-fix-crypto4xx_build_pdr-crypto4xx_b.patch
deleted file mode 100644
index 837fbdc547..0000000000
--- a/target/linux/apm821xx/patches-4.14/020-0011-crypto-crypto4xx-fix-crypto4xx_build_pdr-crypto4xx_b.patch
+++ /dev/null
@@ -1,84 +0,0 @@
-From 5d59ad6eea82ef8df92b4109615a0dde9d8093e9 Mon Sep 17 00:00:00 2001
-From: Christian Lamparter <chunkeey at googlemail.com>
-Date: Fri, 25 Aug 2017 15:47:24 +0200
-Subject: [PATCH 11/25] crypto: crypto4xx - fix crypto4xx_build_pdr,
- crypto4xx_build_sdr leak
-
-If one of the later memory allocations in rypto4xx_build_pdr()
-fails: dev->pdr (and/or) dev->pdr_uinfo wouldn't be freed.
-
-crypto4xx_build_sdr() has the same issue with dev->sdr.
-
-Signed-off-by: Christian Lamparter <chunkeey at googlemail.com>
-Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
----
- drivers/crypto/amcc/crypto4xx_core.c | 17 +++++++++--------
- 1 file changed, 9 insertions(+), 8 deletions(-)
-
---- a/drivers/crypto/amcc/crypto4xx_core.c
-+++ b/drivers/crypto/amcc/crypto4xx_core.c
-@@ -209,7 +209,7 @@ static u32 crypto4xx_build_pdr(struct cr
- 				  dev->pdr_pa);
- 		return -ENOMEM;
- 	}
--	memset(dev->pdr, 0,  sizeof(struct ce_pd) * PPC4XX_NUM_PD);
-+	memset(dev->pdr, 0, sizeof(struct ce_pd) * PPC4XX_NUM_PD);
- 	dev->shadow_sa_pool = dma_alloc_coherent(dev->core_dev->device,
- 				   256 * PPC4XX_NUM_PD,
- 				   &dev->shadow_sa_pool_pa,
-@@ -242,13 +242,15 @@ static u32 crypto4xx_build_pdr(struct cr
- 
- static void crypto4xx_destroy_pdr(struct crypto4xx_device *dev)
- {
--	if (dev->pdr != NULL)
-+	if (dev->pdr)
- 		dma_free_coherent(dev->core_dev->device,
- 				  sizeof(struct ce_pd) * PPC4XX_NUM_PD,
- 				  dev->pdr, dev->pdr_pa);
-+
- 	if (dev->shadow_sa_pool)
- 		dma_free_coherent(dev->core_dev->device, 256 * PPC4XX_NUM_PD,
- 				  dev->shadow_sa_pool, dev->shadow_sa_pool_pa);
-+
- 	if (dev->shadow_sr_pool)
- 		dma_free_coherent(dev->core_dev->device,
- 			sizeof(struct sa_state_record) * PPC4XX_NUM_PD,
-@@ -417,12 +419,12 @@ static u32 crypto4xx_build_sdr(struct cr
- 
- static void crypto4xx_destroy_sdr(struct crypto4xx_device *dev)
- {
--	if (dev->sdr != NULL)
-+	if (dev->sdr)
- 		dma_free_coherent(dev->core_dev->device,
- 				  sizeof(struct ce_sd) * PPC4XX_NUM_SD,
- 				  dev->sdr, dev->sdr_pa);
- 
--	if (dev->scatter_buffer_va != NULL)
-+	if (dev->scatter_buffer_va)
- 		dma_free_coherent(dev->core_dev->device,
- 				  PPC4XX_SD_BUFFER_SIZE * PPC4XX_NUM_SD,
- 				  dev->scatter_buffer_va,
-@@ -1223,7 +1225,7 @@ static int crypto4xx_probe(struct platfo
- 
- 	rc = crypto4xx_build_gdr(core_dev->dev);
- 	if (rc)
--		goto err_build_gdr;
-+		goto err_build_pdr;
- 
- 	rc = crypto4xx_build_sdr(core_dev->dev);
- 	if (rc)
-@@ -1266,12 +1268,11 @@ err_iomap:
- err_request_irq:
- 	irq_dispose_mapping(core_dev->irq);
- 	tasklet_kill(&core_dev->tasklet);
--	crypto4xx_destroy_sdr(core_dev->dev);
- err_build_sdr:
-+	crypto4xx_destroy_sdr(core_dev->dev);
- 	crypto4xx_destroy_gdr(core_dev->dev);
--err_build_gdr:
--	crypto4xx_destroy_pdr(core_dev->dev);
- err_build_pdr:
-+	crypto4xx_destroy_pdr(core_dev->dev);
- 	kfree(core_dev->dev);
- err_alloc_dev:
- 	kfree(core_dev);
diff --git a/target/linux/apm821xx/patches-4.14/802-usb-xhci-force-msi-renesas-xhci.patch b/target/linux/apm821xx/patches-4.14/802-usb-xhci-force-msi-renesas-xhci.patch
index 3545b99aab..1e781b5dae 100644
--- a/target/linux/apm821xx/patches-4.14/802-usb-xhci-force-msi-renesas-xhci.patch
+++ b/target/linux/apm821xx/patches-4.14/802-usb-xhci-force-msi-renesas-xhci.patch
@@ -44,7 +44,7 @@ produce a noisy warning.
  		hcd->msi_enabled = 1;
 --- a/drivers/usb/host/xhci.h
 +++ b/drivers/usb/host/xhci.h
-@@ -1850,6 +1850,7 @@ struct xhci_hcd {
+@@ -1854,6 +1854,7 @@ struct xhci_hcd {
  	/* support xHCI 0.96 spec USB2 software LPM */
  	unsigned		sw_lpm_support:1;
  	/* support xHCI 1.0 spec USB2 hardware LPM */
diff --git a/target/linux/ath79/patches-4.14/0011-MIPS-ath79-fix-register-address-in-ath79_ddr_wb_flus.patch b/target/linux/ath79/patches-4.14/0011-MIPS-ath79-fix-register-address-in-ath79_ddr_wb_flus.patch
deleted file mode 100644
index 85ee24c208..0000000000
--- a/target/linux/ath79/patches-4.14/0011-MIPS-ath79-fix-register-address-in-ath79_ddr_wb_flus.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 54204ef3edbb1aa2390cabba61fe185a12cc39f0 Mon Sep 17 00:00:00 2001
-From: Felix Fietkau <nbd at nbd.name>
-Date: Tue, 6 Mar 2018 08:35:44 +0100
-Subject: [PATCH 11/27] MIPS: ath79: fix register address in
- ath79_ddr_wb_flush()
-
-ath79_ddr_wb_flush_base has the type void __iomem *, so register offsets
-need to be a multiple of 4.
-
-Cc: Alban Bedel <albeu at free.fr>
-Fixes: 24b0e3e84fbf ("MIPS: ath79: Improve the DDR controller interface")
-Signed-off-by: Felix Fietkau <nbd at nbd.name>
----
- arch/mips/ath79/common.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/arch/mips/ath79/common.c
-+++ b/arch/mips/ath79/common.c
-@@ -58,7 +58,7 @@ EXPORT_SYMBOL_GPL(ath79_ddr_ctrl_init);
- 
- void ath79_ddr_wb_flush(u32 reg)
- {
--	void __iomem *flush_reg = ath79_ddr_wb_flush_base + reg;
-+	void __iomem *flush_reg = ath79_ddr_wb_flush_base + (reg * 4);
- 
- 	/* Flush the DDR write buffer. */
- 	__raw_writel(0x1, flush_reg);
diff --git a/target/linux/ath79/patches-4.14/910-unaligned_access_hacks.patch b/target/linux/ath79/patches-4.14/910-unaligned_access_hacks.patch
index 9897679a62..fc9dce2d85 100644
--- a/target/linux/ath79/patches-4.14/910-unaligned_access_hacks.patch
+++ b/target/linux/ath79/patches-4.14/910-unaligned_access_hacks.patch
@@ -250,7 +250,7 @@
  					       &sin->sin6_addr);
  			sin->sin6_scope_id = 0;
  		}
-@@ -833,12 +833,12 @@ int ip6_datagram_send_ctl(struct net *ne
+@@ -836,12 +836,12 @@ int ip6_datagram_send_ctl(struct net *ne
  			}
  
  			if (fl6->flowlabel&IPV6_FLOWINFO_MASK) {
@@ -327,7 +327,7 @@
  	return neigh_create(&arp_tbl, pkey, dev);
 --- a/net/ipv4/tcp_output.c
 +++ b/net/ipv4/tcp_output.c
-@@ -449,48 +449,53 @@ static void tcp_options_write(__be32 *pt
+@@ -454,48 +454,53 @@ static void tcp_options_write(__be32 *pt
  	u16 options = opts->options;	/* mungable copy */
  
  	if (unlikely(OPTION_MD5 & options)) {
@@ -404,7 +404,7 @@
  	}
  
  	if (unlikely(opts->num_sack_blocks)) {
-@@ -498,16 +503,17 @@ static void tcp_options_write(__be32 *pt
+@@ -503,16 +508,17 @@ static void tcp_options_write(__be32 *pt
  			tp->duplicate_sack : tp->selective_acks;
  		int this_sack;
  
@@ -428,7 +428,7 @@
  		}
  
  		tp->rx_opt.dsack = 0;
-@@ -520,13 +526,14 @@ static void tcp_options_write(__be32 *pt
+@@ -525,13 +531,14 @@ static void tcp_options_write(__be32 *pt
  
  		if (foc->exp) {
  			len = TCPOLEN_EXP_FASTOPEN_BASE + foc->len;
@@ -737,7 +737,7 @@
  EXPORT_SYMBOL(xfrm_parse_spi);
 --- a/net/ipv4/tcp_input.c
 +++ b/net/ipv4/tcp_input.c
-@@ -3844,14 +3844,16 @@ static bool tcp_parse_aligned_timestamp(
+@@ -3854,14 +3854,16 @@ static bool tcp_parse_aligned_timestamp(
  {
  	const __be32 *ptr = (const __be32 *)(th + 1);
  
diff --git a/target/linux/bcm53xx/patches-4.14/180-usb-xhci-add-support-for-performing-fake-doorbell.patch b/target/linux/bcm53xx/patches-4.14/180-usb-xhci-add-support-for-performing-fake-doorbell.patch
index 3bee392f4f..ac622010ff 100644
--- a/target/linux/bcm53xx/patches-4.14/180-usb-xhci-add-support-for-performing-fake-doorbell.patch
+++ b/target/linux/bcm53xx/patches-4.14/180-usb-xhci-add-support-for-performing-fake-doorbell.patch
@@ -127,7 +127,7 @@ it on BCM4708 family.
  /*
 --- a/drivers/usb/host/xhci.h
 +++ b/drivers/usb/host/xhci.h
-@@ -1831,6 +1831,7 @@ struct xhci_hcd {
+@@ -1835,6 +1835,7 @@ struct xhci_hcd {
  #define XHCI_LIMIT_ENDPOINT_INTERVAL_7	(1 << 26)
  #define XHCI_U2_DISABLE_WAKE	(1 << 27)
  #define XHCI_ASMEDIA_MODIFY_FLOWCONTROL	(1 << 28)
diff --git a/target/linux/brcm47xx/patches-4.14/830-huawei_e970_support.patch b/target/linux/brcm47xx/patches-4.14/830-huawei_e970_support.patch
index 5d40fe6541..b6150ed8fd 100644
--- a/target/linux/brcm47xx/patches-4.14/830-huawei_e970_support.patch
+++ b/target/linux/brcm47xx/patches-4.14/830-huawei_e970_support.patch
@@ -8,7 +8,7 @@
  #include <asm/bootinfo.h>
  #include <asm/idle.h>
  #include <asm/prom.h>
-@@ -231,6 +232,33 @@ static struct fixed_phy_status bcm47xx_f
+@@ -225,6 +226,33 @@ static struct fixed_phy_status bcm47xx_f
  	.duplex	= DUPLEX_FULL,
  };
  
@@ -42,7 +42,7 @@
  static int __init bcm47xx_register_bus_complete(void)
  {
  	switch (bcm47xx_bus_type) {
-@@ -250,6 +278,7 @@ static int __init bcm47xx_register_bus_c
+@@ -244,6 +272,7 @@ static int __init bcm47xx_register_bus_c
  	bcm47xx_workarounds();
  
  	fixed_phy_add(PHY_POLL, 0, &bcm47xx_fixed_phy_status, -1);
diff --git a/target/linux/brcm63xx/patches-4.14/001-4.15-08-bcm63xx_enet-correct-clock-usage.patch b/target/linux/brcm63xx/patches-4.14/001-4.15-08-bcm63xx_enet-correct-clock-usage.patch
deleted file mode 100644
index bd66e72c91..0000000000
--- a/target/linux/brcm63xx/patches-4.14/001-4.15-08-bcm63xx_enet-correct-clock-usage.patch
+++ /dev/null
@@ -1,101 +0,0 @@
-From d0423d3e4fa7ae305729cb50369427f075ccb279 Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jonas.gorski at gmail.com>
-Date: Sat, 25 Feb 2017 12:41:28 +0100
-Subject: [PATCH 1/6] bcm63xx_enet: correct clock usage
-
-Check the return code of prepare_enable and change one last instance of
-enable only to prepare_enable. Also properly disable and release the
-clock in error paths and on remove for enetsw.
-
-Signed-off-by: Jonas Gorski <jonas.gorski at gmail.com>
----
- drivers/net/ethernet/broadcom/bcm63xx_enet.c | 31 +++++++++++++++++++++-------
- 1 file changed, 23 insertions(+), 8 deletions(-)
-
---- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c
-+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
-@@ -1773,7 +1773,9 @@ static int bcm_enet_probe(struct platfor
- 		ret = PTR_ERR(priv->mac_clk);
- 		goto out;
- 	}
--	clk_prepare_enable(priv->mac_clk);
-+	ret = clk_prepare_enable(priv->mac_clk);
-+	if (ret)
-+		goto out_put_clk_mac;
- 
- 	/* initialize default and fetch platform data */
- 	priv->rx_ring_size = BCMENET_DEF_RX_DESC;
-@@ -1805,9 +1807,11 @@ static int bcm_enet_probe(struct platfor
- 		if (IS_ERR(priv->phy_clk)) {
- 			ret = PTR_ERR(priv->phy_clk);
- 			priv->phy_clk = NULL;
--			goto out_put_clk_mac;
-+			goto out_disable_clk_mac;
- 		}
--		clk_prepare_enable(priv->phy_clk);
-+		ret = clk_prepare_enable(priv->phy_clk);
-+		if (ret)
-+			goto out_put_clk_phy;
- 	}
- 
- 	/* do minimal hardware init to be able to probe mii bus */
-@@ -1901,13 +1905,16 @@ out_free_mdio:
- out_uninit_hw:
- 	/* turn off mdc clock */
- 	enet_writel(priv, 0, ENET_MIISC_REG);
--	if (priv->phy_clk) {
-+	if (priv->phy_clk)
- 		clk_disable_unprepare(priv->phy_clk);
-+
-+out_put_clk_phy:
-+	if (priv->phy_clk)
- 		clk_put(priv->phy_clk);
--	}
- 
--out_put_clk_mac:
-+out_disable_clk_mac:
- 	clk_disable_unprepare(priv->mac_clk);
-+out_put_clk_mac:
- 	clk_put(priv->mac_clk);
- out:
- 	free_netdev(dev);
-@@ -2752,7 +2759,9 @@ static int bcm_enetsw_probe(struct platf
- 		ret = PTR_ERR(priv->mac_clk);
- 		goto out_unmap;
- 	}
--	clk_enable(priv->mac_clk);
-+	ret = clk_prepare_enable(priv->mac_clk);
-+	if (ret)
-+		goto out_put_clk;
- 
- 	priv->rx_chan = 0;
- 	priv->tx_chan = 1;
-@@ -2773,7 +2782,7 @@ static int bcm_enetsw_probe(struct platf
- 
- 	ret = register_netdev(dev);
- 	if (ret)
--		goto out_put_clk;
-+		goto out_disable_clk;
- 
- 	netif_carrier_off(dev);
- 	platform_set_drvdata(pdev, dev);
-@@ -2782,6 +2791,9 @@ static int bcm_enetsw_probe(struct platf
- 
- 	return 0;
- 
-+out_disable_clk:
-+	clk_disable_unprepare(priv->mac_clk);
-+
- out_put_clk:
- 	clk_put(priv->mac_clk);
- 
-@@ -2813,6 +2825,9 @@ static int bcm_enetsw_remove(struct plat
- 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- 	release_mem_region(res->start, resource_size(res));
- 
-+	clk_disable_unprepare(priv->mac_clk);
-+	clk_put(priv->mac_clk);
-+
- 	free_netdev(dev);
- 	return 0;
- }
diff --git a/target/linux/brcm63xx/patches-4.14/001-4.15-09-bcm63xx_enet-do-not-write-to-random-DMA-channel-on-B.patch b/target/linux/brcm63xx/patches-4.14/001-4.15-09-bcm63xx_enet-do-not-write-to-random-DMA-channel-on-B.patch
deleted file mode 100644
index 22b3a732f9..0000000000
--- a/target/linux/brcm63xx/patches-4.14/001-4.15-09-bcm63xx_enet-do-not-write-to-random-DMA-channel-on-B.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 23d94cb855b6f4f0ee1c01679224472104ac6440 Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jonas.gorski at gmail.com>
-Date: Sat, 30 Sep 2017 14:10:18 +0200
-Subject: [PATCH 2/6] bcm63xx_enet: do not write to random DMA channel on
- BCM6345
-
-The DMA controller regs actually point to DMA channel 0, so the write to
-ENETDMA_CFG_REG will actually modify a random DMA channel.
-
-Since DMA controller registers do not exist on BCM6345, guard the write
-with the usual check for dma_has_sram.
-
-Signed-off-by: Jonas Gorski <jonas.gorski at gmail.com>
----
- drivers/net/ethernet/broadcom/bcm63xx_enet.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
---- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c
-+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
-@@ -1062,7 +1062,8 @@ static int bcm_enet_open(struct net_devi
- 	val = enet_readl(priv, ENET_CTL_REG);
- 	val |= ENET_CTL_ENABLE_MASK;
- 	enet_writel(priv, val, ENET_CTL_REG);
--	enet_dma_writel(priv, ENETDMA_CFG_EN_MASK, ENETDMA_CFG_REG);
-+	if (priv->dma_has_sram)
-+		enet_dma_writel(priv, ENETDMA_CFG_EN_MASK, ENETDMA_CFG_REG);
- 	enet_dmac_writel(priv, priv->dma_chan_en_mask,
- 			 ENETDMAC_CHANCFG, priv->rx_chan);
- 
diff --git a/target/linux/generic/backport-4.14/012-kbuild-add-macro-for-controlling-warnings-to-linux-c.patch b/target/linux/generic/backport-4.14/012-kbuild-add-macro-for-controlling-warnings-to-linux-c.patch
index 6b56a68b31..892b65fbc0 100644
--- a/target/linux/generic/backport-4.14/012-kbuild-add-macro-for-controlling-warnings-to-linux-c.patch
+++ b/target/linux/generic/backport-4.14/012-kbuild-add-macro-for-controlling-warnings-to-linux-c.patch
@@ -84,7 +84,7 @@ Signed-off-by: Masahiro Yamada <yamada.masahiro at socionext.com>
 
 --- a/include/linux/compiler-gcc.h
 +++ b/include/linux/compiler-gcc.h
-@@ -343,3 +343,28 @@
+@@ -358,3 +358,28 @@
   * code
   */
  #define uninitialized_var(x) x = x
diff --git a/target/linux/generic/backport-4.14/025-tcp-allow-drivers-to-tweak-TSQ-logic.patch b/target/linux/generic/backport-4.14/025-tcp-allow-drivers-to-tweak-TSQ-logic.patch
index 89117bd874..d9215505ee 100644
--- a/target/linux/generic/backport-4.14/025-tcp-allow-drivers-to-tweak-TSQ-logic.patch
+++ b/target/linux/generic/backport-4.14/025-tcp-allow-drivers-to-tweak-TSQ-logic.patch
@@ -65,7 +65,7 @@ Cc: Kir Kolyshkin <kir at openvz.org>
  	 * Before updating sk_refcnt, we must commit prior changes to memory
 --- a/net/ipv4/tcp_output.c
 +++ b/net/ipv4/tcp_output.c
-@@ -1671,7 +1671,7 @@ u32 tcp_tso_autosize(const struct sock *
+@@ -1683,7 +1683,7 @@ u32 tcp_tso_autosize(const struct sock *
  {
  	u32 bytes, segs;
  
@@ -74,7 +74,7 @@ Cc: Kir Kolyshkin <kir at openvz.org>
  		    sk->sk_gso_max_size - 1 - MAX_TCP_HEADER);
  
  	/* Goal is to send at least one packet per ms,
-@@ -2172,7 +2172,7 @@ static bool tcp_small_queue_check(struct
+@@ -2184,7 +2184,7 @@ static bool tcp_small_queue_check(struct
  {
  	unsigned int limit;
  
diff --git a/target/linux/generic/backport-4.14/030-v4.17-0001-usb-dwc2-add-support-for-host-mode-external-vbus-sup.patch b/target/linux/generic/backport-4.14/030-v4.17-0001-usb-dwc2-add-support-for-host-mode-external-vbus-sup.patch
index 1154150259..dc85efd1e1 100644
--- a/target/linux/generic/backport-4.14/030-v4.17-0001-usb-dwc2-add-support-for-host-mode-external-vbus-sup.patch
+++ b/target/linux/generic/backport-4.14/030-v4.17-0001-usb-dwc2-add-support-for-host-mode-external-vbus-sup.patch
@@ -63,7 +63,7 @@ Signed-off-by: Felipe Balbi <felipe.balbi at linux.intel.com>
  /**
   * dwc2_enable_host_interrupts() - Enables the Host mode interrupts
   *
-@@ -3276,6 +3293,7 @@ static void dwc2_conn_id_status_change(s
+@@ -3278,6 +3295,7 @@ static void dwc2_conn_id_status_change(s
  
  	/* B-Device connector (Device Mode) */
  	if (gotgctl & GOTGCTL_CONID_B) {
@@ -71,7 +71,7 @@ Signed-off-by: Felipe Balbi <felipe.balbi at linux.intel.com>
  		/* Wait for switch to device mode */
  		dev_dbg(hsotg->dev, "connId B\n");
  		if (hsotg->bus_suspended) {
-@@ -4382,6 +4400,9 @@ static int _dwc2_hcd_start(struct usb_hc
+@@ -4384,6 +4402,9 @@ static int _dwc2_hcd_start(struct usb_hc
  	}
  
  	spin_unlock_irqrestore(&hsotg->lock, flags);
@@ -81,7 +81,7 @@ Signed-off-by: Felipe Balbi <felipe.balbi at linux.intel.com>
  	return 0;
  }
  
-@@ -4409,6 +4430,8 @@ static void _dwc2_hcd_stop(struct usb_hc
+@@ -4411,6 +4432,8 @@ static void _dwc2_hcd_stop(struct usb_hc
  	clear_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags);
  	spin_unlock_irqrestore(&hsotg->lock, flags);
  
@@ -90,7 +90,7 @@ Signed-off-by: Felipe Balbi <felipe.balbi at linux.intel.com>
  	usleep_range(1000, 3000);
  }
  
-@@ -4445,6 +4468,7 @@ static int _dwc2_hcd_suspend(struct usb_
+@@ -4447,6 +4470,7 @@ static int _dwc2_hcd_suspend(struct usb_
  		hprt0 |= HPRT0_SUSP;
  		hprt0 &= ~HPRT0_PWR;
  		dwc2_writel(hprt0, hsotg->regs + HPRT0);
@@ -98,7 +98,7 @@ Signed-off-by: Felipe Balbi <felipe.balbi at linux.intel.com>
  	}
  
  	/* Enter hibernation */
-@@ -4525,6 +4549,8 @@ static int _dwc2_hcd_resume(struct usb_h
+@@ -4527,6 +4551,8 @@ static int _dwc2_hcd_resume(struct usb_h
  		spin_unlock_irqrestore(&hsotg->lock, flags);
  		dwc2_port_resume(hsotg);
  	} else {
diff --git a/target/linux/generic/backport-4.14/030-v4.17-0002-usb-dwc2-dwc2_vbus_supply_init-fix-error-check.patch b/target/linux/generic/backport-4.14/030-v4.17-0002-usb-dwc2-dwc2_vbus_supply_init-fix-error-check.patch
index f860cde0f6..8dac0bffc2 100644
--- a/target/linux/generic/backport-4.14/030-v4.17-0002-usb-dwc2-dwc2_vbus_supply_init-fix-error-check.patch
+++ b/target/linux/generic/backport-4.14/030-v4.17-0002-usb-dwc2-dwc2_vbus_supply_init-fix-error-check.patch
@@ -42,7 +42,7 @@ Signed-off-by: Felipe Balbi <felipe.balbi at linux.intel.com>
  
  	return regulator_enable(hsotg->vbus_supply);
  }
-@@ -4401,9 +4406,7 @@ static int _dwc2_hcd_start(struct usb_hc
+@@ -4403,9 +4408,7 @@ static int _dwc2_hcd_start(struct usb_hc
  
  	spin_unlock_irqrestore(&hsotg->lock, flags);
  
diff --git a/target/linux/generic/backport-4.14/080-net-convert-sock.sk_wmem_alloc-from-atomic_t-to-refc.patch b/target/linux/generic/backport-4.14/080-net-convert-sock.sk_wmem_alloc-from-atomic_t-to-refc.patch
deleted file mode 100644
index 06d00886f1..0000000000
--- a/target/linux/generic/backport-4.14/080-net-convert-sock.sk_wmem_alloc-from-atomic_t-to-refc.patch
+++ /dev/null
@@ -1,172 +0,0 @@
-From 9bbe60a67be5a1c6f79b3c9be5003481a50529ff Mon Sep 17 00:00:00 2001
-From: David Woodhouse <dwmw2 at infradead.org>
-Date: Sat, 16 Jun 2018 11:55:44 +0100
-Subject: atm: Preserve value of skb->truesize when accounting to vcc
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-ATM accounts for in-flight TX packets in sk_wmem_alloc of the VCC on
-which they are to be sent. But it doesn't take ownership of those
-packets from the sock (if any) which originally owned them. They should
-remain owned by their actual sender until they've left the box.
-
-There's a hack in pskb_expand_head() to avoid adjusting skb->truesize
-for certain skbs, precisely to avoid messing up sk_wmem_alloc
-accounting. Ideally that hack would cover the ATM use case too, but it
-doesn't ? skbs which aren't owned by any sock, for example PPP control
-frames, still get their truesize adjusted when the low-level ATM driver
-adds headroom.
-
-This has always been an issue, it seems. The truesize of a packet
-increases, and sk_wmem_alloc on the VCC goes negative. But this wasn't
-for normal traffic, only for control frames. So I think we just got away
-with it, and we probably needed to send 2GiB of LCP echo frames before
-the misaccounting would ever have caused a problem and caused
-atm_may_send() to start refusing packets.
-
-Commit 14afee4b609 ("net: convert sock.sk_wmem_alloc from atomic_t to
-refcount_t") did exactly what it was intended to do, and turned this
-mostly-theoretical problem into a real one, causing PPPoATM to fail
-immediately as sk_wmem_alloc underflows and atm_may_send() *immediately*
-starts refusing to allow new packets.
-
-The least intrusive solution to this problem is to stash the value of
-skb->truesize that was accounted to the VCC, in a new member of the
-ATM_SKB(skb) structure. Then in atm_pop_raw() subtract precisely that
-value instead of the then-current value of skb->truesize.
-
-Fixes: 158f323b9868 ("net: adjust skb->truesize in pskb_expand_head()")
-Signed-off-by: David Woodhouse <dwmw2 at infradead.org>
-Tested-by: Kevin Darbyshire-Bryant <ldir at darbyshire-bryant.me.uk>
-Signed-off-by: David S. Miller <davem at davemloft.net>
----
- include/linux/atmdev.h | 15 +++++++++++++++
- net/atm/br2684.c       |  3 +--
- net/atm/clip.c         |  3 +--
- net/atm/common.c       |  3 +--
- net/atm/lec.c          |  3 +--
- net/atm/mpc.c          |  3 +--
- net/atm/pppoatm.c      |  3 +--
- net/atm/raw.c          |  4 ++--
- 8 files changed, 23 insertions(+), 14 deletions(-)
-
---- a/include/linux/atmdev.h
-+++ b/include/linux/atmdev.h
-@@ -214,6 +214,7 @@ struct atmphy_ops {
- struct atm_skb_data {
- 	struct atm_vcc	*vcc;		/* ATM VCC */
- 	unsigned long	atm_options;	/* ATM layer options */
-+	unsigned int	acct_truesize;  /* truesize accounted to vcc */
- };
- 
- #define VCC_HTABLE_SIZE 32
-@@ -241,6 +242,20 @@ void vcc_insert_socket(struct sock *sk);
- 
- void atm_dev_release_vccs(struct atm_dev *dev);
- 
-+static inline void atm_account_tx(struct atm_vcc *vcc, struct sk_buff *skb)
-+{
-+	/*
-+	 * Because ATM skbs may not belong to a sock (and we don't
-+	 * necessarily want to), skb->truesize may be adjusted,
-+	 * escaping the hack in pskb_expand_head() which avoids
-+	 * doing so for some cases. So stash the value of truesize
-+	 * at the time we accounted it, and atm_pop_raw() can use
-+	 * that value later, in case it changes.
-+	 */
-+	refcount_add(skb->truesize, &sk_atm(vcc)->sk_wmem_alloc);
-+	ATM_SKB(skb)->acct_truesize = skb->truesize;
-+	ATM_SKB(skb)->atm_options = vcc->atm_options;
-+}
- 
- static inline void atm_force_charge(struct atm_vcc *vcc,int truesize)
- {
---- a/net/atm/br2684.c
-+++ b/net/atm/br2684.c
-@@ -252,8 +252,7 @@ static int br2684_xmit_vcc(struct sk_buf
- 
- 	ATM_SKB(skb)->vcc = atmvcc = brvcc->atmvcc;
- 	pr_debug("atm_skb(%p)->vcc(%p)->dev(%p)\n", skb, atmvcc, atmvcc->dev);
--	refcount_add(skb->truesize, &sk_atm(atmvcc)->sk_wmem_alloc);
--	ATM_SKB(skb)->atm_options = atmvcc->atm_options;
-+	atm_account_tx(atmvcc, skb);
- 	dev->stats.tx_packets++;
- 	dev->stats.tx_bytes += skb->len;
- 
---- a/net/atm/clip.c
-+++ b/net/atm/clip.c
-@@ -381,8 +381,7 @@ static netdev_tx_t clip_start_xmit(struc
- 		memcpy(here, llc_oui, sizeof(llc_oui));
- 		((__be16 *) here)[3] = skb->protocol;
- 	}
--	refcount_add(skb->truesize, &sk_atm(vcc)->sk_wmem_alloc);
--	ATM_SKB(skb)->atm_options = vcc->atm_options;
-+	atm_account_tx(vcc, skb);
- 	entry->vccs->last_use = jiffies;
- 	pr_debug("atm_skb(%p)->vcc(%p)->dev(%p)\n", skb, vcc, vcc->dev);
- 	old = xchg(&entry->vccs->xoff, 1);	/* assume XOFF ... */
---- a/net/atm/common.c
-+++ b/net/atm/common.c
-@@ -630,10 +630,9 @@ int vcc_sendmsg(struct socket *sock, str
- 		goto out;
- 	}
- 	pr_debug("%d += %d\n", sk_wmem_alloc_get(sk), skb->truesize);
--	refcount_add(skb->truesize, &sk->sk_wmem_alloc);
-+	atm_account_tx(vcc, skb);
- 
- 	skb->dev = NULL; /* for paths shared with net_device interfaces */
--	ATM_SKB(skb)->atm_options = vcc->atm_options;
- 	if (!copy_from_iter_full(skb_put(skb, size), size, &m->msg_iter)) {
- 		kfree_skb(skb);
- 		error = -EFAULT;
---- a/net/atm/lec.c
-+++ b/net/atm/lec.c
-@@ -182,9 +182,8 @@ lec_send(struct atm_vcc *vcc, struct sk_
- 	struct net_device *dev = skb->dev;
- 
- 	ATM_SKB(skb)->vcc = vcc;
--	ATM_SKB(skb)->atm_options = vcc->atm_options;
-+	atm_account_tx(vcc, skb);
- 
--	refcount_add(skb->truesize, &sk_atm(vcc)->sk_wmem_alloc);
- 	if (vcc->send(vcc, skb) < 0) {
- 		dev->stats.tx_dropped++;
- 		return;
---- a/net/atm/mpc.c
-+++ b/net/atm/mpc.c
-@@ -555,8 +555,7 @@ static int send_via_shortcut(struct sk_b
- 					sizeof(struct llc_snap_hdr));
- 	}
- 
--	refcount_add(skb->truesize, &sk_atm(entry->shortcut)->sk_wmem_alloc);
--	ATM_SKB(skb)->atm_options = entry->shortcut->atm_options;
-+	atm_account_tx(entry->shortcut, skb);
- 	entry->shortcut->send(entry->shortcut, skb);
- 	entry->packets_fwded++;
- 	mpc->in_ops->put(entry);
---- a/net/atm/pppoatm.c
-+++ b/net/atm/pppoatm.c
-@@ -350,8 +350,7 @@ static int pppoatm_send(struct ppp_chann
- 		return 1;
- 	}
- 
--	refcount_add(skb->truesize, &sk_atm(ATM_SKB(skb)->vcc)->sk_wmem_alloc);
--	ATM_SKB(skb)->atm_options = ATM_SKB(skb)->vcc->atm_options;
-+	atm_account_tx(vcc, skb);
- 	pr_debug("atm_skb(%p)->vcc(%p)->dev(%p)\n",
- 		 skb, ATM_SKB(skb)->vcc, ATM_SKB(skb)->vcc->dev);
- 	ret = ATM_SKB(skb)->vcc->send(ATM_SKB(skb)->vcc, skb)
---- a/net/atm/raw.c
-+++ b/net/atm/raw.c
-@@ -35,8 +35,8 @@ static void atm_pop_raw(struct atm_vcc *
- 	struct sock *sk = sk_atm(vcc);
- 
- 	pr_debug("(%d) %d -= %d\n",
--		 vcc->vci, sk_wmem_alloc_get(sk), skb->truesize);
--	WARN_ON(refcount_sub_and_test(skb->truesize, &sk->sk_wmem_alloc));
-+		 vcc->vci, sk_wmem_alloc_get(sk), ATM_SKB(skb)->acct_truesize);
-+	WARN_ON(refcount_sub_and_test(ATM_SKB(skb)->acct_truesize, &sk->sk_wmem_alloc));
- 	dev_kfree_skb_any(skb);
- 	sk->sk_write_space(sk);
- }
diff --git a/target/linux/generic/backport-4.14/336-v4.15-netfilter-exit_net-cleanup-check-added.patch b/target/linux/generic/backport-4.14/336-v4.15-netfilter-exit_net-cleanup-check-added.patch
index 37975ae038..5c942e3a54 100644
--- a/target/linux/generic/backport-4.14/336-v4.15-netfilter-exit_net-cleanup-check-added.patch
+++ b/target/linux/generic/backport-4.14/336-v4.15-netfilter-exit_net-cleanup-check-added.patch
@@ -62,7 +62,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  static struct pernet_operations nfnl_log_net_ops = {
 --- a/net/netfilter/nfnetlink_queue.c
 +++ b/net/netfilter/nfnetlink_queue.c
-@@ -1512,10 +1512,15 @@ static int __net_init nfnl_queue_net_ini
+@@ -1515,10 +1515,15 @@ static int __net_init nfnl_queue_net_ini
  
  static void __net_exit nfnl_queue_net_exit(struct net *net)
  {
diff --git a/target/linux/generic/hack-4.14/207-disable-modorder.patch b/target/linux/generic/hack-4.14/207-disable-modorder.patch
index 5fb956c98d..8e920d1c51 100644
--- a/target/linux/generic/hack-4.14/207-disable-modorder.patch
+++ b/target/linux/generic/hack-4.14/207-disable-modorder.patch
@@ -15,7 +15,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/Makefile
 +++ b/Makefile
-@@ -1227,7 +1227,6 @@ all: modules
+@@ -1228,7 +1228,6 @@ all: modules
  
  PHONY += modules
  modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) modules.builtin
@@ -23,7 +23,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	@$(kecho) '  Building modules, stage 2.';
  	$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
  
-@@ -1256,7 +1255,6 @@ _modinst_:
+@@ -1257,7 +1256,6 @@ _modinst_:
  		rm -f $(MODLIB)/build ; \
  		ln -s $(CURDIR) $(MODLIB)/build ; \
  	fi
diff --git a/target/linux/generic/hack-4.14/211-host_tools_portability.patch b/target/linux/generic/hack-4.14/211-host_tools_portability.patch
index 59f1479436..d806df8a5f 100644
--- a/target/linux/generic/hack-4.14/211-host_tools_portability.patch
+++ b/target/linux/generic/hack-4.14/211-host_tools_portability.patch
@@ -12,7 +12,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/tools/build/Build.include
 +++ b/tools/build/Build.include
-@@ -97,4 +97,4 @@ cxx_flags = -Wp,-MD,$(depfile) -Wp,-MT,$
+@@ -98,4 +98,4 @@ cxx_flags = -Wp,-MD,$(depfile) -Wp,-MT,$
  ###
  ## HOSTCC C flags
  
diff --git a/target/linux/generic/hack-4.14/220-gc_sections.patch b/target/linux/generic/hack-4.14/220-gc_sections.patch
index 7fd493d2ff..cdca0bdb5f 100644
--- a/target/linux/generic/hack-4.14/220-gc_sections.patch
+++ b/target/linux/generic/hack-4.14/220-gc_sections.patch
@@ -33,7 +33,7 @@ Signed-off-by: Gabor Juhos <juhosg at openwrt.org>
  # Read KERNELRELEASE from include/config/kernel.release (if it exists)
  KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null)
  KERNELVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if $(SUBLEVEL),.$(SUBLEVEL)))$(EXTRAVERSION)
-@@ -781,11 +786,6 @@ ifdef CONFIG_DEBUG_SECTION_MISMATCH
+@@ -782,11 +787,6 @@ ifdef CONFIG_DEBUG_SECTION_MISMATCH
  KBUILD_CFLAGS += $(call cc-option, -fno-inline-functions-called-once)
  endif
  
diff --git a/target/linux/generic/hack-4.14/902-debloat_proc.patch b/target/linux/generic/hack-4.14/902-debloat_proc.patch
index 3f47d22355..4f5fb7022c 100644
--- a/target/linux/generic/hack-4.14/902-debloat_proc.patch
+++ b/target/linux/generic/hack-4.14/902-debloat_proc.patch
@@ -243,7 +243,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  }
 --- a/mm/vmstat.c
 +++ b/mm/vmstat.c
-@@ -1946,10 +1946,12 @@ void __init init_mm_internals(void)
+@@ -1944,10 +1944,12 @@ void __init init_mm_internals(void)
  	start_shepherd_timer();
  #endif
  #ifdef CONFIG_PROC_FS
diff --git a/target/linux/generic/pending-4.14/102-MIPS-only-process-negative-stack-offsets-on-stack-tr.patch b/target/linux/generic/pending-4.14/102-MIPS-only-process-negative-stack-offsets-on-stack-tr.patch
index cc17053121..b3dc43ea68 100644
--- a/target/linux/generic/pending-4.14/102-MIPS-only-process-negative-stack-offsets-on-stack-tr.patch
+++ b/target/linux/generic/pending-4.14/102-MIPS-only-process-negative-stack-offsets-on-stack-tr.patch
@@ -46,7 +46,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/arch/mips/kernel/process.c
 +++ b/arch/mips/kernel/process.c
-@@ -357,6 +357,8 @@ static inline int is_sp_move_ins(union m
+@@ -358,6 +358,8 @@ static inline int is_sp_move_ins(union m
  
  	if (ip->i_format.opcode == addiu_op ||
  	    ip->i_format.opcode == daddiu_op) {
diff --git a/target/linux/generic/pending-4.14/150-bridge_allow_receiption_on_disabled_port.patch b/target/linux/generic/pending-4.14/150-bridge_allow_receiption_on_disabled_port.patch
index 03267310a0..9fcffdee06 100644
--- a/target/linux/generic/pending-4.14/150-bridge_allow_receiption_on_disabled_port.patch
+++ b/target/linux/generic/pending-4.14/150-bridge_allow_receiption_on_disabled_port.patch
@@ -15,7 +15,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/net/bridge/br_input.c
 +++ b/net/bridge/br_input.c
-@@ -238,7 +238,8 @@ static int br_handle_local_finish(struct
+@@ -239,7 +239,8 @@ static int br_handle_local_finish(struct
  {
  	struct net_bridge_port *p = br_port_get_rcu(skb->dev);
  
@@ -25,7 +25,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  
  	BR_INPUT_SKB_CB(skb)->brdev = p->br->dev;
  	br_pass_frame_up(skb);
-@@ -326,6 +327,15 @@ rx_handler_result_t br_handle_frame(stru
+@@ -327,6 +328,15 @@ rx_handler_result_t br_handle_frame(stru
  
  forward:
  	switch (p->state) {
diff --git a/target/linux/generic/pending-4.14/170-usb-dwc2-Fix-DMA-alignment-to-start-at-allocated-boun.patch b/target/linux/generic/pending-4.14/170-usb-dwc2-Fix-DMA-alignment-to-start-at-allocated-boun.patch
deleted file mode 100644
index 49b33d514f..0000000000
--- a/target/linux/generic/pending-4.14/170-usb-dwc2-Fix-DMA-alignment-to-start-at-allocated-boun.patch
+++ /dev/null
@@ -1,126 +0,0 @@
-From 028c9191bdf88f120f65626920a6a679170fcc3e Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Antti=20Sepp=C3=A4l=C3=A4?= <a.seppala at gmail.com>
-Date: Thu, 5 Jul 2018 11:37:03 +0300
-Subject: [PATCH 1/2] usb: dwc2: Fix DMA alignment to start at allocated
- boundary
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-The commit 3bc04e28a030 ("usb: dwc2: host: Get aligned DMA in a more
-supported way") introduced a common way to align DMA allocations.
-The code in the commit aligns the struct dma_aligned_buffer but the
-actual DMA address pointed by data[0] gets aligned to an offset from
-the allocated boundary by the kmalloc_ptr and the old_xfer_buffer
-pointers.
-
-This is against the recommendation in Documentation/DMA-API.txt which
-states:
-
-  Therefore, it is recommended that driver writers who don't take
-  special care to determine the cache line size at run time only map
-  virtual regions that begin and end on page boundaries (which are
-  guaranteed also to be cache line boundaries).
-
-The effect of this is that architectures with non-coherent DMA caches
-may run into memory corruption or kernel crashes with Unhandled
-kernel unaligned accesses exceptions.
-
-Fix the alignment by positioning the DMA area in front of the allocation
-and use memory at the end of the area for storing the orginal
-transfer_buffer pointer. This may have the added benefit of increased
-performance as the DMA area is now fully aligned on all architectures.
-
-Tested with Lantiq xRX200 (MIPS) and RPi Model B Rev 2 (ARM).
-
-Fixes: 3bc04e28a030 ("usb: dwc2: host: Get aligned DMA in a more
-supported way")
-
-Signed-off-by: Antti Sepp?l? <a.seppala at gmail.com>
----
- drivers/usb/dwc2/hcd.c | 44 +++++++++++++++++++++++---------------------
- 1 file changed, 23 insertions(+), 21 deletions(-)
-
---- a/drivers/usb/dwc2/hcd.c
-+++ b/drivers/usb/dwc2/hcd.c
-@@ -2628,34 +2628,29 @@ static void dwc2_hc_init_xfer(struct dwc
- 
- #define DWC2_USB_DMA_ALIGN 4
- 
--struct dma_aligned_buffer {
--	void *kmalloc_ptr;
--	void *old_xfer_buffer;
--	u8 data[0];
--};
--
- static void dwc2_free_dma_aligned_buffer(struct urb *urb)
- {
--	struct dma_aligned_buffer *temp;
-+	void *stored_xfer_buffer;
- 
- 	if (!(urb->transfer_flags & URB_ALIGNED_TEMP_BUFFER))
- 		return;
- 
--	temp = container_of(urb->transfer_buffer,
--			    struct dma_aligned_buffer, data);
-+	/* Restore urb->transfer_buffer from the end of the allocated area */
-+	memcpy(&stored_xfer_buffer, urb->transfer_buffer +
-+	       urb->transfer_buffer_length, sizeof(urb->transfer_buffer));
- 
- 	if (usb_urb_dir_in(urb))
--		memcpy(temp->old_xfer_buffer, temp->data,
-+		memcpy(stored_xfer_buffer, urb->transfer_buffer,
- 		       urb->transfer_buffer_length);
--	urb->transfer_buffer = temp->old_xfer_buffer;
--	kfree(temp->kmalloc_ptr);
-+	kfree(urb->transfer_buffer);
-+	urb->transfer_buffer = stored_xfer_buffer;
- 
- 	urb->transfer_flags &= ~URB_ALIGNED_TEMP_BUFFER;
- }
- 
- static int dwc2_alloc_dma_aligned_buffer(struct urb *urb, gfp_t mem_flags)
- {
--	struct dma_aligned_buffer *temp, *kmalloc_ptr;
-+	void *kmalloc_ptr;
- 	size_t kmalloc_size;
- 
- 	if (urb->num_sgs || urb->sg ||
-@@ -2663,22 +2658,29 @@ static int dwc2_alloc_dma_aligned_buffer
- 	    !((uintptr_t)urb->transfer_buffer & (DWC2_USB_DMA_ALIGN - 1)))
- 		return 0;
- 
--	/* Allocate a buffer with enough padding for alignment */
-+	/*
-+	 * Allocate a buffer with enough padding for original transfer_buffer
-+	 * pointer. This allocation is guaranteed to be aligned properly for
-+	 * DMA
-+	 */
- 	kmalloc_size = urb->transfer_buffer_length +
--		sizeof(struct dma_aligned_buffer) + DWC2_USB_DMA_ALIGN - 1;
-+		sizeof(urb->transfer_buffer);
- 
- 	kmalloc_ptr = kmalloc(kmalloc_size, mem_flags);
- 	if (!kmalloc_ptr)
- 		return -ENOMEM;
- 
--	/* Position our struct dma_aligned_buffer such that data is aligned */
--	temp = PTR_ALIGN(kmalloc_ptr + 1, DWC2_USB_DMA_ALIGN) - 1;
--	temp->kmalloc_ptr = kmalloc_ptr;
--	temp->old_xfer_buffer = urb->transfer_buffer;
-+	/*
-+	 * Position value of original urb->transfer_buffer pointer to the end
-+	 * of allocation for later referencing
-+	 */
-+	memcpy(kmalloc_ptr + urb->transfer_buffer_length,
-+	       &urb->transfer_buffer, sizeof(urb->transfer_buffer));
-+
- 	if (usb_urb_dir_out(urb))
--		memcpy(temp->data, urb->transfer_buffer,
-+		memcpy(kmalloc_ptr, urb->transfer_buffer,
- 		       urb->transfer_buffer_length);
--	urb->transfer_buffer = temp->data;
-+	urb->transfer_buffer = kmalloc_ptr;
- 
- 	urb->transfer_flags |= URB_ALIGNED_TEMP_BUFFER;
- 
diff --git a/target/linux/generic/pending-4.14/201-extra_optimization.patch b/target/linux/generic/pending-4.14/201-extra_optimization.patch
index 445c0bd87d..b40f01d41f 100644
--- a/target/linux/generic/pending-4.14/201-extra_optimization.patch
+++ b/target/linux/generic/pending-4.14/201-extra_optimization.patch
@@ -14,7 +14,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/Makefile
 +++ b/Makefile
-@@ -645,12 +645,12 @@ KBUILD_CFLAGS	+= $(call cc-disable-warni
+@@ -646,12 +646,12 @@ KBUILD_CFLAGS	+= $(call cc-disable-warni
  
  ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
  KBUILD_CFLAGS	+= $(call cc-option,-Oz,-Os)
diff --git a/target/linux/generic/pending-4.14/610-netfilter_match_bypass_default_checks.patch b/target/linux/generic/pending-4.14/610-netfilter_match_bypass_default_checks.patch
index 3611879609..2541230ff5 100644
--- a/target/linux/generic/pending-4.14/610-netfilter_match_bypass_default_checks.patch
+++ b/target/linux/generic/pending-4.14/610-netfilter_match_bypass_default_checks.patch
@@ -68,7 +68,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	if (!xt_percpu_counter_alloc(alloc_state, &e->counters))
  		return -ENOMEM;
  
-@@ -817,6 +845,7 @@ copy_entries_to_user(unsigned int total_
+@@ -818,6 +846,7 @@ copy_entries_to_user(unsigned int total_
  	const struct xt_table_info *private = table->private;
  	int ret = 0;
  	const void *loc_cpu_entry;
@@ -76,7 +76,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  
  	counters = alloc_counters(table);
  	if (IS_ERR(counters))
-@@ -844,6 +873,14 @@ copy_entries_to_user(unsigned int total_
+@@ -845,6 +874,14 @@ copy_entries_to_user(unsigned int total_
  			goto free_counters;
  		}
  
@@ -91,7 +91,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  		for (i = sizeof(struct ipt_entry);
  		     i < e->target_offset;
  		     i += m->u.match_size) {
-@@ -1226,12 +1263,15 @@ compat_copy_entry_to_user(struct ipt_ent
+@@ -1227,12 +1264,15 @@ compat_copy_entry_to_user(struct ipt_ent
  	compat_uint_t origsize;
  	const struct xt_entry_match *ematch;
  	int ret = 0;
diff --git a/target/linux/generic/pending-4.14/630-packet_socket_type.patch b/target/linux/generic/pending-4.14/630-packet_socket_type.patch
index e1736214f5..82e2c51afd 100644
--- a/target/linux/generic/pending-4.14/630-packet_socket_type.patch
+++ b/target/linux/generic/pending-4.14/630-packet_socket_type.patch
@@ -87,7 +87,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	if (!net_eq(dev_net(dev), sock_net(sk)))
  		goto drop;
  
-@@ -3262,6 +3264,7 @@ static int packet_create(struct net *net
+@@ -3260,6 +3262,7 @@ static int packet_create(struct net *net
  	mutex_init(&po->pg_vec_lock);
  	po->rollover = NULL;
  	po->prot_hook.func = packet_rcv;
@@ -95,7 +95,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  
  	if (sock->type == SOCK_PACKET)
  		po->prot_hook.func = packet_rcv_spkt;
-@@ -3875,6 +3878,16 @@ packet_setsockopt(struct socket *sock, i
+@@ -3873,6 +3876,16 @@ packet_setsockopt(struct socket *sock, i
  		po->xmit = val ? packet_direct_xmit : dev_queue_xmit;
  		return 0;
  	}
@@ -112,7 +112,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	default:
  		return -ENOPROTOOPT;
  	}
-@@ -3927,6 +3940,13 @@ static int packet_getsockopt(struct sock
+@@ -3925,6 +3938,13 @@ static int packet_getsockopt(struct sock
  	case PACKET_VNET_HDR:
  		val = po->has_vnet_hdr;
  		break;
diff --git a/target/linux/generic/pending-4.14/834-ledtrig-libata.patch b/target/linux/generic/pending-4.14/834-ledtrig-libata.patch
index 280536e1e6..2eec024b72 100644
--- a/target/linux/generic/pending-4.14/834-ledtrig-libata.patch
+++ b/target/linux/generic/pending-4.14/834-ledtrig-libata.patch
@@ -65,7 +65,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  /**
   *	ata_build_rw_tf - Build ATA taskfile for given read/write request
   *	@tf: Target ATA taskfile
-@@ -5117,6 +5130,9 @@ struct ata_queued_cmd *ata_qc_new_init(s
+@@ -5120,6 +5133,9 @@ struct ata_queued_cmd *ata_qc_new_init(s
  		if (tag < 0)
  			return NULL;
  	}
@@ -75,7 +75,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  
  	qc = __ata_qc_from_tag(ap, tag);
  	qc->tag = tag;
-@@ -6018,6 +6034,9 @@ struct ata_port *ata_port_alloc(struct a
+@@ -6021,6 +6037,9 @@ struct ata_port *ata_port_alloc(struct a
  	ap->stats.unhandled_irq = 1;
  	ap->stats.idle_irq = 1;
  #endif
@@ -85,7 +85,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  	ata_sff_port_init(ap);
  
  	return ap;
-@@ -6039,6 +6058,12 @@ static void ata_host_release(struct devi
+@@ -6042,6 +6061,12 @@ static void ata_host_release(struct devi
  
  		kfree(ap->pmp_link);
  		kfree(ap->slave_link);
@@ -98,7 +98,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  		kfree(ap);
  		host->ports[i] = NULL;
  	}
-@@ -6485,7 +6510,23 @@ int ata_host_register(struct ata_host *h
+@@ -6488,7 +6513,23 @@ int ata_host_register(struct ata_host *h
  		host->ports[i]->print_id = atomic_inc_return(&ata_print_id);
  		host->ports[i]->local_port_no = i + 1;
  	}
@@ -134,7 +134,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  
  /*
   * Define if arch has non-standard setup.  This is a _PCI_ standard
-@@ -889,6 +892,12 @@ struct ata_port {
+@@ -890,6 +893,12 @@ struct ata_port {
  #ifdef CONFIG_ATA_ACPI
  	struct ata_acpi_gtm	__acpi_init_gtm; /* use ata_acpi_init_gtm() */
  #endif
diff --git a/target/linux/generic/pending-4.14/900-gen_stats-fix-netlink-stats-padding.patch b/target/linux/generic/pending-4.14/900-gen_stats-fix-netlink-stats-padding.patch
deleted file mode 100644
index f5ceecca93..0000000000
--- a/target/linux/generic/pending-4.14/900-gen_stats-fix-netlink-stats-padding.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-The gen_stats facility will add a header for the toplevel nlattr of type
-TCA_STATS2 that contains all stats added by qdisc callbacks. A reference
-to this header is stored in the gnet_dump struct, and when all the
-per-qdisc callbacks have finished adding their stats, the length of the
-containing header will be adjusted to the right value.
-
-However, on architectures that need padding (i.e., that don't set
-CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS), the padding nlattr is added
-before the stats, which means that the stored pointer will point to the
-padding, and so when the header is fixed up, the result is just a very
-big padding nlattr. Because most qdiscs also supply the legacy TCA_STATS
-struct, this problem has been mostly invisible, but we exposed it with
-the netlink attribute-based statistics in CAKE.
-
-Fix the issue by fixing up the stored pointer if it points to a padding
-nlattr.
-
-Tested-by: Pete Heist <pete at heistp.net>
-Tested-by: Kevin Darbyshire-Bryant <kevin at darbyshire-bryant.me.uk>
-Signed-off-by: Toke H?iland-J?rgensen <toke at toke.dk>
----
- net/core/gen_stats.c |   16 ++++++++++++++--
- 1 file changed, 14 insertions(+), 2 deletions(-)
-
---- a/net/core/gen_stats.c
-+++ b/net/core/gen_stats.c
-@@ -77,8 +77,20 @@ gnet_stats_start_copy_compat(struct sk_b
- 		d->lock = lock;
- 		spin_lock_bh(lock);
- 	}
--	if (d->tail)
--		return gnet_stats_copy(d, type, NULL, 0, padattr);
-+	if (d->tail) {
-+		int ret = gnet_stats_copy(d, type, NULL, 0, padattr);
-+
-+		/* The initial attribute added in gnet_stats_copy() may be
-+		 * preceded by a padding attribute, in which case d->tail will
-+		 * end up pointing at the padding instead of the real attribute.
-+		 * Fix this so gnet_stats_finish_copy() adjusts the length of
-+		 * the right attribute.
-+		 */
-+		if (ret == 0 && d->tail->nla_type == padattr)
-+			d->tail = (struct nlattr *)((char *)d->tail +
-+						    NLA_ALIGN(d->tail->nla_len));
-+		return ret;
-+	}
- 
- 	return 0;
- }
diff --git a/target/linux/ipq40xx/patches-4.14/070-qcom-spm-fix-probe-order.patch b/target/linux/ipq40xx/patches-4.14/070-qcom-spm-fix-probe-order.patch
index 1e1a83220e..ea8dedb5a4 100644
--- a/target/linux/ipq40xx/patches-4.14/070-qcom-spm-fix-probe-order.patch
+++ b/target/linux/ipq40xx/patches-4.14/070-qcom-spm-fix-probe-order.patch
@@ -12,11 +12,9 @@ Signed-off-by: John Crispin <john at phrozen.org>
  drivers/soc/qcom/spm.c | 3 +++
  1 file changed, 3 insertions(+)
 
-diff --git a/drivers/soc/qcom/spm.c b/drivers/soc/qcom/spm.c
-index f9d7a85b2822..53807e839664 100644
 --- a/drivers/soc/qcom/spm.c
 +++ b/drivers/soc/qcom/spm.c
-@@ -219,6 +219,9 @@ static int __init qcom_cpuidle_init(struct device_node *cpu_node, int cpu)
+@@ -219,6 +219,9 @@ static int __init qcom_cpuidle_init(stru
  	cpumask_t mask;
  	bool use_scm_power_down = false;
  
@@ -26,6 +24,3 @@ index f9d7a85b2822..53807e839664 100644
  	for (i = 0; ; i++) {
  		state_node = of_parse_phandle(cpu_node, "cpu-idle-states", i);
  		if (!state_node)
--- 
-2.11.0
-
diff --git a/target/linux/ipq40xx/patches-4.14/071-qcom-ipq4019-use-v2-of-the-kpss-bringup-mechanism.patch b/target/linux/ipq40xx/patches-4.14/071-qcom-ipq4019-use-v2-of-the-kpss-bringup-mechanism.patch
index f79e99f66f..3cad41ad08 100644
--- a/target/linux/ipq40xx/patches-4.14/071-qcom-ipq4019-use-v2-of-the-kpss-bringup-mechanism.patch
+++ b/target/linux/ipq40xx/patches-4.14/071-qcom-ipq4019-use-v2-of-the-kpss-bringup-mechanism.patch
@@ -13,11 +13,9 @@ Signed-off-by: John Crispin <john at phrozen.org>
  arch/arm/boot/dts/qcom-ipq4019.dtsi | 25 +++++++++++++++++--------
  1 file changed, 17 insertions(+), 8 deletions(-)
 
-diff --git a/arch/arm/boot/dts/qcom-ipq4019.dtsi b/arch/arm/boot/dts/qcom-ipq4019.dtsi
-index 93647db5d90b..06434fd02d40 100644
 --- a/arch/arm/boot/dts/qcom-ipq4019.dtsi
 +++ b/arch/arm/boot/dts/qcom-ipq4019.dtsi
-@@ -52,7 +52,8 @@
+@@ -34,7 +34,8 @@
  		cpu at 0 {
  			device_type = "cpu";
  			compatible = "arm,cortex-a7";
@@ -27,7 +25,7 @@ index 93647db5d90b..06434fd02d40 100644
  			qcom,acc = <&acc0>;
  			qcom,saw = <&saw0>;
  			reg = <0x0>;
-@@ -71,7 +72,8 @@
+@@ -53,7 +54,8 @@
  		cpu at 1 {
  			device_type = "cpu";
  			compatible = "arm,cortex-a7";
@@ -37,7 +35,7 @@ index 93647db5d90b..06434fd02d40 100644
  			qcom,acc = <&acc1>;
  			qcom,saw = <&saw1>;
  			reg = <0x1>;
-@@ -82,7 +84,8 @@
+@@ -64,7 +66,8 @@
  		cpu at 2 {
  			device_type = "cpu";
  			compatible = "arm,cortex-a7";
@@ -47,7 +45,7 @@ index 93647db5d90b..06434fd02d40 100644
  			qcom,acc = <&acc2>;
  			qcom,saw = <&saw2>;
  			reg = <0x2>;
-@@ -93,13 +96,19 @@
+@@ -75,13 +78,19 @@
  		cpu at 3 {
  			device_type = "cpu";
  			compatible = "arm,cortex-a7";
@@ -68,7 +66,7 @@ index 93647db5d90b..06434fd02d40 100644
  	};
  
  	pmu {
-@@ -268,22 +277,22 @@
+@@ -213,22 +222,22 @@
  		};
  
                  acc0: clock-controller at b088000 {
@@ -95,6 +93,3 @@ index 93647db5d90b..06434fd02d40 100644
                          reg = <0x0b0b8000 0x1000>, <0xb008000 0x1000>;
                  };
  
--- 
-2.11.0
-
diff --git a/target/linux/ipq40xx/patches-4.14/072-qcom-ipq4019-add-cpu-operating-points-for-cpufreq-su.patch b/target/linux/ipq40xx/patches-4.14/072-qcom-ipq4019-add-cpu-operating-points-for-cpufreq-su.patch
index 5596e30852..b2f8590dfe 100644
--- a/target/linux/ipq40xx/patches-4.14/072-qcom-ipq4019-add-cpu-operating-points-for-cpufreq-su.patch
+++ b/target/linux/ipq40xx/patches-4.14/072-qcom-ipq4019-add-cpu-operating-points-for-cpufreq-su.patch
@@ -12,10 +12,8 @@ Signed-off-by: John Crispin <john at phrozen.org>
  arch/arm/boot/dts/qcom-ipq4019.dtsi | 34 ++++++++++++++++++++++++++--------
  1 file changed, 26 insertions(+), 8 deletions(-)
 
-Index: linux-4.14.54/arch/arm/boot/dts/qcom-ipq4019.dtsi
-===================================================================
---- linux-4.14.54.orig/arch/arm/boot/dts/qcom-ipq4019.dtsi
-+++ linux-4.14.54/arch/arm/boot/dts/qcom-ipq4019.dtsi
+--- a/arch/arm/boot/dts/qcom-ipq4019.dtsi
++++ b/arch/arm/boot/dts/qcom-ipq4019.dtsi
 @@ -41,14 +41,7 @@
  			reg = <0x0>;
  			clocks = <&gcc GCC_APPS_CLK_SRC>;
diff --git a/target/linux/ipq40xx/patches-4.14/073-qcom-ipq4019-fix-cpu0-s-qcom-saw2-reg-value.patch b/target/linux/ipq40xx/patches-4.14/073-qcom-ipq4019-fix-cpu0-s-qcom-saw2-reg-value.patch
index e92ead5ee2..103705944a 100644
--- a/target/linux/ipq40xx/patches-4.14/073-qcom-ipq4019-fix-cpu0-s-qcom-saw2-reg-value.patch
+++ b/target/linux/ipq40xx/patches-4.14/073-qcom-ipq4019-fix-cpu0-s-qcom-saw2-reg-value.patch
@@ -20,11 +20,9 @@ Signed-off-by: John Crispin <john at phrozen.org>
  arch/arm/boot/dts/qcom-ipq4019.dtsi | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
-diff --git a/arch/arm/boot/dts/qcom-ipq4019.dtsi b/arch/arm/boot/dts/qcom-ipq4019.dtsi
-index 98b9850ed2a0..3289b3a6c10e 100644
 --- a/arch/arm/boot/dts/qcom-ipq4019.dtsi
 +++ b/arch/arm/boot/dts/qcom-ipq4019.dtsi
-@@ -316,7 +316,7 @@
+@@ -261,7 +261,7 @@
  
                  saw0: regulator at b089000 {
                          compatible = "qcom,saw2";
@@ -33,6 +31,3 @@ index 98b9850ed2a0..3289b3a6c10e 100644
                          regulator;
                  };
  
--- 
-2.11.0
-
diff --git a/target/linux/ipq40xx/patches-4.14/074-ARM-qcom-Add-IPQ4019-SoC-support.patch b/target/linux/ipq40xx/patches-4.14/074-ARM-qcom-Add-IPQ4019-SoC-support.patch
index cdecd14293..b3a83957ad 100644
--- a/target/linux/ipq40xx/patches-4.14/074-ARM-qcom-Add-IPQ4019-SoC-support.patch
+++ b/target/linux/ipq40xx/patches-4.14/074-ARM-qcom-Add-IPQ4019-SoC-support.patch
@@ -12,10 +12,8 @@ Signed-off-by: John Crispin <john at phrozen.org>
  arch/arm/mach-qcom/Kconfig | 5 +++++
  2 files changed, 6 insertions(+)
 
-Index: linux-4.14.54/arch/arm/Makefile
-===================================================================
---- linux-4.14.54.orig/arch/arm/Makefile
-+++ linux-4.14.54/arch/arm/Makefile
+--- a/arch/arm/Makefile
++++ b/arch/arm/Makefile
 @@ -150,6 +150,7 @@ endif
  textofs-$(CONFIG_ARCH_MSM8X60) := 0x00208000
  textofs-$(CONFIG_ARCH_MSM8960) := 0x00208000
@@ -24,10 +22,8 @@ Index: linux-4.14.54/arch/arm/Makefile
  
  # Machine directory name.  This list is sorted alphanumerically
  # by CONFIG_* macro name.
-Index: linux-4.14.54/arch/arm/mach-qcom/Kconfig
-===================================================================
---- linux-4.14.54.orig/arch/arm/mach-qcom/Kconfig
-+++ linux-4.14.54/arch/arm/mach-qcom/Kconfig
+--- a/arch/arm/mach-qcom/Kconfig
++++ b/arch/arm/mach-qcom/Kconfig
 @@ -27,4 +27,9 @@ config ARCH_MDM9615
  	bool "Enable support for MDM9615"
  	select CLKSRC_QCOM
diff --git a/target/linux/ipq40xx/patches-4.14/075-dt-bindings-phy-qcom-ipq4019-usb-add-binding-documen.patch b/target/linux/ipq40xx/patches-4.14/075-dt-bindings-phy-qcom-ipq4019-usb-add-binding-documen.patch
index 6710caf657..e7407bcbab 100644
--- a/target/linux/ipq40xx/patches-4.14/075-dt-bindings-phy-qcom-ipq4019-usb-add-binding-documen.patch
+++ b/target/linux/ipq40xx/patches-4.14/075-dt-bindings-phy-qcom-ipq4019-usb-add-binding-documen.patch
@@ -12,9 +12,6 @@ Signed-off-by: John Crispin <john at phrozen.org>
  1 file changed, 21 insertions(+)
  create mode 100644 Documentation/devicetree/bindings/phy/phy-qcom-ipq4019-usb.txt
 
-diff --git a/Documentation/devicetree/bindings/phy/phy-qcom-ipq4019-usb.txt b/Documentation/devicetree/bindings/phy/phy-qcom-ipq4019-usb.txt
-new file mode 100644
-index 000000000000..362877fcafed
 --- /dev/null
 +++ b/Documentation/devicetree/bindings/phy/phy-qcom-ipq4019-usb.txt
 @@ -0,0 +1,21 @@
@@ -39,6 +36,3 @@ index 000000000000..362877fcafed
 +		 <&gcc USB2_HSPHY_S_ARES>;
 +	reset-names = "por_rst", "srif_rst";
 +};
--- 
-2.11.0
-
diff --git a/target/linux/ipq40xx/patches-4.14/076-phy-qcom-ipq4019-usb-add-driver-for-QCOM-IPQ4019.patch b/target/linux/ipq40xx/patches-4.14/076-phy-qcom-ipq4019-usb-add-driver-for-QCOM-IPQ4019.patch
index 4cab66b677..f93c80f52e 100644
--- a/target/linux/ipq40xx/patches-4.14/076-phy-qcom-ipq4019-usb-add-driver-for-QCOM-IPQ4019.patch
+++ b/target/linux/ipq40xx/patches-4.14/076-phy-qcom-ipq4019-usb-add-driver-for-QCOM-IPQ4019.patch
@@ -15,10 +15,8 @@ Signed-off-by: John Crispin <john at phrozen.org>
  3 files changed, 196 insertions(+)
  create mode 100644 drivers/phy/qualcomm/phy-qcom-ipq4019-usb.c
 
-Index: linux-4.14.54/drivers/phy/qualcomm/Kconfig
-===================================================================
---- linux-4.14.54.orig/drivers/phy/qualcomm/Kconfig
-+++ linux-4.14.54/drivers/phy/qualcomm/Kconfig
+--- a/drivers/phy/qualcomm/Kconfig
++++ b/drivers/phy/qualcomm/Kconfig
 @@ -8,6 +8,13 @@ config PHY_QCOM_APQ8064_SATA
  	depends on OF
  	select GENERIC_PHY
@@ -33,10 +31,8 @@ Index: linux-4.14.54/drivers/phy/qualcomm/Kconfig
  config PHY_QCOM_IPQ806X_SATA
  	tristate "Qualcomm IPQ806x SATA SerDes/PHY driver"
  	depends on ARCH_QCOM
-Index: linux-4.14.54/drivers/phy/qualcomm/phy-qcom-ipq4019-usb.c
-===================================================================
 --- /dev/null
-+++ linux-4.14.54/drivers/phy/qualcomm/phy-qcom-ipq4019-usb.c
++++ b/drivers/phy/qualcomm/phy-qcom-ipq4019-usb.c
 @@ -0,0 +1,188 @@
 +/*
 + * Copyright (C) 2018 John Crispin <john at phrozen.org>
@@ -226,10 +222,8 @@ Index: linux-4.14.54/drivers/phy/qualcomm/phy-qcom-ipq4019-usb.c
 +MODULE_DESCRIPTION("QCOM/IPQ4019 USB phy driver");
 +MODULE_AUTHOR("John Crispin <john at phrozen.org>");
 +MODULE_LICENSE("GPL v2");
-Index: linux-4.14.54/drivers/phy/qualcomm/Makefile
-===================================================================
---- linux-4.14.54.orig/drivers/phy/qualcomm/Makefile
-+++ linux-4.14.54/drivers/phy/qualcomm/Makefile
+--- a/drivers/phy/qualcomm/Makefile
++++ b/drivers/phy/qualcomm/Makefile
 @@ -1,5 +1,6 @@
  # SPDX-License-Identifier: GPL-2.0
  obj-$(CONFIG_PHY_QCOM_APQ8064_SATA)	+= phy-qcom-apq8064-sata.o
diff --git a/target/linux/ipq40xx/patches-4.14/077-qcom-ipq4019-add-USB-devicetree-nodes.patch b/target/linux/ipq40xx/patches-4.14/077-qcom-ipq4019-add-USB-devicetree-nodes.patch
index 7cc7d9d5f4..1f0a81bf68 100644
--- a/target/linux/ipq40xx/patches-4.14/077-qcom-ipq4019-add-USB-devicetree-nodes.patch
+++ b/target/linux/ipq40xx/patches-4.14/077-qcom-ipq4019-add-USB-devicetree-nodes.patch
@@ -11,11 +11,9 @@ Signed-off-by: John Crispin <john at phrozen.org>
  arch/arm/boot/dts/qcom-ipq4019.dtsi           | 74 +++++++++++++++++++++++++++
  2 files changed, 94 insertions(+)
 
-diff --git a/arch/arm/boot/dts/qcom-ipq4019-ap.dk01.1.dtsi b/arch/arm/boot/dts/qcom-ipq4019-ap.dk01.1.dtsi
-index 418f9a022336..2ee5f05d5a43 100644
 --- a/arch/arm/boot/dts/qcom-ipq4019-ap.dk01.1.dtsi
 +++ b/arch/arm/boot/dts/qcom-ipq4019-ap.dk01.1.dtsi
-@@ -109,5 +109,25 @@
+@@ -101,5 +101,25 @@
  		wifi at a800000 {
  			status = "ok";
  		};
@@ -41,11 +39,9 @@ index 418f9a022336..2ee5f05d5a43 100644
 +		};
  	};
  };
-diff --git a/arch/arm/boot/dts/qcom-ipq4019.dtsi b/arch/arm/boot/dts/qcom-ipq4019.dtsi
-index e5e52adbd5a3..e6b12129f0e4 100644
 --- a/arch/arm/boot/dts/qcom-ipq4019.dtsi
 +++ b/arch/arm/boot/dts/qcom-ipq4019.dtsi
-@@ -553,5 +553,79 @@
+@@ -403,5 +403,79 @@
  					  "legacy";
  			status = "disabled";
  		};
@@ -125,6 +121,3 @@ index e5e52adbd5a3..e6b12129f0e4 100644
 +		};
  	};
  };
--- 
-2.11.0
-
diff --git a/target/linux/ipq40xx/patches-4.14/078-ARM-dts-ipq4019-Add-a-few-peripheral-nodes.patch b/target/linux/ipq40xx/patches-4.14/078-ARM-dts-ipq4019-Add-a-few-peripheral-nodes.patch
index 6f522ffcad..7014420bf8 100644
--- a/target/linux/ipq40xx/patches-4.14/078-ARM-dts-ipq4019-Add-a-few-peripheral-nodes.patch
+++ b/target/linux/ipq40xx/patches-4.14/078-ARM-dts-ipq4019-Add-a-few-peripheral-nodes.patch
@@ -15,11 +15,9 @@ Signed-off-by: Andy Gross <andy.gross at linaro.org>
  arch/arm/boot/dts/qcom-ipq4019.dtsi           | 156 ++++++++++++++++++++++++--
  2 files changed, 146 insertions(+), 12 deletions(-)
 
-diff --git a/arch/arm/boot/dts/qcom-ipq4019-ap.dk01.1.dtsi b/arch/arm/boot/dts/qcom-ipq4019-ap.dk01.1.dtsi
-index ef8d8c88ed7b..418f9a022336 100644
 --- a/arch/arm/boot/dts/qcom-ipq4019-ap.dk01.1.dtsi
 +++ b/arch/arm/boot/dts/qcom-ipq4019-ap.dk01.1.dtsi
-@@ -69,7 +69,7 @@
+@@ -61,7 +61,7 @@
  			status = "ok";
  		};
  
@@ -28,12 +26,10 @@ index ef8d8c88ed7b..418f9a022336 100644
  			pinctrl-0 = <&spi_0_pins>;
  			pinctrl-names = "default";
  			status = "ok";
-diff --git a/arch/arm/boot/dts/qcom-ipq4019.dtsi b/arch/arm/boot/dts/qcom-ipq4019.dtsi
-index 2efc8a2d41a7..737097e9fb4f 100644
 --- a/arch/arm/boot/dts/qcom-ipq4019.dtsi
 +++ b/arch/arm/boot/dts/qcom-ipq4019.dtsi
-@@ -40,8 +40,10 @@
- 	};
+@@ -24,8 +24,10 @@
+ 	interrupt-parent = <&intc>;
  
  	aliases {
 -		spi0 = &spi_0;
@@ -45,7 +41,7 @@ index 2efc8a2d41a7..737097e9fb4f 100644
  	};
  
  	cpus {
-@@ -120,6 +122,12 @@
+@@ -131,6 +133,12 @@
  		};
  	};
  
@@ -58,7 +54,7 @@ index 2efc8a2d41a7..737097e9fb4f 100644
  	timer {
  		compatible = "arm,armv7-timer";
  		interrupts = <1 2 0xf08>,
-@@ -165,13 +173,13 @@
+@@ -176,13 +184,13 @@
  			#gpio-cells = <2>;
  			interrupt-controller;
  			#interrupt-cells = <2>;
@@ -74,7 +70,7 @@ index 2efc8a2d41a7..737097e9fb4f 100644
  			clocks = <&gcc GCC_BLSP1_AHB_CLK>;
  			clock-names = "bam_clk";
  			#dma-cells = <1>;
-@@ -179,7 +187,7 @@
+@@ -190,7 +198,7 @@
  			status = "disabled";
  		};
  
@@ -83,7 +79,7 @@ index 2efc8a2d41a7..737097e9fb4f 100644
  			compatible = "qcom,spi-qup-v2.2.1";
  			reg = <0x78b5000 0x600>;
  			interrupts = <GIC_SPI 95 IRQ_TYPE_LEVEL_HIGH>;
-@@ -188,10 +196,26 @@
+@@ -199,10 +207,26 @@
  			clock-names = "core", "iface";
  			#address-cells = <1>;
  			#size-cells = <0>;
@@ -111,7 +107,7 @@ index 2efc8a2d41a7..737097e9fb4f 100644
  			compatible = "qcom,i2c-qup-v2.2.1";
  			reg = <0x78b7000 0x600>;
  			interrupts = <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>;
-@@ -200,14 +224,29 @@
+@@ -211,14 +235,29 @@
  			clock-names = "iface", "core";
  			#address-cells = <1>;
  			#size-cells = <0>;
@@ -142,8 +138,8 @@ index 2efc8a2d41a7..737097e9fb4f 100644
  			clocks = <&gcc GCC_CRYPTO_AHB_CLK>;
  			clock-names = "bam_clk";
  			#dma-cells = <1>;
-@@ -275,7 +314,7 @@
- 		blsp1_uart1: serial at 78af000 {
+@@ -286,7 +325,7 @@
+ 		serial at 78af000 {
  			compatible = "qcom,msm-uartdm-v1.4", "qcom,msm-uartdm";
  			reg = <0x78af000 0x200>;
 -			interrupts = <0 107 0>;
@@ -151,7 +147,7 @@ index 2efc8a2d41a7..737097e9fb4f 100644
  			status = "disabled";
  			clocks = <&gcc GCC_BLSP1_UART1_APPS_CLK>,
  				<&gcc GCC_BLSP1_AHB_CLK>;
-@@ -287,7 +326,7 @@
+@@ -298,7 +337,7 @@
  		serial at 78b0000 {
  			compatible = "qcom,msm-uartdm-v1.4", "qcom,msm-uartdm";
  			reg = <0x78b0000 0x200>;
@@ -160,7 +156,7 @@ index 2efc8a2d41a7..737097e9fb4f 100644
  			status = "disabled";
  			clocks = <&gcc GCC_BLSP1_UART2_APPS_CLK>,
  				<&gcc GCC_BLSP1_AHB_CLK>;
-@@ -309,6 +348,101 @@
+@@ -320,6 +359,101 @@
  			reg = <0x4ab000 0x4>;
  		};
  
@@ -262,7 +258,7 @@ index 2efc8a2d41a7..737097e9fb4f 100644
  		wifi0: wifi at a000000 {
  			compatible = "qcom,ipq4019-wifi";
  			reg = <0xa000000 0x200000>;
-@@ -342,7 +476,7 @@
+@@ -353,7 +487,7 @@
  				     <GIC_SPI 45 IRQ_TYPE_EDGE_RISING>,
  				     <GIC_SPI 46 IRQ_TYPE_EDGE_RISING>,
  				     <GIC_SPI 47 IRQ_TYPE_EDGE_RISING>,
@@ -271,7 +267,7 @@ index 2efc8a2d41a7..737097e9fb4f 100644
  			interrupt-names =  "msi0",  "msi1",  "msi2",  "msi3",
  					   "msi4",  "msi5",  "msi6",  "msi7",
  					   "msi8",  "msi9", "msi10", "msi11",
-@@ -384,7 +518,7 @@
+@@ -395,7 +529,7 @@
  				     <GIC_SPI 61 IRQ_TYPE_EDGE_RISING>,
  				     <GIC_SPI 62 IRQ_TYPE_EDGE_RISING>,
  				     <GIC_SPI 63 IRQ_TYPE_EDGE_RISING>,
@@ -280,6 +276,3 @@ index 2efc8a2d41a7..737097e9fb4f 100644
  			interrupt-names =  "msi0",  "msi1",  "msi2",  "msi3",
  					   "msi4",  "msi5",  "msi6",  "msi7",
  					   "msi8",  "msi9", "msi10", "msi11",
--- 
-2.11.0
-
diff --git a/target/linux/ipq40xx/patches-4.14/079-ARM-dts-ipq4019-fix-PCI-range.patch b/target/linux/ipq40xx/patches-4.14/079-ARM-dts-ipq4019-fix-PCI-range.patch
index eaccb00bb0..28cc3f7629 100644
--- a/target/linux/ipq40xx/patches-4.14/079-ARM-dts-ipq4019-fix-PCI-range.patch
+++ b/target/linux/ipq40xx/patches-4.14/079-ARM-dts-ipq4019-fix-PCI-range.patch
@@ -12,12 +12,12 @@ Signed-off-by: Mathias Kresin <dev at kresin.me>
 
 --- a/arch/arm/boot/dts/qcom-ipq4019.dtsi
 +++ b/arch/arm/boot/dts/qcom-ipq4019.dtsi
-@@ -359,7 +359,7 @@
+@@ -374,7 +374,7 @@
  			#size-cells = <2>;
  
  			ranges = <0x81000000 0 0x40200000 0x40200000 0 0x00100000
 -				  0x82000000 0 0x48000000 0x48000000 0 0x10000000>;
 +				  0x82000000 0 0x40300000 0x40300000 0 0x400000>;
  
- 			interrupts = <GIC_SPI 141 IRQ_TYPE_NONE>;
+ 			interrupts = <GIC_SPI 141 IRQ_TYPE_EDGE_RISING>;
  			interrupt-names = "msi";
diff --git a/target/linux/ipq40xx/patches-4.14/080-pinctrl-msm-fix-gpio-hog-related-boot-issues.patch b/target/linux/ipq40xx/patches-4.14/080-pinctrl-msm-fix-gpio-hog-related-boot-issues.patch
index 57ed940fd1..bf619889f7 100644
--- a/target/linux/ipq40xx/patches-4.14/080-pinctrl-msm-fix-gpio-hog-related-boot-issues.patch
+++ b/target/linux/ipq40xx/patches-4.14/080-pinctrl-msm-fix-gpio-hog-related-boot-issues.patch
@@ -61,7 +61,7 @@ Origin: other, https://patchwork.kernel.org/patch/10339127/
 
 --- a/arch/arm/boot/dts/qcom-ipq4019.dtsi
 +++ b/arch/arm/boot/dts/qcom-ipq4019.dtsi
-@@ -166,6 +166,7 @@
+@@ -181,6 +181,7 @@
  			compatible = "qcom,ipq4019-pinctrl";
  			reg = <0x01000000 0x300000>;
  			gpio-controller;
diff --git a/target/linux/ipq40xx/patches-4.14/081-clk-fix-apss-cpu-overclocking.patch b/target/linux/ipq40xx/patches-4.14/081-clk-fix-apss-cpu-overclocking.patch
index dcf17874b3..d71fbbbda2 100644
--- a/target/linux/ipq40xx/patches-4.14/081-clk-fix-apss-cpu-overclocking.patch
+++ b/target/linux/ipq40xx/patches-4.14/081-clk-fix-apss-cpu-overclocking.patch
@@ -42,11 +42,9 @@ Signed-off-by: John Crispin <john at phrozen.org>
  drivers/clk/qcom/gcc-ipq4019.c | 34 +++++++++++++++++++++++++++++++---
  1 file changed, 31 insertions(+), 3 deletions(-)
 
-diff --git a/drivers/clk/qcom/gcc-ipq4019.c b/drivers/clk/qcom/gcc-ipq4019.c
-index 46cb256b4aa2..4ec43f7d2e52 100644
 --- a/drivers/clk/qcom/gcc-ipq4019.c
 +++ b/drivers/clk/qcom/gcc-ipq4019.c
-@@ -1253,6 +1253,29 @@ static const struct clk_fepll_vco gcc_fepll_vco = {
+@@ -1253,6 +1253,29 @@ static const struct clk_fepll_vco gcc_fe
  	.reg = 0x2f020,
  };
  
@@ -76,7 +74,7 @@ index 46cb256b4aa2..4ec43f7d2e52 100644
  /*
   * Round rate function for APSS CPU PLL Clock divider.
   * It looks up the frequency table and returns the next higher frequency
-@@ -1265,7 +1288,7 @@ static long clk_cpu_div_round_rate(struct clk_hw *hw, unsigned long rate,
+@@ -1265,7 +1288,7 @@ static long clk_cpu_div_round_rate(struc
  	struct clk_hw *p_hw;
  	const struct freq_tbl *f;
  
@@ -85,7 +83,7 @@ index 46cb256b4aa2..4ec43f7d2e52 100644
  	if (!f)
  		return -EINVAL;
  
-@@ -1288,7 +1311,7 @@ static int clk_cpu_div_set_rate(struct clk_hw *hw, unsigned long rate,
+@@ -1288,7 +1311,7 @@ static int clk_cpu_div_set_rate(struct c
  	u32 mask;
  	int ret;
  
@@ -102,7 +100,7 @@ index 46cb256b4aa2..4ec43f7d2e52 100644
  	struct clk_fepll *pll = to_clk_fepll(hw);
  	u32 cdiv, pre_div;
  	u64 rate;
-@@ -1335,7 +1359,11 @@ clk_cpu_div_recalc_rate(struct clk_hw *hw,
+@@ -1335,7 +1359,11 @@ clk_cpu_div_recalc_rate(struct clk_hw *h
  	rate = clk_fepll_vco_calc_rate(pll, parent_rate) * 2;
  	do_div(rate, pre_div);
  
@@ -115,6 +113,3 @@ index 46cb256b4aa2..4ec43f7d2e52 100644
  };
  
  static const struct clk_ops clk_regmap_cpu_div_ops = {
--- 
-2.11.0
-
diff --git a/target/linux/ipq40xx/patches-4.14/082-ARM-dts-ipq4019-Add-TZ-and-SMEM-reserved-regions.patch b/target/linux/ipq40xx/patches-4.14/082-ARM-dts-ipq4019-Add-TZ-and-SMEM-reserved-regions.patch
index 56ae66b089..6a595d5ef6 100644
--- a/target/linux/ipq40xx/patches-4.14/082-ARM-dts-ipq4019-Add-TZ-and-SMEM-reserved-regions.patch
+++ b/target/linux/ipq40xx/patches-4.14/082-ARM-dts-ipq4019-Add-TZ-and-SMEM-reserved-regions.patch
@@ -84,5 +84,5 @@ this change qualifies for a stable at vger.kernel.org submission.
 +	};
 +
  	aliases {
- 		spi0 = &spi_0;
- 		spi1 = &spi_1;
+ 		spi0 = &blsp1_spi1;
+ 		spi1 = &blsp1_spi2;
diff --git a/target/linux/ipq40xx/patches-4.14/400-mtd-ubi-add-quirk-to-autoload-ubi-on-rt-ac58u.patch b/target/linux/ipq40xx/patches-4.14/400-mtd-ubi-add-quirk-to-autoload-ubi-on-rt-ac58u.patch
index 4ee79515c9..6a83d79d8c 100644
--- a/target/linux/ipq40xx/patches-4.14/400-mtd-ubi-add-quirk-to-autoload-ubi-on-rt-ac58u.patch
+++ b/target/linux/ipq40xx/patches-4.14/400-mtd-ubi-add-quirk-to-autoload-ubi-on-rt-ac58u.patch
@@ -17,7 +17,7 @@ Signed-off-by: Christian Lamparter <chunkeey at googlemail.com>
 
 --- a/drivers/mtd/ubi/build.c
 +++ b/drivers/mtd/ubi/build.c
-@@ -1184,6 +1184,9 @@ static void __init ubi_auto_attach(void)
+@@ -1187,6 +1187,9 @@ static void __init ubi_auto_attach(void)
  	mtd = open_mtd_device("ubi");
  	if (IS_ERR(mtd))
  		mtd = open_mtd_device("data");
@@ -25,5 +25,5 @@ Signed-off-by: Christian Lamparter <chunkeey at googlemail.com>
 +	if (IS_ERR(mtd))
 +		mtd = open_mtd_device("UBI_DEV");
  
- 	if (!IS_ERR(mtd)) {
- 		size_t len;
+ 	if (IS_ERR(mtd))
+ 		return;
diff --git a/target/linux/ipq40xx/patches-4.14/701-dts-ipq4019-add-mdio-node.patch b/target/linux/ipq40xx/patches-4.14/701-dts-ipq4019-add-mdio-node.patch
index 25f596eaff..be32d70aa8 100644
--- a/target/linux/ipq40xx/patches-4.14/701-dts-ipq4019-add-mdio-node.patch
+++ b/target/linux/ipq40xx/patches-4.14/701-dts-ipq4019-add-mdio-node.patch
@@ -15,7 +15,7 @@ so the info might change.
 
 --- a/arch/arm/boot/dts/qcom-ipq4019.dtsi
 +++ b/arch/arm/boot/dts/qcom-ipq4019.dtsi
-@@ -540,6 +540,34 @@
+@@ -555,6 +555,34 @@
  			status = "disabled";
  		};
  
@@ -48,5 +48,5 @@ so the info might change.
 +		};
 +
  		usb3_ss_phy: ssphy at 9a000 {
- 			compatible = "qca,uni-ssphy";
- 			reg = <0x9a000 0x800>;
+ 			compatible = "qcom,usb-ss-ipq4019-phy";
+ 			#phy-cells = <0>;
diff --git a/target/linux/ipq40xx/patches-4.14/702-dts-ipq4019-add-PHY-switch-nodes.patch b/target/linux/ipq40xx/patches-4.14/702-dts-ipq4019-add-PHY-switch-nodes.patch
index eb3d9be013..b25b775efa 100644
--- a/target/linux/ipq40xx/patches-4.14/702-dts-ipq4019-add-PHY-switch-nodes.patch
+++ b/target/linux/ipq40xx/patches-4.14/702-dts-ipq4019-add-PHY-switch-nodes.patch
@@ -14,7 +14,7 @@ Signed-off-by: Christian Lamparter <chunkeey at gmail.com>
 
 --- a/arch/arm/boot/dts/qcom-ipq4019.dtsi
 +++ b/arch/arm/boot/dts/qcom-ipq4019.dtsi
-@@ -568,6 +568,29 @@
+@@ -583,6 +583,29 @@
  			};
  		};
  
@@ -42,5 +42,5 @@ Signed-off-by: Christian Lamparter <chunkeey at gmail.com>
 +		};
 +
  		usb3_ss_phy: ssphy at 9a000 {
- 			compatible = "qca,uni-ssphy";
- 			reg = <0x9a000 0x800>;
+ 			compatible = "qcom,usb-ss-ipq4019-phy";
+ 			#phy-cells = <0>;
diff --git a/target/linux/ipq40xx/patches-4.14/711-dts-ipq4019-add-ethernet-essedma-node.patch b/target/linux/ipq40xx/patches-4.14/711-dts-ipq4019-add-ethernet-essedma-node.patch
index 6e4137073a..d2d235a940 100644
--- a/target/linux/ipq40xx/patches-4.14/711-dts-ipq4019-add-ethernet-essedma-node.patch
+++ b/target/linux/ipq40xx/patches-4.14/711-dts-ipq4019-add-ethernet-essedma-node.patch
@@ -14,10 +14,8 @@ Signed-off-by: Christian Lamparter <chunkeey at gmail.com>
  arch/arm/boot/dts/qcom-ipq4019.dtsi | 60 +++++++++++++++++++++++++++++++++++++
  1 file changed, 60 insertions(+)
 
-Index: linux-4.14.54/arch/arm/boot/dts/qcom-ipq4019.dtsi
-===================================================================
---- linux-4.14.54.orig/arch/arm/boot/dts/qcom-ipq4019.dtsi
-+++ linux-4.14.54/arch/arm/boot/dts/qcom-ipq4019.dtsi
+--- a/arch/arm/boot/dts/qcom-ipq4019.dtsi
++++ b/arch/arm/boot/dts/qcom-ipq4019.dtsi
 @@ -44,6 +44,8 @@
  		spi1 = &blsp1_spi2;
  		i2c0 = &blsp1_i2c3;
diff --git a/target/linux/ipq40xx/patches-4.14/900-dts-ipq4019-ap-dk01.1.patch b/target/linux/ipq40xx/patches-4.14/900-dts-ipq4019-ap-dk01.1.patch
index b24d85ba13..25652bb2c9 100644
--- a/target/linux/ipq40xx/patches-4.14/900-dts-ipq4019-ap-dk01.1.patch
+++ b/target/linux/ipq40xx/patches-4.14/900-dts-ipq4019-ap-dk01.1.patch
@@ -1,7 +1,5 @@
-Index: linux-4.14.54/arch/arm/boot/dts/qcom-ipq4019-ap.dk01.1.dtsi
-===================================================================
---- linux-4.14.54.orig/arch/arm/boot/dts/qcom-ipq4019-ap.dk01.1.dtsi
-+++ linux-4.14.54/arch/arm/boot/dts/qcom-ipq4019-ap.dk01.1.dtsi
+--- a/arch/arm/boot/dts/qcom-ipq4019-ap.dk01.1.dtsi
++++ b/arch/arm/boot/dts/qcom-ipq4019-ap.dk01.1.dtsi
 @@ -15,12 +15,39 @@
   */
  
@@ -80,10 +78,8 @@ Index: linux-4.14.54/arch/arm/boot/dts/qcom-ipq4019-ap.dk01.1.dtsi
  		usb3_ss_phy: ssphy at 9a000 {
  			status = "ok";
  		};
-Index: linux-4.14.54/arch/arm/boot/dts/qcom-ipq4019-ap.dk01.1-c1.dts
-===================================================================
---- linux-4.14.54.orig/arch/arm/boot/dts/qcom-ipq4019-ap.dk01.1-c1.dts
-+++ linux-4.14.54/arch/arm/boot/dts/qcom-ipq4019-ap.dk01.1-c1.dts
+--- a/arch/arm/boot/dts/qcom-ipq4019-ap.dk01.1-c1.dts
++++ b/arch/arm/boot/dts/qcom-ipq4019-ap.dk01.1-c1.dts
 @@ -18,5 +18,73 @@
  
  / {
diff --git a/target/linux/mediatek/patches-4.14/0052-net-phy-add-FC.patch b/target/linux/mediatek/patches-4.14/0052-net-phy-add-FC.patch
index 3c4fc5a7ce..134d95d992 100644
--- a/target/linux/mediatek/patches-4.14/0052-net-phy-add-FC.patch
+++ b/target/linux/mediatek/patches-4.14/0052-net-phy-add-FC.patch
@@ -10,7 +10,7 @@ Signed-off-by: John Crispin <john at phrozen.org>
 
 --- a/drivers/net/phy/phy_device.c
 +++ b/drivers/net/phy/phy_device.c
-@@ -1929,7 +1929,7 @@ static struct phy_driver genphy_driver =
+@@ -1926,7 +1926,7 @@ static struct phy_driver genphy_driver =
  	.config_init	= genphy_config_init,
  	.features	= PHY_GBIT_FEATURES | SUPPORTED_MII |
  			  SUPPORTED_AUI | SUPPORTED_FIBRE |
diff --git a/target/linux/mediatek/patches-4.14/0191-usb-xhci-allow-imod-interval-to-be-configurable.patch b/target/linux/mediatek/patches-4.14/0191-usb-xhci-allow-imod-interval-to-be-configurable.patch
index c48db55d7f..ee260d2aab 100644
--- a/target/linux/mediatek/patches-4.14/0191-usb-xhci-allow-imod-interval-to-be-configurable.patch
+++ b/target/linux/mediatek/patches-4.14/0191-usb-xhci-allow-imod-interval-to-be-configurable.patch
@@ -127,7 +127,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
  	/* Set the HCD state before we enable the irqs */
 --- a/drivers/usb/host/xhci.h
 +++ b/drivers/usb/host/xhci.h
-@@ -1726,6 +1726,8 @@ struct xhci_hcd {
+@@ -1730,6 +1730,8 @@ struct xhci_hcd {
  	u8		max_interrupters;
  	u8		max_ports;
  	u8		isoc_threshold;
diff --git a/target/linux/mediatek/patches-4.14/0227-arm-dts-Add-Unielec-U7623-DTS.patch b/target/linux/mediatek/patches-4.14/0227-arm-dts-Add-Unielec-U7623-DTS.patch
index 8688a453df..eb864e4657 100644
--- a/target/linux/mediatek/patches-4.14/0227-arm-dts-Add-Unielec-U7623-DTS.patch
+++ b/target/linux/mediatek/patches-4.14/0227-arm-dts-Add-Unielec-U7623-DTS.patch
@@ -11,8 +11,6 @@ Subject: [PATCH] arm: dts: Add Unielec U7623 DTS
  create mode 100644 arch/arm/boot/dts/mt7623a-unielec-u7623-02-emmc-512M.dts
  create mode 100644 arch/arm/boot/dts/mt7623a-unielec-u7623-02-emmc.dtsi
 
-diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
-index 3fec84fa0..e685ce9a4 100644
 --- a/arch/arm/boot/dts/Makefile
 +++ b/arch/arm/boot/dts/Makefile
 @@ -1062,6 +1062,7 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \
@@ -23,9 +21,6 @@ index 3fec84fa0..e685ce9a4 100644
  	mt7623n-rfb-nand.dtb \
  	mt7623n-bananapi-bpi-r2.dtb \
  	mt8127-moose.dtb \
-diff --git a/arch/arm/boot/dts/mt7623a-unielec-u7623-02-emmc-512M.dts b/arch/arm/boot/dts/mt7623a-unielec-u7623-02-emmc-512M.dts
-new file mode 100644
-index 000000000..3b14eccd3
 --- /dev/null
 +++ b/arch/arm/boot/dts/mt7623a-unielec-u7623-02-emmc-512M.dts
 @@ -0,0 +1,17 @@
@@ -46,9 +41,6 @@ index 000000000..3b14eccd3
 +		reg = <0 0x80000000 0 0x20000000>;
 +	};
 +};
-diff --git a/arch/arm/boot/dts/mt7623a-unielec-u7623-02-emmc.dtsi b/arch/arm/boot/dts/mt7623a-unielec-u7623-02-emmc.dtsi
-new file mode 100644
-index 000000000..436b02f2d
 --- /dev/null
 +++ b/arch/arm/boot/dts/mt7623a-unielec-u7623-02-emmc.dtsi
 @@ -0,0 +1,375 @@
@@ -427,6 +419,3 @@ index 000000000..436b02f2d
 +	status = "okay";
 +};
 +
--- 
-2.14.1
-
diff --git a/target/linux/oxnas/patches-4.14/999-libata-hacks.patch b/target/linux/oxnas/patches-4.14/999-libata-hacks.patch
index da3660fada..e490dbf7c1 100644
--- a/target/linux/oxnas/patches-4.14/999-libata-hacks.patch
+++ b/target/linux/oxnas/patches-4.14/999-libata-hacks.patch
@@ -15,7 +15,7 @@
  	/* initialize internal qc */
  
  	/* XXX: Tag 0 is used for drivers with legacy EH as some
-@@ -5124,6 +5132,9 @@ struct ata_queued_cmd *ata_qc_new_init(s
+@@ -5127,6 +5135,9 @@ struct ata_queued_cmd *ata_qc_new_init(s
  	if (unlikely(ap->pflags & ATA_PFLAG_FROZEN))
  		return NULL;
  
@@ -25,7 +25,7 @@
  	/* libsas case */
  	if (ap->flags & ATA_FLAG_SAS_HOST) {
  		tag = ata_sas_allocate_tag(ap);
-@@ -5169,6 +5180,8 @@ void ata_qc_free(struct ata_queued_cmd *
+@@ -5172,6 +5183,8 @@ void ata_qc_free(struct ata_queued_cmd *
  		qc->tag = ATA_TAG_POISON;
  		if (ap->flags & ATA_FLAG_SAS_HOST)
  			ata_sas_free_tag(tag, ap);
@@ -36,7 +36,7 @@
  
 --- a/include/linux/libata.h
 +++ b/include/linux/libata.h
-@@ -918,6 +918,8 @@ struct ata_port_operations {
+@@ -919,6 +919,8 @@ struct ata_port_operations {
  	void (*qc_prep)(struct ata_queued_cmd *qc);
  	unsigned int (*qc_issue)(struct ata_queued_cmd *qc);
  	bool (*qc_fill_rtf)(struct ata_queued_cmd *qc);
@@ -45,7 +45,7 @@
  
  	/*
  	 * Configuration and exception handling
-@@ -1008,6 +1010,9 @@ struct ata_port_operations {
+@@ -1009,6 +1011,9 @@ struct ata_port_operations {
  	void (*phy_reset)(struct ata_port *ap);
  	void (*eng_timeout)(struct ata_port *ap);
  
diff --git a/target/linux/ramips/patches-4.14/0036-mtd-fix-cfi-cmdset-0002-erase-status-check.patch b/target/linux/ramips/patches-4.14/0036-mtd-fix-cfi-cmdset-0002-erase-status-check.patch
deleted file mode 100644
index 9226202b7f..0000000000
--- a/target/linux/ramips/patches-4.14/0036-mtd-fix-cfi-cmdset-0002-erase-status-check.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 8e72a3a1be8f6328bd7ef491332ba541547b6086 Mon Sep 17 00:00:00 2001
-From: John Crispin <blogic at openwrt.org>
-Date: Mon, 15 Jul 2013 00:38:51 +0200
-Subject: [PATCH 36/53] mtd: fix cfi cmdset 0002 erase status check
-
----
- drivers/mtd/chips/cfi_cmdset_0002.c |    4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
---- a/drivers/mtd/chips/cfi_cmdset_0002.c
-+++ b/drivers/mtd/chips/cfi_cmdset_0002.c
-@@ -2295,7 +2295,7 @@ static int __xipram do_erase_chip(struct
- 			chip->erase_suspended = 0;
- 		}
- 
--		if (chip_ready(map, adr))
-+		if (chip_good(map, adr, map_word_ff(map)))
- 			break;
- 
- 		if (time_after(jiffies, timeo)) {
-@@ -2385,7 +2385,7 @@ static int __xipram do_erase_oneblock(st
- 			chip->erase_suspended = 0;
- 		}
- 
--		if (chip_ready(map, adr)) {
-+		if (chip_good(map, adr, map_word_ff(map))) {
- 			xip_enable(map, chip, adr);
- 			break;
- 		}
diff --git a/target/linux/ramips/patches-4.14/0037-mtd-cfi-cmdset-0002-force-word-write.patch b/target/linux/ramips/patches-4.14/0037-mtd-cfi-cmdset-0002-force-word-write.patch
index 7ee8284535..1cadfcdb00 100644
--- a/target/linux/ramips/patches-4.14/0037-mtd-cfi-cmdset-0002-force-word-write.patch
+++ b/target/linux/ramips/patches-4.14/0037-mtd-cfi-cmdset-0002-force-word-write.patch
@@ -16,7 +16,7 @@ Subject: [PATCH 37/53] mtd: cfi cmdset 0002 force word write
 -#define FORCE_WORD_WRITE 0
 +#define FORCE_WORD_WRITE 1
  
- #define MAX_WORD_RETRIES 3
+ #define MAX_RETRIES 3
  
 @@ -51,7 +51,9 @@
  
-- 
2.15.2 (Apple Git-101.1)


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From ng.hong.quan at gmail.com  Sat Jul 28 22:29:45 2018
From: ng.hong.quan at gmail.com (=?UTF-8?B?Tmd1eeG7hW4gSOG7k25nIFF1w6Ju?=)
Date: Sun, 29 Jul 2018 09:29:45 +0700
Subject: [OpenWrt-Devel] Read-only copy of Wiki?
Message-ID: <CAL-Ryxgm7dVhuxceRp0vh-ncL-hNUPMTo3fRDdXzLAiSweJT7g@mail.gmail.com>

Hi

The OpenWrt wiki is sometimes too slow to access from my country. So I
would like to host a read-only copy of it, to serve as reference
documentation.

Is this possible? Can you help export the wiki?

Thanks

-- 
Qu?n

quan.hoabinh.vn  agriconnect.vn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20180729/378cabde/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From rosenp at gmail.com  Sun Jul 29 01:06:49 2018
From: rosenp at gmail.com (Rosen Penev)
Date: Sat, 28 Jul 2018 22:06:49 -0700
Subject: [OpenWrt-Devel] [PATCH] hostapd: Fix compile with OpenSSL 1.1.0
 + no deprecated APIs
In-Reply-To: <9e94aa88-0543-d371-5902-190f88eede92@nbd.name>
References: <20180616014039.14842-1-rosenp@gmail.com>
 <9e94aa88-0543-d371-5902-190f88eede92@nbd.name>
Message-ID: <CAKxU2N_NymsyTJJAP4adDApfqLYvnvG9=z+Ns=m=T5WBT62g1Q@mail.gmail.com>

On Fri, Jul 27, 2018 at 7:46 AM Felix Fietkau <nbd at nbd.name> wrote:
>
> On 2018-06-16 03:40, Rosen Penev wrote:
> > Signed-off-by: Rosen Penev <rosenp at gmail.com>
> Did you send this patch upstream?
http://lists.infradead.org/pipermail/hostap/2018-July/038710.html

I'm not sure if that's the right place.
>
> - Felix

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From rosenp at gmail.com  Sun Jul 29 03:26:29 2018
From: rosenp at gmail.com (Rosen Penev)
Date: Sun, 29 Jul 2018 00:26:29 -0700
Subject: [OpenWrt-Devel] [PATCH] libjson-c: Update package URL
Message-ID: <20180729072629.21503-1-rosenp@gmail.com>

Found through UScan.

Signed-off-by: Rosen Penev <rosenp at gmail.com>
---
 package/libs/libjson-c/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/libs/libjson-c/Makefile b/package/libs/libjson-c/Makefile
index a9a177e5a2..fd785cdb5e 100644
--- a/package/libs/libjson-c/Makefile
+++ b/package/libs/libjson-c/Makefile
@@ -36,7 +36,7 @@ define Package/libjson-c
   SECTION:=libs
   CATEGORY:=Libraries
   TITLE:=javascript object notation
-  URL:=http://oss.metaparadigm.com/json-c/
+  URL:=https://json-c.github.io/json-c/
 endef
 
 define Package/libjson-c/description
-- 
2.17.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From rosenp at gmail.com  Sun Jul 29 03:35:58 2018
From: rosenp at gmail.com (Rosen Penev)
Date: Sun, 29 Jul 2018 00:35:58 -0700
Subject: [OpenWrt-Devel] [PATCH] thc-ipv6: Update URLs
Message-ID: <20180729073558.22613-1-rosenp@gmail.com>

Development has moved to GitHub. Found using UScan.

Signed-off-by: Rosen Penev <rosenp at gmail.com>
---
 package/network/ipv6/thc-ipv6/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/network/ipv6/thc-ipv6/Makefile b/package/network/ipv6/thc-ipv6/Makefile
index df3a67c23b..91bacf625e 100644
--- a/package/network/ipv6/thc-ipv6/Makefile
+++ b/package/network/ipv6/thc-ipv6/Makefile
@@ -13,7 +13,7 @@ PKG_RELEASE:=1
 PKG_LICENSE:=GPL-3.0
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://freeworld.thc.org/releases/
+PKG_SOURCE_URL:=@GITHUB/vanhauser-thc/THC-Archive/master/Tools
 PKG_HASH:=440a3ae98b57100c397ec4f8634468dbbb0c3b48788c6b74af2a597a90544a96
 
 PKG_MAINTAINER:=Jo-Philipp Wich <jo at mein.io>
@@ -42,7 +42,7 @@ define BuildTool
     SECTION:=net
     CATEGORY:=Network
     DEPENDS:=+libpcap $(THC_DEPENDS_$(1))
-    URL:=http://freeworld.thc.org/
+    URL:=https://github.com/vanhauser-thc/thc-ipv6
     SUBMENU:=THC-IPv6 attack and analyzing toolkit
   endef
 
-- 
2.17.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From hacks at slashdirt.org  Sun Jul 29 05:07:21 2018
From: hacks at slashdirt.org (=?UTF-8?q?Thibaut=20VAR=C3=88NE?=)
Date: Sun, 29 Jul 2018 11:07:21 +0200
Subject: [OpenWrt-Devel] [PATCH v2 1/4] ramips: fix RBM33G name
Message-ID: <20180729090724.8436-1-hacks@slashdirt.org>

The device name is corrected to match the hardware-stored (in hard config
flash space) device name.

Tested-by: Tobias Schramm <tobleminer at gmail.com>
Signed-off-by: Thibaut VAR?NE <hacks at slashdirt.org>
---
 target/linux/ramips/dts/RBM33G.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/ramips/dts/RBM33G.dts b/target/linux/ramips/dts/RBM33G.dts
index cc6da267a2..612dc106ed 100644
--- a/target/linux/ramips/dts/RBM33G.dts
+++ b/target/linux/ramips/dts/RBM33G.dts
@@ -7,7 +7,7 @@
 
 / {
 	compatible = "mikrotik,rbm33g", "mediatek,mt7621-soc";
-	model = "MikroTik RBM33G";
+	model = "MikroTik RouterBOARD M33G";
 
 	aliases {
 		led-status = &led_usr;
-- 
2.13.6 (Apple Git-96)


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From hacks at slashdirt.org  Sun Jul 29 05:07:22 2018
From: hacks at slashdirt.org (=?UTF-8?q?Thibaut=20VAR=C3=88NE?=)
Date: Sun, 29 Jul 2018 11:07:22 +0200
Subject: [OpenWrt-Devel] [PATCH v2 2/4] ramips: fix RBM33G partitioning
In-Reply-To: <20180729090724.8436-1-hacks@slashdirt.org>
References: <20180729090724.8436-1-hacks@slashdirt.org>
Message-ID: <20180729090724.8436-2-hacks@slashdirt.org>

This patch improves 5684d087418d176cfdef4e045e1950ca7ba3b09f by correcting
the partition scheme for the "RouterBoot" section of the flash.

This section is subdivided in several segments, as they are on ar71xx
RB devices, albeit with different offsets and sizes. The naming convention
from ar71xx has been preserved. The preferred 'fixed-partitions' DTS
node syntax is used, with nesting support as introduced in 2a598bbaa3.

The OEM source code also define a "RouterBootFake" partition at the
beginning of the secondary flash chip: to avoid trouble if OEM ever makes
use of that space, it is also defined here.

The resulting partition scheme looks like this:
[   10.114241] m25p80 spi0.0: w25x40 (512 Kbytes)
[   10.118708] 1 fixed-partitions partitions found on MTD device spi0.0
[   10.125049] Creating 1 MTD partitions on "spi0.0":
[   10.129824] 0x000000000000-0x000000040000 : "RouterBoot"
[   10.136215] 5 fixed-partitions partitions found on MTD device RouterBoot
[   10.142894] Creating 5 MTD partitions on "RouterBoot":
[   10.148032] 0x000000000000-0x00000000f000 : "routerboot"
[   10.154336] 0x00000000f000-0x000000010000 : "hard_config"
[   10.160665] 0x000000010000-0x00000001f000 : "routerboot2"
[   10.167046] 0x000000020000-0x000000021000 : "soft_config"
[   10.173461] 0x000000030000-0x000000031000 : "bios"
[   10.190191] m25p80 spi0.1: w25q128 (16384 Kbytes)
[   10.194950] 2 fixed-partitions partitions found on MTD device spi0.1
[   10.201271] Creating 2 MTD partitions on "spi0.1":
[   10.206071] 0x000000000000-0x000000040000 : "RouterBootFake"
[   10.212746] 0x000000040000-0x000001000000 : "firmware"
[   10.307216] 2 minor-fw partitions found on MTD device firmware
[   10.313044] 0x000000040000-0x000000220000 : "kernel"
[   10.319002] 0x000000220000-0x000001000000 : "rootfs"
[   10.324906] mtd: device 9 (rootfs) set to be root filesystem
[   10.330678] 1 squashfs-split partitions found on MTD device rootfs
[   10.336886] 0x000000b40000-0x000001000000 : "rootfs_data"

Leave a note in DTS to explain how the original author selected the SPI speed.

Tested-by: Tobias Schramm <tobleminer at gmail.com>
Signed-off-by: Thibaut VAR?NE <hacks at slashdirt.org>
---
 target/linux/ramips/dts/RBM33G.dts | 69 +++++++++++++++++++++++++++++---------
 1 file changed, 54 insertions(+), 15 deletions(-)

diff --git a/target/linux/ramips/dts/RBM33G.dts b/target/linux/ramips/dts/RBM33G.dts
index 612dc106ed..a02d03818f 100644
--- a/target/linux/ramips/dts/RBM33G.dts
+++ b/target/linux/ramips/dts/RBM33G.dts
@@ -104,18 +104,44 @@
 		reg = <0>;
 		spi-max-frequency = <3125000>;
 
-		partition at 0 {
-			label = "routerboot";
-			reg = <0x0 0xf000>;
-			read-only;
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition at 0 {
+				label = "RouterBoot";
+				reg = <0x0 0x40000>;
+				read-only;
+				compatible = "fixed-partitions";
+				#address-cells = <1>;
+				#size-cells = <1>;
+
+				routerboot at 0 {
+					reg = <0x0 0xf000>;
+					read-only;
+				};
+
+				hard_config: hard_config at f000 {
+					reg = <0xf000 0x1000>;
+					read-only;
+				};
+
+				routerboot2 at 10000 {
+					reg = <0x10000 0xf000>;
+					read-only;
+				};
+
+				soft_config at 20000 {
+					reg = <0x20000 0x1000>;
+				};
+
+				bios at 30000 {
+					reg = <0x30000 0x1000>;
+					read-only;
+				};
+			};
 		};
-
-		factory: partition at f000 {
-			label = "factory";
-			reg = <0xf000 0x71000>;
-			read-only;
-		};
-
 	};
 
 	w25q128 at 0 {
@@ -123,17 +149,30 @@
 		#size-cells = <1>;
 		compatible = "jedec,spi-nor";
 		reg = <1>;
+		// XXX empiric value to obtain actual 10MHz SCK at the chip 
 		spi-max-frequency = <3125000>;
 
-		partition at 40000 {
-			label = "firmware";
-			reg = <0x040000 0xFC0000>;
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			// this contains no data but is named so in OEM source
+			partition at 0 {
+				label = "RouterBootFake";
+				reg = <0x0 0x40000>;
+				read-only;
+			};
+
+			firmware at 40000 {
+				reg = <0x040000 0xFC0000>;
+			};
 		};
 	};
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x0010>;
+	mtd-mac-address = <&hard_config 0x0010>;
 	mtd-mac-address-increment = <1>;
 };
 
-- 
2.13.6 (Apple Git-96)


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From hacks at slashdirt.org  Sun Jul 29 05:07:23 2018
From: hacks at slashdirt.org (=?UTF-8?q?Thibaut=20VAR=C3=88NE?=)
Date: Sun, 29 Jul 2018 11:07:23 +0200
Subject: [OpenWrt-Devel] [PATCH v2 3/4] ramips: fix RBM11G name
In-Reply-To: <20180729090724.8436-1-hacks@slashdirt.org>
References: <20180729090724.8436-1-hacks@slashdirt.org>
Message-ID: <20180729090724.8436-3-hacks@slashdirt.org>

The device name is corrected to match the hardware-stored (in hard config
flash space) device name.

Tested-by: Tobias Schramm <tobleminer at gmail.com>
Signed-off-by: Thibaut VAR?NE <hacks at slashdirt.org>
---
 target/linux/ramips/dts/RBM11G.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/ramips/dts/RBM11G.dts b/target/linux/ramips/dts/RBM11G.dts
index f312093a22..c26c68350f 100644
--- a/target/linux/ramips/dts/RBM11G.dts
+++ b/target/linux/ramips/dts/RBM11G.dts
@@ -7,7 +7,7 @@
 
 / {
 	compatible = "mikrotik,rbm11g", "mediatek,mt7621-soc";
-	model = "MikroTik RBM11G";
+	model = "MikroTik RouterBOARD M11G";
 
 	aliases {
 		led-status = &led_usr;
-- 
2.13.6 (Apple Git-96)


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From hacks at slashdirt.org  Sun Jul 29 05:07:24 2018
From: hacks at slashdirt.org (=?UTF-8?q?Thibaut=20VAR=C3=88NE?=)
Date: Sun, 29 Jul 2018 11:07:24 +0200
Subject: [OpenWrt-Devel] [PATCH v2 4/4] ramips: improve RBM11G partitioning
In-Reply-To: <20180729090724.8436-1-hacks@slashdirt.org>
References: <20180729090724.8436-1-hacks@slashdirt.org>
Message-ID: <20180729090724.8436-4-hacks@slashdirt.org>

This patch improves faf64056ddd46992a75b1e277d94541c7251035c by updating
the partition scheme for the "RouterBoot" section of the flash.

This section is subdivided in several segments, as they are on ar71xx
RB devices, albeit with different offsets and sizes. The naming convention
from ar71xx has been preserved. The preferred 'fixed-partitions' DTS
node syntax is used, with nesting support as introduced in 2a598bbaa3.

Leave a note in DTS to explain how the original author selected the SPI speed.

Tested-by: Tobias Schramm <tobleminer at gmail.com>
Signed-off-by: Thibaut VAR?NE <hacks at slashdirt.org>
---
 target/linux/ramips/dts/RBM11G.dts | 59 +++++++++++++++++++++++++++-----------
 1 file changed, 43 insertions(+), 16 deletions(-)

diff --git a/target/linux/ramips/dts/RBM11G.dts b/target/linux/ramips/dts/RBM11G.dts
index c26c68350f..715d9dda48 100644
--- a/target/linux/ramips/dts/RBM11G.dts
+++ b/target/linux/ramips/dts/RBM11G.dts
@@ -90,29 +90,56 @@
 		#size-cells = <1>;
 		compatible = "jedec,spi-nor";
 		reg = <0>;
+		// XXX empiric value to obtain actual 10MHz SCK at the chip
 		spi-max-frequency = <3125000>;
 
-		partition at 0 {
-			label = "routerboot";
-			reg = <0x000000 0x00F000>;
-			read-only;
-		};
-
-		factory: partition at f000 {
-			label = "factory";
-			reg = <0x00F000 0x031000>;
-			read-only;
-		};
-
-		partition at 40000 {
-			label = "firmware";
-			reg = <0x040000 0xFC0000>;
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition at 0 {
+				label = "RouterBoot";
+				reg = <0x0 0x40000>;
+				read-only;
+				compatible = "fixed-partitions";
+				#address-cells = <1>;
+				#size-cells = <1>;
+
+				routerboot at 0 {
+					reg = <0x0 0xf000>;
+					read-only;
+				};
+
+				hard_config: hard_config at f000 {
+					reg = <0xf000 0x1000>;
+					read-only;
+				};
+
+				routerboot2 at 10000 {
+					reg = <0x10000 0xf000>;
+					read-only;
+				};
+
+				soft_config at 20000 {
+					reg = <0x20000 0x1000>;
+				};
+
+				bios at 30000 {
+					reg = <0x30000 0x1000>;
+					read-only;
+				};
+			};
+
+			firmware at 40000 {
+				reg = <0x040000 0xFC0000>;
+			};
 		};
 	};
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x0010>;
+	mtd-mac-address = <&hard_config 0x0010>;
 	mtd-mac-address-increment = <1>;
 };
 
-- 
2.13.6 (Apple Git-96)


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From hacks at slashdirt.org  Sun Jul 29 05:10:46 2018
From: hacks at slashdirt.org (=?UTF-8?q?Thibaut=20VAR=C3=88NE?=)
Date: Sun, 29 Jul 2018 11:10:46 +0200
Subject: [OpenWrt-Devel] [RFT] [PATCH] ramips: add RB750Gr3 native support
Message-ID: <20180729091046.8498-1-hacks@slashdirt.org>

This patch attempts to support the MikroTik RouterBOARD 750Gr3 "natively",
i.e. without reflashing the bootloader.

Installation through RouterBoot probably follows the usual MikroTik method
(force tftp booting via long press on the reset button, boot openwrt
initramfs, and sysupgrade from there).

I don't own the hardware, this code is untested.

Signed-off-by: Thibaut VAR?NE <hacks at slashdirt.org>
---
 .../linux/ramips/base-files/etc/board.d/02_network |   2 +-
 target/linux/ramips/base-files/lib/ramips.sh       |   3 -
 .../ramips/base-files/lib/upgrade/platform.sh      |   3 +-
 target/linux/ramips/dts/RB750Gr3.dts               | 105 ++++++++++++++-------
 target/linux/ramips/image/mt7621.mk                |  15 ++-
 5 files changed, 79 insertions(+), 49 deletions(-)

diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network
index 818a919f41..e47c3cd5c9 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -201,9 +201,9 @@ ramips_setup_interfaces()
 	jhr-n805r|\
 	jhr-n825r|\
 	jhr-n926r|\
+	mikrotik,rb750gr3|\
 	mikrotik,rbm33g|\
 	mzk-wdpr|\
-	rb750gr3|\
 	rt-n14u|\
 	tplink,c20-v4|\
 	tplink,c50-v3|\
diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh
index 5741cbd2ee..2dd0388426 100755
--- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -418,9 +418,6 @@ ramips_board_detect() {
 	*"R6220")
 		name="r6220"
 		;;
-	*"RB750Gr3")
-		name="rb750gr3"
-		;;
 	*"RE350 v1")
 		name="re350-v1"
 		;;
diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh
index a7f9c1722e..818d854464 100755
--- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
@@ -131,7 +131,6 @@ platform_check_image() {
 	psr-680w|\
 	px-4885-4M|\
 	px-4885-8M|\
-	rb750gr3|\
 	re6500|\
 	rp-n53|\
 	rt5350f-olinuxino|\
@@ -301,6 +300,7 @@ platform_check_image() {
 		nand_do_platform_check "$board" "$1"
 		return $?;
 		;;
+	mikrotik,rb750gr3|\
 	mikrotik,rbm11g|\
 	mikrotik,rbm33g|\
 	re350-v1)
@@ -328,6 +328,7 @@ platform_pre_upgrade() {
 	local board=$(board_name)
 
 	case "$board" in
+	mikrotik,rb750gr3|\
 	mikrotik,rbm11g|\
 	mikrotik,rbm33g)
 		[ -z "$(rootfs_type)" ] && mtd erase firmware
diff --git a/target/linux/ramips/dts/RB750Gr3.dts b/target/linux/ramips/dts/RB750Gr3.dts
index 563a537268..6a163734ad 100644
--- a/target/linux/ramips/dts/RB750Gr3.dts
+++ b/target/linux/ramips/dts/RB750Gr3.dts
@@ -7,10 +7,10 @@
 
 / {
 	compatible = "mikrotik,rb750gr3", "mediatek,mt7621-soc";
-	model = "MikroTik RB750Gr3";
+	model = "MikroTik RouterBOARD 750Gr3";
 
 	aliases {
-		led-status = &led_pwr;
+		led-status = &led_usr;
 	};
 
 	memory at 0 {
@@ -19,18 +19,19 @@
 	};
 
 	chosen {
-		bootargs = "console=ttyS0,57600";
+		bootargs = "console=ttyS0,115200";
 	};
 
 	gpio-leds {
 		compatible = "gpio-leds";
 
-		led_pwr: pwr {
+		pwr {
 			label = "rb750gr3:blue:pwr";
 			gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>;
+			default-state = "on";
 		};
 
-		usr {
+		led_usr: usr {
 			label = "rb750gr3:green:usr";
 			gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>;
 		};
@@ -45,7 +46,7 @@
 		mode {
 			label = "mode";
 			gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
-			linux,code = <KEY_RFKILL>;
+			linux,code = <BTN_0>;
 		};
 
 		res {
@@ -66,9 +67,21 @@
 		};
 
 		usb {
-			gpio-export,name = "usb";
+			gpio-export,name = "usb_power_off";
 			gpio-export,output = <1>;
-			gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
+			gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
+		};
+
+		// Used to enable power-over-ethernet passthrough to eth4 (according to OEM source).
+		poe_out {
+			gpio-export,name = "poe_passthrough";
+			gpio-export,output = <0>;
+			gpios = <&gpio0 17 GPIO_ACTIVE_HIGH>;
+		};
+
+		poe_status {
+			gpio-export,name = "poe_status";
+			gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
 		};
 	};
 };
@@ -76,49 +89,69 @@
 &spi0 {
 	status = "okay";
 
-	m25p80 at 0 {
+	w25q128 at 0 {
 		#address-cells = <1>;
 		#size-cells = <1>;
 		compatible = "jedec,spi-nor";
 		reg = <0>;
-		spi-max-frequency = <10000000>;
-		m25p,chunked-io = <32>;
-
-		partition at 0 {
-			label = "u-boot";
-			reg = <0x0 0x30000>;
-			read-only;
-		};
-
-		partition at 30000 {
-			label = "u-boot-env";
-			reg = <0x30000 0x10000>;
-			read-only;
-		};
-
-		factory: partition at 40000 {
-			label = "factory";
-			reg = <0x40000 0x10000>;
-			read-only;
+		// XXX matching RBM11/RBM33, untested
+		spi-max-frequency = <3125000>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition at 0 {
+				label = "RouterBoot";
+				reg = <0x0 0x40000>;
+				read-only;
+				compatible = "fixed-partitions";
+				#address-cells = <1>;
+				#size-cells = <1>;
+
+				routerboot at 0 {
+					reg = <0x0 0xf000>;
+					read-only;
+				};
+
+				hard_config: hard_config at f000 {
+					reg = <0xf000 0x1000>;
+					read-only;
+				};
+
+				routerboot2 at 10000 {
+					reg = <0x10000 0xf000>;
+					read-only;
+				};
+
+				soft_config at 20000 {
+					reg = <0x20000 0x1000>;
+				};
+
+				bios at 30000 {
+					reg = <0x30000 0x1000>;
+					read-only;
+				};
+			};
+
+			firmware at 40000 {
+				reg = <0x040000 0xFC0000>;
+			};
 		};
-
-		partition at 50000 {
-			label = "firmware";
-			reg = <0x50000 0xfb0000>;
-		};
-
 	};
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0xe000>;
+	mtd-mac-address = <&hard_config 0x0010>;
 	mtd-mac-address-increment = <1>;
 };
 
+
 &pinctrl {
 	state_default: pinctrl0 {
 		gpio {
-			ralink,group = "i2c", "uart2", "uart3", "pcie", "rgmii2", "jtag";
+			ralink,group = "uart2", "uart3", "jtag", "wdt";
 			ralink,function = "gpio";
 		};
 	};
diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk
index 8ac78ad7de..e4e8ec3b19 100644
--- a/target/linux/ramips/image/mt7621.mk
+++ b/target/linux/ramips/image/mt7621.mk
@@ -252,14 +252,6 @@ define Device/r6220
 endef
 TARGET_DEVICES += r6220
 
-define Device/rb750gr3
-  DTS := RB750Gr3
-  IMAGE_SIZE := $(ralink_default_fw_size_16M)
-  DEVICE_TITLE := MikroTik RB750Gr3
-  DEVICE_PACKAGES := kmod-usb3 uboot-envtools
-endef
-TARGET_DEVICES += rb750gr3
-
 define Device/MikroTik
   BLOCKSIZE := 64k
   IMAGE_SIZE := 16128k
@@ -271,6 +263,13 @@ define Device/MikroTik
 	append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
 endef
 
+define Device/mikrotik_rb750gr3
+  $(Device/MikroTik)
+  DTS := RB750Gr3
+  DEVICE_TITLE := MikroTik RouterBOARD RB750Gr3
+endef
+TARGET_DEVICES += mikrotik_rb750gr3
+
 define Device/mikrotik_rbm33g
   $(Device/MikroTik)
   DTS := RBM33G
-- 
2.13.6 (Apple Git-96)


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From patrakov at gmail.com  Sun Jul 29 05:17:24 2018
From: patrakov at gmail.com (Alexander E. Patrakov)
Date: Sun, 29 Jul 2018 17:17:24 +0800
Subject: [OpenWrt-Devel] Release 17.01.5 is broken for everyone with IPv6
 tunnels
Message-ID: <CAN_LGv2RnpAB7i-OwPX-oW4xN=d_aYrxkCSHOX5_DHygmsOOuQ@mail.gmail.com>

Hello.

Due to my work duties, I had to guide the customer how to install OpenWRT
on his router (Linksys WRT1900AC v2) and how to configure it. The customer
requires pretty boring tasks such as setting up PPPoE, updating dynamic
DNS, doing IPv4 NAT, port forwarding, and getting IPv6 from Hurricane
Electric for devices in his network. Why OpenWRT - the need to keep two LAN
segments separate, and the fact that the stock firmware does not support
his dynamic DNS provider. And, as a bonus, the ability to troubleshoot
everything easily with tcpdump.

So, we installed OpenWRT 17.01.5. Everything worked well except IPv6. I
could ping devices in his network from a server in Malaysia, but not from
home. Ssh over IPv6 worked but took a lot of time to set up the connection.
Some IPv6 connections also failed. Tcpdumping shows that the packets come
correctly from Hurricane Electric on pppoe-wan, but do not show up in
6in4-wan6. And there are lots of "sit: non-ECT from ... with TOS=..."
messages.

This is https://bugs.openwrt.org/index.php?do=details&task_id=1541

I have looked at the kernel source here. The bug is that the first part of
the incoming IPv6 header (containing the flow label) is misparsed as IPv4
ToS field. Then it is compared to the ECN field of the outer IPv4 packet.
Every time the message is printed, the packet is dropped. And, because this
comparison of the flow label to ECN is meaningless, it is dropped for no
good reason.

Turris Omnia users have also hit this bug:
https://forum.turris.cz/t/performance-issue-with-ipv6-6rd-on-turris-omnia/7505

As this is a kernel bug, it is impossible to fix by publishing updated
packages for the same OpenWRT release. So, we decided to downgrade the
router to 17.01.4, and so far it works flawlessly.

Given the severity of this problem (essentially, broken IPv6), a large base
of affected customers (everybody who uses 6to4, 6rd, or 6in4 tunnel), and
impossibility to fix by publishing a single updated package, I propose that
the 17.01.5 release is retracted.

Please put something like this on the download page:

"""
Users who rely on IPv6 tunnels (6to4, 6rd, 6in4) should not use this
release due to a bug (
https://bugs.openwrt.org/index.php?do=details&task_id=1541) that makes such
tunnels drop packets for no good reason. Such users should download release
17.01.4 instead.
"""

-- 
Alexander E. Patrakov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20180729/487afd14/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From chunkeey at gmail.com  Sun Jul 29 05:55:13 2018
From: chunkeey at gmail.com (Christian Lamparter)
Date: Sun, 29 Jul 2018 11:55:13 +0200
Subject: [OpenWrt-Devel] [PATCH 1/5] ipq-wifi: add a note / reminder about
 upstreaming new board files
Message-ID: <fd5c9887b549650f03b9c01b583f0ae1a6aa44c8.1532858046.git.chunkeey@gmail.com>

|Please send a mail with your device-specific board files upstream.
|You can find instructions and examples on the linux-wireless wiki:
|<https://wireless.wiki.kernel.org/en/users/drivers/ath10k/boardfiles>

Signed-off-by: Christian Lamparter <chunkeey at gmail.com>
---
 package/firmware/ipq-wifi/Makefile | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/package/firmware/ipq-wifi/Makefile b/package/firmware/ipq-wifi/Makefile
index b1428f173d..a5555d5d7c 100644
--- a/package/firmware/ipq-wifi/Makefile
+++ b/package/firmware/ipq-wifi/Makefile
@@ -14,6 +14,9 @@ define Build/Compile
 endef
 
 #ALLWIFIBOARDS:=<devicename>
+# Please send a mail with your device-specific board files upstream.
+# You can find instructions and examples on the linux-wireless wiki:
+# <https://wireless.wiki.kernel.org/en/users/drivers/ath10k/boardfiles>
 ALLWIFIBOARDS:=zyxel_nbg6617 zyxel_wre6606
 ALLWIFIPACKAGES:=$(foreach BOARD,$(ALLWIFIBOARDS),ipq-wifi-$(BOARD))
 
-- 
2.18.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From chunkeey at gmail.com  Sun Jul 29 05:55:14 2018
From: chunkeey at gmail.com (Christian Lamparter)
Date: Sun, 29 Jul 2018 11:55:14 +0200
Subject: [OpenWrt-Devel] [PATCH 2/5] brcm2708: split sdcard.img.gz into a
 sysupgrade and factory image
In-Reply-To: <fd5c9887b549650f03b9c01b583f0ae1a6aa44c8.1532858046.git.chunkeey@gmail.com>
References: <fd5c9887b549650f03b9c01b583f0ae1a6aa44c8.1532858046.git.chunkeey@gmail.com>
Message-ID: <8b3696a924df2565269da9adcff068038d0a0f81.1532858046.git.chunkeey@gmail.com>

@vahid-dan reported a issue with extracting the rpi images with
Gnome's Archive Manager:
"Ubuntu Archive Manager cannot extract the file and it just
throws a general error message: "An error occurred while
extracting files".
<https://forum.lede-project.org/t/corrupted-pre-built-v18-06-0-rc2-image-for-rpi>

@blogic told me to split the single sdcard.img.gz for the RPi
into a sysupgrade and a factory image for all brcm2708 targets.
The factory images will have no metadata attached, this way
these utilities that can't deal with the attached metadata will
not fail for no reason.

Cc: John Crispin <john at phrozen.org>
Signed-off-by: Christian Lamparter <chunkeey at gmail.com>
---
 target/linux/brcm2708/image/Makefile | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/target/linux/brcm2708/image/Makefile b/target/linux/brcm2708/image/Makefile
index 80a019270d..aedea94451 100644
--- a/target/linux/brcm2708/image/Makefile
+++ b/target/linux/brcm2708/image/Makefile
@@ -49,8 +49,9 @@ endef
 define Device/Default
   KERNEL := kernel-bin | kernel-img
   KERNEL_IMG := kernel.img
-  IMAGES := sdcard.img.gz
-  IMAGE/sdcard.img.gz := boot-img | sdcard-img | gzip | append-metadata
+  IMAGES := factory.img.gz sysupgrade.img.gz
+  IMAGE/sysupgrade.img.gz := boot-img | sdcard-img | gzip | append-metadata
+  IMAGE/factory.img.gz := boot-img | sdcard-img | gzip
 endef
 
 define Device/rpi
-- 
2.18.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From chunkeey at gmail.com  Sun Jul 29 05:55:15 2018
From: chunkeey at gmail.com (Christian Lamparter)
Date: Sun, 29 Jul 2018 11:55:15 +0200
Subject: [OpenWrt-Devel] [PATCH 3/5] apm821xx: build squashfs-rootfs images
 for the MBL
In-Reply-To: <8b3696a924df2565269da9adcff068038d0a0f81.1532858046.git.chunkeey@gmail.com>
References: <fd5c9887b549650f03b9c01b583f0ae1a6aa44c8.1532858046.git.chunkeey@gmail.com>
 <8b3696a924df2565269da9adcff068038d0a0f81.1532858046.git.chunkeey@gmail.com>
Message-ID: <00bc716c732a9660f45602e86332e7c8caeebc34.1532858046.git.chunkeey@gmail.com>

This patch adds support for squashfs as the root filesystem.

advantages:
 - migrate from a existing -ext4 installation and back
   with the sysupgrade utility
 - existing partition layout will not be lost during switch
 - slightly smaller image size as compared to the -ext4 image.

disadvantages:
 - needs f2fs + tools. This is because fstools rootdisk.c decides based
   on the partition size (currently root partitions > 100 MiB) f2fs is
   used as the rootfs_data filesystem.
 - rootfs_data is placed into the rootfs partition after the squashfs.
   This makes it difficult for tools that expect a /dev/sda${X} device.
   It also makes it difficult for data recovery tools as they might not
   expect to find a embedded partition or will be slightly confused.
   ... or will not support f2fs.

For people with existing build configurations: make sure to include mkf2fs
and f2fsck packages into the image. Otherwise the new -squashfs image will
only boot from the ram-overlay.

Note:
All overlay data (configurations/all installed packages/...) will be
placed in inside the rootfs partition (i.e. /dev/sda2) just after the
squashfs image.

Signed-off-by: Christian Lamparter <chunkeey at gmail.com>
---
 target/linux/apm821xx/image/Makefile           | 5 ++---
 target/linux/apm821xx/image/mbl_boot.scr       | 2 +-
 target/linux/apm821xx/image/mbl_gen_hdd_img.sh | 8 ++++----
 target/linux/apm821xx/sata/config-default      | 6 ++++++
 target/linux/apm821xx/sata/target.mk           | 4 ++--
 5 files changed, 15 insertions(+), 10 deletions(-)

diff --git a/target/linux/apm821xx/image/Makefile b/target/linux/apm821xx/image/Makefile
index 9d9c0e5ace..bfc6562431 100644
--- a/target/linux/apm821xx/image/Makefile
+++ b/target/linux/apm821xx/image/Makefile
@@ -211,7 +211,7 @@ define Build/boot-img
 endef
 
 define Build/hdd-img
-	./mbl_gen_hdd_img.sh $@ $@.boot $(IMAGE_ROOTFS)
+	./mbl_gen_hdd_img.sh $@ $@.boot $(IMAGE_ROOTFS) $(BOOT_SIZE) $(CONFIG_TARGET_ROOTFS_PARTSIZE)
 endef
 
 define Device/wd_mybooklive
@@ -219,7 +219,6 @@ define Device/wd_mybooklive
   DEVICE_PACKAGES := kmod-usb-dwc2 kmod-usb-ledtrig-usbport kmod-usb-storage kmod-fs-vfat wpad-mini
   DEVICE_DTS := wd-mybooklive
   SUPPORTED_DEVICES += mbl wd_mybooklive-duo
-  IMAGE_SIZE := 48m
   BLOCKSIZE := 1k
   DTB_SIZE := 16384
   KERNEL := kernel-bin | dtb | gzip | uImage gzip
@@ -227,7 +226,7 @@ define Device/wd_mybooklive
   BOOT_SIZE := 8
   IMAGES := rootfs.img.gz kernel.dtb
   DEVICE_DTB := apollo3g.dtb
-  FILESYSTEMS := ext4
+  FILESYSTEMS := ext4 squashfs
   IMAGE/kernel.dtb := export-dtb
   IMAGE/rootfs.img.gz := boot-script | boot-img | hdd-img | gzip | append-metadata
 endef
diff --git a/target/linux/apm821xx/image/mbl_boot.scr b/target/linux/apm821xx/image/mbl_boot.scr
index 062dc2725a..955216983b 100644
--- a/target/linux/apm821xx/image/mbl_boot.scr
+++ b/target/linux/apm821xx/image/mbl_boot.scr
@@ -1,4 +1,4 @@
-setenv boot_args 'setenv bootargs root=/dev/sda2 rw rootfstype=ext4'
+setenv boot_args 'setenv bootargs root=/dev/sda2 rw rootfstype=squashfs,ext4'
 setenv load_part1 'sata init; ext2load sata 1:1 ${kernel_addr_r} /boot/uImage; ext2load sata 1:1 ${fdt_addr_r} /boot/apollo3g.dtb'
 setenv load_part2 'sata init; ext2load sata 0:1 ${kernel_addr_r} /boot/uImage; ext2load sata 0:1 ${fdt_addr_r} /boot/apollo3g.dtb'
 setenv load_sata 'if run load_part1; then echo Loaded part 1; elif run load_part2; then echo Loaded part 2; fi'
diff --git a/target/linux/apm821xx/image/mbl_gen_hdd_img.sh b/target/linux/apm821xx/image/mbl_gen_hdd_img.sh
index 589dcf9150..6536ce9872 100755
--- a/target/linux/apm821xx/image/mbl_gen_hdd_img.sh
+++ b/target/linux/apm821xx/image/mbl_gen_hdd_img.sh
@@ -1,16 +1,16 @@
 #!/usr/bin/env bash
 
 set -x
-[ $# -eq 3 ] || {
-    echo "SYNTAX: $0 <file> <bootfs image> <rootfs image>"
+[ $# -eq 5 ] || {
+    echo "SYNTAX: $0 <file> <bootfs image> <rootfs image> <bootfs size> <rootfs size>"
     exit 1
 }
 
 OUTPUT="$1"
 BOOTFS="$2"
 ROOTFS="$3"
-let "BOOTFSSIZE=(`stat -c%s "$2"` + 1048575) / 1048576"
-let "ROOTFSSIZE=(`stat -c%s "$3"` + 1048575) / 1048576"
+BOOTFSSIZE="$4"
+ROOTFSSIZE="$5"
 
 head=4
 sect=63
diff --git a/target/linux/apm821xx/sata/config-default b/target/linux/apm821xx/sata/config-default
index 7ca6bd4d3d..4c7c655233 100644
--- a/target/linux/apm821xx/sata/config-default
+++ b/target/linux/apm821xx/sata/config-default
@@ -16,6 +16,11 @@ CONFIG_GENERIC_PHY=y
 CONFIG_SATA_DWC=y
 # CONFIG_SATA_DWC_DEBUG is not set
 CONFIG_EXT4_FS=y
+# CONFIG_F2FS_CHECK_FS is not set
+CONFIG_F2FS_FS=y
+# CONFIG_F2FS_FS_SECURITY is not set
+CONFIG_F2FS_FS_XATTR=y
+CONFIG_F2FS_STAT_FS=y
 CONFIG_SCSI=y
 CONFIG_BLK_DEV_SD=y
 CONFIG_GPIOLIB=y
@@ -23,6 +28,7 @@ CONFIG_GPIO_GENERIC=y
 CONFIG_GPIO_GENERIC_PLATFORM=y
 CONFIG_GPIO_74XX_MMIO=y
 CONFIG_LEDS_TRIGGER_DISK=y
+CONFIG_BLK_DEV_LOOP=y
 CONFIG_BLK_DEV_DM=y
 CONFIG_BLK_DEV_DM_BUILTIN=y
 CONFIG_BLK_DEV_MD=y
diff --git a/target/linux/apm821xx/sata/target.mk b/target/linux/apm821xx/sata/target.mk
index 1c7856828c..a5107f1067 100644
--- a/target/linux/apm821xx/sata/target.mk
+++ b/target/linux/apm821xx/sata/target.mk
@@ -1,7 +1,7 @@
 BOARDNAME := Devices which boot from SATA (NAS)
-FEATURES += ext4 usb ramdisk
+FEATURES += ext4 usb ramdisk squashfs
 DEFAULT_PACKAGES += badblocks block-mount e2fsprogs \
-		    kmod-dm kmod-md-mod partx-utils
+		    kmod-dm kmod-md-mod partx-utils mkf2fs f2fsck
 
 define Target/Description
 	Build firmware images for APM82181 boards that boot from SATA.
-- 
2.18.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From chunkeey at gmail.com  Sun Jul 29 05:55:16 2018
From: chunkeey at gmail.com (Christian Lamparter)
Date: Sun, 29 Jul 2018 11:55:16 +0200
Subject: [OpenWrt-Devel] [PATCH 4/5] apm821xx: split MBL's rootfs.img.gz
 into a sysupgrade and factory image
In-Reply-To: <00bc716c732a9660f45602e86332e7c8caeebc34.1532858046.git.chunkeey@gmail.com>
References: <fd5c9887b549650f03b9c01b583f0ae1a6aa44c8.1532858046.git.chunkeey@gmail.com>
 <8b3696a924df2565269da9adcff068038d0a0f81.1532858046.git.chunkeey@gmail.com>
 <00bc716c732a9660f45602e86332e7c8caeebc34.1532858046.git.chunkeey@gmail.com>
Message-ID: <4013444f44411f65ecbb30e9c0fdd161057ce994.1532858046.git.chunkeey@gmail.com>

@vahid-dan reported a issue with extracting the rpi images with
Gnome's Archive Manager:
"Ubuntu Archive Manager cannot extract the file and it just
throws a general error message: "An error occurred while
extracting files".
<https://forum.lede-project.org/t/corrupted-pre-built-v18-06-0-rc2-image-for-rpi>

The MBL's rootfs.img.gz image is generated in much the same way.
Hence this patch preemptively splits the rootfs.img.gz image into
a sysupgrade and a factory image.

Signed-off-by: Christian Lamparter <chunkeey at gmail.com>
---
 target/linux/apm821xx/image/Makefile | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/target/linux/apm821xx/image/Makefile b/target/linux/apm821xx/image/Makefile
index bfc6562431..00ab19602d 100644
--- a/target/linux/apm821xx/image/Makefile
+++ b/target/linux/apm821xx/image/Makefile
@@ -224,11 +224,12 @@ define Device/wd_mybooklive
   KERNEL := kernel-bin | dtb | gzip | uImage gzip
   KERNEL_INITRAMFS := kernel-bin | dtb | gzip | uImage gzip
   BOOT_SIZE := 8
-  IMAGES := rootfs.img.gz kernel.dtb
+  IMAGES := factory.img.gz kernel.dtb sysupgrade.img.gz
   DEVICE_DTB := apollo3g.dtb
   FILESYSTEMS := ext4 squashfs
+  IMAGE/factory.img.gz := boot-script | boot-img | hdd-img | gzip
   IMAGE/kernel.dtb := export-dtb
-  IMAGE/rootfs.img.gz := boot-script | boot-img | hdd-img | gzip | append-metadata
+  IMAGE/sysupgrade.img.gz := boot-script | boot-img | hdd-img | gzip | append-metadata
 endef
 
 TARGET_DEVICES += wd_mybooklive
-- 
2.18.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From chunkeey at gmail.com  Sun Jul 29 05:55:17 2018
From: chunkeey at gmail.com (Christian Lamparter)
Date: Sun, 29 Jul 2018 11:55:17 +0200
Subject: [OpenWrt-Devel] [PATCH 5/5] apm821xx: clean up gpio-hogs
In-Reply-To: <4013444f44411f65ecbb30e9c0fdd161057ce994.1532858046.git.chunkeey@gmail.com>
References: <fd5c9887b549650f03b9c01b583f0ae1a6aa44c8.1532858046.git.chunkeey@gmail.com>
 <8b3696a924df2565269da9adcff068038d0a0f81.1532858046.git.chunkeey@gmail.com>
 <00bc716c732a9660f45602e86332e7c8caeebc34.1532858046.git.chunkeey@gmail.com>
 <4013444f44411f65ecbb30e9c0fdd161057ce994.1532858046.git.chunkeey@gmail.com>
Message-ID: <5246431e3a13f715a4922e77f17ddf3362b474f3.1532858046.git.chunkeey@gmail.com>

convert the usb and both sata port power related gpio-hogs to
what they really are: fixed-regulators.

The ethernet phy-reset gpio-hog is replaced by a proper
upstream (4.15+) reset-gpios property in the mdio-node.
So this will work eventually.

Signed-off-by: Christian Lamparter <chunkeey at gmail.com>
---
 target/linux/apm821xx/dts/wd-mybooklive.dts | 59 ++++++++++-----------
 target/linux/apm821xx/sata/config-default   |  2 +
 2 files changed, 31 insertions(+), 30 deletions(-)

diff --git a/target/linux/apm821xx/dts/wd-mybooklive.dts b/target/linux/apm821xx/dts/wd-mybooklive.dts
index aee0d3266d..4c61987119 100644
--- a/target/linux/apm821xx/dts/wd-mybooklive.dts
+++ b/target/linux/apm821xx/dts/wd-mybooklive.dts
@@ -59,14 +59,6 @@
 		#gpio-cells = <2>;
 		gpio-controller;
 
-		enable-phy {
-			/* toggle to reset EMAC PHY */
-			gpio-hog;
-			line-name = "enable EMAC PHY";
-			gpios = <0 GPIO_ACTIVE_LOW>;
-			output-low;
-		};
-
 		enable-button {
 			/* Defined in u-boot as: NOT_NOR
 			 * "enables features other than NOR
@@ -83,27 +75,6 @@
 			gpios = <1 GPIO_ACTIVE_HIGH>;
 			output-low;
 		};
-
-		enable-usb {
-			gpio-hog;
-			line-name = "Power USB Core";
-			gpios = <2 GPIO_ACTIVE_LOW>;
-			output-low;
-		};
-
-		enable-port1 {
-			gpio-hog;
-			line-name = "Power Drive Port 1";
-			gpios = <3 GPIO_ACTIVE_LOW>;
-			output-low;
-		};
-
-		enable-port0 {
-			gpio-hog;
-			line-name = "Power Drive Port 0";
-			gpios = <7 GPIO_ACTIVE_LOW>;
-			output-low;
-		};
 	};
 
 	GPIO2: gpio2 at e0100000 {
@@ -135,7 +106,7 @@
 		};
 	};
 
-	gpio_keys_polled {
+	gpio-keys-polled {
 		compatible = "gpio-keys-polled";
 		#address-cells = <1>;
 		#size-cells = <0>;
@@ -148,6 +119,32 @@
 			gpios = <&GPIO2 2 GPIO_ACTIVE_LOW>;
 		};
 	};
+
+	usbpwr: usb-regulator {
+		compatible = "regulator-fixed";
+		regulator-name = "Power USB Core";
+		gpios = <&GPIO1 2 GPIO_ACTIVE_LOW>;
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+	};
+
+	sata1pwr: sata1-regulator {
+		compatible = "regulator-fixed";
+		regulator-name = "Power Drive Port 1";
+		gpios = <&GPIO1 3 GPIO_ACTIVE_LOW>;
+		regulator-min-microvolt = <12000000>;
+		regulator-max-microvolt = <12000000>;
+		regulator-always-on; /* needed to read OS from HDD */
+	};
+
+	sata0pwr: sata0-regulator {
+		compatible = "regulator-fixed";
+		regulator-name = "Power Drive Port 0";
+		gpios = <&GPIO1 7 GPIO_ACTIVE_LOW>;
+		regulator-min-microvolt = <12000000>;
+		regulator-max-microvolt = <12000000>;
+		regulator-always-on; /* needed to read OS from HDD */
+	};
 };
 
 &EMAC0 {
@@ -160,6 +157,7 @@
 	mdio {
 		#address-cells = <1>;
 		#size-cells = <0>;
+		reset-gpios = <&GPIO1 0 GPIO_ACTIVE_LOW>;
 
 		phy: phy at 1 {
 			compatible = "ethernet-phy-ieee802.3-c22";
@@ -195,4 +193,5 @@
 &USBOTG0 {
 	status = "okay";
 	dr_mode = "host";
+	vbus-supply = <&usbpwr>;
 };
diff --git a/target/linux/apm821xx/sata/config-default b/target/linux/apm821xx/sata/config-default
index 4c7c655233..5af8c338f5 100644
--- a/target/linux/apm821xx/sata/config-default
+++ b/target/linux/apm821xx/sata/config-default
@@ -45,3 +45,5 @@ CONFIG_PPC_EARLY_DEBUG_44x=y
 # CONFIG_PPC_EARLY_DEBUG_MEMCONS is not set
 CONFIG_PPC_EARLY_DEBUG_44x_PHYSHIGH=0x4
 CONFIG_PPC_EARLY_DEBUG_44x_PHYSLOW=0xef600300
+CONFIG_REGULATOR=y
+CONFIG_REGULATOR_FIXED_VOLTAGE=y
-- 
2.18.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From hacks at slashdirt.org  Sun Jul 29 06:14:55 2018
From: hacks at slashdirt.org (=?UTF-8?q?Thibaut=20VAR=C3=88NE?=)
Date: Sun, 29 Jul 2018 12:14:55 +0200
Subject: [OpenWrt-Devel] [PATCH 0/5] several fixes for mach-rbspi.c /
 correct support for wAP R
Message-ID: <20180729101500.8621-1-hacks@slashdirt.org>

Repost of PR#1181

Thibaut VAR?NE (5):
  ar71xx: rbspi: clarify USB power gpios action
  ar71xx: rbspi: fix RB wAP AC gpio conflict and LED
  ar71xx: rbspi: mark rb911L user led as active low
  ar71xx: add missing diag LED support for RB wAP 2nD
  ar71xx: improve MikroTik wAP R support

 target/linux/ar71xx/base-files/etc/board.d/01_leds |   3 +
 target/linux/ar71xx/base-files/etc/diag.sh         |   7 +-
 .../ar71xx/files/arch/mips/ath79/mach-rbspi.c      | 104 ++++++++++++++++-----
 3 files changed, 90 insertions(+), 24 deletions(-)

-- 
2.13.6 (Apple Git-96)


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From hacks at slashdirt.org  Sun Jul 29 06:14:56 2018
From: hacks at slashdirt.org (=?UTF-8?q?Thibaut=20VAR=C3=88NE?=)
Date: Sun, 29 Jul 2018 12:14:56 +0200
Subject: [OpenWrt-Devel] [PATCH 1/5] ar71xx: rbspi: clarify USB power gpios
 action
In-Reply-To: <20180729101500.8621-1-hacks@slashdirt.org>
References: <20180729101500.8621-1-hacks@slashdirt.org>
Message-ID: <20180729101500.8621-2-hacks@slashdirt.org>

The gpios that control power toggle for USB on the RouterBOARD devices
are active low _off_ switches.

When they are active (low), power is off. When they are inactive
(high), power is on.

Rename GPIO defines, set gpios to GPIOF_ACTIVE_LOW for consistency and
reflect their true action in the display name. This brings openwrt code
in line with OEM.

Signed-off-by: Thibaut VAR?NE <hacks at slashdirt.org>
Tested-by: Ryan Mounce <ryan at mounce.com.au>
---
 .../linux/ar71xx/files/arch/mips/ath79/mach-rbspi.c   | 19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)

diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-rbspi.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-rbspi.c
index 2997018aa3..f14b078b2c 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-rbspi.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-rbspi.c
@@ -213,7 +213,7 @@ static struct gpio_led rbhapl_leds[] __initdata = {
 #define RB952_GPIO_POE_POWER	14
 #define RB952_GPIO_POE_STATUS	12
 #define RB952_GPIO_BTN_RESET	16
-#define RB952_GPIO_USB_POWER	RBSPI_SSR_GPIO(RB952_SSR_BIT_USB_POWER)
+#define RB952_GPIO_USB_PWROFF	RBSPI_SSR_GPIO(RB952_SSR_BIT_USB_POWER)
 #define RB952_GPIO_LED_LAN1	RBSPI_SSR_GPIO(RB952_SSR_BIT_LED_LAN1)
 #define RB952_GPIO_LED_LAN2	RBSPI_SSR_GPIO(RB952_SSR_BIT_LED_LAN2)
 #define RB952_GPIO_LED_LAN3	RBSPI_SSR_GPIO(RB952_SSR_BIT_LED_LAN3)
@@ -258,7 +258,7 @@ static struct gpio_led rb952_leds[] __initdata = {
 #define RB962_GPIO_POE_STATUS	2
 #define RB962_GPIO_POE_POWER	3
 #define RB962_GPIO_LED_USER	12
-#define RB962_GPIO_USB_POWER	13
+#define RB962_GPIO_USB_PWROFF	13
 #define RB962_GPIO_BTN_RESET	20
 
 static struct gpio_led rb962_leds_gpio[] __initdata = {
@@ -388,7 +388,7 @@ static struct gpio_led rbcap_leds[] __initdata = {
 #define RBMAP_GPIO_LED_POWER	4
 #define RBMAP_GPIO_POE_POWER	14
 #define RBMAP_GPIO_POE_STATUS	12
-#define RBMAP_GPIO_USB_POWER	RBSPI_SSR_GPIO(RBMAP_SSR_BIT_USB_POWER)
+#define RBMAP_GPIO_USB_PWROFF	RBSPI_SSR_GPIO(RBMAP_SSR_BIT_USB_POWER)
 #define RBMAP_GPIO_LED_LAN1	RBSPI_SSR_GPIO(RBMAP_SSR_BIT_LED_LAN1)
 #define RBMAP_GPIO_LED_LAN2	RBSPI_SSR_GPIO(RBMAP_SSR_BIT_LED_LAN2)
 #define RBMAP_GPIO_LED_POEO	RBSPI_SSR_GPIO(RBMAP_SSR_BIT_LED_POEO)
@@ -828,9 +828,9 @@ static void __init rbspi_952_750r2_setup(u32 flags)
 	rbspi_network_setup(flags, 1, 5, 6);
 
 	if (flags & RBSPI_HAS_USB)
-		gpio_request_one(RB952_GPIO_USB_POWER,
+		gpio_request_one(RB952_GPIO_USB_PWROFF, GPIOF_ACTIVE_LOW |
 				GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED,
-				"USB power");
+				"USB power off");
 
 	if (flags & RBSPI_HAS_POE)
 		gpio_request_one(RB952_GPIO_POE_POWER,
@@ -938,9 +938,9 @@ static void __init rb962_setup(void)
 	rbspi_wlan_init(1, 7);
 
 	if (flags & RBSPI_HAS_USB)
-		gpio_request_one(RB962_GPIO_USB_POWER,
+		gpio_request_one(RB962_GPIO_USB_PWROFF, GPIOF_ACTIVE_LOW |
 				GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED,
-				"USB power");
+				"USB power off");
 
 	/* PoE output GPIO is inverted, set GPIOF_ACTIVE_LOW for consistency */
 	if (flags & RBSPI_HAS_POE)
@@ -1047,12 +1047,11 @@ static void __init rbmap_setup(void)
 				GPIOF_OUT_INIT_LOW | GPIOF_EXPORT_DIR_FIXED,
 				"POE power");
 
-	/* USB power GPIO is inverted, set GPIOF_ACTIVE_LOW for consistency */
 	if (flags & RBSPI_HAS_USB)
-		gpio_request_one(RBMAP_GPIO_USB_POWER,
+		gpio_request_one(RBMAP_GPIO_USB_PWROFF,
 				GPIOF_OUT_INIT_HIGH | GPIOF_ACTIVE_LOW |
 					GPIOF_EXPORT_DIR_FIXED,
-				"USB power");
+				"USB power off");
 
 	ath79_register_leds_gpio(-1, ARRAY_SIZE(rbmap_leds), rbmap_leds);
 
-- 
2.13.6 (Apple Git-96)


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From hacks at slashdirt.org  Sun Jul 29 06:14:57 2018
From: hacks at slashdirt.org (=?UTF-8?q?Thibaut=20VAR=C3=88NE?=)
Date: Sun, 29 Jul 2018 12:14:57 +0200
Subject: [OpenWrt-Devel] [PATCH 2/5] ar71xx: rbspi: fix RB wAP AC gpio
 conflict and LED
In-Reply-To: <20180729101500.8621-1-hacks@slashdirt.org>
References: <20180729101500.8621-1-hacks@slashdirt.org>
Message-ID: <20180729101500.8621-3-hacks@slashdirt.org>

e15c63a37574bd15ce3a6636c2f04741ab76f7b9 introduced code that was trying
to register GPIO 1 as both an LED and a button. The OEM source makes it
clear that LED1 is not wired to the SoC GPIOs. GPIO 1 is the reset button.

Furthermore the (green) power led default state should also be defined,
(matching OEM source), and it should be used by diag.sh since it's
currently the only software-controllable LED.

This patch fixes these issues and renames the corresponding #defines for
clarity

Signed-off-by: Thibaut VAR?NE <hacks at slashdirt.org>
---
 target/linux/ar71xx/base-files/etc/diag.sh             |  3 ++-
 target/linux/ar71xx/files/arch/mips/ath79/mach-rbspi.c | 17 +++++++----------
 2 files changed, 9 insertions(+), 11 deletions(-)

diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh
index d3cdc81b39..280b83b413 100644
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -384,7 +384,8 @@ get_status_led() {
 	rb-912uag-2hpnd|\
 	rb-912uag-5hpnd|\
 	rb-sxt2n|\
-	rb-sxt5n)
+	rb-sxt5n|\
+	rb-wapg-5hact2hnd)
 		status_led="rb:green:power"
 		;;
 	re355|\
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-rbspi.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-rbspi.c
index f14b078b2c..ad67c6e869 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-rbspi.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-rbspi.c
@@ -478,10 +478,10 @@ static struct gpio_led rblhg_leds[] __initdata = {
 };
 
 /* RB w APG-5HacT2HnD (wAP AC) gpios*/
-#define RBWAPGSC_LED1		1
-#define RBWAPGSC_LED2		8
-#define RBWAPGSC_LED3		9
-#define RBWAPGSC_POWERLED		16
+#define RBWAPGSC_WIFI_LED_1		1
+#define RBWAPGSC_WIFI_LED_2		8
+#define RBWAPGSC_WIFI_LED_3		9
+#define RBWAPGSC_GPIO_LED_POWER		16
 #define RBWAPGSC_GPIO_BTN_RESET		1
 #define RBWAPGSC_GPIO_MDIO_MDC		12
 #define RBWAPGSC_GPIO_MDIO_DATA		11
@@ -489,13 +489,10 @@ static struct gpio_led rblhg_leds[] __initdata = {
 
 static struct gpio_led rbwapgsc_leds[] __initdata = {
 	{
-		.name = "rb:green:led1",
-		.gpio = RBWAPGSC_LED1,
-		.active_low = 1,
-	},{
-		.name = "rb:blue:power",
-		.gpio = RBWAPGSC_POWERLED,
+		.name = "rb:green:power",
+		.gpio = RBWAPGSC_GPIO_LED_POWER,
 		.active_low = 1,
+		.default_state = LEDS_GPIO_DEFSTATE_ON,
 	},
 };
 
-- 
2.13.6 (Apple Git-96)


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From hacks at slashdirt.org  Sun Jul 29 06:14:58 2018
From: hacks at slashdirt.org (=?UTF-8?q?Thibaut=20VAR=C3=88NE?=)
Date: Sun, 29 Jul 2018 12:14:58 +0200
Subject: [OpenWrt-Devel] [PATCH 3/5] ar71xx: rbspi: mark rb911L user led as
 active low
In-Reply-To: <20180729101500.8621-1-hacks@slashdirt.org>
References: <20180729101500.8621-1-hacks@slashdirt.org>
Message-ID: <20180729101500.8621-4-hacks@slashdirt.org>

The active_low flag was missing for the user LED. This LED is open drain
(confirmed in OEM source) and open drain only makes sense for active low
GPIOs.

The two wireless LEDs mentioned in the comments are also #defined for
future reference.

Signed-off-by: Thibaut VAR?NE <hacks at slashdirt.org>
Tested-by: Ryan Mounce <ryan at mounce.com.au>
---
 target/linux/ar71xx/files/arch/mips/ath79/mach-rbspi.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-rbspi.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-rbspi.c
index ad67c6e869..4aff7df55b 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-rbspi.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-rbspi.c
@@ -255,6 +255,8 @@ static struct gpio_led rb952_leds[] __initdata = {
 
 
 /* RB 962UiGS-5HacT2HnT gpios */
+#define RB962_WIFI_LED_1	1
+#define RB962_WIFI_LED_2	2
 #define RB962_GPIO_POE_STATUS	2
 #define RB962_GPIO_POE_POWER	3
 #define RB962_GPIO_LED_USER	12
@@ -520,7 +522,7 @@ static struct platform_device rbwapgsc_phy_device = {
 #define RB911L_GPIO_LED_ETH	20
 #define RB911L_GPIO_LED_POWER	11
 #define RB911L_GPIO_LED_USER	3
-#define RB911L_GPIO_PIN_HOLE	14 /* for reference */
+#define RB911L_GPIO_PIN_HOLE	14 /* for reference, active low */
 
 static struct gpio_led rb911l_leds[] __initdata = {
 	{
@@ -551,6 +553,7 @@ static struct gpio_led rb911l_leds[] __initdata = {
 		.name = "rb:green:power",
 		.gpio = RB911L_GPIO_LED_POWER,
 		.default_state = LEDS_GPIO_DEFSTATE_ON,
+		.active_low = 1,
 		.open_drain = 1,
 	}, {
 		.name = "rb:green:user",
-- 
2.13.6 (Apple Git-96)


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From hacks at slashdirt.org  Sun Jul 29 06:14:59 2018
From: hacks at slashdirt.org (=?UTF-8?q?Thibaut=20VAR=C3=88NE?=)
Date: Sun, 29 Jul 2018 12:14:59 +0200
Subject: [OpenWrt-Devel] [PATCH 4/5] ar71xx: add missing diag LED support
 for RB wAP 2nD
In-Reply-To: <20180729101500.8621-1-hacks@slashdirt.org>
References: <20180729101500.8621-1-hacks@slashdirt.org>
Message-ID: <20180729101500.8621-5-hacks@slashdirt.org>

3b15eb06c366cf3805590a61f22e966a95bf8101 did not include diag.sh
edit

Signed-off-by: Thibaut VAR?NE <hacks at slashdirt.org>
---
 target/linux/ar71xx/base-files/etc/diag.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh
index 280b83b413..efb1305aec 100644
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -375,7 +375,8 @@ get_status_led() {
 	rb-962uigs-5hact2hnt|\
 	rb-lhg-5nd|\
 	rb-map-2nd|\
-	rb-mapl-2nd)
+	rb-mapl-2nd|\
+	rb-wap-2nd)
 		status_led="rb:green:user"
 		;;
 	rb-951ui-2hnd)
-- 
2.13.6 (Apple Git-96)


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From hacks at slashdirt.org  Sun Jul 29 06:15:00 2018
From: hacks at slashdirt.org (=?UTF-8?q?Thibaut=20VAR=C3=88NE?=)
Date: Sun, 29 Jul 2018 12:15:00 +0200
Subject: [OpenWrt-Devel] [PATCH 5/5] ar71xx: improve MikroTik wAP R support
In-Reply-To: <20180729101500.8621-1-hacks@slashdirt.org>
References: <20180729101500.8621-1-hacks@slashdirt.org>
Message-ID: <20180729101500.8621-6-hacks@slashdirt.org>

81d446b045176e3e25bb0ef74e3d060b51a0a353 introduced incomplete
support for this device.

This patch attempts to correct the situation based on OEM source
code.

LED1-3 are GSM mode on OFW (2G/3G/4G) hence unassigned here.

Signed-off-by: Thibaut VAR?NE <hacks at slashdirt.org>
Tested-by: David Ehrmann <ehrmann at gmail.com>
---
 target/linux/ar71xx/base-files/etc/board.d/01_leds |  3 ++
 target/linux/ar71xx/base-files/etc/diag.sh         |  3 +-
 .../ar71xx/files/arch/mips/ath79/mach-rbspi.c      | 63 +++++++++++++++++++++-
 3 files changed, 67 insertions(+), 2 deletions(-)

diff --git a/target/linux/ar71xx/base-files/etc/board.d/01_leds b/target/linux/ar71xx/base-files/etc/board.d/01_leds
index 11299dcb92..b0f4975e5c 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/01_leds
+++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds
@@ -680,6 +680,9 @@ rb-wap-2nd)
 	ucidef_set_led_timer "user" "USER" "rb:green:user" "1000" "1000"
 	ucidef_set_led_wlan "wlan" "WLAN" "rb:green:wlan" "phy0tpt"
 	;;
+rb-wapr-2nd)
+	ucidef_set_led_wlan "wlan" "WLAN" "rb:green:user" "phy0tpt"
+	;;
 re355|\
 re450)
 	ucidef_set_led_netdev "lan_data" "LAN Data" "$board:green:lan_data" "eth0" "tx rx"
diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh
index efb1305aec..129df16097 100644
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -376,7 +376,8 @@ get_status_led() {
 	rb-lhg-5nd|\
 	rb-map-2nd|\
 	rb-mapl-2nd|\
-	rb-wap-2nd)
+	rb-wap-2nd|\
+	rb-wapr-2nd)
 		status_led="rb:green:user"
 		;;
 	rb-951ui-2hnd)
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-rbspi.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-rbspi.c
index 4aff7df55b..cff69092c4 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-rbspi.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-rbspi.c
@@ -594,6 +594,36 @@ static struct gpio_led rb931_leds[] __initdata = {
 	},
 };
 
+/* RB wAP R-2nD (wAP R) gpios*/
+#define RBWAPR_GPIO_LED_USER	14
+#define RBWAPR_GPIO_LED1	12
+#define RBWAPR_GPIO_LED2	13
+#define RBWAPR_GPIO_LED3	3
+#define RBWAPR_GPIO_PCIE_PWROFF	15
+#define RBWAPR_GPIO_CONTROL	10
+#define RBWAPR_GPIO_BTN_RESET	16
+
+static struct gpio_led rbwapr_leds[] __initdata = {
+	{
+		.name = "rb:green:user",
+		.gpio = RBWAPR_GPIO_LED_USER,
+		.active_low = 0,
+	},{
+		.name = "rb:green:led1",
+		.gpio = RBWAPR_GPIO_LED1,
+		.active_low = 1,
+	},{
+		.name = "rb:green:led2",
+		.gpio = RBWAPR_GPIO_LED2,
+		.active_low = 1,
+	},{
+		.name = "rb:green:led3",
+		.gpio = RBWAPR_GPIO_LED3,
+		.active_low = 0,
+	},
+};
+
+
 static struct gen_74x164_chip_platform_data rbspi_ssr_data = {
 	.base = RBSPI_SSR_GPIO_BASE,
 	.num_registers = 1,
@@ -1170,6 +1200,37 @@ static void __init rb931_setup(void)
 					rb931_gpio_keys);
 }
 
+/*
+ * Init the wAP R hardware.
+ * The wAP R-2nD has a single ethernet port and a mini PCIe slot.
+ * The OEM source shows it has usb (used over PCIe for LTE devices),
+ * and the 'control' GPIO is assumed to be an output pin not tied to an LED.
+ */
+static void __init rbwapr_setup(void)
+{
+	u32 flags = RBSPI_HAS_WLAN0 | RBSPI_HAS_USB | RBSPI_HAS_PCI;
+
+	if (!rbspi_platform_setup())
+		return;
+
+	rbspi_peripherals_setup(flags);
+
+	/* GMAC1 is HW MAC, WLAN0 MAC is HW MAC + 1 */
+	rbspi_network_setup(flags, 0, 1, 0);
+
+	ath79_register_leds_gpio(-1, ARRAY_SIZE(rbwapr_leds), rbwapr_leds);
+
+	gpio_request_one(RBWAPR_GPIO_PCIE_PWROFF, GPIOF_OUT_INIT_HIGH |
+			GPIOF_ACTIVE_LOW | GPIOF_EXPORT_DIR_FIXED,
+			"PCIE power off");
+
+	gpio_request_one(RBWAPR_GPIO_CONTROL, GPIOF_OUT_INIT_LOW |
+			GPIOF_ACTIVE_LOW | GPIOF_EXPORT_DIR_FIXED,
+			"control");
+
+	rbspi_register_reset_button(RBWAPR_GPIO_BTN_RESET);
+}
+
 MIPS_MACHINE_NONAME(ATH79_MACH_RB_MAPL, "map-hb", rbmapl_setup);
 MIPS_MACHINE_NONAME(ATH79_MACH_RB_941, "H951L", rbhapl_setup);
 MIPS_MACHINE_NONAME(ATH79_MACH_RB_911L, "911L", rb911l_setup);
@@ -1178,7 +1239,7 @@ MIPS_MACHINE_NONAME(ATH79_MACH_RB_962, "962", rb962_setup);
 MIPS_MACHINE_NONAME(ATH79_MACH_RB_750UPR2, "750-hb", rb750upr2_setup);
 MIPS_MACHINE_NONAME(ATH79_MACH_RB_LHG5, "lhg", rblhg_setup);
 MIPS_MACHINE_NONAME(ATH79_MACH_RB_WAP, "wap-hb", rbwap_setup);
-MIPS_MACHINE_NONAME(ATH79_MACH_RB_WAPR, "wap-lte", rbwap_setup);
+MIPS_MACHINE_NONAME(ATH79_MACH_RB_WAPR, "wap-lte", rbwapr_setup);
 MIPS_MACHINE_NONAME(ATH79_MACH_RB_CAP, "cap-hb", rbcap_setup);
 MIPS_MACHINE_NONAME(ATH79_MACH_RB_MAP, "map2-hb", rbmap_setup);
 MIPS_MACHINE_NONAME(ATH79_MACH_RB_WAPAC, "wapg-sc", rbwapgsc_setup);
-- 
2.13.6 (Apple Git-96)


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From torbjorn.jansson at mbox200.swipnet.se  Sun Jul 29 07:39:40 2018
From: torbjorn.jansson at mbox200.swipnet.se (Torbjorn Jansson)
Date: Sun, 29 Jul 2018 13:39:40 +0200
Subject: [OpenWrt-Devel] Second RGMII ethernet on MT7621?
In-Reply-To: <87tvrrznla.fsf@miraculix.mork.no>
References: <87y3h4zkou.fsf@miraculix.mork.no>
 <cf9b4a54-b91a-bb3c-1a89-8a0a65c00969@phrozen.org>
 <87tvrrznla.fsf@miraculix.mork.no>
Message-ID: <413e93f6-7cb3-bf94-7332-754fdd3cc3e5@mbox200.swipnet.se>

On 2018-05-01 12:17, Bj?rn Mork wrote:
> John Crispin <john at phrozen.org> writes:
> 
>> making gmac2 work s not trivial with the current driver.
> 
> Thanks for confirming.  Then I guess I can just wrap up what I have and
> make it public.  Just want to figure out how the LEDs are connected
> first. Bootloader initiated blinking patterns are persistent, so I'm
> guessing some I2C(?) connected controller.  Or something..
> 
>> however making the upstream mtk_eth_soc driver work on mt7621 is
>> pretty easy i think and will give you dual gmac support. upstream only
>> supports mt7623 arm atm. its been on my todo list for a while but i
>> simply have not been able to find the 2-3 days required to make it
>> work.
> 
> I wish I could help. But I have enough self-insight to realize that it
> is way beyond my capabilities, after a quick look at the driver.
> 
> 
> Bj?rn

sorry for reviving old mail thread but just out of curiosity, will this help 
the ubiquiti edgerouter x sfp with getting the sfp port working too?
it is also an mt7621.


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From chunkeey at gmail.com  Sun Jul 29 08:50:44 2018
From: chunkeey at gmail.com (Christian Lamparter)
Date: Sun, 29 Jul 2018 14:50:44 +0200
Subject: [OpenWrt-Devel] [RFC/RFT] musl: 1.1.20 prelease testing
In-Reply-To: <20180728195537.GZ1392@brightrain.aerifal.cx>
References: <20180728195537.GZ1392@brightrain.aerifal.cx>
Message-ID: <20180729125044.26471-1-chunkeey@gmail.com>

Rich Felker requested some field testing of his 1.1.20 release:
<http://www.openwall.com/lists/musl/2018/04/18/3>

"The biggest areas that need testing are:

- stdio locking after commits c21f750727515602a9e84f2a190ee8a0a2aeb2a1
  and c1014a812c90bab3c9c989863e4ebb129e987de6.

- reclaim_gaps since commit ce7ae11acfd9db8eb92cc6823c132e1825918d92.
  this could be tested by abusing __malloc_donate as if it were a
  public api.

- malloc interposition -- seeing if replacement allocators actually
  work. (not so important since it wouldn't be a regression if it's
  broken, but would be nice to know it works before announcing)"

<http://www.openwall.com/lists/musl/2018/07/28/4>
"In particular, coverage for changes since 1.1.19 would include:

- getrandom/getentropy basic functionality check
- setvbuf non-stub inplementation: basic functionality, check for
  writes outside the buffer, etc.
- malloc interposition: check that partial replacement doesn't result
  in unsafe behavior.
- pthread_create: confirm that scheduling and other attributes still
  work as expected after refactoring work.
- getddrinfo AI_ADDRCONFIG (can't really be tested without network
  namespaces though)

Particular bugfixes that call for functionality or regression tests:

b123f23 fix getopt wrongly treating colons in optstring as valid option chars
0cf5058 fix nl_langinfo_l(CODESET, loc) reporting wrong locale's value
282b1cd fix fmaf wrong result
ae2a01d fix wrong result in casin and many related complex functions
10e4bd3 fix incorrect results for catan with some inputs
4bf0717 fix return value of nice function
3f6dc30 fix out of bounds write for zero length buffer in gethostname
9be4ed5 getopt_long_only: don't prefix-match long-options that match short ones
55a661f fix iconv buffer overflow converting to legacy JIS-based encodings
99f4237 fix iconv conversion to UTF-32 with implicit (big) endianness
165a1e3 fix iconv mapping of big5-hkscs characters that map to two unicode chars
029c622 fix output size handling for multi-unicode-char big5-hkscs characters
5c8e692 inet_ntop: do not compress single zeros in IPv6
8b8fb7f correctly handle non-matching symbols in dladdr
9cad27a fix writes outside buffer by ungetc after setvbuf
b3fa0f2 fix regression in alignment of dirent structs produced by readdir"

Signed-off-by: Christian Lamparter <chunkeey at gmail.com>
---
 toolchain/musl/common.mk                      |  6 +-
 ...ocket.h-fix-SO_PEERSEC-value-on-MIPS.patch | 59 -------------------
 .../patches/200-add_libssp_nonshared.patch    | 39 ++++++------
 toolchain/musl/patches/300-relative.patch     |  2 +-
 ...ribute-to-some-function-declarations.patch |  8 +--
 .../musl/patches/900-iconv_size_hack.patch    |  6 +-
 6 files changed, 32 insertions(+), 88 deletions(-)
 delete mode 100644 toolchain/musl/patches/010-sys-socket.h-fix-SO_PEERSEC-value-on-MIPS.patch

diff --git a/toolchain/musl/common.mk b/toolchain/musl/common.mk
index 87424646c3..3d58439a01 100644
--- a/toolchain/musl/common.mk
+++ b/toolchain/musl/common.mk
@@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/target.mk
 
 PKG_NAME:=musl
-PKG_VERSION:=1.1.19
+PKG_VERSION:=1.1.20-pre
 PKG_RELEASE=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=55df09bfccbfe21fc9dd7d8f94550c0ff25ace04
-PKG_MIRROR_HASH:=eb94e4e7e94221dd8890afd9b29e2562c36cf5585649035349ca1c6c1c354f2b
+PKG_SOURCE_VERSION:=f2c6dbe2442027ed8fe0fa869918e41f495534d8
+PKG_MIRROR_HASH:=2ec8320cea2c560c9e9a01f7e3b8681f0113b380838194bcdf90562a38c847e4
 PKG_SOURCE_URL:=git://git.musl-libc.org/musl
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
 
diff --git a/toolchain/musl/patches/010-sys-socket.h-fix-SO_PEERSEC-value-on-MIPS.patch b/toolchain/musl/patches/010-sys-socket.h-fix-SO_PEERSEC-value-on-MIPS.patch
deleted file mode 100644
index 2319d9cb68..0000000000
--- a/toolchain/musl/patches/010-sys-socket.h-fix-SO_PEERSEC-value-on-MIPS.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-From 4e0877a604bad684be020f68e96a05156131fd44 Mon Sep 17 00:00:00 2001
-From: Matthias Schiffer <mschiffer at universe-factory.net>
-Date: Sun, 24 Jun 2018 17:05:31 +0200
-Subject: [PATCH] sys/socket.h: fix SO_PEERSEC value on MIPS
-
-Differing from all other archs supported by musl, MIPS defines SO_PEERSEC
-to 30 instead of 31.
-
-Reported-by: Andrey Jr. Mlenikov <temnota.am at gmail.com>
----
- arch/mips/bits/socket.h    | 2 ++
- arch/mips64/bits/socket.h  | 2 ++
- arch/mipsn32/bits/socket.h | 2 ++
- include/sys/socket.h       | 3 +++
- 4 files changed, 9 insertions(+)
-
---- a/arch/mips/bits/socket.h
-+++ b/arch/mips/bits/socket.h
-@@ -48,5 +48,7 @@ struct cmsghdr {
- #define SO_SNDBUFFORCE  31
- #define SO_RCVBUFFORCE  33
- 
-+#define SO_PEERSEC      30
-+
- #define SOCK_NONBLOCK     0200
- #define SOCK_CLOEXEC  02000000
---- a/arch/mips64/bits/socket.h
-+++ b/arch/mips64/bits/socket.h
-@@ -64,5 +64,7 @@ struct cmsghdr {
- #define SO_SNDBUFFORCE  31
- #define SO_RCVBUFFORCE  33
- 
-+#define SO_PEERSEC      30
-+
- #define SOCK_NONBLOCK     0200
- #define SOCK_CLOEXEC  02000000
---- a/arch/mipsn32/bits/socket.h
-+++ b/arch/mipsn32/bits/socket.h
-@@ -48,5 +48,7 @@ struct cmsghdr {
- #define SO_SNDBUFFORCE  31
- #define SO_RCVBUFFORCE  33
- 
-+#define SO_PEERSEC      30
-+
- #define SOCK_NONBLOCK     0200
- #define SOCK_CLOEXEC  02000000
---- a/include/sys/socket.h
-+++ b/include/sys/socket.h
-@@ -201,7 +201,10 @@ struct linger {
- #define SO_TIMESTAMP            29
- #define SCM_TIMESTAMP           SO_TIMESTAMP
- 
-+#ifndef SO_PEERSEC
- #define SO_PEERSEC              31
-+#endif
-+
- #define SO_PASSSEC              34
- #define SO_TIMESTAMPNS          35
- #define SCM_TIMESTAMPNS         SO_TIMESTAMPNS
diff --git a/toolchain/musl/patches/200-add_libssp_nonshared.patch b/toolchain/musl/patches/200-add_libssp_nonshared.patch
index 7a2909461b..b8fa7b4b4f 100644
--- a/toolchain/musl/patches/200-add_libssp_nonshared.patch
+++ b/toolchain/musl/patches/200-add_libssp_nonshared.patch
@@ -4,11 +4,6 @@ Date: Mon, 22 Jun 2015 11:01:56 +0200
 Subject: [PATCH] Add libssp_nonshared.a so GCC's is not needed
 
 Signed-off-by: Steven Barth <steven at midlink.org>
----
- Makefile                                  | 10 ++++++++--
- libssp_nonshared/__stack_chk_fail_local.c |  2 ++
- 2 files changed, 10 insertions(+), 2 deletions(-)
- create mode 100644 libssp_nonshared/__stack_chk_fail_local.c
 
 --- a/Makefile
 +++ b/Makefile
@@ -21,21 +16,29 @@ Signed-off-by: Steven Barth <steven at midlink.org>
  ALL_TOOLS = obj/musl-gcc
  
  WRAPCC_GCC = gcc
-@@ -125,7 +125,8 @@ NOSSP_SRCS = $(wildcard crt/*.c) \
- 	src/thread/__set_thread_area.c src/thread/$(ARCH)/__set_thread_area.c \
- 	src/string/memset.c src/string/$(ARCH)/memset.c \
- 	src/string/memcpy.c src/string/$(ARCH)/memcpy.c \
--	ldso/dlstart.c ldso/dynlink.c
-+	ldso/dlstart.c ldso/dynlink.c \
-+	src/libssp_nonshared/__stack_chk_fail_local.c
- $(NOSSP_SRCS:%.c=obj/%.o) $(NOSSP_SRCS:%.c=obj/%.lo): CFLAGS_ALL += $(CFLAGS_NOSSP)
- 
- $(CRT_OBJS): CFLAGS_ALL += -DCRT
-@@ -168,6 +169,11 @@ lib/libc.a: $(AOBJS)
+@@ -86,7 +86,7 @@ else
+ 
+ all: $(ALL_LIBS) $(ALL_TOOLS)
+ 
+-OBJ_DIRS = $(sort $(patsubst %/,%,$(dir $(ALL_LIBS) $(ALL_TOOLS) $(ALL_OBJS) $(GENH) $(GENH_INT))) obj/include)
++OBJ_DIRS = $(sort $(patsubst %/,%,$(dir $(ALL_LIBS) $(ALL_TOOLS) $(ALL_OBJS) $(GENH) $(GENH_INT))) obj/include obj/libssp_nonshared)
+ 
+ $(ALL_LIBS) $(ALL_TOOLS) $(ALL_OBJS) $(ALL_OBJS:%.o=%.lo) $(GENH) $(GENH_INT): | $(OBJ_DIRS)
+
+@@ -113,6 +113,8 @@ obj/crt/rcrt1.o: $(srcdir)/ldso/dlstart.
+ 
+ obj/crt/Scrt1.o obj/crt/rcrt1.o: CFLAGS_ALL += -fPIC
+ 
++obj/libssp_nonshared/__stack_chk_fail_local.o: CFLAGS_ALL += $(CFLAGS_NOSSP)
++
+ OPTIMIZE_SRCS = $(wildcard $(OPTIMIZE_GLOBS:%=$(srcdir)/src/%))
+ $(OPTIMIZE_SRCS:$(srcdir)/%.c=obj/%.o) $(OPTIMIZE_SRCS:$(srcdir)/%.c=obj/%.lo): CFLAGS += -O3
+ 
+@@ -165,6 +166,11 @@ lib/libc.a: $(AOBJS)
  	$(AR) rc $@ $(AOBJS)
  	$(RANLIB) $@
  
-+lib/libssp_nonshared.a: obj/src/libssp_nonshared/__stack_chk_fail_local.o
++lib/libssp_nonshared.a: obj/libssp_nonshared/__stack_chk_fail_local.o
 +	rm -f $@
 +	$(AR) rc $@ $<
 +	$(RANLIB) $@
@@ -44,7 +47,7 @@ Signed-off-by: Steven Barth <steven at midlink.org>
  	rm -f $@
  	$(AR) rc $@
 --- /dev/null
-+++ b/src/libssp_nonshared/__stack_chk_fail_local.c
++++ b/libssp_nonshared/__stack_chk_fail_local.c
 @@ -0,0 +1,2 @@
 +#include "atomic.h"
 +void __attribute__((visibility ("hidden"))) __stack_chk_fail_local(void) { a_crash(); }
diff --git a/toolchain/musl/patches/300-relative.patch b/toolchain/musl/patches/300-relative.patch
index 7e1eb7d6bc..e34e60a09d 100644
--- a/toolchain/musl/patches/300-relative.patch
+++ b/toolchain/musl/patches/300-relative.patch
@@ -1,6 +1,6 @@
 --- a/Makefile
 +++ b/Makefile
-@@ -217,7 +217,7 @@ $(DESTDIR)$(includedir)/%: $(srcdir)/inc
+@@ -215,7 +215,7 @@ $(DESTDIR)$(includedir)/%: $(srcdir)/inc
  	$(INSTALL) -D -m 644 $< $@
  
  $(DESTDIR)$(LDSO_PATHNAME): $(DESTDIR)$(libdir)/libc.so
diff --git a/toolchain/musl/patches/400-Add-format-attribute-to-some-function-declarations.patch b/toolchain/musl/patches/400-Add-format-attribute-to-some-function-declarations.patch
index 915b0b7b47..f7eff9141f 100644
--- a/toolchain/musl/patches/400-Add-format-attribute-to-some-function-declarations.patch
+++ b/toolchain/musl/patches/400-Add-format-attribute-to-some-function-declarations.patch
@@ -102,7 +102,7 @@ Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
  #ifdef __cplusplus
  #define NULL 0L
  #else
-@@ -102,19 +110,19 @@ int puts(const char *);
+@@ -103,19 +111,19 @@ int puts(const char *);
  int printf(const char *__restrict, ...);
  int fprintf(FILE *__restrict, const char *__restrict, ...);
  int sprintf(char *__restrict, const char *__restrict, ...);
@@ -127,7 +127,7 @@ Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
  
  void perror(const char *);
  
-@@ -135,8 +143,8 @@ int pclose(FILE *);
+@@ -136,8 +144,8 @@ int pclose(FILE *);
  int fileno(FILE *);
  int fseeko(FILE *, off_t, int);
  off_t ftello(FILE *);
@@ -138,7 +138,7 @@ Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
  void flockfile(FILE *);
  int ftrylockfile(FILE *);
  void funlockfile(FILE *);
-@@ -175,8 +183,8 @@ int fileno_unlocked(FILE *);
+@@ -176,8 +184,8 @@ int fileno_unlocked(FILE *);
  int getw(FILE *);
  int putw(int, FILE *);
  char *fgetln(FILE *, size_t *);
@@ -149,7 +149,7 @@ Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
  #endif
  
  #ifdef _GNU_SOURCE
-@@ -198,6 +206,9 @@ typedef struct _IO_cookie_io_functions_t
+@@ -199,6 +207,9 @@ typedef struct _IO_cookie_io_functions_t
  FILE *fopencookie(void *, const char *, cookie_io_functions_t);
  #endif
  
diff --git a/toolchain/musl/patches/900-iconv_size_hack.patch b/toolchain/musl/patches/900-iconv_size_hack.patch
index 6200262b1d..461a204a4c 100644
--- a/toolchain/musl/patches/900-iconv_size_hack.patch
+++ b/toolchain/musl/patches/900-iconv_size_hack.patch
@@ -56,7 +56,7 @@
  		case SHIFT_JIS:
  			if (c < 128) break;
  			if (c-0xa1 <= 0xdf-0xa1) {
-@@ -510,6 +517,7 @@ size_t iconv(iconv_t cd, char **restrict
+@@ -518,6 +525,7 @@ size_t iconv(iconv_t cd, char **restrict
  			c = ksc[c][d];
  			if (!c) goto ilseq;
  			break;
@@ -64,7 +64,7 @@
  		default:
  			if (!c) break;
  			c = legacy_map(map, c);
-@@ -550,6 +558,7 @@ size_t iconv(iconv_t cd, char **restrict
+@@ -559,6 +567,7 @@ size_t iconv(iconv_t cd, char **restrict
  				}
  			}
  			goto subst;
@@ -72,7 +72,7 @@
  		case SHIFT_JIS:
  			if (c < 128) goto revout;
  			if (c == 0xa5) {
-@@ -623,6 +632,7 @@ size_t iconv(iconv_t cd, char **restrict
+@@ -632,6 +641,7 @@ size_t iconv(iconv_t cd, char **restrict
  			*(*out)++ = 'B';
  			*outb -= 8;
  			break;
-- 
2.18.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From rosenp at gmail.com  Sun Jul 29 13:02:08 2018
From: rosenp at gmail.com (Rosen Penev)
Date: Sun, 29 Jul 2018 10:02:08 -0700
Subject: [OpenWrt-Devel] [PATCH] admswconfig: Remove dead URL + HTTPS
Message-ID: <20180729170208.5082-1-rosenp@gmail.com>

Found using uscan.

Signed-off-by: Rosen Penev <rosenp at gmail.com>
---
 package/utils/admswconfig/Makefile | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/package/utils/admswconfig/Makefile b/package/utils/admswconfig/Makefile
index 0524949dde..b2a163248a 100644
--- a/package/utils/admswconfig/Makefile
+++ b/package/utils/admswconfig/Makefile
@@ -12,7 +12,7 @@ PKG_VERSION:=0.1
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://downloads.openwrt.org/sources
+PKG_SOURCE_URL:=https://downloads.openwrt.org/sources
 PKG_HASH:=37b4409ea2105520b4a7327e53c3210251000ddf58f81a8e4c19e6ff9d615afe
 
 PKG_FLAGS:=nonshared
@@ -24,7 +24,6 @@ define Package/admswconfig
   CATEGORY:=Utilities
   TITLE:=ADM5120 Switch configuration tool
   DEPENDS:=@TARGET_adm5120
-  URL:=http://sharon.esrac.ele.tue.nl/users/pe1rxq/linux-adm/admswconfig/
   MAINTAINER:=Florian Fainelli <florian at openwrt.org>
 endef
 
-- 
2.17.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From sebastian_ml at gmx.net  Sun Jul 29 13:53:51 2018
From: sebastian_ml at gmx.net (Sebastian Kemper)
Date: Sun, 29 Jul 2018 19:53:51 +0200
Subject: [OpenWrt-Devel] Disclaimer for user documentation?
In-Reply-To: <f4a2c4d3-e0b3-e2d6-b80b-d94ff2a7b10d@gmail.com>
References: <3BB2CBCA-2039-4BC7-989A-140EFBAB8111@gmx.net>
 <f4a2c4d3-e0b3-e2d6-b80b-d94ff2a7b10d@gmail.com>
Message-ID: <20180729175350.GA3197@darth.lan>

On Sat, Jul 28, 2018 at 02:36:20PM +0200, Alberto Bursi wrote:
> In other articles where user error might cause issues we placed a banner 
> on top with a warning, like this 
> https://openwrt.org/docs/guide-user/network/wan/smartphone.usb.tethering

Hello Alberto,

Thank you for your input. I put up a warning like that now.

> I personally don't think people writing the articles can be blamed 
> unless the guide they wrote is actually wrong. If users screw up that's 
> their own responsibility.

I agree. But lets say for the sake of argument that a company has an
admin who uses your guide to configure his telephony system. And then
somebody takes advantage of some configuration issue in your guide and
commits toll fraud. Lets say for a couple thousand <insert your
currency>. The provider will get their money from the company. And the
company goes to the admin who then points to your article. Would the
company perhaps consider suing you, the author of the guide?

> But I don't know the legal side of things, can someone actually sue 
> OpenWrt or try to go after the contributors if such things happen?

Interesting questions. The answers may also be different depending on
your location.

> If others agree (I'm CCing this mail to other wiki maintainers) I can 
> add a new "Legal" page with link on the menu on the left where such 
> disclaimers can be placed.

I think a general disclaim-all DISCLAIMER would be handy.

> In the meantime you can place any disclaimer you want in the warning box 
> at the top of your article, and be covered by that. A good starting 
> point is copy-pasting LineageOS's https://lineageos.org/legal/

I'll not put up a guide right now as the liability situation is
uncertain. I'll just provide basic infos about some of the packages.

Kind regards,
Seb

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From bobafetthotmail at gmail.com  Sun Jul 29 14:50:12 2018
From: bobafetthotmail at gmail.com (Alberto Bursi)
Date: Sun, 29 Jul 2018 20:50:12 +0200
Subject: [OpenWrt-Devel] Disclaimer for user documentation?
In-Reply-To: <20180729175350.GA3197@darth.lan>
References: <3BB2CBCA-2039-4BC7-989A-140EFBAB8111@gmx.net>
 <f4a2c4d3-e0b3-e2d6-b80b-d94ff2a7b10d@gmail.com>
 <20180729175350.GA3197@darth.lan>
Message-ID: <4314e98b-ed8d-0a72-382b-f701c5594f6d@gmail.com>



On 29/07/2018 19:53, Sebastian Kemper wrote:
> On Sat, Jul 28, 2018 at 02:36:20PM +0200, Alberto Bursi wrote:
>
>> In the meantime you can place any disclaimer you want in the warning box
>> at the top of your article, and be covered by that. A good starting
>> point is copy-pasting LineageOS's https://lineageos.org/legal/
> I'll not put up a guide right now as the liability situation is
> uncertain. I'll just provide basic infos about some of the packages.
>
> Kind regards,
> Seb

Let me clarify as it seems I didn't get my point through:

there is no legal office in OpenWrt so this discussion might never go 
beyond this chat between me and you and a few other guys that aren't 
lawyers.

If you really want to both post the article and be sure you aren't held 
liable for user error, I would recommend to look up
what would disclaim all liability in your country and just place a 
banner with that text in the article
(which afaik should be the same as LineageOS's for EU and USA, all 
disclaimers I've seen around look the same)
instead of waiting indefinitely for some definitive answer that isn't 
likely to come.

Any edit to the wiki is logged and can be rolled back, maintainers are 
notified of any edit,
if we see someone making shenanigans with the articles we revert the 
page to its previous state pretty quickly.
So the banner you place won't disappear.

What I was wondering in my answer (and why I CC other maintainers) is 
what would happen for most of the documentation in the wiki that lacks 
such disclaimers.
Because you know, failure to secure basic stuff like wifi or firewall or 
VPN will cause massive issues too, and
we may or may not have liability disclaimers in place for that.


-Alberto

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From dedeckeh at gmail.com  Sun Jul 29 16:16:37 2018
From: dedeckeh at gmail.com (Hans Dedecker)
Date: Sun, 29 Jul 2018 22:16:37 +0200
Subject: [OpenWrt-Devel] 6rd issues with 18.06-rc2 on ubnt-erx-sfp
In-Reply-To: <f2b9bb3c-e94b-2cde-a29b-ad3cba9219d2@mbox200.swipnet.se>
References: <f2b9bb3c-e94b-2cde-a29b-ad3cba9219d2@mbox200.swipnet.se>
Message-ID: <CAJLcKsFKnNFW8sS8Q8XXFEvCv8JpY92czjsx-JZYo+do4Bn8tw@mail.gmail.com>

On Fri, Jul 27, 2018 at 2:36 PM Torbjorn Jansson
<torbjorn.jansson at mbox200.swipnet.se> wrote:
>
> Hello
>
> i decided to try to upgrade my erx-sfp from an old snapshot (probably a year or
> so old) to 18.06-rc2.
> for the most part it worked out but there is something odd going on with my 6rd
> wan interface and i'm not sure where to start the troubleshooting.
>
> with luci-proto-ipv6 and 6rd packages installed i get a lot of stuff like this
> in syslog:
> 14:29:07 2018 daemon.notice netifd: wan6 (24771): Command failed: Unknown error
> 14:29:07 2018 daemon.notice netifd: Interface 'wan6' is now down
> 14:29:07 2018 daemon.notice netifd: Interface 'wan6' is setting up now
> 14:29:08 2018 daemon.notice netifd: wan6 (24856): Command failed: Unknown error
> 14:29:08 2018 daemon.notice netifd: Interface 'wan6' is now down
> 14:29:08 2018 daemon.notice netifd: Interface 'wan6' is setting up
> (dates removed to make log easier to fit in mail without line breaks)
>
> this repeats every second and 6rd interface seems to get ip adress but it is
> not quite working.
>
> plus i noticed under Network -> Interfaces in webinterface i now have two
> similar looking 6rd interfaces.
> one named WAN6 and thats the one i created and another one that cant be edited
> that's called WAN_6
>
> WAN6 is listed as protocol: IPv6-over-IPv4 (6rd)
> WAN_6 is listed as protocol: Virtual dynamic interface (IPv6-over-IPv4 (6rd))
>
> the last interface must be something new or a problem or something.
> it is also that interface that gets the ipv6 addresses.
>
>
> any idea whats wrong?
> or how to find out what command failed in the log?
Hi,

You cannot enable both an automatic 6rd interface (wan_6) and a manual
created 6rd interface (wan6); Either remove the manual created 6rd
interface or set iface6rd to 0 in the wan network config which will
disable the automatic creation of the 6rd wan_6 interface

Hans
>
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From torbjorn.jansson at mbox200.swipnet.se  Sun Jul 29 18:02:44 2018
From: torbjorn.jansson at mbox200.swipnet.se (Torbjorn Jansson)
Date: Mon, 30 Jul 2018 00:02:44 +0200
Subject: [OpenWrt-Devel] 6rd issues with 18.06-rc2 on ubnt-erx-sfp
In-Reply-To: <CAJLcKsFKnNFW8sS8Q8XXFEvCv8JpY92czjsx-JZYo+do4Bn8tw@mail.gmail.com>
References: <f2b9bb3c-e94b-2cde-a29b-ad3cba9219d2@mbox200.swipnet.se>
 <CAJLcKsFKnNFW8sS8Q8XXFEvCv8JpY92czjsx-JZYo+do4Bn8tw@mail.gmail.com>
Message-ID: <703b4fe7-750e-d0fe-5e8c-c24adc6eba67@mbox200.swipnet.se>

On 2018-07-29 22:16, Hans Dedecker wrote:
> On Fri, Jul 27, 2018 at 2:36 PM Torbjorn Jansson
> <torbjorn.jansson at mbox200.swipnet.se> wrote:
>>
>> Hello
>>
>> i decided to try to upgrade my erx-sfp from an old snapshot (probably a year or
>> so old) to 18.06-rc2.
>> for the most part it worked out but there is something odd going on with my 6rd
>> wan interface and i'm not sure where to start the troubleshooting.
>>
>> with luci-proto-ipv6 and 6rd packages installed i get a lot of stuff like this
>> in syslog:
>> 14:29:07 2018 daemon.notice netifd: wan6 (24771): Command failed: Unknown error
>> 14:29:07 2018 daemon.notice netifd: Interface 'wan6' is now down
>> 14:29:07 2018 daemon.notice netifd: Interface 'wan6' is setting up now
>> 14:29:08 2018 daemon.notice netifd: wan6 (24856): Command failed: Unknown error
>> 14:29:08 2018 daemon.notice netifd: Interface 'wan6' is now down
>> 14:29:08 2018 daemon.notice netifd: Interface 'wan6' is setting up
>> (dates removed to make log easier to fit in mail without line breaks)
>>
>> this repeats every second and 6rd interface seems to get ip adress but it is
>> not quite working.
>>
>> plus i noticed under Network -> Interfaces in webinterface i now have two
>> similar looking 6rd interfaces.
>> one named WAN6 and thats the one i created and another one that cant be edited
>> that's called WAN_6
>>
>> WAN6 is listed as protocol: IPv6-over-IPv4 (6rd)
>> WAN_6 is listed as protocol: Virtual dynamic interface (IPv6-over-IPv4 (6rd))
>>
>> the last interface must be something new or a problem or something.
>> it is also that interface that gets the ipv6 addresses.
>>
>>
>> any idea whats wrong?
>> or how to find out what command failed in the log?
> Hi,
> 
> You cannot enable both an automatic 6rd interface (wan_6) and a manual
> created 6rd interface (wan6); Either remove the manual created 6rd
> interface or set iface6rd to 0 in the wan network config which will
> disable the automatic creation of the 6rd wan_6 interface
> 
> Hans

i'm not sure i get it.
where is the auto created 6rd interface that can't be edited coming from if not 
from the one i created myself?

the errors stopped once i changed "bring up on boot" on wan6 and ipv6 still 
works (after reboot) but i don't understand why.

the config i'm running with is exactly the same as i had on old version of 
openwrt/lede and it worked just fine.
i guess something is different now.

if i delete wan6 then i delete all 6rd settings like remote ipv4 address, the 
ipv6 prefix and so on.

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From john at phrozen.org  Mon Jul 30 02:24:14 2018
From: john at phrozen.org (John Crispin)
Date: Mon, 30 Jul 2018 08:24:14 +0200
Subject: [OpenWrt-Devel] how to add/package kernel module?
In-Reply-To: <85184f76-f727-1adf-a5af-dbbeeefb2423@mbox200.swipnet.se>
References: <85184f76-f727-1adf-a5af-dbbeeefb2423@mbox200.swipnet.se>
Message-ID: <e2a82800-6f65-1535-f31c-d1d5cef0a8d2@phrozen.org>



On 27/07/18 17:26, Torbjorn Jansson wrote:
> Hello.
>
> Probably over a year ago i built a rasperry pi and made a custom build 
> of openwrt and added a small patch for myself to make module for htu21 
> temp and humidity sensor available.
>
> the patch i made i'm not sure if it is correct or not and even if it 
> still works with all the changes that has been done but it would be 
> nice to have the kernel module (kmod-iio-htu21) built and available as 
> an option preferably in some future release.
>
> i use the htu21 kernel module with a small shell script to push the 
> data out to an mqtt server for further handling.
> there is probably more iio modules that could be useful to others but 
> for now i'm happy if i can make a new version of openwrt with the 
> kernel module added and preferably also get it included so i don't 
> need a custom build.
>
>
> below is my old patch.
>

Patch looks ok at first glance, but there are a few formal errors, the 
Signed-off-by is missing and the patch headline needs to be prefixed and 
a proper description needs to be written -> 
https://openwrt.org/submitting-patches

 ??? John

>
> diff --git a/package/kernel/linux/modules/other.mk 
> b/package/kernel/linux/modules/other.mk
> index 38b98f3..3770510 100644
> --- a/package/kernel/linux/modules/other.mk
> +++ b/package/kernel/linux/modules/other.mk
> @@ -329,6 +329,29 @@ endef
> ?$(eval $(call KernelPackage,iio-dht11))
>
>
> +define KernelPackage/iio-htu21
> +? SUBMENU:=$(OTHER_MENU)
> +? DEPENDS:=kmod-i2c-core kmod-iio-core
> +? TITLE:=Measurement Specialties HTU21 humidity & temperature sensor
> +? KCONFIG:= \
> +?? CONFIG_HTU21 \
> +?? CONFIG_IIO_MS_SENSORS_I2C
> +? FILES:= \
> +?? $(LINUX_DIR)/drivers/iio/humidity/htu21.ko \
> +?? $(LINUX_DIR)/drivers/iio/common/ms_sensors/ms_sensors_i2c.ko
> +? AUTOLOAD:=$(call AutoLoad,56,htu21)
> +endef
> +
> +define KernelPackage/iio-htu21/description
> + support for the Measurement Specialties HTU21 humidity and
> + temperature sensor.
> + This driver is also used for MS8607 temperature, pressure & humidity
> + sensor
> +endef
> +
> +$(eval $(call KernelPackage,iio-htu21))
> +
> +
> ?define KernelPackage/lp
> ?? SUBMENU:=$(OTHER_MENU)
> ?? TITLE:=Parallel port and line printer support
>
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From john at phrozen.org  Mon Jul 30 02:40:27 2018
From: john at phrozen.org (John Crispin)
Date: Mon, 30 Jul 2018 08:40:27 +0200
Subject: [OpenWrt-Devel] [PATCH v2 2/4] ramips: fix RBM33G partitioning
In-Reply-To: <20180729090724.8436-2-hacks@slashdirt.org>
References: <20180729090724.8436-1-hacks@slashdirt.org>
 <20180729090724.8436-2-hacks@slashdirt.org>
Message-ID: <3da82818-856f-740c-4568-bdedc0ae5305@phrozen.org>



On 29/07/18 11:07, Thibaut VAR?NE wrote:
> This patch improves 5684d087418d176cfdef4e045e1950ca7ba3b09f by correcting
> the partition scheme for the "RouterBoot" section of the flash.
>
> This section is subdivided in several segments, as they are on ar71xx
> RB devices, albeit with different offsets and sizes. The naming convention
> from ar71xx has been preserved. The preferred 'fixed-partitions' DTS
> node syntax is used, with nesting support as introduced in 2a598bbaa3.
>
> The OEM source code also define a "RouterBootFake" partition at the
> beginning of the secondary flash chip: to avoid trouble if OEM ever makes
> use of that space, it is also defined here.

as discussed on IRC we concluded, that this should be done with a mtd 
splitter.
 ??? John

>
> The resulting partition scheme looks like this:
> [   10.114241] m25p80 spi0.0: w25x40 (512 Kbytes)
> [   10.118708] 1 fixed-partitions partitions found on MTD device spi0.0
> [   10.125049] Creating 1 MTD partitions on "spi0.0":
> [   10.129824] 0x000000000000-0x000000040000 : "RouterBoot"
> [   10.136215] 5 fixed-partitions partitions found on MTD device RouterBoot
> [   10.142894] Creating 5 MTD partitions on "RouterBoot":
> [   10.148032] 0x000000000000-0x00000000f000 : "routerboot"
> [   10.154336] 0x00000000f000-0x000000010000 : "hard_config"
> [   10.160665] 0x000000010000-0x00000001f000 : "routerboot2"
> [   10.167046] 0x000000020000-0x000000021000 : "soft_config"
> [   10.173461] 0x000000030000-0x000000031000 : "bios"
> [   10.190191] m25p80 spi0.1: w25q128 (16384 Kbytes)
> [   10.194950] 2 fixed-partitions partitions found on MTD device spi0.1
> [   10.201271] Creating 2 MTD partitions on "spi0.1":
> [   10.206071] 0x000000000000-0x000000040000 : "RouterBootFake"
> [   10.212746] 0x000000040000-0x000001000000 : "firmware"
> [   10.307216] 2 minor-fw partitions found on MTD device firmware
> [   10.313044] 0x000000040000-0x000000220000 : "kernel"
> [   10.319002] 0x000000220000-0x000001000000 : "rootfs"
> [   10.324906] mtd: device 9 (rootfs) set to be root filesystem
> [   10.330678] 1 squashfs-split partitions found on MTD device rootfs
> [   10.336886] 0x000000b40000-0x000001000000 : "rootfs_data"
>
> Leave a note in DTS to explain how the original author selected the SPI speed.
>
> Tested-by: Tobias Schramm <tobleminer at gmail.com>
> Signed-off-by: Thibaut VAR?NE <hacks at slashdirt.org>
> ---
>   target/linux/ramips/dts/RBM33G.dts | 69 +++++++++++++++++++++++++++++---------
>   1 file changed, 54 insertions(+), 15 deletions(-)
>
> diff --git a/target/linux/ramips/dts/RBM33G.dts b/target/linux/ramips/dts/RBM33G.dts
> index 612dc106ed..a02d03818f 100644
> --- a/target/linux/ramips/dts/RBM33G.dts
> +++ b/target/linux/ramips/dts/RBM33G.dts
> @@ -104,18 +104,44 @@
>   		reg = <0>;
>   		spi-max-frequency = <3125000>;
>   
> -		partition at 0 {
> -			label = "routerboot";
> -			reg = <0x0 0xf000>;
> -			read-only;
> +		partitions {
> +			compatible = "fixed-partitions";
> +			#address-cells = <1>;
> +			#size-cells = <1>;
> +
> +			partition at 0 {
> +				label = "RouterBoot";
> +				reg = <0x0 0x40000>;
> +				read-only;
> +				compatible = "fixed-partitions";
> +				#address-cells = <1>;
> +				#size-cells = <1>;
> +
> +				routerboot at 0 {
> +					reg = <0x0 0xf000>;
> +					read-only;
> +				};
> +
> +				hard_config: hard_config at f000 {
> +					reg = <0xf000 0x1000>;
> +					read-only;
> +				};
> +
> +				routerboot2 at 10000 {
> +					reg = <0x10000 0xf000>;
> +					read-only;
> +				};
> +
> +				soft_config at 20000 {
> +					reg = <0x20000 0x1000>;
> +				};
> +
> +				bios at 30000 {
> +					reg = <0x30000 0x1000>;
> +					read-only;
> +				};
> +			};
>   		};
> -
> -		factory: partition at f000 {
> -			label = "factory";
> -			reg = <0xf000 0x71000>;
> -			read-only;
> -		};
> -
>   	};
>   
>   	w25q128 at 0 {
> @@ -123,17 +149,30 @@
>   		#size-cells = <1>;
>   		compatible = "jedec,spi-nor";
>   		reg = <1>;
> +		// XXX empiric value to obtain actual 10MHz SCK at the chip
>   		spi-max-frequency = <3125000>;
>   
> -		partition at 40000 {
> -			label = "firmware";
> -			reg = <0x040000 0xFC0000>;
> +		partitions {
> +			compatible = "fixed-partitions";
> +			#address-cells = <1>;
> +			#size-cells = <1>;
> +
> +			// this contains no data but is named so in OEM source
> +			partition at 0 {
> +				label = "RouterBootFake";
> +				reg = <0x0 0x40000>;
> +				read-only;
> +			};
> +
> +			firmware at 40000 {
> +				reg = <0x040000 0xFC0000>;
> +			};
>   		};
>   	};
>   };
>   
>   &ethernet {
> -	mtd-mac-address = <&factory 0x0010>;
> +	mtd-mac-address = <&hard_config 0x0010>;
>   	mtd-mac-address-increment = <1>;
>   };
>   


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From zajec5 at gmail.com  Mon Jul 30 02:45:41 2018
From: zajec5 at gmail.com (=?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?=)
Date: Mon, 30 Jul 2018 08:45:41 +0200
Subject: [OpenWrt-Devel] [PATCH] brcm63xx: update DT RedBoot binding for the
 Inventel Livebox 1
Message-ID: <20180730064541.11821-1-zajec5@gmail.com>

From: Rafa? Mi?ecki <rafal at milecki.pl>

linux,part-probe should be avoided as its only supported with OpenWrt
downstream patch that is going to be dropped eventually.

Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
---
 target/linux/brcm63xx/dts/livebox-blue-5g.dts | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/target/linux/brcm63xx/dts/livebox-blue-5g.dts b/target/linux/brcm63xx/dts/livebox-blue-5g.dts
index 0bc503c941..7e8d865a4f 100644
--- a/target/linux/brcm63xx/dts/livebox-blue-5g.dts
+++ b/target/linux/brcm63xx/dts/livebox-blue-5g.dts
@@ -69,7 +69,9 @@
 	reg = <0x1e400000 0x800000>;
 	status = "ok";
 
-	linux,part-probe = "RedBoot";
+	partitions {
+		compatible = "redhat,redboot-partitions";
+	};
 };
 
 &pinctrl {
-- 
2.13.7


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From sojkam1 at fel.cvut.cz  Mon Jul 30 03:31:09 2018
From: sojkam1 at fel.cvut.cz (Michal Sojka)
Date: Mon, 30 Jul 2018 09:31:09 +0200
Subject: [OpenWrt-Devel] [PATCH procd 1/2] trace: Use properly sized type
 for PTRACE_GETEVENTMSG
Message-ID: <20180730073110.28309-1-sojkam1@fel.cvut.cz>

From: Michal Sojka <michal.sojka at cvut.cz>

Without this, on 64-bit systems, ptrace call corrupts memory because
it stores 64bit value to 32bit pid_t variable.

Signed-off-by: Michal Sojka <michal.sojka at cvut.cz>
---
 trace/trace.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/trace/trace.c b/trace/trace.c
index 27cf108..665c22e 100644
--- a/trace/trace.c
+++ b/trace/trace.c
@@ -211,7 +211,9 @@ static void tracer_cb(struct uloop_process *c, int ret)
 			   (ret >> 8) == (SIGTRAP | (PTRACE_EVENT_CLONE << 8))) {
 			struct tracee *child = calloc(1, sizeof(struct tracee));
 
-			ptrace(PTRACE_GETEVENTMSG, c->pid, 0, &child->proc.pid);
+			unsigned long msg;
+			ptrace(PTRACE_GETEVENTMSG, c->pid, 0, &msg);
+			child->proc.pid = msg;
 			child->proc.cb = tracer_cb;
 			ptrace(ptrace_restart, child->proc.pid, 0, 0);
 			uloop_process_add(&child->proc);
-- 
2.18.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From sojkam1 at fel.cvut.cz  Mon Jul 30 03:32:18 2018
From: sojkam1 at fel.cvut.cz (Michal Sojka)
Date: Mon, 30 Jul 2018 09:32:18 +0200
Subject: [OpenWrt-Devel] [PATCH procd 1/2] trace: Use properly sized type
 for PTRACE_GETEVENTMSG
Message-ID: <20180730073219.28553-1-sojkam1@fel.cvut.cz>

From: Michal Sojka <michal.sojka at cvut.cz>

Without this, on 64-bit systems, ptrace call corrupts memory because
it stores 64bit value to 32bit pid_t variable.

Signed-off-by: Michal Sojka <michal.sojka at cvut.cz>
---
 trace/trace.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/trace/trace.c b/trace/trace.c
index 27cf108..665c22e 100644
--- a/trace/trace.c
+++ b/trace/trace.c
@@ -211,7 +211,9 @@ static void tracer_cb(struct uloop_process *c, int ret)
 			   (ret >> 8) == (SIGTRAP | (PTRACE_EVENT_CLONE << 8))) {
 			struct tracee *child = calloc(1, sizeof(struct tracee));
 
-			ptrace(PTRACE_GETEVENTMSG, c->pid, 0, &child->proc.pid);
+			unsigned long msg;
+			ptrace(PTRACE_GETEVENTMSG, c->pid, 0, &msg);
+			child->proc.pid = msg;
 			child->proc.cb = tracer_cb;
 			ptrace(ptrace_restart, child->proc.pid, 0, 0);
 			uloop_process_add(&child->proc);
-- 
2.18.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From sojkam1 at fel.cvut.cz  Mon Jul 30 03:32:19 2018
From: sojkam1 at fel.cvut.cz (Michal Sojka)
Date: Mon, 30 Jul 2018 09:32:19 +0200
Subject: [OpenWrt-Devel] [PATCH procd 2/2] Allow disabling seccomp or
 changing the whitelist
In-Reply-To: <20180730073219.28553-1-sojkam1@fel.cvut.cz>
References: <20180730073219.28553-1-sojkam1@fel.cvut.cz>
Message-ID: <20180730073219.28553-2-sojkam1@fel.cvut.cz>

From: Michal Sojka <michal.sojka at cvut.cz>

Without this change, once a service is started with seccomp, it is
impossible to restart it without seccomp or change the whitelist file
name. This commit fixes that. Disabling seccomp is as easy as
commenting out the "procd_set_param seccomp" line in init.d script.

Signed-off-by: Michal Sojka <michal.sojka at cvut.cz>
---
 service/instance.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/service/instance.c b/service/instance.c
index 917b003..c14d348 100644
--- a/service/instance.c
+++ b/service/instance.c
@@ -637,6 +637,11 @@ instance_config_changed(struct service_instance *in, struct service_instance *in
 	if (in->respawn_timeout != in_new->respawn_timeout)
 		return true;
 
+	if ((!in->seccomp && in_new->seccomp) ||
+	    (in->seccomp && !in_new->seccomp) ||
+	    (in->seccomp && in_new->seccomp && strcmp(in->seccomp, in_new->seccomp)))
+		return true;
+
 	if (!blobmsg_list_equal(&in->limits, &in_new->limits))
 		return true;
 
@@ -957,6 +962,7 @@ instance_config_move(struct service_instance *in, struct service_instance *in_sr
 	in->respawn_timeout = in_src->respawn_timeout;
 	in->name = in_src->name;
 	in->trace = in_src->trace;
+	in->seccomp = in_src->seccomp;
 	in->node.avl.key = in_src->node.avl.key;
 
 	free(in->config);
-- 
2.18.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From hacks at slashdirt.org  Mon Jul 30 04:09:42 2018
From: hacks at slashdirt.org (Thibaut)
Date: Mon, 30 Jul 2018 10:09:42 +0200
Subject: [OpenWrt-Devel] [PATCH v2 2/4] ramips: fix RBM33G partitioning
In-Reply-To: <3da82818-856f-740c-4568-bdedc0ae5305@phrozen.org>
References: <20180729090724.8436-1-hacks@slashdirt.org>
 <20180729090724.8436-2-hacks@slashdirt.org>
 <3da82818-856f-740c-4568-bdedc0ae5305@phrozen.org>
Message-ID: <EE9D6E02-AA10-4D56-8F3B-9E26C61C4263@slashdirt.org>



> Le 30 juil. 2018 ? 08:40, John Crispin <john at phrozen.org> a ?crit :
> 
> 
> 
> On 29/07/18 11:07, Thibaut VAR?NE wrote:
>> This patch improves 5684d087418d176cfdef4e045e1950ca7ba3b09f by correcting
>> the partition scheme for the "RouterBoot" section of the flash.
>> 
>> This section is subdivided in several segments, as they are on ar71xx
>> RB devices, albeit with different offsets and sizes. The naming convention
>> from ar71xx has been preserved. The preferred 'fixed-partitions' DTS
>> node syntax is used, with nesting support as introduced in 2a598bbaa3.
>> 
>> The OEM source code also define a "RouterBootFake" partition at the
>> beginning of the secondary flash chip: to avoid trouble if OEM ever makes
>> use of that space, it is also defined here.
> 
> as discussed on IRC we concluded, that this should be done with a mtd splitter.
>     John

I?m sorry, we didn?t conclude anything, I believe you demanded it be done so.

Unfortunately, after a more careful investigation, I am now convinced this is not the right course of action. Here?s why, in my very humble opinion and limited understanding:

- this splitter will be quite intrusive in generic code (currently ? mtdsplit ? only works with ? firmware ? and ? rootfs ? named partitions)
- the bootloaders (routerboot and routerboot2) cannot be programmatically splitted: they are raw machine code without a signature
- all ramips routerboard machines share the exact same partition scheme which is different from all the ar71xx routerboard machines (which also all share the same scheme)
- if I read the OEM source code correctly, it?s likely their ARM-based boards have yet another partition scheme

Consequently, a purported splitter will be invasive and full of hardcoded numbers, making its upstream acceptance very unlikely (I anticipate the argument ? this should all be done in DTS, especially now that DTS supports nested partitions ?).

Now, I would like to hope that a correct partition scheme that uses all the OpenWRT-accepted features and follows guidelines would be more likely to be accepted in the source than the currently broken, incorrect and incomplete existing one.

Best regards,
T.
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From torbjorn.jansson at mbox200.swipnet.se  Mon Jul 30 04:30:47 2018
From: torbjorn.jansson at mbox200.swipnet.se (Torbjorn Jansson)
Date: Mon, 30 Jul 2018 10:30:47 +0200
Subject: [OpenWrt-Devel] how to add/package kernel module?
In-Reply-To: <e2a82800-6f65-1535-f31c-d1d5cef0a8d2@phrozen.org>
References: <85184f76-f727-1adf-a5af-dbbeeefb2423@mbox200.swipnet.se>
 <e2a82800-6f65-1535-f31c-d1d5cef0a8d2@phrozen.org>
Message-ID: <fe384a40-e1d1-a385-51d3-4ad6db2ef483@mbox200.swipnet.se>

On 2018-07-30 08:24, John Crispin wrote:
> 
> 
> On 27/07/18 17:26, Torbjorn Jansson wrote:
>> Hello.
>>
>> Probably over a year ago i built a rasperry pi and made a custom build of 
>> openwrt and added a small patch for myself to make module for htu21 temp and 
>> humidity sensor available.
>>
>> the patch i made i'm not sure if it is correct or not and even if it still 
>> works with all the changes that has been done but it would be nice to have 
>> the kernel module (kmod-iio-htu21) built and available as an option 
>> preferably in some future release.
>>
>> i use the htu21 kernel module with a small shell script to push the data out 
>> to an mqtt server for further handling.
>> there is probably more iio modules that could be useful to others but for now 
>> i'm happy if i can make a new version of openwrt with the kernel module added 
>> and preferably also get it included so i don't need a custom build.
>>
>>
>> below is my old patch.
>>
> 
> Patch looks ok at first glance, but there are a few formal errors, the 
> Signed-off-by is missing and the patch headline needs to be prefixed and a 
> proper description needs to be written -> https://openwrt.org/submitting-patches
> 
>  ??? John
> 

thanks, i'll take a look there.
and i will try and figure out how to get git sendmail to work, i know i had 
problems last time i used it.

i will refresh my patch and also move the module from Other to IIO sub menu 
since that's where it belongs.

one more question, in the case of htu21 it depends on another module, 
ms_sensors_i2c and as i wrote the patch they both get included in the same package.
right now i don't think any other kernel module package uses ms_sensors_i2c.
is it ok to put both modules in same package or should i make ms_sensors_i2c go 
in its own package with a dependency between them?


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From koen.vandeputte at ncentric.com  Mon Jul 30 05:46:22 2018
From: koen.vandeputte at ncentric.com (Koen Vandeputte)
Date: Mon, 30 Jul 2018 11:46:22 +0200
Subject: [OpenWrt-Devel] Multi build failures using today's master
Message-ID: <79c2f7b2-76f9-d1a3-9093-1ab8647a37a8@ncentric.com>

Hi All,

I started building today's master this morning for 7 different targets, 
and most of them failed. (some 4.9 and some 4.14 kernels)


On ar71xx (Rocket M5) :??? (Added Rafa? in CC as I noticed he worked on 
this)


touch 
/mnt/ramdisk/koen/firmware/builds/generic_rocketm/build_dir/target-mips_24kc_musl/linux-ar71xx_generic/linux-4.9.111/.configured
rm -f 
/mnt/ramdisk/koen/firmware/builds/generic_rocketm/build_dir/target-mips_24kc_musl/root-ar71xx/init
make -C 
/mnt/ramdisk/koen/firmware/builds/generic_rocketm/build_dir/target-mips_24kc_musl/linux-ar71xx_generic/linux-4.9.111 
HOSTCFLAGS="-O2 
-I/mnt/ramdisk/koen/firmware/builds/generic_rocketm/staging_dir/host/include 
-Wall -Wmissing-prototypes -Wstrict-prototypes" 
CROSS_COMPILE="mips-openwrt-linux-musl-" ARCH="mips" KBUILD_HAVE_NLS=no 
KBUILD_BUILD_USER="" KBUILD_BUILD_HOST="" KBUILD_BUILD_TIMESTAMP="Mon 
Jul 30 06:39:52 2018" KBUILD_BUILD_VERSION="0" 
HOST_LOADLIBES="-L/mnt/ramdisk/koen/firmware/builds/generic_rocketm/staging_dir/host/lib" 
CONFIG_SHELL="bash" V=''? cmd_syscalls= KERNELRELEASE=4.9.111 
CC="ccache_cc" all modules
make[5]: Entering directory 
'/mnt/ramdisk/koen/firmware/builds/generic_rocketm/build_dir/target-mips_24kc_musl/linux-ar71xx_generic/linux-4.9.111'
 ? CHK???? include/config/kernel.release
 ? CHK???? include/generated/uapi/linux/version.h
 ? CHK???? include/generated/utsrelease.h
 ? CHK???? include/generated/bounds.h
 ? CHK???? include/generated/timeconst.h
 ? CHK???? include/generated/asm-offsets.h
 ? CALL??? scripts/checksyscalls.sh
 ? CHK???? include/generated/compile.h
 ? LD????? drivers/mtd/mtd.o
 ? CC????? drivers/mtd/redboot.o
drivers/mtd/redboot.c:306:34: error: array type has incomplete element 
type 'struct of_device_id'
 ?static const struct of_device_id redboot_parser_of_match_table[] = {
 ????????????????????????????????? ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/mtd/redboot.c:307:4: error: field name not in record or union 
initializer
 ? { .compatible = "redhat,redboot-partitions" },
 ??? ^
drivers/mtd/redboot.c:307:4: note: (near initialization for 
'redboot_parser_of_match_table')
drivers/mtd/redboot.c:306:34: warning: 'redboot_parser_of_match_table' 
defined but not used [-Wunused-variable]
 ?static const struct of_device_id redboot_parser_of_match_table[] = {
 ????????????????????????????????? ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
scripts/Makefile.build:296: recipe for target 'drivers/mtd/redboot.o' failed
make[7]: *** [drivers/mtd/redboot.o] Error 1
scripts/Makefile.build:547: recipe for target 'drivers/mtd' failed
make[6]: *** [drivers/mtd] Error 2
Makefile:1006: recipe for target 'drivers' failed
make[5]: *** [drivers] Error 2
make[5]: Leaving directory 
'/mnt/ramdisk/koen/firmware/builds/generic_rocketm/build_dir/target-mips_24kc_musl/linux-ar71xx_generic/linux-4.9.111'
Makefile:24: recipe for target 
'/mnt/ramdisk/koen/firmware/builds/generic_rocketm/build_dir/target-mips_24kc_musl/linux-ar71xx_generic/linux-4.9.111/.image' 
failed
make[4]: *** 
[/mnt/ramdisk/koen/firmware/builds/generic_rocketm/build_dir/target-mips_24kc_musl/linux-ar71xx_generic/linux-4.9.111/.image] 
Error 2
make[4]: Leaving directory 
'/mnt/ramdisk/koen/firmware/builds/generic_rocketm/target/linux/ar71xx'
Makefile:13: recipe for target 'install' failed
make[3]: *** [install] Error 2
make[3]: Leaving directory 
'/mnt/ramdisk/koen/firmware/builds/generic_rocketm/target/linux'
Command exited with non-zero status 2
time: target/linux/install#2.88#1.22#8.03
target/Makefile:23: recipe for target 'target/linux/install' failed
make[2]: *** [target/linux/install] Error 2
make[2]: Leaving directory 
'/mnt/ramdisk/koen/firmware/builds/generic_rocketm'
target/Makefile:19: recipe for target 
'/mnt/ramdisk/koen/firmware/builds/generic_rocketm/staging_dir/target-mips_24kc_musl/stamp/.target_install' 
failed
make[1]: *** 
[/mnt/ramdisk/koen/firmware/builds/generic_rocketm/staging_dir/target-mips_24kc_musl/stamp/.target_install] 
Error 2
make[1]: Leaving directory 
'/mnt/ramdisk/koen/firmware/builds/generic_rocketm'
/mnt/ramdisk/koen/firmware/builds/generic_rocketm/include/toplevel.mk:216: 
recipe for target 'world' failed
make: *** [world] Error 2




On ar71xx (gl-mifi) and imx6 when using ath10k-ct:


make CONFIG_ATH10K=m CONFIG_ATH10K_PCI=m CONFIG_ATH10K_AHB=m? -C 
"/mnt/ramdisk/koen/firmware/builds/generic_glmifi/build_dir/target-mips_24kc_musl/linux-ar71xx_generic/linux-4.9.111" 
HOSTCFLAGS="-O2 
-I/mnt/ramdisk/koen/firmware/builds/generic_glmifi/staging_dir/host/include 
-I/mnt/ramdisk/koen/firmware/builds/generic_glmifi/staging_dir/hostpkg/include 
-I/mnt/ramdisk/koen/firmware/builds/generic_glmifi/staging_dir/target-mips_24kc_musl/host/include 
-Wall -Wmissing-prototypes -Wstrict-prototypes" 
CROSS_COMPILE="mips-openwrt-linux-musl-" ARCH="mips" KBUILD_HAVE_NLS=no 
KBUILD_BUILD_USER="" KBUILD_BUILD_HOST="" KBUILD_BUILD_TIMESTAMP="Mon 
Jul 30 06:39:52 2018" KBUILD_BUILD_VERSION="0" 
HOST_LOADLIBES="-L/mnt/ramdisk/koen/firmware/builds/generic_glmifi/staging_dir/host/lib" 
CONFIG_SHELL="bash" V=''? cmd_syscalls= KERNELRELEASE=4.9.111 
SUBDIRS="/mnt/ramdisk/koen/firmware/builds/generic_glmifi/build_dir/target-mips_24kc_musl/linux-ar71xx_generic/ath10k-ct-2018-05-30-127f9818/ath10k"-4.13"" 
NOSTDINC_FLAGS="-I/mnt/ramdisk/koen/firmware/builds/generic_glmifi/build_dir/target-mips_24kc_musl/linux-ar71xx_generic/ath10k-ct-2018-05-30-127f9818 
-I/mnt/ramdisk/koen/firmware/builds/generic_glmifi/staging_dir/target-mips_24kc_musl/usr/include/mac80211-backport/uapi 
-I/mnt/ramdisk/koen/firmware/builds/generic_glmifi/staging_dir/target-mips_24kc_musl/usr/include/mac80211-backport 
-I/mnt/ramdisk/koen/firmware/builds/generic_glmifi/staging_dir/target-mips_24kc_musl/usr/include/mac80211/uapi 
-I/mnt/ramdisk/koen/firmware/builds/generic_glmifi/staging_dir/target-mips_24kc_musl/usr/include/mac80211 
-include backport/autoconf.h -include backport/backport.h 
-DCONFIG_ATH10K_AHB -DSTANDALONE_CT" modules
make[4]: Entering directory 
'/mnt/ramdisk/koen/firmware/builds/generic_glmifi/build_dir/target-mips_24kc_musl/linux-ar71xx_generic/linux-4.9.111'
 ? CC [M] 
/mnt/ramdisk/koen/firmware/builds/generic_glmifi/build_dir/target-mips_24kc_musl/linux-ar71xx_generic/ath10k-ct-2018-05-30-127f9818/ath10k-4.13/wmi.o
In file included from 
/mnt/ramdisk/koen/firmware/builds/generic_glmifi/build_dir/target-mips_24kc_musl/linux-ar71xx_generic/ath10k-ct-2018-05-30-127f9818/ath10k-4.13/core.h:32:0,
 ???????????????? from 
/mnt/ramdisk/koen/firmware/builds/generic_glmifi/build_dir/target-mips_24kc_musl/linux-ar71xx_generic/ath10k-ct-2018-05-30-127f9818/ath10k-4.13/wmi.c:22:
/mnt/ramdisk/koen/firmware/builds/generic_glmifi/build_dir/target-mips_24kc_musl/linux-ar71xx_generic/ath10k-ct-2018-05-30-127f9818/ath10k-4.13/wmi.h:7088:2: 
warning: #warning Please enable ATH10K-DEBUGFS kernel option for optimal 
support for CT firmware. [-Wcpp]
 ?#warning Please enable ATH10K-DEBUGFS kernel option for optimal 
support for CT firmware.
 ? ^~~~~~~
/mnt/ramdisk/koen/firmware/builds/generic_glmifi/build_dir/target-mips_24kc_musl/linux-ar71xx_generic/ath10k-ct-2018-05-30-127f9818/ath10k-4.13/wmi.c: 
In function 'ath10k_dfs_radar_report':
/mnt/ramdisk/koen/firmware/builds/generic_glmifi/build_dir/target-mips_24kc_musl/linux-ar71xx_generic/ath10k-ct-2018-05-30-127f9818/ath10k-4.13/wmi.c:3993:7: 
error: too few arguments to function 'ar->dfs_detector->add_pulse'
 ? if (!ar->dfs_detector->add_pulse(ar->dfs_detector, &pe)) {
 ?????? ^~
scripts/Makefile.build:296: recipe for target 
'/mnt/ramdisk/koen/firmware/builds/generic_glmifi/build_dir/target-mips_24kc_musl/linux-ar71xx_generic/ath10k-ct-2018-05-30-127f9818/ath10k-4.13/wmi.o' 
failed
make[5]: *** 
[/mnt/ramdisk/koen/firmware/builds/generic_glmifi/build_dir/target-mips_24kc_musl/linux-ar71xx_generic/ath10k-ct-2018-05-30-127f9818/ath10k-4.13/wmi.o] 
Error 1
Makefile:1506: recipe for target 
'_module_/mnt/ramdisk/koen/firmware/builds/generic_glmifi/build_dir/target-mips_24kc_musl/linux-ar71xx_generic/ath10k-ct-2018-05-30-127f9818/ath10k-4.13' 
failed
make[4]: *** 
[_module_/mnt/ramdisk/koen/firmware/builds/generic_glmifi/build_dir/target-mips_24kc_musl/linux-ar71xx_generic/ath10k-ct-2018-05-30-127f9818/ath10k-4.13] 
Error 2
make[4]: Leaving directory 
'/mnt/ramdisk/koen/firmware/builds/generic_glmifi/build_dir/target-mips_24kc_musl/linux-ar71xx_generic/linux-4.9.111'
Makefile:96: recipe for target 
'/mnt/ramdisk/koen/firmware/builds/generic_glmifi/build_dir/target-mips_24kc_musl/linux-ar71xx_generic/ath10k-ct-2018-05-30-127f9818/.built' 
failed
make[3]: *** 
[/mnt/ramdisk/koen/firmware/builds/generic_glmifi/build_dir/target-mips_24kc_musl/linux-ar71xx_generic/ath10k-ct-2018-05-30-127f9818/.built] 
Error 2
make[3]: Leaving directory 
'/mnt/ramdisk/koen/firmware/builds/generic_glmifi/package/kernel/ath10k-ct'
Command exited with non-zero status 2
time: package/kernel/ath10k-ct/compile#0.76#0.29#1.65
package/Makefile:107: recipe for target 
'package/kernel/ath10k-ct/compile' failed
make[2]: *** [package/kernel/ath10k-ct/compile] Error 2
make[2]: Leaving directory 
'/mnt/ramdisk/koen/firmware/builds/generic_glmifi'
package/Makefile:103: recipe for target 
'/mnt/ramdisk/koen/firmware/builds/generic_glmifi/staging_dir/target-mips_24kc_musl/stamp/.package_compile' 
failed
make[1]: *** 
[/mnt/ramdisk/koen/firmware/builds/generic_glmifi/staging_dir/target-mips_24kc_musl/stamp/.package_compile] 
Error 2
make[1]: Leaving directory 
'/mnt/ramdisk/koen/firmware/builds/generic_glmifi'
/mnt/ramdisk/koen/firmware/builds/generic_glmifi/include/toplevel.mk:216: 
recipe for target 'world' failed
make: *** [world] Error 2



Thanks,

Koen


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From koen.vandeputte at ncentric.com  Mon Jul 30 06:18:23 2018
From: koen.vandeputte at ncentric.com (Koen Vandeputte)
Date: Mon, 30 Jul 2018 12:18:23 +0200
Subject: [OpenWrt-Devel] Multi build failures using today's master
In-Reply-To: <79c2f7b2-76f9-d1a3-9093-1ab8647a37a8@ncentric.com>
References: <79c2f7b2-76f9-d1a3-9093-1ab8647a37a8@ncentric.com>
Message-ID: <5a8839b9-494f-a414-5661-34d7cefd55d9@ncentric.com>



On 2018-07-30 11:46, Koen Vandeputte wrote:
> Hi All,
>
> I started building today's master this morning for 7 different 
> targets, and most of them failed. (some 4.9 and some 4.14 kernels)
>
>
> On ar71xx (Rocket M5) :??? (Added Rafa? in CC as I noticed he worked 
> on this)
>
>
> touch 
> /mnt/ramdisk/koen/firmware/builds/generic_rocketm/build_dir/target-mips_24kc_musl/linux-ar71xx_generic/linux-4.9.111/.configured
> rm -f 
> /mnt/ramdisk/koen/firmware/builds/generic_rocketm/build_dir/target-mips_24kc_musl/root-ar71xx/init
> make -C 
> /mnt/ramdisk/koen/firmware/builds/generic_rocketm/build_dir/target-mips_24kc_musl/linux-ar71xx_generic/linux-4.9.111 
> HOSTCFLAGS="-O2 
> -I/mnt/ramdisk/koen/firmware/builds/generic_rocketm/staging_dir/host/include 
> -Wall -Wmissing-prototypes -Wstrict-prototypes" 
> CROSS_COMPILE="mips-openwrt-linux-musl-" ARCH="mips" 
> KBUILD_HAVE_NLS=no KBUILD_BUILD_USER="" KBUILD_BUILD_HOST="" 
> KBUILD_BUILD_TIMESTAMP="Mon Jul 30 06:39:52 2018" 
> KBUILD_BUILD_VERSION="0" 
> HOST_LOADLIBES="-L/mnt/ramdisk/koen/firmware/builds/generic_rocketm/staging_dir/host/lib" 
> CONFIG_SHELL="bash" V=''? cmd_syscalls= KERNELRELEASE=4.9.111 
> CC="ccache_cc" all modules
> make[5]: Entering directory 
> '/mnt/ramdisk/koen/firmware/builds/generic_rocketm/build_dir/target-mips_24kc_musl/linux-ar71xx_generic/linux-4.9.111'
> ? CHK???? include/config/kernel.release
> ? CHK???? include/generated/uapi/linux/version.h
> ? CHK???? include/generated/utsrelease.h
> ? CHK???? include/generated/bounds.h
> ? CHK???? include/generated/timeconst.h
> ? CHK???? include/generated/asm-offsets.h
> ? CALL??? scripts/checksyscalls.sh
> ? CHK???? include/generated/compile.h
> ? LD????? drivers/mtd/mtd.o
> ? CC????? drivers/mtd/redboot.o
> drivers/mtd/redboot.c:306:34: error: array type has incomplete element 
> type 'struct of_device_id'
> ?static const struct of_device_id redboot_parser_of_match_table[] = {
> ????????????????????????????????? ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/mtd/redboot.c:307:4: error: field name not in record or union 
> initializer
> ? { .compatible = "redhat,redboot-partitions" },
> ??? ^
> drivers/mtd/redboot.c:307:4: note: (near initialization for 
> 'redboot_parser_of_match_table')
> drivers/mtd/redboot.c:306:34: warning: 'redboot_parser_of_match_table' 
> defined but not used [-Wunused-variable]
> ?static const struct of_device_id redboot_parser_of_match_table[] = {
> ????????????????????????????????? ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> scripts/Makefile.build:296: recipe for target 'drivers/mtd/redboot.o' 
> failed
> make[7]: *** [drivers/mtd/redboot.o] Error 1
> scripts/Makefile.build:547: recipe for target 'drivers/mtd' failed
> make[6]: *** [drivers/mtd] Error 2
> Makefile:1006: recipe for target 'drivers' failed
> make[5]: *** [drivers] Error 2
> make[5]: Leaving directory 
> '/mnt/ramdisk/koen/firmware/builds/generic_rocketm/build_dir/target-mips_24kc_musl/linux-ar71xx_generic/linux-4.9.111'
> Makefile:24: recipe for target 
> '/mnt/ramdisk/koen/firmware/builds/generic_rocketm/build_dir/target-mips_24kc_musl/linux-ar71xx_generic/linux-4.9.111/.image' 
> failed
> make[4]: *** 
> [/mnt/ramdisk/koen/firmware/builds/generic_rocketm/build_dir/target-mips_24kc_musl/linux-ar71xx_generic/linux-4.9.111/.image] 
> Error 2
> make[4]: Leaving directory 
> '/mnt/ramdisk/koen/firmware/builds/generic_rocketm/target/linux/ar71xx'
> Makefile:13: recipe for target 'install' failed
> make[3]: *** [install] Error 2
> make[3]: Leaving directory 
> '/mnt/ramdisk/koen/firmware/builds/generic_rocketm/target/linux'
> Command exited with non-zero status 2
> time: target/linux/install#2.88#1.22#8.03
> target/Makefile:23: recipe for target 'target/linux/install' failed
> make[2]: *** [target/linux/install] Error 2
> make[2]: Leaving directory 
> '/mnt/ramdisk/koen/firmware/builds/generic_rocketm'
> target/Makefile:19: recipe for target 
> '/mnt/ramdisk/koen/firmware/builds/generic_rocketm/staging_dir/target-mips_24kc_musl/stamp/.target_install' 
> failed
> make[1]: *** 
> [/mnt/ramdisk/koen/firmware/builds/generic_rocketm/staging_dir/target-mips_24kc_musl/stamp/.target_install] 
> Error 2
> make[1]: Leaving directory 
> '/mnt/ramdisk/koen/firmware/builds/generic_rocketm'
> /mnt/ramdisk/koen/firmware/builds/generic_rocketm/include/toplevel.mk:216: 
> recipe for target 'world' failed
> make: *** [world] Error 2
>
>
>
>
> On ar71xx (gl-mifi) and imx6 when using ath10k-ct:
>
>
> make CONFIG_ATH10K=m CONFIG_ATH10K_PCI=m CONFIG_ATH10K_AHB=m? -C 
> "/mnt/ramdisk/koen/firmware/builds/generic_glmifi/build_dir/target-mips_24kc_musl/linux-ar71xx_generic/linux-4.9.111" 
> HOSTCFLAGS="-O2 
> -I/mnt/ramdisk/koen/firmware/builds/generic_glmifi/staging_dir/host/include 
> -I/mnt/ramdisk/koen/firmware/builds/generic_glmifi/staging_dir/hostpkg/include 
> -I/mnt/ramdisk/koen/firmware/builds/generic_glmifi/staging_dir/target-mips_24kc_musl/host/include 
> -Wall -Wmissing-prototypes -Wstrict-prototypes" 
> CROSS_COMPILE="mips-openwrt-linux-musl-" ARCH="mips" 
> KBUILD_HAVE_NLS=no KBUILD_BUILD_USER="" KBUILD_BUILD_HOST="" 
> KBUILD_BUILD_TIMESTAMP="Mon Jul 30 06:39:52 2018" 
> KBUILD_BUILD_VERSION="0" 
> HOST_LOADLIBES="-L/mnt/ramdisk/koen/firmware/builds/generic_glmifi/staging_dir/host/lib" 
> CONFIG_SHELL="bash" V=''? cmd_syscalls= KERNELRELEASE=4.9.111 
> SUBDIRS="/mnt/ramdisk/koen/firmware/builds/generic_glmifi/build_dir/target-mips_24kc_musl/linux-ar71xx_generic/ath10k-ct-2018-05-30-127f9818/ath10k"-4.13"" 
> NOSTDINC_FLAGS="-I/mnt/ramdisk/koen/firmware/builds/generic_glmifi/build_dir/target-mips_24kc_musl/linux-ar71xx_generic/ath10k-ct-2018-05-30-127f9818 
> -I/mnt/ramdisk/koen/firmware/builds/generic_glmifi/staging_dir/target-mips_24kc_musl/usr/include/mac80211-backport/uapi 
> -I/mnt/ramdisk/koen/firmware/builds/generic_glmifi/staging_dir/target-mips_24kc_musl/usr/include/mac80211-backport 
> -I/mnt/ramdisk/koen/firmware/builds/generic_glmifi/staging_dir/target-mips_24kc_musl/usr/include/mac80211/uapi 
> -I/mnt/ramdisk/koen/firmware/builds/generic_glmifi/staging_dir/target-mips_24kc_musl/usr/include/mac80211 
> -include backport/autoconf.h -include backport/backport.h 
> -DCONFIG_ATH10K_AHB -DSTANDALONE_CT" modules
> make[4]: Entering directory 
> '/mnt/ramdisk/koen/firmware/builds/generic_glmifi/build_dir/target-mips_24kc_musl/linux-ar71xx_generic/linux-4.9.111'
> ? CC [M] 
> /mnt/ramdisk/koen/firmware/builds/generic_glmifi/build_dir/target-mips_24kc_musl/linux-ar71xx_generic/ath10k-ct-2018-05-30-127f9818/ath10k-4.13/wmi.o
> In file included from 
> /mnt/ramdisk/koen/firmware/builds/generic_glmifi/build_dir/target-mips_24kc_musl/linux-ar71xx_generic/ath10k-ct-2018-05-30-127f9818/ath10k-4.13/core.h:32:0,
> ???????????????? from 
> /mnt/ramdisk/koen/firmware/builds/generic_glmifi/build_dir/target-mips_24kc_musl/linux-ar71xx_generic/ath10k-ct-2018-05-30-127f9818/ath10k-4.13/wmi.c:22:
> /mnt/ramdisk/koen/firmware/builds/generic_glmifi/build_dir/target-mips_24kc_musl/linux-ar71xx_generic/ath10k-ct-2018-05-30-127f9818/ath10k-4.13/wmi.h:7088:2: 
> warning: #warning Please enable ATH10K-DEBUGFS kernel option for 
> optimal support for CT firmware. [-Wcpp]
> ?#warning Please enable ATH10K-DEBUGFS kernel option for optimal 
> support for CT firmware.
> ? ^~~~~~~
> /mnt/ramdisk/koen/firmware/builds/generic_glmifi/build_dir/target-mips_24kc_musl/linux-ar71xx_generic/ath10k-ct-2018-05-30-127f9818/ath10k-4.13/wmi.c: 
> In function 'ath10k_dfs_radar_report':
> /mnt/ramdisk/koen/firmware/builds/generic_glmifi/build_dir/target-mips_24kc_musl/linux-ar71xx_generic/ath10k-ct-2018-05-30-127f9818/ath10k-4.13/wmi.c:3993:7: 
> error: too few arguments to function 'ar->dfs_detector->add_pulse'
> ? if (!ar->dfs_detector->add_pulse(ar->dfs_detector, &pe)) {
> ?????? ^~
> scripts/Makefile.build:296: recipe for target 
> '/mnt/ramdisk/koen/firmware/builds/generic_glmifi/build_dir/target-mips_24kc_musl/linux-ar71xx_generic/ath10k-ct-2018-05-30-127f9818/ath10k-4.13/wmi.o' 
> failed
> make[5]: *** 
> [/mnt/ramdisk/koen/firmware/builds/generic_glmifi/build_dir/target-mips_24kc_musl/linux-ar71xx_generic/ath10k-ct-2018-05-30-127f9818/ath10k-4.13/wmi.o] 
> Error 1
> Makefile:1506: recipe for target 
> '_module_/mnt/ramdisk/koen/firmware/builds/generic_glmifi/build_dir/target-mips_24kc_musl/linux-ar71xx_generic/ath10k-ct-2018-05-30-127f9818/ath10k-4.13' 
> failed
> make[4]: *** 
> [_module_/mnt/ramdisk/koen/firmware/builds/generic_glmifi/build_dir/target-mips_24kc_musl/linux-ar71xx_generic/ath10k-ct-2018-05-30-127f9818/ath10k-4.13] 
> Error 2
> make[4]: Leaving directory 
> '/mnt/ramdisk/koen/firmware/builds/generic_glmifi/build_dir/target-mips_24kc_musl/linux-ar71xx_generic/linux-4.9.111'
> Makefile:96: recipe for target 
> '/mnt/ramdisk/koen/firmware/builds/generic_glmifi/build_dir/target-mips_24kc_musl/linux-ar71xx_generic/ath10k-ct-2018-05-30-127f9818/.built' 
> failed
> make[3]: *** 
> [/mnt/ramdisk/koen/firmware/builds/generic_glmifi/build_dir/target-mips_24kc_musl/linux-ar71xx_generic/ath10k-ct-2018-05-30-127f9818/.built] 
> Error 2
> make[3]: Leaving directory 
> '/mnt/ramdisk/koen/firmware/builds/generic_glmifi/package/kernel/ath10k-ct'
> Command exited with non-zero status 2
> time: package/kernel/ath10k-ct/compile#0.76#0.29#1.65
> package/Makefile:107: recipe for target 
> 'package/kernel/ath10k-ct/compile' failed
> make[2]: *** [package/kernel/ath10k-ct/compile] Error 2
> make[2]: Leaving directory 
> '/mnt/ramdisk/koen/firmware/builds/generic_glmifi'
> package/Makefile:103: recipe for target 
> '/mnt/ramdisk/koen/firmware/builds/generic_glmifi/staging_dir/target-mips_24kc_musl/stamp/.package_compile' 
> failed
> make[1]: *** 
> [/mnt/ramdisk/koen/firmware/builds/generic_glmifi/staging_dir/target-mips_24kc_musl/stamp/.package_compile] 
> Error 2
> make[1]: Leaving directory 
> '/mnt/ramdisk/koen/firmware/builds/generic_glmifi'
> /mnt/ramdisk/koen/firmware/builds/generic_glmifi/include/toplevel.mk:216: 
> recipe for target 'world' failed
> make: *** [world] Error 2
>
>
Caused by "2dcd955aea (mac80211: backport and update patches for 
ath10k)" which updates regular ath10k, but not the CT flavor.
Reverting it fixes ath10k-ct build.


>
> Thanks,
>
> Koen
>


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From jo at mein.io  Mon Jul 30 06:30:07 2018
From: jo at mein.io (Jo-Philipp Wich)
Date: Mon, 30 Jul 2018 12:30:07 +0200
Subject: [OpenWrt-Devel] Disclaimer for user documentation?
In-Reply-To: <3BB2CBCA-2039-4BC7-989A-140EFBAB8111@gmx.net>
References: <3BB2CBCA-2039-4BC7-989A-140EFBAB8111@gmx.net>
Message-ID: <1e0e29a8-114a-f533-0f6e-46fd1de22974@mein.io>

Hi,

maybe it would make sense to copy one of the standard boilerplate
liability remarks from one of the OSS licenses and put that as generic
statement into the wiki footer.

Example from Apache 2.0:

"Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied."

or MIT (sorry for the all-caps, I lazily copy-pasted):

"THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE."

or GPL 3:

"THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM ?AS IS? WITHOUT
WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF
THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR
CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES
ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT
NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES
SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE
WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN
ADVISED OF THE POSSIBILITY OF SUCH DAMAGES."



My personal approach would be picking one of these, swapping "software"
with "documentation" and put that in fine print into the wiki footer,
somewhere next to the license remark.

Having this is yellow warning banner on top of every documentation
article seems like overkill to me and would like detract users from the
actual content of the documentation.

My 2cents,
Jo

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From MRuchko at advantech-bb.com  Mon Jul 30 07:43:55 2018
From: MRuchko at advantech-bb.com (Maksym Ruchko)
Date: Mon, 30 Jul 2018 11:43:55 +0000
Subject: [OpenWrt-Devel] Disclaimer for user documentation?
In-Reply-To: <1e0e29a8-114a-f533-0f6e-46fd1de22974@mein.io>
References: <3BB2CBCA-2039-4BC7-989A-140EFBAB8111@gmx.net>
 <1e0e29a8-114a-f533-0f6e-46fd1de22974@mein.io>
Message-ID: <HK2PR0201MB2132DB5AD08422E75F5C1C369B2F0@HK2PR0201MB2132.apcprd02.prod.outlook.com>

There are few documentation specific licenses with disclaimers, you might consider those:

1. CC license
Documentation/books/images are often published under some variant of Creative Commons license.
For example Wikipedia uses CreativeCommons Attribution - ShareAlike variant

https://creativecommons.org/licenses/by/4.0/legalcode
The disclaimer there reads (probably needs to be adjusted for a OpenWRT wiki to clarify terms used):
Section 5 ? Disclaimer of Warranties and Limitation of Liability.

Unless otherwise separately undertaken by the Licensor, to the extent possible, the Licensor offers the Licensed Material as-is and as-available, and makes no representations or warranties of any kind concerning the Licensed Material, whether express, implied, statutory, or other. This includes, without limitation, warranties of title, merchantability, fitness for a particular purpose, non-infringement, absence of latent or other defects, accuracy, or the presence or absence of errors, whether or not known or discoverable. Where disclaimers of warranties are not allowed in full or in part, this disclaimer may not apply to You.
To the extent possible, in no event will the Licensor be liable to You on any legal theory (including, without limitation, negligence) or otherwise for any direct, special, indirect, incidental, consequential, punitive, exemplary, or other losses, costs, expenses, or damages arising out of this Public License or use of the Licensed Material, even if the Licensor has been advised of the possibility of such losses, costs, expenses, or damages. Where a limitation of liability is not allowed in full or in part, this limitation may not apply to You.
The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability.

2. FreeBSD documentation license
The FreeBSD documentation license - simpler to digest, do not about quality from lawyer point of view:
https://www.freebsd.org/copyright/freebsd-doc-license.html

THIS DOCUMENTATION IS PROVIDED BY THE FREEBSD DOCUMENTATION PROJECT "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FREEBSD DOCUMENTATION PROJECT BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS DOCUMENTATION, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Maksym
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From bjorn at mork.no  Mon Jul 30 08:19:12 2018
From: bjorn at mork.no (=?utf-8?Q?Bj=C3=B8rn_Mork?=)
Date: Mon, 30 Jul 2018 14:19:12 +0200
Subject: [OpenWrt-Devel] Second RGMII ethernet on MT7621?
In-Reply-To: <413e93f6-7cb3-bf94-7332-754fdd3cc3e5@mbox200.swipnet.se>
 (Torbjorn Jansson's message of "Sun, 29 Jul 2018 13:39:40 +0200")
References: <87y3h4zkou.fsf@miraculix.mork.no>
 <cf9b4a54-b91a-bb3c-1a89-8a0a65c00969@phrozen.org>
 <87tvrrznla.fsf@miraculix.mork.no>
 <413e93f6-7cb3-bf94-7332-754fdd3cc3e5@mbox200.swipnet.se>
Message-ID: <87zhy8sypr.fsf@miraculix.mork.no>

Torbjorn Jansson <torbjorn.jansson at mbox200.swipnet.se> writes:
> On 2018-05-01 12:17, Bj?rn Mork wrote:
>> John Crispin <john at phrozen.org> writes:
>>
>>> making gmac2 work s not trivial with the current driver.
>>
>> Thanks for confirming.  Then I guess I can just wrap up what I have and
>> make it public.  Just want to figure out how the LEDs are connected
>> first. Bootloader initiated blinking patterns are persistent, so I'm
>> guessing some I2C(?) connected controller.  Or something..
>>
>>> however making the upstream mtk_eth_soc driver work on mt7621 is
>>> pretty easy i think and will give you dual gmac support. upstream only
>>> supports mt7623 arm atm. its been on my todo list for a while but i
>>> simply have not been able to find the 2-3 days required to make it
>>> work.
>>
>> I wish I could help. But I have enough self-insight to realize that it
>> is way beyond my capabilities, after a quick look at the driver.
>>
>>
>> Bj?rn
>
> sorry for reviving old mail thread but just out of curiosity, will
> this help the ubiquiti edgerouter x sfp with getting the sfp port
> working too?
> it is also an mt7621.

I would guess yes.  But I might be wrong.  I am not sure I understand
the high level block diagrams I've seen correctly.

My understanding is that the MT7621 has 2 CPU GMACs, a 7 port switch, 5
PHYs and 1 set of RGMII pads.  The first GMAC is always connected to the
switch. The second GMAC can be connected either to the switch or to the
RGMII pads.  If this is correct then I would assume that a design with
an SFP cage would use some external PHY with SERDES, connected to the
second GMAC using the RGMII pads.

But it would be good to have someone with a clue confirm or refute
this...

The WiFi extender I am having trouble with (ZyXEL WAP6805 - similar to
the WAP6806) has an RGMII connected Quantenna 5Ghz module.  My
assumption is that this module is connected to the RGMII pads on the
MT7621 and that I need support for the second GMAC to get it running.
The Quantenna module loads its firmware using TFTP in the OEM firmware.

I note that forum user Thirsty has had some success using the mainline
MT7623 driver to enable both GMACs:
https://forum.lede-project.org/t/er-x-sfp-sfp-eth5-port-has-link-state-led-lit-but-swconfig-says-link-port-5-link-down/4608/70

but this currently implies DSA, so it's not exactly plug-and-play with
OpenWrt.  I haven't tried it myself yet.

Bj?rn

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From openwrt-devel at lists.openwrt.org  Mon Jul 30 08:27:44 2018
From: openwrt-devel at lists.openwrt.org (Eneas U de Queiroz via openwrt-devel)
Date: Mon, 30 Jul 2018 12:27:44 +0000
Subject: [OpenWrt-Devel] [PATCH 0/1] libevent2: Don't build tests and samples
Message-ID: <mailman.13730.1532953663.25356.openwrt-devel@lists.openwrt.org>

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.
-------------- next part --------------
An embedded message was scrubbed...
From: Eneas U de Queiroz <cote2004-github at yahoo.com>
Subject: [PATCH 0/1] libevent2: Don't build tests and samples
Date: Mon, 30 Jul 2018 09:26:54 -0300
Size: 4105
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20180730/f1d9a351/attachment.eml>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From openwrt-devel at lists.openwrt.org  Mon Jul 30 08:27:52 2018
From: openwrt-devel at lists.openwrt.org (Eneas U de Queiroz via openwrt-devel)
Date: Mon, 30 Jul 2018 12:27:52 +0000
Subject: [OpenWrt-Devel] [PATCH 1/1] libevent2: Don't build tests and samples
In-Reply-To: <20180730122655.21731-1-cote2004-github@yahoo.com>
References: <20180730122655.21731-1-cote2004-github@yahoo.com>
Message-ID: <mailman.13731.1532953666.25356.openwrt-devel@lists.openwrt.org>

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.
-------------- next part --------------
An embedded message was scrubbed...
From: Eneas U de Queiroz <cote2004-github at yahoo.com>
Subject: [PATCH 1/1] libevent2: Don't build tests and samples
Date: Mon, 30 Jul 2018 09:26:55 -0300
Size: 4479
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20180730/519a93e4/attachment.eml>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From zajec5 at gmail.com  Mon Jul 30 08:55:43 2018
From: zajec5 at gmail.com (=?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?=)
Date: Mon, 30 Jul 2018 14:55:43 +0200
Subject: [OpenWrt-Devel] Multi build failures using today's master
In-Reply-To: <79c2f7b2-76f9-d1a3-9093-1ab8647a37a8@ncentric.com>
References: <79c2f7b2-76f9-d1a3-9093-1ab8647a37a8@ncentric.com>
Message-ID: <CACna6rxy+bc_N=xuLU4hL=5YY18gQCLRK6mBZyxuOUDoHmwfEg@mail.gmail.com>

On Mon, 30 Jul 2018 at 11:46, Koen Vandeputte
<koen.vandeputte at ncentric.com> wrote:
> I started building today's master this morning for 7 different targets,
> and most of them failed. (some 4.9 and some 4.14 kernels)
>
>
> On ar71xx (Rocket M5) :    (Added Rafa? in CC as I noticed he worked on
> this)

a3d2448fae54 ("kernel: add missing include to redboot.c")
https://git.openwrt.org/?p=openwrt/openwrt.git;a=commitdiff;h=a3d2448fae5499356a31d71585a812ac65e7a39a

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From jo at mein.io  Mon Jul 30 09:05:54 2018
From: jo at mein.io (Jo-Philipp Wich)
Date: Mon, 30 Jul 2018 15:05:54 +0200
Subject: [OpenWrt-Devel] Multi build failures using today's master
In-Reply-To: <79c2f7b2-76f9-d1a3-9093-1ab8647a37a8@ncentric.com>
References: <79c2f7b2-76f9-d1a3-9093-1ab8647a37a8@ncentric.com>
Message-ID: <048bf235-d5d2-fb23-6493-c2965e0fb957@mein.io>

Hi Koen,

> In function 'ath10k_dfs_radar_report':
> /mnt/ramdisk/koen/firmware/builds/generic_glmifi/build_dir/target-mips_24kc_musl/linux-ar71xx_generic/ath10k-ct-2018-05-30-127f9818/ath10k-4.13/wmi.c:3993:7:
> error: too few arguments to function 'ar->dfs_detector->add_pulse'
> ? if (!ar->dfs_detector->add_pulse(ar->dfs_detector, &pe)) {
> ?????? ^~

3083962dd4 ("ath10k-ct: fix build with current mac80211 package")
https://git.openwrt.org/?p=openwrt/openwrt.git;a=commitdiff;h=3083962dd409360059199753bb465427c667daf5


~ Jo

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From torbjorn.jansson at mbox200.swipnet.se  Mon Jul 30 09:59:20 2018
From: torbjorn.jansson at mbox200.swipnet.se (=?UTF-8?q?Torbj=C3=B6rn=20Jansson?=)
Date: Mon, 30 Jul 2018 15:59:20 +0200
Subject: [OpenWrt-Devel] [PATCH] kernel: add kmod-iio-htu21
Message-ID: <20180730135920.1554914-1-torbjorn.jansson@mbox200.swipnet.se>

This adds support for the htu21 humidity and temperature sensor.

To get it to work you have to do something like this:
echo "htu21 0x40" >/sys/class/i2c-dev/i2c-1/device/new_device
for example by adding it to rc.local

Compile tested on brcm2708 and I have used an earlier version of this
patch for more than a year.

Signed-off-by: Torbj?rn Jansson <torbjorn.jansson at mbox200.swipnet.se>
---
 package/kernel/linux/modules/iio.mk | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/package/kernel/linux/modules/iio.mk b/package/kernel/linux/modules/iio.mk
index c35ccca1bb..a1410170db 100644
--- a/package/kernel/linux/modules/iio.mk
+++ b/package/kernel/linux/modules/iio.mk
@@ -133,3 +133,25 @@ define KernelPackage/iio-bmp280-spi/description
 endef
 
 $(eval $(call KernelPackage,iio-bmp280-spi))
+
+define KernelPackage/iio-htu21
+  SUBMENU:=$(IIO_MENU)
+  DEPENDS:=+kmod-i2c-core +kmod-iio-core
+  TITLE:=HTU21 humidity & temperature sensor
+  KCONFIG:= \
+       CONFIG_HTU21 \
+       CONFIG_IIO_MS_SENSORS_I2C
+  FILES:= \
+       $(LINUX_DIR)/drivers/iio/humidity/htu21.ko \
+       $(LINUX_DIR)/drivers/iio/common/ms_sensors/ms_sensors_i2c.ko
+  AUTOLOAD:=$(call AutoLoad,56,htu21)
+endef
+
+define KernelPackage/iio-htu21/description
+ support for the Measurement Specialties HTU21 humidity and
+ temperature sensor.
+ This driver is also used for MS8607 temperature, pressure & humidity
+ sensor
+endef
+
+$(eval $(call KernelPackage,iio-htu21))
-- 
2.14.4


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From ardeleanalex at gmail.com  Mon Jul 30 10:03:18 2018
From: ardeleanalex at gmail.com (Alexandru Ardelean)
Date: Mon, 30 Jul 2018 17:03:18 +0300
Subject: [OpenWrt-Devel] [PATCH] wolfssl: remove myself as maintainer
Message-ID: <20180730140318.22033-1-ardeleanalex@gmail.com>

I no longer have the time, nor the desire to maintain this package.
Remove myself as maintainer.

Signed-off-by: Alexandru Ardelean <ardeleanalex at gmail.com>
---
 package/libs/wolfssl/Makefile | 1 -
 1 file changed, 1 deletion(-)

diff --git a/package/libs/wolfssl/Makefile b/package/libs/wolfssl/Makefile
index e08b6f3929..87ce9328e7 100644
--- a/package/libs/wolfssl/Makefile
+++ b/package/libs/wolfssl/Makefile
@@ -40,7 +40,6 @@ define Package/libwolfssl
   CATEGORY:=Libraries
   TITLE:=wolfSSL library
   URL:=http://www.wolfssl.com/
-  MAINTAINER:=Alexandru Ardelean <ardeleanalex at gmail.com>
   MENU:=1
   PROVIDES:=libcyassl
 endef
-- 
2.17.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From mkroken at gmail.com  Mon Jul 30 10:24:27 2018
From: mkroken at gmail.com (Magnus Kroken)
Date: Mon, 30 Jul 2018 16:24:27 +0200
Subject: [OpenWrt-Devel] Disclaimer for user documentation?
In-Reply-To: <1e0e29a8-114a-f533-0f6e-46fd1de22974@mein.io>
References: <3BB2CBCA-2039-4BC7-989A-140EFBAB8111@gmx.net>
 <1e0e29a8-114a-f533-0f6e-46fd1de22974@mein.io>
Message-ID: <CABcCvvS79w4bu_MGkUqaR_6KNpV3WjeCyw6S9BpNTVLvQzdL5Q@mail.gmail.com>

Hi

2018-07-30 12:30 GMT+02:00 Jo-Philipp Wich <jo at mein.io>:
> My personal approach would be picking one of these, swapping "software"
> with "documentation" and put that in fine print into the wiki footer,
> somewhere next to the license remark.
>
> Having this is yellow warning banner on top of every documentation
> article seems like overkill to me and would like detract users from the
> actual content of the documentation.

I too find this a more reasonable approach. Disclaimers are a
clarification of expectations, they do not necessarily cause an actual
shift in liability, so let's not sacrifice too much usability. Not all
legal rights can be waived by agreement/contract, a disclaimer can
only really disclaim what the surrounding legal systems allow it to
disclaim.

In addition to inserting one of the suggested examples into the
footer, it would probably also be useful to clarify that the wiki (and
project in general) is created by individuals with common interests,
and that not all content is necessarily reviewed or contributors
competency is verified -- something along the lines of what these
paragraphs from Wikipedias About page try to express.

"Wikipedia is an online open-content collaborative encyclopedia; that
is, a voluntary association of individuals and groups working to
develop a common resource of human knowledge. The structure of the
project allows anyone with an Internet connection to alter its
content. Please be advised that nothing found here has necessarily
been reviewed by people with the expertise required to provide you
with complete, accurate or reliable information.

That is not to say that you will not find valuable and accurate
information in Wikipedia; much of the time you will. However,
Wikipedia cannot guarantee the validity of the information found here.
The content of any given article may recently have been changed,
vandalized or altered by someone whose opinion does not correspond
with the state of knowledge in the relevant fields. Note that most
other encyclopedias and reference works also have disclaimers."


> My 2cents,
> Jo

Regards,
/Magnus

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From koen.vandeputte at ncentric.com  Mon Jul 30 10:34:44 2018
From: koen.vandeputte at ncentric.com (Koen Vandeputte)
Date: Mon, 30 Jul 2018 16:34:44 +0200
Subject: [OpenWrt-Devel] cns3xxx + gcc8 = compile error
Message-ID: <9ccb4c84-291e-2864-b883-b2ef85484043@ncentric.com>

Hi Syrone,
Hi Felix,

I've just been playing around validating some archs using GCC 8.


Using this version on cns3xxx target shows following error:


make[2]: Entering directory 
'/home/kvdp/firmware/builds/generic_cns3xxx/scripts/config'
make[2]: Leaving directory 
'/home/kvdp/firmware/builds/generic_cns3xxx/scripts/config'
make[1]: Entering directory '/home/kvdp/firmware/builds/generic_cns3xxx'
make[2]: Entering directory '/home/kvdp/firmware/builds/generic_cns3xxx'
make[3]: Entering directory 
'/home/kvdp/firmware/builds/generic_cns3xxx/target/linux'
make[4]: Entering directory 
'/home/kvdp/firmware/builds/generic_cns3xxx/target/linux/cns3xxx'
rm -f 
/home/kvdp/firmware/builds/generic_cns3xxx/build_dir/target-arm_mpcore+vfp_musl_eabi/linux-cns3xxx/linux-4.14.54/localversion
/home/kvdp/firmware/builds/generic_cns3xxx/scripts/kconfig.pl? + 
/home/kvdp/firmware/builds/generic_cns3xxx/target/linux/generic/config-4.14 
/home/kvdp/firmware/builds/generic_cns3xxx/target/linux/cns3xxx/config-4.14 
 > 
/home/kvdp/firmware/builds/generic_cns3xxx/build_dir/target-arm_mpcore+vfp_musl_eabi/linux-cns3xxx/linux-4.14.54/.config.target
awk 
'/^(#[[:space:]]+)?CONFIG_KERNEL/{sub("CONFIG_KERNEL_","CONFIG_");print}' 
/home/kvdp/firmware/builds/generic_cns3xxx/.config >> 
/home/kvdp/firmware/builds/generic_cns3xxx/build_dir/target-arm_mpcore+vfp_musl_eabi/linux-cns3xxx/linux-4.14.54/.config.target
echo "# CONFIG_KALLSYMS_EXTRA_PASS is not set" >> 
/home/kvdp/firmware/builds/generic_cns3xxx/build_dir/target-arm_mpcore+vfp_musl_eabi/linux-cns3xxx/linux-4.14.54/.config.target
echo "# CONFIG_KALLSYMS_ALL is not set" >> 
/home/kvdp/firmware/builds/generic_cns3xxx/build_dir/target-arm_mpcore+vfp_musl_eabi/linux-cns3xxx/linux-4.14.54/.config.target
echo "CONFIG_KALLSYMS_UNCOMPRESSED=y" >> 
/home/kvdp/firmware/builds/generic_cns3xxx/build_dir/target-arm_mpcore+vfp_musl_eabi/linux-cns3xxx/linux-4.14.54/.config.target
/home/kvdp/firmware/builds/generic_cns3xxx/scripts/package-metadata.pl 
kconfig /home/kvdp/firmware/builds/generic_cns3xxx/tmp/.packageinfo 
/home/kvdp/firmware/builds/generic_cns3xxx/.config 4.14 > 
/home/kvdp/firmware/builds/generic_cns3xxx/build_dir/target-arm_mpcore+vfp_musl_eabi/linux-cns3xxx/linux-4.14.54/.config.override
/home/kvdp/firmware/builds/generic_cns3xxx/scripts/kconfig.pl 'm+' '+' 
/home/kvdp/firmware/builds/generic_cns3xxx/build_dir/target-arm_mpcore+vfp_musl_eabi/linux-cns3xxx/linux-4.14.54/.config.target 
/dev/null 
/home/kvdp/firmware/builds/generic_cns3xxx/build_dir/target-arm_mpcore+vfp_musl_eabi/linux-cns3xxx/linux-4.14.54/.config.override 
 > 
/home/kvdp/firmware/builds/generic_cns3xxx/build_dir/target-arm_mpcore+vfp_musl_eabi/linux-cns3xxx/linux-4.14.54/.config.set
mv 
/home/kvdp/firmware/builds/generic_cns3xxx/build_dir/target-arm_mpcore+vfp_musl_eabi/linux-cns3xxx/linux-4.14.54/.config.set 
/home/kvdp/firmware/builds/generic_cns3xxx/build_dir/target-arm_mpcore+vfp_musl_eabi/linux-cns3xxx/linux-4.14.54/.config.old
grep -v INITRAMFS 
/home/kvdp/firmware/builds/generic_cns3xxx/build_dir/target-arm_mpcore+vfp_musl_eabi/linux-cns3xxx/linux-4.14.54/.config.old 
 > 
/home/kvdp/firmware/builds/generic_cns3xxx/build_dir/target-arm_mpcore+vfp_musl_eabi/linux-cns3xxx/linux-4.14.54/.config.set
echo 'CONFIG_INITRAMFS_SOURCE=""' >> 
/home/kvdp/firmware/builds/generic_cns3xxx/build_dir/target-arm_mpcore+vfp_musl_eabi/linux-cns3xxx/linux-4.14.54/.config.set
echo '# CONFIG_INITRAMFS_FORCE is not set' >> 
/home/kvdp/firmware/builds/generic_cns3xxx/build_dir/target-arm_mpcore+vfp_musl_eabi/linux-cns3xxx/linux-4.14.54/.config.set
rm -rf 
/home/kvdp/firmware/builds/generic_cns3xxx/build_dir/target-arm_mpcore+vfp_musl_eabi/linux-cns3xxx/modules
cmp -s 
/home/kvdp/firmware/builds/generic_cns3xxx/build_dir/target-arm_mpcore+vfp_musl_eabi/linux-cns3xxx/linux-4.14.54/.config.set 
/home/kvdp/firmware/builds/generic_cns3xxx/build_dir/target-arm_mpcore+vfp_musl_eabi/linux-cns3xxx/linux-4.14.54/.config.prev 
|| { cp 
/home/kvdp/firmware/builds/generic_cns3xxx/build_dir/target-arm_mpcore+vfp_musl_eabi/linux-cns3xxx/linux-4.14.54/.config.set 
/home/kvdp/firmware/builds/generic_cns3xxx/build_dir/target-arm_mpcore+vfp_musl_eabi/linux-cns3xxx/linux-4.14.54/.config; 
cp 
/home/kvdp/firmware/builds/generic_cns3xxx/build_dir/target-arm_mpcore+vfp_musl_eabi/linux-cns3xxx/linux-4.14.54/.config.set 
/home/kvdp/firmware/builds/generic_cns3xxx/build_dir/target-arm_mpcore+vfp_musl_eabi/linux-cns3xxx/linux-4.14.54/.config.prev; 
}
export MAKEFLAGS= ; [ -d 
/home/kvdp/firmware/builds/generic_cns3xxx/build_dir/target-arm_mpcore+vfp_musl_eabi/linux-cns3xxx/linux-4.14.54/user_headers 
] || make -C 
/home/kvdp/firmware/builds/generic_cns3xxx/build_dir/target-arm_mpcore+vfp_musl_eabi/linux-cns3xxx/linux-4.14.54 
HOSTCFLAGS="-O2 
-I/home/kvdp/firmware/builds/generic_cns3xxx/staging_dir/host/include 
-Wall -Wmissing-prototypes -Wstrict-prototypes" 
CROSS_COMPILE="arm-openwrt-linux-muslgnueabi-" ARCH="arm" 
KBUILD_HAVE_NLS=no KBUILD_BUILD_USER="" KBUILD_BUILD_HOST="" 
KBUILD_BUILD_TIMESTAMP="Mon Jul 30 13:19:16 2018" 
KBUILD_BUILD_VERSION="0" 
HOST_LOADLIBES="-L/home/kvdp/firmware/builds/generic_cns3xxx/staging_dir/host/lib" 
CONFIG_SHELL="bash" V=''? cmd_syscalls= KERNELRELEASE=4.14.54 
CC="ccache_cc" 
INSTALL_HDR_PATH=/home/kvdp/firmware/builds/generic_cns3xxx/build_dir/target-arm_mpcore+vfp_musl_eabi/linux-cns3xxx/linux-4.14.54/user_headers 
headers_install
grep '=[ym]' 
/home/kvdp/firmware/builds/generic_cns3xxx/build_dir/target-arm_mpcore+vfp_musl_eabi/linux-cns3xxx/linux-4.14.54/.config.set 
| LC_ALL=C sort | mkhash md5 > 
/home/kvdp/firmware/builds/generic_cns3xxx/build_dir/target-arm_mpcore+vfp_musl_eabi/linux-cns3xxx/linux-4.14.54/.vermagic
touch 
/home/kvdp/firmware/builds/generic_cns3xxx/build_dir/target-arm_mpcore+vfp_musl_eabi/linux-cns3xxx/linux-4.14.54/.configured
rm -f 
/home/kvdp/firmware/builds/generic_cns3xxx/build_dir/target-arm_mpcore+vfp_musl_eabi/linux-cns3xxx/linux-4.14.54/vmlinux 
/home/kvdp/firmware/builds/generic_cns3xxx/build_dir/target-arm_mpcore+vfp_musl_eabi/linux-cns3xxx/linux-4.14.54/System.map
make -C 
/home/kvdp/firmware/builds/generic_cns3xxx/build_dir/target-arm_mpcore+vfp_musl_eabi/linux-cns3xxx/linux-4.14.54 
HOSTCFLAGS="-O2 
-I/home/kvdp/firmware/builds/generic_cns3xxx/staging_dir/host/include 
-Wall -Wmissing-prototypes -Wstrict-prototypes" 
CROSS_COMPILE="arm-openwrt-linux-muslgnueabi-" ARCH="arm" 
KBUILD_HAVE_NLS=no KBUILD_BUILD_USER="" KBUILD_BUILD_HOST="" 
KBUILD_BUILD_TIMESTAMP="Mon Jul 30 13:19:16 2018" 
KBUILD_BUILD_VERSION="0" 
HOST_LOADLIBES="-L/home/kvdp/firmware/builds/generic_cns3xxx/staging_dir/host/lib" 
CONFIG_SHELL="bash" V=''? cmd_syscalls= KERNELRELEASE=4.14.54 
CC="ccache_cc" modules
make[5]: Entering directory 
'/home/kvdp/firmware/builds/generic_cns3xxx/build_dir/target-arm_mpcore+vfp_musl_eabi/linux-cns3xxx/linux-4.14.54'
 ? CHK???? include/config/kernel.release
 ? CHK???? include/generated/uapi/linux/version.h
 ? CHK???? include/generated/utsrelease.h
 ? CHK???? include/generated/bounds.h
 ? CHK???? include/generated/timeconst.h
 ? CHK???? include/generated/asm-offsets.h
 ? CALL??? scripts/checksyscalls.sh
 ? CHK???? scripts/mod/devicetable-offsets.h
 ? CC [M]? fs/mbcache.o
/home/kvdp/firmware/builds/generic_cns3xxx/tmp/ccuGhaLZ.s: Assembler 
messages:
/home/kvdp/firmware/builds/generic_cns3xxx/tmp/ccuGhaLZ.s:401: Error: 
selected processor does not support `sev' in ARM mode
/home/kvdp/firmware/builds/generic_cns3xxx/tmp/ccuGhaLZ.s:597: Error: 
selected processor does not support `ldrex r3,[r8]' in ARM mode
/home/kvdp/firmware/builds/generic_cns3xxx/tmp/ccuGhaLZ.s:599: Error: 
selected processor does not support `strex r2,r3,[r8]' in ARM mode
/home/kvdp/firmware/builds/generic_cns3xxx/tmp/ccuGhaLZ.s:655: Error: 
selected processor does not support `ldrex r3,[r8]' in ARM mode
/home/kvdp/firmware/builds/generic_cns3xxx/tmp/ccuGhaLZ.s:657: Error: 
selected processor does not support `strex r2,r3,[r8]' in ARM mode
/home/kvdp/firmware/builds/generic_cns3xxx/tmp/ccuGhaLZ.s:795: Error: 
selected processor does not support `sev' in ARM mode
/home/kvdp/firmware/builds/generic_cns3xxx/tmp/ccuGhaLZ.s:1434: Error: 
selected processor does not support `ldrex r2,[r3]' in ARM mode
/home/kvdp/firmware/builds/generic_cns3xxx/tmp/ccuGhaLZ.s:1436: Error: 
selected processor does not support `strex r1,r2,[r3]' in ARM mode
/home/kvdp/firmware/builds/generic_cns3xxx/tmp/ccuGhaLZ.s:1489: Error: 
selected processor does not support `sev' in ARM mode
/home/kvdp/firmware/builds/generic_cns3xxx/tmp/ccuGhaLZ.s:1700: Error: 
selected processor does not support `ldrex r1,[r2]' in ARM mode
/home/kvdp/firmware/builds/generic_cns3xxx/tmp/ccuGhaLZ.s:1702: Error: 
selected processor does not support `strex r0,r1,[r2]' in ARM mode
/home/kvdp/firmware/builds/generic_cns3xxx/tmp/ccuGhaLZ.s:1788: Error: 
selected processor does not support `ldrex r2,[r3]' in ARM mode
/home/kvdp/firmware/builds/generic_cns3xxx/tmp/ccuGhaLZ.s:1790: Error: 
selected processor does not support `strex r1,r2,[r3]' in ARM mode
/home/kvdp/firmware/builds/generic_cns3xxx/tmp/ccuGhaLZ.s:2038: Error: 
selected processor does not support `ldrex r1,[r2]' in ARM mode
/home/kvdp/firmware/builds/generic_cns3xxx/tmp/ccuGhaLZ.s:2040: Error: 
selected processor does not support `strex r0,r1,[r2]' in ARM mode
/home/kvdp/firmware/builds/generic_cns3xxx/tmp/ccuGhaLZ.s:2470: Error: 
selected processor does not support `ldrex r2,[r3]' in ARM mode
/home/kvdp/firmware/builds/generic_cns3xxx/tmp/ccuGhaLZ.s:2472: Error: 
selected processor does not support `strex r0,r2,[r3]' in ARM mode
/home/kvdp/firmware/builds/generic_cns3xxx/tmp/ccuGhaLZ.s:2522: Error: 
selected processor does not support `sev' in ARM mode
/home/kvdp/firmware/builds/generic_cns3xxx/tmp/ccuGhaLZ.s:2570: Error: 
selected processor does not support `ldrex r0,[r3]' in ARM mode
/home/kvdp/firmware/builds/generic_cns3xxx/tmp/ccuGhaLZ.s:2572: Error: 
selected processor does not support `strex ip,r0,[r3]' in ARM mode
/home/kvdp/firmware/builds/generic_cns3xxx/tmp/ccuGhaLZ.s:3106: Error: 
selected processor does not support `ldrex r3,[r4]' in ARM mode
/home/kvdp/firmware/builds/generic_cns3xxx/tmp/ccuGhaLZ.s:3108: Error: 
selected processor does not support `strex r2,r3,[r4]' in ARM mode
/home/kvdp/firmware/builds/generic_cns3xxx/tmp/ccuGhaLZ.s:3263: Error: 
selected processor does not support `ldrex r3,[r4]' in ARM mode
/home/kvdp/firmware/builds/generic_cns3xxx/tmp/ccuGhaLZ.s:3265: Error: 
selected processor does not support `strex r2,r3,[r4]' in ARM mode
scripts/Makefile.build:334: recipe for target 'fs/mbcache.o' failed
make[6]: *** [fs/mbcache.o] Error 1
Makefile:1034: recipe for target 'fs' failed
make[5]: *** [fs] Error 2
make[5]: Leaving directory 
'/home/kvdp/firmware/builds/generic_cns3xxx/build_dir/target-arm_mpcore+vfp_musl_eabi/linux-cns3xxx/linux-4.14.54'
Makefile:30: recipe for target 
'/home/kvdp/firmware/builds/generic_cns3xxx/build_dir/target-arm_mpcore+vfp_musl_eabi/linux-cns3xxx/linux-4.14.54/.modules' 
failed
make[4]: *** 
[/home/kvdp/firmware/builds/generic_cns3xxx/build_dir/target-arm_mpcore+vfp_musl_eabi/linux-cns3xxx/linux-4.14.54/.modules] 
Error 2
make[4]: Leaving directory 
'/home/kvdp/firmware/builds/generic_cns3xxx/target/linux/cns3xxx'
Makefile:13: recipe for target 'compile' failed
make[3]: *** [compile] Error 2
make[3]: Leaving directory 
'/home/kvdp/firmware/builds/generic_cns3xxx/target/linux'
Command exited with non-zero status 2
time: target/linux/compile#1.10#0.42#1.49
target/Makefile:23: recipe for target 'target/linux/compile' failed
make[2]: *** [target/linux/compile] Error 2
make[2]: Leaving directory '/home/kvdp/firmware/builds/generic_cns3xxx'
target/Makefile:18: recipe for target 
'/home/kvdp/firmware/builds/generic_cns3xxx/staging_dir/target-arm_mpcore+vfp_musl_eabi/stamp/.target_compile' 
failed
make[1]: *** 
[/home/kvdp/firmware/builds/generic_cns3xxx/staging_dir/target-arm_mpcore+vfp_musl_eabi/stamp/.target_compile] 
Error 2
make[1]: Leaving directory '/home/kvdp/firmware/builds/generic_cns3xxx'
/home/kvdp/firmware/builds/generic_cns3xxx/include/toplevel.mk:216: 
recipe for target 'world' failed
make: *** [world] Error 2



Any idea?

Thanks,

Koen

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From koen.vandeputte at ncentric.com  Mon Jul 30 10:37:02 2018
From: koen.vandeputte at ncentric.com (Koen Vandeputte)
Date: Mon, 30 Jul 2018 16:37:02 +0200
Subject: [OpenWrt-Devel] Multi build failures using today's master
In-Reply-To: <CACna6rxy+bc_N=xuLU4hL=5YY18gQCLRK6mBZyxuOUDoHmwfEg@mail.gmail.com>
References: <79c2f7b2-76f9-d1a3-9093-1ab8647a37a8@ncentric.com>
 <CACna6rxy+bc_N=xuLU4hL=5YY18gQCLRK6mBZyxuOUDoHmwfEg@mail.gmail.com>
Message-ID: <238bfae4-70ea-2dbc-9a27-6c5c64a58561@ncentric.com>



On 2018-07-30 14:55, Rafa? Mi?ecki wrote:
> On Mon, 30 Jul 2018 at 11:46, Koen Vandeputte
> <koen.vandeputte at ncentric.com> wrote:
>> I started building today's master this morning for 7 different targets,
>> and most of them failed. (some 4.9 and some 4.14 kernels)
>>
>>
>> On ar71xx (Rocket M5) :    (Added Rafa? in CC as I noticed he worked on
>> this)
> a3d2448fae54 ("kernel: add missing include to redboot.c")
> https://git.openwrt.org/?p=openwrt/openwrt.git;a=commitdiff;h=a3d2448fae5499356a31d71585a812ac65e7a39a
I can confirm it's fixed.

Thanks!

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From koen.vandeputte at ncentric.com  Mon Jul 30 10:37:22 2018
From: koen.vandeputte at ncentric.com (Koen Vandeputte)
Date: Mon, 30 Jul 2018 16:37:22 +0200
Subject: [OpenWrt-Devel] Multi build failures using today's master
In-Reply-To: <048bf235-d5d2-fb23-6493-c2965e0fb957@mein.io>
References: <79c2f7b2-76f9-d1a3-9093-1ab8647a37a8@ncentric.com>
 <048bf235-d5d2-fb23-6493-c2965e0fb957@mein.io>
Message-ID: <b24b5808-62e0-317a-1a88-7aa8f443c2d7@ncentric.com>



On 2018-07-30 15:05, Jo-Philipp Wich wrote:
> Hi Koen,
>
>> In function 'ath10k_dfs_radar_report':
>> /mnt/ramdisk/koen/firmware/builds/generic_glmifi/build_dir/target-mips_24kc_musl/linux-ar71xx_generic/ath10k-ct-2018-05-30-127f9818/ath10k-4.13/wmi.c:3993:7:
>> error: too few arguments to function 'ar->dfs_detector->add_pulse'
>>  ? if (!ar->dfs_detector->add_pulse(ar->dfs_detector, &pe)) {
>>  ?????? ^~
> 3083962dd4 ("ath10k-ct: fix build with current mac80211 package")
> https://git.openwrt.org/?p=openwrt/openwrt.git;a=commitdiff;h=3083962dd409360059199753bb465427c667daf5
>
>
I can confirm it's fixed.

Thanks!

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From hacks at slashdirt.org  Mon Jul 30 11:37:40 2018
From: hacks at slashdirt.org (=?UTF-8?q?Thibaut=20VAR=C3=88NE?=)
Date: Mon, 30 Jul 2018 17:37:40 +0200
Subject: [OpenWrt-Devel] [PATCH] [18.06] ar71xx: define switch for
 rb-952ui-5ac2nd
Message-ID: <20180730153740.10878-1-hacks@slashdirt.org>

QCA9533 built-in switch can be configured

Tested-by: Thibaut VAR?NE <hacks at slashdirt.org>
Signed-off-by: Thibaut VAR?NE <hacks at slashdirt.org>
---
 target/linux/ar71xx/base-files/etc/board.d/02_network | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/linux/ar71xx/base-files/etc/board.d/02_network b/target/linux/ar71xx/base-files/etc/board.d/02_network
index b0076366bc..f650b4cd04 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/02_network
+++ b/target/linux/ar71xx/base-files/etc/board.d/02_network
@@ -169,7 +169,6 @@ ar71xx_setup_interfaces()
 	pb42|\
 	pb44|\
 	rb-951ui-2hnd|\
-	rb-952ui-5ac2nd|\
 	routerstation|\
 	tl-wr710n|\
 	tl-wr720n-v3|\
@@ -182,7 +181,8 @@ ar71xx_setup_interfaces()
 	rb-750-r2|\
 	rb-750p-pbr2|\
 	rb-750up-r2|\
-	rb-951ui-2nd)
+	rb-951ui-2nd|\
+	rb-952ui-5ac2nd)
 		ucidef_set_interfaces_lan_wan "eth1.1" "eth0"
 		ucidef_add_switch "switch0" \
 			"0 at eth1" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1"
-- 
2.13.6 (Apple Git-96)


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From john at phrozen.org  Mon Jul 30 11:57:56 2018
From: john at phrozen.org (John Crispin)
Date: Mon, 30 Jul 2018 17:57:56 +0200
Subject: [OpenWrt-Devel] [PATCH] [18.06] ar71xx: define switch for
 rb-952ui-5ac2nd
In-Reply-To: <20180730153740.10878-1-hacks@slashdirt.org>
References: <20180730153740.10878-1-hacks@slashdirt.org>
Message-ID: <d8bddbd4-3043-c3c7-d131-be09a721e915@phrozen.org>



On 30/07/18 17:37, Thibaut VAR?NE wrote:
> QCA9533 built-in switch can be configured

is this a backport ? if so, please reference the master commit hash.
 ??? John
>
> Tested-by: Thibaut VAR?NE <hacks at slashdirt.org>
> Signed-off-by: Thibaut VAR?NE <hacks at slashdirt.org>
> ---
>   target/linux/ar71xx/base-files/etc/board.d/02_network | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/target/linux/ar71xx/base-files/etc/board.d/02_network b/target/linux/ar71xx/base-files/etc/board.d/02_network
> index b0076366bc..f650b4cd04 100755
> --- a/target/linux/ar71xx/base-files/etc/board.d/02_network
> +++ b/target/linux/ar71xx/base-files/etc/board.d/02_network
> @@ -169,7 +169,6 @@ ar71xx_setup_interfaces()
>   	pb42|\
>   	pb44|\
>   	rb-951ui-2hnd|\
> -	rb-952ui-5ac2nd|\
>   	routerstation|\
>   	tl-wr710n|\
>   	tl-wr720n-v3|\
> @@ -182,7 +181,8 @@ ar71xx_setup_interfaces()
>   	rb-750-r2|\
>   	rb-750p-pbr2|\
>   	rb-750up-r2|\
> -	rb-951ui-2nd)
> +	rb-951ui-2nd|\
> +	rb-952ui-5ac2nd)
>   		ucidef_set_interfaces_lan_wan "eth1.1" "eth0"
>   		ucidef_add_switch "switch0" \
>   			"0 at eth1" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1"


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From cshored at thecshore.com  Mon Jul 30 12:12:21 2018
From: cshored at thecshore.com (Daniel F. Dickinson)
Date: Mon, 30 Jul 2018 12:12:21 -0400
Subject: [OpenWrt-Devel] [PATCH v2 2/4] ramips: fix RBM33G partitioning
In-Reply-To: <EE9D6E02-AA10-4D56-8F3B-9E26C61C4263@slashdirt.org>
References: <20180729090724.8436-1-hacks@slashdirt.org>
 <20180729090724.8436-2-hacks@slashdirt.org>
 <3da82818-856f-740c-4568-bdedc0ae5305@phrozen.org>
 <EE9D6E02-AA10-4D56-8F3B-9E26C61C4263@slashdirt.org>
Message-ID: <deef2ae2-41df-2a2c-439d-ce78af841efb@thecshore.com>

On 2018-07-30 04:09 AM, Thibaut wrote:
> 
> 
>> Le 30 juil. 2018 ? 08:40, John Crispin <john at phrozen.org> a ?crit :
>>
>>
>>
>> On 29/07/18 11:07, Thibaut VAR?NE wrote:
>>> This patch improves 5684d087418d176cfdef4e045e1950ca7ba3b09f by correcting
>>> the partition scheme for the "RouterBoot" section of the flash.
>>>
>>> This section is subdivided in several segments, as they are on ar71xx
>>> RB devices, albeit with different offsets and sizes. The naming convention
>>> from ar71xx has been preserved. The preferred 'fixed-partitions' DTS
>>> node syntax is used, with nesting support as introduced in 2a598bbaa3.
>>>
>>> The OEM source code also define a "RouterBootFake" partition at the
>>> beginning of the secondary flash chip: to avoid trouble if OEM ever makes
>>> use of that space, it is also defined here.
>>
>> as discussed on IRC we concluded, that this should be done with a mtd splitter.
>>     John
> 
> I?m sorry, we didn?t conclude anything, I believe you demanded it be done so.
> 
> Unfortunately, after a more careful investigation, I am now convinced this is not the right course of action. Here?s why, in my very humble opinion and limited understanding:
> 
> - this splitter will be quite intrusive in generic code (currently ? mtdsplit ? only works with ? firmware ? and ? rootfs ? named partitions)
> - the bootloaders (routerboot and routerboot2) cannot be programmatically splitted: they are raw machine code without a signature
> - all ramips routerboard machines share the exact same partition scheme which is different from all the ar71xx routerboard machines (which also all share the same scheme)
> - if I read the OEM source code correctly, it?s likely their ARM-based boards have yet another partition scheme
> 
> Consequently, a purported splitter will be invasive and full of hardcoded numbers, making its upstream acceptance very unlikely (I anticipate the argument ? this should all be done in DTS, especially now that DTS supports nested partitions ?).
> 
> Now, I would like to hope that a correct partition scheme that uses all the OpenWRT-accepted features and follows guidelines would be more likely to be accepted in the source than the currently broken, incorrect and incomplete existing one.
> 

I'm not sure but I think
https://github.com/openwrt/openwrt/commit/2a598bbaa3f75b7051c2453a6ccf706191cf2153
(kernel: backport mtd support for subpartitions in DT) might be of use
here...

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From openwrt-devel at lists.openwrt.org  Mon Jul 30 13:09:32 2018
From: openwrt-devel at lists.openwrt.org (Eneas U de Queiroz via openwrt-devel)
Date: Mon, 30 Jul 2018 17:09:32 +0000
Subject: [OpenWrt-Devel] [PATCH] ustream-ssl: mbedtls: use chacha-poly
 ciphersuites
Message-ID: <mailman.13809.1532970571.25356.openwrt-devel@lists.openwrt.org>

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.
-------------- next part --------------
An embedded message was scrubbed...
From: Eneas U de Queiroz <cote2004-github at yahoo.com>
Subject: [PATCH] ustream-ssl: mbedtls: use chacha-poly ciphersuites
Date: Mon, 30 Jul 2018 14:08:46 -0300
Size: 4758
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20180730/496e48b4/attachment.eml>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From daniel at makrotopia.org  Mon Jul 30 15:04:13 2018
From: daniel at makrotopia.org (Daniel Golle)
Date: Mon, 30 Jul 2018 21:04:13 +0200
Subject: [OpenWrt-Devel] [PATCH] kernel/generic: (try) fixing MAP-E
 patch misbehaving in 4.0
In-Reply-To: <14987AFE-609C-4E77-B12E-819D90DE981E@cgws.de>
References: <20150329200545.GA13007@makrotopia.org>
 <7a0b483c-253b-b249-8b0f-93f74aabfb73@cgws.de>
 <20180523181844.GA20065@makrotopia.org>
 <14987AFE-609C-4E77-B12E-819D90DE981E@cgws.de>
Message-ID: <20180730190411.GA9015@makrotopia.org>

Hi Axel,

Can you make a pull-request towards gh.com/openwrt/openwrt (master)?
We can then backport this to 18.06, so it's a bit urgent.

Cheers

Daniel

On Thu, May 24, 2018 at 08:17:23PM +0200, Axel Neumann wrote:
> I meanwhile created another patch in a openwrt fork at github here 
> https://github.com/axn/openwrt/commit/8ea3fc4f808fe5e9aef50d082bd19095a3113750
> that should be more clean (
> there is a branch for for-master and for openwrt-18.06 branch).
>  But we want to do a few more tests before opening a pull request. Comments are welcome anyway. /axel
> 
> Am 23. Mai 2018 20:18:46 MESZ schrieb Daniel Golle <daniel at makrotopia.org>:
> >Hi Axel,
> >Hi Steven,
> >
> >revisiting your patch, I try to understand what we need to fix here
> >or if the issue has already been resolved in the meantime.
> >See below:
> >
> >On Fri, Feb 09, 2018 at 01:20:53PM +0100, Axel Neumann wrote:
> >> Hello,
> >> 
> >> the 666 kernel patches [1,2,3] break the possibility for using an
> >ip4ip6
> >> tunnel interface as a fall back interface accepting ip4-in-ip6
> >tunneled
> >> packets from any remote address. This works out of the box with any
> >> normal (non-666-patched) 4.4 (and earlier) kernel and can be
> >configured
> >> by setting up an 'ip -6 tunnel' with type 'any' or 'ip4ip6' and a
> >remote
> >> address of '::'.
> >> 
> >> The misbehavior comes with line 290 of [3] which discards all packets
> >> that do not show the expected saddr, even if no single fmr rule was
> >> defined and despite the validity of the saddr was already approved
> >earlier.
> >> 
> >> Attached diff would re-enable this fall back capability without
> >> affecting the behavior in case of any configured FMR rules.
> >> 
> >> It would be nice if the proposed or a similar fix could be applied
> >asap
> >> because currently I see no way of recovering the standard kernel
> >> behavior which breaks certain desired bmx6 and bmx7 tunneling
> >features.
> >> 
> >> Best regards
> >> /axel
> >> 
> >> 
> >> [1]
> >>
> >https://github.com/openwrt-mirror/openwrt/blob/master/target/linux/generic/patches-3.18/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch
> >> [2]
> >>
> >https://github.com/openwrt-mirror/openwrt/blob/master/target/linux/generic/patches-4.1/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch
> >> [3]
> >>
> >https://github.com/openwrt-mirror/openwrt/blob/master/target/linux/generic/patches-4.4/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch#L290
> >> 
> >
> >The patch below is supposedly applied to net/ipv6/ip6_tunnel.c after
> >666-Add-support-for-MAP-E-FMRs-mesh-mode.patch has been applied, right?
> >
> >> 1032c1032
> >> < 				if (fmr) {
> >> ---
> >> > 				if (fmr)
> >> 1036,1039c1036,1038
> >> < 					if (!ipv6_addr_equal(&ipv6h->saddr, &expected)) {
> >> < 						rcu_read_unlock();
> >> < 						goto discard;
> >> < 					}
> >> ---
> >> > 				if (!ipv6_addr_equal(&ipv6h->saddr, &expected)) {
> >> > 					rcu_read_unlock();
> >> > 					goto discard;
> >
> >The original hunk in 666-Add-support-for-MAP-E-FMRs-mesh-mode.patch
> >looks like this
> >
> >---
> >@@ -832,6 +950,27 @@ static int __ip6_tnl_rcv(struct ip6_tnl
> > 	skb_reset_network_header(skb);
> > 	memset(skb->cb, 0, sizeof(struct inet6_skb_parm));
> > 
> >+	if (tpi->proto == htons(ETH_P_IP) &&
> >+		!ipv6_addr_equal(&ipv6h->saddr, &tunnel->parms.raddr)) {
> >+			/* Packet didn't come from BR, so lookup FMR */
> >+			struct __ip6_tnl_fmr *fmr;
> >+			struct in6_addr expected = tunnel->parms.raddr;
> >+			for (fmr = tunnel->parms.fmrs; fmr; fmr = fmr->next)
> >+				if (ipv6_prefix_equal(&ipv6h->saddr,
> >+					&fmr->ip6_prefix, fmr->ip6_prefix_len))
> >+						break;
> >+
> >+			/* Check that IPv6 matches IPv4 source to prevent spoofing */
> >+			if (fmr)
> >+				ip4ip6_fmr_calc(&expected, ip_hdr(skb),
> >+						skb_tail_pointer(skb), fmr, false);
> >+
> >+			if (!ipv6_addr_equal(&ipv6h->saddr, &expected)) {
> >+				rcu_read_unlock();
> >+				goto drop;
> >+			}
> >+	}
> >+
> > 	__skb_tunnel_rx(skb, tunnel->dev, tunnel->net);
> > 
> > 	err = dscp_ecn_decapsulate(tunnel, ipv6h, skb);
> >---
> >
> >Reading this it is obvious that yout patch can be reverse-applied to
> >ip6_tunnel.c after 666-Add-support-for-MAP-E-FMRs-mesh-mode.patch has
> >been applied. As the MAP-E patch apparently hasn't been touched for
> >quite a while I assume that it must have looked the same at the time
> >when you sent the patch and you just used diff in a slightly
> >counter-intuitive way...
> >
> >Just to make things crystal clear:
> >You are suggesting to change the patch above to rather be like:
> >---
> >@@ -832,6 +951,28 @@ static int __ip6_tnl_rcv(struct ip6_tnl
> > 	skb_reset_network_header(skb);
> > 	memset(skb->cb, 0, sizeof(struct inet6_skb_parm));
> > 
> >+	if (tpi->proto == htons(ETH_P_IP) &&
> >+		!ipv6_addr_equal(&ipv6h->saddr, &tunnel->parms.raddr)) {
> >+			/* Packet didn't come from BR, so lookup FMR */
> >+			struct __ip6_tnl_fmr *fmr;
> >+			struct in6_addr expected = tunnel->parms.raddr;
> >+			for (fmr = tunnel->parms.fmrs; fmr; fmr = fmr->next)
> >+				if (ipv6_prefix_equal(&ipv6h->saddr,
> >+					&fmr->ip6_prefix, fmr->ip6_prefix_len))
> >+						break;
> >+
> >+			/* Check that IPv6 matches IPv4 source to prevent spoofing */
> >+			if (fmr) {
> >+				ip4ip6_fmr_calc(&expected, ip_hdr(skb),
> >+						skb_tail_pointer(skb), fmr, false);
> >+
> >+				if (!ipv6_addr_equal(&ipv6h->saddr, &expected)) {
> >+					rcu_read_unlock();
> >+					goto drop;
> >+				}
> >+			}
> >+	}
> >+
> > 	__skb_tunnel_rx(skb, tunnel->dev, tunnel->net);
> > 
> > 	err = dscp_ecn_decapsulate(tunnel, ipv6h, skb);
> >---
> >
> >Please confirm that this was your original intention, so we can move
> >forward with the discussion and this is an IPv6 show-stopper for
> >LibreMesh as well...
> >
> >
> >Cheers
> >
> >
> >Daniel
> >
> >_______________________________________________
> >openwrt-devel mailing list
> >openwrt-devel at lists.openwrt.org
> >http://lists.infradead.org/mailman/listinfo/openwrt-devel
> 
> -- 
> Diese Nachricht wurde von meinem Android-Ger?t mit K-9 Mail gesendet.

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From daniel at makrotopia.org  Mon Jul 30 15:04:13 2018
From: daniel at makrotopia.org (Daniel Golle)
Date: Mon, 30 Jul 2018 21:04:13 +0200
Subject: [OpenWrt-Devel] [PATCH] kernel/generic: (try) fixing MAP-E
 patch misbehaving in 4.0
In-Reply-To: <14987AFE-609C-4E77-B12E-819D90DE981E@cgws.de>
References: <20150329200545.GA13007@makrotopia.org>
 <7a0b483c-253b-b249-8b0f-93f74aabfb73@cgws.de>
 <20180523181844.GA20065@makrotopia.org>
 <14987AFE-609C-4E77-B12E-819D90DE981E@cgws.de>
Message-ID: <20180730190411.GA9015@makrotopia.org>

Hi Axel,

Can you make a pull-request towards gh.com/openwrt/openwrt (master)?
We can then backport this to 18.06, so it's a bit urgent.

Cheers

Daniel

On Thu, May 24, 2018 at 08:17:23PM +0200, Axel Neumann wrote:
> I meanwhile created another patch in a openwrt fork at github here 
> https://github.com/axn/openwrt/commit/8ea3fc4f808fe5e9aef50d082bd19095a3113750
> that should be more clean (
> there is a branch for for-master and for openwrt-18.06 branch).
>  But we want to do a few more tests before opening a pull request. Comments are welcome anyway. /axel
> 
> Am 23. Mai 2018 20:18:46 MESZ schrieb Daniel Golle <daniel at makrotopia.org>:
> >Hi Axel,
> >Hi Steven,
> >
> >revisiting your patch, I try to understand what we need to fix here
> >or if the issue has already been resolved in the meantime.
> >See below:
> >
> >On Fri, Feb 09, 2018 at 01:20:53PM +0100, Axel Neumann wrote:
> >> Hello,
> >> 
> >> the 666 kernel patches [1,2,3] break the possibility for using an
> >ip4ip6
> >> tunnel interface as a fall back interface accepting ip4-in-ip6
> >tunneled
> >> packets from any remote address. This works out of the box with any
> >> normal (non-666-patched) 4.4 (and earlier) kernel and can be
> >configured
> >> by setting up an 'ip -6 tunnel' with type 'any' or 'ip4ip6' and a
> >remote
> >> address of '::'.
> >> 
> >> The misbehavior comes with line 290 of [3] which discards all packets
> >> that do not show the expected saddr, even if no single fmr rule was
> >> defined and despite the validity of the saddr was already approved
> >earlier.
> >> 
> >> Attached diff would re-enable this fall back capability without
> >> affecting the behavior in case of any configured FMR rules.
> >> 
> >> It would be nice if the proposed or a similar fix could be applied
> >asap
> >> because currently I see no way of recovering the standard kernel
> >> behavior which breaks certain desired bmx6 and bmx7 tunneling
> >features.
> >> 
> >> Best regards
> >> /axel
> >> 
> >> 
> >> [1]
> >>
> >https://github.com/openwrt-mirror/openwrt/blob/master/target/linux/generic/patches-3.18/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch
> >> [2]
> >>
> >https://github.com/openwrt-mirror/openwrt/blob/master/target/linux/generic/patches-4.1/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch
> >> [3]
> >>
> >https://github.com/openwrt-mirror/openwrt/blob/master/target/linux/generic/patches-4.4/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch#L290
> >> 
> >
> >The patch below is supposedly applied to net/ipv6/ip6_tunnel.c after
> >666-Add-support-for-MAP-E-FMRs-mesh-mode.patch has been applied, right?
> >
> >> 1032c1032
> >> < 				if (fmr) {
> >> ---
> >> > 				if (fmr)
> >> 1036,1039c1036,1038
> >> < 					if (!ipv6_addr_equal(&ipv6h->saddr, &expected)) {
> >> < 						rcu_read_unlock();
> >> < 						goto discard;
> >> < 					}
> >> ---
> >> > 				if (!ipv6_addr_equal(&ipv6h->saddr, &expected)) {
> >> > 					rcu_read_unlock();
> >> > 					goto discard;
> >
> >The original hunk in 666-Add-support-for-MAP-E-FMRs-mesh-mode.patch
> >looks like this
> >
> >---
> >@@ -832,6 +950,27 @@ static int __ip6_tnl_rcv(struct ip6_tnl
> > 	skb_reset_network_header(skb);
> > 	memset(skb->cb, 0, sizeof(struct inet6_skb_parm));
> > 
> >+	if (tpi->proto == htons(ETH_P_IP) &&
> >+		!ipv6_addr_equal(&ipv6h->saddr, &tunnel->parms.raddr)) {
> >+			/* Packet didn't come from BR, so lookup FMR */
> >+			struct __ip6_tnl_fmr *fmr;
> >+			struct in6_addr expected = tunnel->parms.raddr;
> >+			for (fmr = tunnel->parms.fmrs; fmr; fmr = fmr->next)
> >+				if (ipv6_prefix_equal(&ipv6h->saddr,
> >+					&fmr->ip6_prefix, fmr->ip6_prefix_len))
> >+						break;
> >+
> >+			/* Check that IPv6 matches IPv4 source to prevent spoofing */
> >+			if (fmr)
> >+				ip4ip6_fmr_calc(&expected, ip_hdr(skb),
> >+						skb_tail_pointer(skb), fmr, false);
> >+
> >+			if (!ipv6_addr_equal(&ipv6h->saddr, &expected)) {
> >+				rcu_read_unlock();
> >+				goto drop;
> >+			}
> >+	}
> >+
> > 	__skb_tunnel_rx(skb, tunnel->dev, tunnel->net);
> > 
> > 	err = dscp_ecn_decapsulate(tunnel, ipv6h, skb);
> >---
> >
> >Reading this it is obvious that yout patch can be reverse-applied to
> >ip6_tunnel.c after 666-Add-support-for-MAP-E-FMRs-mesh-mode.patch has
> >been applied. As the MAP-E patch apparently hasn't been touched for
> >quite a while I assume that it must have looked the same at the time
> >when you sent the patch and you just used diff in a slightly
> >counter-intuitive way...
> >
> >Just to make things crystal clear:
> >You are suggesting to change the patch above to rather be like:
> >---
> >@@ -832,6 +951,28 @@ static int __ip6_tnl_rcv(struct ip6_tnl
> > 	skb_reset_network_header(skb);
> > 	memset(skb->cb, 0, sizeof(struct inet6_skb_parm));
> > 
> >+	if (tpi->proto == htons(ETH_P_IP) &&
> >+		!ipv6_addr_equal(&ipv6h->saddr, &tunnel->parms.raddr)) {
> >+			/* Packet didn't come from BR, so lookup FMR */
> >+			struct __ip6_tnl_fmr *fmr;
> >+			struct in6_addr expected = tunnel->parms.raddr;
> >+			for (fmr = tunnel->parms.fmrs; fmr; fmr = fmr->next)
> >+				if (ipv6_prefix_equal(&ipv6h->saddr,
> >+					&fmr->ip6_prefix, fmr->ip6_prefix_len))
> >+						break;
> >+
> >+			/* Check that IPv6 matches IPv4 source to prevent spoofing */
> >+			if (fmr) {
> >+				ip4ip6_fmr_calc(&expected, ip_hdr(skb),
> >+						skb_tail_pointer(skb), fmr, false);
> >+
> >+				if (!ipv6_addr_equal(&ipv6h->saddr, &expected)) {
> >+					rcu_read_unlock();
> >+					goto drop;
> >+				}
> >+			}
> >+	}
> >+
> > 	__skb_tunnel_rx(skb, tunnel->dev, tunnel->net);
> > 
> > 	err = dscp_ecn_decapsulate(tunnel, ipv6h, skb);
> >---
> >
> >Please confirm that this was your original intention, so we can move
> >forward with the discussion and this is an IPv6 show-stopper for
> >LibreMesh as well...
> >
> >
> >Cheers
> >
> >
> >Daniel
> >
> >_______________________________________________
> >openwrt-devel mailing list
> >openwrt-devel at lists.openwrt.org
> >http://lists.infradead.org/mailman/listinfo/openwrt-devel
> 
> -- 
> Diese Nachricht wurde von meinem Android-Ger?t mit K-9 Mail gesendet.

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From foss at volatilesystems.org  Mon Jul 30 15:31:46 2018
From: foss at volatilesystems.org (Stijn Segers)
Date: Mon, 30 Jul 2018 21:31:46 +0200
Subject: [OpenWrt-Devel] [PATCH 1/2] kernel: bump 4.9 to 4.9.116 for 18.06
Message-ID: <20180730193147.2243-1-foss@volatilesystems.org>

* Refreshed patches.
* Removed patches:
  - target/linux/ar71xx/patches-4.9/103-MIPS-ath79-fix-register-address-in-ath79_ddr_wb_flus.patch superseded by upstream
  - target/linux/ar71xx/patches-4.9/403-mtd_fix_cfi_cmdset_0002_status_check.patch superseded by upstream
  - target/linux/brcm63xx/patches-4.9/001-4.11-01-mtd-m25p80-consider-max-message-size-in-m25p80_read.patch accepted upstream
  - target/linux/brcm63xx/patches-4.9/001-4.15-08-bcm63xx_enet-correct-clock-usage.patch accepted upstream
  - target/linux/brcm63xx/patches-4.9/001-4.15-09-bcm63xx_enet-do-not-write-to-random-DMA-channel-on-B.patch accepted upstream

Compile-tested on: ar71xx
Run-tested on: ar71xx

Signed-off-by: Stijn Segers <foss at volatilesystems.org>
---
 include/kernel-version.mk                          |   4 +-
 ...fix-register-address-in-ath79_ddr_wb_flus.patch |  23 --
 .../403-mtd_fix_cfi_cmdset_0002_status_check.patch |  69 -----
 ...low-to-pass-probe-types-via-platform-data.patch |   4 +-
 .../411-mtd-cfi_cmdset_0002-force-word-write.patch |   8 +-
 .../patches-4.9/910-unaligned_access_hacks.patch   |  10 +-
 ...gnore-dtco-targets-when-filtering-symbols.patch |   2 +-
 .../patches-4.9/950-0031-Add-dwc_otg-driver.patch  |   2 +-
 ...-consider-max-message-size-in-m25p80_read.patch |  30 --
 ...-4.15-08-bcm63xx_enet-correct-clock-usage.patch | 101 ------
 ...t-do-not-write-to-random-DMA-channel-on-B.patch |  29 --
 .../024-1-tcp-tsq-add-tsq_flags-tsq_enum.patch     |   6 +-
 ...-remove-one-locked-operation-in-tcp_wfree.patch |   4 +-
 ...-tcp-tsq-add-shortcut-in-tcp_tasklet_func.patch |   6 +-
 ...4-4-tcp-tsq-avoid-one-atomic-in-tcp_wfree.patch |   4 +-
 ...q-add-a-shortcut-in-tcp_small_queue_check.patch |   2 +-
 ...tcp-tcp_mtu_probe-is-likely-to-exit-early.patch |   2 +-
 ...tsq-move-tsq_flags-close-to-sk_wmem_alloc.patch |  14 +-
 ...add-a-missing-barrier-in-tcp_tasklet_func.patch |   2 +-
 .../025-tcp-allow-drivers-to-tweak-TSQ-logic.patch |   4 +-
 ...ort-for-releasing-multiple-instances-of-a.patch |   2 +-
 ..._alloc_page_frag-to-page_frag_alloc-and-_.patch |   4 +-
 ..._page_frag-functions-to-__page_frag_cache.patch |   6 +-
 .../090-net-generalize-napi_complete_done.patch    |   8 +-
 .../generic/hack-4.9/207-disable-modorder.patch    |   4 +-
 .../hack-4.9/211-host_tools_portability.patch      |   2 +-
 .../linux/generic/hack-4.9/220-gc_sections.patch   |   4 +-
 ...c_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch |   2 +-
 .../pending-4.9/201-extra_optimization.patch       |   2 +-
 ...610-netfilter_match_bypass_default_checks.patch |   6 +-
 .../pending-4.9/630-packet_socket_type.patch       |   6 +-
 .../generic/pending-4.9/834-ledtrig-libata.patch   |  10 +-
 .../900-gen_stats-fix-netlink-stats-padding.patch  |  49 ---
 .../patches-4.9/600-skb_avoid_dmabounce.patch      |   2 +-
 ...MTD-m25p80-allow-loading-mtd-name-from-OF.patch |   4 +-
 .../202-core-linux-support-layerscape.patch        |   6 +-
 .../patches-4.9/703-phy-support-layerscape.patch   |   2 +-
 .../patches-4.9/817-usb-support-layerscape.patch   |  10 +-
 .../sunxi/patches-4.9/0052-stmmac-form-4-12.patch  | 344 ++++++++++-----------
 39 files changed, 238 insertions(+), 561 deletions(-)
 delete mode 100644 target/linux/ar71xx/patches-4.9/103-MIPS-ath79-fix-register-address-in-ath79_ddr_wb_flus.patch
 delete mode 100644 target/linux/ar71xx/patches-4.9/403-mtd_fix_cfi_cmdset_0002_status_check.patch
 delete mode 100644 target/linux/brcm63xx/patches-4.9/001-4.11-01-mtd-m25p80-consider-max-message-size-in-m25p80_read.patch
 delete mode 100644 target/linux/brcm63xx/patches-4.9/001-4.15-08-bcm63xx_enet-correct-clock-usage.patch
 delete mode 100644 target/linux/brcm63xx/patches-4.9/001-4.15-09-bcm63xx_enet-do-not-write-to-random-DMA-channel-on-B.patch
 delete mode 100644 target/linux/generic/pending-4.9/900-gen_stats-fix-netlink-stats-padding.patch

diff --git a/include/kernel-version.mk b/include/kernel-version.mk
index f0d8160e34..2e77f812df 100644
--- a/include/kernel-version.mk
+++ b/include/kernel-version.mk
@@ -4,12 +4,12 @@ LINUX_RELEASE?=1
 
 LINUX_VERSION-3.18 = .71
 LINUX_VERSION-4.4 = .121
-LINUX_VERSION-4.9 = .111
+LINUX_VERSION-4.9 = .116
 LINUX_VERSION-4.14 = .54
 
 LINUX_KERNEL_HASH-3.18.71 = 5abc9778ad44ce02ed6c8ab52ece8a21c6d20d21f6ed8a19287b4a38a50c1240
 LINUX_KERNEL_HASH-4.4.121 = 44a88268b5088dc326b30c9b9133ac35a9a200b636b7268d08f32abeae6ca729
-LINUX_KERNEL_HASH-4.9.111 = 5966558959dc580f163766f3fdefd7e57c01b2b45d51202d00b3807c253759dd
+LINUX_KERNEL_HASH-4.9.116 = 999e8291bec0bcef2e0b91b6d58d8be5eb5e7c70881df59439364b22b693ff1d
 LINUX_KERNEL_HASH-4.14.54 = 451642ac28c539a91072f1fb83b1c061d6d44df870ddf5562400ade5e1c4b6c6
 
 remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
diff --git a/target/linux/ar71xx/patches-4.9/103-MIPS-ath79-fix-register-address-in-ath79_ddr_wb_flus.patch b/target/linux/ar71xx/patches-4.9/103-MIPS-ath79-fix-register-address-in-ath79_ddr_wb_flus.patch
deleted file mode 100644
index 64fb545b24..0000000000
--- a/target/linux/ar71xx/patches-4.9/103-MIPS-ath79-fix-register-address-in-ath79_ddr_wb_flus.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-From: Felix Fietkau <nbd at nbd.name>
-Date: Wed, 18 May 2016 18:03:31 +0200
-Subject: [PATCH] MIPS: ath79: fix register address in ath79_ddr_wb_flush()
-
-ath79_ddr_wb_flush_base has the type void __iomem *, so register offsets
-need to be a multiple of 4.
-
-Cc: Alban Bedel <albeu at free.fr>
-Fixes: 24b0e3e84fbf ("MIPS: ath79: Improve the DDR controller interface")
-Signed-off-by: Felix Fietkau <nbd at nbd.name>
----
-
---- a/arch/mips/ath79/common.c
-+++ b/arch/mips/ath79/common.c
-@@ -58,7 +58,7 @@ EXPORT_SYMBOL_GPL(ath79_ddr_ctrl_init);
- 
- void ath79_ddr_wb_flush(u32 reg)
- {
--	void __iomem *flush_reg = ath79_ddr_wb_flush_base + reg;
-+	void __iomem *flush_reg = ath79_ddr_wb_flush_base + reg * 4;
- 
- 	/* Flush the DDR write buffer. */
- 	__raw_writel(0x1, flush_reg);
diff --git a/target/linux/ar71xx/patches-4.9/403-mtd_fix_cfi_cmdset_0002_status_check.patch b/target/linux/ar71xx/patches-4.9/403-mtd_fix_cfi_cmdset_0002_status_check.patch
deleted file mode 100644
index 3a7fe99e65..0000000000
--- a/target/linux/ar71xx/patches-4.9/403-mtd_fix_cfi_cmdset_0002_status_check.patch
+++ /dev/null
@@ -1,69 +0,0 @@
---- a/drivers/mtd/chips/cfi_cmdset_0002.c
-+++ b/drivers/mtd/chips/cfi_cmdset_0002.c
-@@ -1631,8 +1631,8 @@ static int __xipram do_write_oneword(str
- 			break;
- 		}
- 
--		if (chip_ready(map, adr))
--			break;
-+		if (chip_good(map, adr, datum))
-+			goto enable_xip;
- 
- 		/* Latency issues. Drop the lock, wait a while and retry */
- 		UDELAY(map, chip, adr, 1);
-@@ -1648,6 +1648,8 @@ static int __xipram do_write_oneword(str
- 
- 		ret = -EIO;
- 	}
-+
-+ enable_xip:
- 	xip_enable(map, chip, adr);
-  op_done:
- 	if (mode == FL_OTP_WRITE)
-@@ -2226,7 +2228,6 @@ static int cfi_amdstd_panic_write(struct
- 	return 0;
- }
- 
--
- /*
-  * Handle devices with one erase region, that only implement
-  * the chip erase command.
-@@ -2291,8 +2292,8 @@ static int __xipram do_erase_chip(struct
- 			chip->erase_suspended = 0;
- 		}
- 
--		if (chip_ready(map, adr))
--			break;
-+		if (chip_good(map, adr, map_word_ff(map)))
-+			goto op_done;
- 
- 		if (time_after(jiffies, timeo)) {
- 			printk(KERN_WARNING "MTD %s(): software timeout\n",
-@@ -2312,6 +2313,7 @@ static int __xipram do_erase_chip(struct
- 		ret = -EIO;
- 	}
- 
-+ op_done:
- 	chip->state = FL_READY;
- 	xip_enable(map, chip, adr);
- 	DISABLE_VPP(map);
-@@ -2381,9 +2383,9 @@ static int __xipram do_erase_oneblock(st
- 			chip->erase_suspended = 0;
- 		}
- 
--		if (chip_ready(map, adr)) {
-+		if (chip_good(map, adr, map_word_ff(map))) {
- 			xip_enable(map, chip, adr);
--			break;
-+			goto op_done;
- 		}
- 
- 		if (time_after(jiffies, timeo)) {
-@@ -2405,6 +2407,7 @@ static int __xipram do_erase_oneblock(st
- 		ret = -EIO;
- 	}
- 
-+ op_done:
- 	chip->state = FL_READY;
- 	DISABLE_VPP(map);
- 	put_chip(map, chip, adr);
diff --git a/target/linux/ar71xx/patches-4.9/407-mtd-m25p80-allow-to-pass-probe-types-via-platform-data.patch b/target/linux/ar71xx/patches-4.9/407-mtd-m25p80-allow-to-pass-probe-types-via-platform-data.patch
index 418db2a2bf..cfc84c4afa 100644
--- a/target/linux/ar71xx/patches-4.9/407-mtd-m25p80-allow-to-pass-probe-types-via-platform-data.patch
+++ b/target/linux/ar71xx/patches-4.9/407-mtd-m25p80-allow-to-pass-probe-types-via-platform-data.patch
@@ -1,6 +1,6 @@
 --- a/drivers/mtd/devices/m25p80.c
 +++ b/drivers/mtd/devices/m25p80.c
-@@ -194,6 +194,7 @@ static ssize_t m25p80_read(struct spi_no
+@@ -195,6 +195,7 @@ static ssize_t m25p80_read(struct spi_no
   */
  static int m25p_probe(struct spi_device *spi)
  {
@@ -8,7 +8,7 @@
  	struct flash_platform_data	*data;
  	struct m25p *flash;
  	struct spi_nor *nor;
-@@ -246,8 +247,11 @@ static int m25p_probe(struct spi_device
+@@ -247,8 +248,11 @@ static int m25p_probe(struct spi_device
  	if (ret)
  		return ret;
  
diff --git a/target/linux/ar71xx/patches-4.9/411-mtd-cfi_cmdset_0002-force-word-write.patch b/target/linux/ar71xx/patches-4.9/411-mtd-cfi_cmdset_0002-force-word-write.patch
index 25a73dcdff..ddd69f17e1 100644
--- a/target/linux/ar71xx/patches-4.9/411-mtd-cfi_cmdset_0002-force-word-write.patch
+++ b/target/linux/ar71xx/patches-4.9/411-mtd-cfi_cmdset_0002-force-word-write.patch
@@ -7,7 +7,7 @@
 -#define FORCE_WORD_WRITE 0
 +#define FORCE_WORD_WRITE 1
  
- #define MAX_WORD_RETRIES 3
+ #define MAX_RETRIES 3
  
 @@ -51,7 +51,9 @@
  
@@ -35,7 +35,7 @@
  
  /* Atmel chips don't use the same PRI format as AMD chips */
  static void fixup_convert_atmel_pri(struct mtd_info *mtd)
-@@ -1790,6 +1794,7 @@ static int cfi_amdstd_write_words(struct
+@@ -1788,6 +1792,7 @@ static int cfi_amdstd_write_words(struct
  /*
   * FIXME: interleaved mode not tested, and probably not supported!
   */
@@ -43,7 +43,7 @@
  static int __xipram do_write_buffer(struct map_info *map, struct flchip *chip,
  				    unsigned long adr, const u_char *buf,
  				    int len)
-@@ -1918,7 +1923,6 @@ static int __xipram do_write_buffer(stru
+@@ -1916,7 +1921,6 @@ static int __xipram do_write_buffer(stru
  	return ret;
  }
  
@@ -51,7 +51,7 @@
  static int cfi_amdstd_write_buffers(struct mtd_info *mtd, loff_t to, size_t len,
  				    size_t *retlen, const u_char *buf)
  {
-@@ -1993,6 +1997,7 @@ static int cfi_amdstd_write_buffers(stru
+@@ -1991,6 +1995,7 @@ static int cfi_amdstd_write_buffers(stru
  
  	return 0;
  }
diff --git a/target/linux/ar71xx/patches-4.9/910-unaligned_access_hacks.patch b/target/linux/ar71xx/patches-4.9/910-unaligned_access_hacks.patch
index 1815ccb1d3..54a41b6e3a 100644
--- a/target/linux/ar71xx/patches-4.9/910-unaligned_access_hacks.patch
+++ b/target/linux/ar71xx/patches-4.9/910-unaligned_access_hacks.patch
@@ -250,7 +250,7 @@
  					       &sin->sin6_addr);
  			sin->sin6_scope_id = 0;
  		}
-@@ -814,12 +814,12 @@ int ip6_datagram_send_ctl(struct net *ne
+@@ -817,12 +817,12 @@ int ip6_datagram_send_ctl(struct net *ne
  			}
  
  			if (fl6->flowlabel&IPV6_FLOWINFO_MASK) {
@@ -327,7 +327,7 @@
  	return neigh_create(&arp_tbl, pkey, dev);
 --- a/net/ipv4/tcp_output.c
 +++ b/net/ipv4/tcp_output.c
-@@ -448,48 +448,53 @@ static void tcp_options_write(__be32 *pt
+@@ -453,48 +453,53 @@ static void tcp_options_write(__be32 *pt
  	u16 options = opts->options;	/* mungable copy */
  
  	if (unlikely(OPTION_MD5 & options)) {
@@ -404,7 +404,7 @@
  	}
  
  	if (unlikely(opts->num_sack_blocks)) {
-@@ -497,16 +502,17 @@ static void tcp_options_write(__be32 *pt
+@@ -502,16 +507,17 @@ static void tcp_options_write(__be32 *pt
  			tp->duplicate_sack : tp->selective_acks;
  		int this_sack;
  
@@ -428,7 +428,7 @@
  		}
  
  		tp->rx_opt.dsack = 0;
-@@ -519,13 +525,14 @@ static void tcp_options_write(__be32 *pt
+@@ -524,13 +530,14 @@ static void tcp_options_write(__be32 *pt
  
  		if (foc->exp) {
  			len = TCPOLEN_EXP_FASTOPEN_BASE + foc->len;
@@ -795,7 +795,7 @@
  
 --- a/net/ipv4/tcp_input.c
 +++ b/net/ipv4/tcp_input.c
-@@ -3896,14 +3896,16 @@ static bool tcp_parse_aligned_timestamp(
+@@ -3906,14 +3906,16 @@ static bool tcp_parse_aligned_timestamp(
  {
  	const __be32 *ptr = (const __be32 *)(th + 1);
  
diff --git a/target/linux/brcm2708/patches-4.9/950-0028-kbuild-Ignore-dtco-targets-when-filtering-symbols.patch b/target/linux/brcm2708/patches-4.9/950-0028-kbuild-Ignore-dtco-targets-when-filtering-symbols.patch
index 0f5afac4ea..52fe8a2281 100644
--- a/target/linux/brcm2708/patches-4.9/950-0028-kbuild-Ignore-dtco-targets-when-filtering-symbols.patch
+++ b/target/linux/brcm2708/patches-4.9/950-0028-kbuild-Ignore-dtco-targets-when-filtering-symbols.patch
@@ -9,7 +9,7 @@ Subject: [PATCH] kbuild: Ignore dtco targets when filtering symbols
 
 --- a/scripts/Kbuild.include
 +++ b/scripts/Kbuild.include
-@@ -284,7 +284,7 @@ ksym_dep_filter =
+@@ -285,7 +285,7 @@ ksym_dep_filter =
  	    $(CPP) $(call flags_nodeps,c_flags) -D__KSYM_DEPS__ $< ;;        \
  	  as_*_S|cpp_s_S)                                                    \
  	    $(CPP) $(call flags_nodeps,a_flags) -D__KSYM_DEPS__ $< ;;        \
diff --git a/target/linux/brcm2708/patches-4.9/950-0031-Add-dwc_otg-driver.patch b/target/linux/brcm2708/patches-4.9/950-0031-Add-dwc_otg-driver.patch
index d19027a2f0..258299fcf1 100644
--- a/target/linux/brcm2708/patches-4.9/950-0031-Add-dwc_otg-driver.patch
+++ b/target/linux/brcm2708/patches-4.9/950-0031-Add-dwc_otg-driver.patch
@@ -696,7 +696,7 @@ Signed-off-by: Noralf Tr?nnes <noralf at tronnes.org>
  }
 --- a/drivers/usb/core/hub.c
 +++ b/drivers/usb/core/hub.c
-@@ -5064,7 +5064,7 @@ static void port_event(struct usb_hub *h
+@@ -5068,7 +5068,7 @@ static void port_event(struct usb_hub *h
  	if (portchange & USB_PORT_STAT_C_OVERCURRENT) {
  		u16 status = 0, unused;
  
diff --git a/target/linux/brcm63xx/patches-4.9/001-4.11-01-mtd-m25p80-consider-max-message-size-in-m25p80_read.patch b/target/linux/brcm63xx/patches-4.9/001-4.11-01-mtd-m25p80-consider-max-message-size-in-m25p80_read.patch
deleted file mode 100644
index 9d41b3cce4..0000000000
--- a/target/linux/brcm63xx/patches-4.9/001-4.11-01-mtd-m25p80-consider-max-message-size-in-m25p80_read.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 80a79a889ce5df16c5261ab2f1e8e63b94b78102 Mon Sep 17 00:00:00 2001
-From: Heiner Kallweit <hkallweit1 at gmail.com>
-Date: Fri, 28 Oct 2016 07:58:46 +0200
-Subject: [PATCH 1/8] mtd: m25p80: consider max message size in m25p80_read
-
-Consider a message size limit when calculating the maximum amount
-of data that can be read.
-
-The message size limit has been introduced with 4.9, so cc it
-to stable.
-
-Signed-off-by: Heiner Kallweit <hkallweit1 at gmail.com>
-Cc: <stable at vger.kernel.org> # 4.9.x
-Signed-off-by: Cyrille Pitchen <cyrille.pitchen at atmel.com>
----
- drivers/mtd/devices/m25p80.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
---- a/drivers/mtd/devices/m25p80.c
-+++ b/drivers/mtd/devices/m25p80.c
-@@ -174,7 +174,8 @@ static ssize_t m25p80_read(struct spi_no
- 
- 	t[1].rx_buf = buf;
- 	t[1].rx_nbits = m25p80_rx_nbits(nor);
--	t[1].len = min(len, spi_max_transfer_size(spi));
-+	t[1].len = min3(len, spi_max_transfer_size(spi),
-+			spi_max_message_size(spi) - t[0].len);
- 	spi_message_add_tail(&t[1], &m);
- 
- 	ret = spi_sync(spi, &m);
diff --git a/target/linux/brcm63xx/patches-4.9/001-4.15-08-bcm63xx_enet-correct-clock-usage.patch b/target/linux/brcm63xx/patches-4.9/001-4.15-08-bcm63xx_enet-correct-clock-usage.patch
deleted file mode 100644
index d1d8516789..0000000000
--- a/target/linux/brcm63xx/patches-4.9/001-4.15-08-bcm63xx_enet-correct-clock-usage.patch
+++ /dev/null
@@ -1,101 +0,0 @@
-From d0423d3e4fa7ae305729cb50369427f075ccb279 Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jonas.gorski at gmail.com>
-Date: Sat, 25 Feb 2017 12:41:28 +0100
-Subject: [PATCH 1/6] bcm63xx_enet: correct clock usage
-
-Check the return code of prepare_enable and change one last instance of
-enable only to prepare_enable. Also properly disable and release the
-clock in error paths and on remove for enetsw.
-
-Signed-off-by: Jonas Gorski <jonas.gorski at gmail.com>
----
- drivers/net/ethernet/broadcom/bcm63xx_enet.c | 31 +++++++++++++++++++++-------
- 1 file changed, 23 insertions(+), 8 deletions(-)
-
---- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c
-+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
-@@ -1790,7 +1790,9 @@ static int bcm_enet_probe(struct platfor
- 		ret = PTR_ERR(priv->mac_clk);
- 		goto out;
- 	}
--	clk_prepare_enable(priv->mac_clk);
-+	ret = clk_prepare_enable(priv->mac_clk);
-+	if (ret)
-+		goto out_put_clk_mac;
- 
- 	/* initialize default and fetch platform data */
- 	priv->rx_ring_size = BCMENET_DEF_RX_DESC;
-@@ -1822,9 +1824,11 @@ static int bcm_enet_probe(struct platfor
- 		if (IS_ERR(priv->phy_clk)) {
- 			ret = PTR_ERR(priv->phy_clk);
- 			priv->phy_clk = NULL;
--			goto out_put_clk_mac;
-+			goto out_disable_clk_mac;
- 		}
--		clk_prepare_enable(priv->phy_clk);
-+		ret = clk_prepare_enable(priv->phy_clk);
-+		if (ret)
-+			goto out_put_clk_phy;
- 	}
- 
- 	/* do minimal hardware init to be able to probe mii bus */
-@@ -1915,13 +1919,16 @@ out_free_mdio:
- out_uninit_hw:
- 	/* turn off mdc clock */
- 	enet_writel(priv, 0, ENET_MIISC_REG);
--	if (priv->phy_clk) {
-+	if (priv->phy_clk)
- 		clk_disable_unprepare(priv->phy_clk);
-+
-+out_put_clk_phy:
-+	if (priv->phy_clk)
- 		clk_put(priv->phy_clk);
--	}
- 
--out_put_clk_mac:
-+out_disable_clk_mac:
- 	clk_disable_unprepare(priv->mac_clk);
-+out_put_clk_mac:
- 	clk_put(priv->mac_clk);
- out:
- 	free_netdev(dev);
-@@ -2766,7 +2773,9 @@ static int bcm_enetsw_probe(struct platf
- 		ret = PTR_ERR(priv->mac_clk);
- 		goto out_unmap;
- 	}
--	clk_enable(priv->mac_clk);
-+	ret = clk_prepare_enable(priv->mac_clk);
-+	if (ret)
-+		goto out_put_clk;
- 
- 	priv->rx_chan = 0;
- 	priv->tx_chan = 1;
-@@ -2787,7 +2796,7 @@ static int bcm_enetsw_probe(struct platf
- 
- 	ret = register_netdev(dev);
- 	if (ret)
--		goto out_put_clk;
-+		goto out_disable_clk;
- 
- 	netif_carrier_off(dev);
- 	platform_set_drvdata(pdev, dev);
-@@ -2796,6 +2805,9 @@ static int bcm_enetsw_probe(struct platf
- 
- 	return 0;
- 
-+out_disable_clk:
-+	clk_disable_unprepare(priv->mac_clk);
-+
- out_put_clk:
- 	clk_put(priv->mac_clk);
- 
-@@ -2827,6 +2839,9 @@ static int bcm_enetsw_remove(struct plat
- 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- 	release_mem_region(res->start, resource_size(res));
- 
-+	clk_disable_unprepare(priv->mac_clk);
-+	clk_put(priv->mac_clk);
-+
- 	free_netdev(dev);
- 	return 0;
- }
diff --git a/target/linux/brcm63xx/patches-4.9/001-4.15-09-bcm63xx_enet-do-not-write-to-random-DMA-channel-on-B.patch b/target/linux/brcm63xx/patches-4.9/001-4.15-09-bcm63xx_enet-do-not-write-to-random-DMA-channel-on-B.patch
deleted file mode 100644
index 22c6d01873..0000000000
--- a/target/linux/brcm63xx/patches-4.9/001-4.15-09-bcm63xx_enet-do-not-write-to-random-DMA-channel-on-B.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 23d94cb855b6f4f0ee1c01679224472104ac6440 Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jonas.gorski at gmail.com>
-Date: Sat, 30 Sep 2017 14:10:18 +0200
-Subject: [PATCH 2/6] bcm63xx_enet: do not write to random DMA channel on
- BCM6345
-
-The DMA controller regs actually point to DMA channel 0, so the write to
-ENETDMA_CFG_REG will actually modify a random DMA channel.
-
-Since DMA controller registers do not exist on BCM6345, guard the write
-with the usual check for dma_has_sram.
-
-Signed-off-by: Jonas Gorski <jonas.gorski at gmail.com>
----
- drivers/net/ethernet/broadcom/bcm63xx_enet.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
---- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c
-+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
-@@ -1063,7 +1063,8 @@ static int bcm_enet_open(struct net_devi
- 	val = enet_readl(priv, ENET_CTL_REG);
- 	val |= ENET_CTL_ENABLE_MASK;
- 	enet_writel(priv, val, ENET_CTL_REG);
--	enet_dma_writel(priv, ENETDMA_CFG_EN_MASK, ENETDMA_CFG_REG);
-+	if (priv->dma_has_sram)
-+		enet_dma_writel(priv, ENETDMA_CFG_EN_MASK, ENETDMA_CFG_REG);
- 	enet_dmac_writel(priv, priv->dma_chan_en_mask,
- 			 ENETDMAC_CHANCFG, priv->rx_chan);
- 
diff --git a/target/linux/generic/backport-4.9/024-1-tcp-tsq-add-tsq_flags-tsq_enum.patch b/target/linux/generic/backport-4.9/024-1-tcp-tsq-add-tsq_flags-tsq_enum.patch
index 7bf4fd47d2..172e714c5d 100644
--- a/target/linux/generic/backport-4.9/024-1-tcp-tsq-add-tsq_flags-tsq_enum.patch
+++ b/target/linux/generic/backport-4.9/024-1-tcp-tsq-add-tsq_flags-tsq_enum.patch
@@ -45,7 +45,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	return (struct tcp_sock *)sk;
 --- a/net/ipv4/tcp_output.c
 +++ b/net/ipv4/tcp_output.c
-@@ -784,10 +784,10 @@ static void tcp_tasklet_func(unsigned lo
+@@ -789,10 +789,10 @@ static void tcp_tasklet_func(unsigned lo
  	}
  }
  
@@ -60,7 +60,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  /**
   * tcp_release_cb - tcp release_sock() callback
   * @sk: socket
-@@ -808,7 +808,7 @@ void tcp_release_cb(struct sock *sk)
+@@ -813,7 +813,7 @@ void tcp_release_cb(struct sock *sk)
  		nflags = flags & ~TCP_DEFERRED_ALL;
  	} while (cmpxchg(&tp->tsq_flags, flags, nflags) != flags);
  
@@ -69,7 +69,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  		tcp_tsq_handler(sk);
  
  	/* Here begins the tricky part :
-@@ -822,15 +822,15 @@ void tcp_release_cb(struct sock *sk)
+@@ -827,15 +827,15 @@ void tcp_release_cb(struct sock *sk)
  	 */
  	sock_release_ownership(sk);
  
diff --git a/target/linux/generic/backport-4.9/024-2-tcp-tsq-remove-one-locked-operation-in-tcp_wfree.patch b/target/linux/generic/backport-4.9/024-2-tcp-tsq-remove-one-locked-operation-in-tcp_wfree.patch
index 914be607e7..af194b2bed 100644
--- a/target/linux/generic/backport-4.9/024-2-tcp-tsq-remove-one-locked-operation-in-tcp_wfree.patch
+++ b/target/linux/generic/backport-4.9/024-2-tcp-tsq-remove-one-locked-operation-in-tcp_wfree.patch
@@ -17,7 +17,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/net/ipv4/tcp_output.c
 +++ b/net/ipv4/tcp_output.c
-@@ -860,6 +860,7 @@ void tcp_wfree(struct sk_buff *skb)
+@@ -865,6 +865,7 @@ void tcp_wfree(struct sk_buff *skb)
  {
  	struct sock *sk = skb->sk;
  	struct tcp_sock *tp = tcp_sk(sk);
@@ -25,7 +25,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	int wmem;
  
  	/* Keep one reference on sk_wmem_alloc.
-@@ -877,11 +878,17 @@ void tcp_wfree(struct sk_buff *skb)
+@@ -882,11 +883,17 @@ void tcp_wfree(struct sk_buff *skb)
  	if (wmem >= SKB_TRUESIZE(1) && this_cpu_ksoftirqd() == current)
  		goto out;
  
diff --git a/target/linux/generic/backport-4.9/024-3-tcp-tsq-add-shortcut-in-tcp_tasklet_func.patch b/target/linux/generic/backport-4.9/024-3-tcp-tsq-add-shortcut-in-tcp_tasklet_func.patch
index f5004d3ffc..b9b3c55076 100644
--- a/target/linux/generic/backport-4.9/024-3-tcp-tsq-add-shortcut-in-tcp_tasklet_func.patch
+++ b/target/linux/generic/backport-4.9/024-3-tcp-tsq-add-shortcut-in-tcp_tasklet_func.patch
@@ -22,7 +22,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/net/ipv4/tcp_output.c
 +++ b/net/ipv4/tcp_output.c
-@@ -767,19 +767,19 @@ static void tcp_tasklet_func(unsigned lo
+@@ -772,19 +772,19 @@ static void tcp_tasklet_func(unsigned lo
  	list_for_each_safe(q, n, &list) {
  		tp = list_entry(q, struct tcp_sock, tsq_node);
  		list_del(&tp->tsq_node);
@@ -51,7 +51,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  		sk_free(sk);
  	}
  }
-@@ -884,7 +884,7 @@ void tcp_wfree(struct sk_buff *skb)
+@@ -889,7 +889,7 @@ void tcp_wfree(struct sk_buff *skb)
  		if (!(oval & TSQF_THROTTLED) || (oval & TSQF_QUEUED))
  			goto out;
  
@@ -60,7 +60,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  		nval = cmpxchg(&tp->tsq_flags, oval, nval);
  		if (nval != oval)
  			continue;
-@@ -2210,6 +2210,8 @@ static bool tcp_write_xmit(struct sock *
+@@ -2222,6 +2222,8 @@ static bool tcp_write_xmit(struct sock *
  		    unlikely(tso_fragment(sk, skb, limit, mss_now, gfp)))
  			break;
  
diff --git a/target/linux/generic/backport-4.9/024-4-tcp-tsq-avoid-one-atomic-in-tcp_wfree.patch b/target/linux/generic/backport-4.9/024-4-tcp-tsq-avoid-one-atomic-in-tcp_wfree.patch
index a25cdb5717..87452ac853 100644
--- a/target/linux/generic/backport-4.9/024-4-tcp-tsq-avoid-one-atomic-in-tcp_wfree.patch
+++ b/target/linux/generic/backport-4.9/024-4-tcp-tsq-avoid-one-atomic-in-tcp_wfree.patch
@@ -16,7 +16,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/net/ipv4/tcp_output.c
 +++ b/net/ipv4/tcp_output.c
-@@ -880,6 +880,7 @@ void tcp_wfree(struct sk_buff *skb)
+@@ -885,6 +885,7 @@ void tcp_wfree(struct sk_buff *skb)
  
  	for (oval = READ_ONCE(tp->tsq_flags);; oval = nval) {
  		struct tsq_tasklet *tsq;
@@ -24,7 +24,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
  		if (!(oval & TSQF_THROTTLED) || (oval & TSQF_QUEUED))
  			goto out;
-@@ -892,8 +893,10 @@ void tcp_wfree(struct sk_buff *skb)
+@@ -897,8 +898,10 @@ void tcp_wfree(struct sk_buff *skb)
  		/* queue this socket to tasklet queue */
  		local_irq_save(flags);
  		tsq = this_cpu_ptr(&tsq_tasklet);
diff --git a/target/linux/generic/backport-4.9/024-5-tcp-tsq-add-a-shortcut-in-tcp_small_queue_check.patch b/target/linux/generic/backport-4.9/024-5-tcp-tsq-add-a-shortcut-in-tcp_small_queue_check.patch
index 65013b6aa7..d04e365f98 100644
--- a/target/linux/generic/backport-4.9/024-5-tcp-tsq-add-a-shortcut-in-tcp_small_queue_check.patch
+++ b/target/linux/generic/backport-4.9/024-5-tcp-tsq-add-a-shortcut-in-tcp_small_queue_check.patch
@@ -19,7 +19,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/net/ipv4/tcp_output.c
 +++ b/net/ipv4/tcp_output.c
-@@ -2115,6 +2115,15 @@ static bool tcp_small_queue_check(struct
+@@ -2127,6 +2127,15 @@ static bool tcp_small_queue_check(struct
  	limit <<= factor;
  
  	if (atomic_read(&sk->sk_wmem_alloc) > limit) {
diff --git a/target/linux/generic/backport-4.9/024-6-tcp-tcp_mtu_probe-is-likely-to-exit-early.patch b/target/linux/generic/backport-4.9/024-6-tcp-tcp_mtu_probe-is-likely-to-exit-early.patch
index 6f2d196687..2a6cd40c8a 100644
--- a/target/linux/generic/backport-4.9/024-6-tcp-tcp_mtu_probe-is-likely-to-exit-early.patch
+++ b/target/linux/generic/backport-4.9/024-6-tcp-tcp_mtu_probe-is-likely-to-exit-early.patch
@@ -17,7 +17,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/net/ipv4/tcp_output.c
 +++ b/net/ipv4/tcp_output.c
-@@ -1948,26 +1948,26 @@ static bool tcp_can_coalesce_send_queue_
+@@ -1960,26 +1960,26 @@ static bool tcp_can_coalesce_send_queue_
   */
  static int tcp_mtu_probe(struct sock *sk)
  {
diff --git a/target/linux/generic/backport-4.9/024-8-tcp-tsq-move-tsq_flags-close-to-sk_wmem_alloc.patch b/target/linux/generic/backport-4.9/024-8-tcp-tsq-move-tsq_flags-close-to-sk_wmem_alloc.patch
index 292b381f8d..0a5b9ead9d 100644
--- a/target/linux/generic/backport-4.9/024-8-tcp-tsq-move-tsq_flags-close-to-sk_wmem_alloc.patch
+++ b/target/linux/generic/backport-4.9/024-8-tcp-tsq-move-tsq_flags-close-to-sk_wmem_alloc.patch
@@ -58,7 +58,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  			goto out;
 --- a/net/ipv4/tcp_output.c
 +++ b/net/ipv4/tcp_output.c
-@@ -767,14 +767,15 @@ static void tcp_tasklet_func(unsigned lo
+@@ -772,14 +772,15 @@ static void tcp_tasklet_func(unsigned lo
  	list_for_each_safe(q, n, &list) {
  		tp = list_entry(q, struct tcp_sock, tsq_node);
  		list_del(&tp->tsq_node);
@@ -77,7 +77,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  				tcp_tsq_handler(sk);
  			}
  			bh_unlock_sock(sk);
-@@ -797,16 +798,15 @@ static void tcp_tasklet_func(unsigned lo
+@@ -802,16 +803,15 @@ static void tcp_tasklet_func(unsigned lo
   */
  void tcp_release_cb(struct sock *sk)
  {
@@ -96,7 +96,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
  	if (flags & TCPF_TSQ_DEFERRED)
  		tcp_tsq_handler(sk);
-@@ -878,7 +878,7 @@ void tcp_wfree(struct sk_buff *skb)
+@@ -883,7 +883,7 @@ void tcp_wfree(struct sk_buff *skb)
  	if (wmem >= SKB_TRUESIZE(1) && this_cpu_ksoftirqd() == current)
  		goto out;
  
@@ -105,7 +105,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  		struct tsq_tasklet *tsq;
  		bool empty;
  
-@@ -886,7 +886,7 @@ void tcp_wfree(struct sk_buff *skb)
+@@ -891,7 +891,7 @@ void tcp_wfree(struct sk_buff *skb)
  			goto out;
  
  		nval = (oval & ~TSQF_THROTTLED) | TSQF_QUEUED | TCPF_TSQ_DEFERRED;
@@ -114,7 +114,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  		if (nval != oval)
  			continue;
  
-@@ -2124,7 +2124,7 @@ static bool tcp_small_queue_check(struct
+@@ -2136,7 +2136,7 @@ static bool tcp_small_queue_check(struct
  		    skb->prev == sk->sk_write_queue.next)
  			return false;
  
@@ -123,7 +123,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  		/* It is possible TX completion already happened
  		 * before we set TSQ_THROTTLED, so we must
  		 * test again the condition.
-@@ -2222,8 +2222,8 @@ static bool tcp_write_xmit(struct sock *
+@@ -2234,8 +2234,8 @@ static bool tcp_write_xmit(struct sock *
  		    unlikely(tso_fragment(sk, skb, limit, mss_now, gfp)))
  			break;
  
@@ -134,7 +134,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  		if (tcp_small_queue_check(sk, skb, 0))
  			break;
  
-@@ -3534,8 +3534,6 @@ void tcp_send_ack(struct sock *sk)
+@@ -3546,8 +3546,6 @@ void __tcp_send_ack(struct sock *sk, u32
  	/* We do not want pure acks influencing TCP Small Queues or fq/pacing
  	 * too much.
  	 * SKB_TRUESIZE(max(1 .. 66, MAX_TCP_HEADER)) is unfortunately ~784
diff --git a/target/linux/generic/backport-4.9/024-9-tcp-add-a-missing-barrier-in-tcp_tasklet_func.patch b/target/linux/generic/backport-4.9/024-9-tcp-add-a-missing-barrier-in-tcp_tasklet_func.patch
index d2b8de6a04..bd74303266 100644
--- a/target/linux/generic/backport-4.9/024-9-tcp-add-a-missing-barrier-in-tcp_tasklet_func.patch
+++ b/target/linux/generic/backport-4.9/024-9-tcp-add-a-missing-barrier-in-tcp_tasklet_func.patch
@@ -30,7 +30,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/net/ipv4/tcp_output.c
 +++ b/net/ipv4/tcp_output.c
-@@ -769,6 +769,7 @@ static void tcp_tasklet_func(unsigned lo
+@@ -774,6 +774,7 @@ static void tcp_tasklet_func(unsigned lo
  		list_del(&tp->tsq_node);
  
  		sk = (struct sock *)tp;
diff --git a/target/linux/generic/backport-4.9/025-tcp-allow-drivers-to-tweak-TSQ-logic.patch b/target/linux/generic/backport-4.9/025-tcp-allow-drivers-to-tweak-TSQ-logic.patch
index 33593194d5..be3140bb9c 100644
--- a/target/linux/generic/backport-4.9/025-tcp-allow-drivers-to-tweak-TSQ-logic.patch
+++ b/target/linux/generic/backport-4.9/025-tcp-allow-drivers-to-tweak-TSQ-logic.patch
@@ -65,7 +65,7 @@ Cc: Kir Kolyshkin <kir at openvz.org>
  	 * Before updating sk_refcnt, we must commit prior changes to memory
 --- a/net/ipv4/tcp_output.c
 +++ b/net/ipv4/tcp_output.c
-@@ -1581,7 +1581,7 @@ u32 tcp_tso_autosize(const struct sock *
+@@ -1593,7 +1593,7 @@ u32 tcp_tso_autosize(const struct sock *
  {
  	u32 bytes, segs;
  
@@ -74,7 +74,7 @@ Cc: Kir Kolyshkin <kir at openvz.org>
  		    sk->sk_gso_max_size - 1 - MAX_TCP_HEADER);
  
  	/* Goal is to send at least one packet per ms,
-@@ -2111,7 +2111,7 @@ static bool tcp_small_queue_check(struct
+@@ -2123,7 +2123,7 @@ static bool tcp_small_queue_check(struct
  {
  	unsigned int limit;
  
diff --git a/target/linux/generic/backport-4.9/040-mm-add-support-for-releasing-multiple-instances-of-a.patch b/target/linux/generic/backport-4.9/040-mm-add-support-for-releasing-multiple-instances-of-a.patch
index 84714ce1e1..7a971169bc 100644
--- a/target/linux/generic/backport-4.9/040-mm-add-support-for-releasing-multiple-instances-of-a.patch
+++ b/target/linux/generic/backport-4.9/040-mm-add-support-for-releasing-multiple-instances-of-a.patch
@@ -52,7 +52,7 @@ Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
  extern void __free_page_frag(void *addr);
 --- a/mm/page_alloc.c
 +++ b/mm/page_alloc.c
-@@ -3946,6 +3946,20 @@ static struct page *__page_frag_refill(s
+@@ -3945,6 +3945,20 @@ static struct page *__page_frag_refill(s
  	return page;
  }
  
diff --git a/target/linux/generic/backport-4.9/041-mm-rename-__alloc_page_frag-to-page_frag_alloc-and-_.patch b/target/linux/generic/backport-4.9/041-mm-rename-__alloc_page_frag-to-page_frag_alloc-and-_.patch
index 896ba415fe..fbd3316016 100644
--- a/target/linux/generic/backport-4.9/041-mm-rename-__alloc_page_frag-to-page_frag_alloc-and-_.patch
+++ b/target/linux/generic/backport-4.9/041-mm-rename-__alloc_page_frag-to-page_frag_alloc-and-_.patch
@@ -63,7 +63,7 @@ Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
  void *napi_alloc_frag(unsigned int fragsz);
 --- a/mm/page_alloc.c
 +++ b/mm/page_alloc.c
-@@ -3960,8 +3960,8 @@ void __page_frag_drain(struct page *page
+@@ -3959,8 +3959,8 @@ void __page_frag_drain(struct page *page
  }
  EXPORT_SYMBOL(__page_frag_drain);
  
@@ -74,7 +74,7 @@ Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
  {
  	unsigned int size = PAGE_SIZE;
  	struct page *page;
-@@ -4012,19 +4012,19 @@ refill:
+@@ -4011,19 +4011,19 @@ refill:
  
  	return nc->va + offset;
  }
diff --git a/target/linux/generic/backport-4.9/042-mm-rename-__page_frag-functions-to-__page_frag_cache.patch b/target/linux/generic/backport-4.9/042-mm-rename-__page_frag-functions-to-__page_frag_cache.patch
index 117b01d504..64fdc7606c 100644
--- a/target/linux/generic/backport-4.9/042-mm-rename-__page_frag-functions-to-__page_frag_cache.patch
+++ b/target/linux/generic/backport-4.9/042-mm-rename-__page_frag-functions-to-__page_frag_cache.patch
@@ -33,7 +33,7 @@ Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
  extern void page_frag_free(void *addr);
 --- a/mm/page_alloc.c
 +++ b/mm/page_alloc.c
-@@ -3925,8 +3925,8 @@ EXPORT_SYMBOL(free_pages);
+@@ -3924,8 +3924,8 @@ EXPORT_SYMBOL(free_pages);
   * drivers to provide a backing region of memory for use as either an
   * sk_buff->head, or to be used in the "frags" portion of skb_shared_info.
   */
@@ -44,7 +44,7 @@ Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
  {
  	struct page *page = NULL;
  	gfp_t gfp = gfp_mask;
-@@ -3946,19 +3946,20 @@ static struct page *__page_frag_refill(s
+@@ -3945,19 +3945,20 @@ static struct page *__page_frag_refill(s
  	return page;
  }
  
@@ -68,7 +68,7 @@ Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
  
  void *page_frag_alloc(struct page_frag_cache *nc,
  		      unsigned int fragsz, gfp_t gfp_mask)
-@@ -3969,7 +3970,7 @@ void *page_frag_alloc(struct page_frag_c
+@@ -3968,7 +3969,7 @@ void *page_frag_alloc(struct page_frag_c
  
  	if (unlikely(!nc->va)) {
  refill:
diff --git a/target/linux/generic/backport-4.9/090-net-generalize-napi_complete_done.patch b/target/linux/generic/backport-4.9/090-net-generalize-napi_complete_done.patch
index 5c0388ed0f..00f9339abe 100644
--- a/target/linux/generic/backport-4.9/090-net-generalize-napi_complete_done.patch
+++ b/target/linux/generic/backport-4.9/090-net-generalize-napi_complete_done.patch
@@ -214,14 +214,14 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  				   RCANFD_RFCC_RFIE);
 --- a/drivers/net/can/xilinx_can.c
 +++ b/drivers/net/can/xilinx_can.c
-@@ -726,7 +726,7 @@ static int xcan_rx_poll(struct napi_stru
- 		can_led_event(ndev, CAN_LED_EVENT_RX);
+@@ -838,7 +838,7 @@ static int xcan_rx_poll(struct napi_stru
+ 	}
  
  	if (work_done < quota) {
 -		napi_complete(napi);
 +		napi_complete_done(napi, work_done);
  		ier = priv->read_reg(priv, XCAN_IER_OFFSET);
- 		ier |= (XCAN_IXR_RXOK_MASK | XCAN_IXR_RXNEMP_MASK);
+ 		ier |= XCAN_IXR_RXNEMP_MASK;
  		priv->write_reg(priv, XCAN_IER_OFFSET, ier);
 --- a/drivers/net/ethernet/3com/typhoon.c
 +++ b/drivers/net/ethernet/3com/typhoon.c
@@ -1117,7 +1117,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	return work_done;
 --- a/drivers/net/ethernet/sun/sungem.c
 +++ b/drivers/net/ethernet/sun/sungem.c
-@@ -922,7 +922,7 @@ static int gem_poll(struct napi_struct *
+@@ -924,7 +924,7 @@ static int gem_poll(struct napi_struct *
  		gp->status = readl(gp->regs + GREG_STAT);
  	} while (gp->status & GREG_STAT_NAPI);
  
diff --git a/target/linux/generic/hack-4.9/207-disable-modorder.patch b/target/linux/generic/hack-4.9/207-disable-modorder.patch
index f9b3ac4dcf..1a72c91be2 100644
--- a/target/linux/generic/hack-4.9/207-disable-modorder.patch
+++ b/target/linux/generic/hack-4.9/207-disable-modorder.patch
@@ -15,7 +15,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/Makefile
 +++ b/Makefile
-@@ -1211,7 +1211,6 @@ all: modules
+@@ -1212,7 +1212,6 @@ all: modules
  
  PHONY += modules
  modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) modules.builtin
@@ -23,7 +23,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	@$(kecho) '  Building modules, stage 2.';
  	$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
  	$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.fwinst obj=firmware __fw_modbuild
-@@ -1241,7 +1240,6 @@ _modinst_:
+@@ -1242,7 +1241,6 @@ _modinst_:
  		rm -f $(MODLIB)/build ; \
  		ln -s $(CURDIR) $(MODLIB)/build ; \
  	fi
diff --git a/target/linux/generic/hack-4.9/211-host_tools_portability.patch b/target/linux/generic/hack-4.9/211-host_tools_portability.patch
index e6fd328431..e4d6851418 100644
--- a/target/linux/generic/hack-4.9/211-host_tools_portability.patch
+++ b/target/linux/generic/hack-4.9/211-host_tools_portability.patch
@@ -12,7 +12,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/tools/build/Build.include
 +++ b/tools/build/Build.include
-@@ -95,4 +95,4 @@ cxx_flags = -Wp,-MD,$(depfile),-MT,$@ $(
+@@ -96,4 +96,4 @@ cxx_flags = -Wp,-MD,$(depfile),-MT,$@ $(
  ###
  ## HOSTCC C flags
  
diff --git a/target/linux/generic/hack-4.9/220-gc_sections.patch b/target/linux/generic/hack-4.9/220-gc_sections.patch
index 40e4905db2..a041ff1d03 100644
--- a/target/linux/generic/hack-4.9/220-gc_sections.patch
+++ b/target/linux/generic/hack-4.9/220-gc_sections.patch
@@ -33,9 +33,9 @@ Signed-off-by: Gabor Juhos <juhosg at openwrt.org>
  # Read KERNELRELEASE from include/config/kernel.release (if it exists)
  KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null)
  KERNELVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if $(SUBLEVEL),.$(SUBLEVEL)))$(EXTRAVERSION)
-@@ -636,11 +641,6 @@ KBUILD_CFLAGS	+= $(call cc-disable-warni
- KBUILD_CFLAGS	+= $(call cc-disable-warning, format-overflow)
+@@ -637,11 +642,6 @@ KBUILD_CFLAGS	+= $(call cc-disable-warni
  KBUILD_CFLAGS	+= $(call cc-disable-warning, int-in-bool-context)
+ KBUILD_CFLAGS	+= $(call cc-disable-warning, attribute-alias)
  
 -ifdef CONFIG_LD_DEAD_CODE_DATA_ELIMINATION
 -KBUILD_CFLAGS	+= $(call cc-option,-ffunction-sections,)
diff --git a/target/linux/generic/pending-4.9/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch b/target/linux/generic/pending-4.9/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch
index adae2e049c..5b886b30fd 100644
--- a/target/linux/generic/pending-4.9/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch
+++ b/target/linux/generic/pending-4.9/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch
@@ -71,7 +71,7 @@ Signed-off-by: Tobias Wolf <dev-NTEO at vplace.de>
 
 --- a/mm/page_alloc.c
 +++ b/mm/page_alloc.c
-@@ -5918,7 +5918,7 @@ static void __ref alloc_node_mem_map(str
+@@ -5932,7 +5932,7 @@ static void __ref alloc_node_mem_map(str
  		mem_map = NODE_DATA(0)->node_mem_map;
  #if defined(CONFIG_HAVE_MEMBLOCK_NODE_MAP) || defined(CONFIG_FLATMEM)
  		if (page_to_pfn(mem_map) != pgdat->node_start_pfn)
diff --git a/target/linux/generic/pending-4.9/201-extra_optimization.patch b/target/linux/generic/pending-4.9/201-extra_optimization.patch
index 2da816e4e0..3e878e96d6 100644
--- a/target/linux/generic/pending-4.9/201-extra_optimization.patch
+++ b/target/linux/generic/pending-4.9/201-extra_optimization.patch
@@ -14,7 +14,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/Makefile
 +++ b/Makefile
-@@ -642,12 +642,12 @@ KBUILD_CFLAGS	+= $(call cc-option,-fdata
+@@ -643,12 +643,12 @@ KBUILD_CFLAGS	+= $(call cc-option,-fdata
  endif
  
  ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
diff --git a/target/linux/generic/pending-4.9/610-netfilter_match_bypass_default_checks.patch b/target/linux/generic/pending-4.9/610-netfilter_match_bypass_default_checks.patch
index 217d20ec5d..d3a6afa804 100644
--- a/target/linux/generic/pending-4.9/610-netfilter_match_bypass_default_checks.patch
+++ b/target/linux/generic/pending-4.9/610-netfilter_match_bypass_default_checks.patch
@@ -68,7 +68,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	if (!xt_percpu_counter_alloc(alloc_state, &e->counters))
  		return -ENOMEM;
  
-@@ -829,6 +857,7 @@ copy_entries_to_user(unsigned int total_
+@@ -830,6 +858,7 @@ copy_entries_to_user(unsigned int total_
  	const struct xt_table_info *private = table->private;
  	int ret = 0;
  	const void *loc_cpu_entry;
@@ -76,7 +76,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  
  	counters = alloc_counters(table);
  	if (IS_ERR(counters))
-@@ -856,6 +885,14 @@ copy_entries_to_user(unsigned int total_
+@@ -857,6 +886,14 @@ copy_entries_to_user(unsigned int total_
  			goto free_counters;
  		}
  
@@ -91,7 +91,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  		for (i = sizeof(struct ipt_entry);
  		     i < e->target_offset;
  		     i += m->u.match_size) {
-@@ -1245,12 +1282,15 @@ compat_copy_entry_to_user(struct ipt_ent
+@@ -1246,12 +1283,15 @@ compat_copy_entry_to_user(struct ipt_ent
  	compat_uint_t origsize;
  	const struct xt_entry_match *ematch;
  	int ret = 0;
diff --git a/target/linux/generic/pending-4.9/630-packet_socket_type.patch b/target/linux/generic/pending-4.9/630-packet_socket_type.patch
index 0bf9339d11..08d730ac31 100644
--- a/target/linux/generic/pending-4.9/630-packet_socket_type.patch
+++ b/target/linux/generic/pending-4.9/630-packet_socket_type.patch
@@ -87,7 +87,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	if (!net_eq(dev_net(dev), sock_net(sk)))
  		goto drop;
  
-@@ -3262,6 +3264,7 @@ static int packet_create(struct net *net
+@@ -3260,6 +3262,7 @@ static int packet_create(struct net *net
  	mutex_init(&po->pg_vec_lock);
  	po->rollover = NULL;
  	po->prot_hook.func = packet_rcv;
@@ -95,7 +95,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  
  	if (sock->type == SOCK_PACKET)
  		po->prot_hook.func = packet_rcv_spkt;
-@@ -3875,6 +3878,16 @@ packet_setsockopt(struct socket *sock, i
+@@ -3873,6 +3876,16 @@ packet_setsockopt(struct socket *sock, i
  		po->xmit = val ? packet_direct_xmit : dev_queue_xmit;
  		return 0;
  	}
@@ -112,7 +112,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	default:
  		return -ENOPROTOOPT;
  	}
-@@ -3927,6 +3940,13 @@ static int packet_getsockopt(struct sock
+@@ -3925,6 +3938,13 @@ static int packet_getsockopt(struct sock
  	case PACKET_VNET_HDR:
  		val = po->has_vnet_hdr;
  		break;
diff --git a/target/linux/generic/pending-4.9/834-ledtrig-libata.patch b/target/linux/generic/pending-4.9/834-ledtrig-libata.patch
index 4b319bd399..b2c0b48980 100644
--- a/target/linux/generic/pending-4.9/834-ledtrig-libata.patch
+++ b/target/linux/generic/pending-4.9/834-ledtrig-libata.patch
@@ -65,7 +65,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  /**
   *	ata_build_rw_tf - Build ATA taskfile for given read/write request
   *	@tf: Target ATA taskfile
-@@ -4991,6 +5004,9 @@ struct ata_queued_cmd *ata_qc_new_init(s
+@@ -4994,6 +5007,9 @@ struct ata_queued_cmd *ata_qc_new_init(s
  		if (tag < 0)
  			return NULL;
  	}
@@ -75,7 +75,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  
  	qc = __ata_qc_from_tag(ap, tag);
  	qc->tag = tag;
-@@ -5892,6 +5908,9 @@ struct ata_port *ata_port_alloc(struct a
+@@ -5895,6 +5911,9 @@ struct ata_port *ata_port_alloc(struct a
  	ap->stats.unhandled_irq = 1;
  	ap->stats.idle_irq = 1;
  #endif
@@ -85,7 +85,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  	ata_sff_port_init(ap);
  
  	return ap;
-@@ -5913,6 +5932,12 @@ static void ata_host_release(struct devi
+@@ -5916,6 +5935,12 @@ static void ata_host_release(struct devi
  
  		kfree(ap->pmp_link);
  		kfree(ap->slave_link);
@@ -98,7 +98,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  		kfree(ap);
  		host->ports[i] = NULL;
  	}
-@@ -6359,7 +6384,23 @@ int ata_host_register(struct ata_host *h
+@@ -6362,7 +6387,23 @@ int ata_host_register(struct ata_host *h
  		host->ports[i]->print_id = atomic_inc_return(&ata_print_id);
  		host->ports[i]->local_port_no = i + 1;
  	}
@@ -134,7 +134,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  
  /*
   * Define if arch has non-standard setup.  This is a _PCI_ standard
-@@ -883,6 +886,12 @@ struct ata_port {
+@@ -884,6 +887,12 @@ struct ata_port {
  #ifdef CONFIG_ATA_ACPI
  	struct ata_acpi_gtm	__acpi_init_gtm; /* use ata_acpi_init_gtm() */
  #endif
diff --git a/target/linux/generic/pending-4.9/900-gen_stats-fix-netlink-stats-padding.patch b/target/linux/generic/pending-4.9/900-gen_stats-fix-netlink-stats-padding.patch
deleted file mode 100644
index f5ceecca93..0000000000
--- a/target/linux/generic/pending-4.9/900-gen_stats-fix-netlink-stats-padding.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-The gen_stats facility will add a header for the toplevel nlattr of type
-TCA_STATS2 that contains all stats added by qdisc callbacks. A reference
-to this header is stored in the gnet_dump struct, and when all the
-per-qdisc callbacks have finished adding their stats, the length of the
-containing header will be adjusted to the right value.
-
-However, on architectures that need padding (i.e., that don't set
-CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS), the padding nlattr is added
-before the stats, which means that the stored pointer will point to the
-padding, and so when the header is fixed up, the result is just a very
-big padding nlattr. Because most qdiscs also supply the legacy TCA_STATS
-struct, this problem has been mostly invisible, but we exposed it with
-the netlink attribute-based statistics in CAKE.
-
-Fix the issue by fixing up the stored pointer if it points to a padding
-nlattr.
-
-Tested-by: Pete Heist <pete at heistp.net>
-Tested-by: Kevin Darbyshire-Bryant <kevin at darbyshire-bryant.me.uk>
-Signed-off-by: Toke H?iland-J?rgensen <toke at toke.dk>
----
- net/core/gen_stats.c |   16 ++++++++++++++--
- 1 file changed, 14 insertions(+), 2 deletions(-)
-
---- a/net/core/gen_stats.c
-+++ b/net/core/gen_stats.c
-@@ -77,8 +77,20 @@ gnet_stats_start_copy_compat(struct sk_b
- 		d->lock = lock;
- 		spin_lock_bh(lock);
- 	}
--	if (d->tail)
--		return gnet_stats_copy(d, type, NULL, 0, padattr);
-+	if (d->tail) {
-+		int ret = gnet_stats_copy(d, type, NULL, 0, padattr);
-+
-+		/* The initial attribute added in gnet_stats_copy() may be
-+		 * preceded by a padding attribute, in which case d->tail will
-+		 * end up pointing at the padding instead of the real attribute.
-+		 * Fix this so gnet_stats_finish_copy() adjusts the length of
-+		 * the right attribute.
-+		 */
-+		if (ret == 0 && d->tail->nla_type == padattr)
-+			d->tail = (struct nlattr *)((char *)d->tail +
-+						    NLA_ALIGN(d->tail->nla_len));
-+		return ret;
-+	}
- 
- 	return 0;
- }
diff --git a/target/linux/ixp4xx/patches-4.9/600-skb_avoid_dmabounce.patch b/target/linux/ixp4xx/patches-4.9/600-skb_avoid_dmabounce.patch
index 80688a4c0a..046ec4e8f3 100644
--- a/target/linux/ixp4xx/patches-4.9/600-skb_avoid_dmabounce.patch
+++ b/target/linux/ixp4xx/patches-4.9/600-skb_avoid_dmabounce.patch
@@ -10,7 +10,7 @@
  
  	/* Get the HEAD */
  	skb = kmem_cache_alloc_node(cache, gfp_mask & ~__GFP_DMA, node);
-@@ -1223,6 +1226,10 @@ int pskb_expand_head(struct sk_buff *skb
+@@ -1224,6 +1227,10 @@ int pskb_expand_head(struct sk_buff *skb
  	if (skb_shared(skb))
  		BUG();
  
diff --git a/target/linux/lantiq/patches-4.9/0022-MTD-m25p80-allow-loading-mtd-name-from-OF.patch b/target/linux/lantiq/patches-4.9/0022-MTD-m25p80-allow-loading-mtd-name-from-OF.patch
index 7617c14ddb..cfeded1ebc 100644
--- a/target/linux/lantiq/patches-4.9/0022-MTD-m25p80-allow-loading-mtd-name-from-OF.patch
+++ b/target/linux/lantiq/patches-4.9/0022-MTD-m25p80-allow-loading-mtd-name-from-OF.patch
@@ -22,7 +22,7 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
  
  #include <linux/mtd/mtd.h>
  #include <linux/mtd/partitions.h>
-@@ -200,6 +201,10 @@ static int m25p_probe(struct spi_device
+@@ -201,6 +202,10 @@ static int m25p_probe(struct spi_device
  	enum read_mode mode = SPI_NOR_NORMAL;
  	char *flash_name;
  	int ret;
@@ -33,7 +33,7 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
  
  	data = dev_get_platdata(&spi->dev);
  
-@@ -229,6 +234,8 @@ static int m25p_probe(struct spi_device
+@@ -230,6 +235,8 @@ static int m25p_probe(struct spi_device
  
  	if (data && data->name)
  		nor->mtd.name = data->name;
diff --git a/target/linux/layerscape/patches-4.9/202-core-linux-support-layerscape.patch b/target/linux/layerscape/patches-4.9/202-core-linux-support-layerscape.patch
index dd71b826fd..3484fc398e 100644
--- a/target/linux/layerscape/patches-4.9/202-core-linux-support-layerscape.patch
+++ b/target/linux/layerscape/patches-4.9/202-core-linux-support-layerscape.patch
@@ -384,7 +384,7 @@ Signed-off-by: Yangbo Lu <yangbo.lu at nxp.com>
  void  __kfree_skb(struct sk_buff *skb);
  extern struct kmem_cache *skbuff_head_cache;
  
-@@ -3057,6 +3058,7 @@ static inline void skb_free_datagram_loc
+@@ -3059,6 +3060,7 @@ static inline void skb_free_datagram_loc
  }
  int skb_kill_datagram(struct sock *sk, struct sk_buff *skb, unsigned int flags);
  int skb_copy_bits(const struct sk_buff *skb, int offset, void *to, int len);
@@ -477,7 +477,7 @@ Signed-off-by: Yangbo Lu <yangbo.lu at nxp.com>
  /* Make sure a field is enclosed inside headers_start/headers_end section */
  #define CHECK_SKB_FIELD(field) \
  	BUILD_BUG_ON(offsetof(struct sk_buff, field) <		\
-@@ -1074,7 +1100,7 @@ static void skb_headers_offset_update(st
+@@ -1075,7 +1101,7 @@ static void skb_headers_offset_update(st
  	skb->inner_mac_header += off;
  }
  
@@ -486,7 +486,7 @@ Signed-off-by: Yangbo Lu <yangbo.lu at nxp.com>
  {
  	__copy_skb_header(new, old);
  
-@@ -1082,6 +1108,7 @@ static void copy_skb_header(struct sk_bu
+@@ -1083,6 +1109,7 @@ static void copy_skb_header(struct sk_bu
  	skb_shinfo(new)->gso_segs = skb_shinfo(old)->gso_segs;
  	skb_shinfo(new)->gso_type = skb_shinfo(old)->gso_type;
  }
diff --git a/target/linux/layerscape/patches-4.9/703-phy-support-layerscape.patch b/target/linux/layerscape/patches-4.9/703-phy-support-layerscape.patch
index acc75cdc2c..4327a26648 100644
--- a/target/linux/layerscape/patches-4.9/703-phy-support-layerscape.patch
+++ b/target/linux/layerscape/patches-4.9/703-phy-support-layerscape.patch
@@ -1724,7 +1724,7 @@ Signed-off-by: Yangbo Lu <yangbo.lu at nxp.com>
  		ret = phydrv->resume(phydev);
  
  	if (ret)
-@@ -1726,7 +1726,7 @@ static int phy_remove(struct device *dev
+@@ -1723,7 +1723,7 @@ static int phy_remove(struct device *dev
  	phydev->state = PHY_DOWN;
  	mutex_unlock(&phydev->lock);
  
diff --git a/target/linux/layerscape/patches-4.9/817-usb-support-layerscape.patch b/target/linux/layerscape/patches-4.9/817-usb-support-layerscape.patch
index 3ec91b4982..9225e93c1a 100644
--- a/target/linux/layerscape/patches-4.9/817-usb-support-layerscape.patch
+++ b/target/linux/layerscape/patches-4.9/817-usb-support-layerscape.patch
@@ -87,7 +87,7 @@ Signed-off-by: Yangbo Lu <yangbo.lu at nxp.com>
  			pkt_len = le32_to_cpu(rx_desc->opts1) & RX_LEN_MASK;
  			if (pkt_len < ETH_ZLEN)
  				break;
-@@ -4509,6 +4514,7 @@ static struct usb_device_id rtl8152_tabl
+@@ -4510,6 +4515,7 @@ static struct usb_device_id rtl8152_tabl
  	{REALTEK_USB_DEVICE(VENDOR_ID_LENOVO,  0x304f)},
  	{REALTEK_USB_DEVICE(VENDOR_ID_LINKSYS, 0x0041)},
  	{REALTEK_USB_DEVICE(VENDOR_ID_NVIDIA,  0x09ff)},
@@ -156,7 +156,7 @@ Signed-off-by: Yangbo Lu <yangbo.lu at nxp.com>
  	int ret;
 --- a/drivers/usb/core/hub.c
 +++ b/drivers/usb/core/hub.c
-@@ -4423,6 +4423,14 @@ hub_port_init(struct usb_hub *hub, struc
+@@ -4427,6 +4427,14 @@ hub_port_init(struct usb_hub *hub, struc
  	else
  		speed = usb_speed_string(udev->speed);
  
@@ -1494,7 +1494,7 @@ Signed-off-by: Yangbo Lu <yangbo.lu at nxp.com>
  		while (ep_ring->dequeue != td->last_trb)
 --- a/drivers/usb/host/xhci.c
 +++ b/drivers/usb/host/xhci.c
-@@ -1570,14 +1570,38 @@ int xhci_urb_dequeue(struct usb_hcd *hcd
+@@ -1604,14 +1604,38 @@ int xhci_urb_dequeue(struct usb_hcd *hcd
  			ret = -ENOMEM;
  			goto done;
  		}
@@ -1542,7 +1542,7 @@ Signed-off-by: Yangbo Lu <yangbo.lu at nxp.com>
  	spin_unlock_irqrestore(&xhci->lock, flags);
 --- a/drivers/usb/host/xhci.h
 +++ b/drivers/usb/host/xhci.h
-@@ -1621,7 +1621,7 @@ struct xhci_hcd {
+@@ -1625,7 +1625,7 @@ struct xhci_hcd {
  #define XHCI_STATE_REMOVING	(1 << 2)
  	/* Statistics */
  	int			error_bitmask;
@@ -1551,7 +1551,7 @@ Signed-off-by: Yangbo Lu <yangbo.lu at nxp.com>
  #define	XHCI_LINK_TRB_QUIRK	(1 << 0)
  #define XHCI_RESET_EP_QUIRK	(1 << 1)
  #define XHCI_NEC_HOST		(1 << 2)
-@@ -1657,6 +1657,9 @@ struct xhci_hcd {
+@@ -1661,6 +1661,9 @@ struct xhci_hcd {
  #define XHCI_SSIC_PORT_UNUSED	(1 << 22)
  #define XHCI_NO_64BIT_SUPPORT	(1 << 23)
  #define XHCI_MISSING_CAS	(1 << 24)
diff --git a/target/linux/sunxi/patches-4.9/0052-stmmac-form-4-12.patch b/target/linux/sunxi/patches-4.9/0052-stmmac-form-4-12.patch
index 1ed1294694..a1b018186f 100644
--- a/target/linux/sunxi/patches-4.9/0052-stmmac-form-4-12.patch
+++ b/target/linux/sunxi/patches-4.9/0052-stmmac-form-4-12.patch
@@ -3095,7 +3095,7 @@
  
  	if (priv->hw->mode->set_16kib_bfsize)
  		bfsize = priv->hw->mode->set_16kib_bfsize(dev->mtu);
-@@ -1033,257 +1234,516 @@ static int init_dma_desc_rings(struct ne
+@@ -1033,235 +1234,409 @@ static int init_dma_desc_rings(struct ne
  
  	priv->dma_buf_sz = bfsize;
  
@@ -3351,10 +3351,17 @@
 -						 priv->tx_skbuff_dma[i].buf,
 -						 priv->tx_skbuff_dma[i].len,
 -						 DMA_TO_DEVICE);
+-		}
 +	for (i = 0; i < DMA_TX_SIZE; i++)
 +		stmmac_free_tx_buffer(priv, queue, i);
 +}
-+
+ 
+-		if (priv->tx_skbuff[i]) {
+-			dev_kfree_skb_any(priv->tx_skbuff[i]);
+-			priv->tx_skbuff[i] = NULL;
+-			priv->tx_skbuff_dma[i].buf = 0;
+-			priv->tx_skbuff_dma[i].map_as_page = false;
+-		}
 +/**
 + * free_dma_rx_desc_resources - free RX dma desc resources
 + * @priv: private structure
@@ -3383,10 +3390,11 @@
 +
 +		kfree(rx_q->rx_skbuff_dma);
 +		kfree(rx_q->rx_skbuff);
-+	}
-+}
-+
-+/**
+ 	}
+ }
+ 
+ /**
+- * alloc_dma_desc_resources - alloc TX/RX resources.
 + * free_dma_tx_desc_resources - free TX dma desc resources
 + * @priv: private structure
 + */
@@ -3419,36 +3427,90 @@
 +
 +/**
 + * alloc_dma_rx_desc_resources - alloc RX resources.
-+ * @priv: private structure
-+ * Description: according to which descriptor can be used (extend or basic)
-+ * this function allocates the resources for TX and RX paths. In case of
-+ * reception, for example, it pre-allocated the RX socket buffer in order to
-+ * allow zero-copy mechanism.
-+ */
+  * @priv: private structure
+  * Description: according to which descriptor can be used (extend or basic)
+  * this function allocates the resources for TX and RX paths. In case of
+  * reception, for example, it pre-allocated the RX socket buffer in order to
+  * allow zero-copy mechanism.
+  */
+-static int alloc_dma_desc_resources(struct stmmac_priv *priv)
 +static int alloc_dma_rx_desc_resources(struct stmmac_priv *priv)
-+{
+ {
 +	u32 rx_count = priv->plat->rx_queues_to_use;
-+	int ret = -ENOMEM;
+ 	int ret = -ENOMEM;
 +	u32 queue;
-+
+ 
+-	priv->rx_skbuff_dma = kmalloc_array(DMA_RX_SIZE, sizeof(dma_addr_t),
+-					    GFP_KERNEL);
+-	if (!priv->rx_skbuff_dma)
+-		return -ENOMEM;
 +	/* RX queues buffers and DMA */
 +	for (queue = 0; queue < rx_count; queue++) {
 +		struct stmmac_rx_queue *rx_q = &priv->rx_queue[queue];
-+
+ 
+-	priv->rx_skbuff = kmalloc_array(DMA_RX_SIZE, sizeof(struct sk_buff *),
+-					GFP_KERNEL);
+-	if (!priv->rx_skbuff)
+-		goto err_rx_skbuff;
+-
+-	priv->tx_skbuff_dma = kmalloc_array(DMA_TX_SIZE,
+-					    sizeof(*priv->tx_skbuff_dma),
+-					    GFP_KERNEL);
+-	if (!priv->tx_skbuff_dma)
+-		goto err_tx_skbuff_dma;
+-
+-	priv->tx_skbuff = kmalloc_array(DMA_TX_SIZE, sizeof(struct sk_buff *),
+-					GFP_KERNEL);
+-	if (!priv->tx_skbuff)
+-		goto err_tx_skbuff;
+-
+-	if (priv->extend_desc) {
+-		priv->dma_erx = dma_zalloc_coherent(priv->device, DMA_RX_SIZE *
+-						    sizeof(struct
+-							   dma_extended_desc),
+-						    &priv->dma_rx_phy,
+-						    GFP_KERNEL);
+-		if (!priv->dma_erx)
+-			goto err_dma;
 +		rx_q->queue_index = queue;
 +		rx_q->priv_data = priv;
-+
+ 
+-		priv->dma_etx = dma_zalloc_coherent(priv->device, DMA_TX_SIZE *
+-						    sizeof(struct
+-							   dma_extended_desc),
+-						    &priv->dma_tx_phy,
 +		rx_q->rx_skbuff_dma = kmalloc_array(DMA_RX_SIZE,
 +						    sizeof(dma_addr_t),
-+						    GFP_KERNEL);
+ 						    GFP_KERNEL);
+-		if (!priv->dma_etx) {
+-			dma_free_coherent(priv->device, DMA_RX_SIZE *
+-					  sizeof(struct dma_extended_desc),
+-					  priv->dma_erx, priv->dma_rx_phy);
+-			goto err_dma;
+-		}
+-	} else {
+-		priv->dma_rx = dma_zalloc_coherent(priv->device, DMA_RX_SIZE *
+-						   sizeof(struct dma_desc),
+-						   &priv->dma_rx_phy,
+-						   GFP_KERNEL);
+-		if (!priv->dma_rx)
+-			goto err_dma;
 +		if (!rx_q->rx_skbuff_dma)
 +			return -ENOMEM;
-+
+ 
+-		priv->dma_tx = dma_zalloc_coherent(priv->device, DMA_TX_SIZE *
+-						   sizeof(struct dma_desc),
+-						   &priv->dma_tx_phy,
+-						   GFP_KERNEL);
+-		if (!priv->dma_tx) {
+-			dma_free_coherent(priv->device, DMA_RX_SIZE *
+-					  sizeof(struct dma_desc),
+-					  priv->dma_rx, priv->dma_rx_phy);
 +		rx_q->rx_skbuff = kmalloc_array(DMA_RX_SIZE,
 +						sizeof(struct sk_buff *),
 +						GFP_KERNEL);
 +		if (!rx_q->rx_skbuff)
-+			goto err_dma;
+ 			goto err_dma;
 +
 +		if (priv->extend_desc) {
 +			rx_q->dma_erx = dma_zalloc_coherent(priv->device,
@@ -3469,12 +3531,19 @@
 +							   GFP_KERNEL);
 +			if (!rx_q->dma_rx)
 +				goto err_dma;
-+		}
-+	}
-+
-+	return 0;
-+
-+err_dma:
+ 		}
+ 	}
+ 
+ 	return 0;
+ 
+ err_dma:
+-	kfree(priv->tx_skbuff);
+-err_tx_skbuff:
+-	kfree(priv->tx_skbuff_dma);
+-err_tx_skbuff_dma:
+-	kfree(priv->rx_skbuff);
+-err_rx_skbuff:
+-	kfree(priv->rx_skbuff_dma);
 +	free_dma_rx_desc_resources(priv);
 +
 +	return ret;
@@ -3531,7 +3600,7 @@
 +							   GFP_KERNEL);
 +			if (!tx_q->dma_tx)
 +				goto err_dma_buffers;
- 		}
++		}
 +	}
 +
 +	return 0;
@@ -3560,126 +3629,85 @@
 +
 +	ret = alloc_dma_tx_desc_resources(priv);
 +
-+	return ret;
-+}
-+
+ 	return ret;
+ }
+ 
 +/**
 + * free_dma_desc_resources - free dma desc resources
 + * @priv: private structure
 + */
-+static void free_dma_desc_resources(struct stmmac_priv *priv)
-+{
+ static void free_dma_desc_resources(struct stmmac_priv *priv)
+ {
+-	/* Release the DMA TX/RX socket buffers */
+-	dma_free_rx_skbufs(priv);
+-	dma_free_tx_skbufs(priv);
+-
+-	/* Free DMA regions of consistent memory previously allocated */
+-	if (!priv->extend_desc) {
+-		dma_free_coherent(priv->device,
+-				  DMA_TX_SIZE * sizeof(struct dma_desc),
+-				  priv->dma_tx, priv->dma_tx_phy);
+-		dma_free_coherent(priv->device,
+-				  DMA_RX_SIZE * sizeof(struct dma_desc),
+-				  priv->dma_rx, priv->dma_rx_phy);
+-	} else {
+-		dma_free_coherent(priv->device, DMA_TX_SIZE *
+-				  sizeof(struct dma_extended_desc),
+-				  priv->dma_etx, priv->dma_tx_phy);
+-		dma_free_coherent(priv->device, DMA_RX_SIZE *
+-				  sizeof(struct dma_extended_desc),
+-				  priv->dma_erx, priv->dma_rx_phy);
+-	}
+-	kfree(priv->rx_skbuff_dma);
+-	kfree(priv->rx_skbuff);
+-	kfree(priv->tx_skbuff_dma);
+-	kfree(priv->tx_skbuff);
 +	/* Release the DMA RX socket buffers */
 +	free_dma_rx_desc_resources(priv);
 +
 +	/* Release the DMA TX socket buffers */
 +	free_dma_tx_desc_resources(priv);
-+}
-+
-+/**
-+ *  stmmac_mac_enable_rx_queues - Enable MAC rx queues
-+ *  @priv: driver private structure
-+ *  Description: It is used for enabling the rx queues in the MAC
-+ */
-+static void stmmac_mac_enable_rx_queues(struct stmmac_priv *priv)
-+{
+ }
+ 
+ /**
+@@ -1271,19 +1646,104 @@ static void free_dma_desc_resources(stru
+  */
+ static void stmmac_mac_enable_rx_queues(struct stmmac_priv *priv)
+ {
+-	int rx_count = priv->dma_cap.number_rx_queues;
+-	int queue = 0;
 +	u32 rx_queues_count = priv->plat->rx_queues_to_use;
 +	int queue;
 +	u8 mode;
  
--		if (priv->tx_skbuff[i]) {
--			dev_kfree_skb_any(priv->tx_skbuff[i]);
--			priv->tx_skbuff[i] = NULL;
--			priv->tx_skbuff_dma[i].buf = 0;
--			priv->tx_skbuff_dma[i].map_as_page = false;
--		}
+-	/* If GMAC does not have multiple queues, then this is not necessary*/
+-	if (rx_count == 1)
+-		return;
 +	for (queue = 0; queue < rx_queues_count; queue++) {
 +		mode = priv->plat->rx_queues_cfg[queue].mode_to_use;
 +		priv->hw->mac->rx_queue_enable(priv->hw, mode, queue);
- 	}
- }
++	}
++}
  
- /**
-- * alloc_dma_desc_resources - alloc TX/RX resources.
-- * @priv: private structure
-- * Description: according to which descriptor can be used (extend or basic)
-- * this function allocates the resources for TX and RX paths. In case of
-- * reception, for example, it pre-allocated the RX socket buffer in order to
-- * allow zero-copy mechanism.
+-	/**
+-	 *  If the core is synthesized with multiple rx queues / multiple
+-	 *  dma channels, then rx queues will be disabled by default.
+-	 *  For now only rx queue 0 is enabled.
+-	 */
+-	priv->hw->mac->rx_queue_enable(priv->hw, queue);
++/**
 + * stmmac_start_rx_dma - start RX DMA channel
 + * @priv: driver private structure
 + * @chan: RX channel index
 + * Description:
 + * This starts a RX DMA channel
-  */
--static int alloc_dma_desc_resources(struct stmmac_priv *priv)
++ */
 +static void stmmac_start_rx_dma(struct stmmac_priv *priv, u32 chan)
- {
--	int ret = -ENOMEM;
--
--	priv->rx_skbuff_dma = kmalloc_array(DMA_RX_SIZE, sizeof(dma_addr_t),
--					    GFP_KERNEL);
--	if (!priv->rx_skbuff_dma)
--		return -ENOMEM;
--
--	priv->rx_skbuff = kmalloc_array(DMA_RX_SIZE, sizeof(struct sk_buff *),
--					GFP_KERNEL);
--	if (!priv->rx_skbuff)
--		goto err_rx_skbuff;
--
--	priv->tx_skbuff_dma = kmalloc_array(DMA_TX_SIZE,
--					    sizeof(*priv->tx_skbuff_dma),
--					    GFP_KERNEL);
--	if (!priv->tx_skbuff_dma)
--		goto err_tx_skbuff_dma;
--
--	priv->tx_skbuff = kmalloc_array(DMA_TX_SIZE, sizeof(struct sk_buff *),
--					GFP_KERNEL);
--	if (!priv->tx_skbuff)
--		goto err_tx_skbuff;
--
--	if (priv->extend_desc) {
--		priv->dma_erx = dma_zalloc_coherent(priv->device, DMA_RX_SIZE *
--						    sizeof(struct
--							   dma_extended_desc),
--						    &priv->dma_rx_phy,
--						    GFP_KERNEL);
--		if (!priv->dma_erx)
--			goto err_dma;
--
--		priv->dma_etx = dma_zalloc_coherent(priv->device, DMA_TX_SIZE *
--						    sizeof(struct
--							   dma_extended_desc),
--						    &priv->dma_tx_phy,
--						    GFP_KERNEL);
--		if (!priv->dma_etx) {
--			dma_free_coherent(priv->device, DMA_RX_SIZE *
--					  sizeof(struct dma_extended_desc),
--					  priv->dma_erx, priv->dma_rx_phy);
--			goto err_dma;
--		}
--	} else {
--		priv->dma_rx = dma_zalloc_coherent(priv->device, DMA_RX_SIZE *
--						   sizeof(struct dma_desc),
--						   &priv->dma_rx_phy,
--						   GFP_KERNEL);
--		if (!priv->dma_rx)
--			goto err_dma;
++{
 +	netdev_dbg(priv->dev, "DMA RX processes started in channel %d\n", chan);
 +	priv->hw->dma->start_rx(priv->ioaddr, chan);
 +}
- 
--		priv->dma_tx = dma_zalloc_coherent(priv->device, DMA_TX_SIZE *
--						   sizeof(struct dma_desc),
--						   &priv->dma_tx_phy,
--						   GFP_KERNEL);
--		if (!priv->dma_tx) {
--			dma_free_coherent(priv->device, DMA_RX_SIZE *
--					  sizeof(struct dma_desc),
--					  priv->dma_rx, priv->dma_rx_phy);
--			goto err_dma;
--		}
--	}
++
 +/**
 + * stmmac_start_tx_dma - start TX DMA channel
 + * @priv: driver private structure
@@ -3692,8 +3720,7 @@
 +	netdev_dbg(priv->dev, "DMA TX processes started in channel %d\n", chan);
 +	priv->hw->dma->start_tx(priv->ioaddr, chan);
 +}
- 
--	return 0;
++
 +/**
 + * stmmac_stop_rx_dma - stop RX DMA channel
 + * @priv: driver private structure
@@ -3706,16 +3733,7 @@
 +	netdev_dbg(priv->dev, "DMA RX processes stopped in channel %d\n", chan);
 +	priv->hw->dma->stop_rx(priv->ioaddr, chan);
 +}
- 
--err_dma:
--	kfree(priv->tx_skbuff);
--err_tx_skbuff:
--	kfree(priv->tx_skbuff_dma);
--err_tx_skbuff_dma:
--	kfree(priv->rx_skbuff);
--err_rx_skbuff:
--	kfree(priv->rx_skbuff_dma);
--	return ret;
++
 +/**
 + * stmmac_stop_tx_dma - stop TX DMA channel
 + * @priv: driver private structure
@@ -3727,9 +3745,8 @@
 +{
 +	netdev_dbg(priv->dev, "DMA TX processes stopped in channel %d\n", chan);
 +	priv->hw->dma->stop_tx(priv->ioaddr, chan);
- }
- 
--static void free_dma_desc_resources(struct stmmac_priv *priv)
++}
++
 +/**
 + * stmmac_start_all_dma - start all RX and TX DMA channels
 + * @priv: driver private structure
@@ -3737,31 +3754,7 @@
 + * This starts all the RX and TX DMA channels
 + */
 +static void stmmac_start_all_dma(struct stmmac_priv *priv)
- {
--	/* Release the DMA TX/RX socket buffers */
--	dma_free_rx_skbufs(priv);
--	dma_free_tx_skbufs(priv);
--
--	/* Free DMA regions of consistent memory previously allocated */
--	if (!priv->extend_desc) {
--		dma_free_coherent(priv->device,
--				  DMA_TX_SIZE * sizeof(struct dma_desc),
--				  priv->dma_tx, priv->dma_tx_phy);
--		dma_free_coherent(priv->device,
--				  DMA_RX_SIZE * sizeof(struct dma_desc),
--				  priv->dma_rx, priv->dma_rx_phy);
--	} else {
--		dma_free_coherent(priv->device, DMA_TX_SIZE *
--				  sizeof(struct dma_extended_desc),
--				  priv->dma_etx, priv->dma_tx_phy);
--		dma_free_coherent(priv->device, DMA_RX_SIZE *
--				  sizeof(struct dma_extended_desc),
--				  priv->dma_erx, priv->dma_rx_phy);
--	}
--	kfree(priv->rx_skbuff_dma);
--	kfree(priv->rx_skbuff);
--	kfree(priv->tx_skbuff_dma);
--	kfree(priv->tx_skbuff);
++{
 +	u32 rx_channels_count = priv->plat->rx_queues_to_use;
 +	u32 tx_channels_count = priv->plat->tx_queues_to_use;
 +	u32 chan = 0;
@@ -3771,38 +3764,23 @@
 +
 +	for (chan = 0; chan < tx_channels_count; chan++)
 +		stmmac_start_tx_dma(priv, chan);
- }
- 
- /**
-- *  stmmac_mac_enable_rx_queues - Enable MAC rx queues
-- *  @priv: driver private structure
-- *  Description: It is used for enabling the rx queues in the MAC
++}
++
++/**
 + * stmmac_stop_all_dma - stop all RX and TX DMA channels
 + * @priv: driver private structure
 + * Description:
 + * This stops the RX and TX DMA channels
-  */
--static void stmmac_mac_enable_rx_queues(struct stmmac_priv *priv)
++ */
 +static void stmmac_stop_all_dma(struct stmmac_priv *priv)
- {
--	int rx_count = priv->dma_cap.number_rx_queues;
--	int queue = 0;
++{
 +	u32 rx_channels_count = priv->plat->rx_queues_to_use;
 +	u32 tx_channels_count = priv->plat->tx_queues_to_use;
 +	u32 chan = 0;
- 
--	/* If GMAC does not have multiple queues, then this is not necessary*/
--	if (rx_count == 1)
--		return;
++
 +	for (chan = 0; chan < rx_channels_count; chan++)
 +		stmmac_stop_rx_dma(priv, chan);
- 
--	/**
--	 *  If the core is synthesized with multiple rx queues / multiple
--	 *  dma channels, then rx queues will be disabled by default.
--	 *  For now only rx queue 0 is enabled.
--	 */
--	priv->hw->mac->rx_queue_enable(priv->hw, queue);
++
 +	for (chan = 0; chan < tx_channels_count; chan++)
 +		stmmac_stop_tx_dma(priv, chan);
  }
-- 
2.11.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From foss at volatilesystems.org  Mon Jul 30 15:31:47 2018
From: foss at volatilesystems.org (Stijn Segers)
Date: Mon, 30 Jul 2018 21:31:47 +0200
Subject: [OpenWrt-Devel] [PATCH 2/2] kernel: bump 4.14 to 4.14.59 for 18.06
In-Reply-To: <20180730193147.2243-1-foss@volatilesystems.org>
References: <20180730193147.2243-1-foss@volatilesystems.org>
Message-ID: <20180730193147.2243-2-foss@volatilesystems.org>

* Refreshed patches.
* Patches made redundant by changes upstream:
  - target/linux/ramips/patches-4.14/0036-mtd-fix-cfi-cmdset-0002-erase-status-check.patch
* Patches accepted upstream:
  - target/linux/apm821xx/patches-4.14/020-0001-crypto-crypto4xx-remove-bad-list_del.patch
  - target/linux/apm821xx/patches-4.14/020-0011-crypto-crypto4xx-fix-crypto4xx_build_pdr-crypto4xx_b.patch
  - target/linux/brcm63xx/patches-4.14/001-4.15-08-bcm63xx_enet-correct-clock-usage.patch
  - target/linux/brcm63xx/patches-4.14/001-4.15-09-bcm63xx_enet-do-not-write-to-random-DMA-channel-on-B.patch
  - target/linux/generic/backport-4.14/080-net-convert-sock.sk_wmem_alloc-from-atomic_t-to-refc.patch
  - target/linux/generic/pending-4.14/900-gen_stats-fix-netlink-stats-padding.patch

Compile-tested on: ramips/mt7621, x86/64
Run-tested on: ramips/mt7621, x86/64

Signed-off-by: Stijn Segers <foss at volatilesystems.org>
---
 include/kernel-version.mk                          |   4 +-
 ...0001-crypto-crypto4xx-remove-bad-list_del.patch |  32 ----
 ...to4xx-remove-unused-definitions-and-write.patch |   2 +-
 ...to4xx-set-CRYPTO_ALG_KERN_DRIVER_ONLY-fla.patch |   2 +-
 ...to4xx-remove-double-assignment-of-pd_uinf.patch |   2 +-
 ...to4xx-enable-AES-RFC3686-ECB-CFB-and-OFB-.patch |   2 +-
 ...pto4xx-refactor-crypto4xx_copy_pkt_to_dst.patch |   2 +-
 ...to4xx-replace-crypto4xx_dev-s-scatter_buf.patch |   8 +-
 ...to4xx-fix-crypto4xx_build_pdr-crypto4xx_b.patch |  84 ----------
 .../802-usb-xhci-force-msi-renesas-xhci.patch      |   2 +-
 ...-add-support-for-performing-fake-doorbell.patch |   2 +-
 .../patches-4.14/830-huawei_e970_support.patch     |   4 +-
 ...-4.15-08-bcm63xx_enet-correct-clock-usage.patch | 101 ------------
 ...t-do-not-write-to-random-DMA-channel-on-B.patch |  29 ----
 .../025-tcp-allow-drivers-to-tweak-TSQ-logic.patch |   4 +-
 ...-sock.sk_wmem_alloc-from-atomic_t-to-refc.patch | 172 ---------------------
 ...15-netfilter-exit_net-cleanup-check-added.patch |   2 +-
 .../generic/hack-4.14/207-disable-modorder.patch   |   4 +-
 .../hack-4.14/211-host_tools_portability.patch     |   2 +-
 .../linux/generic/hack-4.14/220-gc_sections.patch  |   2 +-
 .../linux/generic/hack-4.14/902-debloat_proc.patch |   2 +-
 ...rocess-negative-stack-offsets-on-stack-tr.patch |   2 +-
 .../pending-4.14/201-extra_optimization.patch      |   2 +-
 ...610-netfilter_match_bypass_default_checks.patch |   6 +-
 .../pending-4.14/630-packet_socket_type.patch      |   6 +-
 .../generic/pending-4.14/834-ledtrig-libata.patch  |  10 +-
 .../900-gen_stats-fix-netlink-stats-padding.patch  |  49 ------
 .../patches-4.14/0052-net-phy-add-FC.patch         |   2 +-
 ...ci-allow-imod-interval-to-be-configurable.patch |   2 +-
 .../oxnas/patches-4.14/999-libata-hacks.patch      |   8 +-
 .../0032-USB-dwc2-add-device_reset.patch           |   2 +-
 ...td-fix-cfi-cmdset-0002-erase-status-check.patch |  29 ----
 ...0037-mtd-cfi-cmdset-0002-force-word-write.patch |   2 +-
 33 files changed, 44 insertions(+), 540 deletions(-)
 delete mode 100644 target/linux/apm821xx/patches-4.14/020-0001-crypto-crypto4xx-remove-bad-list_del.patch
 delete mode 100644 target/linux/apm821xx/patches-4.14/020-0011-crypto-crypto4xx-fix-crypto4xx_build_pdr-crypto4xx_b.patch
 delete mode 100644 target/linux/brcm63xx/patches-4.14/001-4.15-08-bcm63xx_enet-correct-clock-usage.patch
 delete mode 100644 target/linux/brcm63xx/patches-4.14/001-4.15-09-bcm63xx_enet-do-not-write-to-random-DMA-channel-on-B.patch
 delete mode 100644 target/linux/generic/backport-4.14/080-net-convert-sock.sk_wmem_alloc-from-atomic_t-to-refc.patch
 delete mode 100644 target/linux/generic/pending-4.14/900-gen_stats-fix-netlink-stats-padding.patch
 delete mode 100644 target/linux/ramips/patches-4.14/0036-mtd-fix-cfi-cmdset-0002-erase-status-check.patch

diff --git a/include/kernel-version.mk b/include/kernel-version.mk
index 2e77f812df..631b9785e9 100644
--- a/include/kernel-version.mk
+++ b/include/kernel-version.mk
@@ -5,12 +5,12 @@ LINUX_RELEASE?=1
 LINUX_VERSION-3.18 = .71
 LINUX_VERSION-4.4 = .121
 LINUX_VERSION-4.9 = .116
-LINUX_VERSION-4.14 = .54
+LINUX_VERSION-4.14 = .59
 
 LINUX_KERNEL_HASH-3.18.71 = 5abc9778ad44ce02ed6c8ab52ece8a21c6d20d21f6ed8a19287b4a38a50c1240
 LINUX_KERNEL_HASH-4.4.121 = 44a88268b5088dc326b30c9b9133ac35a9a200b636b7268d08f32abeae6ca729
 LINUX_KERNEL_HASH-4.9.116 = 999e8291bec0bcef2e0b91b6d58d8be5eb5e7c70881df59439364b22b693ff1d
-LINUX_KERNEL_HASH-4.14.54 = 451642ac28c539a91072f1fb83b1c061d6d44df870ddf5562400ade5e1c4b6c6
+LINUX_KERNEL_HASH-4.14.59 = 7ec633c661bba941239e340bb35391d356eda541fb4c323d07034d09d05b319b
 
 remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
 sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1)))))))
diff --git a/target/linux/apm821xx/patches-4.14/020-0001-crypto-crypto4xx-remove-bad-list_del.patch b/target/linux/apm821xx/patches-4.14/020-0001-crypto-crypto4xx-remove-bad-list_del.patch
deleted file mode 100644
index 8df0937e4d..0000000000
--- a/target/linux/apm821xx/patches-4.14/020-0001-crypto-crypto4xx-remove-bad-list_del.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From a728a196d253530f17da5c86dc7dfbe58c5f7094 Mon Sep 17 00:00:00 2001
-From: Christian Lamparter <chunkeey at googlemail.com>
-Date: Fri, 25 Aug 2017 15:47:14 +0200
-Subject: [PATCH 01/25] crypto: crypto4xx - remove bad list_del
-
-alg entries are only added to the list, after the registration
-was successful. If the registration failed, it was never added
-to the list in the first place.
-
-Signed-off-by: Christian Lamparter <chunkeey at googlemail.com>
-Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
----
- drivers/crypto/amcc/crypto4xx_core.c | 6 ++----
- 1 file changed, 2 insertions(+), 4 deletions(-)
-
---- a/drivers/crypto/amcc/crypto4xx_core.c
-+++ b/drivers/crypto/amcc/crypto4xx_core.c
-@@ -1033,12 +1033,10 @@ int crypto4xx_register_alg(struct crypto
- 			break;
- 		}
- 
--		if (rc) {
--			list_del(&alg->entry);
-+		if (rc)
- 			kfree(alg);
--		} else {
-+		else
- 			list_add_tail(&alg->entry, &sec_dev->alg_list);
--		}
- 	}
- 
- 	return 0;
diff --git a/target/linux/apm821xx/patches-4.14/020-0002-crypto-crypto4xx-remove-unused-definitions-and-write.patch b/target/linux/apm821xx/patches-4.14/020-0002-crypto-crypto4xx-remove-unused-definitions-and-write.patch
index 5983246344..466f0a0a78 100644
--- a/target/linux/apm821xx/patches-4.14/020-0002-crypto-crypto4xx-remove-unused-definitions-and-write.patch
+++ b/target/linux/apm821xx/patches-4.14/020-0002-crypto-crypto4xx-remove-unused-definitions-and-write.patch
@@ -67,7 +67,7 @@ Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
  
 --- a/drivers/crypto/amcc/crypto4xx_core.c
 +++ b/drivers/crypto/amcc/crypto4xx_core.c
-@@ -962,7 +962,7 @@ u32 crypto4xx_build_pd(struct crypto_asy
+@@ -964,7 +964,7 @@ u32 crypto4xx_build_pd(struct crypto_asy
  
  	sa->sa_command_1.bf.hash_crypto_offset = 0;
  	pd->pd_ctl.w = ctx->pd_ctl;
diff --git a/target/linux/apm821xx/patches-4.14/020-0003-crypto-crypto4xx-set-CRYPTO_ALG_KERN_DRIVER_ONLY-fla.patch b/target/linux/apm821xx/patches-4.14/020-0003-crypto-crypto4xx-set-CRYPTO_ALG_KERN_DRIVER_ONLY-fla.patch
index e50a418284..c195b88c2f 100644
--- a/target/linux/apm821xx/patches-4.14/020-0003-crypto-crypto4xx-set-CRYPTO_ALG_KERN_DRIVER_ONLY-fla.patch
+++ b/target/linux/apm821xx/patches-4.14/020-0003-crypto-crypto4xx-set-CRYPTO_ALG_KERN_DRIVER_ONLY-fla.patch
@@ -18,7 +18,7 @@ Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
 
 --- a/drivers/crypto/amcc/crypto4xx_core.c
 +++ b/drivers/crypto/amcc/crypto4xx_core.c
-@@ -1114,7 +1114,9 @@ struct crypto4xx_alg_common crypto4xx_al
+@@ -1116,7 +1116,9 @@ struct crypto4xx_alg_common crypto4xx_al
  		.cra_name 	= "cbc(aes)",
  		.cra_driver_name = "cbc-aes-ppc4xx",
  		.cra_priority 	= CRYPTO4XX_CRYPTO_PRIORITY,
diff --git a/target/linux/apm821xx/patches-4.14/020-0005-crypto-crypto4xx-remove-double-assignment-of-pd_uinf.patch b/target/linux/apm821xx/patches-4.14/020-0005-crypto-crypto4xx-remove-double-assignment-of-pd_uinf.patch
index 4fc3617576..03c402d975 100644
--- a/target/linux/apm821xx/patches-4.14/020-0005-crypto-crypto4xx-remove-double-assignment-of-pd_uinf.patch
+++ b/target/linux/apm821xx/patches-4.14/020-0005-crypto-crypto4xx-remove-double-assignment-of-pd_uinf.patch
@@ -14,7 +14,7 @@ Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
 
 --- a/drivers/crypto/amcc/crypto4xx_core.c
 +++ b/drivers/crypto/amcc/crypto4xx_core.c
-@@ -1079,7 +1079,6 @@ static void crypto4xx_bh_tasklet_cb(unsi
+@@ -1081,7 +1081,6 @@ static void crypto4xx_bh_tasklet_cb(unsi
  			pd->pd_ctl.bf.pe_done = 0;
  			crypto4xx_pd_done(core_dev->dev, tail);
  			crypto4xx_put_pd_to_pdr(core_dev->dev, tail);
diff --git a/target/linux/apm821xx/patches-4.14/020-0008-crypto-crypto4xx-enable-AES-RFC3686-ECB-CFB-and-OFB-.patch b/target/linux/apm821xx/patches-4.14/020-0008-crypto-crypto4xx-enable-AES-RFC3686-ECB-CFB-and-OFB-.patch
index 9977c60d26..d19a41ec13 100644
--- a/target/linux/apm821xx/patches-4.14/020-0008-crypto-crypto4xx-enable-AES-RFC3686-ECB-CFB-and-OFB-.patch
+++ b/target/linux/apm821xx/patches-4.14/020-0008-crypto-crypto4xx-enable-AES-RFC3686-ECB-CFB-and-OFB-.patch
@@ -109,7 +109,7 @@ Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
  #include <crypto/sha.h>
  #include "crypto4xx_reg_def.h"
  #include "crypto4xx_core.h"
-@@ -1133,6 +1134,103 @@ struct crypto4xx_alg_common crypto4xx_al
+@@ -1135,6 +1136,103 @@ struct crypto4xx_alg_common crypto4xx_al
  			}
  		}
  	}},
diff --git a/target/linux/apm821xx/patches-4.14/020-0009-crypto-crypto4xx-refactor-crypto4xx_copy_pkt_to_dst.patch b/target/linux/apm821xx/patches-4.14/020-0009-crypto-crypto4xx-refactor-crypto4xx_copy_pkt_to_dst.patch
index c6ccade8c1..e74ed7f56b 100644
--- a/target/linux/apm821xx/patches-4.14/020-0009-crypto-crypto4xx-refactor-crypto4xx_copy_pkt_to_dst.patch
+++ b/target/linux/apm821xx/patches-4.14/020-0009-crypto-crypto4xx-refactor-crypto4xx_copy_pkt_to_dst.patch
@@ -27,7 +27,7 @@ Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
  #include "crypto4xx_reg_def.h"
  #include "crypto4xx_core.h"
  #include "crypto4xx_sa.h"
-@@ -481,111 +482,44 @@ static inline struct ce_sd *crypto4xx_ge
+@@ -483,111 +484,44 @@ static inline struct ce_sd *crypto4xx_ge
  	return  (struct ce_sd *)(dev->sdr + sizeof(struct ce_sd) * idx);
  }
  
diff --git a/target/linux/apm821xx/patches-4.14/020-0010-crypto-crypto4xx-replace-crypto4xx_dev-s-scatter_buf.patch b/target/linux/apm821xx/patches-4.14/020-0010-crypto-crypto4xx-replace-crypto4xx_dev-s-scatter_buf.patch
index 90a6dab2d7..5ca3faa4dc 100644
--- a/target/linux/apm821xx/patches-4.14/020-0010-crypto-crypto4xx-replace-crypto4xx_dev-s-scatter_buf.patch
+++ b/target/linux/apm821xx/patches-4.14/020-0010-crypto-crypto4xx-replace-crypto4xx_dev-s-scatter_buf.patch
@@ -17,7 +17,7 @@ Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
 
 --- a/drivers/crypto/amcc/crypto4xx_core.c
 +++ b/drivers/crypto/amcc/crypto4xx_core.c
-@@ -394,10 +394,9 @@ static u32 crypto4xx_build_sdr(struct cr
+@@ -396,10 +396,9 @@ static u32 crypto4xx_build_sdr(struct cr
  	if (!dev->sdr)
  		return -ENOMEM;
  
@@ -29,7 +29,7 @@ Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
  			&dev->scatter_buffer_pa, GFP_ATOMIC);
  	if (!dev->scatter_buffer_va) {
  		dma_free_coherent(dev->core_dev->device,
-@@ -410,7 +409,7 @@ static u32 crypto4xx_build_sdr(struct cr
+@@ -412,7 +411,7 @@ static u32 crypto4xx_build_sdr(struct cr
  
  	for (i = 0; i < PPC4XX_NUM_SD; i++) {
  		sd_array[i].ptr = dev->scatter_buffer_pa +
@@ -38,9 +38,9 @@ Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
  	}
  
  	return 0;
-@@ -425,7 +424,7 @@ static void crypto4xx_destroy_sdr(struct
+@@ -427,7 +426,7 @@ static void crypto4xx_destroy_sdr(struct
  
- 	if (dev->scatter_buffer_va != NULL)
+ 	if (dev->scatter_buffer_va)
  		dma_free_coherent(dev->core_dev->device,
 -				  dev->scatter_buffer_size * PPC4XX_NUM_SD,
 +				  PPC4XX_SD_BUFFER_SIZE * PPC4XX_NUM_SD,
diff --git a/target/linux/apm821xx/patches-4.14/020-0011-crypto-crypto4xx-fix-crypto4xx_build_pdr-crypto4xx_b.patch b/target/linux/apm821xx/patches-4.14/020-0011-crypto-crypto4xx-fix-crypto4xx_build_pdr-crypto4xx_b.patch
deleted file mode 100644
index 837fbdc547..0000000000
--- a/target/linux/apm821xx/patches-4.14/020-0011-crypto-crypto4xx-fix-crypto4xx_build_pdr-crypto4xx_b.patch
+++ /dev/null
@@ -1,84 +0,0 @@
-From 5d59ad6eea82ef8df92b4109615a0dde9d8093e9 Mon Sep 17 00:00:00 2001
-From: Christian Lamparter <chunkeey at googlemail.com>
-Date: Fri, 25 Aug 2017 15:47:24 +0200
-Subject: [PATCH 11/25] crypto: crypto4xx - fix crypto4xx_build_pdr,
- crypto4xx_build_sdr leak
-
-If one of the later memory allocations in rypto4xx_build_pdr()
-fails: dev->pdr (and/or) dev->pdr_uinfo wouldn't be freed.
-
-crypto4xx_build_sdr() has the same issue with dev->sdr.
-
-Signed-off-by: Christian Lamparter <chunkeey at googlemail.com>
-Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
----
- drivers/crypto/amcc/crypto4xx_core.c | 17 +++++++++--------
- 1 file changed, 9 insertions(+), 8 deletions(-)
-
---- a/drivers/crypto/amcc/crypto4xx_core.c
-+++ b/drivers/crypto/amcc/crypto4xx_core.c
-@@ -209,7 +209,7 @@ static u32 crypto4xx_build_pdr(struct cr
- 				  dev->pdr_pa);
- 		return -ENOMEM;
- 	}
--	memset(dev->pdr, 0,  sizeof(struct ce_pd) * PPC4XX_NUM_PD);
-+	memset(dev->pdr, 0, sizeof(struct ce_pd) * PPC4XX_NUM_PD);
- 	dev->shadow_sa_pool = dma_alloc_coherent(dev->core_dev->device,
- 				   256 * PPC4XX_NUM_PD,
- 				   &dev->shadow_sa_pool_pa,
-@@ -242,13 +242,15 @@ static u32 crypto4xx_build_pdr(struct cr
- 
- static void crypto4xx_destroy_pdr(struct crypto4xx_device *dev)
- {
--	if (dev->pdr != NULL)
-+	if (dev->pdr)
- 		dma_free_coherent(dev->core_dev->device,
- 				  sizeof(struct ce_pd) * PPC4XX_NUM_PD,
- 				  dev->pdr, dev->pdr_pa);
-+
- 	if (dev->shadow_sa_pool)
- 		dma_free_coherent(dev->core_dev->device, 256 * PPC4XX_NUM_PD,
- 				  dev->shadow_sa_pool, dev->shadow_sa_pool_pa);
-+
- 	if (dev->shadow_sr_pool)
- 		dma_free_coherent(dev->core_dev->device,
- 			sizeof(struct sa_state_record) * PPC4XX_NUM_PD,
-@@ -417,12 +419,12 @@ static u32 crypto4xx_build_sdr(struct cr
- 
- static void crypto4xx_destroy_sdr(struct crypto4xx_device *dev)
- {
--	if (dev->sdr != NULL)
-+	if (dev->sdr)
- 		dma_free_coherent(dev->core_dev->device,
- 				  sizeof(struct ce_sd) * PPC4XX_NUM_SD,
- 				  dev->sdr, dev->sdr_pa);
- 
--	if (dev->scatter_buffer_va != NULL)
-+	if (dev->scatter_buffer_va)
- 		dma_free_coherent(dev->core_dev->device,
- 				  PPC4XX_SD_BUFFER_SIZE * PPC4XX_NUM_SD,
- 				  dev->scatter_buffer_va,
-@@ -1223,7 +1225,7 @@ static int crypto4xx_probe(struct platfo
- 
- 	rc = crypto4xx_build_gdr(core_dev->dev);
- 	if (rc)
--		goto err_build_gdr;
-+		goto err_build_pdr;
- 
- 	rc = crypto4xx_build_sdr(core_dev->dev);
- 	if (rc)
-@@ -1266,12 +1268,11 @@ err_iomap:
- err_request_irq:
- 	irq_dispose_mapping(core_dev->irq);
- 	tasklet_kill(&core_dev->tasklet);
--	crypto4xx_destroy_sdr(core_dev->dev);
- err_build_sdr:
-+	crypto4xx_destroy_sdr(core_dev->dev);
- 	crypto4xx_destroy_gdr(core_dev->dev);
--err_build_gdr:
--	crypto4xx_destroy_pdr(core_dev->dev);
- err_build_pdr:
-+	crypto4xx_destroy_pdr(core_dev->dev);
- 	kfree(core_dev->dev);
- err_alloc_dev:
- 	kfree(core_dev);
diff --git a/target/linux/apm821xx/patches-4.14/802-usb-xhci-force-msi-renesas-xhci.patch b/target/linux/apm821xx/patches-4.14/802-usb-xhci-force-msi-renesas-xhci.patch
index 3545b99aab..1e781b5dae 100644
--- a/target/linux/apm821xx/patches-4.14/802-usb-xhci-force-msi-renesas-xhci.patch
+++ b/target/linux/apm821xx/patches-4.14/802-usb-xhci-force-msi-renesas-xhci.patch
@@ -44,7 +44,7 @@ produce a noisy warning.
  		hcd->msi_enabled = 1;
 --- a/drivers/usb/host/xhci.h
 +++ b/drivers/usb/host/xhci.h
-@@ -1850,6 +1850,7 @@ struct xhci_hcd {
+@@ -1854,6 +1854,7 @@ struct xhci_hcd {
  	/* support xHCI 0.96 spec USB2 software LPM */
  	unsigned		sw_lpm_support:1;
  	/* support xHCI 1.0 spec USB2 hardware LPM */
diff --git a/target/linux/bcm53xx/patches-4.14/180-usb-xhci-add-support-for-performing-fake-doorbell.patch b/target/linux/bcm53xx/patches-4.14/180-usb-xhci-add-support-for-performing-fake-doorbell.patch
index 3bee392f4f..ac622010ff 100644
--- a/target/linux/bcm53xx/patches-4.14/180-usb-xhci-add-support-for-performing-fake-doorbell.patch
+++ b/target/linux/bcm53xx/patches-4.14/180-usb-xhci-add-support-for-performing-fake-doorbell.patch
@@ -127,7 +127,7 @@ it on BCM4708 family.
  /*
 --- a/drivers/usb/host/xhci.h
 +++ b/drivers/usb/host/xhci.h
-@@ -1831,6 +1831,7 @@ struct xhci_hcd {
+@@ -1835,6 +1835,7 @@ struct xhci_hcd {
  #define XHCI_LIMIT_ENDPOINT_INTERVAL_7	(1 << 26)
  #define XHCI_U2_DISABLE_WAKE	(1 << 27)
  #define XHCI_ASMEDIA_MODIFY_FLOWCONTROL	(1 << 28)
diff --git a/target/linux/brcm47xx/patches-4.14/830-huawei_e970_support.patch b/target/linux/brcm47xx/patches-4.14/830-huawei_e970_support.patch
index 5d40fe6541..b6150ed8fd 100644
--- a/target/linux/brcm47xx/patches-4.14/830-huawei_e970_support.patch
+++ b/target/linux/brcm47xx/patches-4.14/830-huawei_e970_support.patch
@@ -8,7 +8,7 @@
  #include <asm/bootinfo.h>
  #include <asm/idle.h>
  #include <asm/prom.h>
-@@ -231,6 +232,33 @@ static struct fixed_phy_status bcm47xx_f
+@@ -225,6 +226,33 @@ static struct fixed_phy_status bcm47xx_f
  	.duplex	= DUPLEX_FULL,
  };
  
@@ -42,7 +42,7 @@
  static int __init bcm47xx_register_bus_complete(void)
  {
  	switch (bcm47xx_bus_type) {
-@@ -250,6 +278,7 @@ static int __init bcm47xx_register_bus_c
+@@ -244,6 +272,7 @@ static int __init bcm47xx_register_bus_c
  	bcm47xx_workarounds();
  
  	fixed_phy_add(PHY_POLL, 0, &bcm47xx_fixed_phy_status, -1);
diff --git a/target/linux/brcm63xx/patches-4.14/001-4.15-08-bcm63xx_enet-correct-clock-usage.patch b/target/linux/brcm63xx/patches-4.14/001-4.15-08-bcm63xx_enet-correct-clock-usage.patch
deleted file mode 100644
index bd66e72c91..0000000000
--- a/target/linux/brcm63xx/patches-4.14/001-4.15-08-bcm63xx_enet-correct-clock-usage.patch
+++ /dev/null
@@ -1,101 +0,0 @@
-From d0423d3e4fa7ae305729cb50369427f075ccb279 Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jonas.gorski at gmail.com>
-Date: Sat, 25 Feb 2017 12:41:28 +0100
-Subject: [PATCH 1/6] bcm63xx_enet: correct clock usage
-
-Check the return code of prepare_enable and change one last instance of
-enable only to prepare_enable. Also properly disable and release the
-clock in error paths and on remove for enetsw.
-
-Signed-off-by: Jonas Gorski <jonas.gorski at gmail.com>
----
- drivers/net/ethernet/broadcom/bcm63xx_enet.c | 31 +++++++++++++++++++++-------
- 1 file changed, 23 insertions(+), 8 deletions(-)
-
---- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c
-+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
-@@ -1773,7 +1773,9 @@ static int bcm_enet_probe(struct platfor
- 		ret = PTR_ERR(priv->mac_clk);
- 		goto out;
- 	}
--	clk_prepare_enable(priv->mac_clk);
-+	ret = clk_prepare_enable(priv->mac_clk);
-+	if (ret)
-+		goto out_put_clk_mac;
- 
- 	/* initialize default and fetch platform data */
- 	priv->rx_ring_size = BCMENET_DEF_RX_DESC;
-@@ -1805,9 +1807,11 @@ static int bcm_enet_probe(struct platfor
- 		if (IS_ERR(priv->phy_clk)) {
- 			ret = PTR_ERR(priv->phy_clk);
- 			priv->phy_clk = NULL;
--			goto out_put_clk_mac;
-+			goto out_disable_clk_mac;
- 		}
--		clk_prepare_enable(priv->phy_clk);
-+		ret = clk_prepare_enable(priv->phy_clk);
-+		if (ret)
-+			goto out_put_clk_phy;
- 	}
- 
- 	/* do minimal hardware init to be able to probe mii bus */
-@@ -1901,13 +1905,16 @@ out_free_mdio:
- out_uninit_hw:
- 	/* turn off mdc clock */
- 	enet_writel(priv, 0, ENET_MIISC_REG);
--	if (priv->phy_clk) {
-+	if (priv->phy_clk)
- 		clk_disable_unprepare(priv->phy_clk);
-+
-+out_put_clk_phy:
-+	if (priv->phy_clk)
- 		clk_put(priv->phy_clk);
--	}
- 
--out_put_clk_mac:
-+out_disable_clk_mac:
- 	clk_disable_unprepare(priv->mac_clk);
-+out_put_clk_mac:
- 	clk_put(priv->mac_clk);
- out:
- 	free_netdev(dev);
-@@ -2752,7 +2759,9 @@ static int bcm_enetsw_probe(struct platf
- 		ret = PTR_ERR(priv->mac_clk);
- 		goto out_unmap;
- 	}
--	clk_enable(priv->mac_clk);
-+	ret = clk_prepare_enable(priv->mac_clk);
-+	if (ret)
-+		goto out_put_clk;
- 
- 	priv->rx_chan = 0;
- 	priv->tx_chan = 1;
-@@ -2773,7 +2782,7 @@ static int bcm_enetsw_probe(struct platf
- 
- 	ret = register_netdev(dev);
- 	if (ret)
--		goto out_put_clk;
-+		goto out_disable_clk;
- 
- 	netif_carrier_off(dev);
- 	platform_set_drvdata(pdev, dev);
-@@ -2782,6 +2791,9 @@ static int bcm_enetsw_probe(struct platf
- 
- 	return 0;
- 
-+out_disable_clk:
-+	clk_disable_unprepare(priv->mac_clk);
-+
- out_put_clk:
- 	clk_put(priv->mac_clk);
- 
-@@ -2813,6 +2825,9 @@ static int bcm_enetsw_remove(struct plat
- 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- 	release_mem_region(res->start, resource_size(res));
- 
-+	clk_disable_unprepare(priv->mac_clk);
-+	clk_put(priv->mac_clk);
-+
- 	free_netdev(dev);
- 	return 0;
- }
diff --git a/target/linux/brcm63xx/patches-4.14/001-4.15-09-bcm63xx_enet-do-not-write-to-random-DMA-channel-on-B.patch b/target/linux/brcm63xx/patches-4.14/001-4.15-09-bcm63xx_enet-do-not-write-to-random-DMA-channel-on-B.patch
deleted file mode 100644
index 22b3a732f9..0000000000
--- a/target/linux/brcm63xx/patches-4.14/001-4.15-09-bcm63xx_enet-do-not-write-to-random-DMA-channel-on-B.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 23d94cb855b6f4f0ee1c01679224472104ac6440 Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jonas.gorski at gmail.com>
-Date: Sat, 30 Sep 2017 14:10:18 +0200
-Subject: [PATCH 2/6] bcm63xx_enet: do not write to random DMA channel on
- BCM6345
-
-The DMA controller regs actually point to DMA channel 0, so the write to
-ENETDMA_CFG_REG will actually modify a random DMA channel.
-
-Since DMA controller registers do not exist on BCM6345, guard the write
-with the usual check for dma_has_sram.
-
-Signed-off-by: Jonas Gorski <jonas.gorski at gmail.com>
----
- drivers/net/ethernet/broadcom/bcm63xx_enet.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
---- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c
-+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
-@@ -1062,7 +1062,8 @@ static int bcm_enet_open(struct net_devi
- 	val = enet_readl(priv, ENET_CTL_REG);
- 	val |= ENET_CTL_ENABLE_MASK;
- 	enet_writel(priv, val, ENET_CTL_REG);
--	enet_dma_writel(priv, ENETDMA_CFG_EN_MASK, ENETDMA_CFG_REG);
-+	if (priv->dma_has_sram)
-+		enet_dma_writel(priv, ENETDMA_CFG_EN_MASK, ENETDMA_CFG_REG);
- 	enet_dmac_writel(priv, priv->dma_chan_en_mask,
- 			 ENETDMAC_CHANCFG, priv->rx_chan);
- 
diff --git a/target/linux/generic/backport-4.14/025-tcp-allow-drivers-to-tweak-TSQ-logic.patch b/target/linux/generic/backport-4.14/025-tcp-allow-drivers-to-tweak-TSQ-logic.patch
index 89117bd874..d9215505ee 100644
--- a/target/linux/generic/backport-4.14/025-tcp-allow-drivers-to-tweak-TSQ-logic.patch
+++ b/target/linux/generic/backport-4.14/025-tcp-allow-drivers-to-tweak-TSQ-logic.patch
@@ -65,7 +65,7 @@ Cc: Kir Kolyshkin <kir at openvz.org>
  	 * Before updating sk_refcnt, we must commit prior changes to memory
 --- a/net/ipv4/tcp_output.c
 +++ b/net/ipv4/tcp_output.c
-@@ -1671,7 +1671,7 @@ u32 tcp_tso_autosize(const struct sock *
+@@ -1683,7 +1683,7 @@ u32 tcp_tso_autosize(const struct sock *
  {
  	u32 bytes, segs;
  
@@ -74,7 +74,7 @@ Cc: Kir Kolyshkin <kir at openvz.org>
  		    sk->sk_gso_max_size - 1 - MAX_TCP_HEADER);
  
  	/* Goal is to send at least one packet per ms,
-@@ -2172,7 +2172,7 @@ static bool tcp_small_queue_check(struct
+@@ -2184,7 +2184,7 @@ static bool tcp_small_queue_check(struct
  {
  	unsigned int limit;
  
diff --git a/target/linux/generic/backport-4.14/080-net-convert-sock.sk_wmem_alloc-from-atomic_t-to-refc.patch b/target/linux/generic/backport-4.14/080-net-convert-sock.sk_wmem_alloc-from-atomic_t-to-refc.patch
deleted file mode 100644
index 06d00886f1..0000000000
--- a/target/linux/generic/backport-4.14/080-net-convert-sock.sk_wmem_alloc-from-atomic_t-to-refc.patch
+++ /dev/null
@@ -1,172 +0,0 @@
-From 9bbe60a67be5a1c6f79b3c9be5003481a50529ff Mon Sep 17 00:00:00 2001
-From: David Woodhouse <dwmw2 at infradead.org>
-Date: Sat, 16 Jun 2018 11:55:44 +0100
-Subject: atm: Preserve value of skb->truesize when accounting to vcc
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-ATM accounts for in-flight TX packets in sk_wmem_alloc of the VCC on
-which they are to be sent. But it doesn't take ownership of those
-packets from the sock (if any) which originally owned them. They should
-remain owned by their actual sender until they've left the box.
-
-There's a hack in pskb_expand_head() to avoid adjusting skb->truesize
-for certain skbs, precisely to avoid messing up sk_wmem_alloc
-accounting. Ideally that hack would cover the ATM use case too, but it
-doesn't ? skbs which aren't owned by any sock, for example PPP control
-frames, still get their truesize adjusted when the low-level ATM driver
-adds headroom.
-
-This has always been an issue, it seems. The truesize of a packet
-increases, and sk_wmem_alloc on the VCC goes negative. But this wasn't
-for normal traffic, only for control frames. So I think we just got away
-with it, and we probably needed to send 2GiB of LCP echo frames before
-the misaccounting would ever have caused a problem and caused
-atm_may_send() to start refusing packets.
-
-Commit 14afee4b609 ("net: convert sock.sk_wmem_alloc from atomic_t to
-refcount_t") did exactly what it was intended to do, and turned this
-mostly-theoretical problem into a real one, causing PPPoATM to fail
-immediately as sk_wmem_alloc underflows and atm_may_send() *immediately*
-starts refusing to allow new packets.
-
-The least intrusive solution to this problem is to stash the value of
-skb->truesize that was accounted to the VCC, in a new member of the
-ATM_SKB(skb) structure. Then in atm_pop_raw() subtract precisely that
-value instead of the then-current value of skb->truesize.
-
-Fixes: 158f323b9868 ("net: adjust skb->truesize in pskb_expand_head()")
-Signed-off-by: David Woodhouse <dwmw2 at infradead.org>
-Tested-by: Kevin Darbyshire-Bryant <ldir at darbyshire-bryant.me.uk>
-Signed-off-by: David S. Miller <davem at davemloft.net>
----
- include/linux/atmdev.h | 15 +++++++++++++++
- net/atm/br2684.c       |  3 +--
- net/atm/clip.c         |  3 +--
- net/atm/common.c       |  3 +--
- net/atm/lec.c          |  3 +--
- net/atm/mpc.c          |  3 +--
- net/atm/pppoatm.c      |  3 +--
- net/atm/raw.c          |  4 ++--
- 8 files changed, 23 insertions(+), 14 deletions(-)
-
---- a/include/linux/atmdev.h
-+++ b/include/linux/atmdev.h
-@@ -214,6 +214,7 @@ struct atmphy_ops {
- struct atm_skb_data {
- 	struct atm_vcc	*vcc;		/* ATM VCC */
- 	unsigned long	atm_options;	/* ATM layer options */
-+	unsigned int	acct_truesize;  /* truesize accounted to vcc */
- };
- 
- #define VCC_HTABLE_SIZE 32
-@@ -241,6 +242,20 @@ void vcc_insert_socket(struct sock *sk);
- 
- void atm_dev_release_vccs(struct atm_dev *dev);
- 
-+static inline void atm_account_tx(struct atm_vcc *vcc, struct sk_buff *skb)
-+{
-+	/*
-+	 * Because ATM skbs may not belong to a sock (and we don't
-+	 * necessarily want to), skb->truesize may be adjusted,
-+	 * escaping the hack in pskb_expand_head() which avoids
-+	 * doing so for some cases. So stash the value of truesize
-+	 * at the time we accounted it, and atm_pop_raw() can use
-+	 * that value later, in case it changes.
-+	 */
-+	refcount_add(skb->truesize, &sk_atm(vcc)->sk_wmem_alloc);
-+	ATM_SKB(skb)->acct_truesize = skb->truesize;
-+	ATM_SKB(skb)->atm_options = vcc->atm_options;
-+}
- 
- static inline void atm_force_charge(struct atm_vcc *vcc,int truesize)
- {
---- a/net/atm/br2684.c
-+++ b/net/atm/br2684.c
-@@ -252,8 +252,7 @@ static int br2684_xmit_vcc(struct sk_buf
- 
- 	ATM_SKB(skb)->vcc = atmvcc = brvcc->atmvcc;
- 	pr_debug("atm_skb(%p)->vcc(%p)->dev(%p)\n", skb, atmvcc, atmvcc->dev);
--	refcount_add(skb->truesize, &sk_atm(atmvcc)->sk_wmem_alloc);
--	ATM_SKB(skb)->atm_options = atmvcc->atm_options;
-+	atm_account_tx(atmvcc, skb);
- 	dev->stats.tx_packets++;
- 	dev->stats.tx_bytes += skb->len;
- 
---- a/net/atm/clip.c
-+++ b/net/atm/clip.c
-@@ -381,8 +381,7 @@ static netdev_tx_t clip_start_xmit(struc
- 		memcpy(here, llc_oui, sizeof(llc_oui));
- 		((__be16 *) here)[3] = skb->protocol;
- 	}
--	refcount_add(skb->truesize, &sk_atm(vcc)->sk_wmem_alloc);
--	ATM_SKB(skb)->atm_options = vcc->atm_options;
-+	atm_account_tx(vcc, skb);
- 	entry->vccs->last_use = jiffies;
- 	pr_debug("atm_skb(%p)->vcc(%p)->dev(%p)\n", skb, vcc, vcc->dev);
- 	old = xchg(&entry->vccs->xoff, 1);	/* assume XOFF ... */
---- a/net/atm/common.c
-+++ b/net/atm/common.c
-@@ -630,10 +630,9 @@ int vcc_sendmsg(struct socket *sock, str
- 		goto out;
- 	}
- 	pr_debug("%d += %d\n", sk_wmem_alloc_get(sk), skb->truesize);
--	refcount_add(skb->truesize, &sk->sk_wmem_alloc);
-+	atm_account_tx(vcc, skb);
- 
- 	skb->dev = NULL; /* for paths shared with net_device interfaces */
--	ATM_SKB(skb)->atm_options = vcc->atm_options;
- 	if (!copy_from_iter_full(skb_put(skb, size), size, &m->msg_iter)) {
- 		kfree_skb(skb);
- 		error = -EFAULT;
---- a/net/atm/lec.c
-+++ b/net/atm/lec.c
-@@ -182,9 +182,8 @@ lec_send(struct atm_vcc *vcc, struct sk_
- 	struct net_device *dev = skb->dev;
- 
- 	ATM_SKB(skb)->vcc = vcc;
--	ATM_SKB(skb)->atm_options = vcc->atm_options;
-+	atm_account_tx(vcc, skb);
- 
--	refcount_add(skb->truesize, &sk_atm(vcc)->sk_wmem_alloc);
- 	if (vcc->send(vcc, skb) < 0) {
- 		dev->stats.tx_dropped++;
- 		return;
---- a/net/atm/mpc.c
-+++ b/net/atm/mpc.c
-@@ -555,8 +555,7 @@ static int send_via_shortcut(struct sk_b
- 					sizeof(struct llc_snap_hdr));
- 	}
- 
--	refcount_add(skb->truesize, &sk_atm(entry->shortcut)->sk_wmem_alloc);
--	ATM_SKB(skb)->atm_options = entry->shortcut->atm_options;
-+	atm_account_tx(entry->shortcut, skb);
- 	entry->shortcut->send(entry->shortcut, skb);
- 	entry->packets_fwded++;
- 	mpc->in_ops->put(entry);
---- a/net/atm/pppoatm.c
-+++ b/net/atm/pppoatm.c
-@@ -350,8 +350,7 @@ static int pppoatm_send(struct ppp_chann
- 		return 1;
- 	}
- 
--	refcount_add(skb->truesize, &sk_atm(ATM_SKB(skb)->vcc)->sk_wmem_alloc);
--	ATM_SKB(skb)->atm_options = ATM_SKB(skb)->vcc->atm_options;
-+	atm_account_tx(vcc, skb);
- 	pr_debug("atm_skb(%p)->vcc(%p)->dev(%p)\n",
- 		 skb, ATM_SKB(skb)->vcc, ATM_SKB(skb)->vcc->dev);
- 	ret = ATM_SKB(skb)->vcc->send(ATM_SKB(skb)->vcc, skb)
---- a/net/atm/raw.c
-+++ b/net/atm/raw.c
-@@ -35,8 +35,8 @@ static void atm_pop_raw(struct atm_vcc *
- 	struct sock *sk = sk_atm(vcc);
- 
- 	pr_debug("(%d) %d -= %d\n",
--		 vcc->vci, sk_wmem_alloc_get(sk), skb->truesize);
--	WARN_ON(refcount_sub_and_test(skb->truesize, &sk->sk_wmem_alloc));
-+		 vcc->vci, sk_wmem_alloc_get(sk), ATM_SKB(skb)->acct_truesize);
-+	WARN_ON(refcount_sub_and_test(ATM_SKB(skb)->acct_truesize, &sk->sk_wmem_alloc));
- 	dev_kfree_skb_any(skb);
- 	sk->sk_write_space(sk);
- }
diff --git a/target/linux/generic/backport-4.14/336-v4.15-netfilter-exit_net-cleanup-check-added.patch b/target/linux/generic/backport-4.14/336-v4.15-netfilter-exit_net-cleanup-check-added.patch
index 37975ae038..5c942e3a54 100644
--- a/target/linux/generic/backport-4.14/336-v4.15-netfilter-exit_net-cleanup-check-added.patch
+++ b/target/linux/generic/backport-4.14/336-v4.15-netfilter-exit_net-cleanup-check-added.patch
@@ -62,7 +62,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  static struct pernet_operations nfnl_log_net_ops = {
 --- a/net/netfilter/nfnetlink_queue.c
 +++ b/net/netfilter/nfnetlink_queue.c
-@@ -1512,10 +1512,15 @@ static int __net_init nfnl_queue_net_ini
+@@ -1515,10 +1515,15 @@ static int __net_init nfnl_queue_net_ini
  
  static void __net_exit nfnl_queue_net_exit(struct net *net)
  {
diff --git a/target/linux/generic/hack-4.14/207-disable-modorder.patch b/target/linux/generic/hack-4.14/207-disable-modorder.patch
index 5fb956c98d..8e920d1c51 100644
--- a/target/linux/generic/hack-4.14/207-disable-modorder.patch
+++ b/target/linux/generic/hack-4.14/207-disable-modorder.patch
@@ -15,7 +15,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/Makefile
 +++ b/Makefile
-@@ -1227,7 +1227,6 @@ all: modules
+@@ -1228,7 +1228,6 @@ all: modules
  
  PHONY += modules
  modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) modules.builtin
@@ -23,7 +23,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	@$(kecho) '  Building modules, stage 2.';
  	$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
  
-@@ -1256,7 +1255,6 @@ _modinst_:
+@@ -1257,7 +1256,6 @@ _modinst_:
  		rm -f $(MODLIB)/build ; \
  		ln -s $(CURDIR) $(MODLIB)/build ; \
  	fi
diff --git a/target/linux/generic/hack-4.14/211-host_tools_portability.patch b/target/linux/generic/hack-4.14/211-host_tools_portability.patch
index 59f1479436..d806df8a5f 100644
--- a/target/linux/generic/hack-4.14/211-host_tools_portability.patch
+++ b/target/linux/generic/hack-4.14/211-host_tools_portability.patch
@@ -12,7 +12,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/tools/build/Build.include
 +++ b/tools/build/Build.include
-@@ -97,4 +97,4 @@ cxx_flags = -Wp,-MD,$(depfile) -Wp,-MT,$
+@@ -98,4 +98,4 @@ cxx_flags = -Wp,-MD,$(depfile) -Wp,-MT,$
  ###
  ## HOSTCC C flags
  
diff --git a/target/linux/generic/hack-4.14/220-gc_sections.patch b/target/linux/generic/hack-4.14/220-gc_sections.patch
index 7fd493d2ff..cdca0bdb5f 100644
--- a/target/linux/generic/hack-4.14/220-gc_sections.patch
+++ b/target/linux/generic/hack-4.14/220-gc_sections.patch
@@ -33,7 +33,7 @@ Signed-off-by: Gabor Juhos <juhosg at openwrt.org>
  # Read KERNELRELEASE from include/config/kernel.release (if it exists)
  KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null)
  KERNELVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if $(SUBLEVEL),.$(SUBLEVEL)))$(EXTRAVERSION)
-@@ -781,11 +786,6 @@ ifdef CONFIG_DEBUG_SECTION_MISMATCH
+@@ -782,11 +787,6 @@ ifdef CONFIG_DEBUG_SECTION_MISMATCH
  KBUILD_CFLAGS += $(call cc-option, -fno-inline-functions-called-once)
  endif
  
diff --git a/target/linux/generic/hack-4.14/902-debloat_proc.patch b/target/linux/generic/hack-4.14/902-debloat_proc.patch
index 3f47d22355..4f5fb7022c 100644
--- a/target/linux/generic/hack-4.14/902-debloat_proc.patch
+++ b/target/linux/generic/hack-4.14/902-debloat_proc.patch
@@ -243,7 +243,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  }
 --- a/mm/vmstat.c
 +++ b/mm/vmstat.c
-@@ -1946,10 +1946,12 @@ void __init init_mm_internals(void)
+@@ -1944,10 +1944,12 @@ void __init init_mm_internals(void)
  	start_shepherd_timer();
  #endif
  #ifdef CONFIG_PROC_FS
diff --git a/target/linux/generic/pending-4.14/102-MIPS-only-process-negative-stack-offsets-on-stack-tr.patch b/target/linux/generic/pending-4.14/102-MIPS-only-process-negative-stack-offsets-on-stack-tr.patch
index cc17053121..b3dc43ea68 100644
--- a/target/linux/generic/pending-4.14/102-MIPS-only-process-negative-stack-offsets-on-stack-tr.patch
+++ b/target/linux/generic/pending-4.14/102-MIPS-only-process-negative-stack-offsets-on-stack-tr.patch
@@ -46,7 +46,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/arch/mips/kernel/process.c
 +++ b/arch/mips/kernel/process.c
-@@ -357,6 +357,8 @@ static inline int is_sp_move_ins(union m
+@@ -358,6 +358,8 @@ static inline int is_sp_move_ins(union m
  
  	if (ip->i_format.opcode == addiu_op ||
  	    ip->i_format.opcode == daddiu_op) {
diff --git a/target/linux/generic/pending-4.14/201-extra_optimization.patch b/target/linux/generic/pending-4.14/201-extra_optimization.patch
index 445c0bd87d..b40f01d41f 100644
--- a/target/linux/generic/pending-4.14/201-extra_optimization.patch
+++ b/target/linux/generic/pending-4.14/201-extra_optimization.patch
@@ -14,7 +14,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/Makefile
 +++ b/Makefile
-@@ -645,12 +645,12 @@ KBUILD_CFLAGS	+= $(call cc-disable-warni
+@@ -646,12 +646,12 @@ KBUILD_CFLAGS	+= $(call cc-disable-warni
  
  ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
  KBUILD_CFLAGS	+= $(call cc-option,-Oz,-Os)
diff --git a/target/linux/generic/pending-4.14/610-netfilter_match_bypass_default_checks.patch b/target/linux/generic/pending-4.14/610-netfilter_match_bypass_default_checks.patch
index 3611879609..2541230ff5 100644
--- a/target/linux/generic/pending-4.14/610-netfilter_match_bypass_default_checks.patch
+++ b/target/linux/generic/pending-4.14/610-netfilter_match_bypass_default_checks.patch
@@ -68,7 +68,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	if (!xt_percpu_counter_alloc(alloc_state, &e->counters))
  		return -ENOMEM;
  
-@@ -817,6 +845,7 @@ copy_entries_to_user(unsigned int total_
+@@ -818,6 +846,7 @@ copy_entries_to_user(unsigned int total_
  	const struct xt_table_info *private = table->private;
  	int ret = 0;
  	const void *loc_cpu_entry;
@@ -76,7 +76,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  
  	counters = alloc_counters(table);
  	if (IS_ERR(counters))
-@@ -844,6 +873,14 @@ copy_entries_to_user(unsigned int total_
+@@ -845,6 +874,14 @@ copy_entries_to_user(unsigned int total_
  			goto free_counters;
  		}
  
@@ -91,7 +91,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  		for (i = sizeof(struct ipt_entry);
  		     i < e->target_offset;
  		     i += m->u.match_size) {
-@@ -1226,12 +1263,15 @@ compat_copy_entry_to_user(struct ipt_ent
+@@ -1227,12 +1264,15 @@ compat_copy_entry_to_user(struct ipt_ent
  	compat_uint_t origsize;
  	const struct xt_entry_match *ematch;
  	int ret = 0;
diff --git a/target/linux/generic/pending-4.14/630-packet_socket_type.patch b/target/linux/generic/pending-4.14/630-packet_socket_type.patch
index e1736214f5..82e2c51afd 100644
--- a/target/linux/generic/pending-4.14/630-packet_socket_type.patch
+++ b/target/linux/generic/pending-4.14/630-packet_socket_type.patch
@@ -87,7 +87,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	if (!net_eq(dev_net(dev), sock_net(sk)))
  		goto drop;
  
-@@ -3262,6 +3264,7 @@ static int packet_create(struct net *net
+@@ -3260,6 +3262,7 @@ static int packet_create(struct net *net
  	mutex_init(&po->pg_vec_lock);
  	po->rollover = NULL;
  	po->prot_hook.func = packet_rcv;
@@ -95,7 +95,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  
  	if (sock->type == SOCK_PACKET)
  		po->prot_hook.func = packet_rcv_spkt;
-@@ -3875,6 +3878,16 @@ packet_setsockopt(struct socket *sock, i
+@@ -3873,6 +3876,16 @@ packet_setsockopt(struct socket *sock, i
  		po->xmit = val ? packet_direct_xmit : dev_queue_xmit;
  		return 0;
  	}
@@ -112,7 +112,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	default:
  		return -ENOPROTOOPT;
  	}
-@@ -3927,6 +3940,13 @@ static int packet_getsockopt(struct sock
+@@ -3925,6 +3938,13 @@ static int packet_getsockopt(struct sock
  	case PACKET_VNET_HDR:
  		val = po->has_vnet_hdr;
  		break;
diff --git a/target/linux/generic/pending-4.14/834-ledtrig-libata.patch b/target/linux/generic/pending-4.14/834-ledtrig-libata.patch
index 280536e1e6..2eec024b72 100644
--- a/target/linux/generic/pending-4.14/834-ledtrig-libata.patch
+++ b/target/linux/generic/pending-4.14/834-ledtrig-libata.patch
@@ -65,7 +65,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  /**
   *	ata_build_rw_tf - Build ATA taskfile for given read/write request
   *	@tf: Target ATA taskfile
-@@ -5117,6 +5130,9 @@ struct ata_queued_cmd *ata_qc_new_init(s
+@@ -5120,6 +5133,9 @@ struct ata_queued_cmd *ata_qc_new_init(s
  		if (tag < 0)
  			return NULL;
  	}
@@ -75,7 +75,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  
  	qc = __ata_qc_from_tag(ap, tag);
  	qc->tag = tag;
-@@ -6018,6 +6034,9 @@ struct ata_port *ata_port_alloc(struct a
+@@ -6021,6 +6037,9 @@ struct ata_port *ata_port_alloc(struct a
  	ap->stats.unhandled_irq = 1;
  	ap->stats.idle_irq = 1;
  #endif
@@ -85,7 +85,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  	ata_sff_port_init(ap);
  
  	return ap;
-@@ -6039,6 +6058,12 @@ static void ata_host_release(struct devi
+@@ -6042,6 +6061,12 @@ static void ata_host_release(struct devi
  
  		kfree(ap->pmp_link);
  		kfree(ap->slave_link);
@@ -98,7 +98,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  		kfree(ap);
  		host->ports[i] = NULL;
  	}
-@@ -6485,7 +6510,23 @@ int ata_host_register(struct ata_host *h
+@@ -6488,7 +6513,23 @@ int ata_host_register(struct ata_host *h
  		host->ports[i]->print_id = atomic_inc_return(&ata_print_id);
  		host->ports[i]->local_port_no = i + 1;
  	}
@@ -134,7 +134,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  
  /*
   * Define if arch has non-standard setup.  This is a _PCI_ standard
-@@ -889,6 +892,12 @@ struct ata_port {
+@@ -890,6 +893,12 @@ struct ata_port {
  #ifdef CONFIG_ATA_ACPI
  	struct ata_acpi_gtm	__acpi_init_gtm; /* use ata_acpi_init_gtm() */
  #endif
diff --git a/target/linux/generic/pending-4.14/900-gen_stats-fix-netlink-stats-padding.patch b/target/linux/generic/pending-4.14/900-gen_stats-fix-netlink-stats-padding.patch
deleted file mode 100644
index f5ceecca93..0000000000
--- a/target/linux/generic/pending-4.14/900-gen_stats-fix-netlink-stats-padding.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-The gen_stats facility will add a header for the toplevel nlattr of type
-TCA_STATS2 that contains all stats added by qdisc callbacks. A reference
-to this header is stored in the gnet_dump struct, and when all the
-per-qdisc callbacks have finished adding their stats, the length of the
-containing header will be adjusted to the right value.
-
-However, on architectures that need padding (i.e., that don't set
-CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS), the padding nlattr is added
-before the stats, which means that the stored pointer will point to the
-padding, and so when the header is fixed up, the result is just a very
-big padding nlattr. Because most qdiscs also supply the legacy TCA_STATS
-struct, this problem has been mostly invisible, but we exposed it with
-the netlink attribute-based statistics in CAKE.
-
-Fix the issue by fixing up the stored pointer if it points to a padding
-nlattr.
-
-Tested-by: Pete Heist <pete at heistp.net>
-Tested-by: Kevin Darbyshire-Bryant <kevin at darbyshire-bryant.me.uk>
-Signed-off-by: Toke H?iland-J?rgensen <toke at toke.dk>
----
- net/core/gen_stats.c |   16 ++++++++++++++--
- 1 file changed, 14 insertions(+), 2 deletions(-)
-
---- a/net/core/gen_stats.c
-+++ b/net/core/gen_stats.c
-@@ -77,8 +77,20 @@ gnet_stats_start_copy_compat(struct sk_b
- 		d->lock = lock;
- 		spin_lock_bh(lock);
- 	}
--	if (d->tail)
--		return gnet_stats_copy(d, type, NULL, 0, padattr);
-+	if (d->tail) {
-+		int ret = gnet_stats_copy(d, type, NULL, 0, padattr);
-+
-+		/* The initial attribute added in gnet_stats_copy() may be
-+		 * preceded by a padding attribute, in which case d->tail will
-+		 * end up pointing at the padding instead of the real attribute.
-+		 * Fix this so gnet_stats_finish_copy() adjusts the length of
-+		 * the right attribute.
-+		 */
-+		if (ret == 0 && d->tail->nla_type == padattr)
-+			d->tail = (struct nlattr *)((char *)d->tail +
-+						    NLA_ALIGN(d->tail->nla_len));
-+		return ret;
-+	}
- 
- 	return 0;
- }
diff --git a/target/linux/mediatek/patches-4.14/0052-net-phy-add-FC.patch b/target/linux/mediatek/patches-4.14/0052-net-phy-add-FC.patch
index 3c4fc5a7ce..134d95d992 100644
--- a/target/linux/mediatek/patches-4.14/0052-net-phy-add-FC.patch
+++ b/target/linux/mediatek/patches-4.14/0052-net-phy-add-FC.patch
@@ -10,7 +10,7 @@ Signed-off-by: John Crispin <john at phrozen.org>
 
 --- a/drivers/net/phy/phy_device.c
 +++ b/drivers/net/phy/phy_device.c
-@@ -1929,7 +1929,7 @@ static struct phy_driver genphy_driver =
+@@ -1926,7 +1926,7 @@ static struct phy_driver genphy_driver =
  	.config_init	= genphy_config_init,
  	.features	= PHY_GBIT_FEATURES | SUPPORTED_MII |
  			  SUPPORTED_AUI | SUPPORTED_FIBRE |
diff --git a/target/linux/mediatek/patches-4.14/0191-usb-xhci-allow-imod-interval-to-be-configurable.patch b/target/linux/mediatek/patches-4.14/0191-usb-xhci-allow-imod-interval-to-be-configurable.patch
index c48db55d7f..ee260d2aab 100644
--- a/target/linux/mediatek/patches-4.14/0191-usb-xhci-allow-imod-interval-to-be-configurable.patch
+++ b/target/linux/mediatek/patches-4.14/0191-usb-xhci-allow-imod-interval-to-be-configurable.patch
@@ -127,7 +127,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
  	/* Set the HCD state before we enable the irqs */
 --- a/drivers/usb/host/xhci.h
 +++ b/drivers/usb/host/xhci.h
-@@ -1726,6 +1726,8 @@ struct xhci_hcd {
+@@ -1730,6 +1730,8 @@ struct xhci_hcd {
  	u8		max_interrupters;
  	u8		max_ports;
  	u8		isoc_threshold;
diff --git a/target/linux/oxnas/patches-4.14/999-libata-hacks.patch b/target/linux/oxnas/patches-4.14/999-libata-hacks.patch
index da3660fada..e490dbf7c1 100644
--- a/target/linux/oxnas/patches-4.14/999-libata-hacks.patch
+++ b/target/linux/oxnas/patches-4.14/999-libata-hacks.patch
@@ -15,7 +15,7 @@
  	/* initialize internal qc */
  
  	/* XXX: Tag 0 is used for drivers with legacy EH as some
-@@ -5124,6 +5132,9 @@ struct ata_queued_cmd *ata_qc_new_init(s
+@@ -5127,6 +5135,9 @@ struct ata_queued_cmd *ata_qc_new_init(s
  	if (unlikely(ap->pflags & ATA_PFLAG_FROZEN))
  		return NULL;
  
@@ -25,7 +25,7 @@
  	/* libsas case */
  	if (ap->flags & ATA_FLAG_SAS_HOST) {
  		tag = ata_sas_allocate_tag(ap);
-@@ -5169,6 +5180,8 @@ void ata_qc_free(struct ata_queued_cmd *
+@@ -5172,6 +5183,8 @@ void ata_qc_free(struct ata_queued_cmd *
  		qc->tag = ATA_TAG_POISON;
  		if (ap->flags & ATA_FLAG_SAS_HOST)
  			ata_sas_free_tag(tag, ap);
@@ -36,7 +36,7 @@
  
 --- a/include/linux/libata.h
 +++ b/include/linux/libata.h
-@@ -918,6 +918,8 @@ struct ata_port_operations {
+@@ -919,6 +919,8 @@ struct ata_port_operations {
  	void (*qc_prep)(struct ata_queued_cmd *qc);
  	unsigned int (*qc_issue)(struct ata_queued_cmd *qc);
  	bool (*qc_fill_rtf)(struct ata_queued_cmd *qc);
@@ -45,7 +45,7 @@
  
  	/*
  	 * Configuration and exception handling
-@@ -1008,6 +1010,9 @@ struct ata_port_operations {
+@@ -1009,6 +1011,9 @@ struct ata_port_operations {
  	void (*phy_reset)(struct ata_port *ap);
  	void (*eng_timeout)(struct ata_port *ap);
  
diff --git a/target/linux/ramips/patches-4.14/0032-USB-dwc2-add-device_reset.patch b/target/linux/ramips/patches-4.14/0032-USB-dwc2-add-device_reset.patch
index 1c6fe048b0..7e120c5311 100644
--- a/target/linux/ramips/patches-4.14/0032-USB-dwc2-add-device_reset.patch
+++ b/target/linux/ramips/patches-4.14/0032-USB-dwc2-add-device_reset.patch
@@ -18,7 +18,7 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
  
  #include <linux/usb/hcd.h>
  #include <linux/usb/ch11.h>
-@@ -5105,6 +5106,8 @@ int dwc2_hcd_init(struct dwc2_hsotg *hso
+@@ -5107,6 +5108,8 @@ int dwc2_hcd_init(struct dwc2_hsotg *hso
  
  	retval = -ENOMEM;
  
diff --git a/target/linux/ramips/patches-4.14/0036-mtd-fix-cfi-cmdset-0002-erase-status-check.patch b/target/linux/ramips/patches-4.14/0036-mtd-fix-cfi-cmdset-0002-erase-status-check.patch
deleted file mode 100644
index 9226202b7f..0000000000
--- a/target/linux/ramips/patches-4.14/0036-mtd-fix-cfi-cmdset-0002-erase-status-check.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 8e72a3a1be8f6328bd7ef491332ba541547b6086 Mon Sep 17 00:00:00 2001
-From: John Crispin <blogic at openwrt.org>
-Date: Mon, 15 Jul 2013 00:38:51 +0200
-Subject: [PATCH 36/53] mtd: fix cfi cmdset 0002 erase status check
-
----
- drivers/mtd/chips/cfi_cmdset_0002.c |    4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
---- a/drivers/mtd/chips/cfi_cmdset_0002.c
-+++ b/drivers/mtd/chips/cfi_cmdset_0002.c
-@@ -2295,7 +2295,7 @@ static int __xipram do_erase_chip(struct
- 			chip->erase_suspended = 0;
- 		}
- 
--		if (chip_ready(map, adr))
-+		if (chip_good(map, adr, map_word_ff(map)))
- 			break;
- 
- 		if (time_after(jiffies, timeo)) {
-@@ -2385,7 +2385,7 @@ static int __xipram do_erase_oneblock(st
- 			chip->erase_suspended = 0;
- 		}
- 
--		if (chip_ready(map, adr)) {
-+		if (chip_good(map, adr, map_word_ff(map))) {
- 			xip_enable(map, chip, adr);
- 			break;
- 		}
diff --git a/target/linux/ramips/patches-4.14/0037-mtd-cfi-cmdset-0002-force-word-write.patch b/target/linux/ramips/patches-4.14/0037-mtd-cfi-cmdset-0002-force-word-write.patch
index 7ee8284535..1cadfcdb00 100644
--- a/target/linux/ramips/patches-4.14/0037-mtd-cfi-cmdset-0002-force-word-write.patch
+++ b/target/linux/ramips/patches-4.14/0037-mtd-cfi-cmdset-0002-force-word-write.patch
@@ -16,7 +16,7 @@ Subject: [PATCH 37/53] mtd: cfi cmdset 0002 force word write
 -#define FORCE_WORD_WRITE 0
 +#define FORCE_WORD_WRITE 1
  
- #define MAX_WORD_RETRIES 3
+ #define MAX_RETRIES 3
  
 @@ -51,7 +51,9 @@
  
-- 
2.11.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From chunkeey at gmail.com  Mon Jul 30 16:33:51 2018
From: chunkeey at gmail.com (Christian Lamparter)
Date: Mon, 30 Jul 2018 22:33:51 +0200
Subject: [OpenWrt-Devel] [PATCH] kernel: modules: fix kmod-regmap
Message-ID: <20180730203351.11260-1-chunkeey@gmail.com>

This patch fixes the a compile issue that was triggered by
apm821xx/sata when kmod-regmap was selected.

The CONFIG_REGMAP is declared in drivers/base/regmap/Kconfig
as type "bool" and not "tristate". Hence the symbol should
never be set to module, as this confuses the #if CONFIG_REGMAP
guards in include/linux/regmap.h:

|.../drivers/regulator/core.c:4041: undefined reference to `dev_get_regmap'
|.../drivers/regulator/core.c:4042: undefined reference to `dev_get_regmap'
|.../drivers/regulator/core.c:4044: undefined reference to `dev_get_regmap'
|.../drivers/regulator/helpers.o: In function `regulator_is_enabled_regmap':
|.../drivers/regulator/helpers.c:36: undefined reference to `regmap_read'
|...

Signed-off-by: Christian Lamparter <chunkeey at gmail.com>
---
 package/kernel/linux/modules/other.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/kernel/linux/modules/other.mk b/package/kernel/linux/modules/other.mk
index 7e18a21db3..dd037cf86c 100644
--- a/package/kernel/linux/modules/other.mk
+++ b/package/kernel/linux/modules/other.mk
@@ -718,7 +718,7 @@ define KernelPackage/regmap
   SUBMENU:=$(OTHER_MENU)
   TITLE:=Generic register map support
   DEPENDS:=+kmod-lib-lzo +kmod-i2c-core
-  KCONFIG:=CONFIG_REGMAP \
+  KCONFIG:=CONFIG_REGMAP=y \
 	   CONFIG_REGMAP_MMIO \
 	   CONFIG_REGMAP_SPI \
 	   CONFIG_REGMAP_I2C \
-- 
2.18.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From john at phrozen.org  Mon Jul 30 16:35:41 2018
From: john at phrozen.org (John Crispin)
Date: Mon, 30 Jul 2018 22:35:41 +0200
Subject: [OpenWrt-Devel] [PATCH] kernel: modules: fix kmod-regmap
In-Reply-To: <20180730203351.11260-1-chunkeey@gmail.com>
References: <20180730203351.11260-1-chunkeey@gmail.com>
Message-ID: <9799fdd0-0416-6284-38af-e7dd6cd47326@phrozen.org>



On 30/07/18 22:33, Christian Lamparter wrote:
> This patch fixes the a compile issue that was triggered by
> apm821xx/sata when kmod-regmap was selected.
>
> The CONFIG_REGMAP is declared in drivers/base/regmap/Kconfig
> as type "bool" and not "tristate". Hence the symbol should
> never be set to module, as this confuses the #if CONFIG_REGMAP
> guards in include/linux/regmap.h:
>
> |.../drivers/regulator/core.c:4041: undefined reference to `dev_get_regmap'
> |.../drivers/regulator/core.c:4042: undefined reference to `dev_get_regmap'
> |.../drivers/regulator/core.c:4044: undefined reference to `dev_get_regmap'
> |.../drivers/regulator/helpers.o: In function `regulator_is_enabled_regmap':
> |.../drivers/regulator/helpers.c:36: undefined reference to `regmap_read'
> |...
i started a test build 2 minutes ago to figure this one out :-) thanks !


> Signed-off-by: Christian Lamparter <chunkeey at gmail.com>
> ---
>   package/kernel/linux/modules/other.mk | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/package/kernel/linux/modules/other.mk b/package/kernel/linux/modules/other.mk
> index 7e18a21db3..dd037cf86c 100644
> --- a/package/kernel/linux/modules/other.mk
> +++ b/package/kernel/linux/modules/other.mk
> @@ -718,7 +718,7 @@ define KernelPackage/regmap
>     SUBMENU:=$(OTHER_MENU)
>     TITLE:=Generic register map support
>     DEPENDS:=+kmod-lib-lzo +kmod-i2c-core
> -  KCONFIG:=CONFIG_REGMAP \
> +  KCONFIG:=CONFIG_REGMAP=y \
>   	   CONFIG_REGMAP_MMIO \
>   	   CONFIG_REGMAP_SPI \
>   	   CONFIG_REGMAP_I2C \


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From wong.syrone at gmail.com  Mon Jul 30 19:50:44 2018
From: wong.syrone at gmail.com (Syrone Wong)
Date: Tue, 31 Jul 2018 07:50:44 +0800
Subject: [OpenWrt-Devel] cns3xxx + gcc8 = compile error
In-Reply-To: <9ccb4c84-291e-2864-b883-b2ef85484043@ncentric.com>
References: <9ccb4c84-291e-2864-b883-b2ef85484043@ncentric.com>
Message-ID: <CAEaqfoY+jLsjaJj=2FKzQozFDdCwiAJN-wi+oGtP6W8cjxRthw@mail.gmail.com>

> /home/kvdp/firmware/builds/generic_cns3xxx/tmp/ccuGhaLZ.s: Assembler
> messages:
> /home/kvdp/firmware/builds/generic_cns3xxx/tmp/ccuGhaLZ.s:401: Error:
> selected processor does not support `sev' in ARM mode

Similar to https://github.com/openwrt/openwrt/pull/1203

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From dedeckeh at gmail.com  Tue Jul 31 04:01:27 2018
From: dedeckeh at gmail.com (Hans Dedecker)
Date: Tue, 31 Jul 2018 10:01:27 +0200
Subject: [OpenWrt-Devel] 6rd issues with 18.06-rc2 on ubnt-erx-sfp
In-Reply-To: <703b4fe7-750e-d0fe-5e8c-c24adc6eba67@mbox200.swipnet.se>
References: <f2b9bb3c-e94b-2cde-a29b-ad3cba9219d2@mbox200.swipnet.se>
 <CAJLcKsFKnNFW8sS8Q8XXFEvCv8JpY92czjsx-JZYo+do4Bn8tw@mail.gmail.com>
 <703b4fe7-750e-d0fe-5e8c-c24adc6eba67@mbox200.swipnet.se>
Message-ID: <CAJLcKsHBno+VVECeLTRTP3ad91AMtqJHXocnXv7BTazob+CtVw@mail.gmail.com>

On Mon, Jul 30, 2018 at 12:02 AM Torbjorn Jansson
<torbjorn.jansson at mbox200.swipnet.se> wrote:
>
> On 2018-07-29 22:16, Hans Dedecker wrote:
> > On Fri, Jul 27, 2018 at 2:36 PM Torbjorn Jansson
> > <torbjorn.jansson at mbox200.swipnet.se> wrote:
> >>
> >> Hello
> >>
> >> i decided to try to upgrade my erx-sfp from an old snapshot (probably a year or
> >> so old) to 18.06-rc2.
> >> for the most part it worked out but there is something odd going on with my 6rd
> >> wan interface and i'm not sure where to start the troubleshooting.
> >>
> >> with luci-proto-ipv6 and 6rd packages installed i get a lot of stuff like this
> >> in syslog:
> >> 14:29:07 2018 daemon.notice netifd: wan6 (24771): Command failed: Unknown error
> >> 14:29:07 2018 daemon.notice netifd: Interface 'wan6' is now down
> >> 14:29:07 2018 daemon.notice netifd: Interface 'wan6' is setting up now
> >> 14:29:08 2018 daemon.notice netifd: wan6 (24856): Command failed: Unknown error
> >> 14:29:08 2018 daemon.notice netifd: Interface 'wan6' is now down
> >> 14:29:08 2018 daemon.notice netifd: Interface 'wan6' is setting up
> >> (dates removed to make log easier to fit in mail without line breaks)
> >>
> >> this repeats every second and 6rd interface seems to get ip adress but it is
> >> not quite working.
> >>
> >> plus i noticed under Network -> Interfaces in webinterface i now have two
> >> similar looking 6rd interfaces.
> >> one named WAN6 and thats the one i created and another one that cant be edited
> >> that's called WAN_6
> >>
> >> WAN6 is listed as protocol: IPv6-over-IPv4 (6rd)
> >> WAN_6 is listed as protocol: Virtual dynamic interface (IPv6-over-IPv4 (6rd))
> >>
> >> the last interface must be something new or a problem or something.
> >> it is also that interface that gets the ipv6 addresses.
> >>
> >>
> >> any idea whats wrong?
> >> or how to find out what command failed in the log?
> > Hi,
> >
> > You cannot enable both an automatic 6rd interface (wan_6) and a manual
> > created 6rd interface (wan6); Either remove the manual created 6rd
> > interface or set iface6rd to 0 in the wan network config which will
> > disable the automatic creation of the 6rd wan_6 interface
> >
> > Hans
>
> i'm not sure i get it.
> where is the auto created 6rd interface that can't be edited coming from if not
> from the one i created myself?
The auto created 6rd interface is created by the dhcp script
(https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=package/network/config/netifd/files/lib/netifd/dhcp.script;h=00604f40e70e8ba988bde6af04437d326b5b548a;hb=HEAD#l62)
in case the 6rd DHCP option is received.
So it seems your ISP is providing 6rd info via DHCP
>
> the errors stopped once i changed "bring up on boot" on wan6 and ipv6 still
> works (after reboot) but i don't understand why.
This confirms my statement above about 6rd info being provided by DHCP
>
> the config i'm running with is exactly the same as i had on old version of
> openwrt/lede and it worked just fine.
> i guess something is different now.
Pretty sure nothing has changed recently related to the 6rd logic; I
guess it's a race condition between the wan_6 and wan6 interface which
was before not visible
> if i delete wan6 then I delete all 6rd settings like remote ipv4 address, the
> ipv6 prefix and so on.
If the automatic created 6rd interface gives you IPv6 connectivity
there's no reason to keep the manual created wan6 interface

Hans

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From freebsd at tango.lu  Tue Jul 31 04:02:50 2018
From: freebsd at tango.lu (freebsd at tango.lu)
Date: Tue, 31 Jul 2018 10:02:50 +0200
Subject: [OpenWrt-Devel] Arduino support no ttyUSB0 no ttyACM0 :((
Message-ID: <9b0e26dfa584219eb11d3d46e685380a@tango.lu>

Hello List,

I have got a new WRT 1200 AC running LEDE:

https://downloads.openwrt.org/releases/17.01.4/targets/mvebu/generic/

Sadly noticed that the ttyUSB ttyACM support is missing.

Is there an alternate kernel which has these?

If someone precompiled the kernel modul what I can just wget:

Firmware Version	LEDE Reboot 17.01.4 r3560-79f57e422d / LuCI lede-17.01 
branch (git-17.290.79498-d3f0685)
Kernel Version	4.4.92


on the router that would be nice although it would be just too easy... I 
really don't want to go DDwrt on this one.

Do you have a vmware/vbox image with all the toolchains to crossbuild 
the kernel and apps for this platform?

Thank you.

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From torbjorn.jansson at mbox200.swipnet.se  Tue Jul 31 04:29:24 2018
From: torbjorn.jansson at mbox200.swipnet.se (Torbjorn Jansson)
Date: Tue, 31 Jul 2018 10:29:24 +0200
Subject: [OpenWrt-Devel] 6rd issues with 18.06-rc2 on ubnt-erx-sfp
In-Reply-To: <CAJLcKsHBno+VVECeLTRTP3ad91AMtqJHXocnXv7BTazob+CtVw@mail.gmail.com>
References: <f2b9bb3c-e94b-2cde-a29b-ad3cba9219d2@mbox200.swipnet.se>
 <CAJLcKsFKnNFW8sS8Q8XXFEvCv8JpY92czjsx-JZYo+do4Bn8tw@mail.gmail.com>
 <703b4fe7-750e-d0fe-5e8c-c24adc6eba67@mbox200.swipnet.se>
 <CAJLcKsHBno+VVECeLTRTP3ad91AMtqJHXocnXv7BTazob+CtVw@mail.gmail.com>
Message-ID: <5b5421af-b78f-d42a-9b30-2a79a1aa5bfb@mbox200.swipnet.se>

On 2018-07-31 10:01, Hans Dedecker wrote:
> On Mon, Jul 30, 2018 at 12:02 AM Torbjorn Jansson
> <torbjorn.jansson at mbox200.swipnet.se> wrote:
>>
>> On 2018-07-29 22:16, Hans Dedecker wrote:
>>> On Fri, Jul 27, 2018 at 2:36 PM Torbjorn Jansson
>>> <torbjorn.jansson at mbox200.swipnet.se> wrote:
>>>>
>>>> Hello
>>>>
>>>> i decided to try to upgrade my erx-sfp from an old snapshot (probably a year or
>>>> so old) to 18.06-rc2.
>>>> for the most part it worked out but there is something odd going on with my 6rd
>>>> wan interface and i'm not sure where to start the troubleshooting.
>>>>
>>>> with luci-proto-ipv6 and 6rd packages installed i get a lot of stuff like this
>>>> in syslog:
>>>> 14:29:07 2018 daemon.notice netifd: wan6 (24771): Command failed: Unknown error
>>>> 14:29:07 2018 daemon.notice netifd: Interface 'wan6' is now down
>>>> 14:29:07 2018 daemon.notice netifd: Interface 'wan6' is setting up now
>>>> 14:29:08 2018 daemon.notice netifd: wan6 (24856): Command failed: Unknown error
>>>> 14:29:08 2018 daemon.notice netifd: Interface 'wan6' is now down
>>>> 14:29:08 2018 daemon.notice netifd: Interface 'wan6' is setting up
>>>> (dates removed to make log easier to fit in mail without line breaks)
>>>>
>>>> this repeats every second and 6rd interface seems to get ip adress but it is
>>>> not quite working.
>>>>
>>>> plus i noticed under Network -> Interfaces in webinterface i now have two
>>>> similar looking 6rd interfaces.
>>>> one named WAN6 and thats the one i created and another one that cant be edited
>>>> that's called WAN_6
>>>>
>>>> WAN6 is listed as protocol: IPv6-over-IPv4 (6rd)
>>>> WAN_6 is listed as protocol: Virtual dynamic interface (IPv6-over-IPv4 (6rd))
>>>>
>>>> the last interface must be something new or a problem or something.
>>>> it is also that interface that gets the ipv6 addresses.
>>>>
>>>>
>>>> any idea whats wrong?
>>>> or how to find out what command failed in the log?
>>> Hi,
>>>
>>> You cannot enable both an automatic 6rd interface (wan_6) and a manual
>>> created 6rd interface (wan6); Either remove the manual created 6rd
>>> interface or set iface6rd to 0 in the wan network config which will
>>> disable the automatic creation of the 6rd wan_6 interface
>>>
>>> Hans
>>
>> i'm not sure i get it.
>> where is the auto created 6rd interface that can't be edited coming from if not
>> from the one i created myself?
> The auto created 6rd interface is created by the dhcp script
> (https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=package/network/config/netifd/files/lib/netifd/dhcp.script;h=00604f40e70e8ba988bde6af04437d326b5b548a;hb=HEAD#l62)
> in case the 6rd DHCP option is received.
> So it seems your ISP is providing 6rd info via DHCP

oh, i see.
i'm not sure if isp always provided it or if the auto created 6rd interface in 
openwrt from dhcp is a new thing.

i know that when i  initially set it up a long time ago i did not get anything 
auto created.
i was under the impression my isp considered 6rd to be experimental.

>>
>> the errors stopped once i changed "bring up on boot" on wan6 and ipv6 still
>> works (after reboot) but i don't understand why.
> This confirms my statement above about 6rd info being provided by DHCP
>>
>> the config i'm running with is exactly the same as i had on old version of
>> openwrt/lede and it worked just fine.
>> i guess something is different now.
> Pretty sure nothing has changed recently related to the 6rd logic; I
> guess it's a race condition between the wan_6 and wan6 interface which
> was before not visible
>> if i delete wan6 then I delete all 6rd settings like remote ipv4 address, the
>> ipv6 prefix and so on.
> If the automatic created 6rd interface gives you IPv6 connectivity
> there's no reason to keep the manual created wan6 interface
> 
> Hans

i will try to delete it and see what happens.
but first id like to take a look at the dhcp reply i get from my isp.
maybe i can run a tcpdump or something to catch it as it renews.

thanks for explaining.

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From sven.eckelmann at openmesh.com  Tue Jul 31 04:57:03 2018
From: sven.eckelmann at openmesh.com (Sven Eckelmann)
Date: Tue, 31 Jul 2018 10:57:03 +0200
Subject: [OpenWrt-Devel] ath9k: Max 3 dBi gain for FCC
 (365-ath9k-adjust-tx-power-reduction-for-US-regulatory-do.patch)
Message-ID: <1533029944.ed0EXyJO7D@bentobox>

Hi,

I've just checked the FCC "antenna reduction workaround" patch [1] in ath9k. 
The code uses twicepower (.5 dB unit used by QCA) and uses 6 (3dBi) as allowed 
gain for FCC. The comment also states "FCC allows maximum antenna gain of 
3 dBi".

Where does the 3dBi come from? 15.247(b)(4) talks about 6 dBi [2]:

> (4) The conducted output power limit
> specified in paragraph (b) of this section
> is based on the use of antennas
> with directional gains that do not exceed
> 6 dBi. Except as shown in paragraph
> (c) of this section, if transmitting
> antennas of directional gain greater
> than 6 dBi are used, the conducted
> output power from the intentional radiator
> shall be reduced below the stated
> values in paragraphs (b)(1), (b)(2),
> and (b)(3) of this section, as appropriate,
> by the amount in dB that the
> directional gain of the antenna exceeds
> 6 dBi.

Btw. I am not sure whether all countries which use the FCC DFS rules also use 
the same antenna gain limits. But let us assume for now that this is ok.

Kind regards,
	Sven


[1] https://github.com/openwrt/openwrt/blob/81542331cb1827650f3abd69375d964d0ce2d050/package/kernel/mac80211/patches/365-ath9k-adjust-tx-power-reduction-for-US-regulatory-do.patch
[2] https://www.gpo.gov/fdsys/pkg/CFR-2013-title47-vol1/pdf/CFR-2013-title47-vol1-sec15-247.pdf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20180731/f329977a/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From torbjorn.jansson at mbox200.swipnet.se  Tue Jul 31 05:12:59 2018
From: torbjorn.jansson at mbox200.swipnet.se (Torbjorn Jansson)
Date: Tue, 31 Jul 2018 11:12:59 +0200
Subject: [OpenWrt-Devel] Arduino support no ttyUSB0 no ttyACM0 :((
In-Reply-To: <9b0e26dfa584219eb11d3d46e685380a@tango.lu>
References: <9b0e26dfa584219eb11d3d46e685380a@tango.lu>
Message-ID: <aa08568f-e646-17e2-e3ca-8a3ee8eb2ce5@mbox200.swipnet.se>

On 2018-07-31 10:02, freebsd at tango.lu wrote:
> Hello List,
> 
> I have got a new WRT 1200 AC running LEDE:
> 
> https://downloads.openwrt.org/releases/17.01.4/targets/mvebu/generic/
> 
> Sadly noticed that the ttyUSB ttyACM support is missing.
> 
> Is there an alternate kernel which has these?
> 
> If someone precompiled the kernel modul what I can just wget:
> 
> Firmware Version??? LEDE Reboot 17.01.4 r3560-79f57e422d / LuCI lede-17.01 
> branch (git-17.290.79498-d3f0685)
> Kernel Version??? 4.4.92
> 
> 
> on the router that would be nice although it would be just too easy... I really 
> don't want to go DDwrt on this one.
> 
> Do you have a vmware/vbox image with all the toolchains to crossbuild the 
> kernel and apps for this platform?
> 
> Thank you.
> 

did you install the needed kernel modules for usb and/or serial port depending 
on what your after.
also how is openwrt related to arduino?

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From bobafetthotmail at gmail.com  Tue Jul 31 06:08:20 2018
From: bobafetthotmail at gmail.com (Alberto Bursi)
Date: Tue, 31 Jul 2018 12:08:20 +0200
Subject: [OpenWrt-Devel] Arduino support no ttyUSB0 no ttyACM0 :((
In-Reply-To: <9b0e26dfa584219eb11d3d46e685380a@tango.lu>
References: <9b0e26dfa584219eb11d3d46e685380a@tango.lu>
Message-ID: <db2a94a7-49d4-b021-c034-862920324e98@gmail.com>



On 31/07/2018 10:02, freebsd at tango.lu wrote:
> Hello List,
>
> I have got a new WRT 1200 AC running LEDE:
>
> https://downloads.openwrt.org/releases/17.01.4/targets/mvebu/generic/
>
> Sadly noticed that the ttyUSB ttyACM support is missing.
>
> Is there an alternate kernel which has these?
>
> If someone precompiled the kernel modul what I can just wget:
>
> Firmware Version??? LEDE Reboot 17.01.4 r3560-79f57e422d / LuCI 
> lede-17.01 branch (git-17.290.79498-d3f0685)
> Kernel Version??? 4.4.92
>
>
> on the router that would be nice although it would be just too easy... 
> I really don't want to go DDwrt on this one.
>
> Do you have a vmware/vbox image with all the toolchains to crossbuild 
> the kernel and apps for this platform?
>
> Thank you.
>
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel

To connect an Arduino to your Lede router you need to install 
usb-to-serial adapter kernel modules (Linux "drivers"). For most things 
you will need to install packages to add functions.

Please install the following packages (with "opkg install" if you are 
with terminal or with Luci software page)
kmod-usb-serial kmod-usb-serial-ark3116 kmod-usb-serial-belkin 
kmod-usb-serial-ch341 kmod-usb-serial-cp210x kmod-usb-serial-ftdi 
kmod-usb-serial-mct kmod-usb-serial-mos7720 kmod-usb-serial-oti6858 
kmod-usb-serial-pl2303
kmod-usb-serial-simple kmod-usb-serial-ti-usb

And then plug the Arduino again.

In practice you will probably need only one of these but I don't know 
what is the usb-to-serial chip used in your arduino (or clone). They 
don't need much space anyway, so install all.

-Alberto

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From koen.vandeputte at ncentric.com  Tue Jul 31 06:44:13 2018
From: koen.vandeputte at ncentric.com (Koen Vandeputte)
Date: Tue, 31 Jul 2018 12:44:13 +0200
Subject: [OpenWrt-Devel] [PATCH 2/2] kernel: bump 4.14 to 4.14.59 for
 18.06
In-Reply-To: <20180730193147.2243-2-foss@volatilesystems.org>
References: <20180730193147.2243-1-foss@volatilesystems.org>
 <20180730193147.2243-2-foss@volatilesystems.org>
Message-ID: <5c3a54b4-f714-44f3-8d38-4233276f50da@ncentric.com>



On 2018-07-30 21:31, Stijn Segers wrote:
> * Refreshed patches.
> * Patches made redundant by changes upstream:
>    - target/linux/ramips/patches-4.14/0036-mtd-fix-cfi-cmdset-0002-erase-status-check.patch
> * Patches accepted upstream:
>    - target/linux/apm821xx/patches-4.14/020-0001-crypto-crypto4xx-remove-bad-list_del.patch
>    - target/linux/apm821xx/patches-4.14/020-0011-crypto-crypto4xx-fix-crypto4xx_build_pdr-crypto4xx_b.patch
>    - target/linux/brcm63xx/patches-4.14/001-4.15-08-bcm63xx_enet-correct-clock-usage.patch
>    - target/linux/brcm63xx/patches-4.14/001-4.15-09-bcm63xx_enet-do-not-write-to-random-DMA-channel-on-B.patch
>    - target/linux/generic/backport-4.14/080-net-convert-sock.sk_wmem_alloc-from-atomic_t-to-refc.patch
>    - target/linux/generic/pending-4.14/900-gen_stats-fix-netlink-stats-padding.patch
>
> Compile-tested on: ramips/mt7621, x86/64
> Run-tested on: ramips/mt7621, x86/64
>
> Signed-off-by: Stijn Segers <foss at volatilesystems.org>
> ---
>   include/kernel-version.mk                          |   4 +-
>   ...0001-crypto-crypto4xx-remove-bad-list_del.patch |  32 ----
>   ...to4xx-remove-unused-definitions-and-write.patch |   2 +-
>   ...to4xx-set-CRYPTO_ALG_KERN_DRIVER_ONLY-fla.patch |   2 +-
>   ...to4xx-remove-double-assignment-of-pd_uinf.patch |   2 +-
>   ...to4xx-enable-AES-RFC3686-ECB-CFB-and-OFB-.patch |   2 +-
>   ...pto4xx-refactor-crypto4xx_copy_pkt_to_dst.patch |   2 +-
>   ...to4xx-replace-crypto4xx_dev-s-scatter_buf.patch |   8 +-
>   ...to4xx-fix-crypto4xx_build_pdr-crypto4xx_b.patch |  84 ----------
>   .../802-usb-xhci-force-msi-renesas-xhci.patch      |   2 +-
>   ...-add-support-for-performing-fake-doorbell.patch |   2 +-
>   .../patches-4.14/830-huawei_e970_support.patch     |   4 +-
>   ...-4.15-08-bcm63xx_enet-correct-clock-usage.patch | 101 ------------
>   ...t-do-not-write-to-random-DMA-channel-on-B.patch |  29 ----
>   .../025-tcp-allow-drivers-to-tweak-TSQ-logic.patch |   4 +-
>   ...-sock.sk_wmem_alloc-from-atomic_t-to-refc.patch | 172 ---------------------
>   ...15-netfilter-exit_net-cleanup-check-added.patch |   2 +-
>   .../generic/hack-4.14/207-disable-modorder.patch   |   4 +-
>   .../hack-4.14/211-host_tools_portability.patch     |   2 +-
>   .../linux/generic/hack-4.14/220-gc_sections.patch  |   2 +-
>   .../linux/generic/hack-4.14/902-debloat_proc.patch |   2 +-
>   ...rocess-negative-stack-offsets-on-stack-tr.patch |   2 +-
>   .../pending-4.14/201-extra_optimization.patch      |   2 +-
>   ...610-netfilter_match_bypass_default_checks.patch |   6 +-
>   .../pending-4.14/630-packet_socket_type.patch      |   6 +-
>   .../generic/pending-4.14/834-ledtrig-libata.patch  |  10 +-
>   .../900-gen_stats-fix-netlink-stats-padding.patch  |  49 ------
>   .../patches-4.14/0052-net-phy-add-FC.patch         |   2 +-
>   ...ci-allow-imod-interval-to-be-configurable.patch |   2 +-
>   .../oxnas/patches-4.14/999-libata-hacks.patch      |   8 +-
>   .../0032-USB-dwc2-add-device_reset.patch           |   2 +-
>   ...td-fix-cfi-cmdset-0002-erase-status-check.patch |  29 ----
>   ...0037-mtd-cfi-cmdset-0002-force-word-write.patch |   2 +-
>   33 files changed, 44 insertions(+), 540 deletions(-)
>   delete mode 100644 target/linux/apm821xx/patches-4.14/020-0001-crypto-crypto4xx-remove-bad-list_del.patch
>   delete mode 100644 target/linux/apm821xx/patches-4.14/020-0011-crypto-crypto4xx-fix-crypto4xx_build_pdr-crypto4xx_b.patch
>   delete mode 100644 target/linux/brcm63xx/patches-4.14/001-4.15-08-bcm63xx_enet-correct-clock-usage.patch
>   delete mode 100644 target/linux/brcm63xx/patches-4.14/001-4.15-09-bcm63xx_enet-do-not-write-to-random-DMA-channel-on-B.patch
>   delete mode 100644 target/linux/generic/backport-4.14/080-net-convert-sock.sk_wmem_alloc-from-atomic_t-to-refc.patch
>   delete mode 100644 target/linux/generic/pending-4.14/900-gen_stats-fix-netlink-stats-padding.patch
>   delete mode 100644 target/linux/ramips/patches-4.14/0036-mtd-fix-cfi-cmdset-0002-erase-status-check.patch

Hi Stijn,

Thanks for the patch.


The patch is missing the fix for the possible ext4 corruption issue on 
newly created filesystems [1]
Stijn Tintel bumped a kernel update to master adding it, which can be 
used as a reference [2]


Koen

[1] 
https://github.com/torvalds/linux/commit/5012284700775a4e6e3fbe7eac4c543c4874b559.patch
[2] 
https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=22b9f99b87fa1ff991180cabf02dd04d1bddce2b

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From koen.vandeputte at ncentric.com  Tue Jul 31 06:46:53 2018
From: koen.vandeputte at ncentric.com (Koen Vandeputte)
Date: Tue, 31 Jul 2018 12:46:53 +0200
Subject: [OpenWrt-Devel] [PATCH 1/2] kernel: bump 4.9 to 4.9.116 for
 18.06
In-Reply-To: <20180730193147.2243-1-foss@volatilesystems.org>
References: <20180730193147.2243-1-foss@volatilesystems.org>
Message-ID: <4597d8ed-8ecf-1e47-6d62-a3ab522d99e7@ncentric.com>



On 2018-07-30 21:31, Stijn Segers wrote:
> * Refreshed patches.
> * Removed patches:
>    - target/linux/ar71xx/patches-4.9/103-MIPS-ath79-fix-register-address-in-ath79_ddr_wb_flus.patch superseded by upstream
>    - target/linux/ar71xx/patches-4.9/403-mtd_fix_cfi_cmdset_0002_status_check.patch superseded by upstream
>    - target/linux/brcm63xx/patches-4.9/001-4.11-01-mtd-m25p80-consider-max-message-size-in-m25p80_read.patch accepted upstream
>    - target/linux/brcm63xx/patches-4.9/001-4.15-08-bcm63xx_enet-correct-clock-usage.patch accepted upstream
>    - target/linux/brcm63xx/patches-4.9/001-4.15-09-bcm63xx_enet-do-not-write-to-random-DMA-channel-on-B.patch accepted upstream
>
> Compile-tested on: ar71xx
> Run-tested on: ar71xx
>
> Signed-off-by: Stijn Segers <foss at volatilesystems.org>
> ---
>   include/kernel-version.mk                          |   4 +-
>   ...fix-register-address-in-ath79_ddr_wb_flus.patch |  23 --
>   .../403-mtd_fix_cfi_cmdset_0002_status_check.patch |  69 -----
>   ...low-to-pass-probe-types-via-platform-data.patch |   4 +-
>   .../411-mtd-cfi_cmdset_0002-force-word-write.patch |   8 +-
>   .../patches-4.9/910-unaligned_access_hacks.patch   |  10 +-
>   ...gnore-dtco-targets-when-filtering-symbols.patch |   2 +-
>   .../patches-4.9/950-0031-Add-dwc_otg-driver.patch  |   2 +-
>   ...-consider-max-message-size-in-m25p80_read.patch |  30 --
>   ...-4.15-08-bcm63xx_enet-correct-clock-usage.patch | 101 ------
>   ...t-do-not-write-to-random-DMA-channel-on-B.patch |  29 --
>   .../024-1-tcp-tsq-add-tsq_flags-tsq_enum.patch     |   6 +-
>   ...-remove-one-locked-operation-in-tcp_wfree.patch |   4 +-
>   ...-tcp-tsq-add-shortcut-in-tcp_tasklet_func.patch |   6 +-
>   ...4-4-tcp-tsq-avoid-one-atomic-in-tcp_wfree.patch |   4 +-
>   ...q-add-a-shortcut-in-tcp_small_queue_check.patch |   2 +-
>   ...tcp-tcp_mtu_probe-is-likely-to-exit-early.patch |   2 +-
>   ...tsq-move-tsq_flags-close-to-sk_wmem_alloc.patch |  14 +-
>   ...add-a-missing-barrier-in-tcp_tasklet_func.patch |   2 +-
>   .../025-tcp-allow-drivers-to-tweak-TSQ-logic.patch |   4 +-
>   ...ort-for-releasing-multiple-instances-of-a.patch |   2 +-
>   ..._alloc_page_frag-to-page_frag_alloc-and-_.patch |   4 +-
>   ..._page_frag-functions-to-__page_frag_cache.patch |   6 +-
>   .../090-net-generalize-napi_complete_done.patch    |   8 +-
>   .../generic/hack-4.9/207-disable-modorder.patch    |   4 +-
>   .../hack-4.9/211-host_tools_portability.patch      |   2 +-
>   .../linux/generic/hack-4.9/220-gc_sections.patch   |   4 +-
>   ...c_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch |   2 +-
>   .../pending-4.9/201-extra_optimization.patch       |   2 +-
>   ...610-netfilter_match_bypass_default_checks.patch |   6 +-
>   .../pending-4.9/630-packet_socket_type.patch       |   6 +-
>   .../generic/pending-4.9/834-ledtrig-libata.patch   |  10 +-
>   .../900-gen_stats-fix-netlink-stats-padding.patch  |  49 ---
>   .../patches-4.9/600-skb_avoid_dmabounce.patch      |   2 +-
>   ...MTD-m25p80-allow-loading-mtd-name-from-OF.patch |   4 +-
>   .../202-core-linux-support-layerscape.patch        |   6 +-
>   .../patches-4.9/703-phy-support-layerscape.patch   |   2 +-
>   .../patches-4.9/817-usb-support-layerscape.patch   |  10 +-
>   .../sunxi/patches-4.9/0052-stmmac-form-4-12.patch  | 344 ++++++++++-----------
>   39 files changed, 238 insertions(+), 561 deletions(-)
>   delete mode 100644 target/linux/ar71xx/patches-4.9/103-MIPS-ath79-fix-register-address-in-ath79_ddr_wb_flus.patch
>   delete mode 100644 target/linux/ar71xx/patches-4.9/403-mtd_fix_cfi_cmdset_0002_status_check.patch
>   delete mode 100644 target/linux/brcm63xx/patches-4.9/001-4.11-01-mtd-m25p80-consider-max-message-size-in-m25p80_read.patch
>   delete mode 100644 target/linux/brcm63xx/patches-4.9/001-4.15-08-bcm63xx_enet-correct-clock-usage.patch
>   delete mode 100644 target/linux/brcm63xx/patches-4.9/001-4.15-09-bcm63xx_enet-do-not-write-to-random-DMA-channel-on-B.patch
>   delete mode 100644 target/linux/generic/pending-4.9/900-gen_stats-fix-netlink-stats-padding.patch


Hi Stijn,

The patch is also missing the fix for the possible ext4 corruption issue 
on newly created filesystems [1]
It seems tough that there is no proper backport available yet for this 
stable tree .. [2]


Koen

[1] 
https://github.com/torvalds/linux/commit/5012284700775a4e6e3fbe7eac4c543c4874b559.patch
[2] https://www.spinics.net/lists/stable/msg249577.html

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From openwrt-devel at lists.openwrt.org  Tue Jul 31 06:57:13 2018
From: openwrt-devel at lists.openwrt.org (Eneas U de Queiroz via openwrt-devel)
Date: Tue, 31 Jul 2018 10:57:13 +0000
Subject: [OpenWrt-Devel] [PATCH] libpcap: patch to add limits.h to
 pcap-usb-linux.c
Message-ID: <mailman.13975.1533034632.25356.openwrt-devel@lists.openwrt.org>

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.
-------------- next part --------------
An embedded message was scrubbed...
From: Eneas U de Queiroz <cote2004-github at yahoo.com>
Subject: [PATCH] libpcap: patch to add limits.h to pcap-usb-linux.c
Date: Tue, 31 Jul 2018 07:56:42 -0300
Size: 5002
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20180731/2e0706ac/attachment.eml>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From koen.vandeputte at ncentric.com  Tue Jul 31 07:08:59 2018
From: koen.vandeputte at ncentric.com (Koen Vandeputte)
Date: Tue, 31 Jul 2018 13:08:59 +0200
Subject: [OpenWrt-Devel] [PATCH 1/2] kernel: bump 4.9 to 4.9.116 for
 18.06
In-Reply-To: <4597d8ed-8ecf-1e47-6d62-a3ab522d99e7@ncentric.com>
References: <20180730193147.2243-1-foss@volatilesystems.org>
 <4597d8ed-8ecf-1e47-6d62-a3ab522d99e7@ncentric.com>
Message-ID: <b852c80b-737e-704f-7794-2457d8a5f2f5@ncentric.com>

Hi Stijn,

It seems a new helper was introduced in newer kernels:


-- a/fs/ext4/super.c
++ b/fs/ext4/super.c
@@ -3103,14 +3103,8 @@ static ext4_group_t ext4_has_uninit_itab
 ??????????????? if (!gdp)
 ??????????????????????? continue;

-?????????????? if (gdp->bg_flags & cpu_to_le16(EXT4_BG_INODE_ZEROED))
-?????????????????????? continue;
-?????????????? if (group != 0)
+?????????????? if (!(gdp->bg_flags & cpu_to_le16(EXT4_BG_INODE_ZEROED)))
 ??????????????????????? break;
-?????????????? ext4_error(sb, "Inode table for bg 0 marked as "
-????????????????????????? "needing zeroing");
-?????????????? if (sb_rdonly(sb))??? ??? <<<<<<
-?????????????????????? return ngroups;
 ??????? }

 ??????? return group;


can be altered to


-- a/fs/ext4/super.c
++ b/fs/ext4/super.c
@@ -3103,14 +3103,8 @@ static ext4_group_t ext4_has_uninit_itab
 ??????????????? if (!gdp)
 ??????????????????????? continue;

-?????????????? if (gdp->bg_flags & cpu_to_le16(EXT4_BG_INODE_ZEROED))
-?????????????????????? continue;
-?????????????? if (group != 0)
+?????????????? if (!(gdp->bg_flags & cpu_to_le16(EXT4_BG_INODE_ZEROED)))
 ??????????????????????? break;
-?????????????? ext4_error(sb, "Inode table for bg 0 marked as "
-????????????????????????? "needing zeroing");
-?????????????? if (sb->s_flags & MS_RDONLY) <<<<<<
-?????????????????????? return ngroups;
 ??????? }

 ??????? return group;


to make the patch applicable for 4.9 kernels.


Koen

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From bjorn at mork.no  Tue Jul 31 08:01:12 2018
From: bjorn at mork.no (=?UTF-8?q?Bj=C3=B8rn=20Mork?=)
Date: Tue, 31 Jul 2018 14:01:12 +0200
Subject: [OpenWrt-Devel] [PATCH] include/feeds.mk: fix distfeeds.conf
 without per-feed repos
Message-ID: <20180731120112.8556-1-bjorn@mork.no>

commit 514a4b3e1b4e4 ("include/feeds.mk: rework generation of opkg
distfeeds.conf") made the per-feed "base" repo unconditional, making
the default configuration fail when PER_FEED_REPO is disabled:

 root at wrt1900ac-1:~# cat /etc/opkg/distfeeds.conf
 src/gz openwrt_core http://openwrt.mork.no/18.06.0/targets/mvebu/cortexa9/packages
 src/gz openwrt_base http://openwrt.mork.no/18.06.0/packages/arm_cortex-a9_vfpv3/base
 root at wrt1900ac-1:~# opkg update
 Downloading http://openwrt.mork.no/18.06.0/targets/mvebu/cortexa9/packages/Packages.gz
 Updated list of available packages in /var/opkg-lists/openwrt_core
 Downloading http://openwrt.mork.no/18.06.0/targets/mvebu/cortexa9/packages/Packages.sig
 Signature check passed.
 Downloading http://openwrt.mork.no/18.06.0/packages/arm_cortex-a9_vfpv3/base/Packages.gz
 *** Failed to download the package list from http://openwrt.mork.no/18.06.0/packages/arm_cortex-a9_vfpv3/base/Packages.gz

 Collected errors:
  * opkg_download: Failed to download http://openwrt.mork.no/18.06.0/packages/arm_cortex-a9_vfpv3/base/Packages.gz, wget returned 8.

Cc: Matthias Schiffer <mschiffer at universe-factory.net>
Fixes: 514a4b3e1b4e ("include/feeds.mk: rework generation of opkg distfeeds.conf")
Signed-off-by: Bj?rn Mork <bjorn at mork.no>
---
This needs to be backported to the 18.06 branch.  Builds with PER_FEED_REPO
disabled are currently broken there too.


 include/feeds.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/feeds.mk b/include/feeds.mk
index 3e0801e656bf..fa114c2a5f9e 100644
--- a/include/feeds.mk
+++ b/include/feeds.mk
@@ -34,8 +34,8 @@ endef
 define FeedSourcesAppend
 ( \
   echo 'src/gz %d_core %U/targets/%S/packages'; \
-  echo 'src/gz %d_base %U/packages/%A/base'; \
   $(strip $(if $(CONFIG_PER_FEED_REPO), \
+  	echo 'src/gz %d_base %U/packages/%A/base'; \
 	$(foreach feed,$(FEEDS_AVAILABLE), \
 		$(if $(CONFIG_FEED_$(feed)), \
 			echo '$(if $(filter m,$(CONFIG_FEED_$(feed))),# )src/gz %d_$(feed) %U/packages/%A/$(feed)';)))) \
-- 
2.11.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

