Commit Graph

3253 Commits (fbd4214bb0727268aa535af5b600d38939ec8dbc)

Author SHA1 Message Date
Thibaut VARÈNE dac18f66fb generic: routerboot sysfs: move tag_show_string()
This routine will be shared between hard and soft config drivers.
Also use scnprintf() instead of snprintf().

Tested-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
Tested-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
4 years ago
Thibaut VARÈNE 39ec3c5986 generic: platform/mikrotik: rb_hardconfig.c minor fixes
For the sake of strictly typed code, add a missing const qualifier.
Add a missing return value in error path.
Check the return value of mtd_read(), for good measure.
Also demote the error printks of failed sysfs file creation to warn
level since they are not fatal in the init() sequence.
Finally, add a note regarding PAGE_SIZE and clarify a comment.

Tested-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
Tested-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
4 years ago
Thibaut VARÈNE 429fbc96a4 generic: platform/mikrotik: reorder Kconfig
The depends and select should apply to the sysfs driver, not the meta
config.

Tested-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
Tested-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
4 years ago
Álvaro Fernández Rojas 584d4bf1d3 bcm27xx: update patches from RPi foundation
bcm2708: boot tested on RPi B+ v1.2
bcm2709: boot tested on RPi 3B v1.2
bcm2710: boot tested on RPi 3B v1.2
bcm2711: boot tested on RPi 4B v1.1 4G

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Adrian Schmutzler 4661b05390 kernel: properly insert local mtd partition parsers
Between 4.19 and 5.4, the kernel moved the partition parsers into
the parsers subdirectory. This led to some necessary rebasing of
our local patches for parsers, which partially has been performed
without caring about where the code was inserted.

This commit tries to adjust our local patches so that parsers are
inserted at the "proper" positions with respect to alphabetic sorting
(if possible). Thus, the commit is cosmetic.

While this might look useless now, it will make life easier when
adding other parsers in the future or for rebasing on kernel changes.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler b91b7d8963 kernel: remove a bunch of trailing whitespaces
These trailing whitespaces were reported during kernel patch refresh.

While at it, harmonize a few indents as well.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler 807366af38 kernel: drop backported gpio emulated open drain output fix
This patch has been backported to stable kernel 5.4 already.

Remove our local patch explicitly now, as by applying the patch
(or refreshing) the relevant code is actually added a second time.

Refresh remaining patches as well.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Russell King 714199ec34 kernel: backport v5.8 i2c-pxa updates
Add i2c-pxa updates queued for v5.8, which add bus recovery to this
driver; this is needed for the uDPU platform.

Signed-off-by: Russell King <linux@armlinux.org.uk>
4 years ago
Russell King 72a1d5c3ac kernel: backport gpio emulated open drain output fix
Backport the GPIO emulated open drain output fix from v5.5, which is
required for the i2c-pxa backport.

Signed-off-by: Russell King <linux@armlinux.org.uk>
4 years ago
Thibaut VARÈNE 6934b20912 generic: platform/mikrotik: disambiguate SPDX-License-Identifier
I meant it to be GPL-2.0-only, as evidenced by the boilerplate.

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
4 years ago
Thibaut VARÈNE 49eec56bfc generic: routerbootpart.c: disambiguate SPDX-License-Identifier
I meant it to be GPL-2.0-only, as evidenced by the boilerplate.

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
4 years ago
Petr Štetiar 1b2fefb244 kernel: bump 5.4 to 5.4.42
Refreshed patches, removed upstreamed patch:

 generic/pending: 001-v5.4-pinctrl-qcom-fix-wrong-write-in-update_dual_edge.patch.patch

Run tested: qemu-x86-64
Build tested: x86/64, ath79/nand, imx6, sunxi/a53

Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years ago
Álvaro Fernández Rojas 5d3bb7ea9a kernel: mtdsplit: bcm_wfi: add sercomm support
SERCOMM creates separates partitions for cferam.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Álvaro Fernández Rojas cca13d8e82 kernel: mtdsplit: add BCM WFI support
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Adrian Schmutzler 8ff813e5f4 generic: drop outdated kernel version switches in local drivers
This drops the obsolete version switches for non-supported kernels
from local drivers in generic target.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Thibaut VARÈNE 2ea481193c generic: platform/mikrotik: fix LZOR support
31e99fe3da which introduced this code was unfortunately untested.
This commit fixes a number of issues and works around the fact that in
this particular scheme, the LZO payload may be padded at the end which
will trigger a harmless lzo decompression error.
This commit also disambiguates the debug printks.

Tested-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
Fixes: 31e99fe3da ("generic: platform/mikrotik: support LZOR encoding")
4 years ago
Koen Vandeputte eb17ee294c kernel: bump 5.4 to 5.4.41
Refreshed all patches.

Compile-tested on: imx6
Runtime-tested on: imx6

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
4 years ago
Koen Vandeputte d503492857 kernel: bump 4.19 to 4.19.123
Refreshed all patches.

Compile-tested on: cns3xxx
Runtime-tested on: cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
4 years ago
Koen Vandeputte 7dd2d7289a kernel: bump 4.19 to 4.19.122
Refreshed all patches.

Remove upstreamed:
- 551-loop-Better-discard-support-for-block-devices.patch

Fixed:
- CVE-2020-11884
- CVE-2020-12114
- CVE-2019-3016
- CVE-2020-11669

Compile-tested on: cns3xxx
Runtime-tested on: cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
4 years ago
Koen Vandeputte ef2d5a2ab4 kernel: bump 4.14 to 4.14.180
Refreshed all patches.

Fixes:
- CVE-2020-12114
- CVE-2020-11669

Compile-tested on: pistachio
Runtime-tested on: none

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
4 years ago
Koen Vandeputte 146e18af56 generic: add MikroTik hw bit description
An e-mail response from MikroTik contained a minimal overview
on hardware option bits which mentioned a currently unknown bit.

While not being too detailed what it does, add it for documentation purposes.

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
4 years ago
Koen Vandeputte 51a7184a7d generic: fix patching error on kernel 5.4
Fixes a build error seen when applying the kernel patches.

Applying patch generic/435-mtd-add-routerbootpart-parser-config.patch
patching file drivers/mtd/parsers/Kconfig
Hunk #1 FAILED at 160.
1 out of 1 hunk FAILED -- rejects in file drivers/mtd/parsers/Kconfig
patching file drivers/mtd/parsers/Makefile
Hunk #1 FAILED at 10.
1 out of 1 hunk FAILED -- rejects in file drivers/mtd/parsers/Makefile

This was missed as 5.4 is currently set as testing kernel
while the main kernel being used is 4.19

