Commit Graph

2763 Commits (9a37c95431b5401c309b7731920daa964842bdee)

Author SHA1 Message Date
Kevin Darbyshire-Bryant 8ff0dd57bf kernel: drop MIPS fix cache flushing for highmem pages
This patch, in a variety of forms, has been around since beginning 2016
as e756c2bb07, ending up in present form 0aa6c7df60 (kernel 4.4.13 bump)
and carried forward ever since.

There have been a number of MIPS kernel memory handling changes since,
including VDSO fixes that meant openwrt patches have been dropped with
no apparent fallout.

Simple tests (ntfs-3g) on a HIGHMEM 512MB mt7621 device have not turned
up data corruption issues which would otherwise be expected.  Similarly
running on other MIPS based devices for the past 2 months hasn't turned
up anything obvious to retain this out of tree patch.

With thanks to Rosen Penev for testing on the known 'highmem' device and
Felix Fietkau for testing advice.  Not putting acked-by as it's my fault
if it breaks :-)

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
5 years ago
Stijn Tintel f5919b65d4 brcm2708: add kernel 4.14 support
Patch generation process:
- rebase rpi/rpi-4.14.y on v4.14.89 from linux-stable
- git format-patch v4.14.89

Patches skipped during rebase:
- lan78xx: Read MAC address from DT if present
- lan78xx: Enable LEDs and auto-negotiation
- Revert "softirq: Let ksoftirqd do its job"
- sc16is7xx: Fix for multi-channel stall
- lan78xx: Ignore DT MAC address if already valid
- lan78xx: Simple patch to prevent some crashes
- tcp_write_queue_purge clears all the SKBs in the write queue
- Revert "lan78xx: Simple patch to prevent some crashes"
- lan78xx: Connect phy early
- Arm: mm: ftrace: Only set text back to ro after kernel has been marked ro
- Revert "Revert "softirq: Let ksoftirqd do its job""
- ASoC: cs4265: SOC_SINGLE register value error fix
- Revert "ASoC: cs4265: SOC_SINGLE register value error fix"
- Revert "net: pskb_trim_rcsum() and CHECKSUM_COMPLETE are friends"
- Revert "Revert "net: pskb_trim_rcsum() and CHECKSUM_COMPLETE are friends""

Patches dropped after rebase:
- net: Add non-mainline source for rtl8192cu wlan
- net: Fix rtl8192cu build errors on other platforms
- brcm: adds support for BCM43341 wifi
- brcmfmac: Mute expected startup 'errors'
- ARM64: Fix build break for RTL8187/RTL8192CU wifi
- ARM64: Enable RTL8187/RTL8192CU wifi in build config
- This is the driver for Sony CXD2880 DVB-T2/T tuner + demodulator
- brcmfmac: add CLM download support
- brcmfmac: request_firmware_direct is quieter
- Sets the BCDC priority to constant 0
- brcmfmac: Disable ARP offloading when promiscuous
- brcmfmac: Avoid possible out-of-bounds read
- brcmfmac: Delete redundant length check
- net: rtl8192cu: Normalize indentation
- net: rtl8192cu: Fix implicit fallthrough warnings
- Revert "Sets the BCDC priority to constant 0"
- media: cxd2880: Bump to match 4.18.y version
- media: cxd2880-spi: Bump to match 4.18.y version
- Revert "mm: alloc_contig: re-allow CMA to compact FS pages"
- Revert "Revert "mm: alloc_contig: re-allow CMA to compact FS pages""
- cxd2880: CXD2880_SPI_DRV should select DVB_CXD2880 with
  MEDIA_SUBDRV_AUTOSELECT
- 950-0421-HID-hid-bigbenff-driver-for-BigBen-Interactive-PS3OF.patch
- 950-0453-Add-hid-bigbenff-to-list-of-have_special_driver-for-.patch

