Refreshed all patches.
Fixes:
- CVE-2019-14896
- CVE-2019-14897
Remove upstreamed:
- 023-0007-crypto-crypto4xx-Fix-wrong-ppc4xx_trng_probe-ppc4xx_.patch
- 950-0202-staging-bcm2835-camera-fix-module-autoloading.patch
- 001-4.22-01-MIPS-BCM63XX-drop-unused-and-broken-DSP-platform-dev.patch
Compile-tested on: cns3xxx
Runtime-tested on: cns3xxx
Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
endif
LINUX_VERSION-4.14 = .169
-LINUX_VERSION-4.19 = .98
+LINUX_VERSION-4.19 = .101
LINUX_KERNEL_HASH-4.14.169 = d88ea97993c56b1fa0b0a05061bcde476c6be4fc3bb2de8bd97a8f8ff7278249
-LINUX_KERNEL_HASH-4.19.98 = 91feb13bc22d60d69596ab1d01dfecbec13ef70f00c89a483e0733af94dd2937
+LINUX_KERNEL_HASH-4.19.101 = be26156abdb38ac0576a34a235ef456bb8ca67fbbe56fc6649b8d069159f8bc4
remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1)))))))
+++ /dev/null
-From 6e88098ca43a3d80ae86908f7badba683c8a0d84 Mon Sep 17 00:00:00 2001
-From: Corentin Labbe <clabbe@baylibre.com>
-Date: Wed, 23 Jan 2019 11:24:18 +0000
-Subject: [PATCH 07/15] crypto: crypto4xx - Fix wrong
- ppc4xx_trng_probe()/ppc4xx_trng_remove() arguments
-
-When building without CONFIG_HW_RANDOM_PPC4XX, I hit the following build failure:
-drivers/crypto/amcc/crypto4xx_core.c: In function 'crypto4xx_probe':
-drivers/crypto/amcc/crypto4xx_core.c:1407:20: error: passing argument 1 of 'ppc4xx_trng_probe' from incompatible pointer type [-Werror=incompatible-pointer-types]
-In file included from drivers/crypto/amcc/crypto4xx_core.c:50:0:
-drivers/crypto/amcc/crypto4xx_trng.h:28:20: note: expected 'struct crypto4xx_device *' but argument is of type 'struct crypto4xx_core_device *'
-drivers/crypto/amcc/crypto4xx_core.c: In function 'crypto4xx_remove':
-drivers/crypto/amcc/crypto4xx_core.c:1434:21: error: passing argument 1 of 'ppc4xx_trng_remove' from incompatible pointer type [-Werror=incompatible-pointer-types]
-In file included from drivers/crypto/amcc/crypto4xx_core.c:50:0:
-drivers/crypto/amcc/crypto4xx_trng.h:30:20: note: expected 'struct crypto4xx_device *' but argument is of type 'struct crypto4xx_core_device *'
-
-This patch fix the needed argument of ppc4xx_trng_probe()/ppc4xx_trng_remove() in that case.
-
-Fixes: 5343e674f32f ("crypto4xx: integrate ppc4xx-rng into crypto4xx")
-Signed-off-by: Corentin Labbe <clabbe@baylibre.com>
-Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
----
- drivers/crypto/amcc/crypto4xx_trng.h | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
---- a/drivers/crypto/amcc/crypto4xx_trng.h
-+++ b/drivers/crypto/amcc/crypto4xx_trng.h
-@@ -26,9 +26,9 @@ void ppc4xx_trng_probe(struct crypto4xx_
- void ppc4xx_trng_remove(struct crypto4xx_core_device *core_dev);
- #else
- static inline void ppc4xx_trng_probe(
-- struct crypto4xx_device *dev __maybe_unused) { }
-+ struct crypto4xx_core_device *dev __maybe_unused) { }
- static inline void ppc4xx_trng_remove(
-- struct crypto4xx_device *dev __maybe_unused) { }
-+ struct crypto4xx_core_device *dev __maybe_unused) { }
- #endif
-
- #endif
EXPORT_SYMBOL(xfrm_parse_spi);
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
-@@ -3895,14 +3895,16 @@ static bool tcp_parse_aligned_timestamp(
+@@ -3896,14 +3896,16 @@ static bool tcp_parse_aligned_timestamp(
{
const __be32 *ptr = (const __be32 *)(th + 1);
--- a/drivers/mtd/spi-nor/spi-nor.c
+++ b/drivers/mtd/spi-nor/spi-nor.c
-@@ -1297,6 +1297,18 @@ static const struct flash_info *spi_nor_
+@@ -1301,6 +1301,18 @@ static const struct flash_info *spi_nor_
}
dev_err(nor->dev, "unrecognized JEDEC id bytes: %02x, %02x, %02x\n",
id[0], id[1], id[2]);
--- a/drivers/net/usb/lan78xx.c
+++ b/drivers/net/usb/lan78xx.c
-@@ -2476,6 +2476,11 @@ static int lan78xx_reset(struct lan78xx_
+@@ -2477,6 +2477,11 @@ static int lan78xx_reset(struct lan78xx_
int ret = 0;
unsigned long timeout;
u8 sig;
ret = lan78xx_read_reg(dev, HW_CFG, &buf);
buf |= HW_CFG_LRST_;
-@@ -2529,6 +2534,9 @@ static int lan78xx_reset(struct lan78xx_
+@@ -2530,6 +2535,9 @@ static int lan78xx_reset(struct lan78xx_
ret = lan78xx_read_reg(dev, HW_CFG, &buf);
buf |= HW_CFG_MEF_;
ret = lan78xx_write_reg(dev, HW_CFG, buf);
ret = lan78xx_read_reg(dev, USB_CFG0, &buf);
-@@ -2584,6 +2592,9 @@ static int lan78xx_reset(struct lan78xx_
+@@ -2585,6 +2593,9 @@ static int lan78xx_reset(struct lan78xx_
buf |= MAC_CR_AUTO_DUPLEX_ | MAC_CR_AUTO_SPEED_;
}
}
+ <&cpu3>, "clock-frequency:0";
+ };
+};
---- a/arch/arm/boot/dts/bcm2835-rpi.dtsi
-+++ b/arch/arm/boot/dts/bcm2835-rpi.dtsi
-@@ -32,7 +32,7 @@
-
- mailbox@7e00b840 {
- compatible = "brcm,bcm2835-vchiq";
-- reg = <0x7e00b840 0xf>;
-+ reg = <0x7e00b840 0x3c>;
- interrupts = <0 2>;
- };
- };
--- a/arch/arm/boot/dts/bcm283x-rpi-lan7515.dtsi
+++ b/arch/arm/boot/dts/bcm283x-rpi-lan7515.dtsi
@@ -21,7 +21,24 @@
--- a/drivers/net/usb/lan78xx.c
+++ b/drivers/net/usb/lan78xx.c
-@@ -2658,6 +2658,22 @@ static int lan78xx_open(struct net_devic
+@@ -2659,6 +2659,22 @@ static int lan78xx_open(struct net_devic
netif_dbg(dev, ifup, dev->net, "phy initialised successfully");
--- a/drivers/net/usb/lan78xx.c
+++ b/drivers/net/usb/lan78xx.c
-@@ -439,6 +439,15 @@ static int msg_level = -1;
+@@ -440,6 +440,15 @@ static int msg_level = -1;
module_param(msg_level, int, 0);
MODULE_PARM_DESC(msg_level, "Override default message level");
static int lan78xx_read_reg(struct lan78xx_net *dev, u32 index, u32 *data)
{
u32 *buf = kmalloc(sizeof(u32), GFP_KERNEL);
-@@ -3009,8 +3018,14 @@ static int lan78xx_bind(struct lan78xx_n
+@@ -3010,8 +3019,14 @@ static int lan78xx_bind(struct lan78xx_n
if (DEFAULT_RX_CSUM_ENABLE)
dev->net->features |= NETIF_F_RXCSUM;
--- a/drivers/net/usb/lan78xx.c
+++ b/drivers/net/usb/lan78xx.c
-@@ -2190,6 +2190,22 @@ static int lan78xx_phy_init(struct lan78
+@@ -2191,6 +2191,22 @@ static int lan78xx_phy_init(struct lan78
mii_adv = (u32)mii_advertise_flowctrl(dev->fc_request_control);
phydev->advertising |= mii_adv_to_ethtool_adv_t(mii_adv);
if (phydev->mdio.dev.of_node) {
u32 reg;
int len;
-@@ -2667,22 +2683,6 @@ static int lan78xx_open(struct net_devic
+@@ -2668,22 +2684,6 @@ static int lan78xx_open(struct net_devic
netif_dbg(dev, ifup, dev->net, "phy initialised successfully");
+++ /dev/null
-From 8b6e9f2a951b38becf5b8a1e99ba1993f7751aac Mon Sep 17 00:00:00 2001
-From: Stefan Wahren <stefan.wahren@i2se.com>
-Date: Sat, 20 Oct 2018 19:26:18 +0200
-Subject: [PATCH] staging: bcm2835-camera: fix module autoloading
-
-In order to make the module bcm2835-camera load automatically, we need to
-add a module alias.
-
-Fixes: 4bebb0312ea9 ("staging/bcm2835-camera: Set ourselves up as a platform driver.")
-Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
----
- drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c | 1 +
- 1 file changed, 1 insertion(+)
-
---- a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
-+++ b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
-@@ -47,6 +47,7 @@ MODULE_DESCRIPTION("Broadcom 2835 MMAL v
- MODULE_AUTHOR("Vincent Sanders");
- MODULE_LICENSE("GPL");
- MODULE_VERSION(BM2835_MMAL_VERSION);
-+MODULE_ALIAS("platform:bcm2835-camera");
-
- int bcm2835_v4l2_debug;
- module_param_named(debug, bcm2835_v4l2_debug, int, 0644);
int bcm2835_v4l2_debug;
module_param_named(debug, bcm2835_v4l2_debug, int, 0644);
MODULE_PARM_DESC(bcm2835_v4l2_debug, "Debug level 0-2");
-@@ -1980,3 +1974,9 @@ static struct platform_driver bcm2835_ca
+@@ -1989,3 +1983,9 @@ static struct platform_driver bcm2835_ca
};
module_platform_driver(bcm2835_camera_driver)
return 0;
-@@ -1880,21 +1891,29 @@ static int bcm2835_mmal_probe(struct pla
+@@ -1886,21 +1897,29 @@ static int bcm2835_mmal_probe(struct pla
snprintf(dev->v4l2_dev.name, sizeof(dev->v4l2_dev.name),
"%s", BM2835_MMAL_MODULE_NAME);
ret = v4l2_device_register(NULL, &dev->v4l2_dev);
/* initialize queue */
q = &dev->capture.vb_vidq;
memset(q, 0, sizeof(*q));
-@@ -1912,16 +1931,19 @@ static int bcm2835_mmal_probe(struct pla
+@@ -1918,16 +1937,19 @@ static int bcm2835_mmal_probe(struct pla
/* initialise video devices */
ret = bm2835_mmal_init_device(dev, &dev->vdev);
goto unreg_dev;
}
-@@ -1945,8 +1967,6 @@ cleanup_gdev:
+@@ -1951,8 +1973,6 @@ cleanup_gdev:
bcm2835_cleanup_instance(gdev[i]);
gdev[i] = NULL;
}
- pr_info("%s: error %d while loading driver\n",
- BM2835_MMAL_MODULE_NAME, ret);
- return ret;
- }
+ cleanup_mmal:
+ vchiq_mmal_finalise(instance);
+++ /dev/null
-From b0ebcf556b543b0b509ad071584ca6b41076a2da Mon Sep 17 00:00:00 2001
-From: Stefan Wahren <stefan.wahren@i2se.com>
-Date: Mon, 22 Oct 2018 11:09:18 +0200
-Subject: [PATCH] staging: bcm2835: Don't probe if no camera is
- detected
-
-It is a waste of resources to load the camera driver in case there isn't
-a camera actually connected to the Raspberry Pi. This solution also
-avoids a NULL ptr dereference of mmal instance on driver unload.
-
-Fixes: 7b3ad5abf027 ("staging: Import the BCM2835 MMAL-based V4L2 camera driver.")
-Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
----
- .../vc04_services/bcm2835-camera/bcm2835-camera.c | 9 +++++++++
- 1 file changed, 9 insertions(+)
-
---- a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
-+++ b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
-@@ -1860,6 +1860,12 @@ static int bcm2835_mmal_probe(struct pla
- num_cameras = get_num_cameras(instance,
- resolutions,
- MAX_BCM2835_CAMERAS);
-+
-+ if (num_cameras < 1) {
-+ ret = -ENODEV;
-+ goto cleanup_mmal;
-+ }
-+
- if (num_cameras > MAX_BCM2835_CAMERAS)
- num_cameras = MAX_BCM2835_CAMERAS;
-
-@@ -1968,6 +1974,9 @@ cleanup_gdev:
- gdev[i] = NULL;
- }
-
-+cleanup_mmal:
-+ vchiq_mmal_finalise(instance);
-+
- return ret;
- }
-
--- a/drivers/net/usb/lan78xx.c
+++ b/drivers/net/usb/lan78xx.c
-@@ -448,6 +448,11 @@ static bool enable_tso;
+@@ -449,6 +449,11 @@ static bool enable_tso;
module_param(enable_tso, bool, 0644);
MODULE_PARM_DESC(enable_tso, "Enables TCP segmentation offload");
static int lan78xx_read_reg(struct lan78xx_net *dev, u32 index, u32 *data)
{
u32 *buf = kmalloc(sizeof(u32), GFP_KERNEL);
-@@ -3823,7 +3828,12 @@ static int lan78xx_probe(struct usb_inte
+@@ -3838,7 +3843,12 @@ static int lan78xx_probe(struct usb_inte
dev->pipe_intr = usb_rcvintpipe(dev->udev,
dev->ep_intr->desc.bEndpointAddress &
USB_ENDPOINT_NUMBER_MASK);
--- a/drivers/net/usb/lan78xx.c
+++ b/drivers/net/usb/lan78xx.c
-@@ -2195,7 +2195,7 @@ static int lan78xx_phy_init(struct lan78
+@@ -2196,7 +2196,7 @@ static int lan78xx_phy_init(struct lan78
mii_adv = (u32)mii_advertise_flowctrl(dev->fc_request_control);
phydev->advertising |= mii_adv_to_ethtool_adv_t(mii_adv);
--- a/drivers/net/usb/lan78xx.c
+++ b/drivers/net/usb/lan78xx.c
-@@ -3256,7 +3256,7 @@ static int rx_submit(struct lan78xx_net
+@@ -3257,7 +3257,7 @@ static int rx_submit(struct lan78xx_net
size_t size = dev->rx_urb_size;
int ret = 0;
#define USB_VENDOR_ID_BELKIN 0x050d
#define USB_DEVICE_ID_FLIP_KVM 0x3201
-@@ -1193,6 +1196,9 @@
+@@ -1196,6 +1199,9 @@
#define USB_VENDOR_ID_XAT 0x2505
#define USB_DEVICE_ID_XAT_CSR 0x0220
{ HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP_LTD2, USB_DEVICE_ID_SMARTJOY_DUAL_PLUS), HID_QUIRK_NOGET | HID_QUIRK_MULTI_INPUT },
{ HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_QUAD_USB_JOYPAD), HID_QUIRK_NOGET | HID_QUIRK_MULTI_INPUT },
+ { HID_USB_DEVICE(USB_VENDOR_ID_XENTA, USB_DEVICE_ID_AIRMOUSE_MX3), HID_QUIRK_INCREMENT_USAGE_ON_DUPLICATE },
+ { HID_USB_DEVICE(USB_VENDOR_ID_XIN_MO, USB_DEVICE_ID_XIN_MO_DUAL_ARCADE), HID_QUIRK_MULTI_INPUT },
{ 0 }
- };
}
--- a/drivers/opp/core.c
+++ b/drivers/opp/core.c
-@@ -881,11 +881,9 @@ void _opp_free(struct dev_pm_opp *opp)
+@@ -884,11 +884,9 @@ void _opp_free(struct dev_pm_opp *opp)
kfree(opp);
}
/*
* Notify the changes in the availability of the operable
* frequency/voltage list.
-@@ -894,7 +892,22 @@ static void _opp_kref_release(struct kre
+@@ -897,7 +895,22 @@ static void _opp_kref_release(struct kre
opp_debug_remove_one(opp);
list_del(&opp->node);
kfree(opp);
mutex_unlock(&opp_table->lock);
dev_pm_opp_put_opp_table(opp_table);
}
-@@ -906,10 +919,16 @@ void dev_pm_opp_get(struct dev_pm_opp *o
+@@ -909,10 +922,16 @@ void dev_pm_opp_get(struct dev_pm_opp *o
void dev_pm_opp_put(struct dev_pm_opp *opp)
{
/**
* dev_pm_opp_remove() - Remove an OPP from OPP table
* @dev: device for which we do this operation
-@@ -949,6 +968,40 @@ void dev_pm_opp_remove(struct device *de
+@@ -952,6 +971,40 @@ void dev_pm_opp_remove(struct device *de
}
EXPORT_SYMBOL_GPL(dev_pm_opp_remove);
#include <linux/uaccess.h>
#include <asm/io.h>
-@@ -2246,6 +2248,69 @@ static void b44_adjust_link(struct net_d
+@@ -2249,6 +2251,69 @@ static void b44_adjust_link(struct net_d
}
}
static int b44_register_phy_one(struct b44 *bp)
{
struct mii_bus *mii_bus;
-@@ -2281,6 +2346,9 @@ static int b44_register_phy_one(struct b
+@@ -2284,6 +2349,9 @@ static int b44_register_phy_one(struct b
if (!mdiobus_is_registered_device(bp->mii_bus, bp->phy_addr) &&
(sprom->boardflags_lo & (B44_BOARDFLAG_ROBO | B44_BOARDFLAG_ADM))) {
dev_info(sdev->dev,
"could not find PHY at %i, use fixed one\n",
bp->phy_addr);
-@@ -2475,6 +2543,7 @@ static void b44_remove_one(struct ssb_de
+@@ -2478,6 +2546,7 @@ static void b44_remove_one(struct ssb_de
unregister_netdev(dev);
if (bp->flags & B44_FLAG_EXTERNAL_PHY)
b44_unregister_phy_one(bp);
if (bp->flags & B44_FLAG_EXTERNAL_PHY)
return 0;
-@@ -2176,6 +2201,8 @@ static int b44_get_invariants(struct b44
+@@ -2179,6 +2204,8 @@ static int b44_get_invariants(struct b44
* valid PHY address. */
bp->phy_addr &= 0x1F;
--- a/drivers/watchdog/Kconfig
+++ b/drivers/watchdog/Kconfig
-@@ -1497,6 +1497,15 @@ config WDT_MTX1
+@@ -1498,6 +1498,15 @@ config WDT_MTX1
Hardware driver for the MTX-1 boards. This is a watchdog timer that
will reboot the machine after a 100 seconds timer expired.
+++ /dev/null
-From 51559154375fff4a94bbbc249fdd9248a80827b3 Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jonas.gorski@gmail.com>
-Date: Tue, 18 Dec 2018 10:19:02 +0100
-Subject: [PATCH] MIPS: BCM63XX: drop unused and broken DSP platform device
-
-Trying to register the DSP platform device results in a null pointer
-access:
-
-[ 0.124184] CPU 0 Unable to handle kernel paging request at virtual address 00000000, epc == 804e305c, ra == 804e6f20
-[ 0.135208] Oops[#1]:
-[ 0.137514] CPU: 0 PID: 1 Comm: swapper Not tainted 4.14.87
-...
-[ 0.197117] epc : 804e305c bcm63xx_dsp_register+0x80/0xa4
-[ 0.202838] ra : 804e6f20 board_register_devices+0x258/0x390
-...
-
-This happens because it tries to copy the passed platform data over the
-platform_device's unpopulated platform_data.
-
-Since this code has been broken since its submission, no driver was ever
-submitted for it, and apparently nobody was using it, just remove it
-instead of trying to fix it.
-
-Fixes: e7300d04bd08 ("MIPS: BCM63xx: Add support for the Broadcom BCM63xx family of SOCs.")
-Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
----
- arch/mips/bcm63xx/Makefile | 6 +--
- arch/mips/bcm63xx/boards/board_bcm963xx.c | 20 --------
- arch/mips/bcm63xx/dev-dsp.c | 56 ----------------------
- .../include/asm/mach-bcm63xx/bcm63xx_dev_dsp.h | 14 ------
- .../mips/include/asm/mach-bcm63xx/board_bcm963xx.h | 5 --
- 5 files changed, 3 insertions(+), 98 deletions(-)
- delete mode 100644 arch/mips/bcm63xx/dev-dsp.c
- delete mode 100644 arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_dsp.h
-
---- a/arch/mips/bcm63xx/Makefile
-+++ b/arch/mips/bcm63xx/Makefile
-@@ -1,8 +1,8 @@
- # SPDX-License-Identifier: GPL-2.0
- obj-y += clk.o cpu.o cs.o gpio.o irq.o nvram.o prom.o reset.o \
-- setup.o timer.o dev-dsp.o dev-enet.o dev-flash.o \
-- dev-pcmcia.o dev-rng.o dev-spi.o dev-hsspi.o dev-uart.o \
-- dev-wdt.o dev-usb-usbd.o
-+ setup.o timer.o dev-enet.o dev-flash.o dev-pcmcia.o \
-+ dev-rng.o dev-spi.o dev-hsspi.o dev-uart.o dev-wdt.o \
-+ dev-usb-usbd.o
- obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
-
- obj-y += boards/
---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
-+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -23,7 +23,6 @@
- #include <bcm63xx_nvram.h>
- #include <bcm63xx_dev_pci.h>
- #include <bcm63xx_dev_enet.h>
--#include <bcm63xx_dev_dsp.h>
- #include <bcm63xx_dev_flash.h>
- #include <bcm63xx_dev_hsspi.h>
- #include <bcm63xx_dev_pcmcia.h>
-@@ -289,14 +288,6 @@ static struct board_info __initdata boar
- .has_pccard = 1,
- .has_ehci0 = 1,
-
-- .has_dsp = 1,
-- .dsp = {
-- .gpio_rst = 6,
-- .gpio_int = 34,
-- .cs = 2,
-- .ext_irq = 2,
-- },
--
- .leds = {
- {
- .name = "adsl-fail",
-@@ -401,14 +392,6 @@ static struct board_info __initdata boar
-
- .has_ohci0 = 1,
-
-- .has_dsp = 1,
-- .dsp = {
-- .gpio_rst = 6,
-- .gpio_int = 34,
-- .ext_irq = 2,
-- .cs = 2,
-- },
--
- .leds = {
- {
- .name = "adsl-fail",
-@@ -898,9 +881,6 @@ int __init board_register_devices(void)
- if (board.has_usbd)
- bcm63xx_usbd_register(&board.usbd);
-
-- if (board.has_dsp)
-- bcm63xx_dsp_register(&board.dsp);
--
- /* Generate MAC address for WLAN and register our SPROM,
- * do this after registering enet devices
- */
---- a/arch/mips/bcm63xx/dev-dsp.c
-+++ /dev/null
-@@ -1,56 +0,0 @@
--/*
-- * Broadcom BCM63xx VoIP DSP registration
-- *
-- * This file is subject to the terms and conditions of the GNU General Public
-- * License. See the file "COPYING" in the main directory of this archive
-- * for more details.
-- *
-- * Copyright (C) 2009 Florian Fainelli <florian@openwrt.org>
-- */
--
--#include <linux/init.h>
--#include <linux/kernel.h>
--#include <linux/platform_device.h>
--
--#include <bcm63xx_cpu.h>
--#include <bcm63xx_dev_dsp.h>
--#include <bcm63xx_regs.h>
--#include <bcm63xx_io.h>
--
--static struct resource voip_dsp_resources[] = {
-- {
-- .start = -1, /* filled at runtime */
-- .end = -1, /* filled at runtime */
-- .flags = IORESOURCE_MEM,
-- },
-- {
-- .start = -1, /* filled at runtime */
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device bcm63xx_voip_dsp_device = {
-- .name = "bcm63xx-voip-dsp",
-- .id = -1,
-- .num_resources = ARRAY_SIZE(voip_dsp_resources),
-- .resource = voip_dsp_resources,
--};
--
--int __init bcm63xx_dsp_register(const struct bcm63xx_dsp_platform_data *pd)
--{
-- struct bcm63xx_dsp_platform_data *dpd;
-- u32 val;
--
-- /* Get the memory window */
-- val = bcm_mpi_readl(MPI_CSBASE_REG(pd->cs - 1));
-- val &= MPI_CSBASE_BASE_MASK;
-- voip_dsp_resources[0].start = val;
-- voip_dsp_resources[0].end = val + 0xFFFFFFF;
-- voip_dsp_resources[1].start = pd->ext_irq;
--
-- /* copy given platform data */
-- dpd = bcm63xx_voip_dsp_device.dev.platform_data;
-- memcpy(dpd, pd, sizeof (*pd));
--
-- return platform_device_register(&bcm63xx_voip_dsp_device);
--}
---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_dsp.h
-+++ /dev/null
-@@ -1,14 +0,0 @@
--/* SPDX-License-Identifier: GPL-2.0 */
--#ifndef __BCM63XX_DSP_H
--#define __BCM63XX_DSP_H
--
--struct bcm63xx_dsp_platform_data {
-- unsigned gpio_rst;
-- unsigned gpio_int;
-- unsigned cs;
-- unsigned ext_irq;
--};
--
--int __init bcm63xx_dsp_register(const struct bcm63xx_dsp_platform_data *pd);
--
--#endif /* __BCM63XX_DSP_H */
---- a/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
-+++ b/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
-@@ -7,7 +7,6 @@
- #include <linux/leds.h>
- #include <bcm63xx_dev_enet.h>
- #include <bcm63xx_dev_usb_usbd.h>
--#include <bcm63xx_dev_dsp.h>
-
- /*
- * flash mapping
-@@ -31,7 +30,6 @@ struct board_info {
- unsigned int has_ohci0:1;
- unsigned int has_ehci0:1;
- unsigned int has_usbd:1;
-- unsigned int has_dsp:1;
- unsigned int has_uart0:1;
- unsigned int has_uart1:1;
-
-@@ -43,9 +41,6 @@ struct board_info {
- /* USB config */
- struct bcm63xx_usbd_platform_data usbd;
-
-- /* DSP config */
-- struct bcm63xx_dsp_platform_data dsp;
--
- /* GPIO LEDs */
- struct gpio_led leds[5];
-
--- a/net/netfilter/nf_flow_table_core.c
+++ b/net/netfilter/nf_flow_table_core.c
-@@ -532,5 +532,35 @@ void nf_flow_table_free(struct nf_flowta
+@@ -535,5 +535,35 @@ void nf_flow_table_free(struct nf_flowta
}
EXPORT_SYMBOL_GPL(nf_flow_table_free);
MODULE_AUTHOR("Pablo Neira Ayuso <pablo@netfilter.org>");
--- a/net/netfilter/nft_flow_offload.c
+++ b/net/netfilter/nft_flow_offload.c
-@@ -217,47 +217,14 @@ static struct nft_expr_type nft_flow_off
+@@ -216,47 +216,14 @@ static struct nft_expr_type nft_flow_off
.owner = THIS_MODULE,
};
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
-@@ -1776,6 +1776,19 @@ int phy_set_max_speed(struct phy_device
+@@ -1777,6 +1777,19 @@ int phy_set_max_speed(struct phy_device
}
EXPORT_SYMBOL(phy_set_max_speed);
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
-@@ -1789,6 +1789,36 @@ void phy_support_asym_pause(struct phy_d
+@@ -1790,6 +1790,36 @@ void phy_support_asym_pause(struct phy_d
}
EXPORT_SYMBOL(phy_support_asym_pause);
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
-@@ -885,8 +885,6 @@ int phy_init_hw(struct phy_device *phyde
+@@ -886,8 +886,6 @@ int phy_init_hw(struct phy_device *phyde
if (phydev->drv->soft_reset)
ret = phydev->drv->soft_reset(phydev);
#include <linux/mdio.h>
#include <linux/io.h>
#include <linux/uaccess.h>
-@@ -943,6 +944,65 @@ void phy_attached_print(struct phy_devic
+@@ -944,6 +945,65 @@ void phy_attached_print(struct phy_devic
EXPORT_SYMBOL(phy_attached_print);
/**
* phy_attach_direct - attach a network device to a given PHY device pointer
* @dev: network device to attach
* @phydev: Pointer to phy_device to attach
-@@ -1015,6 +1075,9 @@ int phy_attach_direct(struct net_device
+@@ -1016,6 +1076,9 @@ int phy_attach_direct(struct net_device
phydev->attached_dev = dev;
dev->phydev = phydev;
/* Some Ethernet drivers try to connect to a PHY device before
* calling register_netdevice() -> netdev_register_kobject() and
* does the dev->dev.kobj initialization. Here we only check for
-@@ -1949,6 +2012,9 @@ static int phy_remove(struct device *dev
+@@ -1950,6 +2013,9 @@ static int phy_remove(struct device *dev
phydev->state = PHY_DOWN;
mutex_unlock(&phydev->lock);
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
-@@ -334,7 +334,7 @@ static int phy_bus_match(struct device *
+@@ -335,7 +335,7 @@ static int phy_bus_match(struct device *
if (phydev->is_c45) {
for (i = 1; i < num_ids; i++) {
continue;
if ((phydrv->phy_id & phydrv->phy_id_mask) ==
-@@ -622,10 +622,13 @@ static int get_phy_id(struct mii_bus *bu
+@@ -623,10 +623,13 @@ static int get_phy_id(struct mii_bus *bu
*/
struct phy_device *get_phy_device(struct mii_bus *bus, int addr, bool is_c45)
{
--- a/include/net/sch_generic.h
+++ b/include/net/sch_generic.h
-@@ -486,12 +486,13 @@ extern struct Qdisc_ops noop_qdisc_ops;
+@@ -487,12 +487,13 @@ extern struct Qdisc_ops noop_qdisc_ops;
extern struct Qdisc_ops pfifo_fast_ops;
extern struct Qdisc_ops mq_qdisc_ops;
extern struct Qdisc_ops noqueue_qdisc_ops;
device, it has to decide which ones to send first, which ones to
--- a/net/sched/sch_api.c
+++ b/net/sched/sch_api.c
-@@ -2160,7 +2160,7 @@ static int __init pktsched_init(void)
+@@ -2162,7 +2162,7 @@ static int __init pktsched_init(void)
return err;
}
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
-@@ -1576,6 +1576,9 @@ int genphy_update_link(struct phy_device
+@@ -1577,6 +1577,9 @@ int genphy_update_link(struct phy_device
{
int status;
#define PACKET_FANOUT_LB 1
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
-@@ -1790,6 +1790,7 @@ static int packet_rcv_spkt(struct sk_buf
+@@ -1796,6 +1796,7 @@ static int packet_rcv_spkt(struct sk_buf
{
struct sock *sk;
struct sockaddr_pkt *spkt;
/*
* When we registered the protocol we saved the socket in the data
-@@ -1797,6 +1798,7 @@ static int packet_rcv_spkt(struct sk_buf
+@@ -1803,6 +1804,7 @@ static int packet_rcv_spkt(struct sk_buf
*/
sk = pt->af_packet_priv;
/*
* Yank back the headers [hope the device set this
-@@ -1809,7 +1811,7 @@ static int packet_rcv_spkt(struct sk_buf
+@@ -1815,7 +1817,7 @@ static int packet_rcv_spkt(struct sk_buf
* so that this procedure is noop.
*/
goto out;
if (!net_eq(dev_net(dev), sock_net(sk)))
-@@ -2037,12 +2039,12 @@ static int packet_rcv(struct sk_buff *sk
+@@ -2043,12 +2045,12 @@ static int packet_rcv(struct sk_buff *sk
unsigned int snaplen, res;
bool is_drop_n_account = false;
if (!net_eq(dev_net(dev), sock_net(sk)))
goto drop;
-@@ -2168,12 +2170,12 @@ static int tpacket_rcv(struct sk_buff *s
+@@ -2174,12 +2176,12 @@ static int tpacket_rcv(struct sk_buff *s
BUILD_BUG_ON(TPACKET_ALIGN(sizeof(*h.h2)) != 32);
BUILD_BUG_ON(TPACKET_ALIGN(sizeof(*h.h3)) != 48);
if (!net_eq(dev_net(dev), sock_net(sk)))
goto drop;
-@@ -3259,6 +3261,7 @@ static int packet_create(struct net *net
+@@ -3265,6 +3267,7 @@ static int packet_create(struct net *net
mutex_init(&po->pg_vec_lock);
po->rollover = NULL;
po->prot_hook.func = packet_rcv;
if (sock->type == SOCK_PACKET)
po->prot_hook.func = packet_rcv_spkt;
-@@ -3870,6 +3873,16 @@ packet_setsockopt(struct socket *sock, i
+@@ -3885,6 +3888,16 @@ packet_setsockopt(struct socket *sock, i
po->xmit = val ? packet_direct_xmit : dev_queue_xmit;
return 0;
}
default:
return -ENOPROTOOPT;
}
-@@ -3922,6 +3935,13 @@ static int packet_getsockopt(struct sock
+@@ -3937,6 +3950,13 @@ static int packet_getsockopt(struct sock
case PACKET_VNET_HDR:
val = po->has_vnet_hdr;
break;
INIT_DEFERRABLE_WORK(&flowtable->gc_work, nf_flow_offload_work_gc);
err = rhashtable_init(&flowtable->rhashtable,
-@@ -535,6 +580,8 @@ static void nf_flow_table_iterate_cleanu
+@@ -538,6 +583,8 @@ static void nf_flow_table_iterate_cleanu
{
nf_flow_table_iterate(flowtable, nf_flow_table_do_cleanup, dev);
flush_delayed_work(&flowtable->gc_work);
}
void nf_flow_table_cleanup(struct net *net, struct net_device *dev)
-@@ -548,6 +595,26 @@ void nf_flow_table_cleanup(struct net *n
+@@ -551,6 +598,26 @@ void nf_flow_table_cleanup(struct net *n
}
EXPORT_SYMBOL_GPL(nf_flow_table_cleanup);
void nf_flow_table_free(struct nf_flowtable *flow_table)
{
mutex_lock(&flowtable_lock);
-@@ -557,9 +624,58 @@ void nf_flow_table_free(struct nf_flowta
+@@ -560,9 +627,58 @@ void nf_flow_table_free(struct nf_flowta
nf_flow_table_iterate(flow_table, nf_flow_table_do_cleanup, NULL);
WARN_ON(!nf_flow_offload_gc_step(flow_table));
rhashtable_destroy(&flow_table->rhashtable);
+MODULE_ALIAS("nf-flow-table-hw");
--- a/net/netfilter/nf_tables_api.c
+++ b/net/netfilter/nf_tables_api.c
-@@ -5490,6 +5490,13 @@ static int nf_tables_flowtable_parse_hoo
+@@ -5503,6 +5503,13 @@ static int nf_tables_flowtable_parse_hoo
if (err < 0)
return err;
ops = kcalloc(n, sizeof(struct nf_hook_ops), GFP_KERNEL);
if (!ops)
return -ENOMEM;
-@@ -5621,10 +5628,19 @@ static int nf_tables_newflowtable(struct
+@@ -5634,10 +5641,19 @@ static int nf_tables_newflowtable(struct
}
flowtable->data.type = type;
err = nf_tables_flowtable_parse_hook(&ctx, nla[NFTA_FLOWTABLE_HOOK],
flowtable);
if (err < 0)
-@@ -5750,7 +5766,8 @@ static int nf_tables_fill_flowtable_info
+@@ -5763,7 +5779,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),
nest = nla_nest_start(skb, NFTA_FLOWTABLE_HOOK);
--- a/net/netfilter/nft_flow_offload.c
+++ b/net/netfilter/nft_flow_offload.c
-@@ -127,6 +127,9 @@ static void nft_flow_offload_eval(const
+@@ -126,6 +126,9 @@ static void nft_flow_offload_eval(const
if (ret < 0)
goto err_flow_add;
memcpy(p->name, u->name, sizeof(u->name));
}
-@@ -1926,6 +2088,15 @@ static int ip6_tnl_validate(struct nlatt
+@@ -1924,6 +2086,15 @@ static int ip6_tnl_validate(struct nlatt
return 0;
}
static void ip6_tnl_netlink_parms(struct nlattr *data[],
struct __ip6_tnl_parm *parms)
{
-@@ -1963,6 +2134,46 @@ static void ip6_tnl_netlink_parms(struct
+@@ -1961,6 +2132,46 @@ static void ip6_tnl_netlink_parms(struct
if (data[IFLA_IPTUN_FWMARK])
parms->fwmark = nla_get_u32(data[IFLA_IPTUN_FWMARK]);
}
static bool ip6_tnl_netlink_encap_parms(struct nlattr *data[],
-@@ -2078,6 +2289,12 @@ static void ip6_tnl_dellink(struct net_d
+@@ -2076,6 +2287,12 @@ static void ip6_tnl_dellink(struct net_d
static size_t ip6_tnl_get_size(const struct net_device *dev)
{
return
/* IFLA_IPTUN_LINK */
nla_total_size(4) +
-@@ -2107,6 +2324,24 @@ static size_t ip6_tnl_get_size(const str
+@@ -2105,6 +2322,24 @@ static size_t ip6_tnl_get_size(const str
nla_total_size(0) +
/* IFLA_IPTUN_FWMARK */
nla_total_size(4) +
0;
}
-@@ -2114,6 +2349,9 @@ static int ip6_tnl_fill_info(struct sk_b
+@@ -2112,6 +2347,9 @@ static int ip6_tnl_fill_info(struct sk_b
{
struct ip6_tnl *tunnel = netdev_priv(dev);
struct __ip6_tnl_parm *parm = &tunnel->parms;
if (nla_put_u32(skb, IFLA_IPTUN_LINK, parm->link) ||
nla_put_in6_addr(skb, IFLA_IPTUN_LOCAL, &parm->laddr) ||
-@@ -2123,9 +2361,27 @@ static int ip6_tnl_fill_info(struct sk_b
+@@ -2121,9 +2359,27 @@ static int ip6_tnl_fill_info(struct sk_b
nla_put_be32(skb, IFLA_IPTUN_FLOWINFO, parm->flowinfo) ||
nla_put_u32(skb, IFLA_IPTUN_FLAGS, parm->flags) ||
nla_put_u8(skb, IFLA_IPTUN_PROTO, parm->proto) ||
if (nla_put_u16(skb, IFLA_IPTUN_ENCAP_TYPE, tunnel->encap.type) ||
nla_put_be16(skb, IFLA_IPTUN_ENCAP_SPORT, tunnel->encap.sport) ||
nla_put_be16(skb, IFLA_IPTUN_ENCAP_DPORT, tunnel->encap.dport) ||
-@@ -2165,6 +2421,7 @@ static const struct nla_policy ip6_tnl_p
+@@ -2163,6 +2419,7 @@ static const struct nla_policy ip6_tnl_p
[IFLA_IPTUN_ENCAP_DPORT] = { .type = NLA_U16 },
[IFLA_IPTUN_COLLECT_METADATA] = { .type = NLA_FLAG },
[IFLA_IPTUN_FWMARK] = { .type = NLA_U32 },
__u16 tc_index; /* traffic control index */
--- a/net/core/dev.c
+++ b/net/core/dev.c
-@@ -5483,6 +5483,9 @@ static enum gro_result dev_gro_receive(s
+@@ -5454,6 +5454,9 @@ static enum gro_result dev_gro_receive(s
int same_flow;
int grow;
if (netif_elide_gro(skb->dev))
goto normal;
-@@ -7141,6 +7144,48 @@ static void __netdev_adjacent_dev_unlink
+@@ -7112,6 +7115,48 @@ static void __netdev_adjacent_dev_unlink
&upper_dev->adj_list.lower);
}
static int __netdev_upper_dev_link(struct net_device *dev,
struct net_device *upper_dev, bool master,
void *upper_priv, void *upper_info,
-@@ -7191,6 +7236,7 @@ static int __netdev_upper_dev_link(struc
+@@ -7162,6 +7207,7 @@ static int __netdev_upper_dev_link(struc
if (ret)
return ret;
ret = call_netdevice_notifiers_info(NETDEV_CHANGEUPPER,
&changeupper_info.info);
ret = notifier_to_errno(ret);
-@@ -7283,6 +7329,7 @@ void netdev_upper_dev_unlink(struct net_
+@@ -7254,6 +7300,7 @@ void netdev_upper_dev_unlink(struct net_
__netdev_adjacent_dev_unlink_neighbour(dev, upper_dev);
call_netdevice_notifiers_info(NETDEV_CHANGEUPPER,
&changeupper_info.info);
-@@ -7913,6 +7960,7 @@ int dev_set_mac_address(struct net_devic
+@@ -7893,6 +7940,7 @@ int dev_set_mac_address(struct net_devic
if (err)
return err;
dev->addr_assign_type = NET_ADDR_SET;
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
-@@ -1200,6 +1200,9 @@ void phy_detach(struct phy_device *phyde
+@@ -1201,6 +1201,9 @@ void phy_detach(struct phy_device *phyde
struct module *ndev_owner = dev->dev.parent->driver->owner;
struct mii_bus *bus;
{ "mx25u25635f", INFO(0xc22539, 0, 64 * 1024, 512, SECT_4K | SPI_NOR_4B_OPCODES) },
{ "mx25l25655e", INFO(0xc22619, 0, 64 * 1024, 512, 0) },
{ "mx66l51235l", INFO(0xc2201a, 0, 64 * 1024, 1024, SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_4B_OPCODES) },
-@@ -1276,11 +1277,12 @@ static const struct flash_info spi_nor_i
+@@ -1280,11 +1281,12 @@ static const struct flash_info spi_nor_i
{ },
};
tmp = nor->read_reg(nor, SPINOR_OP_RDID, id, SPI_NOR_MAX_ID_LEN);
if (tmp < 0) {
-@@ -1291,10 +1293,16 @@ static const struct flash_info *spi_nor_
+@@ -1295,10 +1297,16 @@ static const struct flash_info *spi_nor_
for (tmp = 0; tmp < ARRAY_SIZE(spi_nor_ids) - 1; tmp++) {
info = &spi_nor_ids[tmp];
if (info->id_len) {
dev_err(nor->dev, "unrecognized JEDEC id bytes: %02x, %02x, %02x\n",
id[0], id[1], id[2]);
return ERR_PTR(-ENODEV);
-@@ -2828,7 +2836,7 @@ int spi_nor_scan(struct spi_nor *nor, co
+@@ -2832,7 +2840,7 @@ int spi_nor_scan(struct spi_nor *nor, co
info = spi_nor_match_id(name);
/* Try to auto-detect if chip name wasn't specified or not found */
if (!info)
if (IS_ERR_OR_NULL(info))
return -ENOENT;
-@@ -2839,7 +2847,7 @@ int spi_nor_scan(struct spi_nor *nor, co
+@@ -2843,7 +2851,7 @@ int spi_nor_scan(struct spi_nor *nor, co
if (name && info->id_len) {
const struct flash_info *jinfo;
--- a/drivers/opp/core.c
+++ b/drivers/opp/core.c
-@@ -1623,6 +1623,75 @@ put_table:
+@@ -1629,6 +1629,75 @@ put_table:
}
/**
--- a/drivers/opp/core.c
+++ b/drivers/opp/core.c
-@@ -1663,6 +1663,7 @@ int dev_pm_opp_adjust_voltage(struct dev
+@@ -1669,6 +1669,7 @@ int dev_pm_opp_adjust_voltage(struct dev
struct opp_table *opp_table;
struct dev_pm_opp *tmp_opp, *opp = ERR_PTR(-ENODEV);
int r = 0;
/* Find the opp_table */
opp_table = _find_opp_table(dev);
-@@ -1692,8 +1693,17 @@ int dev_pm_opp_adjust_voltage(struct dev
+@@ -1698,8 +1699,17 @@ int dev_pm_opp_adjust_voltage(struct dev
goto adjust_unlock;
opp->supplies->u_volt = u_volt;
-diff -urN a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
---- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c 2019-12-23 11:42:02.728620670 +0800
-+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c 2019-12-23 11:42:48.747289058 +0800
-@@ -999,11 +999,6 @@
+--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
++++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+@@ -999,11 +999,6 @@ static int mtk_poll_rx(struct napi_struc
if (!(trxd.rxd2 & RX_DMA_DONE))
break;
mac = (trxd.rxd4 >> RX_DMA_FPORT_SHIFT) &
RX_DMA_FPORT_MASK;
/* From QDMA(5). This is a external interface case of HWNAT.
-@@ -1017,7 +1012,7 @@
+@@ -1017,7 +1012,7 @@ static int mtk_poll_rx(struct napi_struc
mac = 0;
else
mac--;
if (unlikely(mac < 0 || mac >= MTK_MAC_COUNT ||
!eth->netdev[mac]))
goto release_desc;
-@@ -2030,10 +2025,6 @@
+@@ -2030,10 +2025,6 @@ static int mtk_hw_init(struct mtk_eth *e
/* Disable RX VLan Offloading */
mtk_w32(eth, 0, MTK_CDMP_EG_CTRL);
-diff -urN a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
---- a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts 2019-12-17 14:43:47.273940258 +0800
-+++ b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts 2019-12-17 14:44:20.300945884 +0800
+--- a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
++++ b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
@@ -19,6 +19,7 @@
chosen {