Fixes: 2976e423dc ("generic: routerboot partition build bits")
Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
4 years ago
Thibaut VARÈNE 31e99fe3da generic: platform/mikrotik: support LZOR encoding
Some newer MikroTik RouterBOARD devices use a new encoding scheme
for their WLAN calibration data. This patch provides support for
decoding this new scheme.

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
4 years ago
Thibaut VARÈNE 1dcc2249cd generic: mikrotik platform build bits
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
4 years ago
Thibaut VARÈNE 5ecf7d9654 generic: routerboot sysfs platform driver
This driver exposes the data encoded in the "hard_config" flash segment
of MikroTik RouterBOARDs devices. It presents the data in a sysfs folder
named "hard_config". The WLAN calibration data is available on demand via
the 'wlan_data' sysfs file in that folder.

This driver permanently allocates a chunk of RAM as large as the
"hard_config" MTD partition (typically 4KB), although it is technically
possible to operate entirely from the MTD device without using a local
buffer (except when requesting WLAN calibration data), at the cost of a
performance penalty.

This driver does not reuse any of the existing code previously found in
routerboot.c.

This driver has been successfully tested on BE (ath79) and LE (ipq40xx
and ramips) hardware.

Tested-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
Tested-by: Baptiste Jonglez <git@bitsofnetworks.org>
Tested-by: Tobias Schramm <t.schramm@manjaro.org>
Tested-by: Christopher Hill <ch6574@gmail.com>
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
4 years ago
Thibaut VARÈNE 2976e423dc generic: routerboot partition build bits
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
4 years ago
Thibaut VARÈNE ee5ee99dcf generic: routerbootpart MTD parser for RouterBoot
This driver provides an OF MTD parser to properly assign the RouterBoot
partitions on the flash. This parser builds from the "fixed-partitions"
one (see ofpart.c), but it can handle dynamic partitions as found on
routerboot devices.

The parent node must contain the following:
	compatible = "mikrotik,routerboot-partitions";
	#address-cells = <1>;
	#size-cells = <1>;

Children routerbootpart DTS nodes are defined as follows:
For fixed partitions
	node-name@unit-address {
		reg = <prop-encoded-array>;
		label = <string>;
		read-only;
		lock;
	};

All properties but reg are optional.

For dynamic partitions:
	node-name {
		size = <prop-encoded-array>;
		label = <string>;
		read-only;
		lock;
	};

size property is mandatory unless the next partition is a fixed one or
a "well-known" one (matched from the strings defined below) in which case
it can be omitted or set to 0; other properties are optional.

By default dynamic partitions are appended after the preceding one, except
for "well-known" ones which are automatically located on flash.

Well-known partitions (matched via label or node-name):
 - "hard_config"
 - "soft_config"
 - "dtb_config"

This parser requires the DTS to list partitions in ascending order as
expected on the MTD device.

This parser has been successfully tested on BE (ath79) and LE (ipq40xx
and ramips) hardware.

Tested-by: Baptiste Jonglez <git@bitsofnetworks.org>
Tested-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
Tested-by: Tobias Schramm <t.schramm@manjaro.org>
Tested-by: Christopher Hill <ch6574@gmail.com>
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
4 years ago
Stijn Tintel 03fd38d612 kernel: add missing symbol to 5.4 config
This symbol is exposed if KERNEL_PROVE_LOCKING is enabled.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
4 years ago
Petr Štetiar d1d2c0b557 kernel: bump 5.4 to 5.4.39
Refreshed patches.

Run tested: qemu-x86-64
Build tested: x86/64, imx6, sunxi/a53, layerscape/armv7+armv8_64b

Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years ago
Chuanhong Guo 47f17b0662 generic: ar8216: fix unknown packet flooding for ar8229/ar8236
ar8229 and ar8236 don't allow unknown unicast/multicast frames and
broadcast frames to be flooded to cpu port. This isn't desired behavior
for swconfig as we treat it as a standalone switch.
Current code doesn't enable unicast frame flooding for ar8229 and uses
wrong setup for ar8236. This commit fixes both of them by enabling port
0 flooding for all unknown frames.

Fixes: FS#2848
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
4 years ago
Petr Štetiar 73de205c57 kernel: bump 5.4 to 5.4.38
Refreshed patches.

Run tested: qemu-x86-64, apalis
Build tested: x86/64, ipq40xx, ath79, imx6, sunxi/a53

Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years ago
Petr Štetiar 5ea3ea154f kernel: bump 5.4 to 5.4.36
Refreshed patches, removed upstreamed patch:

 generic/hack: 551-loop-Better-discard-support-for-block-devices.patch