Make I2C built-in instead of modular as in upstream defconfig; also the
easiest way to get MFD_ARIZONA enabled, which is required by
kmod-sound-soc-rpi-cirrus.
Add missing compatible strings from
4.9/960-add-rasbperrypi-compatible.patch, using upstream names for
compute modules.
Add extra patch to enable the LEDs on lan78xx.

Compile-tested: bcm2708, bcm2709, bcm2710 (with CONFIG_ALL_KMODS=y)
Runtime-tested: bcm2708, bcm2710

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
5 years ago
Petr Štetiar 7bd6969acc kernel: Add missing symbols to 4.19
While building 4.19 for ath79 with CONFIG_ALL_KMODS=y with verbose mode
enabled I was asked by kernel config about few symbols/modules so I'm
adding those missing symbols to the generic config.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years ago
Koen Vandeputte 6835c13e5a cns3xxx: fix writing to wrong PCI registers
Originally, cns3xxx used it's own functions for mapping, reading and writing registers.

Upstream commit 802b7c06adc7 ("ARM: cns3xxx: Convert PCI to use generic config accessors")
removed the internal PCI config write function in favor of the generic one:

cns3xxx_pci_write_config() --> pci_generic_config_write()

cns3xxx_pci_write_config() expected aligned addresses, being produced by cns3xxx_pci_map_bus()
while the generic one pci_generic_config_write() actually expects the real address
as both the function and hardware are capable of byte-aligned writes.

This currently leads to pci_generic_config_write() writing
to the wrong registers on some ocasions.

First issue seen due to this:

- driver ath9k gets loaded
- The driver wants to write value 0xA8 to register PCI_LATENCY_TIMER, located at 0x0D
- cns3xxx_pci_map_bus() aligns the address to 0x0C
- pci_generic_config_write() effectively writes 0xA8 into register 0x0C (CACHE_LINE_SIZE)

This seems to cause some slight instability when certain PCI devices are used.

Another issue example caused by this this is the PCI bus numbering,
where the primary bus is higher than the secondary, which is impossible.

Before:

00:00.0 PCI bridge: Cavium, Inc. Device 3400 (rev 01) (prog-if 00 [Normal decode])
    Flags: bus master, fast devsel, latency 0, IRQ 255
    Bus: primary=02, secondary=01, subordinate=ff, sec-latency=0

After fix:

00:00.0 PCI bridge: Cavium, Inc. Device 3400 (rev 01) (prog-if 00 [Normal decode])
    Flags: bus master, fast devsel, latency 0, IRQ 255
    Bus: primary=00, secondary=01, subordinate=02, sec-latency=0

And very likely some more ..

Fix all by omitting the alignment being done in the mapping function.

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
6 years ago
Koen Vandeputte 9f2739e924 kernel: bump 4.14 to 4.14.89
Refreshed all patches.

Remove upstreamed patches:
- 096-v4.20-netfilter-ipv6-Preserve-link-scope-traffic-original-.patch

Compile-tested on: ar71xx, cns3xxx, imx6
Runtime-tested on: ar71xx, cns3xxx, imx6

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
6 years ago
Koen Vandeputte dd0a213bed kernel: bump 4.9 to 4.9.146
Refreshed all patches.

Compile-tested on: brcm2708
Runtime-tested on: brcm2708

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
Tested-by: Stijn Tintel <stijn@linux-ipv6.be>
6 years ago
Koen Vandeputte 902a9f23d6 kernel: bump 3.18 to 3.18.130
Refreshed all patches.

Compile-tested on: adm5120
Runtime-tested on: none

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
6 years ago
Hans Dedecker b0414d7188 kernel: preserve oif of IPv6 link scope packets
Backort upstream patch which preserves oif of IPv6 link scoped packets.
The outgoing interface of IPv6 link scope packets can be changed by the
function ip6_route_me_harder. This is unwanted behavior for link local
packets and multicast packets as the outgoing interface is fixed and must
not be altered as it can break neighbor discovery and multicast listener
discovery.

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
6 years ago
Kevin Darbyshire-Bryant 2574c86ce6 kernel: backport ifconfig ioctl support for class e addresses
Backport net: Allow class-e address assignment via ifconfig ioctl
While most distributions long ago switched to the iproute2 suite
of utilities, which allow class-e (240.0.0.0/4) address assignment,
distributions relying on busybox, toybox and other forms of
ifconfig cannot assign class-e addresses without this kernel patch.

