From 3d62b5d5c66c47814fde74a5e50d3e0f9b1d6a84 Mon Sep 17 00:00:00 2001 From: Paul Spooren Date: Thu, 24 Jun 2021 07:42:53 -1000 Subject: [PATCH 1/3] base-files: fix /tmp/TZ when zoneinfo not installed The zoneinfo packages are not installed per default so neither /tmp/localtime nor /tmp/TZ is generated. This patch mostly reverts the previous fix and instead incooperates a solution suggested by Jo. Fixes "base-files: fix zoneinfo support " 8af62ed Signed-off-by: Paul Spooren (cherry picked from commit 56bdb6bb9781f8a0bbec5fc3075b9d2b8d12f9a8) --- package/base-files/files/etc/init.d/system | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/package/base-files/files/etc/init.d/system b/package/base-files/files/etc/init.d/system index 2290964d7e..dcfc2616c6 100755 --- a/package/base-files/files/etc/init.d/system +++ b/package/base-files/files/etc/init.d/system @@ -21,13 +21,10 @@ system_config() { echo "$hostname" > /proc/sys/kernel/hostname [ -z "$conloglevel" -a -z "$buffersize" ] || dmesg ${conloglevel:+-n $conloglevel} ${buffersize:+-s $buffersize} - rm -f /tmp/TZ - if [ -n "$zonename" ]; then - local zname=$(echo "$zonename" | tr ' ' _) - [ -f "/usr/share/zoneinfo/$zname" ] && ln -sf "/usr/share/zoneinfo/$zname" /tmp/localtime - else - echo "$timezone" > /tmp/TZ - fi + echo "$timezone" > /tmp/TZ + [ -n "$zonename" ] && [ -f "/usr/share/zoneinfo/${zonename// /_}" ] \ + && ln -sf "/usr/share/zoneinfo/${zonename// /_}" /tmp/localtime \ + && rm -f /tmp/TZ # apply timezone to kernel hwclock -u --systz From e171d11f55e335416d2ee689604998698f517e00 Mon Sep 17 00:00:00 2001 From: Georgi Valkov Date: Wed, 3 Feb 2021 09:41:54 +0200 Subject: [PATCH 2/3] libusb: Fix parsing of descriptors for multi-configuration devices Prerequisite patch: Correct a typo in the Changelog and clean up a stray file Fix changes in libusb which introduced a regression: Commit e2be556bd2 ("linux_usbfs: Parse config descriptors during device initialization") introduced a regression for devices with multiple configurations. The logic that verifies the reported length of the configuration descriptors failed to count the length of the configuration descriptor itself and would truncate the actual length by 9 bytes, leading to a parsing error for subsequent descriptors. Signed-off-by: Georgi Valkov (cherry picked from commit 4b37e3bc2b2a079c996b6d97b8d3dbbd4ba6eb62) --- package/libs/libusb/Makefile | 2 +- ...n-the-Changelog-and-clean-up-a-stray.patch | 29 +++++++++ ...parsing-of-descriptors-for-multi-con.patch | 61 +++++++++++++++++++ 3 files changed, 91 insertions(+), 1 deletion(-) create mode 100644 package/libs/libusb/patches/001-Correct-a-typo-in-the-Changelog-and-clean-up-a-stray.patch create mode 100644 package/libs/libusb/patches/002-linux_usbfs-Fix-parsing-of-descriptors-for-multi-con.patch diff --git a/package/libs/libusb/Makefile b/package/libs/libusb/Makefile index e931536339..6b80b3848d 100644 --- a/package/libs/libusb/Makefile +++ b/package/libs/libusb/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libusb PKG_VERSION:=1.0.24 -PKG_RELEASE:=1 +PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=\ diff --git a/package/libs/libusb/patches/001-Correct-a-typo-in-the-Changelog-and-clean-up-a-stray.patch b/package/libs/libusb/patches/001-Correct-a-typo-in-the-Changelog-and-clean-up-a-stray.patch new file mode 100644 index 0000000000..b17d6178d3 --- /dev/null +++ b/package/libs/libusb/patches/001-Correct-a-typo-in-the-Changelog-and-clean-up-a-stray.patch @@ -0,0 +1,29 @@ +From 369af149e3ad92514a2d24f112cedfeb7acaf558 Mon Sep 17 00:00:00 2001 +From: Chris Dickens +Date: Sun, 13 Dec 2020 15:46:27 -0800 +Subject: [PATCH] Correct a typo in the Changelog and clean up a stray file + +Signed-off-by: Chris Dickens +--- + ChangeLog | 2 +- + libusb/version_nano.h | 2 +- + test | 0 + 3 files changed, 2 insertions(+), 2 deletions(-) + delete mode 100644 test + +--- a/ChangeLog ++++ b/ChangeLog +@@ -12,7 +12,7 @@ visit: http://log.libusb.info + * Darwin (macOS): use IOUSBDevice as darwin_device_class explicitly (#693) + * Linux: Drop support for kernel older than 2.6.32 + * Linux: Provide an event thread name (#689) +-* Linux: Wait until all USBs have been reaped before freeing them (#607) ++* Linux: Wait until all URBs have been reaped before freeing them (#607) + * NetBSD: Recognize device timeouts (#710) + * OpenBSD: Allow opening ugen devices multiple times (#763) + * OpenBSD: Support libusb_get_port_number() (#764) +--- a/libusb/version_nano.h ++++ b/libusb/version_nano.h +@@ -1 +1 @@ +-#define LIBUSB_NANO 11584 ++#define LIBUSB_NANO 11585 diff --git a/package/libs/libusb/patches/002-linux_usbfs-Fix-parsing-of-descriptors-for-multi-con.patch b/package/libs/libusb/patches/002-linux_usbfs-Fix-parsing-of-descriptors-for-multi-con.patch new file mode 100644 index 0000000000..a53a8900de --- /dev/null +++ b/package/libs/libusb/patches/002-linux_usbfs-Fix-parsing-of-descriptors-for-multi-con.patch @@ -0,0 +1,61 @@ +From f6d2cb561402c3b6d3627c0eb89e009b503d9067 Mon Sep 17 00:00:00 2001 +From: Chris Dickens +Date: Sun, 13 Dec 2020 15:49:19 -0800 +Subject: [PATCH] linux_usbfs: Fix parsing of descriptors for + multi-configuration devices + +Commit e2be556bd2 ("linux_usbfs: Parse config descriptors during device +initialization") introduced a regression for devices with multiple +configurations. The logic that verifies the reported length of the +configuration descriptors failed to count the length of the +configuration descriptor itself and would truncate the actual length by +9 bytes, leading to a parsing error for subsequent descriptors. + +Closes #825 + +Signed-off-by: Chris Dickens +--- + libusb/os/linux_usbfs.c | 12 ++++++++---- + libusb/version_nano.h | 2 +- + 2 files changed, 9 insertions(+), 5 deletions(-) + +--- a/libusb/os/linux_usbfs.c ++++ b/libusb/os/linux_usbfs.c +@@ -641,7 +641,12 @@ static int seek_to_next_config(struct li + uint8_t *buffer, size_t len) + { + struct usbi_descriptor_header *header; +- int offset = 0; ++ int offset; ++ ++ /* Start seeking past the config descriptor */ ++ offset = LIBUSB_DT_CONFIG_SIZE; ++ buffer += LIBUSB_DT_CONFIG_SIZE; ++ len -= LIBUSB_DT_CONFIG_SIZE; + + while (len > 0) { + if (len < 2) { +@@ -718,7 +723,7 @@ static int parse_config_descriptors(stru + } + + if (priv->sysfs_dir) { +- /* ++ /* + * In sysfs wTotalLength is ignored, instead the kernel returns a + * config descriptor with verified bLength fields, with descriptors + * with an invalid bLength removed. +@@ -727,8 +732,7 @@ static int parse_config_descriptors(stru + int offset; + + if (num_configs > 1 && idx < num_configs - 1) { +- offset = seek_to_next_config(ctx, buffer + LIBUSB_DT_CONFIG_SIZE, +- remaining - LIBUSB_DT_CONFIG_SIZE); ++ offset = seek_to_next_config(ctx, buffer, remaining); + if (offset < 0) + return offset; + sysfs_config_len = (uint16_t)offset; +--- a/libusb/version_nano.h ++++ b/libusb/version_nano.h +@@ -1 +1 @@ +-#define LIBUSB_NANO 11585 ++#define LIBUSB_NANO 11586 From 85cef1cf221a4786fb8b1531748a5a0790101a3a Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sat, 26 Jun 2021 21:08:19 +0200 Subject: [PATCH 3/3] kernel: bump 5.4 to 5.4.128 Manually rebased bcm27xx/patches-5.4/950-0089-cgroup-Disable-cgroup-memory-by-default.patch Replaced with patch from Raspberry Pi kernel 5.10 patches mvebu/patches-5.4/002-PCI-aardvark-Don-t-rely-on-jiffies-while-holding-spi.patch Applied upstream All others updated automatically. Compile-tested on: ath79/generic, lantiq/xrx200, brcm27xx Runtime-tested on: ath79/generic, lantiq/xrx200 Signed-off-by: Hauke Mehrtens --- include/kernel-version.mk | 4 +- ...5-Load-driver-early-and-support-lega.patch | 2 +- .../950-0037-Add-dwc_otg-driver.patch | 2 +- ...42-dmaengine-Add-support-for-BCM2708.patch | 4 +- ...oup-Disable-cgroup-memory-by-default.patch | 39 +++++++++----- ...i-bcm2835-Disable-forced-software-CS.patch | 2 +- ...2835-enable-shared-interrupt-support.patch | 2 +- ...ce-quirks-for-Freeway-Airmouse-T3-an.patch | 4 +- ...ASH-Fix-spi-driver-compiler-warnings.patch | 2 +- ...-inbound-resource-parsing-to-helpers.patch | 2 +- ...CS_HIGH-if-GPIO-descriptors-are-used.patch | 4 +- ..._descriptor-fixup-moved-to-spi_setup.patch | 2 +- ...te-SPI_CS_HIGH-warning-to-KERN_DEBUG.patch | 2 +- ...ASH-Fix-spi-driver-compiler-warnings.patch | 2 +- ...i-bcm2835-Disable-forced-software-CS.patch | 2 +- ...rop-unused-variable-tin_quantum_prio.patch | 16 +++--- target/linux/generic/config-5.4 | 1 + .../generic/hack-5.4/221-module_exports.patch | 2 +- ...ng-with-source-address-failed-policy.patch | 18 +++---- .../0002-dmaengine-Add-ADM-driver.patch | 2 +- ...aa2-qdma-Add-NXP-dpaa2-qDMA-controll.patch | 2 +- ...-fsl-edma-v3-add-fsl-edma-v3-support.patch | 2 +- ...-0026-dma-caam-add-dma-memcpy-driver.patch | 4 +- ...5-usb-dwc3-add-otg-properties-update.patch | 2 +- ...e-print-suggested-message-if-failed-.patch | 2 +- ...-spi-make-spi-max-frequency-optional.patch | 2 +- ...t-for-endpoint-to-be-ready-before-tr.patch | 2 +- ...-t-rely-on-jiffies-while-holding-spi.patch | 54 ------------------- ...7-PCI-aardvark-Improve-link-training.patch | 2 +- ...18-PCI-aardvark-Issue-PERST-via-GPIO.patch | 2 +- .../019-PCI-aardvark-Add-PHY-support.patch | 4 +- ...-initialization-with-old-Marvell-s-A.patch | 2 +- ...r-Gateworks-PLX-PEX860x-switch-with-.patch | 2 +- 33 files changed, 79 insertions(+), 117 deletions(-) delete mode 100644 target/linux/mvebu/patches-5.4/002-PCI-aardvark-Don-t-rely-on-jiffies-while-holding-spi.patch diff --git a/include/kernel-version.mk b/include/kernel-version.mk index c496c500d3..8835604d6d 100644 --- a/include/kernel-version.mk +++ b/include/kernel-version.mk @@ -6,9 +6,9 @@ ifdef CONFIG_TESTING_KERNEL KERNEL_PATCHVER:=$(KERNEL_TESTING_PATCHVER) endif -LINUX_VERSION-5.4 = .124 +LINUX_VERSION-5.4 = .128 -LINUX_KERNEL_HASH-5.4.124 = f7f29dda2b042d7b5986d18274413131cf70e17288c05e9a683df1f46c507d82 +LINUX_KERNEL_HASH-5.4.128 = 3b54aebb816b9e628cb9ba3055a6aca58ce0ddeec49366c0da86ced9a7be39ab remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1)))) sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1))))))) diff --git a/target/linux/bcm27xx/patches-5.4/950-0012-dmaengine-bcm2835-Load-driver-early-and-support-lega.patch b/target/linux/bcm27xx/patches-5.4/950-0012-dmaengine-bcm2835-Load-driver-early-and-support-lega.patch index 489e5d11ac..8e59b9b24e 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0012-dmaengine-bcm2835-Load-driver-early-and-support-lega.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0012-dmaengine-bcm2835-Load-driver-early-and-support-lega.patch @@ -20,7 +20,7 @@ Signed-off-by: Noralf Trønnes --- a/drivers/dma/Kconfig +++ b/drivers/dma/Kconfig -@@ -133,7 +133,7 @@ config COH901318 +@@ -134,7 +134,7 @@ config COH901318 config DMA_BCM2835 tristate "BCM2835 DMA engine support" diff --git a/target/linux/bcm27xx/patches-5.4/950-0037-Add-dwc_otg-driver.patch b/target/linux/bcm27xx/patches-5.4/950-0037-Add-dwc_otg-driver.patch index 5b7f773b0b..9280ab3f17 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0037-Add-dwc_otg-driver.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0037-Add-dwc_otg-driver.patch @@ -1040,7 +1040,7 @@ Signed-off-by: Jonathan Bell } --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c -@@ -5319,7 +5319,7 @@ static void port_event(struct usb_hub *h +@@ -5321,7 +5321,7 @@ static void port_event(struct usb_hub *h port_dev->over_current_count++; port_over_current_notify(port_dev); diff --git a/target/linux/bcm27xx/patches-5.4/950-0042-dmaengine-Add-support-for-BCM2708.patch b/target/linux/bcm27xx/patches-5.4/950-0042-dmaengine-Add-support-for-BCM2708.patch index 496c3aae07..f66a4f251a 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0042-dmaengine-Add-support-for-BCM2708.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0042-dmaengine-Add-support-for-BCM2708.patch @@ -178,7 +178,7 @@ Signed-off-by: Andrei Gherzan --- a/drivers/dma/Kconfig +++ b/drivers/dma/Kconfig -@@ -133,7 +133,7 @@ config COH901318 +@@ -134,7 +134,7 @@ config COH901318 config DMA_BCM2835 tristate "BCM2835 DMA engine support" @@ -187,7 +187,7 @@ Signed-off-by: Andrei Gherzan select DMA_ENGINE select DMA_VIRTUAL_CHANNELS -@@ -608,6 +608,10 @@ config UNIPHIER_MDMAC +@@ -609,6 +609,10 @@ config UNIPHIER_MDMAC UniPhier platform. This DMA controller is used as the external DMA engine of the SD/eMMC controllers of the LD4, Pro4, sLD8 SoCs. diff --git a/target/linux/bcm27xx/patches-5.4/950-0089-cgroup-Disable-cgroup-memory-by-default.patch b/target/linux/bcm27xx/patches-5.4/950-0089-cgroup-Disable-cgroup-memory-by-default.patch index 86f60e7052..d4818b2239 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0089-cgroup-Disable-cgroup-memory-by-default.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0089-cgroup-Disable-cgroup-memory-by-default.patch @@ -1,4 +1,4 @@ -From 0f95a2f2688ff44dc7080beaa2076741a0bdf510 Mon Sep 17 00:00:00 2001 +From 2b13c54592135b6fab269517ed687fa9f80bf8e5 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 27 Nov 2017 17:14:54 +0000 Subject: [PATCH] cgroup: Disable cgroup "memory" by default @@ -12,34 +12,46 @@ See: https://github.com/raspberrypi/linux/issues/1950 Signed-off-by: Phil Elwell --- - kernel/cgroup/cgroup.c | 30 ++++++++++++++++++++++++++++++ - 1 file changed, 30 insertions(+) + kernel/cgroup/cgroup.c | 38 ++++++++++++++++++++++++++++++++++++++ + 1 file changed, 38 insertions(+) --- a/kernel/cgroup/cgroup.c +++ b/kernel/cgroup/cgroup.c -@@ -5722,6 +5722,8 @@ int __init cgroup_init_early(void) +@@ -5721,6 +5721,9 @@ int __init cgroup_init_early(void) + return 0; } - static u16 cgroup_disable_mask __initdata; +static u16 cgroup_enable_mask __initdata; +static int __init cgroup_disable(char *str); - ++ /** * cgroup_init - cgroup initialization -@@ -5761,6 +5763,12 @@ int __init cgroup_init(void) + * +@@ -5759,6 +5762,12 @@ int __init cgroup_init(void) mutex_unlock(&cgroup_mutex); -+ /* Apply an implicit disable... */ ++ /* ++ * Apply an implicit disable, knowing that an explicit enable will ++ * prevent if from doing anything. ++ */ + cgroup_disable("memory"); -+ -+ /* ...knowing that an explicit enable will override it. */ -+ cgroup_disable_mask &= ~cgroup_enable_mask; + for_each_subsys(ss, ssid) { if (ss->early_init) { struct cgroup_subsys_state *css = -@@ -6180,6 +6188,28 @@ static int __init cgroup_disable(char *s +@@ -6168,6 +6177,10 @@ static int __init cgroup_disable(char *s + strcmp(token, ss->legacy_name)) + continue; + ++ /* An explicit cgroup_enable overrides a disable */ ++ if (cgroup_enable_mask & (1 << i)) ++ continue; ++ + static_branch_disable(cgroup_subsys_enabled_key[i]); + pr_info("Disabling %s control group subsystem\n", + ss->name); +@@ -6177,6 +6190,31 @@ static int __init cgroup_disable(char *s } __setup("cgroup_disable=", cgroup_disable); @@ -59,6 +71,9 @@ Signed-off-by: Phil Elwell + continue; + + cgroup_enable_mask |= 1 << i; ++ static_branch_enable(cgroup_subsys_enabled_key[i]); ++ pr_info("Enabling %s control group subsystem\n", ++ ss->name); + } + } + return 1; diff --git a/target/linux/bcm27xx/patches-5.4/950-0134-spi-spi-bcm2835-Disable-forced-software-CS.patch b/target/linux/bcm27xx/patches-5.4/950-0134-spi-spi-bcm2835-Disable-forced-software-CS.patch index 0abe5059c0..cfb46d8791 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0134-spi-spi-bcm2835-Disable-forced-software-CS.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0134-spi-spi-bcm2835-Disable-forced-software-CS.patch @@ -13,7 +13,7 @@ Signed-off-by: Phil Elwell --- a/drivers/spi/spi-bcm2835.c +++ b/drivers/spi/spi-bcm2835.c -@@ -1230,31 +1230,6 @@ static int bcm2835_spi_setup(struct spi_ +@@ -1236,31 +1236,6 @@ static int bcm2835_spi_setup(struct spi_ return -EINVAL; } diff --git a/target/linux/bcm27xx/patches-5.4/950-0212-spi-bcm2835-enable-shared-interrupt-support.patch b/target/linux/bcm27xx/patches-5.4/950-0212-spi-bcm2835-enable-shared-interrupt-support.patch index f82ae7d9f6..5326934b71 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0212-spi-bcm2835-enable-shared-interrupt-support.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0212-spi-bcm2835-enable-shared-interrupt-support.patch @@ -23,7 +23,7 @@ Signed-off-by: Martin Sperl /* Read as many bytes as possible from FIFO */ bcm2835_rd_fifo(bs); /* Write as many bytes as possible to FIFO */ -@@ -1281,7 +1285,8 @@ static int bcm2835_spi_probe(struct plat +@@ -1287,7 +1291,8 @@ static int bcm2835_spi_probe(struct plat bcm2835_wr(bs, BCM2835_SPI_CS, BCM2835_SPI_CS_CLEAR_RX | BCM2835_SPI_CS_CLEAR_TX); diff --git a/target/linux/bcm27xx/patches-5.4/950-0280-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch b/target/linux/bcm27xx/patches-5.4/950-0280-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch index e486942ffd..c5e7d5e842 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0280-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0280-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch @@ -33,7 +33,7 @@ Signed-off-by: Jonathan Bell #define USB_VENDOR_ID_BELKIN 0x050d #define USB_DEVICE_ID_FLIP_KVM 0x3201 -@@ -1259,6 +1262,9 @@ +@@ -1261,6 +1264,9 @@ #define USB_VENDOR_ID_XAT 0x2505 #define USB_DEVICE_ID_XAT_CSR 0x0220 @@ -53,7 +53,7 @@ Signed-off-by: Jonathan Bell { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_MULTI_TOUCH), HID_QUIRK_MULTI_INPUT }, { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_PIXART_USB_OPTICAL_MOUSE), HID_QUIRK_ALWAYS_POLL }, { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_PIXART_USB_OPTICAL_MOUSE2), HID_QUIRK_ALWAYS_POLL }, -@@ -190,6 +191,7 @@ static const struct hid_device_id hid_qu +@@ -192,6 +193,7 @@ static const struct hid_device_id hid_qu { 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_XIN_MO, USB_DEVICE_ID_XIN_MO_DUAL_ARCADE), HID_QUIRK_MULTI_INPUT }, diff --git a/target/linux/bcm27xx/patches-5.4/950-0409-SQUASH-Fix-spi-driver-compiler-warnings.patch b/target/linux/bcm27xx/patches-5.4/950-0409-SQUASH-Fix-spi-driver-compiler-warnings.patch index 4413439101..742dbad712 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0409-SQUASH-Fix-spi-driver-compiler-warnings.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0409-SQUASH-Fix-spi-driver-compiler-warnings.patch @@ -19,4 +19,4 @@ Signed-off-by: Phil Elwell - struct gpio_chip *chip; u32 cs; - /* + if (spi->chip_select >= BCM2835_SPI_NUM_CS) { diff --git a/target/linux/bcm27xx/patches-5.4/950-0441-PCI-of-Add-inbound-resource-parsing-to-helpers.patch b/target/linux/bcm27xx/patches-5.4/950-0441-PCI-of-Add-inbound-resource-parsing-to-helpers.patch index 422dea1b31..6e04d425bf 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0441-PCI-of-Add-inbound-resource-parsing-to-helpers.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0441-PCI-of-Add-inbound-resource-parsing-to-helpers.patch @@ -82,7 +82,7 @@ Cc: linux-rockchip@lists.infradead.org --- a/drivers/pci/controller/pci-aardvark.c +++ b/drivers/pci/controller/pci-aardvark.c -@@ -1018,7 +1018,8 @@ static int advk_pcie_probe(struct platfo +@@ -1049,7 +1049,8 @@ static int advk_pcie_probe(struct platfo return ret; } diff --git a/target/linux/bcm27xx/patches-5.4/950-0646-spi-Force-CS_HIGH-if-GPIO-descriptors-are-used.patch b/target/linux/bcm27xx/patches-5.4/950-0646-spi-Force-CS_HIGH-if-GPIO-descriptors-are-used.patch index 6ee6a275c3..05fa9f8f2e 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0646-spi-Force-CS_HIGH-if-GPIO-descriptors-are-used.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0646-spi-Force-CS_HIGH-if-GPIO-descriptors-are-used.patch @@ -23,7 +23,7 @@ Signed-off-by: Phil Elwell --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c -@@ -3110,6 +3110,7 @@ static int __spi_validate_bits_per_word( +@@ -3116,6 +3116,7 @@ static int __spi_validate_bits_per_word( */ int spi_setup(struct spi_device *spi) { @@ -31,7 +31,7 @@ Signed-off-by: Phil Elwell unsigned bad_bits, ugly_bits; int status; -@@ -3127,6 +3128,14 @@ int spi_setup(struct spi_device *spi) +@@ -3133,6 +3134,14 @@ int spi_setup(struct spi_device *spi) (SPI_TX_DUAL | SPI_TX_QUAD | SPI_TX_OCTAL | SPI_RX_DUAL | SPI_RX_QUAD | SPI_RX_OCTAL))) return -EINVAL; diff --git a/target/linux/bcm27xx/patches-5.4/950-0665-spi-use_gpio_descriptor-fixup-moved-to-spi_setup.patch b/target/linux/bcm27xx/patches-5.4/950-0665-spi-use_gpio_descriptor-fixup-moved-to-spi_setup.patch index 8792faa0c9..402635d838 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0665-spi-use_gpio_descriptor-fixup-moved-to-spi_setup.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0665-spi-use_gpio_descriptor-fixup-moved-to-spi_setup.patch @@ -37,7 +37,7 @@ Signed-off-by: Phil Elwell --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c -@@ -1793,15 +1793,6 @@ static int of_spi_parse_dt(struct spi_co +@@ -1799,15 +1799,6 @@ static int of_spi_parse_dt(struct spi_co } spi->chip_select = value; diff --git a/target/linux/bcm27xx/patches-5.4/950-0690-SQUASH-spi-Demote-SPI_CS_HIGH-warning-to-KERN_DEBUG.patch b/target/linux/bcm27xx/patches-5.4/950-0690-SQUASH-spi-Demote-SPI_CS_HIGH-warning-to-KERN_DEBUG.patch index fee107876a..b821afb08b 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0690-SQUASH-spi-Demote-SPI_CS_HIGH-warning-to-KERN_DEBUG.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0690-SQUASH-spi-Demote-SPI_CS_HIGH-warning-to-KERN_DEBUG.patch @@ -15,7 +15,7 @@ Signed-off-by: Phil Elwell --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c -@@ -3122,8 +3122,8 @@ int spi_setup(struct spi_device *spi) +@@ -3128,8 +3128,8 @@ int spi_setup(struct spi_device *spi) if (ctlr->use_gpio_descriptors && ctlr->cs_gpiods && ctlr->cs_gpiods[spi->chip_select] && !(spi->mode & SPI_CS_HIGH)) { diff --git a/target/linux/bcm27xx/patches-5.4/950-0788-Revert-SQUASH-Fix-spi-driver-compiler-warnings.patch b/target/linux/bcm27xx/patches-5.4/950-0788-Revert-SQUASH-Fix-spi-driver-compiler-warnings.patch index 437e5aba59..fad57b4863 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0788-Revert-SQUASH-Fix-spi-driver-compiler-warnings.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0788-Revert-SQUASH-Fix-spi-driver-compiler-warnings.patch @@ -20,4 +20,4 @@ See: https://github.com/raspberrypi/linux/pull/3687 + enum gpio_lookup_flags lflags; u32 cs; - /* + if (spi->chip_select >= BCM2835_SPI_NUM_CS) { diff --git a/target/linux/bcm27xx/patches-5.4/950-0789-Revert-spi-spi-bcm2835-Disable-forced-software-CS.patch b/target/linux/bcm27xx/patches-5.4/950-0789-Revert-spi-spi-bcm2835-Disable-forced-software-CS.patch index 1479335217..ac0684be86 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0789-Revert-spi-spi-bcm2835-Disable-forced-software-CS.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0789-Revert-spi-spi-bcm2835-Disable-forced-software-CS.patch @@ -13,7 +13,7 @@ See: https://github.com/raspberrypi/linux/pull/3687 --- a/drivers/spi/spi-bcm2835.c +++ b/drivers/spi/spi-bcm2835.c -@@ -1235,6 +1235,43 @@ static int bcm2835_spi_setup(struct spi_ +@@ -1241,6 +1241,43 @@ static int bcm2835_spi_setup(struct spi_ return -EINVAL; } diff --git a/target/linux/generic/backport-5.4/393-v5.5-sch_cake-drop-unused-variable-tin_quantum_prio.patch b/target/linux/generic/backport-5.4/393-v5.5-sch_cake-drop-unused-variable-tin_quantum_prio.patch index 8f6406c290..6c9e8ad5ee 100644 --- a/target/linux/generic/backport-5.4/393-v5.5-sch_cake-drop-unused-variable-tin_quantum_prio.patch +++ b/target/linux/generic/backport-5.4/393-v5.5-sch_cake-drop-unused-variable-tin_quantum_prio.patch @@ -32,7 +32,7 @@ Signed-off-by: David S. Miller s32 tin_deficit; u32 tin_backlog; u32 tin_dropped; -@@ -1943,7 +1942,7 @@ begin: +@@ -1947,7 +1946,7 @@ begin: while (b->tin_deficit < 0 || !(b->sparse_flow_count + b->bulk_flow_count)) { if (b->tin_deficit <= 0) @@ -41,7 +41,7 @@ Signed-off-by: David S. Miller if (b->sparse_flow_count + b->bulk_flow_count) empty = false; -@@ -2265,8 +2264,7 @@ static int cake_config_besteffort(struct +@@ -2269,8 +2268,7 @@ static int cake_config_besteffort(struct cake_set_rate(b, rate, mtu, us_to_ns(q->target), us_to_ns(q->interval)); @@ -51,7 +51,7 @@ Signed-off-by: David S. Miller return 0; } -@@ -2277,8 +2275,7 @@ static int cake_config_precedence(struct +@@ -2281,8 +2279,7 @@ static int cake_config_precedence(struct struct cake_sched_data *q = qdisc_priv(sch); u32 mtu = psched_mtu(qdisc_dev(sch)); u64 rate = q->rate_bps; @@ -61,7 +61,7 @@ Signed-off-by: David S. Miller u32 i; q->tin_cnt = 8; -@@ -2291,18 +2288,14 @@ static int cake_config_precedence(struct +@@ -2295,18 +2292,14 @@ static int cake_config_precedence(struct cake_set_rate(b, rate, mtu, us_to_ns(q->target), us_to_ns(q->interval)); @@ -83,7 +83,7 @@ Signed-off-by: David S. Miller } return 0; -@@ -2371,8 +2364,7 @@ static int cake_config_diffserv8(struct +@@ -2375,8 +2368,7 @@ static int cake_config_diffserv8(struct struct cake_sched_data *q = qdisc_priv(sch); u32 mtu = psched_mtu(qdisc_dev(sch)); u64 rate = q->rate_bps; @@ -93,7 +93,7 @@ Signed-off-by: David S. Miller u32 i; q->tin_cnt = 8; -@@ -2388,18 +2380,14 @@ static int cake_config_diffserv8(struct +@@ -2392,18 +2384,14 @@ static int cake_config_diffserv8(struct cake_set_rate(b, rate, mtu, us_to_ns(q->target), us_to_ns(q->interval)); @@ -115,7 +115,7 @@ Signed-off-by: David S. Miller } return 0; -@@ -2438,17 +2426,11 @@ static int cake_config_diffserv4(struct +@@ -2442,17 +2430,11 @@ static int cake_config_diffserv4(struct cake_set_rate(&q->tins[3], rate >> 2, mtu, us_to_ns(q->target), us_to_ns(q->interval)); @@ -137,7 +137,7 @@ Signed-off-by: David S. Miller return 0; } -@@ -2479,15 +2461,10 @@ static int cake_config_diffserv3(struct +@@ -2483,15 +2465,10 @@ static int cake_config_diffserv3(struct cake_set_rate(&q->tins[2], rate >> 2, mtu, us_to_ns(q->target), us_to_ns(q->interval)); diff --git a/target/linux/generic/config-5.4 b/target/linux/generic/config-5.4 index 91dc0b0f49..df49bdb2c2 100644 --- a/target/linux/generic/config-5.4 +++ b/target/linux/generic/config-5.4 @@ -3822,6 +3822,7 @@ CONFIG_NMI_LOG_BUF_SHIFT=13 # CONFIG_NVMEM_SYSFS is not set # CONFIG_NVME_FC is not set # CONFIG_NVME_TARGET is not set +# CONFIG_NVME_TCP is not set # CONFIG_NVRAM is not set # CONFIG_NV_TCO is not set # CONFIG_NXP_STB220 is not set diff --git a/target/linux/generic/hack-5.4/221-module_exports.patch b/target/linux/generic/hack-5.4/221-module_exports.patch index 09855b04d1..ef6e980892 100644 --- a/target/linux/generic/hack-5.4/221-module_exports.patch +++ b/target/linux/generic/hack-5.4/221-module_exports.patch @@ -56,7 +56,7 @@ Signed-off-by: Felix Fietkau } \ \ /* __*init sections */ \ -@@ -903,6 +913,8 @@ +@@ -904,6 +914,8 @@ EXIT_TEXT \ EXIT_DATA \ EXIT_CALL \ diff --git a/target/linux/generic/pending-5.4/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch b/target/linux/generic/pending-5.4/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch index 90f4199eab..283fc0ae4f 100644 --- a/target/linux/generic/pending-5.4/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch +++ b/target/linux/generic/pending-5.4/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch @@ -157,7 +157,7 @@ Signed-off-by: Jonas Gorski case RTN_THROW: case RTN_UNREACHABLE: default: -@@ -4419,6 +4438,17 @@ static int ip6_pkt_prohibit_out(struct n +@@ -4423,6 +4442,17 @@ static int ip6_pkt_prohibit_out(struct n return ip6_pkt_drop(skb, ICMPV6_ADM_PROHIBITED, IPSTATS_MIB_OUTNOROUTES); } @@ -175,7 +175,7 @@ Signed-off-by: Jonas Gorski /* * Allocate a dst for local (unicast / anycast) address. */ -@@ -4899,7 +4929,8 @@ static int rtm_to_fib6_config(struct sk_ +@@ -4903,7 +4933,8 @@ static int rtm_to_fib6_config(struct sk_ if (rtm->rtm_type == RTN_UNREACHABLE || rtm->rtm_type == RTN_BLACKHOLE || rtm->rtm_type == RTN_PROHIBIT || @@ -185,7 +185,7 @@ Signed-off-by: Jonas Gorski cfg->fc_flags |= RTF_REJECT; if (rtm->rtm_type == RTN_LOCAL) -@@ -6021,6 +6052,8 @@ static int ip6_route_dev_notify(struct n +@@ -6025,6 +6056,8 @@ static int ip6_route_dev_notify(struct n #ifdef CONFIG_IPV6_MULTIPLE_TABLES net->ipv6.ip6_prohibit_entry->dst.dev = dev; net->ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(dev); @@ -194,7 +194,7 @@ Signed-off-by: Jonas Gorski net->ipv6.ip6_blk_hole_entry->dst.dev = dev; net->ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(dev); #endif -@@ -6032,6 +6065,7 @@ static int ip6_route_dev_notify(struct n +@@ -6036,6 +6069,7 @@ static int ip6_route_dev_notify(struct n in6_dev_put_clear(&net->ipv6.ip6_null_entry->rt6i_idev); #ifdef CONFIG_IPV6_MULTIPLE_TABLES in6_dev_put_clear(&net->ipv6.ip6_prohibit_entry->rt6i_idev); @@ -202,7 +202,7 @@ Signed-off-by: Jonas Gorski in6_dev_put_clear(&net->ipv6.ip6_blk_hole_entry->rt6i_idev); #endif } -@@ -6224,6 +6258,8 @@ static int __net_init ip6_route_net_init +@@ -6228,6 +6262,8 @@ static int __net_init ip6_route_net_init #ifdef CONFIG_IPV6_MULTIPLE_TABLES net->ipv6.fib6_has_custom_rules = false; @@ -211,7 +211,7 @@ Signed-off-by: Jonas Gorski net->ipv6.ip6_prohibit_entry = kmemdup(&ip6_prohibit_entry_template, sizeof(*net->ipv6.ip6_prohibit_entry), GFP_KERNEL); -@@ -6234,11 +6270,21 @@ static int __net_init ip6_route_net_init +@@ -6238,11 +6274,21 @@ static int __net_init ip6_route_net_init ip6_template_metrics, true); INIT_LIST_HEAD(&net->ipv6.ip6_prohibit_entry->rt6i_uncached); @@ -234,7 +234,7 @@ Signed-off-by: Jonas Gorski net->ipv6.ip6_blk_hole_entry->dst.ops = &net->ipv6.ip6_dst_ops; dst_init_metrics(&net->ipv6.ip6_blk_hole_entry->dst, ip6_template_metrics, true); -@@ -6262,6 +6308,8 @@ out: +@@ -6266,6 +6312,8 @@ out: return ret; #ifdef CONFIG_IPV6_MULTIPLE_TABLES @@ -243,7 +243,7 @@ Signed-off-by: Jonas Gorski out_ip6_prohibit_entry: kfree(net->ipv6.ip6_prohibit_entry); out_ip6_null_entry: -@@ -6281,6 +6329,7 @@ static void __net_exit ip6_route_net_exi +@@ -6285,6 +6333,7 @@ static void __net_exit ip6_route_net_exi kfree(net->ipv6.ip6_null_entry); #ifdef CONFIG_IPV6_MULTIPLE_TABLES kfree(net->ipv6.ip6_prohibit_entry); @@ -251,7 +251,7 @@ Signed-off-by: Jonas Gorski kfree(net->ipv6.ip6_blk_hole_entry); #endif dst_entries_destroy(&net->ipv6.ip6_dst_ops); -@@ -6358,6 +6407,9 @@ void __init ip6_route_init_special_entri +@@ -6362,6 +6411,9 @@ void __init ip6_route_init_special_entri init_net.ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev); init_net.ipv6.ip6_blk_hole_entry->dst.dev = init_net.loopback_dev; init_net.ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev); diff --git a/target/linux/ipq806x/patches-5.4/0002-dmaengine-Add-ADM-driver.patch b/target/linux/ipq806x/patches-5.4/0002-dmaengine-Add-ADM-driver.patch index aa7d2e791e..7aa46526f2 100644 --- a/target/linux/ipq806x/patches-5.4/0002-dmaengine-Add-ADM-driver.patch +++ b/target/linux/ipq806x/patches-5.4/0002-dmaengine-Add-ADM-driver.patch @@ -26,7 +26,7 @@ Signed-off-by: Thomas Pedersen --- a/drivers/dma/qcom/Kconfig +++ b/drivers/dma/qcom/Kconfig -@@ -28,3 +28,13 @@ config QCOM_HIDMA +@@ -29,3 +29,13 @@ config QCOM_HIDMA (user to kernel, kernel to kernel, etc.). It only supports memcpy interface. The core is not intended for general purpose slave DMA. diff --git a/target/linux/layerscape/patches-5.4/806-dma-0002-dmaengine-fsl-dpaa2-qdma-Add-NXP-dpaa2-qDMA-controll.patch b/target/linux/layerscape/patches-5.4/806-dma-0002-dmaengine-fsl-dpaa2-qdma-Add-NXP-dpaa2-qDMA-controll.patch index 897752d871..72d234d3ef 100644 --- a/target/linux/layerscape/patches-5.4/806-dma-0002-dmaengine-fsl-dpaa2-qdma-Add-NXP-dpaa2-qDMA-controll.patch +++ b/target/linux/layerscape/patches-5.4/806-dma-0002-dmaengine-fsl-dpaa2-qdma-Add-NXP-dpaa2-qDMA-controll.patch @@ -38,7 +38,7 @@ Signed-off-by: Peng Ma --- a/drivers/dma/Kconfig +++ b/drivers/dma/Kconfig -@@ -669,6 +669,8 @@ source "drivers/dma/sh/Kconfig" +@@ -670,6 +670,8 @@ source "drivers/dma/sh/Kconfig" source "drivers/dma/ti/Kconfig" diff --git a/target/linux/layerscape/patches-5.4/806-dma-0003-MLK-14610-DMA-fsl-edma-v3-add-fsl-edma-v3-support.patch b/target/linux/layerscape/patches-5.4/806-dma-0003-MLK-14610-DMA-fsl-edma-v3-add-fsl-edma-v3-support.patch index 1744d37419..780d3c89e2 100644 --- a/target/linux/layerscape/patches-5.4/806-dma-0003-MLK-14610-DMA-fsl-edma-v3-add-fsl-edma-v3-support.patch +++ b/target/linux/layerscape/patches-5.4/806-dma-0003-MLK-14610-DMA-fsl-edma-v3-add-fsl-edma-v3-support.patch @@ -85,7 +85,7 @@ Signed-off-by: Robin Gong +}; --- a/drivers/dma/Kconfig +++ b/drivers/dma/Kconfig -@@ -227,6 +227,17 @@ config FSL_QDMA +@@ -228,6 +228,17 @@ config FSL_QDMA or dequeuing DMA jobs from, different work queues. This module can be found on NXP Layerscape SoCs. The qdma driver only work on SoCs with a DPAA hardware block. diff --git a/target/linux/layerscape/patches-5.4/806-dma-0026-dma-caam-add-dma-memcpy-driver.patch b/target/linux/layerscape/patches-5.4/806-dma-0026-dma-caam-add-dma-memcpy-driver.patch index 073842eb13..be5ae1ad13 100644 --- a/target/linux/layerscape/patches-5.4/806-dma-0026-dma-caam-add-dma-memcpy-driver.patch +++ b/target/linux/layerscape/patches-5.4/806-dma-0026-dma-caam-add-dma-memcpy-driver.patch @@ -28,7 +28,7 @@ Signed-off-by: Yangbo Lu --- a/drivers/dma/Kconfig +++ b/drivers/dma/Kconfig -@@ -131,6 +131,24 @@ config COH901318 +@@ -132,6 +132,24 @@ config COH901318 help Enable support for ST-Ericsson COH 901 318 DMA. @@ -53,7 +53,7 @@ Signed-off-by: Yangbo Lu config DMA_BCM2835 tristate "BCM2835 DMA engine support" depends on ARCH_BCM2835 -@@ -662,7 +680,6 @@ config ZX_DMA +@@ -663,7 +681,6 @@ config ZX_DMA help Support the DMA engine for ZTE ZX family platform devices. diff --git a/target/linux/layerscape/patches-5.4/820-usb-0005-usb-dwc3-add-otg-properties-update.patch b/target/linux/layerscape/patches-5.4/820-usb-0005-usb-dwc3-add-otg-properties-update.patch index e3d18a9948..ccefbffd48 100644 --- a/target/linux/layerscape/patches-5.4/820-usb-0005-usb-dwc3-add-otg-properties-update.patch +++ b/target/linux/layerscape/patches-5.4/820-usb-0005-usb-dwc3-add-otg-properties-update.patch @@ -54,7 +54,7 @@ Signed-off-by: Peter Chen * All 3.1 IP version constants are greater than the 3.0 IP --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c -@@ -3575,6 +3575,10 @@ int dwc3_gadget_init(struct dwc3 *dwc) +@@ -3578,6 +3578,10 @@ int dwc3_gadget_init(struct dwc3 *dwc) dwc->gadget.sg_supported = true; dwc->gadget.name = "dwc3-gadget"; dwc->gadget.lpm_capable = true; diff --git a/target/linux/layerscape/patches-5.4/820-usb-0019-MLK-9829-usb-core-print-suggested-message-if-failed-.patch b/target/linux/layerscape/patches-5.4/820-usb-0019-MLK-9829-usb-core-print-suggested-message-if-failed-.patch index ff582f3ace..e444af408a 100644 --- a/target/linux/layerscape/patches-5.4/820-usb-0019-MLK-9829-usb-core-print-suggested-message-if-failed-.patch +++ b/target/linux/layerscape/patches-5.4/820-usb-0019-MLK-9829-usb-core-print-suggested-message-if-failed-.patch @@ -20,7 +20,7 @@ Signed-off-by: Li Jun --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c -@@ -4729,7 +4729,8 @@ hub_port_init(struct usb_hub *hub, struc +@@ -4731,7 +4731,8 @@ hub_port_init(struct usb_hub *hub, struc } if (r) { if (r != -ENODEV) diff --git a/target/linux/mediatek/patches-5.4/0001-v5.7-spi-make-spi-max-frequency-optional.patch b/target/linux/mediatek/patches-5.4/0001-v5.7-spi-make-spi-max-frequency-optional.patch index 8487c3dda0..79ce15c37b 100644 --- a/target/linux/mediatek/patches-5.4/0001-v5.7-spi-make-spi-max-frequency-optional.patch +++ b/target/linux/mediatek/patches-5.4/0001-v5.7-spi-make-spi-max-frequency-optional.patch @@ -20,7 +20,7 @@ Signed-off-by: Mark Brown --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c -@@ -1803,13 +1803,8 @@ static int of_spi_parse_dt(struct spi_co +@@ -1809,13 +1809,8 @@ static int of_spi_parse_dt(struct spi_co spi->mode |= SPI_CS_HIGH; /* Device speed */ diff --git a/target/linux/mvebu/patches-5.4/001-PCI-aardvark-Wait-for-endpoint-to-be-ready-before-tr.patch b/target/linux/mvebu/patches-5.4/001-PCI-aardvark-Wait-for-endpoint-to-be-ready-before-tr.patch index 95abbce002..2df3306157 100644 --- a/target/linux/mvebu/patches-5.4/001-PCI-aardvark-Wait-for-endpoint-to-be-ready-before-tr.patch +++ b/target/linux/mvebu/patches-5.4/001-PCI-aardvark-Wait-for-endpoint-to-be-ready-before-tr.patch @@ -33,7 +33,7 @@ Acked-by: Thomas Petazzoni --- a/drivers/pci/controller/pci-aardvark.c +++ b/drivers/pci/controller/pci-aardvark.c -@@ -337,6 +337,14 @@ static void advk_pcie_setup_hw(struct ad +@@ -338,6 +338,14 @@ static void advk_pcie_setup_hw(struct ad reg |= PIO_CTRL_ADDR_WIN_DISABLE; advk_writel(pcie, reg, PIO_CTRL); diff --git a/target/linux/mvebu/patches-5.4/002-PCI-aardvark-Don-t-rely-on-jiffies-while-holding-spi.patch b/target/linux/mvebu/patches-5.4/002-PCI-aardvark-Don-t-rely-on-jiffies-while-holding-spi.patch deleted file mode 100644 index db4afd22a2..0000000000 --- a/target/linux/mvebu/patches-5.4/002-PCI-aardvark-Don-t-rely-on-jiffies-while-holding-spi.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 7fbcb5da811be7d47468417c7795405058abb3da Mon Sep 17 00:00:00 2001 -From: Remi Pommarel -Date: Fri, 27 Sep 2019 10:55:02 +0200 -Subject: [PATCH] PCI: aardvark: Don't rely on jiffies while holding spinlock - -advk_pcie_wait_pio() can be called while holding a spinlock (from -pci_bus_read_config_dword()), then depends on jiffies in order to -timeout while polling on PIO state registers. In the case the PIO -transaction failed, the timeout will never happen and will also cause -the cpu to stall. - -This decrements a variable and wait instead of using jiffies. - -Signed-off-by: Remi Pommarel -Signed-off-by: Lorenzo Pieralisi -Reviewed-by: Andrew Murray -Acked-by: Thomas Petazzoni ---- - drivers/pci/controller/pci-aardvark.c | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - ---- a/drivers/pci/controller/pci-aardvark.c -+++ b/drivers/pci/controller/pci-aardvark.c -@@ -175,7 +175,8 @@ - (PCIE_CONF_BUS(bus) | PCIE_CONF_DEV(PCI_SLOT(devfn)) | \ - PCIE_CONF_FUNC(PCI_FUNC(devfn)) | PCIE_CONF_REG(where)) - --#define PIO_TIMEOUT_MS 1 -+#define PIO_RETRY_CNT 500 -+#define PIO_RETRY_DELAY 2 /* 2 us*/ - - #define LINK_WAIT_MAX_RETRIES 10 - #define LINK_WAIT_USLEEP_MIN 90000 -@@ -400,17 +401,16 @@ static void advk_pcie_check_pio_status(s - static int advk_pcie_wait_pio(struct advk_pcie *pcie) - { - struct device *dev = &pcie->pdev->dev; -- unsigned long timeout; -+ int i; - -- timeout = jiffies + msecs_to_jiffies(PIO_TIMEOUT_MS); -- -- while (time_before(jiffies, timeout)) { -+ for (i = 0; i < PIO_RETRY_CNT; i++) { - u32 start, isr; - - start = advk_readl(pcie, PIO_START); - isr = advk_readl(pcie, PIO_ISR); - if (!start && isr) - return 0; -+ udelay(PIO_RETRY_DELAY); - } - - dev_err(dev, "config read/write timed out\n"); diff --git a/target/linux/mvebu/patches-5.4/017-PCI-aardvark-Improve-link-training.patch b/target/linux/mvebu/patches-5.4/017-PCI-aardvark-Improve-link-training.patch index 2bf838432f..19d0a5d513 100644 --- a/target/linux/mvebu/patches-5.4/017-PCI-aardvark-Improve-link-training.patch +++ b/target/linux/mvebu/patches-5.4/017-PCI-aardvark-Improve-link-training.patch @@ -193,7 +193,7 @@ Acked-by: Thomas Petazzoni reg = advk_readl(pcie, PCIE_CORE_CMD_STATUS_REG); reg |= PCIE_CORE_CMD_MEM_ACCESS_EN | -@@ -1035,6 +1093,12 @@ static int advk_pcie_probe(struct platfo +@@ -1066,6 +1124,12 @@ static int advk_pcie_probe(struct platfo return ret; } diff --git a/target/linux/mvebu/patches-5.4/018-PCI-aardvark-Issue-PERST-via-GPIO.patch b/target/linux/mvebu/patches-5.4/018-PCI-aardvark-Issue-PERST-via-GPIO.patch index 83212ec475..0f2dab600b 100644 --- a/target/linux/mvebu/patches-5.4/018-PCI-aardvark-Issue-PERST-via-GPIO.patch +++ b/target/linux/mvebu/patches-5.4/018-PCI-aardvark-Issue-PERST-via-GPIO.patch @@ -98,7 +98,7 @@ Acked-by: Thomas Petazzoni * fundamental reset. As required by PCI Express spec a delay for at * least 100ms after such a reset before link training is needed. */ -@@ -1093,6 +1118,22 @@ static int advk_pcie_probe(struct platfo +@@ -1124,6 +1149,22 @@ static int advk_pcie_probe(struct platfo return ret; } diff --git a/target/linux/mvebu/patches-5.4/019-PCI-aardvark-Add-PHY-support.patch b/target/linux/mvebu/patches-5.4/019-PCI-aardvark-Add-PHY-support.patch index fa04861e80..640e4eb57c 100644 --- a/target/linux/mvebu/patches-5.4/019-PCI-aardvark-Add-PHY-support.patch +++ b/target/linux/mvebu/patches-5.4/019-PCI-aardvark-Add-PHY-support.patch @@ -76,7 +76,7 @@ Cc: Miquèl Raynal /* Set to Direct mode */ reg = advk_readl(pcie, CTRL_CONFIG_REG); reg &= ~(CTRL_MODE_MASK << CTRL_MODE_SHIFT); -@@ -1083,6 +1092,62 @@ out_release_res: +@@ -1114,6 +1123,62 @@ out_release_res: return err; } @@ -139,7 +139,7 @@ Cc: Miquèl Raynal static int advk_pcie_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; -@@ -1140,6 +1205,10 @@ static int advk_pcie_probe(struct platfo +@@ -1171,6 +1236,10 @@ static int advk_pcie_probe(struct platfo else pcie->link_gen = ret; diff --git a/target/linux/mvebu/patches-5.4/026-PCI-aardvark-Fix-initialization-with-old-Marvell-s-A.patch b/target/linux/mvebu/patches-5.4/026-PCI-aardvark-Fix-initialization-with-old-Marvell-s-A.patch index bb9d7b7849..41fed6aded 100644 --- a/target/linux/mvebu/patches-5.4/026-PCI-aardvark-Fix-initialization-with-old-Marvell-s-A.patch +++ b/target/linux/mvebu/patches-5.4/026-PCI-aardvark-Fix-initialization-with-old-Marvell-s-A.patch @@ -31,7 +31,7 @@ Cc: # 5.8+: ea17a0f153af: phy: marvell: comphy: Convert --- a/drivers/pci/controller/pci-aardvark.c +++ b/drivers/pci/controller/pci-aardvark.c -@@ -1123,7 +1123,9 @@ static int advk_pcie_enable_phy(struct a +@@ -1154,7 +1154,9 @@ static int advk_pcie_enable_phy(struct a } ret = phy_power_on(pcie->phy); diff --git a/target/linux/octeontx/patches-5.4/0004-PCI-add-quirk-for-Gateworks-PLX-PEX860x-switch-with-.patch b/target/linux/octeontx/patches-5.4/0004-PCI-add-quirk-for-Gateworks-PLX-PEX860x-switch-with-.patch index e33a28e953..c19e4cf90d 100644 --- a/target/linux/octeontx/patches-5.4/0004-PCI-add-quirk-for-Gateworks-PLX-PEX860x-switch-with-.patch +++ b/target/linux/octeontx/patches-5.4/0004-PCI-add-quirk-for-Gateworks-PLX-PEX860x-switch-with-.patch @@ -22,7 +22,7 @@ Signed-off-by: Tim Harvey #include #include #include -@@ -5625,3 +5626,34 @@ static void apex_pci_fixup_class(struct +@@ -5714,3 +5715,34 @@ static void apex_pci_fixup_class(struct } DECLARE_PCI_FIXUP_CLASS_HEADER(0x1ac1, 0x089a, PCI_CLASS_NOT_DEFINED, 8, apex_pci_fixup_class);