Added generic config symbol `ARM64_ERRATUM_1542419` due to Fixes:
f2791551cedb ("arm64: errata: Hide CTR_EL0.DIC on systems affected by
Neoverse-N1 #1542419").

Run tested: qemu-x86-64, apalis, nbg6617
Build tested: x86/64, imx6, ipq40xx, sunxi/a53

Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years ago
Matt Merhar ee500186a5 kernel: backport fix for non-regular inodes on f2fs
Upstream commit dda9f4b9ca ("f2fs: fix to skip verifying block address
for non-regular inode").

On 4.14, attempting to perform operations on a non-regular inode
residing on an f2fs filesystem, such rm-ing a device node, would fail
and lead to a warning / call trace in dmesg. This fix was already
applied to other kernels upstream - including 4.19, from which the patch
was taken.

More info at https://bugzilla.kernel.org/show_bug.cgi?id=202495.

Signed-off-by: Matt Merhar <mattmerhar@protonmail.com>
4 years ago
DENG Qingfang 63696bd0fb kernel: backport support for clause 37 1000Base-X auto-negotiation
This patch is needed for clause 37 1000Base-X encoding used in many SFP modules.

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
Signed-off-by: René van Dorst <opensource@vdorst.com>
4 years ago
Adrian Schmutzler 5f92349841 kernel: fix include of myloader.o since kernel 5.4
Between 4.19 and 5.4, mtd parsers have been moved to "parsers"
subdirectory. Based on this, the selection of myloader.o in OpenWrt
was also moved to that subdirectory, while the Kconfig and our local
myloader.c file remained in /drivers/mtd.

This resulted in linking errors like the following (on ath25@5.4):

make[8]: *** No rule to make target 'drivers/mtd/parsers/myloader.o', ...
   needed by 'drivers/mtd/parsers/built-in.a'.  Stop.
make[7]: *** [scripts/Makefile.build:500: drivers/mtd/parsers] Error 2
make[6]: *** [scripts/Makefile.build:500: drivers/mtd] Error 2

Since myloader.c is not too big, this patch moves it to the kernel patches,
allowing to adjust the path for kernel 5.4 and keeping Makefiles and
file paths better in sync.

Other patches have been refreshed accordingly.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Petr Štetiar faf668be35 kernel: bump 5.4 to 5.4.34
Refreshed patches.

Run tested: qemu-x86-64, apalis, a64-olinuxino
Build tested: x86/64, imx6, sunxi/a53

Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years ago
Mantas Pucka 4745969ad7 generic: spi-nor: fix 4-byte opcode support for w25q256
There are 2 different chips (w25q256fv and w25q256jv) that share
the same JEDEC ID. Only w25q256jv fully supports 4-byte opcodes.
Use SFDP header version to differentiate between them.

Fixes broken reboot on 8devices Habanero since f0f35fdac

Signed-off-by: Mantas Pucka <mantas@8devices.com>
4 years ago
Petr Štetiar 23916bca61 kernel: bump 5.4 to 5.4.33
Refreshed patches, removed upstreamed patches:

 oxnas: 001-irqchip-versatile-fpga-Handle-chained-IRQs-properly.patch
 oxnas: 002-irqchip-versatile-fpga-Apply-clear-mask-earlier.patch

Run tested: qemu-x86-64, apalis
Build tested: x86/64, imx6, sunxi/a53

Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years ago
Koen Vandeputte 75ef28be59 kernel: add support for GD25D05 SPI NOR (5.4)
This chip is used on newer RB912UAG-5HPnD r2 and 922UAGS-5HPacD boards:

Before:

[    0.824562] spi-nor spi0.0: unrecognized JEDEC id bytes: c8 40 10 c8 40 10
[    0.831607] spi-nor: probe of spi0.0 failed with error -2

After:

[    0.825347] spi-nor spi0.0: gd25d05 (64 Kbytes)
[    0.830291] 1 routerbootpart partitions found on MTD device spi0.0
[    0.836577] Creating 1 MTD partitions on "spi0.0":
[    0.841448] 0x000000000000-0x000000010000 : "partitions"
[    0.848418] 4 routerbootpart partitions found on MTD device partitions
[    0.855092] Creating 4 MTD partitions on "partitions":
[    0.860318] 0x000000000000-0x00000000c000 : "routerboot"
[    0.866548] 0x00000000c000-0x00000000d000 : "hard_config"
[    0.872832] 0x00000000d000-0x00000000e000 : "bios"
[    0.878580] 0x00000000e000-0x00000000f000 : "soft_config"

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
4 years ago
Koen Vandeputte 3c3825436e kernel: bump 4.19 to 4.19.115
Refreshed all patches.

Remove upstreamed:
- 600-ipv6-addrconf-call-ipv6_mc_up-for-non-Ethernet-inter.patch
- 184-USB-serial-option-add-Wistron-Neweb-D19Q1.patch

Fixes:
- CVE-2020-8647
- CVE-2020-8648 (potentially)
- CVE-2020-8649

Compile-tested on: cns3xxx
Runtime-tested on: cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
4 years ago
Koen Vandeputte e31d158c4d kernel: bump 4.14 to 4.14.176
Refreshed all patches.

Remove upstreamed:
- 0001-net-thunderx-workaround-BGX-TX-Underflow-issue.patch
- 600-ipv6-addrconf-call-ipv6_mc_up-for-non-Ethernet-inter.patch
- 184-USB-serial-option-add-Wistron-Neweb-D19Q1.patch

Fixes:
- CVE-2020-8648 (potentially)
- CVE-2020-8647
- CVE-2020-8649

Compile-tested on: cns3xxx, octeontx
Runtime-tested on: cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
4 years ago
Petr Štetiar 0bea89a1d0 kernel: bump 5.4 to 5.4.32
Refreshed patches, removed upstreamed patches:

 generic: 746-stable-net-dsa-mt7530-fix-null-pointer-dereferencing-in-por.patch

Run tested: qemu-x86-64, apalis
Build tested: x86/64, imx6, sunxi/a53

Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years ago
Ansuel Smith 9abf01246e ipq806x: add patch to fix broken buttons
From kernel 4.20 msm-gpio driver is broken and cause the
malfunction of the buttons on every ipq806x target.
Add a patch to fix this.

Tested-by: Hannu Nyman <hannu.nyman@iki.fi>
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
4 years ago
Aleksander Jan Bajkowski b43023b7ba kernel: remove non-existant symbols
These symbols exist only in older kernels and can be removed.

Signed-off-by: Aleksander Jan Bajkowski <A.Bajkowski@stud.elka.pw.edu.pl>
4 years ago
Chuanhong Guo dfa521f129 generic: spi-nor: rework broken-flash-reset
Instead of resetting flash to 3B address on remove hook, this
implementation only enters 4B mode when needed, which prevents more
unexpected reboot stuck. This implementation makes it only break when
a kernel panic happens during flash operation on 16M+ areas.
Also silent broken-flash-reset warning. We are not dealing with vendors
and it's unpleasant for users to see that unnecessary and long WARN_ON
print.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
4 years ago
Jo-Philipp Wich 93294b516e generic: drop 616-net_optimize_xfrm_calls.patch
The conditional check introduced by this patch may trigger a NULL pointer
dereference in case the result of dev_net() is NULL.

Since the purpose of this patch is neither sufficiently explained and since
this patch apparently has never been submitted upstream despite it being in
the pending-* patch directory, I propose to drop it without replacement.

If the performance implications of dropping this patch are found to be
significiant, it should be reintroduced with proper description and
benchmark results.

Ref: https://bugs.openwrt.org/index.php?do=details&task_id=2943
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
4 years ago
Petr Štetiar b299002877 kernel: bump 5.4 to 5.4.31
Refreshed patches, removed upstreamed patches:

 oxnas:   003-ARM-dts-oxnas-Fix-clear-mask-property.patch
 generic: 184-USB-serial-option-add-Wistron-Neweb-D19Q1.patch

Run tested: apu2, qemu-x86-64, apalis
Build tested: sunxi/a53, imx6, x86/64, ipq40xx

Tested-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk> [apu2]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years ago
Bjørn Mork 196cab719f kernel: generic: 5.4: fix mips command line parameter patch
Fixing a build error when CONFIG_KERNEL_KEXEC is enabled:

make[5]: Entering directory '/home/bjorn/tmp/tmp-lede/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/linux-5.4.28'
  CALL    scripts/checksyscalls.sh
  CALL    scripts/atomic/check-atomics.sh
  CHK     include/generated/compile.h
  CC      arch/mips/kernel/machine_kexec.o
arch/mips/kernel/machine_kexec.c: In function 'kexec_nonboot_cpu_jump':
arch/mips/kernel/machine_kexec.c:268:27: error: 'relocate_new_kernel_size' undeclared (first use in this function); did you mean 'kexec_relocate_new_kernel_end'?
      reboot_code_buffer + relocate_new_kernel_size);
                           ^~~~~~~~~~~~~~~~~~~~~~~~
                           kexec_relocate_new_kernel_end
arch/mips/kernel/machine_kexec.c:268:27: note: each undeclared identifier is reported only once for each function it appears in
arch/mips/kernel/machine_kexec.c: In function 'kexec_reboot':
arch/mips/kernel/machine_kexec.c:306:27: error: 'relocate_new_kernel_size' undeclared (first use in this function); did you mean 'kexec_relocate_new_kernel_end'?
      reboot_code_buffer + relocate_new_kernel_size);
                           ^~~~~~~~~~~~~~~~~~~~~~~~
                           kexec_relocate_new_kernel_end