While CIDR has been obsolete for 2 decades, and a survey of all the
open source code in the world shows the IN_whatever macros are also
obsolete... rather than obsolete CIDR from this ioctl entirely, this
patch merely enables class-e assignment, sanely.

https://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git/commit/?id=65cab850f0eeaa9180bd2e10a231964f33743edf

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
6 years ago
Christian Lamparter 40180b6305 kernel: add DT binding support to the fit parser
It allows specifying default and Netgear parsers directly in the DT.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
6 years ago
Daniel Santos 9850e42284 jffs2: Fix use of uninitialized delayed_work, lockdep breakage
I've sent this one upstream.  This patch is critical if you want to run
with "prove lock correctness" (lockdep) and you happen to have certain
mtd devices.  The misuse of the uninitialized object is undefined
behaviour, but being zeroed it does not appear to have actually broken
anything other than the lockdep engine.

Signed-off-by: Daniel Santos <daniel.santos@pobox.com>
6 years ago
Brett Mastbergen 2b6eab507a netfilter: Add fib support for nftables
Signed-off-by: Brett Mastbergen <bmastbergen@untangle.com>
6 years ago
Anderson Luiz Alves 0c3c944d1e kernel: mv88e6060: disable hardware level MAC learning
Disable Marvell's hardware level MAC learning because it breaks station roaming.

When enabled it drops all frames that arrive from a MAC address
that is on a different port at learning table.

Problem description:
Multiple APs with inter-AP roaming connected to different ports,
when station moves from one AP on one port to another AP on another port,
traffic flow breaks down because the learning table is not updated.

Signed-off-by: Anderson Luiz Alves <alacn1@gmail.com>
[Replaced with upstream version, move to generic]
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
6 years ago
Deng Qingfang 18501889f6 kernel: add mv88e61xx switch port-mirroring support
Compile & run tested on mvebu