make[7]: *** [scripts/Makefile.build:266: arch/mips/kernel/machine_kexec.o] Error 1

Signed-off-by: Bjørn Mork <bjorn@mork.no>
4 years ago
Pawel Dembicki aff965a415 generic: backport Wistron Neweb D19Q1 patches
Backport patches which adds suport for the Wistron Neweb D19Q1 3G/4G modem,
used in D-Link DWR-960.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
4 years ago
John Crispin 6786dc26a2 generic: fix flow table hw offload
Make the driver work with recent upstream changes.

Signed-off-by: John Crispin <john@phrozen.org>
4 years ago
Chuanhong Guo f0f35fdac1 Revert "generic: 5.4: Add 4B_OPCODES flag to w25q256"
This reverts commit d7f21940bc.

Winbond W25Q256FV and W25Q256JV both uses 0xef4019 as JEDEC ID,
but only the latter has proper 4B_OPCODES support.
W25Q256FV has all 4B read instructions but it lacks a 4B page program
instruction, causing the entire flash to be read-only.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
4 years ago
INAGAKI Hiroshi 817e132332 kernel: rtl8367b: use id as a bit offset for BYPASS_LINE_RATE
In RTL8367B (RTL8367RB/RTL8367R-VB), the driver in GPL tars of the
devices with this switch directly uses the ID of external interface
as a bit offset.

We should use the same way.

ref (RTL8367B):
  - ASUS RT-N56U
  - TP-Link Archer C2 v1

ref (RTL8367):
  - TP-Link TL-WR2543ND v1

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
4 years ago
INAGAKI Hiroshi e714cf4195 kernel: rtl8367b: fix DEBUG register address for extif2
RTL8367B_CHIP_DEBUG1_REG (0x1304) is for external interface 1. For
external interface 2, use RTL8367B_CHIP_DEBUG2_REG (0x13e2) instead.

Fixes: 9801d61c4a ("kernel: rtl8367b: add configuration for extif2")
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
4 years ago
DENG Qingfang 764cc5c6a6 generic: mt7530: fix null pointer dereferencing in port5 setup
The 2nd gmac of mediatek soc ethernet may not be connected to a PHY
and a phy-handle isn't always available.
Unfortunately, mt7530 dsa driver assumes that the 2nd gmac is always
connected to switch port 5 and setup mt7530 according to phy address
of 2nd gmac node, causing null pointer dereferencing when phy-handle
isn't defined in dts.
This commit fix this setup code by checking return value of
of_parse_phandle before using it.

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
4 years ago
DENG Qingfang 3624721ef1 generic: backport support for MT7530 DSA port mirroring
Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
4 years ago
Kevin Darbyshire-Bryant b74386acc6 kmod-sched-cake: switch to in-tree cake for 4.19+
Use in tree version of cake for kernels 4.19+ and backport features from
later kernel versions to 4.19.

Unfortunately PROVIDES dependency handling produces bogus circular
dependency warnings so whilst this package and kmod-sched-cake-oot
should be able to PROVIDE kmod-sched-cake this doesn't work.

Instead, remove the PROVIDES option and modify package sqm-scripts to
depend on the correct module independently.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
4 years ago
Yousong Zhou 437eb41f23 generic: mips: exclude more dsemul code when fpu-emu is not enabled
The patch is backported from mips-next.  In addition to minor reduction
of code size and runtime memory use, the more apparent difference is
that the delay slot emulation page will not be present for those targets
with fpu emulation disabled (CONFIG_MIPS_FP_SUPPORT=n)

Memory maps of busybox before and after this change

  root@OpenWrt:/# cat /proc/self/maps
  00400000-00449000 r-xp 00000000 00:02 23         /bin/busybox
  00458000-00459000 r-xp 00048000 00:02 23         /bin/busybox
  00459000-0045a000 rwxp 00049000 00:02 23         /bin/busybox
  77dc0000-77de2000 r-xp 00000000 00:02 273        /lib/libgcc_s.so.1
  77de2000-77de3000 r-xp 00012000 00:02 273        /lib/libgcc_s.so.1
  77de3000-77de4000 rwxp 00013000 00:02 273        /lib/libgcc_s.so.1
  77de4000-77e7b000 r-xp 00000000 00:02 271        /lib/libc.so
  77e8a000-77e8c000 rwxp 00096000 00:02 271        /lib/libc.so
  77e8c000-77e8e000 rwxp 00000000 00:00 0
  7fd86000-7fda7000 rw-p 00000000 00:00 0          [stack]
  7fefd000-7fefe000 r-xp 00000000 00:00 0
  7ffe6000-7ffe7000 r--p 00000000 00:00 0          [vvar]
  7ffe7000-7ffe8000 r-xp 00000000 00:00 0          [vdso]

  root@OpenWrt:/# cat /proc/self/maps
  00400000-00449000 r-xp 00000000 00:02 23         /bin/busybox
  00458000-00459000 r-xp 00048000 00:02 23         /bin/busybox
  00459000-0045a000 rwxp 00049000 00:02 23         /bin/busybox
  77d55000-77d77000 r-xp 00000000 00:02 274        /lib/libgcc_s.so.1
  77d77000-77d78000 r-xp 00012000 00:02 274        /lib/libgcc_s.so.1
  77d78000-77d79000 rwxp 00013000 00:02 274        /lib/libgcc_s.so.1
  77d79000-77e10000 r-xp 00000000 00:02 272        /lib/libc.so
  77e1f000-77e21000 rwxp 00096000 00:02 272        /lib/libc.so
  77e21000-77e23000 rwxp 00000000 00:00 0
  7fe23000-7fe44000 rw-p 00000000 00:00 0          [stack]
  7ff63000-7ff64000 r--p 00000000 00:00 0          [vvar]
  7ff64000-7ff65000 r-xp 00000000 00:00 0          [vdso]

Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
Acked-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
4 years ago
Kevin Darbyshire-Bryant af35205626 kernel: Enable CMOS RTC support on 5.4
Enable kernel symbol CONFIG_RTC_DRV_CMOS which was enabled in 4.14 &
4.19

Fixes FS#2905 and now my APU2 picks up time from RTC

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
4 years ago
Daniel Engberg 3a761c90af treewide: Don't diverge from upstream default HZ settings on 4.19
Most targets upstream use 250Hz or even 1000Hz by default while
100Hz is hardcoded in OpenWrt's default config. Use upstream default
except for apm821xx which hardsets 1000Hz instead of platform default of
250Hz.

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
[Apply same changes to 5.4]
Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
4 years ago
Michal Cieslakiewicz e2b89ea069 kernel: generic: 5.4: fix mtd concat panic on read/write functions
Commit 2431c4f5b46c32c4ac495456b1ef4ce59c0bb85d ("mtd: Implement
mtd_{read,write}() as wrappers around mtd_{read,write}_oob()") for kernel 5.4
restrict mtd devices to register only one type of read/write functions
(either generic or OOB).

mtd concat does not follow above rule and defines both methods at the same
time, causing this type of device to be rejected by kernel. For routers that
use mtd concat for root UBI volume that means kernel panic and boot loop with
following error:

[    0.767307] Creating 1 MTD partitions on "ubi-concat":
[    0.772547] 0x000000000000-0x000007500000 : "ubi"
[    0.777953] ------------[ cut here ]------------
[    0.782683] WARNING: CPU: 0 PID: 1 at drivers/mtd/mtdcore.c:621 add_mtd_device+0x84/0x5f4
[    0.790983] Modules linked in:
[    0.794093] CPU: 0 PID: 1 Comm: swapper Not tainted 5.4.24 #0
[    0.799932] Stack : 80680000 8062af20 00000000 00000000 8062a0f0 87c2dae4 87c282fc 8065fd23
[    0.808430]         805c64f4 00000001 807b32d8 80670000 80670000 00000001 87c2da98 25c15bcb
[    0.816909]         00000000 00000000 807e0000 0000006e 61696e74 00000000 2e342e32 34202330
[    0.825397]         0000006e cef2ada7 00000000 000c1ded 00000000 00000009 00000000 8034de64
[    0.833889]         00000009 80670000 80670000 80676d18 00000000 80320044 00000000 807b0000
[    0.842381]         ...
[    0.844861] Call Trace:
[    0.847367] [<80069994>] show_stack+0x30/0x100
[    0.851913] [<8007e8ac>] __warn+0xc0/0x10c
[    0.856072] [<8007e954>] warn_slowpath_fmt+0x5c/0xac
[    0.861134] [<8034de64>] add_mtd_device+0x84/0x5f4
[    0.866001] [<80352a50>] add_mtd_partitions+0xd8/0x1b8
[    0.871231] [<803527b8>] parse_mtd_partitions+0x238/0x3f8
[    0.876717] [<8034e51c>] mtd_device_parse_register+0x48/0x1b0
[    0.882586] [<8038dd2c>] virt_concat_probe+0x170/0x1ec
[    0.887820] [<803334c8>] platform_drv_probe+0x40/0x94
[    0.892970] [<80331638>] really_probe+0x104/0x35c
[    0.897766] [<80331d54>] device_driver_attach+0x70/0x98
[    0.903072] [<80331ddc>] __driver_attach+0x60/0x100
[    0.908042] [<8032f668>] bus_for_each_dev+0x68/0xa4
[    0.912989] [<803309d4>] bus_add_driver+0x1f0/0x200
[    0.917952] [<80332448>] driver_register+0x84/0x148
[    0.922906] [<80060a1c>] do_one_initcall+0x7c/0x1dc
[    0.927870] [<80684e14>] kernel_init_freeable+0x158/0x23c
[    0.933361] [<805387d8>] kernel_init+0x10/0xf0
[    0.937883] [<80064dd8>] ret_from_kernel_thread+0x14/0x1c
[    0.943375] ---[ end trace 62e0927fba490f68 ]---
[...]
[    2.266513] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[    2.274893] Rebooting in 1 seconds..

This patch makes mtd concat to follow new mtd requirements by registering
either normal or oob versions of read/write functions, but not both at the
same time. OOB is used only when underlying mtd devices provide such
functionality (like NAND chips) - otherwise generic methods are used.

Tested successfully on Netgear WNDR4300.

Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
4 years ago
Evgeniy Didin 55eb9cb72e kernel: update arc-specific patch
This patch updates arc-specific patch by moving declaration
of struct object before it's usage.

Signed-off-by: Evgeniy Didin <Evgeniy.Didin@synopsys.com>
Cc: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Petr Štetiar <ynezz@true.cz>
Cc: Hauke Mehrtens <hauke@hauke-m.de>
Cc: John Crispin <john@phrozen.org>
4 years ago
Petr Štetiar 5ecc0cfd6f kernel: bump 5.4 to 5.4.28
Changelog since 5.4.24 mentions CVE-2019-19769, CVE-2020-8648,
CVE-2020-8649 and CVE-2020-8647.

Removed upstreamed:

 generic: 507-v5.6-iio-chemical-sps30-fix-missing-triggered-buffer-depe.patch
 generic: 600-ipv6-addrconf-call-ipv6_mc_up-for-non-Ethernet-inter.patch
 bcm27xx: 950-0435-ASoC-pcm512x-Fix-unbalanced-regulator-enable-call-in.patch
 ipq806x: 701-stmmac-fix-notifier-registration.patch
 lantiq: 002-pinctrl-falcon-fix-syntax-error.patch
 octeontx: 0002-net-thunderx-workaround-BGX-TX-Underflow-issue.patch

Run tested: apu2, qemu-x86-64, apalis, a64-olinuxino, nbg6617
Build tested: sunxi/a53, imx6, x86/64, ipq40xx

Tested-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk> [apu2]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years ago
Christian Lamparter 711bd33cd1 kernel: 5.4: disable more symbols
These have been discovered by the gemini 5.4 patches.
This is because one of the devices uses the FBDEV emulation.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
4 years ago
Christian Lamparter d107aaa910 kernel: backport and package drivetemp hwmon from v5.5
This patch backports the hwmon drivetemp sensor module from vanilla
linux 5.5 to be available on OpenWrt's 5.4 kernel.

Extract from The upstream commit by Guenter Roeck <linux@roeck-us.net>:
hwmon: Driver for disk and solid state drives with temperature sensors

"Reading the temperature of ATA drives has been supported for years
by userspace tools such as smarttools or hddtemp. The downside of
such tools is that they need to run with super-user privilege, that
the temperatures are not reported by standard tools such as 'sensors'
or 'libsensors', and that drive temperatures are not available for use
in the kernel's thermal subsystem.

This driver solves this problem by adding support for reading the
temperature of ATA drives from the kernel using the hwmon API and
by adding a temperature zone for each drive.

With this driver, the hard disk temperature can be read [...]
using sysfs:

$ grep . /sys/class/hwmon/hwmon9/{name,temp1_input}
/sys/class/hwmon/hwmon9/name:drivetemp
/sys/class/hwmon/hwmon9/temp1_input:23000

If the drive supports SCT transport and reports temperature limits,
those are reported as well.

drivetemp-scsi-0-0
Adapter: SCSI adapter
temp1:        +27.0<C2><B0>C (low  =  +0.0<C2><B0>C, high = +60.0<C2><B0>C)
                             (crit low = -41.0<C2><B0>C, crit = +85.0<C2><B0>C)
                             (lowest = +23.0<C2><B0>C, highest = +34.0<C2><B0>C)

The driver attempts to use SCT Command Transport to read the drive
temperature. If the SCT Command Transport feature set is not available,
or if it does not report the drive temperature, drive temperatures may
be readable through SMART attributes. Since SMART attributes are not well
defined, this method is only used as fallback mechanism."

This patch incorperates a patch made by Linus Walleij:
820-libata-Assign-OF-node-to-the-SCSI-device.patch
This patch is necessary in order to wire-up the drivetemp
sensor into the device tree's thermal-zones.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
4 years ago
Kevin Darbyshire-Bryant e6e1e12dc3 kernel: connmark set-dscpmark fix build on 5.4
Fix header change that was done for kernel but 4.19 got missed for 5.4.

Solves nasty errors like:

8.4.0_musl/include/linux/netfilter/xt_CONNMARK.h:5,
                from connmark_listener.c:30:
/builder/shared-workdir/build/sdk/staging_dir/toolchain-aarch64_cortex-a53_gcc-8.4.0_musl/include/linux/netfilter/xt_connmark.h:23:2: error: enumerator value for 'XT_CONNMARK_VALUE' is not an integer constant
 XT_CONNMARK_VALUE = BIT(0),
 ^~~~~~~~~~~~~~~~~
/builder/shared-workdir/build/sdk/staging_dir/toolchain-aarch64_cortex-a53_gcc-8.4.0_musl/include/linux/netfilter/xt_connmark.h:25:1: error: enumerator value for 'XT_CONNMARK_DSCP' is not an integer constant
};

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
4 years ago
Serge Vasilugin 9801d61c4a kernel: rtl8367b: add configuration for extif2
Both rtl8367b and rtl8367s have two extended interface
rtl8367rb: 5 port + 2*RGMII/MII
rtl8367s:  5 port + SGMII/HSGMI + RGMII/MII
(?)rtl8367sb:  5 port + 2*RGMII/MII
These interfaces correspond to EXT1 and EXT2 (ports 6 and 7 respectivly).