Signed-off-by: Deng Qingfang <dengqf6@mail2.sysu.edu.cn>
6 years ago
Hauke Mehrtens fbaf48387e kernel: netfilter: chain filters merged into nf_tables.ko
In mainline kernel commit 02c7b25e5f5 ("netfilter: nf_tables: build-in
filter chain type") all chain filters were merged into one file and into
one kernel module to save some memory. The code protected by these
configuration options CONFIG_NF_TABLES_BRIDGE, CONFIG_NF_TABLES_IPV4,
CONFIG_NF_TABLES_ARP, CONFIG_NF_TABLES_IPV6, CONFIG_NF_TABLES_NETDEV and
CONFIG_NF_TABLES_INET was merged into the nft_chain_filter.c file which
is now always compiled into the nf_tables.ko file.

This only happened in kernel 4.19 and OpenWrt has to select these as
modules in older kennel versions. Mark them as build-in in the kernel
4.19 specific kernel configuration file which will then not be
overwritten by the package specific settings which try to make them
modular again.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
6 years ago
Hauke Mehrtens f891670704 kernel: netfilter: Adapt merge ipv4/ipv6 masquerade code
In kernel commit 0168e8b361 ("netfilter: nat: merge ipv4/ipv6 masquerade
code into main nat module") the CONFIG_NF_NAT_MASQUERADE_IPV4 and
CONFIG_NF_NAT_MASQUERADE_IPV6 kernel configuration option were changed
to bool and the code will not be compiled as a own module any more, but
it will be integrated into nf_nat_ipv4.ko or nf_nat_ipv6.ko to save some
memory.

Activate these options as bool in the generic kernel 4.19 configuration
only, to always build them into the nf_nat_ipv*.ko modules. The kmod
file will still try to select them as module, but the generic
configuration will not be overwritten.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
6 years ago
Hauke Mehrtens d234431c0c kernel: Make CONFIG_NVMEM tristate
CONFIG_OF_NET depends on CONFIG_NVMEM in kernel 4.19. To fix some build
problems in mainline Linux kernel CONFIG_NVMEM was changed from tristate
to bool in commit 2a37ce25d9 ("nvmem: disallow modular CONFIG_NVMEM").

This patch in OpenWrt revert the upstream commit and changes
CONFIG_NVMEM back to tristate we just have to make sure to build this in
for all targets which select CONFIG_OF_NET.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
6 years ago
Hauke Mehrtens edc4da5da1 kernel: Always activate CONFIG_HW_RANDOM_TPM
CONFIG_HW_RANDOM_TPM does not activate a separate kernel module any
more, but it only activates the random code in the tpm.ko.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
6 years ago
Hauke Mehrtens e30ea44f68 kernel: Remove deprecated generic linux,part-probe patch
This is now replaced by some other mtd partition parsing which was
merged into upstream.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
6 years ago
Hauke Mehrtens 9261e7447e kernel: Make the patches apply on top of 4.19
This makes the patches which were just copied in the previous commit
apply on top of kernel 4.19.

The patches in the backports-4.19 folder were checked if they are really
in kernel 4.19 based on the title and only removed if they were found in
the upstream kernel.

The following additional patches form the pending folder went into
upstream Linux 4.19:
pending-4.19/171-usb-dwc2-Fix-inefficient-copy-of-unaligned-buffers.patch
pending-4.19/190-2-5-e1000e-Fix-wrong-comment-related-to-link-detection.patch
pending-4.19/478-mtd-spi-nor-Add-support-for-XM25QH64A-and-XM25QH128A.patch
pending-4.19/479-mtd-spi-nor-add-eon-en25qh32.patch
pending-4.19/950-tty-serial-exar-generalize-rs485-setup.patch
pending-4.19/340-MIPS-mm-remove-mips_dma_mapping_error.patch

Bigger changes were introduced to the m25p80 spi nor driver, as far as I
saw it in the new code, it now has the functionality provided in this
patch:
pending-4.19/450-mtd-m25p80-allow-fallback-from-spi_flash_read-to-reg.patch

Part of this patch went upstream independent of OpenWrt:
hack-4.19/220-gc_sections.patch
This patch was reworked to match the changes done upstream.

The MIPS DMA API changed a lot, this patch was rewritten to match the
new DMA handling:
pending-4.19/341-MIPS-mm-remove-no-op-dma_map_ops-where-possible.patch

I did bigger manual changes to the following patches and I am not 100% sure if they are all correct:
pending-4.19/0931-w1-gpio-fix-problem-with-platfom-data-in-w1-gpio.patch
pending-4.19/411-mtd-partial_eraseblock_write.patch
pending-4.19/600-netfilter_conntrack_flush.patch
pending-4.19/611-netfilter_match_bypass_default_table.patch
pending-4.19/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch
hack-4.19/211-host_tools_portability.patch
hack-4.19/221-module_exports.patch
hack-4.19/321-powerpc_crtsavres_prereq.patch
hack-4.19/902-debloat_proc.patch

This is based on patchset from Marko Ratkaj <marko.ratkaj@sartura.hr>

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
6 years ago
Hauke Mehrtens 52a82ce3dd kernel: Copy patches from kernel 4.14 to 4.19
This just copies the files from the kernel 4.14 specific folders into
the kernel 4.19 specific folder, no changes are done to the files in
this commit.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
6 years ago
Hauke Mehrtens a272af75cd kernel: Move modifications of b53.h into patch
The b53 driver was added as a dsa driver into the mainline Linux kernel,
but we still use the swconfig based driver. The header file b53.h is
used by both drivers, but the swconfig one needs an extra member, add
this one in a patch to not overwrite the version shipped with the
mainline kernel.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
6 years ago
Hauke Mehrtens aa3b6a08c5 kernel: Replace ledtrig-netdev with upstream backport
The ledtrig-netdev was added to upstream Linux kernel 4.16, replace our
own version with the patch based on the upstream version.
This will remove the ledtrig-netdev support from kernel 3.18, because I
not want to spend time on backporting it to 3.18. This will make it
easier to use the upstream version with kernel 4.19, by just not
applying this patch.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
6 years ago
Hauke Mehrtens 42e62a8a10 kernel: Reorder configuration
This reorders the generic kernel configuration files.
This was done with the following commands:
$ ./scripts/kconfig.pl '+' target/linux/generic/config-4.14 /dev/null > target/linux/generic/config-4.14-new
$ mv target/linux/generic/config-4.14-new target/linux/generic/config-4.14
$ ./scripts/kconfig.pl '+' target/linux/generic/config-4.9 /dev/null > target/linux/generic/config-4.9-new
$ mv target/linux/generic/config-4.9-new target/linux/generic/config-4.9

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
6 years ago
Koen Vandeputte fdd11a6eae kernel: bump 4.14 to 4.14.88
Refreshed all patches.

Altered patches:
- 180-usb-xhci-add-support-for-performing-fake-doorbell.patch

Fixes CVE:
- CVE-2018-14625

Compile-tested on: ar71xx, cns3xxx, imx6
Runtime-tested on: ar71xx, cns3xxx, imx6

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
6 years ago
Koen Vandeputte fd918b413a kernel: bump 4.9 to 4.9.145
Refreshed all patches.

Fixes CVE:
- CVE-2018-14625

Compile-tested on: brcm2708
Runtime-tested on: brcm2708

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
Tested-by: Stijn Tintel <stijn@linux-ipv6.be>
6 years ago
Rafał Miłecki 816ae87709 kernel: drop unneeded LINUX_VERSION_CODE checks
All those parsers are used by 4.14 targets. They don't need that
backward compatibility code.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years ago
Rafał Miłecki 2abb128f2e kernel: add DT binding support to the LZMA and WRG parsers
It allows specifying those parsers directly in the DT.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years ago
Koen Vandeputte f6e9f23771 kernel: bump 4.14 to 4.14.87
Refreshed all patches.

Remove upstreamed:
- 0008-MIPS-ralink-Fix-mt7620-nd_sd-pinmux.patch

Compile-tested: cns3xxx, imx6
Runtime-tested: cns3xxx, imx6

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
6 years ago
Koen Vandeputte 861dcd717f kernel: bump 4.9 to 4.9.144
Refreshed all patches.

Remove upstreamed:
- 014-Kbuild-suppress-packed-not-aligned-warning-for-defau.patch

Compile-tested: ar7, brcm2708
Runtime-tested: none

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
6 years ago
Koen Vandeputte 0028f86687 kernel: bump 4.14 to 4.14.86
Refreshed all patches.

Altered patches:
- 180-usb-xhci-add-support-for-performing-fake-doorbell.patch

Compile-tested on: ar71xx, cns3xxx, imx6
Runtime-tested on: ar71xx, cns3xxx, imx6

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
6 years ago
Koen Vandeputte dfbf836a52 kernel: bump 4.9 to 4.9.143
Refreshed all patches.

Altered patches:
- 950-0063-Improve-__copy_to_user-and-__copy_from_user-performa.patch
- 201-extra_optimization.patch

New symbol:
- CONFIG_HARDEN_BRANCH_PREDICTOR

Compile-tested on: ar7, at91, brcm2708, ixp4xx, layerscape, orion
Runtime-tested on: none

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
[fix brcm2708/950-0149-Update-vfpmodule.c.patch]
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
6 years ago
Koen Vandeputte 4e38fc824c kernel: bump 3.18 to 3.18.128
Refreshed all patches.

Altered patches:
- 002-phy_drivers_backport.patch

Compile-tested on: adm5120
Runtime-tested on: none

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
6 years ago
Rafał Miłecki 4d3a53b9ef kernel: add DT binding support to the TRX and minor parsers
It allows specifying those parsers directly in the DT.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years ago
David Bauer 68e59b61c6 kernel: add DT binding support to AVM EVA parser
It allows selecting split-firmware parser directly by
specifying image-format in the device-tree.

Signed-off-by: David Bauer <mail@david-bauer.net>
6 years ago
Ram Chandra Jangir bf7719f22c kernel: ar83xx: Add support for three GMAC's connection
We have IPQ8064 AP161 board which has three GMAC's
 * RGMII x2
 * SGMII x1.
The existing ar8327 driver does not have support for
three GMAC's connection, hence this change adds support
for the same. This has been verified on AP148 and AP161
board.

Signed-off-by: xiaofeis <xiaofeis@codeaurora.org>
Signed-off-by: Ram Chandra Jangir <rjangir@codeaurora.org>
6 years ago
Stijn Tintel 93a14b8f2a kernel: add missing symbol
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
6 years ago
Rafał Miłecki f98fde2db4 Revert "kernel: use add_mtd_partitions() helper when using OpenWrt parsers"
This reverts commit 7e88753ace.

Using subpartitions (hierarchical layout) resulted in calling MTD ops of
parent partition instead of master device ops. That was expected and
should work but testing revealed some bugs.

Apparently the way MTD_ERASE_PARTIAL is implemented in the OpenWrt
breaks something and using parent partition ops triggers using that
code.

On SmartRG SR400ac it was resulting in:
[  225.487519] jffs2: Erase at 0x01ac0000 failed immediately: errno -22
on the second boot (for some reason erasing was starting over) and it
was breaking flash access in a long term.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years ago
Rafał Miłecki 7e88753ace kernel: use add_mtd_partitions() helper when using OpenWrt parsers
This helper uses hierarchical partitions layout following the way
upstream parsers work. It's closer to what we should use when mainlining
our solutions. It also doesn't require hacky casting of struct
mtd_partition to the const.

THIS WILL AFFECT KERNEL PRINTING PARTITIONS IN THE LOG

Something like:
[    3.930158] 0x0000004e0000-0x000001fb0000 : "rootfs_data"
will get replaced by:
[    3.907338] Creating 1 MTD partitions on "rootfs":
[    3.912142] 0x00000031d400-0x000001ded400 : "rootfs_data"

It's important to understand that "rootfs_data" in above example is a
*subpartition* of the "rootfs" now. To get absolute addresses (e.g. for
some debugging purposes) one has to add them to the "rootfs", e.g.
[    3.912548] 0x0000001c2c00-0x000001fb0000 : "rootfs"

(0x1c2c00 + 0x31d400 = 0x4e0000)

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years ago
Rafał Miłecki e24983e710 kernel: backport 2 mtd partitioning fixes
This improves handling of subpartitions.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years ago
Pawel Dembicki b5597d5cc9 kernel: add DT binding support to the jimage parser
It allows specifying jimage parser directly in the DT.

Tested on LAVA LR-25G001

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
6 years ago
Günther Kelleter 33878b0a40 kernel: ar8xxx: get_arl_table now shows all ports of an entry
Multicast ARL entries can have multiple destination ports. Get and dump
all destination ports of each entry, not just the lowest.

Signed-off-by: Günther Kelleter <guenther.kelleter@devolo.de>
6 years ago
Pawel Dembicki e61812fd34 ar8216: add adjust_link checking
Driver crash when 'phydev->adjust_link' isn't provided.

This patch check if 'phydev->adjust_link' exist before
call the method.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
6 years ago
Christian Lamparter a9839fe638 generic: rtl8367b: make it possible to specify cpu_port via DT
This patch adds the feature to parse the existing cpu_port DT
property, which is used to specify which port is the cpu port
of the switch.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
6 years ago
Christian Lamparter 910c2f9e68 generic: rtl836x: support defered probe on mdio-bus
On the WNDAP620, the mdio and mdc lines are controlled by
the EMAC ethernet device. This results in a hen-vs-egg problem.
The rtl8367b driver is probed before the ethernet driver and
the mdio-bus is not available yet, which caused the rtl8367b
driver to fail.

This patch changes the rtl8366_smi_probe_of() function to
return -EPROBE_DEFER if the mdio-bus lookup failed and changes
rtl8366_smi_probe()'s signature to return the error code back to
the callee, so it can propagate back to the kernel. Which, will
retry the switch probe at a later time.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
6 years ago
Daniel Golle 51c094e703 kernel: enable CONFIG_BRIDGE_VLAN_FILTERING
This allows us to use the bridge as a managed switch and gracefully
handle mixed tagged and untagged frames. Prior to this, the only
alternative was creating one bridge per vlan which quickly becomes a
nightmare and still won't let you mix both tagged and untagged frames on
the physical port without some complex ebtables magic.

This is in line with the notion that OpenWRT is the network go-to swiss
army knife when you need a nice set-and-forget, low maintenance box to
handle a specific task.

Current builds of the ip-bridge package already fully support this
feature so the only requirement is enabling the kernel config.

This is disabled by default so existing bridge configurations will not
be affected.  This patch only gives the ability to turn it on with an
'ip link' command.  If there is interest, I could look into making the
feature accessible via uci configuration.

It causes about 3.1% hit on raw bridging speed, which is relatively
trivial considering that I had to use 300 byte packets to strain the CPU
enough to notice a slowdown at all.  The ER8 would chug along at wire
speed otherwise, and that's using only one core.  Since the typical
bridge use case on OpenWRT is wireless, I doubt it would be noticeable
at all.

With BRIDGE_VLAN_FILTERING

iperf -u -c 192.168.1.105 -b 1G -l 300
------------------------------------------------------------
Client connecting to 192.168.1.105, UDP port 5001
Sending 300 byte datagrams, IPG target: 2.24 us (kalman adjust)
UDP buffer size:  208 KByte (default)
------------------------------------------------------------
[  3] local 192.168.1.12 port 58045 connected with 192.168.1.105 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec   977 MBytes   820 Mbits/sec
[  3] Sent 3414986 datagrams
[  3] Server Report:
[  3]  0.0-10.0 sec   811 MBytes   680 Mbits/sec   0.000 ms
581210/3414986 (0%)

Without BRIDGE_VLAN_FILTERING

iperf -u -c 192.168.1.105 -b 1G -l 300
------------------------------------------------------------
Client connecting to 192.168.1.105, UDP port 5001
Sending 300 byte datagrams, IPG target: 2.24 us (kalman adjust)
UDP buffer size:  208 KByte (default)
------------------------------------------------------------
[  3] local 192.168.1.12 port 36645 connected with 192.168.1.105 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec   977 MBytes   820 Mbits/sec
[  3] Sent 3414990 datagrams
[  3] Server Report:
[  3]  0.0-10.0 sec   836 MBytes   701 Mbits/sec   0.000 ms
493950/3414990 (0%)

In terms of kernel size, it uses 16KB (6753K vs 6737K on ER8) so a
0.002% hit.  The exact 16KB is probably just due to how the kernel is
compressed.

Suggested-by: Jonathan Thibault <jonathan@navigue.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
6 years ago
Rafał Miłecki c87d47aee8 kernel: drop unused arch_split_mtd_part()
No single target/arch uses it and most likely there is no need to make
such a potential code target/arch specific.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years ago
Rafał Miłecki f995e143ba kernel: add missing version.h include to the TP-LINK parser
Fixes: a29c8d685b ("kernel: add DT binding support to the TP-LINK parser")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years ago
Rafał Miłecki a29c8d685b kernel: add DT binding support to the TP-LINK parser
It allows triggering it directly by specifying format in the DT.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years ago
Rafał Miłecki a22311e6a6 kernel: add DT binding support to the uimage parsers
It allows specifying default and Netgear parsers directly in the DT.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years ago