This patch allow to configure EXT2 in dts-file:

	rtl8367rb {
		compatible = "realtek,rtl8367b";
		cpu_port = <7>;
		realtek,extif2 = <1 0 1 1 1 1 1 1 2>;
		mii-bus = <&mdio0>;
		phy_id = <29>;
	};

Signed-off-by: Serge Vasilugin <vasilugin@yandex.ru>
[fix indent, replace magic value, alter commit message]
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
4 years ago
Chuanhong Guo c0bc706c31 generic: rtl8367b: add definition of debug reg
This commit adds definition of DEBUG0 and DEBUG1 registers and replace
magic values with proper register modifying.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
4 years ago
Tomasz Maciej Nowak ddc0e87fae kernel: move TEO governor to generic config
This new symbol popped up in few places. Disable it in generic config.

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
[fixed merge conflict in generic/config-5.4]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years ago
Mathias Kresin 6bf179b270 lantiq: add Linux 5.4 support as testing kernel version
Switch to the mainline Lantiq PCIe PHY driver and update the vr9.dtsi
accordingly.

The Lantiq IRQ SMP support added upstream required changes to the SoC
dtsi as well.

Following changes are made to the Lantiq kernel patches:

  0005-lantiq_etop-pass-struct-device-to-DMA-API-functions.patch
  0006-MIPS-lantiq-pass-struct-device-to-DMA-API-functions.patch
    applied upstream

  0008-MIPS-lantiq-backport-old-timer-code.patch
    access_ok API update because it lost it's type (which was the first)
    parameter in upstream commit 96d4f267e40f95 ("Remove 'type' argument
    from access_ok() function")

  0024-MIPS-lantiq-autoselect-soc-rev-matching-fw.patch
    merged into 0026-MIPS-lantiq-Add-GPHY-Firmware-loader.patch

  0024-MIPS-lantiq-revert-DSA-switch-driver-PMU-clock-chang.patch
    revert upstream changes required for upstream xrx200 ethernet and
    xrx200 (DSA) switch driver but breaking our driver

  0026-MIPS-lantiq-Add-GPHY-Firmware-loader.patch
    required for our driver but dropped upstream, add former upstream
    version

  0028-NET-lantiq-various-etop-fixes.patch
    now has to use the phy_set_max_speed API instead of modifying
    phydev->supported. Also call ltq_dma_enable_irq() in
    ltq_etop_open() based on upstream commit cc973aecf0b054 ("MIPS:
    lantiq: Do not enable IRQs in dma open")

Signed-off-by: Mathias Kresin <dev@kresin.me>
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
4 years ago
Mathias Kresin 095598ce00 generic: make all phy drivers kernel 5.0 compatible
It adjusts the code to upstream changes from the commit 3c1bcc8614db
("net: ethernet: Convert phydev advertize and supported from u32 to link
 mode")

Signed-off-by: Mathias Kresin <dev@kresin.me>
4 years ago
Aleksander Jan Bajkowski af408b9798 kernel: move disabled symbols into generic kconfig
Move some disabled kconfig options found in sunxi kconfig into generic.

Signed-off-by: Aleksander Jan Bajkowski <A.Bajkowski@stud.elka.pw.edu.pl>
4 years ago
Aleksander Jan Bajkowski 7d6fcfbd49 kernel: sort generic configuration
This was done by executing these commands:

$ ./scripts/kconfig.pl '+' target/linux/generic/config-4.19 /dev/null > target/linux/generic/config-4.19-new
$ mv target/linux/generic/config-4.19-new target/linux/generic/config-4.19

$ ./scripts/kconfig.pl '+' target/linux/generic/config-5.4 /dev/null > target/linux/generic/config-5.4-new
$ mv target/linux/generic/config-5.4-new target/linux/generic/config-5.4

Signed-off-by: Aleksander Jan Bajkowski <A.Bajkowski@stud.elka.pw.edu.pl>
4 years ago
Tim Harvey 4ec2f33bfe kernel: 5.4: add unconfigured symbols
This patch adds a few symbols that I found that
need disabling in order to not break the build of octeontx

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
4 years ago
Robert Marko d7f21940bc generic: 5.4: Add 4B_OPCODES flag to w25q256
This patch backports the upstream patch that adds the 4B_OPCODES flag to w25q256 under 5.4 kernel.
This is needed for ipq40xx and ramips.

Signed-off-by: Robert Marko <robimarko@gmail.com>
4 years ago
Robert Marko 3ef988caf3 generic: 4.19: Add 4B_OPCODES flag to w25q256
This patch backports the upstream patch that adds the 4B_OPCODES flag to w25q256 under 4.19 kernel.
This is needed for ipq40xx and ramips.

Signed-off-by: Robert Marko <robimarko@gmail.com>
4 years ago
Rafał Miłecki ec8e8e2ef0 kernel: backport out-of-memory fix for non-Ethernet devices
Doing up & down on non-Ethernet devices (e.g. monitor mode interface)
was consuming memory.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
4 years ago
Yousong Zhou 860652f4b9 kernel: 5.4: move some kconfig options to generic
CONFIG_64BIT_TIME=y
	CONFIG_KASAN_STACK=1
	CONFIG_UBSAN_ALIGNMENT=y
	CONFIG_UNIX_SCM=y
	CONFIG_DMA_DECLARE_COHERENT=y
	CONFIG_OF_RESERVED_MEM=y

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
4 years ago
Koen Vandeputte f9f62d43e4 kernel: bump 5.4 to 5.4.24
Refreshed all patches.

Compile-tested on: imx6
Runtime-tested on: imx6

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
4 years ago
Koen Vandeputte e64564920a kernel: bump 4.19 to 4.19.108
Refreshed all patches.

Compile-tested on: cns3xxx
Runtime-tested on: cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
4 years ago
Koen Vandeputte d5a3536631 kernel: bump 4.14 to 4.14.172
Refreshed all patches.

Compile-tested on: cns3xxx
Runtime-tested on: cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
4 years ago
Rafał Miłecki 5cc0493c2b kernel: backport mtd partition address fix sent upstream
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
4 years ago
Sungbo Eo 04a87fedda kernel: 5.4: backport led register fix
Fixes issues with loading trigger-sources for usbport trigger from DTS.

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
4 years ago
Robert Marko 4ff6c43499 ipq40xx: add IPQ4019 SD/MMC controller support
This commit finally adds support for the built in SD/MMC controller in IPQ4019 SoC.

Controller is supported by the upstream SDHCI-MSM driver with a minor clock setting patch.
Patch is special to the IPQ4019 and cannot be upstreamed.

LDO and SDHCI node are upstreamed, and LDO node is awaiting to be accepted.

Signed-off-by: Robert Marko <robimarko@gmail.com>
4 years ago
Petr Štetiar aae4d85647 kernel: add kernel module for Sensirion SPS30 PMS
Adds into 4.19 backported kernel module from 5.1 for Sensirion SPS30
particulate matter sensor, for kernel 5.4 backported dependency fix.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years ago
Petr Štetiar ddf1832207 linux: generic: 5.4: add missing config symbols
Those symbols popped up while building imx6 with all targets enabled.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years ago
David Bauer fdfca33350 Revert "kernel: rewrite run_parsers_by_type() to use add_mtd_partitions()"
This reverts commit 15a0701cdd.

It was reported that this patch breaks on some cases the JFFS2 overlay
filesystem on targets still using kernel 4.14. This includes ar71xx,
where spurious erase of the ART was reported.

Revert this commit for now. Re-adding should probaby also be done for
every currently supported kernel version.

Ref: FS#2837 FS#2862 FS#2864
Signed-off-by: David Bauer <mail@david-bauer.net>
4 years ago
Ansuel Smith a2c0b02dfa generic: add missing symbol from 5.4 config
Add missing symbol displayed with ipa806x kernel config

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
4 years ago
Tim Harvey 4c3c1f2dc7 kernel: 5.4: backport fxos8700 accel support from 5.5
Backport kernel module from 5.5 for FXOS8700CQ, which is a small,
low-power, 3-axis linear accelerometer and 3-axis magnetometer combined
into a single package. The device features a selectable I2C or
point-to-point SPI serial interface with 14-bit accelerometer and 16-bit
magnetometer ADC resolution along with smart-embedded functions.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
[added commit description]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years ago
Álvaro Fernández Rojas 854114800c linux-5.4: backport ARM symbol export fix
Fixes the following warning for ARM targets:
  WARNING: "return_address" [vmlinux] is a static EXPORT_SYMBOL_GPL

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Álvaro Fernández Rojas 6f9bc70dd5 linux-5.4: backport modpost upstream patches
Fixes modpost Segmentation Fault with bcm2708 and bcm2709:
  MODPOST vmlinux.o
  Segmentation fault
  make[6]: *** [scripts/Makefile.modpost:66: __modpost] Error 139

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
David Bauer 0d727f231f treewide: move commonly disabled symbols to generic config
Move new commonly disabled kernel 5.4 symbols to the generic kernel
configuration.

Signed-off-by: David Bauer <mail@david-bauer.net>
4 years ago
Christian Lamparter e48465bdd8 kernel: 5.4: add unconfigured symbols
This patch adds a few more symbols that I found that
need disabling in order to not break the automatic build.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
4 years ago
Christian Lamparter ce691b2abc kernel: 4.19,5.4: disable ARM CE & NEON
This patch disables the CRYPTO KERNEL SYMBOLs that are touched
by the upcoming ipq40xx patch "ipq40xx: use neon crypto drivers"
from "Eneas U de Queiroz" and more so for his follow up patches
for the  other ARM targets in this series. This should help to
prevent at least a few potential build errors on other archs.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
4 years ago
Kevin Darbyshire-Bryant 0b7ad6f7f0 kernel: 5.4 fix build on darwin
Fix typedef clash on darwin.

HOSTCC  scripts/mod/file2alias.o
scripts/mod/file2alias.c:47:3: error: typedef redefinition with different types ('struct uuid_t' vs '__darwin_uuid_t' (aka 'unsigned char [16]'))
} uuid_t;
  ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_uuid_t.h:31:25: note: previous definition is here
typedef __darwin_uuid_t uuid_t;
                        ^
scripts/mod/file2alias.c:1305:42: error: array initializer must be an initializer list or string literal
        DEF_FIELD(symval, tee_client_device_id, uuid);
                                                ^
2 errors generated.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
4 years ago
Hauke Mehrtens 34fcdcd7c2 kernel: Remove nvmem hack patch from 5.4
The nvmem framework is now used in net/ethernet/eth.c and the nvmem
sysfs is split into a separate Kconfig option. More work would be needed
to adapt this patch for the broader use. The current patch compiles fine
on ath79, but it breaks the x86 target.

nvmem is also compiled into the kernel for most of our targets for
example ath79 anyway, so patching the kernel to remove it is now harder
and not the case on multiple targets anyway. Instead of making this work
on kernel 5.4 just remove this hack patch.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years ago
Hauke Mehrtens 21adbfd81f kernel: Make LIB_ARC4 selectable
This makes it possible to select CONFIG_CRYPTO_LIB_ARC4 directly. We
need this to be able to compile this into the kernel and make use of it
from mac80211 backports.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years ago
Hauke Mehrtens e155fc5cb5 x86: Refresh patches on kernel 5.4
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years ago
Koen Vandeputte 4e0c54bc5b kernel: add support for kernel 5.4
The following patches were removed because they are integrated in the upstream kernel 5.4:
 * backport-5.4/047-v4.21-mtd-keep-original-flags-for-every-struct-mtd_info.patch
 * backport-5.4/048-v4.21-mtd-improve-calculating-partition-boundaries-when-ch.patch
 * backport-5.4/080-v5.1-0001-bcma-keep-a-direct-pointer-to-the-struct-device.patch
 * backport-5.4/080-v5.1-0002-bcma-use-dev_-printing-functions.patch
 * backport-5.4/095-Allow-class-e-address-assignment-via-ifconfig-ioctl.patch
 * backport-5.4/101-arm-cns3xxx-use-actual-size-reads-for-PCIe.patch
 * backport-5.4/200-v5.2-usb-dwc2-Set-lpm-mode-parameters-depend-on-HW-configuration.patch
 * backport-5.4/210-arm64-sve-Disentangle-uapi-asm-ptrace.h-from-uapi-as.patch
 * backport-5.4/380-v5.3-net-sched-Introduce-act_ctinfo-action.patch
 * backport-5.4/450-v5.0-mtd-spinand-winbond-Add-support-for-W25N01GV.patch
 * backport-5.4/451-v5.0-mtd-spinand-Add-initial-support-for-Toshiba-TC58CVG2.patch
 * backport-5.4/452-v5.0-mtd-spinand-add-support-for-GigaDevice-GD5FxGQ4xA.patch
 * backport-5.4/455-v5.1-mtd-spinand-Add-support-for-all-Toshiba-Memory-produ.patch
 * backport-5.4/456-v5.1-mtd-spinand-Add-support-for-GigaDevice-GD5F1GQ4UExxG.patch
 * backport-5.4/460-v5.0-mtd-spi-nor-Add-support-for-mx25u12835f.patch
 * backport-5.4/460-v5.3-mtd-spinand-Define-macros-for-page-read-ops-with-thr.patch
 * backport-5.4/461-v5.3-mtd-spinand-Add-support-for-two-byte-device-IDs.patch
 * backport-5.4/462-v5.3-mtd-spinand-Add-support-for-GigaDevice-GD5F1GQ4UFxxG.patch
 * backport-5.4/463-v5.3-mtd-spinand-Add-initial-support-for-Paragon-PN26G0xA.patch
 * backport-5.4/700-v5.1-net-phylink-only-call-mac_config-during-resolve-when.patch
 * backport-5.4/701-v5.2-net-phylink-ensure-inband-AN-works-correctly.patch
 * backport-5.4/702-v4.20-net-ethernet-Add-helper-for-MACs-which-support-asym-.patch
 * backport-5.4/703-v4.20-net-ethernet-Add-helper-for-set_pauseparam-for-Asym-.patch
 * backport-5.4/704-v4.20-net-phy-Stop-with-excessive-soft-reset.patch
 * backport-5.4/705-v5.1-net-phy-provide-full-set-of-accessor-functions-to-MM.patch
 * backport-5.4/706-v5.1-net-phy-add-register-modifying-helpers-returning-1-o.patch
 * backport-5.4/707-v5.1-net-phy-add-genphy_c45_check_and_restart_aneg.patch
 * backport-5.4/708-v5.3-net-phylink-remove-netdev-from-phylink-mii-ioctl-emu.patch
 * backport-5.4/709-v5.3-net-phylink-support-for-link-gpio-interrupt.patch
 * backport-5.4/710-v5.3-net-phy-allow-Clause-45-access-via-mii-ioctl.patch
 * backport-5.4/711-v5.3-net-sfp-add-mandatory-attach-detach-methods-for-sfp-.patch
 * backport-5.4/712-v5.3-net-sfp-remove-sfp-bus-use-of-netdevs.patch
 * backport-5.4/713-v5.2-net-phylink-avoid-reducing-support-mask.patch
 * backport-5.4/714-v5.3-net-sfp-Stop-SFP-polling-and-interrupt-handling-duri.patch
 * backport-5.4/715-v5.3-net-phylink-don-t-start-and-stop-SGMII-PHYs-in-SFP-m.patch
 * backport-5.4/740-v5.5-net-phy-avoid-matching-all-ones-clause-45-PHY-IDs.patch
 * backport-5.4/741-v5.5-net-phylink-fix-link-mode-modification-in-PHY-mode.patch
 * pending-5.4/103-MIPS-perf-ath79-Fix-perfcount-IRQ-assignment.patch
 * pending-5.4/131-spi-use-gpio_set_value_cansleep-for-setting-chipsele.patch
 * pending-5.4/132-spi-spi-gpio-fix-crash-when-num-chipselects-is-0.patch
 * pending-5.4/220-optimize_inlining.patch
 * pending-5.4/341-MIPS-mm-remove-no-op-dma_map_ops-where-possible.patch
 * pending-5.4/475-mtd-spi-nor-Add-Winbond-w25q128jv-support.patch
 * pending-5.4/477-mtd-add-spi-nor-add-mx25u3235f.patch
 * pending-5.4/479-mtd-spi-nor-add-eon-en25qh64.patch

Some bigger changes were done to this feature and we did not port this patch yet:
 * hack-5.4/207-disable-modorder.patch

This depends on BOOTMEM which was removed from the kernel, this needs some bigger changes:
 * hack-5.4/930-crashlog.patch

A different version of the FPU disable patch was merged upstream, OpenWrt needs some adaptations.
 * pending-5.4/304-mips_disable_fpu.patch

- no crashlog support yet as a required file got deleted upstream
- Removed patch below, which is now seen as a recursive dependency [1]
- Removed patch below due to build error [2]
- fix still required to avoid identical function def [3]
- Fixes included from Blocktrron
- Fixes included from Chunkeey
- Fix included from nbd regarding "dst leak in Flow Offload"

[1] target/linux/generic/hack-5.4/260-crypto_test_dependencies.patch
[2] target/linux/generic/hack-5.4/207-disable-modorder.patch
[3] target/linux/generic/pending-5.4/613-netfilter_optional_tcp_window_check.patch

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
Signed-off-by: David Bauer <mail@david-bauer.net>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
Signed-off-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years ago
Hauke Mehrtens c16517d26d kernel: copy kernel 4.19 code to 5.4
No changes were done to the patches while coping them. Currently they do
not apply on top of kernel 5.4.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years ago
Hauke Mehrtens 27358ec8fd kernel: Sort generic configuration
This was done by executing these commands:

$ ./scripts/kconfig.pl '+' target/linux/generic/config-4.19 /dev/null > target/linux/generic/config-4.19-new
$ mv target/linux/generic/config-4.14-new target/linux/generic/config-4.14

$ ./scripts/kconfig.pl '+' target/linux/generic/config-4.14 /dev/null > target/linux/generic/config-4.14-new
$ mv target/linux/generic/config-4.19-new target/linux/generic/config-4.19

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years ago