From 2b7fa4d4ba2b791fbb729ed5415a15a213027836 Mon Sep 17 00:00:00 2001 From: suyuan168 <175338101@qq.com> Date: Fri, 31 Dec 2021 00:29:22 +0800 Subject: [PATCH] Revert "add 5.15 kernel" This reverts commit 75bd0d2698ebfd479bd1426d07c493fdb93264a8. --- root/include/kernel-version.mk | 4 +- .../kernel/linux/modules/001-depends.mk | 14 - root/package/kernel/linux/modules/block.mk | 591 ---- root/package/kernel/linux/modules/can.mk | 308 -- root/package/kernel/linux/modules/crypto.mk | 40 +- root/package/kernel/linux/modules/firewire.mk | 76 - root/package/kernel/linux/modules/fs.mk | 50 +- root/package/kernel/linux/modules/hwmon.mk | 558 --- root/package/kernel/linux/modules/i2c.mk | 290 -- root/package/kernel/linux/modules/iio.mk | 561 --- root/package/kernel/linux/modules/input.mk | 6 +- root/package/kernel/linux/modules/leds.mk | 212 -- root/package/kernel/linux/modules/lib.mk | 294 -- .../kernel/linux/modules/netdevices.mk | 1287 ------- .../package/kernel/linux/modules/netfilter.mk | 10 +- .../kernel/linux/modules/netsupport.mk | 1353 -------- root/package/kernel/linux/modules/nls.mk | 339 -- root/package/kernel/linux/modules/other.mk | 88 +- root/package/kernel/linux/modules/pcmcia.mk | 113 - root/package/kernel/linux/modules/sound.mk | 10 +- root/package/kernel/linux/modules/spi.mk | 75 - root/package/kernel/linux/modules/usb.mk | 1816 ---------- root/package/kernel/linux/modules/video.mk | 1046 ------ root/package/kernel/linux/modules/virt.mk | 74 - root/package/kernel/linux/modules/w1.mk | 193 -- root/package/kernel/linux/modules/wireless.mk | 42 - root/package/kernel/linux/modules/wpan.mk | 152 - .../011-kbuild-export-SUBARCH.patch | 2 +- ...-uasm-Enable-muhu-opcode-for-MIPS-R6.patch | 65 - ...rkaround-for-Loongson-2F-nop-CPU-err.patch | 31 - ...ips-bpf-Add-eBPF-JIT-for-32-bit-MIPS.patch | 3078 ----------------- ...bpf-Add-new-eBPF-JIT-for-64-bit-MIPS.patch | 1005 ------ ...f-Add-JIT-workarounds-for-CPU-errata.patch | 120 - ...0-v5.16-05-mips-bpf-Enable-eBPF-JITs.patch | 61 - ...f-Remove-old-BPF-JIT-implementations.patch | 387 --- ...ow_offload-handle-netdevice-events-f.patch | 2 +- ...-0001-net-bgmac-improve-handling-PHY.patch | 84 - ...t-bgmac-support-MDIO-described-in-DT.patch | 54 - ...dd-support-for-qca-8327-internal-phy.patch | 48 - ...3-Include-all-ports-in-enabled_ports.patch | 131 - ...-BCM5301x-workaround-for-a-wrong-CPU.patch | 42 - ...prove-flow-control-setup-on-BCM5301x.patch | 32 - ...t-dsa-b53-Drop-unused-cpu_port-field.patch | 205 -- ...x-add-support-for-qca-8327-A-variant.patch | 65 - ...dd-resume-suspend-function-to-qca83x.patch | 45 - ...ix-spacing-and-improve-name-for-83xx.patch | 95 - ...hy-at803x-fix-resume-for-QCA8327-phy.patch | 131 - ...x-add-DAC-amplitude-fix-for-8327-phy.patch | 91 - ...nable-prefer-master-for-83xx-interna.patch | 27 - ...hy-at803x-better-describe-debug-regs.patch | 127 - ...-dsa-qca8k-add-mac-power-sel-support.patch | 80 - ...dsa-qca8k-Add-SGMII-clock-phase-prop.patch | 30 - ...k-add-support-for-sgmii-falling-edge.patch | 127 - ...dsa-qca8k-Document-support-for-CPU-p.patch | 29 - ...dsa-qca8k-add-support-for-cpu-port-6.patch | 153 - ...work-rgmii-delay-logic-and-scan-for-.patch | 295 -- ...dsa-qca8k-Document-qca-sgmii-enable-.patch | 33 - ...-qca8k-add-explicit-SGMII-PLL-enable.patch | 65 - ...dsa-qca8k-Document-qca-led-open-drai.patch | 37 - ...qca8k-add-support-for-pws-config-reg.patch | 92 - ...dsa-qca8k-document-support-for-qca83.patch | 32 - ...et-dsa-qca8k-add-support-for-QCA8328.patch | 78 - ...8k-set-internal-delay-also-for-sgmii.patch | 159 - ...move-port-config-to-dedicated-struct.patch | 124 - ...ipq8064-mdio-fix-warning-with-new-qc.patch | 26 - ...net-dsa-qca8k-convert-to-YAML-schema.patch | 631 ---- ...elay-applied-to-wrong-cpu-in-parse-p.patch | 28 - ...for-loop-in-setup-and-add-cpu-port-c.patch | 151 - ...sure-pad0-mac06-exchange-is-disabled.patch | 47 - .../generic/hack-5.15/204-module_strip.patch | 34 +- .../generic/hack-5.15/205-kconfig-exit.patch | 11 - .../210-darwin_scripts_include.patch | 2 +- .../hack-5.15/212-tools_portability.patch | 10 +- .../hack-5.15/220-arm-gc_sections.patch | 122 - .../hack-5.15/221-module_exports.patch | 8 +- .../hack-5.15/230-openwrt_lzma_options.patch | 2 +- .../linux/generic/hack-5.15/251-kconfig.patch | 2 +- .../generic/hack-5.15/252-SATA_PMP.patch | 23 - .../hack-5.15/259-regmap_dynamic.patch | 144 - .../301-mips_image_cmdline_hack.patch | 2 +- ...don-t-reply-on-mtdblock-device-minor.patch | 84 - ...rans-call-add-disks-after-mtd-device.patch | 98 - .../410-block-fit-partition-parser.patch | 220 -- .../420-mtd-set-rootfs-to-be-root-dev.patch | 2 +- .../640-bridge-only-accept-EAP-locally.patch | 46 +- ...-netfilter-add-xt_FLOWOFFLOAD-target.patch | 8 +- .../hack-5.15/651-wireless_mesh_header.patch | 2 +- .../661-use_fq_codel_by_default.patch | 2 +- .../710-net-dsa-mv88e6xxx-default-VID-1.patch | 4 +- ...-dsa-mv88e6xxx-disable-ATU-violation.patch | 2 +- .../hack-5.15/720-net-phy-add-aqr-phys.patch | 142 - .../721-net-add-packet-mangeling.patch | 178 - ...-r8152-add-LED-configuration-from-OF.patch | 74 - ...et-add-RTL8152-binding-documentation.patch | 54 - .../hack-5.15/773-bgmac-add-srab-switch.patch | 4 +- .../780-net-ipheth-fix-RX-EOVERFLOW.patch | 52 + .../800-GPIO-add-named-gpio-exports.patch | 12 +- .../hack-5.15/901-debloat_sock_diag.patch | 8 +- .../generic/hack-5.15/902-debloat_proc.patch | 12 +- .../hack-5.15/904-debloat_dma_buf.patch | 92 - ...terrupt-provider-address-cells-check.patch | 28 - ...e_mem_map-with-ARCH_PFN_OFFSET-calcu.patch | 2 +- ...0-add-linux-spidev-compatible-si3210.patch | 8 +- ...ame2-and-add-RENAME_WHITEOUT-support.patch | 81 - ...41-jffs2-add-RENAME_EXCHANGE-support.patch | 73 - .../142-jffs2-add-splice-ops.patch | 20 - ...ge_allow_receiption_on_disabled_port.patch | 4 +- .../pending-5.15/201-extra_optimization.patch | 2 +- .../203-kallsyms_uncompressed.patch | 4 +- .../270-platform-mikrotik-build-bits.patch | 14 +- .../300-mips_expose_boot_raw.patch | 4 +- .../pending-5.15/305-mips_module_reloc.patch | 2 +- ...CPU-option-reporting-to-proc-cpuinfo.patch | 6 +- ...t-command-line-parameters-from-users.patch | 7 +- ...ernel-XZ-compression-option-on-PPC_8.patch | 2 +- .../pending-5.15/420-mtd-redboot_space.patch | 41 - ...mtd-add-routerbootpart-parser-config.patch | 18 +- ...or-rework-broken-flash-reset-support.patch | 182 - ...spinand-add-support-for-xtx-xt26g0xa.patch | 178 - .../484-mtd-spi-nor-add-esmt-f25l16pa.patch | 11 - ...ting-ubi0-rootfs-in-init-do_mounts.c.patch | 51 - ...cat-add-dt-driver-for-concat-devices.patch | 2 +- .../530-jffs2_make_lzma_available.patch | 2 +- .../600-netfilter_conntrack_flush.patch | 4 +- ...-netfilter_optional_tcp_window_check.patch | 64 +- .../pending-5.15/630-packet_socket_type.patch | 16 +- .../pending-5.15/655-increase_skb_pad.patch | 2 +- ...Add-support-for-MAP-E-FMRs-mesh-mode.patch | 14 +- ...ng-with-source-address-failed-policy.patch | 2 +- ...T-skip-GRO-for-foreign-MAC-addresses.patch | 26 +- ...address-support-to-of_get_mac_addres.patch | 102 + ...et-add-mac-address-increment-support.patch | 41 +- ...83-of_net-add-mac-address-to-of-tree.patch | 13 +- ...detach-callback-to-struct-phy_driver.patch | 2 +- ...d-knob-for-filtering-rx-tx-BPDU-pack.patch | 174 - ...net-phy-at803x-fix-at8033-sgmii-mode.patch | 51 + ...760-net-dsa-mv88e6xxx-fix-vlan-setup.patch | 6 +- ...-net-dsa-mt7530-Support-EEE-features.patch | 103 + ...equest-assisted-learning-on-CPU-port.patch | 2 +- ...-missing-linux-if_ether.h-for-ETH_AL.patch | 61 - ...ice-struct-copy-its-DMA-params-to-th.patch | 6 +- .../810-pci_disable_common_quirks.patch | 6 +- .../811-pci_disable_usb_common_quirks.patch | 2 +- .../pending-5.15/834-ledtrig-libata.patch | 12 +- .../pending-5.15/920-mangle_bootargs.patch | 6 +- .../pending-5.15/930-qcom-qmi-helpers.patch | 11 - 146 files changed, 574 insertions(+), 20097 deletions(-) delete mode 100755 root/package/kernel/linux/modules/001-depends.mk delete mode 100755 root/package/kernel/linux/modules/block.mk delete mode 100755 root/package/kernel/linux/modules/can.mk delete mode 100755 root/package/kernel/linux/modules/firewire.mk delete mode 100755 root/package/kernel/linux/modules/hwmon.mk delete mode 100755 root/package/kernel/linux/modules/i2c.mk delete mode 100755 root/package/kernel/linux/modules/iio.mk delete mode 100755 root/package/kernel/linux/modules/leds.mk delete mode 100755 root/package/kernel/linux/modules/lib.mk delete mode 100755 root/package/kernel/linux/modules/netdevices.mk delete mode 100755 root/package/kernel/linux/modules/netsupport.mk delete mode 100755 root/package/kernel/linux/modules/nls.mk delete mode 100755 root/package/kernel/linux/modules/pcmcia.mk delete mode 100755 root/package/kernel/linux/modules/spi.mk delete mode 100755 root/package/kernel/linux/modules/usb.mk delete mode 100755 root/package/kernel/linux/modules/video.mk delete mode 100755 root/package/kernel/linux/modules/virt.mk delete mode 100755 root/package/kernel/linux/modules/w1.mk delete mode 100755 root/package/kernel/linux/modules/wireless.mk delete mode 100755 root/package/kernel/linux/modules/wpan.mk delete mode 100755 root/target/linux/generic/backport-5.15/050-v5.16-00-MIPS-uasm-Enable-muhu-opcode-for-MIPS-R6.patch delete mode 100755 root/target/linux/generic/backport-5.15/050-v5.16-01-mips-uasm-Add-workaround-for-Loongson-2F-nop-CPU-err.patch delete mode 100755 root/target/linux/generic/backport-5.15/050-v5.16-02-mips-bpf-Add-eBPF-JIT-for-32-bit-MIPS.patch delete mode 100755 root/target/linux/generic/backport-5.15/050-v5.16-03-mips-bpf-Add-new-eBPF-JIT-for-64-bit-MIPS.patch delete mode 100755 root/target/linux/generic/backport-5.15/050-v5.16-04-mips-bpf-Add-JIT-workarounds-for-CPU-errata.patch delete mode 100755 root/target/linux/generic/backport-5.15/050-v5.16-05-mips-bpf-Enable-eBPF-JITs.patch delete mode 100755 root/target/linux/generic/backport-5.15/050-v5.16-06-mips-bpf-Remove-old-BPF-JIT-implementations.patch delete mode 100755 root/target/linux/generic/backport-5.15/734-v5.16-0001-net-bgmac-improve-handling-PHY.patch delete mode 100755 root/target/linux/generic/backport-5.15/734-v5.16-0002-net-bgmac-support-MDIO-described-in-DT.patch delete mode 100755 root/target/linux/generic/backport-5.15/742-v5.16-net-phy-at803x-add-support-for-qca-8327-internal-phy.patch delete mode 100755 root/target/linux/generic/backport-5.15/743-v5.16-0001-net-dsa-b53-Include-all-ports-in-enabled_ports.patch delete mode 100755 root/target/linux/generic/backport-5.15/743-v5.16-0002-net-dsa-b53-Drop-BCM5301x-workaround-for-a-wrong-CPU.patch delete mode 100755 root/target/linux/generic/backport-5.15/743-v5.16-0003-net-dsa-b53-Improve-flow-control-setup-on-BCM5301x.patch delete mode 100755 root/target/linux/generic/backport-5.15/743-v5.16-0004-net-dsa-b53-Drop-unused-cpu_port-field.patch delete mode 100755 root/target/linux/generic/backport-5.15/745-v5.16-01-net-phy-at803x-add-support-for-qca-8327-A-variant.patch delete mode 100755 root/target/linux/generic/backport-5.15/745-v5.16-02-net-phy-at803x-add-resume-suspend-function-to-qca83x.patch delete mode 100755 root/target/linux/generic/backport-5.15/745-v5.16-03-net-phy-at803x-fix-spacing-and-improve-name-for-83xx.patch delete mode 100755 root/target/linux/generic/backport-5.15/746-v5.16-01-net-phy-at803x-fix-resume-for-QCA8327-phy.patch delete mode 100755 root/target/linux/generic/backport-5.15/746-v5.16-02-net-phy-at803x-add-DAC-amplitude-fix-for-8327-phy.patch delete mode 100755 root/target/linux/generic/backport-5.15/746-v5.16-03-net-phy-at803x-enable-prefer-master-for-83xx-interna.patch delete mode 100755 root/target/linux/generic/backport-5.15/746-v5.16-04-net-phy-at803x-better-describe-debug-regs.patch delete mode 100755 root/target/linux/generic/backport-5.15/747-v5.16-01-dsa-qca8k-add-mac-power-sel-support.patch delete mode 100755 root/target/linux/generic/backport-5.15/747-v5.16-02-dt-bindings-net-dsa-qca8k-Add-SGMII-clock-phase-prop.patch delete mode 100755 root/target/linux/generic/backport-5.15/747-v5.16-03-net-dsa-qca8k-add-support-for-sgmii-falling-edge.patch delete mode 100755 root/target/linux/generic/backport-5.15/747-v5.16-04-dt-bindings-net-dsa-qca8k-Document-support-for-CPU-p.patch delete mode 100755 root/target/linux/generic/backport-5.15/747-v5.16-05-net-dsa-qca8k-add-support-for-cpu-port-6.patch delete mode 100755 root/target/linux/generic/backport-5.15/747-v5.16-06-net-dsa-qca8k-rework-rgmii-delay-logic-and-scan-for-.patch delete mode 100755 root/target/linux/generic/backport-5.15/747-v5.16-07-dt-bindings-net-dsa-qca8k-Document-qca-sgmii-enable-.patch delete mode 100755 root/target/linux/generic/backport-5.15/747-v5.16-08-net-dsa-qca8k-add-explicit-SGMII-PLL-enable.patch delete mode 100755 root/target/linux/generic/backport-5.15/747-v5.16-09-dt-bindings-net-dsa-qca8k-Document-qca-led-open-drai.patch delete mode 100755 root/target/linux/generic/backport-5.15/747-v5.16-10-net-dsa-qca8k-add-support-for-pws-config-reg.patch delete mode 100755 root/target/linux/generic/backport-5.15/747-v5.16-11-dt-bindings-net-dsa-qca8k-document-support-for-qca83.patch delete mode 100755 root/target/linux/generic/backport-5.15/747-v5.16-12-net-dsa-qca8k-add-support-for-QCA8328.patch delete mode 100755 root/target/linux/generic/backport-5.15/747-v5.16-13-net-dsa-qca8k-set-internal-delay-also-for-sgmii.patch delete mode 100755 root/target/linux/generic/backport-5.15/747-v5.16-14-net-dsa-qca8k-move-port-config-to-dedicated-struct.patch delete mode 100755 root/target/linux/generic/backport-5.15/747-v5.16-15-dt-bindings-net-ipq8064-mdio-fix-warning-with-new-qc.patch delete mode 100755 root/target/linux/generic/backport-5.15/747-v5.16-16-dt-bindings-net-dsa-qca8k-convert-to-YAML-schema.patch delete mode 100755 root/target/linux/generic/backport-5.15/748-v5.16-net-dsa-qca8k-fix-delay-applied-to-wrong-cpu-in-parse-p.patch delete mode 100755 root/target/linux/generic/backport-5.15/749-v5.16-net-dsa-qca8k-tidy-for-loop-in-setup-and-add-cpu-port-c.patch delete mode 100755 root/target/linux/generic/backport-5.15/750-v5.16-net-dsa-qca8k-make-sure-pad0-mac06-exchange-is-disabled.patch delete mode 100755 root/target/linux/generic/hack-5.15/205-kconfig-exit.patch delete mode 100755 root/target/linux/generic/hack-5.15/220-arm-gc_sections.patch delete mode 100755 root/target/linux/generic/hack-5.15/252-SATA_PMP.patch delete mode 100755 root/target/linux/generic/hack-5.15/259-regmap_dynamic.patch delete mode 100755 root/target/linux/generic/hack-5.15/401-mtd-super-don-t-reply-on-mtdblock-device-minor.patch delete mode 100755 root/target/linux/generic/hack-5.15/402-mtd-blktrans-call-add-disks-after-mtd-device.patch delete mode 100755 root/target/linux/generic/hack-5.15/410-block-fit-partition-parser.patch delete mode 100755 root/target/linux/generic/hack-5.15/720-net-phy-add-aqr-phys.patch delete mode 100755 root/target/linux/generic/hack-5.15/721-net-add-packet-mangeling.patch delete mode 100755 root/target/linux/generic/hack-5.15/760-net-usb-r8152-add-LED-configuration-from-OF.patch delete mode 100755 root/target/linux/generic/hack-5.15/761-dt-bindings-net-add-RTL8152-binding-documentation.patch create mode 100755 root/target/linux/generic/hack-5.15/780-net-ipheth-fix-RX-EOVERFLOW.patch delete mode 100755 root/target/linux/generic/hack-5.15/904-debloat_dma_buf.patch delete mode 100755 root/target/linux/generic/pending-5.15/050-dtc-checks-Drop-interrupt-provider-address-cells-check.patch delete mode 100755 root/target/linux/generic/pending-5.15/140-jffs2-use-.rename2-and-add-RENAME_WHITEOUT-support.patch delete mode 100755 root/target/linux/generic/pending-5.15/141-jffs2-add-RENAME_EXCHANGE-support.patch delete mode 100755 root/target/linux/generic/pending-5.15/142-jffs2-add-splice-ops.patch delete mode 100755 root/target/linux/generic/pending-5.15/420-mtd-redboot_space.patch delete mode 100755 root/target/linux/generic/pending-5.15/481-mtd-spi-nor-rework-broken-flash-reset-support.patch delete mode 100755 root/target/linux/generic/pending-5.15/483-mtd-spinand-add-support-for-xtx-xt26g0xa.patch delete mode 100755 root/target/linux/generic/pending-5.15/484-mtd-spi-nor-add-esmt-f25l16pa.patch delete mode 100755 root/target/linux/generic/pending-5.15/492-try-auto-mounting-ubi0-rootfs-in-init-do_mounts.c.patch create mode 100755 root/target/linux/generic/pending-5.15/681-NET-add-mtd-mac-address-support-to-of_get_mac_addres.patch delete mode 100755 root/target/linux/generic/pending-5.15/710-bridge-add-knob-for-filtering-rx-tx-BPDU-pack.patch create mode 100755 root/target/linux/generic/pending-5.15/735-net-phy-at803x-fix-at8033-sgmii-mode.patch create mode 100755 root/target/linux/generic/pending-5.15/761-net-dsa-mt7530-Support-EEE-features.patch delete mode 100755 root/target/linux/generic/pending-5.15/780-ARM-kirkwood-add-missing-linux-if_ether.h-for-ETH_AL.patch delete mode 100755 root/target/linux/generic/pending-5.15/930-qcom-qmi-helpers.patch diff --git a/root/include/kernel-version.mk b/root/include/kernel-version.mk index dd5bb70c..b7efe8fc 100755 --- a/root/include/kernel-version.mk +++ b/root/include/kernel-version.mk @@ -9,12 +9,12 @@ endif LINUX_VERSION-5.4 = .132 LINUX_VERSION-5.10 = .64 LINUX_VERSION-5.14 = .6 -LINUX_VERSION-5.15 = .10 +LINUX_VERSION-5.15 = .4 LINUX_KERNEL_HASH-5.4.132 = 8466adbfb3579e751ede683496df7bb20f258b5f882250f3dd82be63736d00ef LINUX_KERNEL_HASH-5.10.64 = 3eb84bd24a2de2b4749314e34597c02401c5d6831b055ed5224adb405c35e30a LINUX_KERNEL_HASH-5.14.6 = 54848c1268771ee3515e4c33e29abc3f1fa90d8144894cce6d0ebc3b158bccec -LINUX_KERNEL_HASH-5.15.10 = 484fcf5df8d00ddc570af443ef33382a110b338239b1f47048974baa22455b4b +LINUX_KERNEL_HASH-5.15.4 = 549d0fb75e65f6158e6f4becc648f249d386843da0e1211460bde8b1ea99cbca remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1)))) sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1))))))) diff --git a/root/package/kernel/linux/modules/001-depends.mk b/root/package/kernel/linux/modules/001-depends.mk deleted file mode 100755 index 806c3dcf..00000000 --- a/root/package/kernel/linux/modules/001-depends.mk +++ /dev/null @@ -1,14 +0,0 @@ -# -# Copyright (C) 2010-2011 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -define AddDepends/nls - DEPENDS+= +kmod-nls-base $(foreach cp,$(1),+kmod-nls-$(cp)) -endef - -define AddDepends/rfkill - DEPENDS+= +USE_RFKILL:kmod-rfkill $(1) -endef diff --git a/root/package/kernel/linux/modules/block.mk b/root/package/kernel/linux/modules/block.mk deleted file mode 100755 index edf3e7ed..00000000 --- a/root/package/kernel/linux/modules/block.mk +++ /dev/null @@ -1,591 +0,0 @@ -# -# Copyright (C) 2006-2012 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -BLOCK_MENU:=Block Devices - -define KernelPackage/aoe - SUBMENU:=$(BLOCK_MENU) - TITLE:=ATA over Ethernet support - KCONFIG:=CONFIG_ATA_OVER_ETH - FILES:=$(LINUX_DIR)/drivers/block/aoe/aoe.ko - AUTOLOAD:=$(call AutoLoad,30,aoe) -endef - -define KernelPackage/aoe/description - Kernel support for ATA over Ethernet -endef - -$(eval $(call KernelPackage,aoe)) - - -define KernelPackage/ata-core - SUBMENU:=$(BLOCK_MENU) - TITLE:=Serial and Parallel ATA support - DEPENDS:=@PCI_SUPPORT||TARGET_sunxi +kmod-scsi-core - KCONFIG:=CONFIG_ATA - FILES:=$(LINUX_DIR)/drivers/ata/libata.ko -ifneq ($(wildcard $(LINUX_DIR)/drivers/ata/libahci.ko),) - FILES+=$(LINUX_DIR)/drivers/ata/libahci.ko -endif -endef - -$(eval $(call KernelPackage,ata-core)) - - -define AddDepends/ata - SUBMENU:=$(BLOCK_MENU) - DEPENDS+=+kmod-ata-core $(1) -endef - - -define KernelPackage/ata-ahci - TITLE:=AHCI Serial ATA support - KCONFIG:=CONFIG_SATA_AHCI - FILES:= \ - $(LINUX_DIR)/drivers/ata/ahci.ko - AUTOLOAD:=$(call AutoLoad,41,libahci ahci,1) - $(call AddDepends/ata) -endef - -define KernelPackage/ata-ahci/description - Support for AHCI Serial ATA controllers -endef - -$(eval $(call KernelPackage,ata-ahci)) - - -define KernelPackage/ata-ahci-platform - TITLE:=AHCI Serial ATA Platform support - KCONFIG:=CONFIG_SATA_AHCI_PLATFORM - FILES:= \ - $(LINUX_DIR)/drivers/ata/ahci_platform.ko \ - $(LINUX_DIR)/drivers/ata/libahci_platform.ko - AUTOLOAD:=$(call AutoLoad,40,libahci libahci_platform ahci_platform,1) - $(call AddDepends/ata,@TARGET_ipq806x||TARGET_layerscape||TARGET_sunxi) -endef - -define KernelPackage/ata-ahci-platform/description - Platform support for AHCI Serial ATA controllers -endef - -$(eval $(call KernelPackage,ata-ahci-platform)) - - -define KernelPackage/ata-artop - TITLE:=ARTOP 6210/6260 PATA support - KCONFIG:=CONFIG_PATA_ARTOP - FILES:=$(LINUX_DIR)/drivers/ata/pata_artop.ko - AUTOLOAD:=$(call AutoLoad,41,pata_artop,1) - $(call AddDepends/ata) -endef - -define KernelPackage/ata-artop/description - PATA support for ARTOP 6210/6260 host controllers -endef - -$(eval $(call KernelPackage,ata-artop)) - - -define KernelPackage/ata-marvell-sata - TITLE:=Marvell Serial ATA support - KCONFIG:=CONFIG_SATA_MV - FILES:=$(LINUX_DIR)/drivers/ata/sata_mv.ko - AUTOLOAD:=$(call AutoLoad,41,sata_mv,1) - $(call AddDepends/ata) -endef - -define KernelPackage/ata-marvell-sata/description - SATA support for marvell chipsets -endef - -$(eval $(call KernelPackage,ata-marvell-sata)) - - -define KernelPackage/ata-nvidia-sata - TITLE:=Nvidia Serial ATA support - KCONFIG:=CONFIG_SATA_NV - FILES:=$(LINUX_DIR)/drivers/ata/sata_nv.ko - AUTOLOAD:=$(call AutoLoad,41,sata_nv,1) - $(call AddDepends/ata) -endef - -$(eval $(call KernelPackage,ata-nvidia-sata)) - - -define KernelPackage/ata-pdc202xx-old - TITLE:=Older Promise PATA controller support - KCONFIG:= \ - CONFIG_ATA_SFF=y \ - CONFIG_PATA_PDC_OLD - FILES:=$(LINUX_DIR)/drivers/ata/pata_pdc202xx_old.ko - AUTOLOAD:=$(call AutoLoad,41,pata_pdc202xx_old,1) - $(call AddDepends/ata) -endef - -define KernelPackage/ata-pdc202xx-old/description - This option enables support for the Promise 20246, 20262, 20263, - 20265 and 20267 adapters -endef - -$(eval $(call KernelPackage,ata-pdc202xx-old)) - - -define KernelPackage/ata-piix - TITLE:=Intel PIIX PATA/SATA support - KCONFIG:=CONFIG_ATA_PIIX - FILES:=$(LINUX_DIR)/drivers/ata/ata_piix.ko - AUTOLOAD:=$(call AutoLoad,41,ata_piix,1) - $(call AddDepends/ata) -endef - -define KernelPackage/ata-piix/description - SATA support for Intel ICH5/6/7/8 series host controllers and - PATA support for Intel ESB/ICH/PIIX3/PIIX4 series host controllers -endef - -$(eval $(call KernelPackage,ata-piix)) - - -define KernelPackage/ata-sil - TITLE:=Silicon Image SATA support - KCONFIG:=CONFIG_SATA_SIL - FILES:=$(LINUX_DIR)/drivers/ata/sata_sil.ko - AUTOLOAD:=$(call AutoLoad,41,sata_sil,1) - $(call AddDepends/ata) -endef - -define KernelPackage/ata-sil/description - Support for Silicon Image Serial ATA controllers -endef - -$(eval $(call KernelPackage,ata-sil)) - - -define KernelPackage/ata-sil24 - TITLE:=Silicon Image 3124/3132 SATA support - KCONFIG:=CONFIG_SATA_SIL24 - FILES:=$(LINUX_DIR)/drivers/ata/sata_sil24.ko - AUTOLOAD:=$(call AutoLoad,41,sata_sil24,1) - $(call AddDepends/ata) -endef - -define KernelPackage/ata-sil24/description - Support for Silicon Image 3124/3132 Serial ATA controllers -endef - -$(eval $(call KernelPackage,ata-sil24)) - - -define KernelPackage/ata-via-sata - TITLE:=VIA SATA support - KCONFIG:=CONFIG_SATA_VIA - FILES:=$(LINUX_DIR)/drivers/ata/sata_via.ko - AUTOLOAD:=$(call AutoLoad,41,sata_via,1) - $(call AddDepends/ata) -endef - -define KernelPackage/ata-via-sata/description - This option enables support for VIA Serial ATA -endef - -$(eval $(call KernelPackage,ata-via-sata)) - - -define KernelPackage/block2mtd - SUBMENU:=$(BLOCK_MENU) - TITLE:=Block device MTD emulation - KCONFIG:=CONFIG_MTD_BLOCK2MTD - FILES:=$(LINUX_DIR)/drivers/mtd/devices/block2mtd.ko -endef - -$(eval $(call KernelPackage,block2mtd)) - - -define KernelPackage/dax - SUBMENU:=$(BLOCK_MENU) - TITLE:=DAX: direct access to differentiated memory - KCONFIG:=CONFIG_DAX - FILES:=$(LINUX_DIR)/drivers/dax/dax.ko -endef - -$(eval $(call KernelPackage,dax)) - - -define KernelPackage/dm - SUBMENU:=$(BLOCK_MENU) - TITLE:=Device Mapper - DEPENDS:=+kmod-crypto-manager +kmod-dax +KERNEL_KEYS:kmod-keys-encrypted - # All the "=n" are unnecessary, they're only there - # to stop the config from asking the question. - # MIRROR is M because I've needed it for pvmove. - KCONFIG:= \ - CONFIG_BLK_DEV_MD=n \ - CONFIG_DM_DEBUG=n \ - CONFIG_DM_UEVENT=n \ - CONFIG_DM_DELAY=n \ - CONFIG_DM_LOG_WRITES=n \ - CONFIG_DM_MQ_DEFAULT=n \ - CONFIG_DM_MULTIPATH=n \ - CONFIG_DM_ZERO=n \ - CONFIG_DM_SNAPSHOT=n \ - CONFIG_DM_LOG_USERSPACE=n \ - CONFIG_MD=y \ - CONFIG_BLK_DEV_DM \ - CONFIG_DM_CRYPT \ - CONFIG_DM_MIRROR - FILES:= \ - $(LINUX_DIR)/drivers/md/dm-mod.ko \ - $(LINUX_DIR)/drivers/md/dm-crypt.ko \ - $(LINUX_DIR)/drivers/md/dm-log.ko \ - $(LINUX_DIR)/drivers/md/dm-mirror.ko \ - $(LINUX_DIR)/drivers/md/dm-region-hash.ko - AUTOLOAD:=$(call AutoLoad,30,dm-mod dm-log dm-region-hash dm-mirror dm-crypt) -endef - -define KernelPackage/dm/description - Kernel module necessary for LVM2 support -endef - -$(eval $(call KernelPackage,dm)) - -define KernelPackage/dm-raid - SUBMENU:=$(BLOCK_MENU) - TITLE:=LVM2 raid support - DEPENDS:=+kmod-dm +kmod-md-mod \ - +kmod-md-raid0 +kmod-md-raid1 +kmod-md-raid10 +kmod-md-raid456 - KCONFIG:= \ - CONFIG_DM_RAID - FILES:=$(LINUX_DIR)/drivers/md/dm-raid.ko - AUTOLOAD:=$(call AutoLoad,31,dm-raid) -endef - -define KernelPackage/dm-raid/description - Kernel module necessary for LVM2 raid support -endef - -$(eval $(call KernelPackage,dm-raid)) - - -define KernelPackage/iscsi-initiator - SUBMENU:=$(BLOCK_MENU) - TITLE:=iSCSI Initiator over TCP/IP - DEPENDS:=+kmod-scsi-core +kmod-crypto-hash - KCONFIG:= \ - CONFIG_INET \ - CONFIG_SCSI_LOWLEVEL=y \ - CONFIG_ISCSI_TCP \ - CONFIG_SCSI_ISCSI_ATTRS=y - FILES:= \ - $(LINUX_DIR)/drivers/scsi/iscsi_tcp.ko \ - $(LINUX_DIR)/drivers/scsi/libiscsi.ko \ - $(LINUX_DIR)/drivers/scsi/libiscsi_tcp.ko \ - $(LINUX_DIR)/drivers/scsi/scsi_transport_iscsi.ko - AUTOLOAD:=$(call AutoProbe,libiscsi libiscsi_tcp scsi_transport_iscsi iscsi_tcp) -endef - -define KernelPackage/iscsi-initiator/description -The iSCSI Driver provides a host with the ability to access storage through an -IP network. The driver uses the iSCSI protocol to transport SCSI requests and -responses over a TCP/IP network between the host (the "initiator") and "targets". -endef - -$(eval $(call KernelPackage,iscsi-initiator)) - - -define KernelPackage/md-mod - SUBMENU:=$(BLOCK_MENU) - TITLE:=MD RAID - KCONFIG:= \ - CONFIG_MD=y \ - CONFIG_BLK_DEV_MD=m \ - CONFIG_MD_AUTODETECT=y \ - CONFIG_MD_FAULTY=n - FILES:=$(LINUX_DIR)/drivers/md/md-mod.ko - AUTOLOAD:=$(call AutoLoad,27,md-mod) -endef - -define KernelPackage/md-mod/description - Kernel RAID md module (md-mod.ko). - You will need to select at least one RAID level module below. -endef - -$(eval $(call KernelPackage,md-mod)) - - -define KernelPackage/md/Depends - SUBMENU:=$(BLOCK_MENU) - DEPENDS:=kmod-md-mod $(1) -endef - - -define KernelPackage/md-linear -$(call KernelPackage/md/Depends,) - TITLE:=RAID Linear Module - KCONFIG:=CONFIG_MD_LINEAR - FILES:=$(LINUX_DIR)/drivers/md/linear.ko - AUTOLOAD:=$(call AutoLoad,28,linear) -endef - -define KernelPackage/md-linear/description - RAID "Linear" or "Append" driver module (linear.ko) -endef - -$(eval $(call KernelPackage,md-linear)) - - -define KernelPackage/md-raid0 -$(call KernelPackage/md/Depends,) - TITLE:=RAID0 Module - KCONFIG:=CONFIG_MD_RAID0 - FILES:=$(LINUX_DIR)/drivers/md/raid0.ko - AUTOLOAD:=$(call AutoLoad,28,raid0) -endef - -define KernelPackage/md-raid0/description - RAID Level 0 (Striping) driver module (raid0.ko) -endef - -$(eval $(call KernelPackage,md-raid0)) - - -define KernelPackage/md-raid1 -$(call KernelPackage/md/Depends,) - TITLE:=RAID1 Module - KCONFIG:=CONFIG_MD_RAID1 - FILES:=$(LINUX_DIR)/drivers/md/raid1.ko - AUTOLOAD:=$(call AutoLoad,28,raid1) -endef - -define KernelPackage/md-raid1/description - RAID Level 1 (Mirroring) driver (raid1.ko) -endef - -$(eval $(call KernelPackage,md-raid1)) - - -define KernelPackage/md-raid10 -$(call KernelPackage/md/Depends,) - TITLE:=RAID10 Module - KCONFIG:=CONFIG_MD_RAID10 - FILES:=$(LINUX_DIR)/drivers/md/raid10.ko - AUTOLOAD:=$(call AutoLoad,28,raid10) -endef - -define KernelPackage/md-raid10/description - RAID Level 10 (Mirroring+Striping) driver module (raid10.ko) -endef - -$(eval $(call KernelPackage,md-raid10)) - - -define KernelPackage/md-raid456 -$(call KernelPackage/md/Depends,+kmod-lib-raid6 +kmod-lib-xor +kmod-lib-crc32c) - TITLE:=RAID Level 456 Driver - KCONFIG:= \ - CONFIG_ASYNC_CORE \ - CONFIG_ASYNC_MEMCPY \ - CONFIG_ASYNC_XOR \ - CONFIG_ASYNC_PQ \ - CONFIG_ASYNC_RAID6_RECOV \ - CONFIG_ASYNC_RAID6_TEST=n \ - CONFIG_MD_RAID456 \ - CONFIG_MULTICORE_RAID456=n - FILES:= \ - $(LINUX_DIR)/crypto/async_tx/async_tx.ko \ - $(LINUX_DIR)/crypto/async_tx/async_memcpy.ko \ - $(LINUX_DIR)/crypto/async_tx/async_xor.ko \ - $(LINUX_DIR)/crypto/async_tx/async_pq.ko \ - $(LINUX_DIR)/crypto/async_tx/async_raid6_recov.ko \ - $(LINUX_DIR)/drivers/md/raid456.ko - AUTOLOAD:=$(call AutoLoad,28, async_tx async_memcpy async_xor async_pq async_raid6_recov raid456) -endef - -define KernelPackage/md-raid456/description - RAID Level 4,5,6 kernel module (raid456.ko) - - Includes the following modules required by - raid456.ko: - xor.ko - async_tx.ko - async_xor.ko - async_memcpy.ko - async_pq.ko - async_raid5_recov.ko - raid6_pq.ko -endef - -$(eval $(call KernelPackage,md-raid456)) - - -define KernelPackage/md-multipath -$(call KernelPackage/md/Depends,) - TITLE:=MD Multipath Module - KCONFIG:=CONFIG_MD_MULTIPATH - FILES:=$(LINUX_DIR)/drivers/md/multipath.ko - AUTOLOAD:=$(call AutoLoad,29,multipath) -endef - -define KernelPackage/md-multipath/description - Multipath driver module (multipath.ko) -endef - -$(eval $(call KernelPackage,md-multipath)) - - -define KernelPackage/libsas - SUBMENU:=$(BLOCK_MENU) - DEPENDS:=@TARGET_x86 - TITLE:=SAS Domain Transport Attributes - KCONFIG:=CONFIG_SCSI_SAS_LIBSAS \ - CONFIG_SCSI_SAS_ATTRS \ - CONFIG_SCSI_SAS_ATA=y \ - CONFIG_SCSI_SAS_HOST_SMP=y \ - CONFIG_SCSI_SAS_LIBSAS_DEBUG=y - FILES:= \ - $(LINUX_DIR)/drivers/scsi/scsi_transport_sas.ko \ - $(LINUX_DIR)/drivers/scsi/libsas/libsas.ko - AUTOLOAD:=$(call AutoLoad,29,scsi_transport_sas libsas,1) -endef - -define KernelPackage/libsas/description - SAS Domain Transport Attributes support -endef - -$(eval $(call KernelPackage,libsas,1)) - - -define KernelPackage/loop - SUBMENU:=$(BLOCK_MENU) - TITLE:=Loopback device support - KCONFIG:= \ - CONFIG_BLK_DEV_LOOP \ - CONFIG_BLK_DEV_CRYPTOLOOP=n - FILES:=$(LINUX_DIR)/drivers/block/loop.ko - AUTOLOAD:=$(call AutoLoad,30,loop) -endef - -define KernelPackage/loop/description - Kernel module for loopback device support -endef - -$(eval $(call KernelPackage,loop)) - - -define KernelPackage/mvsas - SUBMENU:=$(BLOCK_MENU) - TITLE:=Marvell 88SE6440 SAS/SATA driver - DEPENDS:=@TARGET_x86 +kmod-libsas - KCONFIG:= \ - CONFIG_SCSI_MVSAS \ - CONFIG_SCSI_MVSAS_TASKLET=n - FILES:=$(LINUX_DIR)/drivers/scsi/mvsas/mvsas.ko - AUTOLOAD:=$(call AutoLoad,40,mvsas,1) -endef - -define KernelPackage/mvsas/description - Kernel support for the Marvell SAS SCSI adapters -endef - -$(eval $(call KernelPackage,mvsas)) - - -define KernelPackage/nbd - SUBMENU:=$(BLOCK_MENU) - TITLE:=Network block device support - KCONFIG:=CONFIG_BLK_DEV_NBD - FILES:=$(LINUX_DIR)/drivers/block/nbd.ko - AUTOLOAD:=$(call AutoLoad,30,nbd) -endef - -define KernelPackage/nbd/description - Kernel module for network block device support -endef - -$(eval $(call KernelPackage,nbd)) - - -define KernelPackage/scsi-core - SUBMENU:=$(BLOCK_MENU) - TITLE:=SCSI device support - KCONFIG:= \ - CONFIG_SCSI \ - CONFIG_SCSI_COMMON@ge5.15 \ - CONFIG_BLK_DEV_SD - FILES:= \ - $(LINUX_DIR)/drivers/scsi/scsi_mod.ko \ - $(LINUX_DIR)/drivers/scsi/scsi_common.ko@ge5.15 \ - $(LINUX_DIR)/drivers/scsi/sd_mod.ko - AUTOLOAD:=$(call AutoLoad,40,scsi_mod scsi_common@ge5.15 sd_mod,1) -endef - -$(eval $(call KernelPackage,scsi-core)) - - -define KernelPackage/scsi-generic - SUBMENU:=$(BLOCK_MENU) - TITLE:=Kernel support for SCSI generic - DEPENDS:=+kmod-scsi-core - KCONFIG:= \ - CONFIG_CHR_DEV_SG - FILES:= \ - $(LINUX_DIR)/drivers/scsi/sg.ko - AUTOLOAD:=$(call AutoLoad,65,sg) -endef - -$(eval $(call KernelPackage,scsi-generic)) - - -define KernelPackage/cdrom - TITLE:=Kernel library module for CD / DVD drives - KCONFIG:=CONFIG_CDROM - HIDDEN:=1 - FILES:=$(LINUX_DIR)/drivers/cdrom/cdrom.ko -endef - -$(eval $(call KernelPackage,cdrom)) - - -define KernelPackage/scsi-cdrom - SUBMENU:=$(BLOCK_MENU) - TITLE:=Kernel support for CD / DVD drives - DEPENDS:=+kmod-scsi-core +kmod-cdrom - KCONFIG:= \ - CONFIG_BLK_DEV_SR \ - CONFIG_BLK_DEV_SR_VENDOR=n - FILES:=$(LINUX_DIR)/drivers/scsi/sr_mod.ko - AUTOLOAD:=$(call AutoLoad,45,sr_mod) -endef - -$(eval $(call KernelPackage,scsi-cdrom)) - - -define KernelPackage/scsi-tape - SUBMENU:=$(BLOCK_MENU) - TITLE:=Kernel support for scsi tape drives - DEPENDS:=+kmod-scsi-core - KCONFIG:= \ - CONFIG_CHR_DEV_ST - FILES:= \ - $(LINUX_DIR)/drivers/scsi/st.ko - AUTOLOAD:=$(call AutoLoad,45,st) -endef - -$(eval $(call KernelPackage,scsi-tape)) - -define KernelPackage/iosched-bfq - SUBMENU:=$(BLOCK_MENU) - TITLE:=Kernel support for BFQ I/O scheduler - KCONFIG:= \ - CONFIG_IOSCHED_BFQ \ - CONFIG_BFQ_GROUP_IOSCHED=y \ - CONFIG_BFQ_CGROUP_DEBUG=n - FILES:= \ - $(LINUX_DIR)/block/bfq.ko - AUTOLOAD:=$(call AutoLoad,10,bfq) -endef - -$(eval $(call KernelPackage,iosched-bfq)) diff --git a/root/package/kernel/linux/modules/can.mk b/root/package/kernel/linux/modules/can.mk deleted file mode 100755 index 9cdebb90..00000000 --- a/root/package/kernel/linux/modules/can.mk +++ /dev/null @@ -1,308 +0,0 @@ -# -# Copyright (C) 2013 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -CAN_MENU:=CAN Support - -define KernelPackage/can - SUBMENU:=$(CAN_MENU) - TITLE:=CAN bus support - KCONFIG:=\ - CONFIG_CAN=m \ - CONFIG_CAN_DEV \ - CONFIG_CAN_CALC_BITTIMING=y \ - CONFIG_CAN_LEDS=y \ - CONFIG_CAN_AT91=n \ - CONFIG_CAN_TI_HECC=n \ - CONFIG_CAN_MCP251X=n \ - CONFIG_CAN_BFIN=n \ - CONFIG_CAN_JANZ_ICAN3=n \ - CONFIG_PCH_CAN=n \ - CONFIG_CAN_GRCAN=n \ - CONFIG_CAN_CC770=n \ - CONFIG_CAN_MSCAN=n \ - CONFIG_CAN_SJA1000=n \ - CONFIG_CAN_SOFTING=n \ - CONFIG_NET_EMATCH_CANID=n \ - CONFIG_CAN_DEBUG_DEVICES=n - FILES:=$(LINUX_DIR)/drivers/net/can/dev/can-dev.ko \ - $(LINUX_DIR)/net/can/can.ko - AUTOLOAD:=$(call AutoProbe,can can-dev) -endef - -define KernelPackage/can/description - Kernel module for CAN bus support. -endef - -$(eval $(call KernelPackage,can)) - - -define AddDepends/can - SUBMENU:=$(CAN_MENU) - DEPENDS+=kmod-can $(1) -endef - - -define KernelPackage/can-bcm - TITLE:=Broadcast Manager CAN Protcol - KCONFIG:=CONFIG_CAN_BCM - FILES:=$(LINUX_DIR)/net/can/can-bcm.ko - AUTOLOAD:=$(call AutoProbe,can-bcm) - $(call AddDepends/can) -endef - -define KernelPackage/can-bcm/description - The Broadcast Manager offers content filtering, timeout monitoring, - sending of RTR frames, and cyclic CAN messages without permanent user - interaction. -endef - -$(eval $(call KernelPackage,can-bcm)) - - -define KernelPackage/can-c-can - TITLE:=BOSCH C_CAN/D_CAN drivers - KCONFIG:=CONFIG_CAN_C_CAN - FILES:=$(LINUX_DIR)/drivers/net/can/c_can/c_can.ko - AUTOLOAD:=$(call AutoProbe,c_can) - $(call AddDepends/can) -endef - -define KernelPackage/can-c-can/description - This driver adds generic support for the C_CAN/D_CAN chips. -endef - -$(eval $(call KernelPackage,can-c-can)) - - -define KernelPackage/can-c-can-pci - TITLE:=PCI Bus based BOSCH C_CAN/D_CAN driver - KCONFIG:=CONFIG_CAN_C_CAN_PCI - DEPENDS:=kmod-can-c-can @PCI_SUPPORT - FILES:=$(LINUX_DIR)/drivers/net/can/c_can/c_can_pci.ko - AUTOLOAD:=$(call AutoProbe,c_can_pci) - $(call AddDepends/can) -endef - -define KernelPackage/can-c-can-pci/description - This driver adds support for the C_CAN/D_CAN chips connected - to the PCI bus. -endef - -$(eval $(call KernelPackage,can-c-can-pci)) - - -define KernelPackage/can-c-can-platform - TITLE:=Platform Bus based BOSCH C_CAN/D_CAN driver - KCONFIG:=CONFIG_CAN_C_CAN_PLATFORM - DEPENDS:=kmod-can-c-can +kmod-regmap-core - FILES:=$(LINUX_DIR)/drivers/net/can/c_can/c_can_platform.ko - AUTOLOAD:=$(call AutoProbe,c_can_platform) - $(call AddDepends/can) -endef - -define KernelPackage/can-c-can-platform/description - This driver adds support for the C_CAN/D_CAN chips connected - to the "platform bus" (Linux abstraction for directly to the - processor attached devices) which can be found on various - boards from ST Microelectronics (http://www.st.com) like the - SPEAr1310 and SPEAr320 evaluation boards & TI (www.ti.com) - boards like am335x, dm814x, dm813x and dm811x. -endef - -$(eval $(call KernelPackage,can-c-can-platform)) - - -define KernelPackage/can-flexcan - TITLE:=Support for Freescale FLEXCAN based chips - KCONFIG:=CONFIG_CAN_FLEXCAN - FILES:=$(LINUX_DIR)/drivers/net/can/flexcan.ko - AUTOLOAD:=$(call AutoProbe,flexcan) - $(call AddDepends/can,@TARGET_imx) -endef - -define KernelPackage/can-flexcan/description - Freescale FLEXCAN CAN bus controller implementation. -endef - -$(eval $(call KernelPackage,can-flexcan)) - - -define KernelPackage/can-gw - TITLE:=CAN Gateway/Router - KCONFIG:=CONFIG_CAN_GW - FILES:=$(LINUX_DIR)/net/can/can-gw.ko - AUTOLOAD:=$(call AutoProbe,can-gw) - $(call AddDepends/can) -endef - -define KernelPackage/can-gw/description - The CAN Gateway/Router is used to route (and modify) CAN frames. -endef - -$(eval $(call KernelPackage,can-gw)) - - -define KernelPackage/can-mcp251x - TITLE:=MCP251x SPI CAN controller - KCONFIG:=\ - CONFIG_SPI=y \ - CONFIG_CAN_MCP251X - FILES:=$(LINUX_DIR)/drivers/net/can/spi/mcp251x.ko - AUTOLOAD:=$(call AutoProbe,can-mcp251x) - $(call AddDepends/can) -endef - -define KernelPackage/can-mcp251x/description - Microchip MCP251x SPI CAN controller -endef - -$(eval $(call KernelPackage,can-mcp251x)) - - -define KernelPackage/can-raw - TITLE:=Raw CAN Protcol - KCONFIG:=CONFIG_CAN_RAW - FILES:=$(LINUX_DIR)/net/can/can-raw.ko - AUTOLOAD:=$(call AutoProbe,can-raw) - $(call AddDepends/can) -endef - -define KernelPackage/can-raw/description - The raw CAN protocol option offers access to the CAN bus via - the BSD socket API. -endef - -$(eval $(call KernelPackage,can-raw)) - - -define KernelPackage/can-slcan - TITLE:=Serial / USB serial CAN Adaptors (slcan) - KCONFIG:=CONFIG_CAN_SLCAN - FILES:=$(LINUX_DIR)/drivers/net/can/slcan.ko - AUTOLOAD:=$(call AutoProbe,slcan) - $(call AddDepends/can) -endef - -define KernelPackage/can-slcan/description - CAN driver for several 'low cost' CAN interfaces that are attached - via serial lines or via USB-to-serial adapters using the LAWICEL - ASCII protocol. -endef - -$(eval $(call KernelPackage,can-slcan)) - - -define KernelPackage/can-usb-8dev - TITLE:=8 devices USB2CAN interface - KCONFIG:=CONFIG_CAN_8DEV_USB - FILES:=$(LINUX_DIR)/drivers/net/can/usb/usb_8dev.ko - AUTOLOAD:=$(call AutoProbe,usb_8dev) - $(call AddDepends/can,+kmod-usb-core) -endef - -define KernelPackage/can-usb-8dev/description - This driver supports the USB2CAN interface - from 8 devices (http://www.8devices.com). -endef - -$(eval $(call KernelPackage,can-usb-8dev)) - - -define KernelPackage/can-usb-ems - TITLE:=EMS CPC-USB/ARM7 CAN/USB interface - KCONFIG:=CONFIG_CAN_EMS_USB - FILES:=$(LINUX_DIR)/drivers/net/can/usb/ems_usb.ko - AUTOLOAD:=$(call AutoProbe,ems_usb) - $(call AddDepends/can,+kmod-usb-core) -endef - -define KernelPackage/can-usb-ems/description - This driver is for the one channel CPC-USB/ARM7 CAN/USB interface - from EMS Dr. Thomas Wuensche (http://www.ems-wuensche.de). -endef - -$(eval $(call KernelPackage,can-usb-ems)) - - -define KernelPackage/can-usb-esd - TITLE:=ESD USB/2 CAN/USB interface - KCONFIG:=CONFIG_CAN_ESD_USB2 - FILES:=$(LINUX_DIR)/drivers/net/can/usb/esd_usb2.ko - AUTOLOAD:=$(call AutoProbe,esd_usb2) - $(call AddDepends/can,+kmod-usb-core) -endef - -define KernelPackage/can-usb-esd/description - This driver supports the CAN-USB/2 interface - from esd electronic system design gmbh (http://www.esd.eu). -endef - -$(eval $(call KernelPackage,can-usb-esd)) - - -define KernelPackage/can-usb-kvaser - TITLE:=Kvaser CAN/USB interface - KCONFIG:=CONFIG_CAN_KVASER_USB - FILES:= \ - $(LINUX_DIR)/drivers/net/can/usb/kvaser_usb/kvaser_usb.ko - AUTOLOAD:=$(call AutoProbe,kvaser_usb) - $(call AddDepends/can,+kmod-usb-core) -endef - -define KernelPackage/can-usb-kvaser/description - This driver adds support for Kvaser CAN/USB devices like Kvaser - Leaf Light. -endef - -$(eval $(call KernelPackage,can-usb-kvaser)) - - -define KernelPackage/can-usb-peak - TITLE:=PEAK PCAN-USB/USB Pro interfaces - KCONFIG:=CONFIG_CAN_PEAK_USB - FILES:=$(LINUX_DIR)/drivers/net/can/usb/peak_usb/peak_usb.ko - AUTOLOAD:=$(call AutoProbe,peak_usb) - $(call AddDepends/can,+kmod-usb-core) -endef - -define KernelPackage/can-usb-peak/description - This driver supports the PCAN-USB and PCAN-USB Pro adapters - from PEAK-System Technik (http://www.peak-system.com). -endef - -$(eval $(call KernelPackage,can-usb-peak)) - - -define KernelPackage/can-vcan - TITLE:=Virtual Local CAN Interface (vcan) - KCONFIG:=CONFIG_CAN_VCAN - FILES:=$(LINUX_DIR)/drivers/net/can/vcan.ko - AUTOLOAD:=$(call AutoProbe,vcan) - $(call AddDepends/can) -endef - -define KernelPackage/can-vcan/description - Similar to the network loopback devices, vcan offers a - virtual local CAN interface. -endef - -$(eval $(call KernelPackage,can-vcan)) - -define KernelPackage/can-xilinx-can - TITLE:=Xilinx CAN IP - KCONFIG:=CONFIG_CAN_XILINXCAN - FILES:=$(LINUX_DIR)/drivers/net/can/xilinx_can.ko - AUTOLOAD:=$(call AutoProbe,xilinx_can) - $(call AddDepends/can,@TARGET_zynq) -endef - -define KernelPackage/can-xilinx-can/description - Xilinx CAN driver. This driver supports both - soft AXI CAN IP and Zynq CANPS IP. -endef - -$(eval $(call KernelPackage,can-xilinx-can)) diff --git a/root/package/kernel/linux/modules/crypto.mk b/root/package/kernel/linux/modules/crypto.mk index 38d3d457..7ee603d5 100755 --- a/root/package/kernel/linux/modules/crypto.mk +++ b/root/package/kernel/linux/modules/crypto.mk @@ -287,7 +287,7 @@ define KernelPackage/crypto-ghash/arm-ce AUTOLOAD+=$(call AutoLoad,09,ghash-arm-ce) endef -KernelPackage/crypto-ghash/imx=$(KernelPackage/crypto-ghash/arm-ce) +KernelPackage/crypto-ghash/imx6=$(KernelPackage/crypto-ghash/arm-ce) KernelPackage/crypto-ghash/ipq40xx=$(KernelPackage/crypto-ghash/arm-ce) KernelPackage/crypto-ghash/mvebu/cortexa9=$(KernelPackage/crypto-ghash/arm-ce) @@ -447,23 +447,13 @@ endef $(eval $(call KernelPackage,crypto-kpp)) -define KernelPackage/crypto-lib-blake2s-generic - TITLE:=BLAKE2s hash function library generic - DEPENDS:=@(!CONFIG_arm&&!TARGET_x86) - KCONFIG:=CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC - HIDDEN:=1 - FILES:= $(LINUX_DIR)/lib/crypto/libblake2s-generic.ko - $(call AddDepends/crypto,+PACKAGE_kmod-crypto-hash:kmod-crypto-hash) -endef - -$(eval $(call KernelPackage,crypto-lib-blake2s-generic)) - define KernelPackage/crypto-lib-blake2s TITLE:=BLAKE2s hash function library - DEPENDS:=+kmod-crypto-lib-blake2s-generic KCONFIG:=CONFIG_CRYPTO_LIB_BLAKE2S HIDDEN:=1 - FILES:= $(LINUX_DIR)/lib/crypto/libblake2s.ko + FILES:= \ + $(LINUX_DIR)/lib/crypto/libblake2s.ko@lt5.14 \ + $(LINUX_DIR)/lib/crypto/libblake2s-generic.ko@lt5.14 $(call AddDepends/crypto,+PACKAGE_kmod-crypto-hash:kmod-crypto-hash) endef @@ -476,16 +466,6 @@ define KernelPackage/crypto-lib-blake2s/x86/64 FILES+=$(LINUX_DIR)/arch/x86/crypto/blake2s-x86_64.ko endef -define KernelPackage/crypto-lib-blake2s/arm - KCONFIG+=CONFIG_CRYPTO_BLAKE2S_ARM - FILES+=$(LINUX_DIR)/arch/arm/crypto/blake2s-arm.ko -endef - -ifdef KernelPackage/crypto-lib-blake2s/$(ARCH) - KernelPackage/crypto-lib-blake2s/$(CRYPTO_TARGET)=\ - $(KernelPackage/crypto-lib-blake2s/$(ARCH)) -endif - $(eval $(call KernelPackage,crypto-lib-blake2s)) @@ -703,7 +683,7 @@ define KernelPackage/crypto-misc CONFIG_CRYPTO_KHAZAD \ CONFIG_CRYPTO_SERPENT \ CONFIG_CRYPTO_TEA \ - CONFIG_CRYPTO_TGR192@lt5.12 \ + CONFIG_CRYPTO_TGR192 \ CONFIG_CRYPTO_TWOFISH \ CONFIG_CRYPTO_TWOFISH_COMMON \ CONFIG_CRYPTO_TWOFISH_586 \ @@ -716,7 +696,7 @@ define KernelPackage/crypto-misc $(LINUX_DIR)/crypto/cast6_generic.ko \ $(LINUX_DIR)/crypto/khazad.ko \ $(LINUX_DIR)/crypto/tea.ko \ - $(LINUX_DIR)/crypto/tgr192.ko@lt5.12 \ + $(LINUX_DIR)/crypto/tgr192.ko@lt5.14 \ $(LINUX_DIR)/crypto/twofish_common.ko \ $(LINUX_DIR)/crypto/wp512.ko \ $(LINUX_DIR)/crypto/twofish_generic.ko \ @@ -724,7 +704,7 @@ define KernelPackage/crypto-misc $(LINUX_DIR)/crypto/blowfish_generic.ko \ $(LINUX_DIR)/crypto/serpent_generic.ko AUTOLOAD:=$(call AutoLoad,10,anubis camellia_generic cast_common \ - cast5_generic cast6_generic khazad tea tgr192@lt5.12 twofish_common \ + cast5_generic cast6_generic khazad tea tgr192 twofish_common \ wp512 blowfish_common serpent_generic) ifndef CONFIG_TARGET_x86 AUTOLOAD+= $(call AutoLoad,10,twofish_generic blowfish_generic) @@ -737,7 +717,7 @@ ifndef CONFIG_TARGET_x86_64 FILES+= \ $(LINUX_DIR)/arch/x86/crypto/twofish-i586.ko \ $(LINUX_DIR)/arch/x86/crypto/serpent-sse2-i586.ko \ - $(LINUX_DIR)/arch/x86/crypto/glue_helper.ko \ + $(LINUX_DIR)/arch/x86/crypto/glue_helper.ko@lt5.14 \ $(LINUX_DIR)/crypto/cryptd.ko \ $(LINUX_DIR)/crypto/crypto_simd.ko AUTOLOAD+= $(call AutoLoad,10,cryptd glue_helper \ @@ -877,7 +857,7 @@ define KernelPackage/crypto-sha1/arm-neon AUTOLOAD+=$(call AutoLoad,09,sha1-arm-neon) endef -KernelPackage/crypto-sha1/imx=$(KernelPackage/crypto-sha1/arm-neon) +KernelPackage/crypto-sha1/imx6=$(KernelPackage/crypto-sha1/arm-neon) KernelPackage/crypto-sha1/ipq40xx=$(KernelPackage/crypto-sha1/arm-neon) KernelPackage/crypto-sha1/mvebu/cortexa9=$(KernelPackage/crypto-sha1/arm-neon) @@ -941,7 +921,7 @@ define KernelPackage/crypto-sha512/arm AUTOLOAD+=$(call AutoLoad,09,sha512-arm) endef -KernelPackage/crypto-sha512/imx=$(KernelPackage/crypto-sha512/arm) +KernelPackage/crypto-sha512/imx6=$(KernelPackage/crypto-sha512/arm) KernelPackage/crypto-sha512/ipq40xx=$(KernelPackage/crypto-sha512/arm) KernelPackage/crypto-sha512/mvebu/cortexa9=$(KernelPackage/crypto-sha512/arm) diff --git a/root/package/kernel/linux/modules/firewire.mk b/root/package/kernel/linux/modules/firewire.mk deleted file mode 100755 index 1e2d9427..00000000 --- a/root/package/kernel/linux/modules/firewire.mk +++ /dev/null @@ -1,76 +0,0 @@ -# -# Copyright (C) 2008-2011 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -FIREWIRE_MENU:=FireWire support - -define KernelPackage/firewire - SUBMENU:=$(FIREWIRE_MENU) - TITLE:=Support for FireWire (new stack) - DEPENDS:=@PCI_SUPPORT +kmod-lib-crc-itu-t - KCONFIG:=CONFIG_FIREWIRE - FILES:=$(LINUX_DIR)/drivers/firewire/firewire-core.ko -endef - -define KernelPackage/firewire/description - Kernel support for FireWire (new stack) -endef - -$(eval $(call KernelPackage,firewire)) - - -define KernelPackage/firewire-net - SUBMENU:=$(FIREWIRE_MENU) - TITLE:=Support for IP networking over FireWire - DEPENDS:=kmod-firewire - KCONFIG:=CONFIG_FIREWIRE_NET - FILES:=$(LINUX_DIR)/drivers/firewire/firewire-net.ko - AUTOLOAD:=$(call AutoProbe,firewire-net) -endef - -define KernelPackage/firewire-net/description - Kernel support for IPv4 over FireWire -endef - -$(eval $(call KernelPackage,firewire-net)) - - -define KernelPackage/firewire-ohci - SUBMENU:=$(FIREWIRE_MENU) - TITLE:=Support for OHCI-1394 controllers - DEPENDS:=kmod-firewire - KCONFIG:= \ - CONFIG_FIREWIRE_OHCI \ - CONFIG_FIREWIRE_OHCI_DEBUG=n \ - CONFIG_FIREWIRE_OHCI_REMOTE_DMA=n - FILES:=$(LINUX_DIR)/drivers/firewire/firewire-ohci.ko - AUTOLOAD:=$(call AutoProbe,firewire-ohci) -endef - - -define KernelPackage/firewire-ohci/description - Kernel support for FireWire OHCI-1394 controllers -endef - -$(eval $(call KernelPackage,firewire-ohci)) - - -define KernelPackage/firewire-sbp2 - SUBMENU:=$(FIREWIRE_MENU) - TITLE:=Support for SBP-2 devices over FireWire - DEPENDS:=kmod-firewire +kmod-scsi-core - KCONFIG:=CONFIG_FIREWIRE_SBP2 - FILES:=$(LINUX_DIR)/drivers/firewire/firewire-sbp2.ko - AUTOLOAD:=$(call AutoProbe,firewire-sbp2) -endef - -define KernelPackage/firewire-sbp2/description - Kernel support for SBP-2 devices over FireWire -endef - -$(eval $(call KernelPackage,firewire-sbp2)) - - diff --git a/root/package/kernel/linux/modules/fs.mk b/root/package/kernel/linux/modules/fs.mk index e74bcf84..8c5c787d 100755 --- a/root/package/kernel/linux/modules/fs.mk +++ b/root/package/kernel/linux/modules/fs.mk @@ -70,6 +70,7 @@ define KernelPackage/fs-btrfs DEPENDS:=+kmod-lib-crc32c +kmod-lib-lzo +kmod-lib-zlib-inflate +kmod-lib-zlib-deflate +kmod-lib-raid6 +kmod-lib-xor +kmod-lib-zstd KCONFIG:=\ CONFIG_BTRFS_FS \ + CONFIG_BTRFS_FS_POSIX_ACL=n \ CONFIG_BTRFS_FS_CHECK_INTEGRITY=n FILES:=\ $(LINUX_DIR)/fs/btrfs/btrfs.ko @@ -87,30 +88,24 @@ define KernelPackage/fs-cifs SUBMENU:=$(FS_MENU) TITLE:=CIFS support KCONFIG:= \ - CONFIG_SMBFS_COMMON@ge5.15 \ CONFIG_CIFS \ CONFIG_CIFS_DFS_UPCALL=n \ CONFIG_CIFS_UPCALL=n - FILES:= \ - $(LINUX_DIR)/fs/smbfs_common/cifs_arc4.ko@ge5.15 \ - $(LINUX_DIR)/fs/smbfs_common/cifs_md4.ko@ge5.15 \ - $(LINUX_DIR)/fs/cifs/cifs.ko + FILES:=$(LINUX_DIR)/fs/cifs/cifs.ko AUTOLOAD:=$(call AutoLoad,30,cifs) $(call AddDepends/nls) DEPENDS+= \ - +(LINUX_5_4||LINUX_5_10):kmod-crypto-md4\ - +(LINUX_5_4||LINUX_5_10):kmod-crypto-arc4 \ + +kmod-crypto-md4 \ +kmod-crypto-md5 \ +kmod-crypto-sha256 \ +kmod-crypto-sha512 \ +kmod-crypto-cmac \ +kmod-crypto-hmac \ + +kmod-crypto-arc4 \ +kmod-crypto-aead \ +kmod-crypto-ccm \ +kmod-crypto-ecb \ - +(LINUX_5_15):kmod-asn1-decoder \ - +(LINUX_5_15):kmod-oid-registry \ - +(LINUX_5_15):kmod-dnsresolver + +kmod-crypto-des endef define KernelPackage/fs-cifs/description @@ -245,21 +240,10 @@ endef $(eval $(call KernelPackage,fs-f2fs)) -define KernelPackage/fs-netfs - SUBMENU:=$(FS_MENU) - TITLE:=Network Filesystems support - DEPENDS:=@LINUX_5_15 - KCONFIG:= CONFIG_NETFS_SUPPORT - FILES:=$(LINUX_DIR)/fs/netfs/netfs.ko - AUTOLOAD:=$(call AutoLoad,28,netfs) -endef - -$(eval $(call KernelPackage,fs-netfs)) - define KernelPackage/fs-fscache SUBMENU:=$(FS_MENU) TITLE:=General filesystem local cache manager - DEPENDS:=+kmod-fs-netfs + DEPENDS:= KCONFIG:=\ CONFIG_FSCACHE=m \ CONFIG_FSCACHE_STATS=y \ @@ -394,20 +378,9 @@ endef $(eval $(call KernelPackage,fs-nfs)) -define KernelPackage/fs-nfs-ssc - SUBMENU:=$(FS_MENU) - TITLE:=Common NFS filesystem SSC Helper module - KCONFIG:= CONFIG_NFS_V4_2@ge5.15 - FILES:= $(LINUX_DIR)/fs/nfs_common/nfs_ssc.ko@ge5.10 - AUTOLOAD:=$(call AutoLoad,30,nfs_ssc) -endef - -$(eval $(call KernelPackage,fs-nfs-ssc)) - define KernelPackage/fs-nfs-common SUBMENU:=$(FS_MENU) TITLE:=Common NFS filesystem modules - DEPENDS:=+LINUX_5_10:kmod-fs-nfs-ssc KCONFIG:= \ CONFIG_LOCKD \ CONFIG_SUNRPC \ @@ -415,7 +388,8 @@ define KernelPackage/fs-nfs-common FILES:= \ $(LINUX_DIR)/fs/lockd/lockd.ko \ $(LINUX_DIR)/net/sunrpc/sunrpc.ko \ - $(LINUX_DIR)/fs/nfs_common/grace.ko + $(LINUX_DIR)/fs/nfs_common/grace.ko \ + $(LINUX_DIR)/fs/nfs_common/nfs_ssc.ko@eq5.10 AUTOLOAD:=$(call AutoLoad,30,grace sunrpc lockd) endef @@ -434,15 +408,15 @@ define KernelPackage/fs-nfs-common-rpcsec +kmod-crypto-sha1 \ +kmod-crypto-hmac \ +kmod-crypto-ecb \ - +kmod-crypto-arc4 \ - +kmod-oid-registry + +kmod-crypto-arc4 KCONFIG:= \ CONFIG_SUNRPC_GSS \ CONFIG_RPCSEC_GSS_KRB5 FILES:= \ + $(LINUX_DIR)/lib/oid_registry.ko \ $(LINUX_DIR)/net/sunrpc/auth_gss/auth_rpcgss.ko \ $(LINUX_DIR)/net/sunrpc/auth_gss/rpcsec_gss_krb5.ko - AUTOLOAD:=$(call AutoLoad,31,auth_rpcgss rpcsec_gss_krb5) + AUTOLOAD:=$(call AutoLoad,31,oid_registry auth_rpcgss rpcsec_gss_krb5) endef define KernelPackage/fs-nfs-common-rpcsec/description @@ -471,7 +445,7 @@ $(eval $(call KernelPackage,fs-nfs-v3)) define KernelPackage/fs-nfs-v4 SUBMENU:=$(FS_MENU) TITLE:=NFS4 filesystem client support - DEPENDS:=+kmod-fs-nfs +LINUX_5_15:kmod-fs-nfs-ssc + DEPENDS:=+kmod-fs-nfs KCONFIG:= \ CONFIG_NFS_V4=y FILES:= \ diff --git a/root/package/kernel/linux/modules/hwmon.mk b/root/package/kernel/linux/modules/hwmon.mk deleted file mode 100755 index 9f752937..00000000 --- a/root/package/kernel/linux/modules/hwmon.mk +++ /dev/null @@ -1,558 +0,0 @@ -# -# Copyright (C) 2006-2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -HWMON_MENU:=Hardware Monitoring Support - -define KernelPackage/hwmon-core - SUBMENU:=$(HWMON_MENU) - TITLE:=Hardware monitoring support - KCONFIG:= \ - CONFIG_HWMON \ - CONFIG_HWMON_DEBUG_CHIP=n - FILES:= \ - $(LINUX_DIR)/drivers/hwmon/hwmon.ko -endef - -define KernelPackage/hwmon-core/description - Kernel modules for hardware monitoring -endef - -$(eval $(call KernelPackage,hwmon-core)) - - -define AddDepends/hwmon - SUBMENU:=$(HWMON_MENU) - DEPENDS:=+kmod-hwmon-core $(1) -endef - -define KernelPackage/hwmon-ad7418 - TITLE:=AD741x monitoring support - KCONFIG:=CONFIG_SENSORS_AD7418 - FILES:=$(LINUX_DIR)/drivers/hwmon/ad7418.ko - AUTOLOAD:=$(call AutoLoad,60,ad7418 ad7418) - $(call AddDepends/hwmon,+kmod-i2c-core) -endef - -define KernelPackage/hwmon-ad7418/description - Kernel module for Analog Devices AD7416, AD7417 and AD7418 temperature monitor chip -endef - -$(eval $(call KernelPackage,hwmon-ad7418)) - -define KernelPackage/hwmon-adt7410 - TITLE:=ADT7410 monitoring support - KCONFIG:= \ - CONFIG_SENSORS_ADT7X10 \ - CONFIG_SENSORS_ADT7410 - FILES:= \ - $(LINUX_DIR)/drivers/hwmon/adt7x10.ko \ - $(LINUX_DIR)/drivers/hwmon/adt7410.ko - AUTOLOAD:=$(call AutoLoad,60,adt7x10 adt7410) - $(call AddDepends/hwmon,+kmod-i2c-core) -endef - -define KernelPackage/hwmon-adt7410/description - Kernel module for ADT7410/7420 I2C thermal monitor chip -endef - -$(eval $(call KernelPackage,hwmon-adt7410)) - - -define KernelPackage/hwmon-adt7475 - TITLE:=ADT7473/7475/7476/7490 monitoring support - KCONFIG:=CONFIG_SENSORS_ADT7475 - FILES:=$(LINUX_DIR)/drivers/hwmon/adt7475.ko - AUTOLOAD:=$(call AutoProbe,adt7475) - $(call AddDepends/hwmon,+kmod-i2c-core +kmod-hwmon-vid) -endef - -define KernelPackage/hwmon-adt7475/description - Kernel module for ADT7473/7475/7476/7490 thermal monitor chip -endef - -$(eval $(call KernelPackage,hwmon-adt7475)) - - -define KernelPackage/hwmon-dme1737 - TITLE:=SMSC DME1737 and compatible monitoring support - KCONFIG:=CONFIG_SENSORS_DME1737 - FILES:= \ - $(LINUX_DIR)/drivers/hwmon/dme1737.ko - AUTOLOAD:=$(call AutoProbe,dme1737) - $(call AddDepends/hwmon,+kmod-i2c-core +kmod-hwmon-vid) -endef - -define KernelPackage/hwmon-dme1737/description - SMSC DME1737, SCH3112, SCH3114, SCH3116, SCH5027 monitoring support -endef - -$(eval $(call KernelPackage,hwmon-dme1737)) - - -define KernelPackage/hwmon-drivetemp - TITLE:=Hard disk drives with temperature sensor - KCONFIG:=CONFIG_SENSORS_DRIVETEMP - FILES:=$(LINUX_DIR)/drivers/hwmon/drivetemp.ko - AUTOLOAD:=$(call AutoLoad,60,drivetemp) - $(call AddDepends/hwmon,+kmod-ata-core +kmod-scsi-core) -endef - -define KernelPackage/hwmon-drivetemp/description - Kernel module for Hard disk drives with temperature sensor -endef - -$(eval $(call KernelPackage,hwmon-drivetemp)) - - -define KernelPackage/hwmon-gpiofan - TITLE:=Generic GPIO FAN support - KCONFIG:=CONFIG_SENSORS_GPIO_FAN - FILES:=$(LINUX_DIR)/drivers/hwmon/gpio-fan.ko - AUTOLOAD:=$(call AutoLoad,60,gpio-fan) - $(call AddDepends/hwmon,+kmod-i2c-core +PACKAGE_kmod-thermal:kmod-thermal) -endef - -define KernelPackage/hwmon-gpiofan/description - Kernel module for GPIO controlled FANs -endef - -$(eval $(call KernelPackage,hwmon-gpiofan)) - - -define KernelPackage/hwmon-f71882fg - TITLE:=F71882FG compatible monitoring support - KCONFIG:=CONFIG_SENSORS_F71882FG - FILES:=$(LINUX_DIR)/drivers/hwmon/f71882fg.ko - AUTOLOAD:=$(call AutoProbe,f71882fg) - $(call AddDepends/hwmon,@TARGET_x86) -endef - -define KernelPackage/hwmon-f71882fg/description - Kernel module for hardware monitoring via many Fintek Super-IO chips. -endef - -$(eval $(call KernelPackage,hwmon-f71882fg)) - - -define KernelPackage/hwmon-ina209 - TITLE:=INA209 monitoring support - KCONFIG:=CONFIG_SENSORS_INA209 - FILES:=$(LINUX_DIR)/drivers/hwmon/ina209.ko - AUTOLOAD:=$(call AutoProbe,ina209) - $(call AddDepends/hwmon,+kmod-i2c-core) -endef - -define KernelPackage/hwmon-ina209/description - Kernel module for ina209 dc power monitor chips -endef - -$(eval $(call KernelPackage,hwmon-ina209)) - - -define KernelPackage/hwmon-ina2xx - TITLE:=INA2XX monitoring support - KCONFIG:=CONFIG_SENSORS_INA2XX - FILES:=$(LINUX_DIR)/drivers/hwmon/ina2xx.ko - AUTOLOAD:=$(call AutoProbe,ina2xx) - $(call AddDepends/hwmon,+kmod-i2c-core +kmod-regmap-i2c) -endef - -define KernelPackage/hwmon-ina2xx/description - Kernel module for ina2xx dc current monitor chips -endef - -$(eval $(call KernelPackage,hwmon-ina2xx)) - - -define KernelPackage/hwmon-it87 - TITLE:=IT87 monitoring support - KCONFIG:=CONFIG_SENSORS_IT87 - FILES:=$(LINUX_DIR)/drivers/hwmon/it87.ko - AUTOLOAD:=$(call AutoProbe,it87) - $(call AddDepends/hwmon,+kmod-i2c-core +kmod-hwmon-vid +PACKAGE_kmod-thermal:kmod-thermal) -endef - -define KernelPackage/hwmon-it87/description - Kernel module for it87 thermal and voltage monitor chip -endef - -$(eval $(call KernelPackage,hwmon-it87)) - - -define KernelPackage/hwmon-lm63 - TITLE:=LM63/64 monitoring support - KCONFIG:=CONFIG_SENSORS_LM63 - FILES:=$(LINUX_DIR)/drivers/hwmon/lm63.ko - AUTOLOAD:=$(call AutoProbe,lm63) - $(call AddDepends/hwmon,+kmod-i2c-core +kmod-regmap-i2c) -endef - -define KernelPackage/hwmon-lm63/description - Kernel module for lm63 and lm64 thermal monitor chip -endef - -$(eval $(call KernelPackage,hwmon-lm63)) - - -define KernelPackage/hwmon-lm75 - TITLE:=LM75 monitoring support - KCONFIG:=CONFIG_SENSORS_LM75 - FILES:=$(LINUX_DIR)/drivers/hwmon/lm75.ko - AUTOLOAD:=$(call AutoProbe,lm75) - $(call AddDepends/hwmon,+kmod-i2c-core +PACKAGE_kmod-thermal:kmod-thermal +kmod-regmap-i2c) -endef - -define KernelPackage/hwmon-lm75/description - Kernel module for lm75 thermal monitor chip -endef - -$(eval $(call KernelPackage,hwmon-lm75)) - - -define KernelPackage/hwmon-lm77 - TITLE:=LM77 monitoring support - KCONFIG:=CONFIG_SENSORS_LM77 - FILES:=$(LINUX_DIR)/drivers/hwmon/lm77.ko - AUTOLOAD:=$(call AutoProbe,lm77) - $(call AddDepends/hwmon,+kmod-i2c-core) -endef - -define KernelPackage/hwmon-lm77/description - Kernel module for LM77 thermal monitor chip -endef - -$(eval $(call KernelPackage,hwmon-lm77)) - - -define KernelPackage/hwmon-lm85 - TITLE:=LM85 monitoring support - KCONFIG:=CONFIG_SENSORS_LM85 - FILES:=$(LINUX_DIR)/drivers/hwmon/lm85.ko - AUTOLOAD:=$(call AutoProbe,lm85) - $(call AddDepends/hwmon,+kmod-i2c-core +kmod-hwmon-vid) -endef - -define KernelPackage/hwmon-lm85/description - Kernel module for LM85 thermal monitor chip -endef - -$(eval $(call KernelPackage,hwmon-lm85)) - - -define KernelPackage/hwmon-lm90 - TITLE:=LM90 monitoring support - KCONFIG:=CONFIG_SENSORS_LM90 - FILES:=$(LINUX_DIR)/drivers/hwmon/lm90.ko - AUTOLOAD:=$(call AutoProbe,lm90) - $(call AddDepends/hwmon,+kmod-i2c-core) -endef - -define KernelPackage/hwmon-lm90/description - Kernel module for LM90 thermal monitor chip -endef - -$(eval $(call KernelPackage,hwmon-lm90)) - - -define KernelPackage/hwmon-lm92 - TITLE:=LM92 monitoring support - KCONFIG:=CONFIG_SENSORS_LM92 - FILES:=$(LINUX_DIR)/drivers/hwmon/lm92.ko - AUTOLOAD:=$(call AutoProbe,lm92) - $(call AddDepends/hwmon,+kmod-i2c-core) -endef - -define KernelPackage/hwmon-lm92/description - Kernel module for LM92 thermal monitor chip -endef - -$(eval $(call KernelPackage,hwmon-lm92)) - - -define KernelPackage/hwmon-lm95241 - TITLE:=LM95241 monitoring support - KCONFIG:=CONFIG_SENSORS_LM95241 - FILES:=$(LINUX_DIR)/drivers/hwmon/lm95241.ko - AUTOLOAD:=$(call AutoProbe,lm95241) - $(call AddDepends/hwmon,+kmod-i2c-core) -endef - -define KernelPackage/hwmon-lm95241/description - Kernel module for LM95241 thermal monitor chip -endef - -$(eval $(call KernelPackage,hwmon-lm95241)) - - -define KernelPackage/hwmon-ltc4151 - TITLE:=LTC4151 monitoring support - KCONFIG:=CONFIG_SENSORS_LTC4151 - FILES:=$(LINUX_DIR)/drivers/hwmon/ltc4151.ko - AUTOLOAD:=$(call AutoProbe,ltc4151) - $(call AddDepends/hwmon,+kmod-i2c-core) -endef - -define KernelPackage/hwmon-ltc4151/description - Kernel module for Linear Technology LTC4151 current and voltage monitor chip -endef - -$(eval $(call KernelPackage,hwmon-ltc4151)) - - -define KernelPackage/hwmon-mcp3021 - TITLE:=MCP3021/3221 monitoring support - KCONFIG:=CONFIG_SENSORS_MCP3021 - FILES:=$(LINUX_DIR)/drivers/hwmon/mcp3021.ko - AUTOLOAD:=$(call AutoProbe,mcp3021) - $(call AddDepends/hwmon,+kmod-i2c-core) -endef - -define KernelPackage/hwmon-mcp3021/description - Kernel module for Linear Technology MCP3021/3221 current and voltage monitor chip -endef - -$(eval $(call KernelPackage,hwmon-mcp3021)) - - -define KernelPackage/hwmon-nct6775 - TITLE:=NCT6106D/6775F/6776F/6779D/6791D/6792D/6793D and compatibles monitoring support - KCONFIG:=CONFIG_SENSORS_NCT6775 - FILES:=$(LINUX_DIR)/drivers/hwmon/nct6775.ko - AUTOLOAD:=$(call AutoProbe,nct6775) - $(call AddDepends/hwmon,@PCI_SUPPORT @TARGET_x86 +kmod-hwmon-vid) -endef - -define KernelPackage/hwmon-nct6775/description - Kernel module for NCT6106D/6775F/6776F/6779D/6791D/6792D/6793D thermal monitor chip -endef - -$(eval $(call KernelPackage,hwmon-nct6775)) - - -define KernelPackage/hwmon-pc87360 - TITLE:=PC87360 monitoring support - KCONFIG:=CONFIG_SENSORS_PC87360 - FILES:=$(LINUX_DIR)/drivers/hwmon/pc87360.ko - AUTOLOAD:=$(call AutoProbe,pc87360) - $(call AddDepends/hwmon,@TARGET_x86 +kmod-hwmon-vid) -endef - -define KernelPackage/hwmon-pc87360/description - Kernel modules for PC87360 chips -endef - -$(eval $(call KernelPackage,hwmon-pc87360)) - - -define KernelPackage/pmbus-core - TITLE:=PMBus support - KCONFIG:= CONFIG_PMBUS - FILES:=$(LINUX_DIR)/drivers/hwmon/pmbus/pmbus_core.ko - $(call AddDepends/hwmon,+kmod-i2c-core) -endef - -define KernelPackage/pmbus-core/description - Kernel modules for Power Management Bus -endef - -$(eval $(call KernelPackage,pmbus-core)) - - -define KernelPackage/pmbus-zl6100 - TITLE:=Intersil / Zilker Labs ZL6100 hardware monitoring - KCONFIG:=CONFIG_SENSORS_ZL6100 - FILES:=$(LINUX_DIR)/drivers/hwmon/pmbus/zl6100.ko - AUTOLOAD:=$(call AutoProbe,zl6100) - $(call AddDepends/hwmon, +kmod-pmbus-core) -endef - -define KernelPackage/pmbus-zl6100/description - Kernel module for Intersil / Zilker Labs ZL6100 and -compatible digital DC-DC controllers -endef - -$(eval $(call KernelPackage,pmbus-zl6100)) - - -define KernelPackage/hwmon-pwmfan - TITLE:=Generic PWM FAN support - KCONFIG:=CONFIG_SENSORS_PWM_FAN - FILES:=$(LINUX_DIR)/drivers/hwmon/pwm-fan.ko - AUTOLOAD:=$(call AutoLoad,60,pwm-fan) - $(call AddDepends/hwmon, +PACKAGE_kmod-thermal:kmod-thermal) -endef - -define KernelPackage/hwmon-pwmfan/description - Kernel module for PWM controlled FANs -endef - -$(eval $(call KernelPackage,hwmon-pwmfan)) - - -define KernelPackage/hwmon-sch5627 - TITLE:=SMSC SCH5627 monitoring support - KCONFIG:= \ - CONFIG_SENSORS_SCH5627 \ - CONFIG_WATCHDOG_CORE=y - FILES:= \ - $(LINUX_DIR)/drivers/hwmon/sch5627.ko \ - $(LINUX_DIR)/drivers/hwmon/sch56xx-common.ko - AUTOLOAD:=$(call AutoProbe,sch5627) - $(call AddDepends/hwmon,+kmod-i2c-core) -endef - -define KernelPackage/hwmon-sch5627/description - SMSC SCH5627 Super I/O chips include complete hardware monitoring -endef - -$(eval $(call KernelPackage,hwmon-sch5627)) - - -define KernelPackage/hwmon-sht21 - TITLE:=Sensiron SHT21 and compat. monitoring support - KCONFIG:=CONFIG_SENSORS_SHT21 - FILES:=$(LINUX_DIR)/drivers/hwmon/sht21.ko - AUTOLOAD:=$(call AutoProbe,sht21) - $(call AddDepends/hwmon,+kmod-i2c-core) -endef - -define KernelPackage/hwmon-sht21/description - Kernel module for Sensirion SHT21 and SHT25 temperature and humidity sensors chip -endef - -$(eval $(call KernelPackage,hwmon-sht21)) - - -define KernelPackage/hwmon-tmp102 - TITLE:=Texas Instruments TMP102 monitoring support - KCONFIG:=CONFIG_SENSORS_TMP102 - FILES:=$(LINUX_DIR)/drivers/hwmon/tmp102.ko - AUTOLOAD:=$(call AutoProbe,tmp102) - $(call AddDepends/hwmon,+kmod-i2c-core +PACKAGE_kmod-thermal:kmod-thermal +kmod-regmap-i2c) -endef - -define KernelPackage/hwmon-tmp102/description - Kernel module for Texas Instruments TMP102 temperature sensors chip -endef - -$(eval $(call KernelPackage,hwmon-tmp102)) - - -define KernelPackage/hwmon-tmp103 - TITLE:=Texas Instruments TMP103 monitoring support - KCONFIG:=CONFIG_SENSORS_TMP103 - FILES:=$(LINUX_DIR)/drivers/hwmon/tmp103.ko - AUTOLOAD:=$(call AutoProbe,tmp103) - $(call AddDepends/hwmon,+kmod-i2c-core +kmod-regmap-i2c) -endef - -define KernelPackage/hwmon-tmp103/description - Kernel module for Texas Instruments TMP103 temperature sensors chip -endef - -$(eval $(call KernelPackage,hwmon-tmp103)) - - -define KernelPackage/hwmon-tmp421 - TITLE:=TI TMP421 and compatible monitoring support - KCONFIG:=CONFIG_SENSORS_TMP421 - FILES:=$(LINUX_DIR)/drivers/hwmon/tmp421.ko - AUTOLOAD:=$(call AutoLoad,60,tmp421) - $(call AddDepends/hwmon,+kmod-i2c-core) -endef - -define KernelPackage/hwmon-tmp421/description - Kernel module for the Texas Instruments TMP421 and compatible chips. -endef - -$(eval $(call KernelPackage,hwmon-tmp421)) - - -define KernelPackage/hwmon-vid - TITLE:=VID/VRM/VRD voltage conversion module. - KCONFIG:=CONFIG_HWMON_VID - FILES:=$(LINUX_DIR)/drivers/hwmon/hwmon-vid.ko - AUTOLOAD:=$(call AutoLoad,41,hwmon-vid) - $(call AddDepends/hwmon,) -endef - -define KernelPackage/hwmon-vid/description - VID/VRM/VRD voltage conversion module for hardware monitoring -endef - -$(eval $(call KernelPackage,hwmon-vid)) - - -define KernelPackage/hwmon-w83627ehf - TITLE:=Winbond W83627EHF/EHG/DHG/UHG, W83667HG monitoring support - KCONFIG:=CONFIG_SENSORS_W83627EHF - FILES:=$(LINUX_DIR)/drivers/hwmon/w83627ehf.ko - AUTOLOAD:=$(call AutoProbe,w83627ehf) - $(call AddDepends/hwmon,@TARGET_x86 +kmod-hwmon-vid) -endef - -define KernelPackage/hwmon-w83627ehf/description - Kernel module for Winbond W83627EHF/EHG/DHG/UHG and W83667HG thermal monitor chip - Support for NCT6775F and NCT6776F has been removed from this driver in favour of - using the nct6775 driver to handle those chips. -endef - -$(eval $(call KernelPackage,hwmon-w83627ehf)) - - -define KernelPackage/hwmon-w83627hf - TITLE:=Winbond W83627HF monitoring support - KCONFIG:=CONFIG_SENSORS_W83627HF - FILES:=$(LINUX_DIR)/drivers/hwmon/w83627hf.ko - AUTOLOAD:=$(call AutoLoad,50,w83627hf) - $(call AddDepends/hwmon,@TARGET_x86 +kmod-hwmon-vid) -endef - -define KernelPackage/hwmon-w83627hf/description - Kernel module for the Winbond W83627HF chips. -endef - -$(eval $(call KernelPackage,hwmon-w83627hf)) - - -define KernelPackage/hwmon-w83793 - TITLE:=Winbond W83793G/R monitoring support - KCONFIG:=CONFIG_SENSORS_W83793 - FILES:=$(LINUX_DIR)/drivers/hwmon/w83793.ko - AUTOLOAD:=$(call AutoProbe,w83793) - $(call AddDepends/hwmon,+kmod-i2c-core +kmod-hwmon-vid) -endef - -define KernelPackage/hwmon-w83793/description - Kernel module for the Winbond W83793G and W83793R chips. -endef - -$(eval $(call KernelPackage,hwmon-w83793)) - - -define KernelPackage/hwmon-adcxx - TITLE:=ADCxx monitoring support - KCONFIG:=CONFIG_SENSORS_ADCXX - FILES:=$(LINUX_DIR)/drivers/hwmon/adcxx.ko - AUTOLOAD:=$(call AutoLoad,60,adcxx) - $(call AddDepends/hwmon,) -endef - -define KernelPackage/hwmon-adcxx/description - Kernel module for the National Semiconductor - ADCS chip family, where - * bb is the resolution in number of bits (8, 10, 12) - * c is the number of channels (1, 2, 4, 8) - * sss is the maximum conversion speed (021 for 200 kSPS, 051 for 500 - kSPS and 101 for 1 MSPS) - - Examples : ADC081S101, ADC124S501, ... -endef - -$(eval $(call KernelPackage,hwmon-adcxx)) - - diff --git a/root/package/kernel/linux/modules/i2c.mk b/root/package/kernel/linux/modules/i2c.mk deleted file mode 100755 index f4297632..00000000 --- a/root/package/kernel/linux/modules/i2c.mk +++ /dev/null @@ -1,290 +0,0 @@ -# -# Copyright (C) 2006-2009 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -I2C_MENU:=I2C support - -ModuleConfVar=$(word 1,$(subst :,$(space),$(1))) -ModuleFullPath=$(LINUX_DIR)/$(word 2,$(subst :,$(space),$(1))).ko -ModuleKconfig=$(foreach mod,$(1),$(call ModuleConfVar,$(mod))) -ModuleFiles=$(foreach mod,$(1),$(call ModuleFullPath,$(mod))) -ModuleAuto=$(call AutoLoad,$(1),$(foreach mod,$(2),$(basename $(notdir $(call ModuleFullPath,$(mod))))),$(3)) - -define i2c_defaults - SUBMENU:=$(I2C_MENU) - KCONFIG:=$(call ModuleKconfig,$(1)) - FILES:=$(call ModuleFiles,$(1)) - AUTOLOAD:=$(call ModuleAuto,$(2),$(1),$(3)) -endef - -I2C_CORE_MODULES:= \ - CONFIG_I2C:drivers/i2c/i2c-core \ - CONFIG_I2C_CHARDEV:drivers/i2c/i2c-dev - -define KernelPackage/i2c-core - $(call i2c_defaults,$(I2C_CORE_MODULES),51) - TITLE:=I2C support -endef - -define KernelPackage/i2c-core/description - Kernel modules for I2C support -endef - -$(eval $(call KernelPackage,i2c-core)) - - -I2C_ALGOBIT_MODULES:= \ - CONFIG_I2C_ALGOBIT:drivers/i2c/algos/i2c-algo-bit - -define KernelPackage/i2c-algo-bit - $(call i2c_defaults,$(I2C_ALGOBIT_MODULES),55) - TITLE:=I2C bit-banging interfaces - DEPENDS:=+kmod-i2c-core -endef - -define KernelPackage/i2c-algo-bit/description - Kernel modules for I2C bit-banging interfaces -endef - -$(eval $(call KernelPackage,i2c-algo-bit)) - - -I2C_ALGOPCA_MODULES:= \ - CONFIG_I2C_ALGOPCA:drivers/i2c/algos/i2c-algo-pca - -define KernelPackage/i2c-algo-pca - $(call i2c_defaults,$(I2C_ALGOPCA_MODULES),55) - TITLE:=I2C PCA 9564 interfaces - DEPENDS:=+kmod-i2c-core -endef - -define KernelPackage/i2c-algo-pca/description - Kernel modules for I2C PCA 9564 interfaces -endef - -$(eval $(call KernelPackage,i2c-algo-pca)) - - -I2C_ALGOPCF_MODULES:= \ - CONFIG_I2C_ALGOPCF:drivers/i2c/algos/i2c-algo-pcf - -define KernelPackage/i2c-algo-pcf - $(call i2c_defaults,$(I2C_ALGOPCF_MODULES),55) - TITLE:=I2C PCF 8584 interfaces - DEPENDS:=+kmod-i2c-core -endef - -define KernelPackage/i2c-algo-pcf/description - Kernel modules for I2C PCF 8584 interfaces -endef - -$(eval $(call KernelPackage,i2c-algo-pcf)) - - -I2C_DWCORE_MODULES:= \ - CONFIG_I2C_DESIGNWARE_CORE:drivers/i2c/busses/i2c-designware-core - -define KernelPackage/i2c-designware-core - $(call i2c_defaults,$(I2C_DWCORE_MODULES),58) - TITLE:=Synopsys DesignWare I2C core - DEPENDS:=+kmod-i2c-core +!LINUX_5_4:kmod-regmap-core - HIDDEN:=y -endef - -$(eval $(call KernelPackage,i2c-designware-core)) - - -I2C_DWPCI_MODULES:= \ - CONFIG_I2C_DESIGNWARE_PCI:drivers/i2c/busses/i2c-designware-pci - -define KernelPackage/i2c-designware-pci - $(call i2c_defaults,$(I2C_DWPCI_MODULES),59) - TITLE:=Synopsys DesignWare PCI - DEPENDS:=+kmod-i2c-designware-core -endef - -define KernelPackage/i2c-designware-pci/description - Support for Synopsys DesignWare I2C controller. Only master mode is supported. -endef - -$(eval $(call KernelPackage,i2c-designware-pci)) - - -I2C_GPIO_MODULES:= \ - CONFIG_I2C_GPIO:drivers/i2c/busses/i2c-gpio - -define KernelPackage/i2c-gpio - $(call i2c_defaults,$(I2C_GPIO_MODULES),59) - TITLE:=GPIO-based bitbanging I2C - DEPENDS:=@GPIO_SUPPORT +kmod-i2c-algo-bit -endef - -define KernelPackage/i2c-gpio/description - Kernel modules for a very simple bitbanging I2C driver utilizing the - arch-neutral GPIO API to control the SCL and SDA lines. -endef - -$(eval $(call KernelPackage,i2c-gpio)) - - -I2C_I801_MODULES:= \ - CONFIG_I2C_I801:drivers/i2c/busses/i2c-i801 - -define KernelPackage/i2c-i801 - $(call i2c_defaults,$(I2C_I801_MODULES),59) - TITLE:=Intel I801 and compatible I2C interfaces - DEPENDS:=@PCI_SUPPORT @TARGET_x86 +kmod-i2c-core +kmod-i2c-smbus -endef - -define KernelPackage/i2c-i801/description - Support for the Intel I801 family of mainboard I2C interfaces, - specifically 82801AA, 82801AB, 82801BA, 82801CA/CAM, 82801DB, - 82801EB/ER (ICH5/ICH5R), 6300ESB, ICH6, ICH7, ESB2, ICH8, ICH9, - EP80579 (Tolapai), ICH10, 5/3400 Series (PCH), 6 Series (PCH), - Patsburg (PCH), DH89xxCC (PCH), Panther Point (PCH), - Lynx Point (PCH), Lynx Point-LP (PCH), Avoton (SOC), - Wellsburg (PCH), Coleto Creek (PCH), Wildcat Point (PCH), - Wildcat Point-LP (PCH), BayTrail (SOC), Sunrise Point-H (PCH), - Sunrise Point-LP (PCH), DNV (SOC), Broxton (SOC), - Lewisburg (PCH). -endef - -$(eval $(call KernelPackage,i2c-i801)) - - -I2C_MUX_MODULES:= \ - CONFIG_I2C_MUX:drivers/i2c/i2c-mux - -define KernelPackage/i2c-mux - $(call i2c_defaults,$(I2C_MUX_MODULES),51) - TITLE:=I2C bus multiplexing support - DEPENDS:=+kmod-i2c-core -endef - -define KernelPackage/i2c-mux/description - Kernel modules for I2C bus multiplexing support -endef - -$(eval $(call KernelPackage,i2c-mux)) - -I2C_MUX_GPIO_MODULES:= \ - CONFIG_I2C_MUX_GPIO:drivers/i2c/muxes/i2c-mux-gpio - -define KernelPackage/i2c-mux-gpio - $(call i2c_defaults,$(I2C_MUX_GPIO_MODULES),51) - TITLE:=GPIO-based I2C mux/switches - DEPENDS:=+kmod-i2c-mux -endef - -define KernelPackage/i2c-mux-gpio/description - Kernel modules for GENERIC_GPIO I2C bus mux/switching devices -endef - -$(eval $(call KernelPackage,i2c-mux-gpio)) - - -I2C_MUX_PCA9541_MODULES:= \ - CONFIG_I2C_MUX_PCA9541:drivers/i2c/muxes/i2c-mux-pca9541 - -define KernelPackage/i2c-mux-pca9541 - $(call i2c_defaults,$(I2C_MUX_PCA9541_MODULES),51) - TITLE:=Philips PCA9541 I2C mux/switches - DEPENDS:=+kmod-i2c-mux -endef - -define KernelPackage/i2c-mux-pca9541/description - Kernel modules for PCA9541 I2C bus mux/switching devices -endef - -$(eval $(call KernelPackage,i2c-mux-pca9541)) - -I2C_MUX_PCA954x_MODULES:= \ - CONFIG_I2C_MUX_PCA954x:drivers/i2c/muxes/i2c-mux-pca954x - -define KernelPackage/i2c-mux-pca954x - $(call i2c_defaults,$(I2C_MUX_PCA954x_MODULES),51) - TITLE:=Philips PCA954x I2C mux/switches - DEPENDS:=+kmod-i2c-mux -endef - -define KernelPackage/i2c-mux-pca954x/description - Kernel modules for PCA954x I2C bus mux/switching devices -endef - -$(eval $(call KernelPackage,i2c-mux-pca954x)) - - -I2C_PIIX4_MODULES:= \ - CONFIG_I2C_PIIX4:drivers/i2c/busses/i2c-piix4 - -define KernelPackage/i2c-piix4 - $(call i2c_defaults,$(I2C_PIIX4_MODULES),59) - TITLE:=Intel PIIX4 and compatible I2C interfaces - DEPENDS:=@PCI_SUPPORT @TARGET_x86 +kmod-i2c-core -endef - -define KernelPackage/i2c-piix4/description - Support for the Intel PIIX4 family of mainboard I2C interfaces, - specifically Intel PIIX4, Intel 440MX, ATI IXP200, ATI IXP300, - ATI IXP400, ATI SB600, ATI SB700/SP5100, ATI SB800, AMD Hudson-2, - AMD ML, AMD CZ, Serverworks OSB4, Serverworks CSB5, - Serverworks CSB6, Serverworks HT-1000, Serverworks HT-1100 and - SMSC Victory66. -endef - -$(eval $(call KernelPackage,i2c-piix4)) - - -I2C_PXA_MODULES:= \ - CONFIG_I2C_PXA:drivers/i2c/busses/i2c-pxa - -define KernelPackage/i2c-pxa - $(call i2c_defaults,$(I2C_PXA_MODULES),50) - TITLE:=Intel PXA I2C bus driver - DEPENDS:=+kmod-i2c-core -endef - -define KernelPackage/i2c-pxa/description - Kernel module for Intel PXA2XX I2C adapter -endef - -$(eval $(call KernelPackage,i2c-pxa)) - - -I2C_SMBUS_MODULES:= \ - CONFIG_I2C_SMBUS:drivers/i2c/i2c-smbus - -define KernelPackage/i2c-smbus - $(call i2c_defaults,$(I2C_SMBUS_MODULES),58) - TITLE:=SMBus-specific protocols helper - DEPENDS:=+kmod-i2c-core -endef - -define KernelPackage/i2c-smbus/description - Support for the SMBus extensions to the I2C specification. -endef - -$(eval $(call KernelPackage,i2c-smbus)) - - - -I2C_TINY_USB_MODULES:= \ - CONFIG_I2C_TINY_USB:drivers/i2c/busses/i2c-tiny-usb - -define KernelPackage/i2c-tiny-usb - $(call i2c_defaults,$(I2C_TINY_USB_MODULES),59) - TITLE:=I2C Tiny USB adaptor - DEPENDS:=@USB_SUPPORT +kmod-i2c-core +kmod-usb-core -endef - -define KernelPackage/i2c-tiny-usb/description - Kernel module for the I2C Tiny USB adaptor developed - by Till Harbaum (http://www.harbaum.org/till/i2c_tiny_usb) -endef - -$(eval $(call KernelPackage,i2c-tiny-usb)) - - diff --git a/root/package/kernel/linux/modules/iio.mk b/root/package/kernel/linux/modules/iio.mk deleted file mode 100755 index 6a2e0403..00000000 --- a/root/package/kernel/linux/modules/iio.mk +++ /dev/null @@ -1,561 +0,0 @@ -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -IIO_MENU:=Industrial I/O Modules - - -define KernelPackage/iio-core - SUBMENU:=$(IIO_MENU) - TITLE:=Industrial IO core - KCONFIG:= \ - CONFIG_IIO \ - CONFIG_IIO_BUFFER=y \ - CONFIG_IIO_TRIGGER=y - FILES:=$(LINUX_DIR)/drivers/iio/industrialio.ko - AUTOLOAD:=$(call AutoLoad,55,industrialio) -endef - -define KernelPackage/iio-core/description - The industrial I/O subsystem provides a unified framework for - drivers for many different types of embedded sensors using a - number of different physical interfaces (i2c, spi, etc) -endef - -$(eval $(call KernelPackage,iio-core)) - - -define KernelPackage/iio-kfifo-buf - SUBMENU:=$(IIO_MENU) - TITLE:=Industrial I/O buffering based on kfifo - DEPENDS:=+kmod-iio-core - KCONFIG:=CONFIG_IIO_KFIFO_BUF - FILES:=$(LINUX_DIR)/drivers/iio/buffer/kfifo_buf.ko - AUTOLOAD:=$(call AutoLoad,55,kfifo_buf) -endef - -define KernelPackage/iio-kfifo-buf/description - A simple fifo based on kfifo. Note that this currently provides no buffer - events so it is up to userspace to work out how often to read from the buffer. -endef - -$(eval $(call KernelPackage,iio-kfifo-buf)) - - -define KernelPackage/industrialio-triggered-buffer - SUBMENU:=$(IIO_MENU) - TITLE:=Provides helper functions for setting up triggered buffers. - DEPENDS:=+kmod-iio-core +kmod-iio-kfifo-buf - KCONFIG:=CONFIG_IIO_TRIGGERED_BUFFER - FILES:=$(LINUX_DIR)/drivers/iio/buffer/industrialio-triggered-buffer.ko - AUTOLOAD:=$(call AutoLoad,55,industrialio-triggered-buffer) -endef - -define KernelPackage/industrialio-triggered-buffer/description - Provides helper functions for setting up triggered buffers. -endef - -$(eval $(call KernelPackage,industrialio-triggered-buffer)) - - -define KernelPackage/iio-ad799x - SUBMENU:=$(IIO_MENU) - DEPENDS:=+kmod-i2c-core +kmod-iio-core +kmod-industrialio-triggered-buffer - TITLE:=Analog Devices AD799x ADC driver - KCONFIG:= \ - CONFIG_AD799X_RING_BUFFER=y \ - CONFIG_AD799X - FILES:=$(LINUX_DIR)/drivers/iio/adc/ad799x.ko - AUTOLOAD:=$(call AutoLoad,56,ad799x) -endef - -define KernelPackage/iio-ad799x/description - support for Analog Devices: - ad7991, ad7995, ad7999, ad7992, ad7993, ad7994, ad7997, ad7998 - i2c analog to digital converters (ADC). -endef - -$(eval $(call KernelPackage,iio-ad799x)) - -define KernelPackage/iio-ads1015 - SUBMENU:=$(IIO_MENU) - DEPENDS:=+kmod-i2c-core +kmod-iio-core +kmod-regmap-i2c +kmod-industrialio-triggered-buffer - TITLE:=Texas Instruments ADS1015 ADC driver - KCONFIG:= CONFIG_TI_ADS1015 - FILES:=$(LINUX_DIR)/drivers/iio/adc/ti-ads1015.ko - AUTOLOAD:=$(call AutoLoad,56,ti-ads1015) -endef - -define KernelPackage/iio-ads1015/description - This driver adds support for Texas Instruments ADS1015 and ADS1115 ADCs. -endef - -$(eval $(call KernelPackage,iio-ads1015)) - -define KernelPackage/iio-hmc5843 - SUBMENU:=$(IIO_MENU) - DEPENDS:=+kmod-i2c-core +kmod-iio-core +kmod-regmap-i2c +kmod-industrialio-triggered-buffer - TITLE:=Honeywell HMC58x3 Magnetometer - KCONFIG:= CONFIG_SENSORS_HMC5843_I2C - FILES:= \ - $(LINUX_DIR)/drivers/iio/magnetometer/hmc5843_i2c.ko \ - $(LINUX_DIR)/drivers/iio/magnetometer/hmc5843_core.ko - AUTOLOAD:=$(call AutoLoad,56,hmc5843) -endef - -define KernelPackage/iio-hmc5843/description - Honeywell HMC5843/5883/5883L 3-Axis Magnetometer -endef - -$(eval $(call KernelPackage,iio-hmc5843)) - -define KernelPackage/iio-bh1750 - SUBMENU:=$(IIO_MENU) - DEPENDS:=+kmod-i2c-core +kmod-iio-core - TITLE:=ROHM BH1750 ambient light sensor - KCONFIG:= CONFIG_BH1750 - FILES:=$(LINUX_DIR)/drivers/iio/light/bh1750.ko - AUTOLOAD:=$(call AutoLoad,56,bh1750) -endef -define KernelPackage/iio-bh1750/description - ROHM BH1750 ambient light sensor (i2c bus) -endef -$(eval $(call KernelPackage,iio-bh1750)) - -define KernelPackage/iio-am2315 - SUBMENU:=$(IIO_MENU) - DEPENDS:=+kmod-i2c-core +kmod-iio-core +kmod-industrialio-triggered-buffer - TITLE:=Asong AM2315 humidity/temperature sensor - KCONFIG:= CONFIG_AM2315 - FILES:=$(LINUX_DIR)/drivers/iio/humidity/am2315.ko - AUTOLOAD:=$(call AutoLoad,56,am2315) -endef -define KernelPackage/iio-am2315/description - Aosong AM2315 humidity/temperature sensor (I2C bus) -endef -$(eval $(call KernelPackage,iio-am2315)) - -define KernelPackage/iio-mxs-lradc - SUBMENU:=$(IIO_MENU) - DEPENDS:=@TARGET_mxs +kmod-iio-core +kmod-industrialio-triggered-buffer - TITLE:=Freescale i.MX23/i.MX28 LRADC ADC driver - KCONFIG:= \ - CONFIG_MXS_LRADC_ADC - FILES:=$(LINUX_DIR)/drivers/iio/adc/mxs-lradc-adc.ko - AUTOLOAD:=$(call AutoLoad,56,mxs-lradc-adc) -endef - -define KernelPackage/iio-mxs-lradc/description - Support for Freescale's i.MX23/i.MX28 SoC internal Low-Resolution ADC -endef - -$(eval $(call KernelPackage,iio-mxs-lradc)) - -define KernelPackage/iio-dht11 - SUBMENU:=$(IIO_MENU) - DEPENDS:=+kmod-iio-core @GPIO_SUPPORT @USES_DEVICETREE - TITLE:=DHT11 (and compatible) humidity and temperature sensors - KCONFIG:= \ - CONFIG_DHT11 - FILES:=$(LINUX_DIR)/drivers/iio/humidity/dht11.ko - AUTOLOAD:=$(call AutoLoad,56,dht11) -endef - -define KernelPackage/iio-dht11/description - support for DHT11 and DHT22 digitial humidity and temperature sensors - attached at GPIO lines. You will need a custom device tree file to - specify the GPIO line to use. -endef - -$(eval $(call KernelPackage,iio-dht11)) - - -define KernelPackage/iio-bme680 - SUBMENU:=$(IIO_MENU) - TITLE:=BME680 gas/humidity/pressure/temperature sensor - DEPENDS:=+kmod-iio-core +kmod-regmap-core - KCONFIG:=CONFIG_BME680 - FILES:=$(LINUX_DIR)/drivers/iio/chemical/bme680_core.ko -endef - -define KernelPackage/iio-bme680/description - This driver adds support for Bosch Sensortec BME680 sensor with gas, - humidity, pressure and temperatue sensing capability. -endef - -$(eval $(call KernelPackage,iio-bme680)) - -define KernelPackage/iio-bme680-i2c - SUBMENU:=$(IIO_MENU) - TITLE:=BME680 gas/humidity/pressure/temperature sensor (I2C) - DEPENDS:=+kmod-iio-bme680 +kmod-regmap-i2c - KCONFIG:=CONFIG_BME680_I2C - FILES:=$(LINUX_DIR)/drivers/iio/chemical/bme680_i2c.ko - AUTOLOAD:=$(call AutoProbe,bme680-i2c) -endef -define KernelPackage/iio-bme680-i2c/description - This driver adds support for Bosch Sensortec's BME680 connected via I2C. -endef - -$(eval $(call KernelPackage,iio-bme680-i2c)) - -define KernelPackage/iio-bme680-spi - SUBMENU:=$(IIO_MENU) - TITLE:=BME680 gas/humidity/pressure/temperature sensor (SPI) - DEPENDS:=+kmod-iio-bme680 +kmod-regmap-spi - KCONFIG:=CONFIG_BME680_SPI - FILES:=$(LINUX_DIR)/drivers/iio/chemical/bme680_spi.ko - AUTOLOAD:=$(call AutoProbe,bme680-spi) -endef -define KernelPackage/iio-bme680-spi/description - This driver adds support for Bosch Sensortec's BME680 connected via SPI. -endef - -$(eval $(call KernelPackage,iio-bme680-spi)) - - -define KernelPackage/iio-bmp280 - SUBMENU:=$(IIO_MENU) - TITLE:=BMP180/BMP280/BME280 pressure/temperatur sensor - DEPENDS:=+kmod-iio-core +kmod-regmap-core - KCONFIG:=CONFIG_BMP280 - FILES:=$(LINUX_DIR)/drivers/iio/pressure/bmp280.ko -endef - -define KernelPackage/iio-bmp280/description - This driver adds support for Bosch Sensortec BMP180 and BMP280 pressure and - temperature sensors. Also supports the BME280 with an additional humidity - sensor channel. -endef - -$(eval $(call KernelPackage,iio-bmp280)) - - -define KernelPackage/iio-bmp280-i2c - SUBMENU:=$(IIO_MENU) - TITLE:=BMP180/BMP280/BME280 pressure/temperatur sensor (I2C) - DEPENDS:=+kmod-iio-bmp280 +kmod-i2c-core +kmod-regmap-i2c - KCONFIG:=CONFIG_BMP280_I2C - FILES:=$(LINUX_DIR)/drivers/iio/pressure/bmp280-i2c.ko - AUTOLOAD:=$(call AutoProbe,bmp280-i2c) -endef -define KernelPackage/iio-bmp280-i2c/description - This driver adds support for Bosch Sensortec's digital pressure and - temperature sensor connected via I2C. -endef - -$(eval $(call KernelPackage,iio-bmp280-i2c)) - - -define KernelPackage/iio-bmp280-spi - SUBMENU:=$(IIO_MENU) - TITLE:=BMP180/BMP280/BME280 pressure/temperatur sensor (SPI) - DEPENDS:=+kmod-iio-bmp280 +kmod-spi-bitbang - KCONFIG:=CONFIG_BMP280_SPI - FILES:=$(LINUX_DIR)/drivers/iio/pressure/bmp280-spi.ko - AUTOLOAD:=$(call AutoProbe,bmp280-spi) -endef -define KernelPackage/iio-bmp280-spi/description - This driver adds support for Bosch Sensortec's digital pressure and - temperature sensor connected via SPI. -endef - -$(eval $(call KernelPackage,iio-bmp280-spi)) - -define KernelPackage/iio-htu21 - SUBMENU:=$(IIO_MENU) - DEPENDS:=+kmod-i2c-core +kmod-iio-core - TITLE:=HTU21 humidity & temperature sensor - KCONFIG:= \ - CONFIG_HTU21 \ - CONFIG_IIO_MS_SENSORS_I2C - FILES:= \ - $(LINUX_DIR)/drivers/iio/humidity/htu21.ko \ - $(LINUX_DIR)/drivers/iio/common/ms_sensors/ms_sensors_i2c.ko - AUTOLOAD:=$(call AutoLoad,56,htu21) -endef - -define KernelPackage/iio-htu21/description - support for the Measurement Specialties HTU21 humidity and - temperature sensor. - This driver is also used for MS8607 temperature, pressure & humidity - sensor -endef - -$(eval $(call KernelPackage,iio-htu21)) - - -define KernelPackage/iio-ccs811 - SUBMENU:=$(IIO_MENU) - DEPENDS:=+kmod-i2c-core +kmod-iio-core +kmod-industrialio-triggered-buffer - TITLE:=AMS CCS811 VOC sensor - KCONFIG:= \ - CONFIG_CCS811 - FILES:= $(LINUX_DIR)/drivers/iio/chemical/ccs811.ko - AUTOLOAD:=$(call AutoLoad,56,ccs811) -endef - -define KernelPackage/iio-ccs811/description - Support for the AMS CCS811 VOC (Volatile Organic Compounds) sensor -endef - -$(eval $(call KernelPackage,iio-ccs811)) - - -define KernelPackage/iio-si7020 - SUBMENU:=$(IIO_MENU) - DEPENDS:=+kmod-i2c-core +kmod-iio-core - TITLE:=Silicon Labs Si7020 sensor - KCONFIG:= CONFIG_SI7020 - FILES:=$(LINUX_DIR)/drivers/iio/humidity/si7020.ko - AUTOLOAD:=$(call AutoLoad,56,si7020) -endef - -define KernelPackage/iio-si7020/description - Support for Silicon Labs Si7020 family of relative humidity and - temperature sensors connected via I2C. Following models are usable: - Si7013, Si7020, Si7021, Hoperf TH06. -endef - -$(eval $(call KernelPackage,iio-si7020)) - - -define KernelPackage/iio-st_accel - SUBMENU:=$(IIO_MENU) - TITLE:=STMicroelectronics accelerometer 3-Axis Driver - DEPENDS:=+kmod-iio-core +kmod-regmap-core +kmod-industrialio-triggered-buffer - KCONFIG:= \ - CONFIG_IIO_ST_ACCEL_3AXIS \ - CONFIG_IIO_ST_SENSORS_CORE - FILES:= \ - $(LINUX_DIR)/drivers/iio/accel/st_accel.ko \ - $(LINUX_DIR)/drivers/iio/common/st_sensors/st_sensors.ko -endef - -define KernelPackage/iio-st_accel/description - This package adds support for STMicroelectronics accelerometers: - LSM303DLH, LSM303DLHC, LIS3DH, LSM330D, LSM330DL, LSM330DLC, - LIS331DLH, LSM303DL, LSM303DLM, LSM330, LIS2DH12, H3LIS331DL, - LNG2DM, LIS3DE, LIS2DE12 -endef - -$(eval $(call KernelPackage,iio-st_accel)) - - -define KernelPackage/iio-st_accel-i2c - SUBMENU:=$(IIO_MENU) - TITLE:=STMicroelectronics accelerometer 3-Axis Driver (I2C) - DEPENDS:=+kmod-iio-st_accel +kmod-i2c-core +kmod-regmap-i2c - KCONFIG:= CONFIG_IIO_ST_ACCEL_I2C_3AXIS - FILES:= \ - $(LINUX_DIR)/drivers/iio/accel/st_accel_i2c.ko \ - $(LINUX_DIR)/drivers/iio/common/st_sensors/st_sensors_i2c.ko - AUTOLOAD:=$(call AutoLoad,56,st_accel_i2c) -endef - -define KernelPackage/iio-st_accel-i2c/description - This package adds support for STMicroelectronics I2C based accelerometers -endef - -$(eval $(call KernelPackage,iio-st_accel-i2c)) - - -define KernelPackage/iio-st_accel-spi - SUBMENU:=$(IIO_MENU) - TITLE:=STMicroelectronics accelerometer 3-Axis Driver (SPI) - DEPENDS:=+kmod-iio-st_accel +kmod-regmap-spi - KCONFIG:= CONFIG_IIO_ST_ACCEL_SPI_3AXIS - FILES:= \ - $(LINUX_DIR)/drivers/iio/accel/st_accel_spi.ko \ - $(LINUX_DIR)/drivers/iio/common/st_sensors/st_sensors_spi.ko - AUTOLOAD:=$(call AutoLoad,56,st_accel_spi) -endef - -define KernelPackage/iio-st_accel-spi/description - This package adds support for STMicroelectronics SPI based accelerometers -endef - -$(eval $(call KernelPackage,iio-st_accel-spi)) - - -define KernelPackage/iio-lsm6dsx - SUBMENU:=$(IIO_MENU) - DEPENDS:=+kmod-iio-core +kmod-iio-kfifo-buf +kmod-regmap-core - TITLE:=ST LSM6DSx driver for IMU MEMS sensors - KCONFIG:=CONFIG_IIO_ST_LSM6DSX - FILES:=$(LINUX_DIR)/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.ko - AUTOLOAD:=$(call AutoProbe,st_lsm6dsx) -endef - -define KernelPackage/iio-lsm6dsx/description - Support for the ST LSM6DSx and related IMU MEMS sensors. -endef - -$(eval $(call KernelPackage,iio-lsm6dsx)) - - -define KernelPackage/iio-lsm6dsx-i2c - SUBMENU:=$(IIO_MENU) - DEPENDS:=+kmod-iio-lsm6dsx +kmod-i2c-core +kmod-regmap-i2c - TITLE:=ST LSM6DSx driver for IMU MEMS sensors (I2C) - KCONFIG:=CONFIG_IIO_ST_LSM6DSX - FILES:=$(LINUX_DIR)/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i2c.ko - AUTOLOAD:=$(call AutoProbe,st_lsm6dsx-i2c) -endef - -define KernelPackage/iio-lsm6dsx-i2c/description - Support for the ST LSM6DSx and related IMU MEMS I2C sensors. -endef - -$(eval $(call KernelPackage,iio-lsm6dsx-i2c)) - - -define KernelPackage/iio-lsm6dsx-spi - SUBMENU:=$(IIO_MENU) - DEPENDS:=+kmod-iio-lsm6dsx +kmod-regmap-spi - TITLE:=ST LSM6DSx driver for IMU MEMS sensors (SPI) - KCONFIG:=CONFIG_IIO_ST_LSM6DSX - FILES:=$(LINUX_DIR)/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_spi.ko - AUTOLOAD:=$(call AutoProbe,st_lsm6dsx-spi) -endef - -define KernelPackage/iio-lsm6dsx-spi/description - Support for the ST LSM6DSx and related IMU MEMS SPI sensors. -endef - -$(eval $(call KernelPackage,iio-lsm6dsx-spi)) - - -define KernelPackage/iio-sps30 - SUBMENU:=$(IIO_MENU) - DEPENDS:=+kmod-i2c-core +kmod-iio-core +kmod-industrialio-triggered-buffer +kmod-lib-crc8 - TITLE:=Sensirion SPS30 particulate matter sensor - KCONFIG:=CONFIG_SPS30 - FILES:=$(LINUX_DIR)/drivers/iio/chemical/sps30.ko - AUTOLOAD:=$(call AutoProbe,sps30) -endef - -define KernelPackage/iio-sps30/description - Support for the Sensirion SPS30 particulate matter sensor. -endef - -$(eval $(call KernelPackage,iio-sps30)) - - -define KernelPackage/iio-tsl4531 - SUBMENU:=$(IIO_MENU) - DEPENDS:=+kmod-i2c-core +kmod-iio-core - TITLE:=TAOS TSL4531 ambient light sensor - KCONFIG:= CONFIG_TSL4531 - FILES:=$(LINUX_DIR)/drivers/iio/light/tsl4531.ko - AUTOLOAD:=$(call AutoLoad,56,tsl4531) -endef - -define KernelPackage/iio-tsl4531/description - Support for TAOS TSL4531x family of ambient light sensors - connected via I2C. Following models are usable: - TSL45311, TSL45313, TSL45315, TSL45317. -endef - -$(eval $(call KernelPackage,iio-tsl4531)) - - -define KernelPackage/iio-fxas21002c - SUBMENU:=$(IIO_MENU) - TITLE:=Freescale FXAS21002C 3-axis gyro driver - DEPENDS:=+kmod-iio-core +kmod-regmap-core +kmod-industrialio-triggered-buffer - KCONFIG:= CONFIG_FXAS21002C - FILES:=$(LINUX_DIR)/drivers/iio/gyro/fxas21002c_core.ko - AUTOLOAD:=$(call AutoLoad,56,fxas21002c) -endef - -define KernelPackage/iio-fxas21002c/description - Support for Freescale FXAS21002C 3-axis gyro. -endef - -$(eval $(call KernelPackage,iio-fxas21002c)) - - -define KernelPackage/iio-fxas21002c-i2c - SUBMENU:=$(IIO_MENU) - TITLE:=Freescale FXAS21002C 3-axis gyro driver (I2C) - DEPENDS:=+kmod-iio-fxas21002c +kmod-i2c-core +kmod-regmap-i2c - KCONFIG:= CONFIG_FXAS21002C_I2C - FILES:=$(LINUX_DIR)/drivers/iio/gyro/fxas21002c_i2c.ko - AUTOLOAD:=$(call AutoLoad,56,fxas21002c_i2c) -endef - -define KernelPackage/iio-fxas21002c-i2c/description - Support for Freescale FXAS21002C 3-axis gyro - connected via I2C. -endef - - -$(eval $(call KernelPackage,iio-fxas21002c-i2c)) - -define KernelPackage/iio-fxas21002c-spi - SUBMENU:=$(IIO_MENU) - DEPENDS:=+kmod-iio-fxas21002c +kmod-regmap-spi - TITLE:=Freescale FXAS21002C 3-axis gyro driver (SPI) - KCONFIG:= CONFIG_FXAS21002C_SPI - FILES:=$(LINUX_DIR)/drivers/iio/gyro/fxas21002c_spi.ko - AUTOLOAD:=$(call AutoLoad,56,fxas21002c_spi) -endef - -define KernelPackage/iio-fxas21002c-spi/description - Support for Freescale FXAS21002C 3-axis gyro - connected via SPI. -endef - -$(eval $(call KernelPackage,iio-fxas21002c-spi)) - - -define KernelPackage/iio-fxos8700 - SUBMENU:=$(IIO_MENU) - TITLE:=Freescale FXOS8700 3-axis accelerometer driver - DEPENDS:=+kmod-iio-core +kmod-regmap-core - KCONFIG:= CONFIG_FXOS8700 - FILES:=$(LINUX_DIR)/drivers/iio/imu/fxos8700_core.ko - AUTOLOAD:=$(call AutoLoad,56,fxos8700) -endef - -define KernelPackage/iio-fxos8700/description - Support for Freescale FXOS8700 3-axis accelerometer. -endef - -$(eval $(call KernelPackage,iio-fxos8700)) - - -define KernelPackage/iio-fxos8700-i2c - SUBMENU:=$(IIO_MENU) - TITLE:=Freescale FXOS8700 3-axis acceleromter driver (I2C) - DEPENDS:=+kmod-iio-fxos8700 +kmod-i2c-core +kmod-regmap-i2c - KCONFIG:= CONFIG_FXOS8700_I2C - FILES:=$(LINUX_DIR)/drivers/iio/imu/fxos8700_i2c.ko - AUTOLOAD:=$(call AutoLoad,56,fxos8700_i2c) -endef - -define KernelPackage/iio-fxos8700-i2c/description - Support for Freescale FXOS8700 3-axis accelerometer - connected via I2C. -endef - - -$(eval $(call KernelPackage,iio-fxos8700-i2c)) - -define KernelPackage/iio-fxos8700-spi - SUBMENU:=$(IIO_MENU) - DEPENDS:=+kmod-iio-fxos8700 +kmod-regmap-spi - TITLE:=Freescale FXOS8700 3-axis accelerometer driver (SPI) - KCONFIG:= CONFIG_FXOS8700_SPI - FILES:=$(LINUX_DIR)/drivers/iio/imu/fxos8700_spi.ko - AUTOLOAD:=$(call AutoLoad,56,fxos8700_spi) -endef - -define KernelPackage/iio-fxos8700-spi/description - Support for Freescale FXOS8700 3-axis accelerometer - connected via SPI. -endef - -$(eval $(call KernelPackage,iio-fxos8700-spi)) diff --git a/root/package/kernel/linux/modules/input.mk b/root/package/kernel/linux/modules/input.mk index e052a7af..6f9500d4 100755 --- a/root/package/kernel/linux/modules/input.mk +++ b/root/package/kernel/linux/modules/input.mk @@ -179,10 +179,10 @@ define KernelPackage/input-touchscreen-ads7846 DEPENDS:=+kmod-hwmon-core +kmod-input-core +kmod-spi-bitbang KCONFIG:= \ CONFIG_INPUT_TOUCHSCREEN=y \ - CONFIG_TOUCHSCREEN_PROPERTIES=y@lt5.13 \ + CONFIG_TOUCHSCREEN_PROPERTIES=y \ CONFIG_TOUCHSCREEN_ADS7846 FILES:=$(LINUX_DIR)/drivers/input/touchscreen/ads7846.ko \ - $(LINUX_DIR)/drivers/input/touchscreen/of_touchscreen.ko@lt5.13 + $(LINUX_DIR)/drivers/input/touchscreen/of_touchscreen.ko@lt5.14 AUTOLOAD:=$(call AutoProbe,ads7846) endef @@ -196,7 +196,7 @@ $(eval $(call KernelPackage,input-touchscreen-ads7846)) define KernelPackage/keyboard-imx SUBMENU:=$(INPUT_MODULES_MENU) TITLE:=IMX keypad support - DEPENDS:=@(TARGET_mxs||TARGET_imx) +kmod-input-matrixkmap + DEPENDS:=@(TARGET_mxs||TARGET_imx6) +kmod-input-matrixkmap KCONFIG:= \ CONFIG_KEYBOARD_IMX \ CONFIG_INPUT_KEYBOARD=y diff --git a/root/package/kernel/linux/modules/leds.mk b/root/package/kernel/linux/modules/leds.mk deleted file mode 100755 index 33b9f612..00000000 --- a/root/package/kernel/linux/modules/leds.mk +++ /dev/null @@ -1,212 +0,0 @@ -# -# Copyright (C) 2006-2011 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -LEDS_MENU:=LED modules - -define KernelPackage/leds-gpio - SUBMENU:=$(LEDS_MENU) - TITLE:=GPIO LED support - DEPENDS:= @GPIO_SUPPORT - KCONFIG:=CONFIG_LEDS_GPIO - FILES:=$(LINUX_DIR)/drivers/leds/leds-gpio.ko - AUTOLOAD:=$(call AutoLoad,60,leds-gpio,1) -endef - -define KernelPackage/leds-gpio/description - Kernel module for LEDs on GPIO lines -endef - -$(eval $(call KernelPackage,leds-gpio)) - -LED_TRIGGER_DIR=$(LINUX_DIR)/drivers/leds/trigger - -define KernelPackage/ledtrig-activity - SUBMENU:=$(LEDS_MENU) - TITLE:=LED Activity Trigger - KCONFIG:=CONFIG_LEDS_TRIGGER_ACTIVITY - FILES:=$(LED_TRIGGER_DIR)/ledtrig-activity.ko - AUTOLOAD:=$(call AutoLoad,50,ledtrig-activity) -endef - -define KernelPackage/ledtrig-activity/description - Kernel module that allows LEDs to blink based on system load -endef - -$(eval $(call KernelPackage,ledtrig-activity)) - -define KernelPackage/ledtrig-audio - SUBMENU:=$(LEDS_MENU) - TITLE:=LED Audio Mute Trigger - KCONFIG:=CONFIG_LEDS_TRIGGER_AUDIO - FILES:=$(LED_TRIGGER_DIR)/ledtrig-audio.ko - AUTOLOAD:=$(call AutoLoad,50,ledtrig-audio) -endef - -define KernelPackage/ledtrig-audio/description - Kernel module that allows LEDs to be controlled by audio drivers - to follow audio mute and mic-mute changes. -endef - -$(eval $(call KernelPackage,ledtrig-audio)) - -define KernelPackage/ledtrig-gpio - SUBMENU:=$(LEDS_MENU) - TITLE:=LED GPIO Trigger - KCONFIG:=CONFIG_LEDS_TRIGGER_GPIO - FILES:=$(LED_TRIGGER_DIR)/ledtrig-gpio.ko - AUTOLOAD:=$(call AutoLoad,50,ledtrig-gpio) -endef - -define KernelPackage/ledtrig-gpio/description - Kernel module that allows LEDs to be controlled by gpio events -endef - -$(eval $(call KernelPackage,ledtrig-gpio)) - - -define KernelPackage/ledtrig-transient - SUBMENU:=$(LEDS_MENU) - TITLE:=LED Transient Trigger - KCONFIG:=CONFIG_LEDS_TRIGGER_TRANSIENT - FILES:=$(LED_TRIGGER_DIR)/ledtrig-transient.ko - AUTOLOAD:=$(call AutoLoad,50,ledtrig-transient,1) -endef - -define KernelPackage/ledtrig-transient/description - Kernel module that allows LEDs one time activation of a transient state. -endef - -$(eval $(call KernelPackage,ledtrig-transient)) - - -define KernelPackage/ledtrig-oneshot - SUBMENU:=$(LEDS_MENU) - TITLE:=LED One-Shot Trigger - KCONFIG:=CONFIG_LEDS_TRIGGER_ONESHOT - FILES:=$(LED_TRIGGER_DIR)/ledtrig-oneshot.ko - AUTOLOAD:=$(call AutoLoad,50,ledtrig-oneshot) -endef - -define KernelPackage/ledtrig-oneshot/description - Kernel module that allows LEDs to be triggered by sporadic events in - one-shot pulses -endef - -$(eval $(call KernelPackage,ledtrig-oneshot)) - - -define KernelPackage/ledtrig-pattern - SUBMENU:=$(LEDS_MENU) - TITLE:=LED Pattern Trigger - KCONFIG:=CONFIG_LEDS_TRIGGER_PATTERN - FILES:=$(LED_TRIGGER_DIR)/ledtrig-pattern.ko - AUTOLOAD:=$(call AutoLoad,50,ledtrig-pattern) -endef - -define KernelPackage/ledtrig-pattern/description - This allows LEDs to be controlled by a software or hardware pattern - which is a series of tuples, of brightness and duration (ms). -endef - -$(eval $(call KernelPackage,ledtrig-pattern)) - - -define KernelPackage/leds-apu - SUBMENU:=$(LEDS_MENU) - TITLE:=PC Engines APU1 LED support - DEPENDS:= @GPIO_SUPPORT @TARGET_x86 - KCONFIG:=CONFIG_LEDS_APU - FILES:=$(LINUX_DIR)/drivers/leds/leds-apu.ko - AUTOLOAD:=$(call AutoLoad,60,leds-apu,1) -endef - -define KernelPackage/leds-apu/description - Driver for the PC Engines APU1 LEDs. -endef - -$(eval $(call KernelPackage,leds-apu)) - - -define KernelPackage/leds-pca963x - SUBMENU:=$(LEDS_MENU) - TITLE:=PCA963x LED support - DEPENDS:=+kmod-i2c-core - KCONFIG:=CONFIG_LEDS_PCA963X - FILES:=$(LINUX_DIR)/drivers/leds/leds-pca963x.ko - AUTOLOAD:=$(call AutoLoad,60,leds-pca963x,1) -endef - -define KernelPackage/leds-pca963x/description - Driver for the NXP PCA963x I2C LED controllers. -endef - -$(eval $(call KernelPackage,leds-pca963x)) - - -define KernelPackage/leds-pwm - SUBMENU:=$(LEDS_MENU) - TITLE:=PWM driven LED Support - KCONFIG:=CONFIG_LEDS_PWM - DEPENDS:= @PWM_SUPPORT - FILES:=$(LINUX_DIR)/drivers/leds/leds-pwm.ko - AUTOLOAD:=$(call AutoLoad,60,leds-pwm,1) -endef - -define KernelPackage/leds-pwm/description - This option enables support for pwm driven LEDs -endef - -$(eval $(call KernelPackage,leds-pwm)) - - -define KernelPackage/leds-tlc591xx - SUBMENU:=$(LEDS_MENU) - TITLE:=LED driver for TLC59108 and TLC59116 controllers - DEPENDS:=+kmod-i2c-core +kmod-regmap-i2c - KCONFIG:=CONFIG_LEDS_TLC591XX - FILES:=$(LINUX_DIR)/drivers/leds/leds-tlc591xx.ko - AUTOLOAD:=$(call AutoLoad,60,leds-tlc591xx,1) -endef - -define KernelPackage/leds-tlc591xx/description - This option enables support for Texas Instruments TLC59108 - and TLC59116 LED controllers. -endef - -$(eval $(call KernelPackage,leds-tlc591xx)) - - -define KernelPackage/leds-uleds - SUBMENU:=$(LEDS_MENU) - TITLE:=Userspace LEDs - KCONFIG:=CONFIG_LEDS_USER - FILES:=$(LINUX_DIR)/drivers/leds/uleds.ko - AUTOLOAD:=$(call AutoLoad,60,uleds,1) -endef - -define KernelPackage/leds-uleds/description - This option enables support for userspace LEDs. -endef - -$(eval $(call KernelPackage,leds-uleds)) - - -define KernelPackage/input-leds - SUBMENU:=$(LEDS_MENU) - TITLE:=Input device LED support - DEPENDS:=+kmod-input-core - KCONFIG:=CONFIG_INPUT_LEDS - FILES:=$(LINUX_DIR)/drivers/input/input-leds.ko - AUTOLOAD:=$(call AutoLoad,50,input-leds,1) -endef - -define KernelPackage/input-leds/description - Provides support for LEDs on input devices- for example, - keyboard num/caps/scroll lock. -endef - -$(eval $(call KernelPackage,input-leds)) diff --git a/root/package/kernel/linux/modules/lib.mk b/root/package/kernel/linux/modules/lib.mk deleted file mode 100755 index 6e7796e2..00000000 --- a/root/package/kernel/linux/modules/lib.mk +++ /dev/null @@ -1,294 +0,0 @@ -# -# Copyright (C) 2011 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -LIB_MENU:=Libraries - -define KernelPackage/lib-crc-ccitt - SUBMENU:=$(LIB_MENU) - TITLE:=CRC-CCITT support - KCONFIG:=CONFIG_CRC_CCITT - FILES:=$(LINUX_DIR)/lib/crc-ccitt.ko - AUTOLOAD:=$(call AutoProbe,crc-ccitt) -endef - -define KernelPackage/lib-crc-ccitt/description - Kernel module for CRC-CCITT support -endef - -$(eval $(call KernelPackage,lib-crc-ccitt)) - - -define KernelPackage/lib-crc-itu-t - SUBMENU:=$(LIB_MENU) - TITLE:=CRC ITU-T V.41 support - KCONFIG:=CONFIG_CRC_ITU_T - FILES:=$(LINUX_DIR)/lib/crc-itu-t.ko - AUTOLOAD:=$(call AutoProbe,crc-itu-t) -endef - -define KernelPackage/lib-crc-itu-t/description - Kernel module for CRC ITU-T V.41 support -endef - -$(eval $(call KernelPackage,lib-crc-itu-t)) - - -define KernelPackage/lib-crc7 - SUBMENU:=$(LIB_MENU) - TITLE:=CRC7 support - KCONFIG:=CONFIG_CRC7 - FILES:=$(LINUX_DIR)/lib/crc7.ko - AUTOLOAD:=$(call AutoProbe,crc7) -endef - -define KernelPackage/lib-crc7/description - Kernel module for CRC7 support -endef - -$(eval $(call KernelPackage,lib-crc7)) - - -define KernelPackage/lib-crc8 - SUBMENU:=$(LIB_MENU) - TITLE:=CRC8 support - KCONFIG:=CONFIG_CRC8 - FILES:=$(LINUX_DIR)/lib/crc8.ko - AUTOLOAD:=$(call AutoProbe,crc8) -endef - -define KernelPackage/lib-crc8/description - Kernel module for CRC8 support -endef - -$(eval $(call KernelPackage,lib-crc8)) - - -define KernelPackage/lib-crc16 - SUBMENU:=$(LIB_MENU) - TITLE:=CRC16 support - KCONFIG:=CONFIG_CRC16 - FILES:=$(LINUX_DIR)/lib/crc16.ko - AUTOLOAD:=$(call AutoLoad,20,crc16,1) -endef - -define KernelPackage/lib-crc16/description - Kernel module for CRC16 support -endef - -$(eval $(call KernelPackage,lib-crc16)) - - -define KernelPackage/lib-crc32c - SUBMENU:=$(LIB_MENU) - TITLE:=CRC32 support - KCONFIG:=CONFIG_LIBCRC32C - DEPENDS:=+kmod-crypto-crc32c - FILES:=$(LINUX_DIR)/lib/libcrc32c.ko - AUTOLOAD:=$(call AutoProbe,libcrc32c) -endef - -define KernelPackage/lib-crc32c/description - Kernel module for CRC32 support -endef - -$(eval $(call KernelPackage,lib-crc32c)) - - -define KernelPackage/lib-lzo - SUBMENU:=$(LIB_MENU) - TITLE:=LZO support - DEPENDS:=+kmod-crypto-acompress - KCONFIG:= \ - CONFIG_CRYPTO_LZO \ - CONFIG_LZO_COMPRESS \ - CONFIG_LZO_DECOMPRESS - HIDDEN:=1 - FILES:= \ - $(LINUX_DIR)/crypto/lzo.ko \ - $(LINUX_DIR)/lib/lzo/lzo_compress.ko \ - $(LINUX_DIR)/lib/lzo/lzo_decompress.ko - AUTOLOAD:=$(call AutoProbe,lzo lzo_compress lzo_decompress) -endef - -define KernelPackage/lib-lzo/description - Kernel module for LZO compression/decompression support -endef - -$(eval $(call KernelPackage,lib-lzo)) - - -define KernelPackage/lib-zstd - SUBMENU:=$(LIB_MENU) - TITLE:=ZSTD support - DEPENDS:=+kmod-crypto-acompress - KCONFIG:= \ - CONFIG_CRYPTO_ZSTD \ - CONFIG_ZSTD_COMPRESS \ - CONFIG_ZSTD_DECOMPRESS \ - CONFIG_XXHASH - FILES:= \ - $(LINUX_DIR)/crypto/zstd.ko \ - $(LINUX_DIR)/lib/xxhash.ko \ - $(LINUX_DIR)/lib/zstd/zstd_compress.ko \ - $(LINUX_DIR)/lib/zstd/zstd_decompress.ko - AUTOLOAD:=$(call AutoProbe,xxhash zstd zstd_compress zstd_decompress) -endef - -define KernelPackage/lib-zstd/description - Kernel module for ZSTD compression/decompression support -endef - -$(eval $(call KernelPackage,lib-zstd)) - - -define KernelPackage/lib-lz4 - SUBMENU:=$(LIB_MENU) - TITLE:=LZ4 support - DEPENDS:=+kmod-crypto-acompress - KCONFIG:= \ - CONFIG_CRYPTO_LZ4 \ - CONFIG_LZ4_COMPRESS \ - CONFIG_LZ4_DECOMPRESS - FILES:= \ - $(LINUX_DIR)/crypto/lz4.ko \ - $(LINUX_DIR)/lib/lz4/lz4_compress.ko \ - $(LINUX_DIR)/lib/lz4/lz4_decompress.ko - AUTOLOAD:=$(call AutoProbe,lz4 lz4_compress lz4_decompress) -endef - -define KernelPackage/lib-lz4/description - Kernel module for LZ4 compression/decompression support -endef - -$(eval $(call KernelPackage,lib-lz4)) - - -define KernelPackage/lib-raid6 - SUBMENU:=$(LIB_MENU) - TITLE:=RAID6 algorithm support - HIDDEN:=1 - KCONFIG:=CONFIG_RAID6_PQ - FILES:=$(LINUX_DIR)/lib/raid6/raid6_pq.ko - AUTOLOAD:=$(call AutoProbe,raid6_pq) -endef - -define KernelPackage/lib-raid6/description - Kernel module for RAID6 algorithms -endef - -$(eval $(call KernelPackage,lib-raid6)) - - -define KernelPackage/lib-xor - SUBMENU:=$(LIB_MENU) - TITLE:=XOR blocks algorithm support - HIDDEN:=1 - KCONFIG:=CONFIG_XOR_BLOCKS -ifneq ($(wildcard $(LINUX_DIR)/arch/$(LINUX_KARCH)/lib/xor-neon.ko),) - FILES:= \ - $(LINUX_DIR)/crypto/xor.ko \ - $(LINUX_DIR)/arch/$(LINUX_KARCH)/lib/xor-neon.ko - AUTOLOAD:=$(call AutoProbe,xor-neon xor) -else - FILES:=$(LINUX_DIR)/crypto/xor.ko - AUTOLOAD:=$(call AutoProbe,xor) -endif -endef - -define KernelPackage/lib-xor/description - Kernel module for XOR blocks algorithms -endef - -$(eval $(call KernelPackage,lib-xor)) - - -define KernelPackage/lib-textsearch -SUBMENU:=$(LIB_MENU) - TITLE:=Textsearch support - KCONFIG:= \ - CONFIG_TEXTSEARCH=y \ - CONFIG_TEXTSEARCH_KMP \ - CONFIG_TEXTSEARCH_BM \ - CONFIG_TEXTSEARCH_FSM - FILES:= \ - $(LINUX_DIR)/lib/ts_kmp.ko \ - $(LINUX_DIR)/lib/ts_bm.ko \ - $(LINUX_DIR)/lib/ts_fsm.ko - AUTOLOAD:=$(call AutoProbe,ts_kmp ts_bm ts_fsm) -endef - -$(eval $(call KernelPackage,lib-textsearch)) - - -define KernelPackage/lib-zlib-inflate - SUBMENU:=$(LIB_MENU) - TITLE:=Zlib support - HIDDEN:=1 - KCONFIG:=CONFIG_ZLIB_INFLATE - FILES:=$(LINUX_DIR)/lib/zlib_inflate/zlib_inflate.ko - AUTOLOAD:=$(call AutoProbe,zlib_inflate) -endef - -$(eval $(call KernelPackage,lib-zlib-inflate)) - - -define KernelPackage/lib-zlib-deflate - SUBMENU:=$(LIB_MENU) - TITLE:=Zlib support - HIDDEN:=1 - KCONFIG:=CONFIG_ZLIB_DEFLATE - FILES:=$(LINUX_DIR)/lib/zlib_deflate/zlib_deflate.ko - AUTOLOAD:=$(call AutoProbe,zlib_deflate) -endef - -$(eval $(call KernelPackage,lib-zlib-deflate)) - - -define KernelPackage/lib-cordic - SUBMENU:=$(LIB_MENU) - TITLE:=Cordic function support - KCONFIG:=CONFIG_CORDIC - FILES:=$(LINUX_DIR)/lib/math/cordic.ko - AUTOLOAD:=$(call AutoProbe,cordic) -endef - -define KernelPackage/lib-cordic/description - Kernel module for Cordic function support -endef - -$(eval $(call KernelPackage,lib-cordic)) - - -define KernelPackage/asn1-decoder - SUBMENU:=$(LIB_MENU) - TITLE:=Simple ASN1 decoder - KCONFIG:= CONFIG_ASN1 - HIDDEN:=1 - FILES:=$(LINUX_DIR)/lib/asn1_decoder.ko -endef - -$(eval $(call KernelPackage,asn1-decoder)) - -define KernelPackage/asn1-encoder - SUBMENU:=$(LIB_MENU) - TITLE:=Simple ASN1 encoder - KCONFIG:= CONFIG_ASN1_ENCODER@ge5.13 - HIDDEN:=1 - FILES:=$(LINUX_DIR)/lib/asn1_encoder.ko -endef - -$(eval $(call KernelPackage,asn1-encoder)) - -define KernelPackage/oid-registry - SUBMENU:=$(LIB_MENU) - TITLE:=OID Registry - KCONFIG:= CONFIG_OID_REGISTRY - HIDDEN:=1 - FILES:=$(LINUX_DIR)/lib/oid_registry.ko -endef - -$(eval $(call KernelPackage,oid-registry)) diff --git a/root/package/kernel/linux/modules/netdevices.mk b/root/package/kernel/linux/modules/netdevices.mk deleted file mode 100755 index 6bbaf21e..00000000 --- a/root/package/kernel/linux/modules/netdevices.mk +++ /dev/null @@ -1,1287 +0,0 @@ -# -# Copyright (C) 2006-2011 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -NETWORK_DEVICES_MENU:=Network Devices - -define KernelPackage/sis190 - SUBMENU:=$(NETWORK_DEVICES_MENU) - TITLE:=SiS 190 Fast/Gigabit Ethernet support - DEPENDS:=@PCI_SUPPORT +kmod-mii - KCONFIG:=CONFIG_SIS190 - FILES:=$(LINUX_DIR)/drivers/net/ethernet/sis/sis190.ko - AUTOLOAD:=$(call AutoProbe,sis190) -endef - -$(eval $(call KernelPackage,sis190)) - - -define KernelPackage/skge - SUBMENU:=$(NETWORK_DEVICES_MENU) - TITLE:=SysKonnect Yukon support - DEPENDS:=@PCI_SUPPORT - KCONFIG:=CONFIG_SKGE \ - CONFIG_SKGE_DEBUG=n \ - CONFIG_SKGE_GENESIS=n - FILES:=$(LINUX_DIR)/drivers/net/ethernet/marvell/skge.ko - AUTOLOAD:=$(call AutoProbe,skge) -endef - -$(eval $(call KernelPackage,skge)) - - -define KernelPackage/alx - SUBMENU:=$(NETWORK_DEVICES_MENU) - TITLE:=Qualcomm Atheros AR816x/AR817x PCI-E Ethernet Network Driver - DEPENDS:=@PCI_SUPPORT +kmod-mdio - KCONFIG:=CONFIG_ALX - FILES:=$(LINUX_DIR)/drivers/net/ethernet/atheros/alx/alx.ko - AUTOLOAD:=$(call AutoProbe,alx) -endef - -$(eval $(call KernelPackage,alx)) - - -define KernelPackage/atl2 - SUBMENU:=$(NETWORK_DEVICES_MENU) - TITLE:=Atheros L2 Fast Ethernet support - DEPENDS:=@PCI_SUPPORT - KCONFIG:=CONFIG_ATL2 - FILES:=$(LINUX_DIR)/drivers/net/ethernet/atheros/atlx/atl2.ko - AUTOLOAD:=$(call AutoProbe,atl2) -endef - -$(eval $(call KernelPackage,atl2)) - - -define KernelPackage/atl1 - SUBMENU:=$(NETWORK_DEVICES_MENU) - TITLE:=Atheros L1 Gigabit Ethernet support - DEPENDS:=@PCI_SUPPORT +kmod-mii - KCONFIG:=CONFIG_ATL1 - FILES:=$(LINUX_DIR)/drivers/net/ethernet/atheros/atlx/atl1.ko - AUTOLOAD:=$(call AutoProbe,atl1) -endef - -$(eval $(call KernelPackage,atl1)) - - -define KernelPackage/atl1c - SUBMENU:=$(NETWORK_DEVICES_MENU) - TITLE:=Atheros L1C - DEPENDS:=@PCI_SUPPORT - KCONFIG:=CONFIG_ATL1C - FILES:=$(LINUX_DIR)/drivers/net/ethernet/atheros/atl1c/atl1c.ko - AUTOLOAD:=$(call AutoProbe,atl1c) -endef - -$(eval $(call KernelPackage,atl1c)) - - -define KernelPackage/atl1e - SUBMENU:=$(NETWORK_DEVICES_MENU) - TITLE:=Atheros L1E - DEPENDS:=@PCI_SUPPORT - KCONFIG:=CONFIG_ATL1E - FILES:=$(LINUX_DIR)/drivers/net/ethernet/atheros/atl1e/atl1e.ko - AUTOLOAD:=$(call AutoProbe,atl1e) -endef - -$(eval $(call KernelPackage,atl1e)) - - -define KernelPackage/libphy - SUBMENU:=$(NETWORK_DEVICES_MENU) - TITLE:=PHY library - KCONFIG:=CONFIG_PHYLIB - FILES:=$(LINUX_DIR)/drivers/net/phy/libphy.ko - AUTOLOAD:=$(call AutoLoad,15,libphy,1) -endef - -define KernelPackage/libphy/description - PHY library -endef - -$(eval $(call KernelPackage,libphy)) - - -define KernelPackage/phylink - SUBMENU:=$(NETWORK_DEVICES_MENU) - TITLE:=Model for MAC to optional PHY connection - KCONFIG:=CONFIG_PHYLINK - FILES:=$(LINUX_DIR)/drivers/net/phy/phylink.ko - AUTOLOAD:=$(call AutoLoad,15,phylink,1) -endef - -define KernelPackage/phylink/description - Model for MAC to optional PHY connection -endef - -$(eval $(call KernelPackage,phylink)) - - -define KernelPackage/mii - SUBMENU:=$(NETWORK_DEVICES_MENU) - TITLE:=MII library - KCONFIG:=CONFIG_MII - FILES:=$(LINUX_DIR)/drivers/net/mii.ko - AUTOLOAD:=$(call AutoLoad,15,mii,1) -endef - -define KernelPackage/mii/description - MII library -endef - -$(eval $(call KernelPackage,mii)) - - -define KernelPackage/mdio-devres - SUBMENU:=$(NETWORK_DEVICES_MENU) - TITLE:=Supports MDIO device registration - DEPENDS:=@LINUX_5_10 +kmod-libphy PACKAGE_kmod-of-mdio:kmod-of-mdio - KCONFIG:=CONFIG_MDIO_DEVRES - HIDDEN:=1 - FILES:=$(LINUX_DIR)/drivers/net/phy/mdio_devres.ko - AUTOLOAD:=$(call AutoProbe,mdio-devres) -endef - -define KernelPackage/mdio-devres/description - Supports MDIO device registration -endef - -$(eval $(call KernelPackage,mdio-devres)) - - -define KernelPackage/mdio-gpio - SUBMENU:=$(NETWORK_DEVICES_MENU) - TITLE:= Supports GPIO lib-based MDIO busses - DEPENDS:=+kmod-libphy @GPIO_SUPPORT +(TARGET_armvirt||TARGET_bcm27xx_bcm2708||TARGET_tegra):kmod-of-mdio - KCONFIG:= \ - CONFIG_MDIO_BITBANG \ - CONFIG_MDIO_GPIO - FILES:= \ - $(LINUX_DIR)/drivers/net/phy/mdio-gpio.ko@lt5.10 \ - $(LINUX_DIR)/drivers/net/phy/mdio-bitbang.ko@lt5.10 \ - $(LINUX_DIR)/drivers/net/mdio/mdio-gpio.ko@ge5.10 \ - $(LINUX_DIR)/drivers/net/mdio/mdio-bitbang.ko@ge5.10 - AUTOLOAD:=$(call AutoProbe,mdio-gpio) -endef - -define KernelPackage/mdio-gpio/description - Supports GPIO lib-based MDIO busses -endef - -$(eval $(call KernelPackage,mdio-gpio)) - - -define KernelPackage/et131x - SUBMENU:=$(NETWORK_DEVICES_MENU) - TITLE:=Agere ET131x Gigabit Ethernet driver - URL:=http://sourceforge.net/projects/et131x - FILES:= \ - $(LINUX_DIR)/drivers/net/ethernet/agere/et131x.ko - KCONFIG:= \ - CONFIG_ET131X \ - CONFIG_ET131X_DEBUG=n - DEPENDS:=@PCI_SUPPORT +kmod-libphy - AUTOLOAD:=$(call AutoProbe,et131x) -endef - -define KernelPackage/et131x/description - This package contains the et131x kernel module -endef - -$(eval $(call KernelPackage,et131x)) - - -define KernelPackage/phylib-broadcom - SUBMENU:=$(NETWORK_DEVICES_MENU) - TITLE:=Broadcom Ethernet PHY library - KCONFIG:=CONFIG_BCM_NET_PHYLIB - HIDDEN:=1 - DEPENDS:=+kmod-libphy - FILES:=$(LINUX_DIR)/drivers/net/phy/bcm-phy-lib.ko - AUTOLOAD:=$(call AutoLoad,17,bcm-phy-lib) -endef - -$(eval $(call KernelPackage,phylib-broadcom)) - - -define KernelPackage/phy-broadcom - SUBMENU:=$(NETWORK_DEVICES_MENU) - TITLE:=Broadcom Ethernet PHY driver - KCONFIG:=CONFIG_BROADCOM_PHY - DEPENDS:=+kmod-libphy +kmod-phylib-broadcom - FILES:=$(LINUX_DIR)/drivers/net/phy/broadcom.ko - AUTOLOAD:=$(call AutoLoad,18,broadcom,1) -endef - -define KernelPackage/phy-broadcom/description - Currently supports the BCM5411, BCM5421, BCM5461, BCM5464, BCM5481, - BCM5482 and BCM57780 PHYs. -endef - -$(eval $(call KernelPackage,phy-broadcom)) - - -define KernelPackage/phy-bcm84881 - SUBMENU:=$(NETWORK_DEVICES_MENU) - TITLE:=Broadcom BCM84881 PHY driver - KCONFIG:=CONFIG_BCM84881_PHY - DEPENDS:=+kmod-libphy - FILES:=$(LINUX_DIR)/drivers/net/phy/bcm84881.ko - AUTOLOAD:=$(call AutoLoad,18,bcm84881,1) -endef - -define KernelPackage/phy-bcm84881/description - Supports the Broadcom 84881 PHY. -endef - -$(eval $(call KernelPackage,phy-bcm84881)) - - - -define KernelPackage/phy-realtek - SUBMENU:=$(NETWORK_DEVICES_MENU) - TITLE:=Realtek Ethernet PHY driver - KCONFIG:=CONFIG_REALTEK_PHY - DEPENDS:=+kmod-libphy - FILES:=$(LINUX_DIR)/drivers/net/phy/realtek.ko - AUTOLOAD:=$(call AutoLoad,18,realtek,1) -endef - -define KernelPackage/phy-realtek/description - Supports the Realtek 821x PHY. -endef - -$(eval $(call KernelPackage,phy-realtek)) - - -define KernelPackage/swconfig - SUBMENU:=$(NETWORK_DEVICES_MENU) - TITLE:=switch configuration API - DEPENDS:=+kmod-libphy - KCONFIG:=CONFIG_SWCONFIG - FILES:=$(LINUX_DIR)/drivers/net/phy/swconfig.ko - AUTOLOAD:=$(call AutoLoad,41,swconfig) -endef - -define KernelPackage/swconfig/description - Switch configuration API module -endef - -$(eval $(call KernelPackage,swconfig)) - -define KernelPackage/switch-bcm53xx - SUBMENU:=$(NETWORK_DEVICES_MENU) - TITLE:=Broadcom bcm53xx switch support - DEPENDS:=+kmod-swconfig - KCONFIG:=CONFIG_SWCONFIG_B53 - FILES:=$(LINUX_DIR)/drivers/net/phy/b53/b53_common.ko - AUTOLOAD:=$(call AutoLoad,42,b53_common) -endef - -define KernelPackage/switch-bcm53xx/description - Broadcom bcm53xx switch support -endef - -$(eval $(call KernelPackage,switch-bcm53xx)) - -define KernelPackage/switch-bcm53xx-mdio - SUBMENU:=$(NETWORK_DEVICES_MENU) - TITLE:=Broadcom bcm53xx switch MDIO support - DEPENDS:=+kmod-switch-bcm53xx - KCONFIG:=CONFIG_SWCONFIG_B53_PHY_DRIVER - FILES:=$(LINUX_DIR)/drivers/net/phy/b53/b53_mdio.ko - AUTOLOAD:=$(call AutoLoad,42,b53_mdio) -endef - -define KernelPackage/switch-bcm53xx-mdio/description - Broadcom bcm53xx switch MDIO support -endef - -$(eval $(call KernelPackage,switch-bcm53xx-mdio)) - - -define KernelPackage/switch-ip17xx - SUBMENU:=$(NETWORK_DEVICES_MENU) - TITLE:=IC+ IP17XX switch support - DEPENDS:=+kmod-swconfig - KCONFIG:=CONFIG_IP17XX_PHY - FILES:=$(LINUX_DIR)/drivers/net/phy/ip17xx.ko - AUTOLOAD:=$(call AutoLoad,42,ip17xx) -endef - -define KernelPackage/switch-ip17xx/description - IC+ IP175C/IP178C switch support -endef - -$(eval $(call KernelPackage,switch-ip17xx)) - - -define KernelPackage/switch-rtl8306 - SUBMENU:=$(NETWORK_DEVICES_MENU) - TITLE:=Realtek RTL8306S switch support - DEPENDS:=+kmod-swconfig - KCONFIG:=CONFIG_RTL8306_PHY - FILES:=$(LINUX_DIR)/drivers/net/phy/rtl8306.ko - AUTOLOAD:=$(call AutoLoad,43,rtl8306) -endef - -define KernelPackage/switch-rtl8306/description - Realtek RTL8306S switch support -endef - -$(eval $(call KernelPackage,switch-rtl8306)) - - -define KernelPackage/switch-rtl8366-smi - SUBMENU:=$(NETWORK_DEVICES_MENU) - TITLE:=Realtek RTL8366 SMI switch interface support - DEPENDS:=@GPIO_SUPPORT +kmod-swconfig +(TARGET_armvirt||TARGET_bcm27xx_bcm2708||TARGET_tegra):kmod-of-mdio - KCONFIG:=CONFIG_RTL8366_SMI - FILES:=$(LINUX_DIR)/drivers/net/phy/rtl8366_smi.ko - AUTOLOAD:=$(call AutoLoad,42,rtl8366_smi,1) -endef - -define KernelPackage/switch-rtl8366-smi/description - Realtek RTL8366 series SMI switch interface support -endef - -$(eval $(call KernelPackage,switch-rtl8366-smi)) - - -define KernelPackage/switch-rtl8366rb - SUBMENU:=$(NETWORK_DEVICES_MENU) - TITLE:=Realtek RTL8366RB switch support - DEPENDS:=+kmod-switch-rtl8366-smi - KCONFIG:=CONFIG_RTL8366RB_PHY - FILES:=$(LINUX_DIR)/drivers/net/phy/rtl8366rb.ko - AUTOLOAD:=$(call AutoLoad,43,rtl8366rb) -endef - -define KernelPackage/switch-rtl8366rb/description - Realtek RTL8366RB switch support -endef - -$(eval $(call KernelPackage,switch-rtl8366rb)) - - -define KernelPackage/switch-rtl8366s - SUBMENU:=$(NETWORK_DEVICES_MENU) - TITLE:=Realtek RTL8366S switch support - DEPENDS:=+kmod-switch-rtl8366-smi - KCONFIG:=CONFIG_RTL8366S_PHY - FILES:=$(LINUX_DIR)/drivers/net/phy/rtl8366s.ko - AUTOLOAD:=$(call AutoLoad,43,rtl8366s) -endef - -define KernelPackage/switch-rtl8366s/description - Realtek RTL8366S switch support -endef - -$(eval $(call KernelPackage,switch-rtl8366s)) - - -define KernelPackage/switch-rtl8367b - SUBMENU:=$(NETWORK_DEVICES_MENU) - TITLE:=Realtek RTL8367R/B switch support - DEPENDS:=+kmod-switch-rtl8366-smi - KCONFIG:=CONFIG_RTL8367B_PHY - FILES:=$(LINUX_DIR)/drivers/net/phy/rtl8367b.ko - AUTOLOAD:=$(call AutoLoad,43,rtl8367b,1) -endef - -define KernelPackage/switch-rtl8367b/description - Realtek RTL8367R/B switch support -endef - -$(eval $(call KernelPackage,switch-rtl8367b)) - - -define KernelPackage/natsemi - SUBMENU:=$(NETWORK_DEVICES_MENU) - TITLE:=National Semiconductor DP8381x series - DEPENDS:=@PCI_SUPPORT - KCONFIG:=CONFIG_NATSEMI - FILES:=$(LINUX_DIR)/drivers/net/ethernet/natsemi/natsemi.ko - AUTOLOAD:=$(call AutoLoad,20,natsemi) -endef - -define KernelPackage/natsemi/description - Kernel modules for National Semiconductor DP8381x series PCI Ethernet - adapters. -endef - -$(eval $(call KernelPackage,natsemi)) - - -define KernelPackage/r6040 - SUBMENU:=$(NETWORK_DEVICES_MENU) - TITLE:=RDC Fast-Ethernet support - DEPENDS:=@PCI_SUPPORT +kmod-libphy - KCONFIG:=CONFIG_R6040 \ - CONFIG_R6040_NAPI=y - FILES:=$(LINUX_DIR)/drivers/net/ethernet/rdc/r6040.ko - AUTOLOAD:=$(call AutoProbe,r6040) -endef - -define KernelPackage/r6040/description - Kernel modules for RDC Fast-Ethernet adapters. -endef - -$(eval $(call KernelPackage,r6040)) - - -define KernelPackage/niu - SUBMENU:=$(NETWORK_DEVICES_MENU) - TITLE:=Sun Neptune 10Gbit Ethernet support - DEPENDS:=@PCI_SUPPORT - KCONFIG:=CONFIG_NIU - FILES:=$(LINUX_DIR)/drivers/net/ethernet/sun/niu.ko - AUTOLOAD:=$(call AutoProbe,niu) -endef - -define KernelPackage/niu/description - This enables support for cards based upon Sun's Neptune chipset. -endef - -$(eval $(call KernelPackage,niu)) - - -define KernelPackage/sis900 - SUBMENU:=$(NETWORK_DEVICES_MENU) - TITLE:=SiS 900 Ethernet support - DEPENDS:=@PCI_SUPPORT +kmod-mii - KCONFIG:=CONFIG_SIS900 - FILES:=$(LINUX_DIR)/drivers/net/ethernet/sis/sis900.ko - AUTOLOAD:=$(call AutoProbe,sis900) -endef - -define KernelPackage/sis900/description - Kernel modules for Sis 900 Ethernet adapters. -endef - -$(eval $(call KernelPackage,sis900)) - - -define KernelPackage/sky2 - SUBMENU:=$(NETWORK_DEVICES_MENU) - TITLE:=SysKonnect Yukon2 support - DEPENDS:=@PCI_SUPPORT - KCONFIG:=CONFIG_SKY2 - FILES:=$(LINUX_DIR)/drivers/net/ethernet/marvell/sky2.ko - AUTOLOAD:=$(call AutoProbe,sky2) -endef - -define KernelPackage/sky2/description - This driver supports Gigabit Ethernet adapters based on the - Marvell Yukon 2 chipset: - Marvell 88E8021/88E8022/88E8035/88E8036/88E8038/88E8050/88E8052/ - 88E8053/88E8055/88E8061/88E8062, SysKonnect SK-9E21D/SK-9S21 - - There is companion driver for the older Marvell Yukon and - Genesis based adapters: skge. -endef - -$(eval $(call KernelPackage,sky2)) - - -define KernelPackage/via-rhine - SUBMENU:=$(NETWORK_DEVICES_MENU) - TITLE:=Via Rhine ethernet support - DEPENDS:=@PCI_SUPPORT +kmod-mii - KCONFIG:=CONFIG_VIA_RHINE \ - CONFIG_VIA_RHINE_MMIO=y - FILES:=$(LINUX_DIR)/drivers/net/ethernet/via/via-rhine.ko - AUTOLOAD:=$(call AutoProbe,via-rhine) -endef - -define KernelPackage/via-rhine/description - Kernel modules for Via Rhine Ethernet chipsets -endef - -$(eval $(call KernelPackage,via-rhine)) - - -define KernelPackage/via-velocity - SUBMENU:=$(NETWORK_DEVICES_MENU) - TITLE:=VIA Velocity Gigabit Ethernet Adapter kernel support - DEPENDS:=@PCI_SUPPORT +kmod-lib-crc-ccitt - KCONFIG:=CONFIG_VIA_VELOCITY - FILES:=$(LINUX_DIR)/drivers/net/ethernet/via/via-velocity.ko - AUTOLOAD:=$(call AutoProbe,via-velocity) -endef - -define KernelPackage/via-velocity/description - Kernel modules for VIA Velocity Gigabit Ethernet chipsets -endef - -$(eval $(call KernelPackage,via-velocity)) - - -define KernelPackage/8139too - SUBMENU:=$(NETWORK_DEVICES_MENU) - TITLE:=RealTek RTL-8139 PCI Fast Ethernet Adapter kernel support - DEPENDS:=@PCI_SUPPORT +kmod-mii - KCONFIG:=CONFIG_8139TOO \ - CONFIG_8139TOO_PIO=y \ - CONFIG_8139TOO_TUNE_TWISTER=n \ - CONFIG_8139TOO_8129=n \ - CONFIG_8139_OLD_RX_RESET=n - FILES:=$(LINUX_DIR)/drivers/net/ethernet/realtek/8139too.ko - AUTOLOAD:=$(call AutoProbe,8139too) -endef - -define KernelPackage/8139too/description - Kernel modules for RealTek RTL-8139 PCI Fast Ethernet adapters -endef - -$(eval $(call KernelPackage,8139too)) - - -define KernelPackage/8139cp - SUBMENU:=$(NETWORK_DEVICES_MENU) - TITLE:=RealTek RTL-8139C+ PCI Fast Ethernet Adapter kernel support - DEPENDS:=@PCI_SUPPORT +kmod-mii - KCONFIG:=CONFIG_8139CP - FILES:=$(LINUX_DIR)/drivers/net/ethernet/realtek/8139cp.ko - AUTOLOAD:=$(call AutoProbe,8139cp) -endef - -define KernelPackage/8139cp/description - Kernel module for RealTek RTL-8139C+ PCI Fast Ethernet adapters -endef - -$(eval $(call KernelPackage,8139cp)) - - -define KernelPackage/r8169 - SUBMENU:=$(NETWORK_DEVICES_MENU) - TITLE:=RealTek RTL-8169 PCI Gigabit Ethernet Adapter kernel support - DEPENDS:=@PCI_SUPPORT +kmod-mii +r8169-firmware +kmod-phy-realtek +LINUX_5_10:kmod-mdio-devres - KCONFIG:= \ - CONFIG_R8169 \ - CONFIG_R8169_NAPI=y \ - CONFIG_R8169_VLAN=n - FILES:=$(LINUX_DIR)/drivers/net/ethernet/realtek/r8169.ko - AUTOLOAD:=$(call AutoProbe,r8169) -endef - -define KernelPackage/r8169/description - Kernel modules for RealTek RTL-8169 PCI Gigabit Ethernet adapters -endef - -$(eval $(call KernelPackage,r8169)) - - -define KernelPackage/ne2k-pci - SUBMENU:=$(NETWORK_DEVICES_MENU) - TITLE:=ne2k-pci Ethernet Adapter kernel support - DEPENDS:=@PCI_SUPPORT - KCONFIG:=CONFIG_NE2K_PCI - FILES:= \ - $(LINUX_DIR)/drivers/net/ethernet/8390/ne2k-pci.ko \ - $(LINUX_DIR)/drivers/net/ethernet/8390/8390.ko - AUTOLOAD:=$(call AutoProbe,8390 ne2k-pci) -endef - -define KernelPackage/ne2k-pci/description - Kernel modules for NE2000 PCI Ethernet Adapter kernel -endef - -$(eval $(call KernelPackage,ne2k-pci)) - - -define KernelPackage/e100 - SUBMENU:=$(NETWORK_DEVICES_MENU) - TITLE:=Intel(R) PRO/100+ cards kernel support - DEPENDS:=@PCI_SUPPORT +kmod-mii +e100-firmware - KCONFIG:=CONFIG_E100 - FILES:=$(LINUX_DIR)/drivers/net/ethernet/intel/e100.ko - AUTOLOAD:=$(call AutoProbe,e100) -endef - -define KernelPackage/e100/description - Kernel modules for Intel(R) PRO/100+ Ethernet adapters -endef - -$(eval $(call KernelPackage,e100)) - - -define KernelPackage/e1000 - SUBMENU:=$(NETWORK_DEVICES_MENU) - TITLE:=Intel(R) PRO/1000 PCI cards kernel support - DEPENDS:=@PCI_SUPPORT - KCONFIG:=CONFIG_E1000 \ - CONFIG_E1000_DISABLE_PACKET_SPLIT=n \ - CONFIG_E1000_NAPI=y - FILES:=$(LINUX_DIR)/drivers/net/ethernet/intel/e1000/e1000.ko - AUTOLOAD:=$(call AutoLoad,35,e1000) -endef - -define KernelPackage/e1000/description - Kernel modules for Intel(R) PRO/1000 PCI Ethernet adapters. -endef - -$(eval $(call KernelPackage,e1000)) - - -define KernelPackage/e1000e - SUBMENU:=$(NETWORK_DEVICES_MENU) - TITLE:=Intel(R) PRO/1000 PCIe cards kernel support - DEPENDS:=@PCIE_SUPPORT +kmod-ptp - KCONFIG:=CONFIG_E1000E - FILES:=$(LINUX_DIR)/drivers/net/ethernet/intel/e1000e/e1000e.ko - AUTOLOAD:=$(call AutoProbe,e1000e) - MODPARAMS.e1000e:= \ - IntMode=1 \ - InterruptThrottleRate=4,4,4,4,4,4,4,4 -endef - -define KernelPackage/e1000e/description - Kernel modules for Intel(R) PRO/1000 PCIe Ethernet adapters. -endef - -$(eval $(call KernelPackage,e1000e)) - - -define KernelPackage/igb - SUBMENU:=$(NETWORK_DEVICES_MENU) - TITLE:=Intel(R) 82575/82576 PCI-Express Gigabit Ethernet support - DEPENDS:=@PCI_SUPPORT +kmod-i2c-core +kmod-i2c-algo-bit +kmod-ptp +kmod-hwmon-core - KCONFIG:=CONFIG_IGB \ - CONFIG_IGB_HWMON=y \ - CONFIG_IGB_DCA=n - FILES:=$(LINUX_DIR)/drivers/net/ethernet/intel/igb/igb.ko - AUTOLOAD:=$(call AutoLoad,35,igb,1) -endef - -define KernelPackage/igb/description - Kernel modules for Intel(R) 82575/82576 PCI-Express Gigabit Ethernet adapters. -endef - -$(eval $(call KernelPackage,igb)) - - -define KernelPackage/igbvf - SUBMENU:=$(NETWORK_DEVICES_MENU) - TITLE:=Intel(R) 82576 Virtual Function Ethernet support - DEPENDS:=@PCI_SUPPORT @TARGET_x86 +kmod-i2c-core +kmod-i2c-algo-bit +kmod-ptp - KCONFIG:=CONFIG_IGBVF \ - CONFIG_IGB_HWMON=y \ - CONFIG_IGB_DCA=n - FILES:=$(LINUX_DIR)/drivers/net/ethernet/intel/igbvf/igbvf.ko - AUTOLOAD:=$(call AutoLoad,35,igbvf) -endef - -define KernelPackage/igbvf/description - Kernel modules for Intel(R) 82576 Virtual Function Ethernet adapters. -endef - -$(eval $(call KernelPackage,igbvf)) - - -define KernelPackage/ixgbe - SUBMENU:=$(NETWORK_DEVICES_MENU) - TITLE:=Intel(R) 82598/82599 PCI-Express 10 Gigabit Ethernet support - DEPENDS:=@PCI_SUPPORT +kmod-mdio +kmod-ptp +kmod-hwmon-core +kmod-libphy +LINUX_5_10:kmod-mdio-devres - KCONFIG:=CONFIG_IXGBE \ - CONFIG_IXGBE_VXLAN=n \ - CONFIG_IXGBE_HWMON=y \ - CONFIG_IXGBE_DCA=n - FILES:=$(LINUX_DIR)/drivers/net/ethernet/intel/ixgbe/ixgbe.ko - AUTOLOAD:=$(call AutoLoad,35,ixgbe) -endef - -define KernelPackage/ixgbe/description - Kernel modules for Intel(R) 82598/82599 PCI-Express 10 Gigabit Ethernet adapters. -endef - -$(eval $(call KernelPackage,ixgbe)) - - -define KernelPackage/ixgbevf - SUBMENU:=$(NETWORK_DEVICES_MENU) - TITLE:=Intel(R) 82599 Virtual Function Ethernet support - DEPENDS:=@PCI_SUPPORT +kmod-ixgbe - KCONFIG:=CONFIG_IXGBEVF \ - CONFIG_IXGBE_VXLAN=n \ - CONFIG_IXGBE_HWMON=y \ - CONFIG_IXGBE_DCA=n - FILES:=$(LINUX_DIR)/drivers/net/ethernet/intel/ixgbevf/ixgbevf.ko - AUTOLOAD:=$(call AutoLoad,35,ixgbevf) -endef - -define KernelPackage/ixgbevf/description - Kernel modules for Intel(R) 82599 Virtual Function Ethernet adapters. -endef - -$(eval $(call KernelPackage,ixgbevf)) - - -define KernelPackage/i40e - SUBMENU:=$(NETWORK_DEVICES_MENU) - TITLE:=Intel(R) Ethernet Controller XL710 Family support - DEPENDS:=@PCI_SUPPORT +kmod-mdio +kmod-ptp +kmod-hwmon-core +kmod-libphy - KCONFIG:=CONFIG_I40E \ - CONFIG_I40E_VXLAN=n \ - CONFIG_I40E_HWMON=y \ - CONFIG_I40E_DCA=n - FILES:=$(LINUX_DIR)/drivers/net/ethernet/intel/i40e/i40e.ko - AUTOLOAD:=$(call AutoProbe,i40e) -endef - -define KernelPackage/i40e/description - Kernel modules for Intel(R) Ethernet Controller XL710 Family 40 Gigabit Ethernet adapters. -endef - -$(eval $(call KernelPackage,i40e)) - - -define KernelPackage/iavf - SUBMENU:=$(NETWORK_DEVICES_MENU) - TITLE:=Intel(R) Ethernet Adaptive Virtual Function support - DEPENDS:=@PCI_SUPPORT - KCONFIG:= \ - CONFIG_I40EVF \ - CONFIG_IAVF - FILES:= \ - $(LINUX_DIR)/drivers/net/ethernet/intel/iavf/iavf.ko - AUTOLOAD:=$(call AutoProbe,i40evf iavf) - AUTOLOAD:=$(call AutoProbe,iavf) -endef - -define KernelPackage/iavf/description - Kernel modules for Intel XL710, - X710, X722, XXV710, and all devices advertising support for - Intel Ethernet Adaptive Virtual Function devices. -endef - -$(eval $(call KernelPackage,iavf)) - - -define KernelPackage/b44 - TITLE:=Broadcom 44xx driver - KCONFIG:=CONFIG_B44 - DEPENDS:=@PCI_SUPPORT @!TARGET_bcm47xx_mips74k +!TARGET_bcm47xx:kmod-ssb +kmod-mii +kmod-libphy - SUBMENU:=$(NETWORK_DEVICES_MENU) - FILES:=$(LINUX_DIR)/drivers/net/ethernet/broadcom/b44.ko - AUTOLOAD:=$(call AutoLoad,19,b44,1) -endef - -define KernelPackage/b44/description - Kernel modules for Broadcom 44xx Ethernet adapters. -endef - -$(eval $(call KernelPackage,b44)) - - -define KernelPackage/3c59x - SUBMENU:=$(NETWORK_DEVICES_MENU) - TITLE:=3Com 3c590/3c900 series (592/595/597) Vortex/Boomerang - DEPENDS:=@PCI_SUPPORT +kmod-mii - KCONFIG:=CONFIG_VORTEX - FILES:=$(LINUX_DIR)/drivers/net/ethernet/3com/3c59x.ko - AUTOLOAD:=$(call AutoProbe,3c59x) -endef - -define KernelPackage/3c59x/description - This option enables driver support for a large number of 10mbps and - 10/100mbps EISA, PCI and PCMCIA 3Com Ethernet adapters: - - "Vortex" (Fast EtherLink 3c590/3c592/3c595/3c597) EISA and PCI - - "Boomerang" (EtherLink XL 3c900 or 3c905) PCI - - "Cyclone" (3c540/3c900/3c905/3c980/3c575/3c656) PCI and Cardbus - - "Tornado" (3c905) PCI - - "Hurricane" (3c555/3cSOHO) PCI -endef - -$(eval $(call KernelPackage,3c59x)) - - -define KernelPackage/pcnet32 - SUBMENU:=$(NETWORK_DEVICES_MENU) - TITLE:=AMD PCnet32 PCI support - DEPENDS:=@(PCI_SUPPORT||TARGET_malta) +kmod-mii - KCONFIG:=CONFIG_PCNET32 - FILES:=$(LINUX_DIR)/drivers/net/ethernet/amd/pcnet32.ko - AUTOLOAD:=$(call AutoProbe,pcnet32) -endef - -define KernelPackage/pcnet32/description - Kernel modules for AMD PCnet32 Ethernet adapters -endef - -$(eval $(call KernelPackage,pcnet32)) - - -define KernelPackage/tg3 - TITLE:=Broadcom Tigon3 Gigabit Ethernet - KCONFIG:=CONFIG_TIGON3 \ - CONFIG_TIGON3_HWMON=n - DEPENDS:=+!TARGET_bcm47xx:kmod-libphy +kmod-ptp - SUBMENU:=$(NETWORK_DEVICES_MENU) - FILES:=$(LINUX_DIR)/drivers/net/ethernet/broadcom/tg3.ko - AUTOLOAD:=$(call AutoLoad,19,tg3,1) -endef - -define KernelPackage/tg3/description - Kernel modules for Broadcom Tigon3 Gigabit Ethernet adapters -endef - -$(eval $(call KernelPackage,tg3)) - - -define KernelPackage/hfcpci - TITLE:=HFC PCI cards (single port) support for mISDN - KCONFIG:=CONFIG_MISDN_HFCPCI - DEPENDS:=+kmod-misdn - SUBMENU:=$(NETWORK_DEVICES_MENU) - FILES:=$(LINUX_DIR)/drivers/isdn/hardware/mISDN/hfcpci.ko - AUTOLOAD:=$(call AutoLoad,31,hfcpci) -endef - -define KernelPackage/hfcpci/description - Kernel modules for Cologne AG's HFC pci cards (single port) - using the mISDN V2 stack -endef - -$(eval $(call KernelPackage,hfcpci)) - - -define KernelPackage/hfcmulti - TITLE:=HFC multiport cards (HFC-4S/8S/E1) support for mISDN - KCONFIG:=CONFIG_MISDN_HFCMULTI - DEPENDS:=+kmod-misdn - SUBMENU:=$(NETWORK_DEVICES_MENU) - FILES:=$(LINUX_DIR)/drivers/isdn/hardware/mISDN/hfcmulti.ko - AUTOLOAD:=$(call AutoLoad,31,hfcmulti) -endef - -define KernelPackage/hfcmulti/description - Kernel modules for Cologne AG's HFC multiport cards (HFC-4S/8S/E1) - using the mISDN V2 stack -endef - -$(eval $(call KernelPackage,hfcmulti)) - - -define KernelPackage/macvlan - SUBMENU:=$(NETWORK_DEVICES_MENU) - TITLE:=MAC-VLAN support - KCONFIG:=CONFIG_MACVLAN - FILES:=$(LINUX_DIR)/drivers/net/macvlan.ko - AUTOLOAD:=$(call AutoProbe,macvlan) -endef - -define KernelPackage/macvlan/description - A kernel module which allows one to create virtual interfaces that - map packets to or from specific MAC addresses to a particular interface -endef - -$(eval $(call KernelPackage,macvlan)) - - -define KernelPackage/ipvlan - SUBMENU:=$(NETWORK_DEVICES_MENU) - TITLE:=IP-VLAN support - KCONFIG:=CONFIG_IPVLAN - FILES:=$(LINUX_DIR)/drivers/net/ipvlan/ipvlan.ko - AUTOLOAD:=$(call AutoProbe,ipvlan) -endef - -define KernelPackage/ipvlan/description - A kernel module which allows one to create virtual interfaces that - map packets to or from specific IP addresses to a particular interface -endef - -$(eval $(call KernelPackage,ipvlan)) - - -define KernelPackage/tulip - TITLE:=Tulip family network device support - DEPENDS:=@PCI_SUPPORT +kmod-mii - SUBMENU:=$(NETWORK_DEVICES_MENU) - KCONFIG:= \ - CONFIG_NET_TULIP=y \ - CONFIG_DE2104X \ - CONFIG_DE2104X_DSL=0 \ - CONFIG_TULIP \ - CONFIG_TULIP_MWI=y \ - CONFIG_TULIP_MMIO=y \ - CONFIG_TULIP_NAPI=y \ - CONFIG_TULIP_NAPI_HW_MITIGATION=y \ - CONFIG_DE4X5=n \ - CONFIG_WINBOND_840 \ - CONFIG_DM9102 \ - CONFIG_ULI526X - FILES:= \ - $(LINUX_DIR)/drivers/net/ethernet/dec/tulip/tulip.ko \ - $(LINUX_DIR)/drivers/net/ethernet/dec/tulip/de2104x.ko \ - $(LINUX_DIR)/drivers/net/ethernet/dec/tulip/dmfe.ko \ - $(LINUX_DIR)/drivers/net/ethernet/dec/tulip/uli526x.ko \ - $(LINUX_DIR)/drivers/net/ethernet/dec/tulip/winbond-840.ko - AUTOLOAD:=$(call AutoProbe,tulip) -endef - -define KernelPackage/tulip/description - Kernel modules for the Tulip family of network cards, - including DECchip Tulip, DIGITAL EtherWORKS, Winbond W89c840, - Davicom DM910x/DM980x and ULi M526x controller support. -endef - -$(eval $(call KernelPackage,tulip)) - - -define KernelPackage/solos-pci - SUBMENU:=$(NETWORK_DEVICES_MENU) - TITLE:=Solos ADSL2+ multiport modem - DEPENDS:=@PCI_SUPPORT +kmod-atm - KCONFIG:=CONFIG_ATM_SOLOS - FILES:=$(LINUX_DIR)/drivers/atm/solos-pci.ko - AUTOLOAD:=$(call AutoProbe,solos-pci) -endef - -define KernelPackage/solos-pci/description - Kernel module for Traverse Technologies' Solos PCI cards - and Geos ADSL2+ x86 motherboard -endef - -$(eval $(call KernelPackage,solos-pci)) - - -define KernelPackage/dummy - SUBMENU:=$(NETWORK_DEVICES_MENU) - TITLE:=Dummy network device - KCONFIG:=CONFIG_DUMMY - FILES:=$(LINUX_DIR)/drivers/net/dummy.ko - AUTOLOAD:=$(call AutoLoad,34,dummy) -endef - -define KernelPackage/dummy/description - The dummy network device -endef - -$(eval $(call KernelPackage,dummy)) - - -define KernelPackage/ifb - SUBMENU:=$(NETWORK_DEVICES_MENU) - TITLE:=Intermediate Functional Block support - KCONFIG:= \ - CONFIG_IFB \ - CONFIG_NET_CLS=y - FILES:=$(LINUX_DIR)/drivers/net/ifb.ko - AUTOLOAD:=$(call AutoLoad,34,ifb) - MODPARAMS.ifb:=numifbs=0 -endef - -define KernelPackage/ifb/description - The Intermediate Functional Block -endef - -$(eval $(call KernelPackage,ifb)) - - -define KernelPackage/dm9000 - SUBMENU:=$(NETWORK_DEVICES_MENU) - TITLE:=Davicom 9000 Ethernet support - DEPENDS:=+kmod-mii - KCONFIG:=CONFIG_DM9000 \ - CONFIG_DM9000_DEBUGLEVEL=4 \ - CONFIG_DM9000_FORCE_SIMPLE_PHY_POLL=y - FILES:=$(LINUX_DIR)/drivers/net/ethernet/davicom/dm9000.ko - AUTOLOAD:=$(call AutoLoad,34,dm9000) -endef - -define KernelPackage/dm9000/description - Kernel driver for Davicom 9000 Ethernet adapters. -endef - -$(eval $(call KernelPackage,dm9000)) - - -define KernelPackage/forcedeth - SUBMENU:=$(NETWORK_DEVICES_MENU) - TITLE:=nForce Ethernet support - DEPENDS:=@PCI_SUPPORT - KCONFIG:=CONFIG_FORCEDETH - FILES:=$(LINUX_DIR)/drivers/net/ethernet/nvidia/forcedeth.ko - AUTOLOAD:=$(call AutoProbe,forcedeth) -endef - -define KernelPackage/forcedeth/description - Kernel driver for Nvidia Ethernet support -endef - -$(eval $(call KernelPackage,forcedeth)) - -define KernelPackage/of-mdio - SUBMENU:=$(NETWORK_DEVICES_MENU) - TITLE:=OpenFirmware MDIO support - DEPENDS:=+kmod-libphy @!TARGET_x86 - KCONFIG:=CONFIG_OF_MDIO - FILES:= \ - $(LINUX_DIR)/drivers/net/phy/fixed_phy.ko \ - $(LINUX_DIR)/drivers/of/of_mdio.ko@lt5.10 \ - $(LINUX_DIR)/drivers/net/mdio/of_mdio.ko@ge5.10 - AUTOLOAD:=$(call AutoLoad,41,of_mdio) -endef - -define KernelPackage/of-mdio/description - Kernel driver for OpenFirmware MDIO support -endef - -$(eval $(call KernelPackage,of-mdio)) - - -define KernelPackage/vmxnet3 - SUBMENU:=$(NETWORK_DEVICES_MENU) - TITLE:=VMware VMXNET3 ethernet driver - DEPENDS:=@PCI_SUPPORT - KCONFIG:=CONFIG_VMXNET3 - FILES:=$(LINUX_DIR)/drivers/net/vmxnet3/vmxnet3.ko - AUTOLOAD:=$(call AutoLoad,35,vmxnet3) -endef - -define KernelPackage/vmxnet3/description - Kernel modules for VMware VMXNET3 ethernet adapters. -endef - -$(eval $(call KernelPackage,vmxnet3)) - - -define KernelPackage/spi-ks8995 - SUBMENU:=$(NETWORK_DEVICES_MENU) - TITLE:=Micrel/Kendin KS8995 Ethernet switch control - FILES:=$(LINUX_DIR)/drivers/net/phy/spi_ks8995.ko - KCONFIG:=CONFIG_MICREL_KS8995MA \ - CONFIG_SPI=y \ - CONFIG_SPI_MASTER=y - AUTOLOAD:=$(call AutoLoad,50,spi_ks8995) -endef - -define KernelPackage/spi-ks8995/description - Kernel module for Micrel/Kendin KS8995 ethernet switch -endef - -$(eval $(call KernelPackage,spi-ks8995)) - - -define KernelPackage/ethoc - SUBMENU:=$(NETWORK_DEVICES_MENU) - TITLE:=Opencore.org ethoc driver - DEPENDS:=+kmod-libphy - FILES:=$(LINUX_DIR)/drivers/net/ethernet/ethoc.ko - KCONFIG:=CONFIG_ETHOC - AUTOLOAD:=$(call AutoProbe,ethoc) -endef - -define KernelPackage/ethoc/description - Kernel module for the Opencores.org ethernet adapter -endef - -$(eval $(call KernelPackage,ethoc)) - - -define KernelPackage/bnx2 - SUBMENU:=$(NETWORK_DEVICES_MENU) - TITLE:=BCM5706/5708/5709/5716 ethernet adapter driver - DEPENDS:=@PCI_SUPPORT +bnx2-firmware - FILES:=$(LINUX_DIR)/drivers/net/ethernet/broadcom/bnx2.ko - KCONFIG:=CONFIG_BNX2 - AUTOLOAD:=$(call AutoProbe,bnx2) -endef - -define KernelPackage/bnx2/description - Kernel module for the BCM5706/5708/5709/5716 ethernet adapter -endef - -$(eval $(call KernelPackage,bnx2)) - - -define KernelPackage/bnx2x - SUBMENU:=$(NETWORK_DEVICES_MENU) - TITLE:=QLogic 5771x/578xx 10/20-Gigabit ethernet adapter driver - DEPENDS:=@PCI_SUPPORT +bnx2x-firmware +kmod-lib-crc32c +kmod-mdio +kmod-ptp +kmod-lib-zlib-inflate - FILES:=$(LINUX_DIR)/drivers/net/ethernet/broadcom/bnx2x/bnx2x.ko - KCONFIG:= \ - CONFIG_BNX2X \ - CONFIG_BNX2X_SRIOV=y - AUTOLOAD:=$(call AutoProbe,bnx2x) -endef - -define KernelPackage/bnx2x/description - QLogic BCM57710/57711/57711E/57712/57712_MF/57800/57800_MF/57810/57810_MF/57840/57840_MF Driver -endef - -$(eval $(call KernelPackage,bnx2x)) - -define KernelPackage/be2net - SUBMENU:=$(NETWORK_DEVICES_MENU) - TITLE:=Broadcom Emulex OneConnect 10Gbps NIC - DEPENDS:=@PCI_SUPPORT +kmod-hwmon-core - FILES:=$(LINUX_DIR)/drivers/net/ethernet/emulex/benet/be2net.ko - KCONFIG:= \ - CONFIG_BE2NET \ - CONFIG_BE2NET_BE2=y \ - CONFIG_BE2NET_BE3=y \ - CONFIG_BE2NET_LANCER=y \ - CONFIG_BE2NET_SKYHAWK=y \ - CONFIG_BE2NET_HWMON=y - AUTOLOAD:=$(call AutoProbe,be2net) -endef - -define KernelPackage/be2net/description - Broadcom Emulex OneConnect 10Gbit SFP+ support, OneConnect OCe10xxx OCe11xxx OCe14xxx, LightPulse LPe12xxx -endef - -$(eval $(call KernelPackage,be2net)) - -define KernelPackage/mlx4-core - SUBMENU:=$(NETWORK_DEVICES_MENU) - TITLE:=Mellanox ConnectX(R) mlx4 core Network Driver - DEPENDS:=@PCI_SUPPORT +kmod-ptp - FILES:= \ - $(LINUX_DIR)/drivers/net/ethernet/mellanox/mlx4/mlx4_core.ko \ - $(LINUX_DIR)/drivers/net/ethernet/mellanox/mlx4/mlx4_en.ko - KCONFIG:= CONFIG_MLX4_EN \ - CONFIG_MLX4_EN_DCB=n \ - CONFIG_MLX4_CORE=y \ - CONFIG_MLX4_CORE_GEN2=y \ - CONFIG_MLX4_DEBUG=n - AUTOLOAD:=$(call AutoProbe,mlx4_core mlx4_en) -endef - -define KernelPackage/mlx4-core/description - Supports Mellanox ConnectX-3 series and previous cards -endef - -$(eval $(call KernelPackage,mlx4-core)) - -define KernelPackage/mlx5-core - SUBMENU:=$(NETWORK_DEVICES_MENU) - TITLE:=Mellanox ConnectX(R) mlx5 core Network Driver - DEPENDS:=@PCI_SUPPORT +kmod-ptp - FILES:=$(LINUX_DIR)/drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.ko - KCONFIG:= CONFIG_MLX5_CORE \ - CONFIG_MLX5_CORE_EN=y \ - CONFIG_MLX5_CORE_EN_DCB=n \ - CONFIG_MLX5_CORE_IPOIB=n \ - CONFIG_MLX5_EN_ARFS=n \ - CONFIG_MLX5_EN_IPSEC=n \ - CONFIG_MLX5_EN_RXNFC=y \ - CONFIG_MLX5_EN_TLS=n \ - CONFIG_MLX5_ESWITCH=n \ - CONFIG_MLX5_FPGA=n \ - CONFIG_MLX5_FPGA_IPSEC=n \ - CONFIG_MLX5_FPGA_TLS=n \ - CONFIG_MLX5_MPFS=y \ - CONFIG_MLX5_SW_STEERING=n \ - CONFIG_MLX5_TC_CT=n \ - CONFIG_MLX5_TLS=n - AUTOLOAD:=$(call AutoProbe,mlx5_core) -endef - -define KernelPackage/mlx5-core/description - Supports Mellanox Connect-IB/ConnectX-4 series and later cards -endef - -$(eval $(call KernelPackage,mlx5-core)) - - -define KernelPackage/qlcnic - SUBMENU:=$(NETWORK_DEVICES_MENU) - DEPENDS:=@PCI_SUPPORT +kmod-hwmon-core - TITLE:=QLogic QLE8240 and QLE8242 device support - KCONFIG:= \ - CONFIG_QLCNIC \ - CONFIG_QLCNIC_HWMON=y \ - CONFIG_QLCNIC_SRIOV=y - FILES:=$(LINUX_DIR)/drivers/net/ethernet/qlogic/qlcnic/qlcnic.ko - AUTOLOAD:=$(call AutoProbe,qlcnic) -endef - -define KernelPackage/qlcnic/description - This driver supports QLogic QLE8240 and QLE8242 Converged Ethernet - devices. -endef - -$(eval $(call KernelPackage,qlcnic)) - - -define KernelPackage/sfp - SUBMENU:=$(NETWORK_DEVICES_MENU) - TITLE:=SFP cage support - DEPENDS:=+kmod-i2c-core +kmod-hwmon-core +kmod-phylink - KCONFIG:= \ - CONFIG_SFP \ - CONFIG_MDIO_I2C - FILES:= \ - $(LINUX_DIR)/drivers/net/phy/sfp.ko \ - $(LINUX_DIR)/drivers/net/phy/mdio-i2c.ko@lt5.10 \ - $(LINUX_DIR)/drivers/net/mdio/mdio-i2c.ko@ge5.10 - AUTOLOAD:=$(call AutoProbe,mdio-i2c sfp) -endef - -define KernelPackage/sfp/description - Kernel module to support SFP cages -endef - -$(eval $(call KernelPackage,sfp)) - -define KernelPackage/igc - SUBMENU:=$(NETWORK_DEVICES_MENU) - TITLE:=Intel(R) Ethernet Controller I225 Series support - DEPENDS:=@PCI_SUPPORT +kmod-ptp - KCONFIG:=CONFIG_IGC - FILES:=$(LINUX_DIR)/drivers/net/ethernet/intel/igc/igc.ko - AUTOLOAD:=$(call AutoProbe,igc) -endef - -define KernelPackage/igc/description - Kernel modules for Intel(R) Ethernet Controller I225 Series -endef - -$(eval $(call KernelPackage,igc)) - -define KernelPackage/sfc - SUBMENU:=$(NETWORK_DEVICES_MENU) - TITLE:=Solarflare SFC9000/SFC9100/EF100-family support - DEPENDS:=@PCI_SUPPORT +kmod-mdio +kmod-lib-crc32c +kmod-ptp +kmod-hwmon-core - KCONFIG:= \ - CONFIG_SFC \ - CONFIG_SFC_MTD=y \ - CONFIG_SFC_MCDI_MON=y \ - CONFIG_SFC_MCDI_LOGGING=y \ - CONFIG_SFC_SRIOV=y - FILES:=$(LINUX_DIR)/drivers/net/ethernet/sfc/sfc.ko - AUTOLOAD:=$(call AutoProbe,sfc) -endef - -define KernelPackage/sfc/description - Solarflare SFC9000/SFC9100/EF100-family support - Solarflare EF100 support requires at least kernel version 5.9 -endef - -$(eval $(call KernelPackage,sfc)) - -define KernelPackage/sfc-falcon - SUBMENU:=$(NETWORK_DEVICES_MENU) - TITLE:=Solarflare SFC4000 support - DEPENDS:=@PCI_SUPPORT +kmod-mdio +kmod-lib-crc32c +kmod-i2c-algo-bit - KCONFIG:= \ - CONFIG_SFC_FALCON \ - CONFIG_SFC_FALCON_MTD=y - FILES:=$(LINUX_DIR)/drivers/net/ethernet/sfc/falcon/sfc-falcon.ko - AUTOLOAD:=$(call AutoProbe,sfc-falcon) -endef - -define KernelPackage/sfc-falcon/description - Solarflare SFC4000 support -endef - -$(eval $(call KernelPackage,sfc-falcon)) diff --git a/root/package/kernel/linux/modules/netfilter.mk b/root/package/kernel/linux/modules/netfilter.mk index 725441ab..7d185802 100755 --- a/root/package/kernel/linux/modules/netfilter.mk +++ b/root/package/kernel/linux/modules/netfilter.mk @@ -150,13 +150,11 @@ define KernelPackage/nf-flow TITLE:=Netfilter flowtable support KCONFIG:= \ CONFIG_NETFILTER_INGRESS=y \ - CONFIG_NF_FLOW_TABLE \ - CONFIG_NF_FLOW_TABLE_HW + CONFIG_NF_FLOW_TABLE DEPENDS:=+kmod-nf-conntrack FILES:= \ - $(LINUX_DIR)/net/netfilter/nf_flow_table.ko \ - $(if $(CONFIG_LINUX_5_4),$(LINUX_DIR)/net/netfilter/nf_flow_table_hw.ko) - AUTOLOAD:=$(call AutoProbe,nf_flow_table nf_flow_table_hw) + $(LINUX_DIR)/net/netfilter/nf_flow_table.ko + AUTOLOAD:=$(call AutoProbe,nf_flow_table) endef $(eval $(call KernelPackage,nf-flow)) @@ -1087,7 +1085,7 @@ define KernelPackage/nft-bridge FILES:=$(foreach mod,$(NFT_BRIDGE-m),$(LINUX_DIR)/net/$(mod).ko) AUTOLOAD:=$(call AutoProbe,$(notdir $(NFT_BRIDGE-m))) KCONFIG:= \ - CONFIG_NF_LOG_BRIDGE=n@lt5.13 \ + CONFIG_NF_LOG_BRIDGE=n \ $(KCONFIG_NFT_BRIDGE) endef diff --git a/root/package/kernel/linux/modules/netsupport.mk b/root/package/kernel/linux/modules/netsupport.mk deleted file mode 100755 index 77cf6ccb..00000000 --- a/root/package/kernel/linux/modules/netsupport.mk +++ /dev/null @@ -1,1353 +0,0 @@ -# -# Copyright (C) 2006-2011 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -NETWORK_SUPPORT_MENU:=Network Support - -define KernelPackage/atm - SUBMENU:=$(NETWORK_SUPPORT_MENU) - TITLE:=ATM support - KCONFIG:= \ - CONFIG_ATM \ - CONFIG_ATM_BR2684 - FILES:= \ - $(LINUX_DIR)/net/atm/atm.ko \ - $(LINUX_DIR)/net/atm/br2684.ko - AUTOLOAD:=$(call AutoLoad,30,atm br2684) -endef - -define KernelPackage/atm/description - Kernel modules for ATM support -endef - -$(eval $(call KernelPackage,atm)) - - -define KernelPackage/atmtcp - SUBMENU:=$(NETWORK_SUPPORT_MENU) - TITLE:=ATM over TCP - DEPENDS:=kmod-atm - KCONFIG:=CONFIG_ATM_TCP CONFIG_ATM_DRIVERS=y - FILES:=$(LINUX_DIR)/drivers/atm/atmtcp.ko - AUTOLOAD:=$(call AutoLoad,40,atmtcp) -endef - -define KernelPackage/atmtcp/description - Kernel module for ATM over TCP support -endef - -$(eval $(call KernelPackage,atmtcp)) - - -define KernelPackage/bonding - SUBMENU:=$(NETWORK_SUPPORT_MENU) - TITLE:=Ethernet bonding driver - KCONFIG:=CONFIG_BONDING - FILES:=$(LINUX_DIR)/drivers/net/bonding/bonding.ko - AUTOLOAD:=$(call AutoLoad,40,bonding) - MODPARAMS.bonding:=max_bonds=0 -endef - -define KernelPackage/bonding/description - Kernel module for NIC bonding. -endef - -$(eval $(call KernelPackage,bonding)) - - -define KernelPackage/udptunnel4 - SUBMENU:=$(NETWORK_SUPPORT_MENU) - TITLE:=IPv4 UDP tunneling support - KCONFIG:=CONFIG_NET_UDP_TUNNEL - HIDDEN:=1 - FILES:=$(LINUX_DIR)/net/ipv4/udp_tunnel.ko - AUTOLOAD:=$(call AutoLoad,32,udp_tunnel) -endef - - -$(eval $(call KernelPackage,udptunnel4)) - -define KernelPackage/udptunnel6 - SUBMENU:=$(NETWORK_SUPPORT_MENU) - TITLE:=IPv6 UDP tunneling support - DEPENDS:=@IPV6 - KCONFIG:=CONFIG_NET_UDP_TUNNEL - HIDDEN:=1 - FILES:=$(LINUX_DIR)/net/ipv6/ip6_udp_tunnel.ko - AUTOLOAD:=$(call AutoLoad,32,ip6_udp_tunnel) -endef - -$(eval $(call KernelPackage,udptunnel6)) - - -define KernelPackage/vxlan - SUBMENU:=$(NETWORK_SUPPORT_MENU) - TITLE:=Native VXLAN Kernel support - DEPENDS:= \ - +kmod-iptunnel \ - +kmod-udptunnel4 \ - +IPV6:kmod-udptunnel6 - KCONFIG:=CONFIG_VXLAN - FILES:=$(LINUX_DIR)/drivers/net/vxlan.ko - AUTOLOAD:=$(call AutoLoad,13,vxlan) -endef - -define KernelPackage/vxlan/description - Kernel module for supporting VXLAN in the Kernel. - Requires Kernel 3.12 or newer. -endef - -$(eval $(call KernelPackage,vxlan)) - - -define KernelPackage/geneve - SUBMENU:=$(NETWORK_SUPPORT_MENU) - TITLE:=Generic Network Virtualization Encapsulation (Geneve) support - DEPENDS:= \ - +kmod-iptunnel \ - +kmod-udptunnel4 \ - +IPV6:kmod-udptunnel6 - KCONFIG:=CONFIG_GENEVE - FILES:= \ - $(LINUX_DIR)/drivers/net/geneve.ko - AUTOLOAD:=$(call AutoLoad,13,geneve) -endef - -define KernelPackage/geneve/description - Kernel module for supporting Geneve in the Kernel. - Requires Kernel 3.18 or newer. -endef - -$(eval $(call KernelPackage,geneve)) - - -define KernelPackage/nsh - SUBMENU:=$(NETWORK_SUPPORT_MENU) - TITLE:=Network Service Header (NSH) protocol - DEPENDS:= - KCONFIG:=CONFIG_NET_NSH - FILES:=$(LINUX_DIR)/net/nsh/nsh.ko - AUTOLOAD:=$(call AutoLoad,13,nsh) -endef - -define KernelPackage/nsh/description - Network Service Header is an implementation of Service Function - Chaining (RFC 7665). Requires kernel 4.14 or newer -endef - -$(eval $(call KernelPackage,nsh)) - - -define KernelPackage/misdn - SUBMENU:=$(NETWORK_SUPPORT_MENU) - TITLE:=mISDN (ISDN) Support - KCONFIG:= \ - CONFIG_ISDN=y \ - CONFIG_MISDN \ - CONFIG_MISDN_DSP \ - CONFIG_MISDN_L1OIP - FILES:= \ - $(LINUX_DIR)/drivers/isdn/mISDN/mISDN_core.ko \ - $(LINUX_DIR)/drivers/isdn/mISDN/mISDN_dsp.ko \ - $(LINUX_DIR)/drivers/isdn/mISDN/l1oip.ko - AUTOLOAD:=$(call AutoLoad,30,mISDN_core mISDN_dsp l1oip) -endef - -define KernelPackage/misdn/description - Modular ISDN driver support -endef - -$(eval $(call KernelPackage,misdn)) - - -define KernelPackage/isdn4linux - SUBMENU:=$(NETWORK_SUPPORT_MENU) - TITLE:=Old ISDN4Linux (deprecated) - DEPENDS:=+kmod-ppp - KCONFIG:= \ - CONFIG_ISDN=y \ - CONFIG_ISDN_I4L \ - CONFIG_ISDN_PPP=y \ - CONFIG_ISDN_PPP_VJ=y \ - CONFIG_ISDN_MPP=y \ - CONFIG_IPPP_FILTER=y \ - CONFIG_ISDN_PPP_BSDCOMP \ - CONFIG_ISDN_CAPI_MIDDLEWARE=y \ - CONFIG_ISDN_CAPI_CAPIFS_BOOL=y \ - CONFIG_ISDN_AUDIO=y \ - CONFIG_ISDN_TTY_FAX=y \ - CONFIG_ISDN_X25=y \ - CONFIG_ISDN_DIVERSION - FILES:= \ - $(LINUX_DIR)/drivers/isdn/divert/dss1_divert.ko \ - $(LINUX_DIR)/drivers/isdn/i4l/isdn.ko \ - $(LINUX_DIR)/drivers/isdn/i4l/isdn_bsdcomp.ko - AUTOLOAD:=$(call AutoLoad,40,isdn isdn_bsdcomp dss1_divert) -endef - -define KernelPackage/isdn4linux/description - This driver allows you to use an ISDN adapter for networking -endef - -$(eval $(call KernelPackage,isdn4linux)) - - -define KernelPackage/ipip - SUBMENU:=$(NETWORK_SUPPORT_MENU) - TITLE:=IP-in-IP encapsulation - DEPENDS:=+kmod-iptunnel +kmod-iptunnel4 - KCONFIG:=CONFIG_NET_IPIP - FILES:=$(LINUX_DIR)/net/ipv4/ipip.ko - AUTOLOAD:=$(call AutoLoad,32,ipip) -endef - -define KernelPackage/ipip/description - Kernel modules for IP-in-IP encapsulation -endef - -$(eval $(call KernelPackage,ipip)) - - -IPSEC-m:= \ - xfrm/xfrm_algo \ - xfrm/xfrm_ipcomp \ - xfrm/xfrm_user \ - key/af_key \ - -define KernelPackage/ipsec - SUBMENU:=$(NETWORK_SUPPORT_MENU) - TITLE:=IPsec related modules (IPv4 and IPv6) - DEPENDS:= \ - +kmod-crypto-authenc +kmod-crypto-cbc +kmod-crypto-deflate \ - +kmod-crypto-des +kmod-crypto-echainiv +kmod-crypto-hmac \ - +kmod-crypto-md5 +kmod-crypto-sha1 - KCONFIG:= \ - CONFIG_NET_KEY \ - CONFIG_XFRM_USER \ - CONFIG_INET_IPCOMP \ - CONFIG_XFRM_IPCOMP - FILES:=$(foreach mod,$(IPSEC-m),$(LINUX_DIR)/net/$(mod).ko) - AUTOLOAD:=$(call AutoLoad,30,$(notdir $(IPSEC-m))) -endef - -define KernelPackage/ipsec/description - Kernel modules for IPsec support in both IPv4 and IPv6. - Includes: - - af_key - - xfrm_algo - - xfrm_ipcomp - - xfrm_user -endef - -$(eval $(call KernelPackage,ipsec)) - -IPSEC4-m = \ - ipv4/ah4 \ - ipv4/esp4 \ - ipv4/xfrm4_tunnel \ - ipv4/ipcomp \ - -IPSEC4-m += $(ifeq ($$(strip $$(call CompareKernelPatchVer,$$(KERNEL_PATCHVER),le,5.2))),ipv4/xfrm4_mode_beet ipv4/xfrm4_mode_transport ipv4/xfrm4_mode_tunnel) - -define KernelPackage/ipsec4 - SUBMENU:=$(NETWORK_SUPPORT_MENU) - TITLE:=IPsec related modules (IPv4) - DEPENDS:=kmod-ipsec +kmod-iptunnel4 - KCONFIG:= \ - CONFIG_INET_AH \ - CONFIG_INET_ESP \ - CONFIG_INET_IPCOMP \ - CONFIG_INET_XFRM_MODE_BEET \ - CONFIG_INET_XFRM_MODE_TRANSPORT \ - CONFIG_INET_XFRM_MODE_TUNNEL \ - CONFIG_INET_XFRM_TUNNEL \ - CONFIG_INET_ESP_OFFLOAD=n - FILES:=$(foreach mod,$(IPSEC4-m),$(LINUX_DIR)/net/$(mod).ko) - AUTOLOAD:=$(call AutoLoad,32,$(notdir $(IPSEC4-m))) -endef - -define KernelPackage/ipsec4/description - Kernel modules for IPsec support in IPv4. - Includes: - - ah4 - - esp4 - - ipcomp4 - - xfrm4_mode_beet - - xfrm4_mode_transport - - xfrm4_mode_tunnel - - xfrm4_tunnel -endef - -$(eval $(call KernelPackage,ipsec4)) - - -IPSEC6-m = \ - ipv6/ah6 \ - ipv6/esp6 \ - ipv6/xfrm6_tunnel \ - ipv6/ipcomp6 \ - -IPSEC6-m += $(ifeq ($$(strip $$(call CompareKernelPatchVer,$$(KERNEL_PATCHVER),le,5.2))),ipv6/xfrm6_mode_beet ipv6/xfrm6_mode_transport ipv6/xfrm6_mode_tunnel) - -define KernelPackage/ipsec6 - SUBMENU:=$(NETWORK_SUPPORT_MENU) - TITLE:=IPsec related modules (IPv6) - DEPENDS:=@IPV6 kmod-ipsec +kmod-iptunnel6 - KCONFIG:= \ - CONFIG_INET6_AH \ - CONFIG_INET6_ESP \ - CONFIG_INET6_IPCOMP \ - CONFIG_INET6_XFRM_MODE_BEET \ - CONFIG_INET6_XFRM_MODE_TRANSPORT \ - CONFIG_INET6_XFRM_MODE_TUNNEL \ - CONFIG_INET6_XFRM_TUNNEL \ - CONFIG_INET6_ESP_OFFLOAD=n - FILES:=$(foreach mod,$(IPSEC6-m),$(LINUX_DIR)/net/$(mod).ko) - AUTOLOAD:=$(call AutoLoad,32,$(notdir $(IPSEC6-m))) -endef - -define KernelPackage/ipsec6/description - Kernel modules for IPsec support in IPv6. - Includes: - - ah6 - - esp6 - - ipcomp6 - - xfrm6_mode_beet - - xfrm6_mode_transport - - xfrm6_mode_tunnel - - xfrm6_tunnel -endef - -$(eval $(call KernelPackage,ipsec6)) - - -define KernelPackage/iptunnel - SUBMENU:=$(NETWORK_SUPPORT_MENU) - TITLE:=IP tunnel support - HIDDEN:=1 - KCONFIG:= \ - CONFIG_NET_IP_TUNNEL - FILES:=$(LINUX_DIR)/net/ipv4/ip_tunnel.ko - AUTOLOAD:=$(call AutoLoad,31,ip_tunnel) -endef - -define KernelPackage/iptunnel/description - Kernel module for generic IP tunnel support -endef - -$(eval $(call KernelPackage,iptunnel)) - - -define KernelPackage/ip-vti - SUBMENU:=$(NETWORK_SUPPORT_MENU) - TITLE:=IP VTI (Virtual Tunnel Interface) - DEPENDS:=+kmod-iptunnel +kmod-iptunnel4 +kmod-ipsec4 - KCONFIG:=CONFIG_NET_IPVTI - FILES:=$(LINUX_DIR)/net/ipv4/ip_vti.ko - AUTOLOAD:=$(call AutoLoad,33,ip_vti) -endef - -define KernelPackage/ip-vti/description - Kernel modules for IP VTI (Virtual Tunnel Interface) -endef - -$(eval $(call KernelPackage,ip-vti)) - - -define KernelPackage/ip6-vti - SUBMENU:=$(NETWORK_SUPPORT_MENU) - TITLE:=IPv6 VTI (Virtual Tunnel Interface) - DEPENDS:=@IPV6 +kmod-iptunnel +kmod-ip6-tunnel +kmod-ipsec6 - KCONFIG:=CONFIG_IPV6_VTI - FILES:=$(LINUX_DIR)/net/ipv6/ip6_vti.ko - AUTOLOAD:=$(call AutoLoad,33,ip6_vti) -endef - -define KernelPackage/ip6-vti/description - Kernel modules for IPv6 VTI (Virtual Tunnel Interface) -endef - -$(eval $(call KernelPackage,ip6-vti)) - - -define KernelPackage/xfrm-interface - SUBMENU:=$(NETWORK_SUPPORT_MENU) - TITLE:=IPsec XFRM Interface - DEPENDS:=@IPV6 +kmod-ipsec4 +kmod-ipsec6 - KCONFIG:=CONFIG_XFRM_INTERFACE - FILES:=$(LINUX_DIR)/net/xfrm/xfrm_interface.ko - AUTOLOAD:=$(call AutoProbe,xfrm_interface) -endef - -define KernelPackage/xfrm-interface/description - Kernel module for XFRM interface support -endef - -$(eval $(call KernelPackage,xfrm-interface)) - - -define KernelPackage/iptunnel4 - SUBMENU:=$(NETWORK_SUPPORT_MENU) - TITLE:=IPv4 tunneling - HIDDEN:=1 - KCONFIG:= \ - CONFIG_INET_TUNNEL \ - CONFIG_NET_IPIP=m - FILES:=$(LINUX_DIR)/net/ipv4/tunnel4.ko - AUTOLOAD:=$(call AutoLoad,31,tunnel4) -endef - -define KernelPackage/iptunnel4/description - Kernel modules for IPv4 tunneling -endef - -$(eval $(call KernelPackage,iptunnel4)) - - -define KernelPackage/iptunnel6 - SUBMENU:=$(NETWORK_SUPPORT_MENU) - TITLE:=IPv6 tunneling - DEPENDS:=@IPV6 - KCONFIG:= \ - CONFIG_INET6_TUNNEL - FILES:=$(LINUX_DIR)/net/ipv6/tunnel6.ko - AUTOLOAD:=$(call AutoLoad,31,tunnel6) -endef - -define KernelPackage/iptunnel6/description - Kernel modules for IPv6 tunneling -endef - -$(eval $(call KernelPackage,iptunnel6)) - - -define KernelPackage/sit - SUBMENU:=$(NETWORK_SUPPORT_MENU) - DEPENDS:=@IPV6 +kmod-iptunnel +kmod-iptunnel4 - TITLE:=IPv6-in-IPv4 tunnel - KCONFIG:=CONFIG_IPV6_SIT \ - CONFIG_IPV6_SIT_6RD=y - FILES:=$(LINUX_DIR)/net/ipv6/sit.ko - AUTOLOAD:=$(call AutoLoad,32,sit) -endef - -define KernelPackage/sit/description - Kernel modules for IPv6-in-IPv4 tunnelling -endef - -$(eval $(call KernelPackage,sit)) - - -define KernelPackage/fou - SUBMENU:=$(NETWORK_SUPPORT_MENU) - TITLE:=FOU and GUE decapsulation - DEPENDS:= \ - +kmod-iptunnel \ - +kmod-udptunnel4 \ - +IPV6:kmod-udptunnel6 - KCONFIG:= \ - CONFIG_NET_FOU \ - CONFIG_NET_FOU_IP_TUNNELS=y - FILES:=$(LINUX_DIR)/net/ipv4/fou.ko - AUTOLOAD:=$(call AutoProbe,fou) -endef - -define KernelPackage/fou/description - Kernel module for FOU (Foo over UDP) and GUE (Generic UDP Encapsulation) tunnelling. - Requires Kernel 3.18 or newer. -endef - -$(eval $(call KernelPackage,fou)) - - -define KernelPackage/fou6 - SUBMENU:=$(NETWORK_SUPPORT_MENU) - TITLE:=FOU and GUE decapsulation over IPv6 - DEPENDS:= @IPV6 \ - +kmod-fou \ - +kmod-ip6-tunnel - KCONFIG:= \ - CONFIG_IPV6_FOU \ - CONFIG_IPV6_FOU_TUNNEL - FILES:=$(LINUX_DIR)/net/ipv6/fou6.ko - AUTOLOAD:=$(call AutoProbe,fou6) -endef - -define KernelPackage/fou6/description - Kernel module for FOU (Foo over UDP) and GUE (Generic UDP Encapsulation) tunnelling over IPv6. - Requires Kernel 3.18 or newer. -endef - -$(eval $(call KernelPackage,fou6)) - - -define KernelPackage/ip6-tunnel - SUBMENU:=$(NETWORK_SUPPORT_MENU) - TITLE:=IP-in-IPv6 tunnelling - DEPENDS:=@IPV6 +kmod-iptunnel6 - KCONFIG:= CONFIG_IPV6_TUNNEL - FILES:=$(LINUX_DIR)/net/ipv6/ip6_tunnel.ko - AUTOLOAD:=$(call AutoLoad,32,ip6_tunnel) -endef - -define KernelPackage/ip6-tunnel/description - Kernel modules for IPv6-in-IPv6 and IPv4-in-IPv6 tunnelling -endef - -$(eval $(call KernelPackage,ip6-tunnel)) - - -define KernelPackage/gre - SUBMENU:=$(NETWORK_SUPPORT_MENU) - TITLE:=GRE support - DEPENDS:=+kmod-iptunnel - KCONFIG:=CONFIG_NET_IPGRE CONFIG_NET_IPGRE_DEMUX - FILES:=$(LINUX_DIR)/net/ipv4/ip_gre.ko $(LINUX_DIR)/net/ipv4/gre.ko - AUTOLOAD:=$(call AutoLoad,39,gre ip_gre) -endef - -define KernelPackage/gre/description - Generic Routing Encapsulation support -endef - -$(eval $(call KernelPackage,gre)) - - -define KernelPackage/gre6 - SUBMENU:=$(NETWORK_SUPPORT_MENU) - TITLE:=GRE support over IPV6 - DEPENDS:=@IPV6 +kmod-iptunnel +kmod-ip6-tunnel +kmod-gre - KCONFIG:=CONFIG_IPV6_GRE - FILES:=$(LINUX_DIR)/net/ipv6/ip6_gre.ko - AUTOLOAD:=$(call AutoLoad,39,ip6_gre) -endef - -define KernelPackage/gre6/description - Generic Routing Encapsulation support over IPv6 -endef - -$(eval $(call KernelPackage,gre6)) - - -define KernelPackage/tun - SUBMENU:=$(NETWORK_SUPPORT_MENU) - TITLE:=Universal TUN/TAP driver - KCONFIG:=CONFIG_TUN - FILES:=$(LINUX_DIR)/drivers/net/tun.ko - AUTOLOAD:=$(call AutoLoad,30,tun) -endef - -define KernelPackage/tun/description - Kernel support for the TUN/TAP tunneling device -endef - -$(eval $(call KernelPackage,tun)) - - -define KernelPackage/veth - SUBMENU:=$(NETWORK_SUPPORT_MENU) - TITLE:=Virtual ethernet pair device - KCONFIG:=CONFIG_VETH - FILES:=$(LINUX_DIR)/drivers/net/veth.ko - AUTOLOAD:=$(call AutoLoad,30,veth) -endef - -define KernelPackage/veth/description - This device is a local ethernet tunnel. Devices are created in pairs. - When one end receives the packet it appears on its pair and vice - versa. -endef - -$(eval $(call KernelPackage,veth)) - - -define KernelPackage/slhc - SUBMENU:=$(NETWORK_SUPPORT_MENU) - HIDDEN:=1 - TITLE:=Serial Line Header Compression - DEPENDS:=+kmod-lib-crc-ccitt - KCONFIG:=CONFIG_SLHC - FILES:=$(LINUX_DIR)/drivers/net/slip/slhc.ko -endef - -$(eval $(call KernelPackage,slhc)) - - -define KernelPackage/ppp - SUBMENU:=$(NETWORK_SUPPORT_MENU) - TITLE:=PPP modules - DEPENDS:=+kmod-lib-crc-ccitt +kmod-slhc - KCONFIG:= \ - CONFIG_PPP \ - CONFIG_PPP_ASYNC - FILES:= \ - $(LINUX_DIR)/drivers/net/ppp/ppp_async.ko \ - $(LINUX_DIR)/drivers/net/ppp/ppp_generic.ko - AUTOLOAD:=$(call AutoProbe,ppp_async) -endef - -define KernelPackage/ppp/description - Kernel modules for PPP support -endef - -$(eval $(call KernelPackage,ppp)) - - -define KernelPackage/ppp-synctty - SUBMENU:=$(NETWORK_SUPPORT_MENU) - TITLE:=PPP sync tty support - DEPENDS:=kmod-ppp - KCONFIG:=CONFIG_PPP_SYNC_TTY - FILES:=$(LINUX_DIR)/drivers/net/ppp/ppp_synctty.ko - AUTOLOAD:=$(call AutoProbe,ppp_synctty) -endef - -define KernelPackage/ppp-synctty/description - Kernel modules for PPP sync tty support -endef - -$(eval $(call KernelPackage,ppp-synctty)) - - -define KernelPackage/pppox - SUBMENU:=$(NETWORK_SUPPORT_MENU) - TITLE:=PPPoX helper - DEPENDS:=kmod-ppp - KCONFIG:=CONFIG_PPPOE - FILES:=$(LINUX_DIR)/drivers/net/ppp/pppox.ko -endef - -define KernelPackage/pppox/description - Kernel helper module for PPPoE and PPTP support -endef - -$(eval $(call KernelPackage,pppox)) - - -define KernelPackage/pppoe - SUBMENU:=$(NETWORK_SUPPORT_MENU) - TITLE:=PPPoE support - DEPENDS:=kmod-ppp +kmod-pppox - KCONFIG:=CONFIG_PPPOE - FILES:=$(LINUX_DIR)/drivers/net/ppp/pppoe.ko - AUTOLOAD:=$(call AutoProbe,pppoe) -endef - -define KernelPackage/pppoe/description - Kernel module for PPPoE (PPP over Ethernet) support -endef - -$(eval $(call KernelPackage,pppoe)) - - -define KernelPackage/pppoa - SUBMENU:=$(NETWORK_SUPPORT_MENU) - TITLE:=PPPoA support - DEPENDS:=kmod-ppp +kmod-atm - KCONFIG:=CONFIG_PPPOATM CONFIG_ATM_DRIVERS=y - FILES:=$(LINUX_DIR)/net/atm/pppoatm.ko - AUTOLOAD:=$(call AutoLoad,40,pppoatm) -endef - -define KernelPackage/pppoa/description - Kernel modules for PPPoA (PPP over ATM) support -endef - -$(eval $(call KernelPackage,pppoa)) - - -define KernelPackage/pptp - SUBMENU:=$(NETWORK_SUPPORT_MENU) - TITLE:=PPtP support - DEPENDS:=kmod-ppp +kmod-gre +kmod-pppox - KCONFIG:=CONFIG_PPTP - FILES:=$(LINUX_DIR)/drivers/net/ppp/pptp.ko - AUTOLOAD:=$(call AutoProbe,pptp) -endef - -$(eval $(call KernelPackage,pptp)) - - -define KernelPackage/pppol2tp - SUBMENU:=$(NETWORK_SUPPORT_MENU) - TITLE:=PPPoL2TP support - DEPENDS:=kmod-ppp +kmod-pppox +kmod-l2tp - KCONFIG:=CONFIG_PPPOL2TP - FILES:=$(LINUX_DIR)/net/l2tp/l2tp_ppp.ko - AUTOLOAD:=$(call AutoProbe,l2tp_ppp) -endef - -define KernelPackage/pppol2tp/description - Kernel modules for PPPoL2TP (PPP over L2TP) support -endef - -$(eval $(call KernelPackage,pppol2tp)) - - -define KernelPackage/ipoa - SUBMENU:=$(NETWORK_SUPPORT_MENU) - TITLE:=IPoA support - DEPENDS:=kmod-atm - KCONFIG:=CONFIG_ATM_CLIP - FILES:=$(LINUX_DIR)/net/atm/clip.ko - AUTOLOAD:=$(call AutoProbe,clip) -endef - -define KernelPackage/ipoa/description - Kernel modules for IPoA (IP over ATM) support -endef - -$(eval $(call KernelPackage,ipoa)) - - -define KernelPackage/mppe - SUBMENU:=$(NETWORK_SUPPORT_MENU) - TITLE:=Microsoft PPP compression/encryption - DEPENDS:=kmod-ppp +kmod-crypto-arc4 +kmod-crypto-sha1 +kmod-crypto-ecb - KCONFIG:= \ - CONFIG_PPP_MPPE_MPPC \ - CONFIG_PPP_MPPE - FILES:=$(LINUX_DIR)/drivers/net/ppp/ppp_mppe.ko - AUTOLOAD:=$(call AutoProbe,ppp_mppe) -endef - -define KernelPackage/mppe/description - Kernel modules for Microsoft PPP compression/encryption -endef - -$(eval $(call KernelPackage,mppe)) - - -SCHED_MODULES = $(patsubst $(LINUX_DIR)/net/sched/%.ko,%,$(wildcard $(LINUX_DIR)/net/sched/*.ko)) -SCHED_MODULES_CORE = sch_ingress sch_fq_codel sch_hfsc sch_htb sch_tbf cls_basic cls_fw cls_route cls_flow cls_tcindex cls_u32 em_u32 act_gact act_mirred act_skbedit cls_matchall -SCHED_MODULES_FILTER = $(SCHED_MODULES_CORE) act_connmark act_ctinfo sch_cake sch_netem sch_mqprio em_ipset cls_bpf cls_flower act_bpf act_vlan -SCHED_MODULES_EXTRA = $(filter-out $(SCHED_MODULES_FILTER),$(SCHED_MODULES)) -SCHED_FILES = $(patsubst %,$(LINUX_DIR)/net/sched/%.ko,$(filter $(SCHED_MODULES_CORE),$(SCHED_MODULES))) -SCHED_FILES_EXTRA = $(patsubst %,$(LINUX_DIR)/net/sched/%.ko,$(SCHED_MODULES_EXTRA)) - -define KernelPackage/sched-core - SUBMENU:=$(NETWORK_SUPPORT_MENU) - TITLE:=Traffic schedulers - KCONFIG:= \ - CONFIG_NET_SCHED=y \ - CONFIG_NET_SCH_HFSC \ - CONFIG_NET_SCH_HTB \ - CONFIG_NET_SCH_TBF \ - CONFIG_NET_SCH_INGRESS \ - CONFIG_NET_SCH_FQ_CODEL \ - CONFIG_NET_CLS=y \ - CONFIG_NET_CLS_ACT=y \ - CONFIG_NET_CLS_BASIC \ - CONFIG_NET_CLS_FLOW \ - CONFIG_NET_CLS_FW \ - CONFIG_NET_CLS_ROUTE4 \ - CONFIG_NET_CLS_TCINDEX \ - CONFIG_NET_CLS_U32 \ - CONFIG_NET_ACT_GACT \ - CONFIG_NET_ACT_MIRRED \ - CONFIG_NET_ACT_SKBEDIT \ - CONFIG_NET_CLS_MATCHALL \ - CONFIG_NET_EMATCH=y \ - CONFIG_NET_EMATCH_U32 - FILES:=$(SCHED_FILES) - AUTOLOAD:=$(call AutoLoad,70, $(SCHED_MODULES_CORE)) -endef - -define KernelPackage/sched-core/description - Core kernel scheduler support for IP traffic -endef - -$(eval $(call KernelPackage,sched-core)) - - -define KernelPackage/sched-cake - SUBMENU:=$(NETWORK_SUPPORT_MENU) - TITLE:=Cake fq_codel/blue derived shaper - DEPENDS:=+kmod-sched-core - KCONFIG:=CONFIG_NET_SCH_CAKE - FILES:=$(LINUX_DIR)/net/sched/sch_cake.ko - AUTOLOAD:=$(call AutoProbe,sch_cake) -endef - -define KernelPackage/sched-cake/description - Common Applications Kept Enhanced fq_codel/blue derived shaper -endef - -$(eval $(call KernelPackage,sched-cake)) - -define KernelPackage/sched-flower - SUBMENU:=$(NETWORK_SUPPORT_MENU) - TITLE:=Flower traffic classifier - DEPENDS:=+kmod-sched-core - KCONFIG:=CONFIG_NET_CLS_FLOWER - FILES:=$(LINUX_DIR)/net/sched/cls_flower.ko - AUTOLOAD:=$(call AutoProbe, cls_flower) -endef - -define KernelPackage/sched-flower/description - Allows to classify packets based on a configurable combination of packet keys and masks. -endef - -$(eval $(call KernelPackage,sched-flower)) - - -define KernelPackage/sched-act-vlan - SUBMENU:=$(NETWORK_SUPPORT_MENU) - TITLE:=Traffic VLAN manipulation - DEPENDS:=+kmod-sched-core - KCONFIG:=CONFIG_NET_ACT_VLAN - FILES:=$(LINUX_DIR)/net/sched/act_vlan.ko - AUTOLOAD:=$(call AutoProbe, act_vlan) -endef - -define KernelPackage/sched-act-vlan/description - Allows to configure rules to push or pop vlan headers. -endef - -$(eval $(call KernelPackage,sched-act-vlan)) - - -define KernelPackage/sched-mqprio - SUBMENU:=$(NETWORK_SUPPORT_MENU) - TITLE:=Multi-queue priority scheduler (MQPRIO) - DEPENDS:=+kmod-sched-core - KCONFIG:=CONFIG_NET_SCH_MQPRIO - FILES:=$(LINUX_DIR)/net/sched/sch_mqprio.ko - AUTOLOAD:=$(call AutoProbe, sch_mqprio) -endef - -define KernelPackage/sched-mqprio/description - This scheduler allows QOS to be offloaded on NICs that have support for offloading QOS schedulers. -endef - -$(eval $(call KernelPackage,sched-mqprio)) - -define KernelPackage/sched-connmark - SUBMENU:=$(NETWORK_SUPPORT_MENU) - TITLE:=Traffic shaper conntrack mark support - DEPENDS:=+kmod-sched-core +kmod-ipt-core +kmod-ipt-conntrack-extra - KCONFIG:=CONFIG_NET_ACT_CONNMARK - FILES:=$(LINUX_DIR)/net/sched/act_connmark.ko - AUTOLOAD:=$(call AutoLoad,71, act_connmark) -endef -$(eval $(call KernelPackage,sched-connmark)) - -define KernelPackage/sched-ctinfo - SUBMENU:=$(NETWORK_SUPPORT_MENU) - TITLE:=Traffic shaper ctinfo support - DEPENDS:=+kmod-sched-core +kmod-ipt-core +kmod-ipt-conntrack-extra - KCONFIG:=CONFIG_NET_ACT_CTINFO - FILES:=$(LINUX_DIR)/net/sched/act_ctinfo.ko - AUTOLOAD:=$(call AutoLoad,71, act_ctinfo) -endef -$(eval $(call KernelPackage,sched-ctinfo)) - -define KernelPackage/sched-ipset - SUBMENU:=$(NETWORK_SUPPORT_MENU) - TITLE:=Traffic shaper ipset support - DEPENDS:=+kmod-sched-core +kmod-ipt-ipset - KCONFIG:= \ - CONFIG_NET_EMATCH_IPSET - FILES:= \ - $(LINUX_DIR)/net/sched/em_ipset.ko - AUTOLOAD:=$(call AutoLoad,72,em_ipset) -endef - -$(eval $(call KernelPackage,sched-ipset)) - - -define KernelPackage/sched-bpf - SUBMENU:=$(NETWORK_SUPPORT_MENU) - TITLE:=Traffic shaper support for Berkeley Packet Filter - KCONFIG:= \ - CONFIG_NET_CLS_BPF \ - CONFIG_NET_ACT_BPF - FILES:= \ - $(LINUX_DIR)/net/sched/cls_bpf.ko \ - $(LINUX_DIR)/net/sched/act_bpf.ko - AUTOLOAD:=$(call AutoLoad,72,cls_bpf act_bpf) -endef - -$(eval $(call KernelPackage,sched-bpf)) - - -define KernelPackage/bpf-test - SUBMENU:=$(NETWORK_SUPPORT_MENU) - TITLE:=Test Berkeley Packet Filter functionality - KCONFIG:=CONFIG_TEST_BPF - FILES:=$(LINUX_DIR)/lib/test_bpf.ko -endef - -$(eval $(call KernelPackage,bpf-test)) - - -define KernelPackage/sched - SUBMENU:=$(NETWORK_SUPPORT_MENU) - TITLE:=Extra traffic schedulers - DEPENDS:=+kmod-sched-core +kmod-ipt-core +kmod-lib-crc32c - KCONFIG:= \ - CONFIG_NET_SCH_CODEL \ - CONFIG_NET_SCH_DSMARK \ - CONFIG_NET_SCH_FIFO \ - CONFIG_NET_SCH_GRED \ - CONFIG_NET_SCH_MULTIQ \ - CONFIG_NET_SCH_PRIO \ - CONFIG_NET_SCH_RED \ - CONFIG_NET_SCH_SFQ \ - CONFIG_NET_SCH_TEQL \ - CONFIG_NET_SCH_FQ \ - CONFIG_NET_SCH_PIE \ - CONFIG_NET_ACT_POLICE \ - CONFIG_NET_ACT_IPT \ - CONFIG_NET_ACT_PEDIT \ - CONFIG_NET_ACT_SIMP \ - CONFIG_NET_ACT_CSUM \ - CONFIG_NET_EMATCH_CMP \ - CONFIG_NET_EMATCH_NBYTE \ - CONFIG_NET_EMATCH_META \ - CONFIG_NET_EMATCH_TEXT - FILES:=$(SCHED_FILES_EXTRA) - AUTOLOAD:=$(call AutoLoad,73, $(SCHED_MODULES_EXTRA)) -endef - -define KernelPackage/sched/description - Extra kernel schedulers modules for IP traffic -endef - -SCHED_TEQL_HOTPLUG:=hotplug-sched-teql.sh - -define KernelPackage/sched/install - $(INSTALL_DIR) $(1)/etc/hotplug.d/iface - $(INSTALL_DATA) ./files/$(SCHED_TEQL_HOTPLUG) $(1)/etc/hotplug.d/iface/15-teql -endef - -$(eval $(call KernelPackage,sched)) - - -define KernelPackage/tcp-bbr - SUBMENU:=$(NETWORK_SUPPORT_MENU) - TITLE:=BBR TCP congestion control - KCONFIG:=CONFIG_TCP_CONG_BBR - FILES:=$(LINUX_DIR)/net/ipv4/tcp_bbr.ko - AUTOLOAD:=$(call AutoProbe,tcp_bbr) -endef - -define KernelPackage/tcp-bbr/description - Kernel module for BBR (Bottleneck Bandwidth and RTT) TCP congestion - control. It requires the fq ("Fair Queue") pacing packet scheduler. - For kernel 4.13+, TCP internal pacing is implemented as fallback. -endef - -TCP_BBR_SYSCTL_CONF:=sysctl-tcp-bbr.conf - -define KernelPackage/tcp-bbr/install - $(INSTALL_DIR) $(1)/etc/sysctl.d - $(INSTALL_DATA) ./files/$(TCP_BBR_SYSCTL_CONF) $(1)/etc/sysctl.d/12-tcp-bbr.conf -endef - -$(eval $(call KernelPackage,tcp-bbr)) - - -define KernelPackage/tcp-hybla - SUBMENU:=$(NETWORK_SUPPORT_MENU) - TITLE:=TCP-Hybla congestion control algorithm - KCONFIG:=CONFIG_TCP_CONG_HYBLA - FILES:=$(LINUX_DIR)/net/ipv4/tcp_hybla.ko - AUTOLOAD:=$(call AutoProbe,tcp_hybla) -endef - -define KernelPackage/tcp-hybla/description - TCP-Hybla is a sender-side only change that eliminates penalization of - long-RTT, large-bandwidth connections, like when satellite legs are - involved, especially when sharing a common bottleneck with normal - terrestrial connections. -endef - -$(eval $(call KernelPackage,tcp-hybla)) - - -define KernelPackage/ax25 - SUBMENU:=$(NETWORK_SUPPORT_MENU) - TITLE:=AX25 support - DEPENDS:=+kmod-lib-crc16 - KCONFIG:= \ - CONFIG_HAMRADIO=y \ - CONFIG_AX25 \ - CONFIG_MKISS - FILES:= \ - $(LINUX_DIR)/net/ax25/ax25.ko \ - $(LINUX_DIR)/drivers/net/hamradio/mkiss.ko - AUTOLOAD:=$(call AutoLoad,80,ax25 mkiss) -endef - -define KernelPackage/ax25/description - Kernel modules for AX25 support -endef - -$(eval $(call KernelPackage,ax25)) - - -define KernelPackage/pktgen - SUBMENU:=$(NETWORK_SUPPORT_MENU) - DEPENDS:=@!TARGET_uml - TITLE:=Network packet generator - KCONFIG:=CONFIG_NET_PKTGEN - FILES:=$(LINUX_DIR)/net/core/pktgen.ko - AUTOLOAD:=$(call AutoLoad,99,pktgen) -endef - -define KernelPackage/pktgen/description - Kernel modules for the Network Packet Generator -endef - -$(eval $(call KernelPackage,pktgen)) - -define KernelPackage/l2tp - SUBMENU:=$(NETWORK_SUPPORT_MENU) - TITLE:=Layer Two Tunneling Protocol (L2TP) - DEPENDS:= \ - +kmod-udptunnel4 \ - +IPV6:kmod-udptunnel6 - KCONFIG:=CONFIG_L2TP \ - CONFIG_L2TP_V3=y \ - CONFIG_L2TP_DEBUGFS=n - FILES:=$(LINUX_DIR)/net/l2tp/l2tp_core.ko \ - $(LINUX_DIR)/net/l2tp/l2tp_netlink.ko - AUTOLOAD:=$(call AutoLoad,32,l2tp_core l2tp_netlink) -endef - -define KernelPackage/l2tp/description - Kernel modules for L2TP V3 Support -endef - -$(eval $(call KernelPackage,l2tp)) - - -define KernelPackage/l2tp-eth - SUBMENU:=$(NETWORK_SUPPORT_MENU) - TITLE:=L2TP ethernet pseudowire support for L2TPv3 - DEPENDS:=+kmod-l2tp - KCONFIG:=CONFIG_L2TP_ETH - FILES:=$(LINUX_DIR)/net/l2tp/l2tp_eth.ko - AUTOLOAD:=$(call AutoLoad,33,l2tp_eth) -endef - -define KernelPackage/l2tp-eth/description - Kernel modules for L2TP ethernet pseudowire support for L2TPv3 -endef - -$(eval $(call KernelPackage,l2tp-eth)) - -define KernelPackage/l2tp-ip - SUBMENU:=$(NETWORK_SUPPORT_MENU) - TITLE:=L2TP IP encapsulation for L2TPv3 - DEPENDS:=+kmod-l2tp - KCONFIG:=CONFIG_L2TP_IP - FILES:= \ - $(LINUX_DIR)/net/l2tp/l2tp_ip.ko \ - $(if $(CONFIG_IPV6),$(LINUX_DIR)/net/l2tp/l2tp_ip6.ko) - AUTOLOAD:=$(call AutoLoad,33,l2tp_ip $(if $(CONFIG_IPV6),l2tp_ip6)) -endef - -define KernelPackage/l2tp-ip/description - Kernel modules for L2TP IP encapsulation for L2TPv3 -endef - -$(eval $(call KernelPackage,l2tp-ip)) - - -define KernelPackage/sctp - SUBMENU:=$(NETWORK_SUPPORT_MENU) - TITLE:=SCTP protocol kernel support - KCONFIG:=\ - CONFIG_IP_SCTP \ - CONFIG_SCTP_DBG_MSG=n \ - CONFIG_SCTP_DBG_OBJCNT=n \ - CONFIG_SCTP_HMAC_NONE=n \ - CONFIG_SCTP_HMAC_SHA1=n \ - CONFIG_SCTP_HMAC_MD5=y \ - CONFIG_SCTP_COOKIE_HMAC_SHA1=n \ - CONFIG_SCTP_COOKIE_HMAC_MD5=y \ - CONFIG_SCTP_DEFAULT_COOKIE_HMAC_NONE=n \ - CONFIG_SCTP_DEFAULT_COOKIE_HMAC_SHA1=n \ - CONFIG_SCTP_DEFAULT_COOKIE_HMAC_MD5=y - FILES:= $(LINUX_DIR)/net/sctp/sctp.ko - AUTOLOAD:= $(call AutoLoad,32,sctp) - DEPENDS:=+kmod-lib-crc32c +kmod-crypto-md5 +kmod-crypto-hmac \ - +LINUX_5_15:kmod-udptunnel4 +LINUX_5_15:kmod-udptunnel6 -endef - -define KernelPackage/sctp/description - Kernel modules for SCTP protocol support -endef - -$(eval $(call KernelPackage,sctp)) - - -define KernelPackage/netem - SUBMENU:=$(NETWORK_SUPPORT_MENU) - TITLE:=Network emulation functionality - DEPENDS:=+kmod-sched - KCONFIG:=CONFIG_NET_SCH_NETEM - FILES:=$(LINUX_DIR)/net/sched/sch_netem.ko - AUTOLOAD:=$(call AutoLoad,99,netem) -endef - -define KernelPackage/netem/description - Kernel modules for emulating the properties of wide area networks -endef - -$(eval $(call KernelPackage,netem)) - -define KernelPackage/slip - SUBMENU:=$(NETWORK_SUPPORT_MENU) - DEPENDS:=+kmod-slhc - TITLE:=SLIP modules - KCONFIG:= \ - CONFIG_SLIP \ - CONFIG_SLIP_COMPRESSED=y \ - CONFIG_SLIP_SMART=y \ - CONFIG_SLIP_MODE_SLIP6=y - - FILES:= \ - $(LINUX_DIR)/drivers/net/slip/slip.ko - AUTOLOAD:=$(call AutoLoad,30,slip) -endef - -define KernelPackage/slip/description - Kernel modules for SLIP support -endef - -$(eval $(call KernelPackage,slip)) - -define KernelPackage/dnsresolver - SUBMENU:=$(NETWORK_SUPPORT_MENU) - TITLE:=In-kernel DNS Resolver - KCONFIG:= CONFIG_DNS_RESOLVER - FILES:=$(LINUX_DIR)/net/dns_resolver/dns_resolver.ko - AUTOLOAD:=$(call AutoLoad,30,dns_resolver) -endef - -$(eval $(call KernelPackage,dnsresolver)) - -define KernelPackage/rxrpc - SUBMENU:=$(NETWORK_SUPPORT_MENU) - TITLE:=AF_RXRPC support - HIDDEN:=1 - KCONFIG:= \ - CONFIG_AF_RXRPC \ - CONFIG_RXKAD=m \ - CONFIG_AF_RXRPC_DEBUG=n - FILES:= \ - $(LINUX_DIR)/net/rxrpc/rxrpc.ko - AUTOLOAD:=$(call AutoLoad,30,rxrpc.ko) - DEPENDS:= +kmod-crypto-manager +kmod-crypto-pcbc +kmod-crypto-fcrypt -endef - -define KernelPackage/rxrpc/description - Kernel support for AF_RXRPC; required for AFS client -endef - -$(eval $(call KernelPackage,rxrpc)) - -define KernelPackage/mpls - SUBMENU:=$(NETWORK_SUPPORT_MENU) - TITLE:=MPLS support - DEPENDS:=+kmod-iptunnel - KCONFIG:= \ - CONFIG_MPLS=y \ - CONFIG_LWTUNNEL=y \ - CONFIG_LWTUNNEL_BPF=n \ - CONFIG_NET_MPLS_GSO=m \ - CONFIG_MPLS_ROUTING=m \ - CONFIG_MPLS_IPTUNNEL=m - FILES:= \ - $(LINUX_DIR)/net/mpls/mpls_gso.ko \ - $(LINUX_DIR)/net/mpls/mpls_iptunnel.ko \ - $(LINUX_DIR)/net/mpls/mpls_router.ko - AUTOLOAD:=$(call AutoLoad,30,mpls_router mpls_iptunnel mpls_gso) -endef - -define KernelPackage/mpls/description - Kernel support for MPLS -endef - -$(eval $(call KernelPackage,mpls)) - -define KernelPackage/9pnet - SUBMENU:=$(NETWORK_SUPPORT_MENU) - TITLE:=Plan 9 Resource Sharing Support (9P2000) - DEPENDS:=@VIRTIO_SUPPORT - KCONFIG:= \ - CONFIG_NET_9P \ - CONFIG_NET_9P_DEBUG=n \ - CONFIG_NET_9P_XEN=n \ - CONFIG_NET_9P_VIRTIO - FILES:= \ - $(LINUX_DIR)/net/9p/9pnet.ko \ - $(LINUX_DIR)/net/9p/9pnet_virtio.ko - AUTOLOAD:=$(call AutoLoad,29,9pnet 9pnet_virtio) -endef - -define KernelPackage/9pnet/description - Kernel support support for - Plan 9 resource sharing via the 9P2000 protocol. -endef - -$(eval $(call KernelPackage,9pnet)) - - -define KernelPackage/nlmon - SUBMENU:=$(NETWORK_SUPPORT_MENU) - TITLE:=Virtual netlink monitoring device - KCONFIG:=CONFIG_NLMON - FILES:=$(LINUX_DIR)/drivers/net/nlmon.ko - AUTOLOAD:=$(call AutoProbe,nlmon) -endef - -define KernelPackage/nlmon/description - Kernel module which adds a monitoring device for netlink. -endef - -$(eval $(call KernelPackage,nlmon)) - - -define KernelPackage/mdio - SUBMENU:=$(NETWORK_SUPPORT_MENU) - TITLE:=MDIO (clause 45) PHY support - KCONFIG:=CONFIG_MDIO - HIDDEN:=1 - FILES:=$(LINUX_DIR)/drivers/net/mdio.ko - AUTOLOAD:=$(call AutoLoad,32,mdio) -endef - -define KernelPackage/mdio/description - Kernel modules for MDIO (clause 45) PHY support -endef - -$(eval $(call KernelPackage,mdio)) - -define KernelPackage/macsec - SUBMENU:=$(NETWORK_SUPPORT_MENU) - TITLE:=IEEE 802.1AE MAC-level encryption (MAC) - DEPENDS:=+kmod-crypto-gcm - KCONFIG:=CONFIG_MACSEC - FILES:=$(LINUX_DIR)/drivers/net/macsec.ko - AUTOLOAD:=$(call AutoLoad,13,macsec) -endef - -define KernelPackage/macsec/description - MACsec is an encryption standard for Ethernet. -endef - -$(eval $(call KernelPackage,macsec)) - - -define KernelPackage/netlink-diag - SUBMENU:=$(NETWORK_SUPPORT_MENU) - TITLE:=Netlink diag support for ss utility - KCONFIG:=CONFIG_NETLINK_DIAG - FILES:=$(LINUX_DIR)/net/netlink/netlink_diag.ko - AUTOLOAD:=$(call AutoLoad,31,netlink-diag) -endef - -define KernelPackage/netlink-diag/description - Netlink diag is a module made for use with iproute2's ss utility -endef - -$(eval $(call KernelPackage,netlink-diag)) - - -define KernelPackage/wireguard - SUBMENU:=$(NETWORK_SUPPORT_MENU) - TITLE:=WireGuard secure network tunnel - DEPENDS:= \ - +kmod-crypto-lib-blake2s \ - +kmod-crypto-lib-chacha20poly1305 \ - +kmod-crypto-lib-curve25519 \ - +kmod-udptunnel4 \ - +IPV6:kmod-udptunnel6 - KCONFIG:= \ - CONFIG_WIREGUARD \ - CONFIG_WIREGUARD_DEBUG=n - FILES:=$(LINUX_DIR)/drivers/net/wireguard/wireguard.ko - AUTOLOAD:=$(call AutoProbe,wireguard) -endef - -define KernelPackage/wireguard/description - WireGuard is a novel VPN that runs inside the Linux Kernel and utilizes - state-of-the-art cryptography. It aims to be faster, simpler, leaner, and - more useful than IPSec, while avoiding the massive headache. It intends to - be considerably more performant than OpenVPN. WireGuard is designed as a - general purpose VPN for running on embedded interfaces and super computers - alike, fit for many different circumstances. It uses UDP. -endef - -$(eval $(call KernelPackage,wireguard)) - - -define KernelPackage/qrtr - SUBMENU:=$(NETWORK_SUPPORT_MENU) - TITLE:=Qualcomm IPC Router support - HIDDEN:=1 - DEPENDS:=@LINUX_5_15 - KCONFIG:=CONFIG_QRTR - FILES:= \ - $(LINUX_DIR)/net/qrtr/qrtr.ko \ - $(LINUX_DIR)/net/qrtr/ns.ko - AUTOLOAD:=$(call AutoProbe,qrtr) -endef - -define KernelPackage/qrtr/description - Qualcomm IPC Router support -endef - -$(eval $(call KernelPackage,qrtr)) - -define KernelPackage/qrtr-tun - SUBMENU:=$(NETWORK_SUPPORT_MENU) - TITLE:=TUN device for Qualcomm IPC Router - DEPENDS:=+kmod-qrtr - KCONFIG:=CONFIG_QRTR_TUN - FILES:= $(LINUX_DIR)/net/qrtr/qrtr-tun.ko - AUTOLOAD:=$(call AutoProbe,qrtr-tun) -endef - -define KernelPackage/qrtr-tun/description - TUN device for Qualcomm IPC Router -endef - -$(eval $(call KernelPackage,qrtr-tun)) - -define KernelPackage/qrtr-smd - SUBMENU:=$(NETWORK_SUPPORT_MENU) - TITLE:=SMD IPC Router channels - DEPENDS:=+kmod-qrtr @TARGET_ipq807x - KCONFIG:=CONFIG_QRTR_SMD - FILES:= $(LINUX_DIR)/net/qrtr/qrtr-smd.ko - AUTOLOAD:=$(call AutoProbe,qrtr-smd) -endef - -define KernelPackage/qrtr-smd/description - SMD IPC Router channels -endef - -$(eval $(call KernelPackage,qrtr-smd)) - -define KernelPackage/qrtr-mhi - SUBMENU:=$(NETWORK_SUPPORT_MENU) - TITLE:=MHI IPC Router channels - DEPENDS:=+kmod-mhi +kmod-qrtr - KCONFIG:=CONFIG_QRTR_MHI - FILES:= $(LINUX_DIR)/net/qrtr/qrtr-mhi.ko - AUTOLOAD:=$(call AutoProbe,qrtr-mhi) -endef - -define KernelPackage/qrtr-mhi/description - MHI IPC Router channels -endef - -$(eval $(call KernelPackage,qrtr-mhi)) diff --git a/root/package/kernel/linux/modules/nls.mk b/root/package/kernel/linux/modules/nls.mk deleted file mode 100755 index 05fce27b..00000000 --- a/root/package/kernel/linux/modules/nls.mk +++ /dev/null @@ -1,339 +0,0 @@ -# -# Copyright (C) 2006-2011 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -define KernelPackage/nls-base - SUBMENU:=Native Language Support - TITLE:=Native Language Support - KCONFIG:=CONFIG_NLS - FILES:=$(LINUX_DIR)/fs/nls/nls_base.ko -endef - -define KernelPackage/nls-base/description - Kernel module for NLS (Native Language Support) -endef - -$(eval $(call KernelPackage,nls-base)) - - -define KernelPackage/nls-cp437 - SUBMENU:=Native Language Support - TITLE:=Codepage 437 (United States, Canada) - KCONFIG:=CONFIG_NLS_CODEPAGE_437 - FILES:=$(LINUX_DIR)/fs/nls/nls_cp437.ko - AUTOLOAD:=$(call AutoLoad,25,nls_cp437) - $(call AddDepends/nls) -endef - -define KernelPackage/nls-cp437/description - Kernel module for NLS Codepage 437 (United States, Canada) -endef - -$(eval $(call KernelPackage,nls-cp437)) - - -define KernelPackage/nls-cp775 - SUBMENU:=Native Language Support - TITLE:=Codepage 775 (Baltic Rim) - KCONFIG:=CONFIG_NLS_CODEPAGE_775 - FILES:=$(LINUX_DIR)/fs/nls/nls_cp775.ko - AUTOLOAD:=$(call AutoLoad,25,nls_cp775) - $(call AddDepends/nls) -endef - -define KernelPackage/nls-cp775/description - Kernel module for NLS Codepage 775 (Baltic Rim) -endef - -$(eval $(call KernelPackage,nls-cp775)) - - -define KernelPackage/nls-cp850 - SUBMENU:=Native Language Support - TITLE:=Codepage 850 (Europe) - KCONFIG:=CONFIG_NLS_CODEPAGE_850 - FILES:=$(LINUX_DIR)/fs/nls/nls_cp850.ko - AUTOLOAD:=$(call AutoLoad,25,nls_cp850) - $(call AddDepends/nls) -endef - -define KernelPackage/nls-cp850/description - Kernel module for NLS Codepage 850 (Europe) -endef - -$(eval $(call KernelPackage,nls-cp850)) - - -define KernelPackage/nls-cp852 - SUBMENU:=Native Language Support - TITLE:=Codepage 852 (Europe) - KCONFIG:=CONFIG_NLS_CODEPAGE_852 - FILES:=$(LINUX_DIR)/fs/nls/nls_cp852.ko - AUTOLOAD:=$(call AutoLoad,25,nls_cp852) - $(call AddDepends/nls) -endef - -define KernelPackage/nls-cp852/description - Kernel module for NLS Codepage 852 (Europe) -endef - -$(eval $(call KernelPackage,nls-cp852)) - - -define KernelPackage/nls-cp862 - SUBMENU:=Native Language Support - TITLE:=Codepage 862 (Hebrew) - KCONFIG:=CONFIG_NLS_CODEPAGE_862 - FILES:=$(LINUX_DIR)/fs/nls/nls_cp862.ko - AUTOLOAD:=$(call AutoLoad,25,nls_cp862) - $(call AddDepends/nls) -endef - -define KernelPackage/nls-cp862/description - Kernel module for NLS Codepage 862 (Hebrew) -endef - -$(eval $(call KernelPackage,nls-cp862)) - - -define KernelPackage/nls-cp864 - SUBMENU:=Native Language Support - TITLE:=Codepage 864 (Arabic) - KCONFIG:=CONFIG_NLS_CODEPAGE_864 - FILES:=$(LINUX_DIR)/fs/nls/nls_cp864.ko - AUTOLOAD:=$(call AutoLoad,25,nls_cp864) - $(call AddDepends/nls) -endef - -define KernelPackage/nls-cp864/description - Kernel module for NLS Codepage 864 (Arabic) -endef - -$(eval $(call KernelPackage,nls-cp864)) - - -define KernelPackage/nls-cp866 - SUBMENU:=Native Language Support - TITLE:=Codepage 866 (Cyrillic) - KCONFIG:=CONFIG_NLS_CODEPAGE_866 - FILES:=$(LINUX_DIR)/fs/nls/nls_cp866.ko - AUTOLOAD:=$(call AutoLoad,25,nls_cp866) - $(call AddDepends/nls) -endef - -define KernelPackage/nls-cp866/description - Kernel module for NLS Codepage 866 (Cyrillic) -endef - -$(eval $(call KernelPackage,nls-cp866)) - - -define KernelPackage/nls-cp932 - SUBMENU:=Native Language Support - TITLE:=Codepage 932 (Japanese) - KCONFIG:=CONFIG_NLS_CODEPAGE_932 - FILES:=$(LINUX_DIR)/fs/nls/nls_cp932.ko - AUTOLOAD:=$(call AutoLoad,25,nls_cp932) - $(call AddDepends/nls) -endef - -define KernelPackage/nls-cp932/description - Kernel module for NLS Codepage 932 (Japanese) -endef - -$(eval $(call KernelPackage,nls-cp932)) - - -define KernelPackage/nls-cp936 - SUBMENU:=Native Language Support - TITLE:=Codepage 936 (Simplified Chinese) - KCONFIG:=CONFIG_NLS_CODEPAGE_936 - FILES:=$(LINUX_DIR)/fs/nls/nls_cp936.ko - AUTOLOAD:=$(call AutoLoad,25,nls_cp936) - $(call AddDepends/nls) -endef - -define KernelPackage/nls-cp936/description - Kernel module for NLS Codepage 936 (Simplified Chinese) -endef - -$(eval $(call KernelPackage,nls-cp936)) - - -define KernelPackage/nls-cp950 - SUBMENU:=Native Language Support - TITLE:=Codepage 950 (Traditional Chinese) - KCONFIG:=CONFIG_NLS_CODEPAGE_950 - FILES:=$(LINUX_DIR)/fs/nls/nls_cp950.ko - AUTOLOAD:=$(call AutoLoad,25,nls_cp950) - $(call AddDepends/nls) -endef - -define KernelPackage/nls-cp950/description - Kernel module for NLS Codepage 950 (Traditional Chinese) -endef - -$(eval $(call KernelPackage,nls-cp950)) - - -define KernelPackage/nls-cp1250 - SUBMENU:=Native Language Support - TITLE:=Codepage 1250 (Eastern Europe) - KCONFIG:=CONFIG_NLS_CODEPAGE_1250 - FILES:=$(LINUX_DIR)/fs/nls/nls_cp1250.ko - AUTOLOAD:=$(call AutoLoad,25,nls_cp1250) - $(call AddDepends/nls) -endef - -define KernelPackage/nls-cp1250/description - Kernel module for NLS Codepage 1250 (Eastern Europe) -endef - -$(eval $(call KernelPackage,nls-cp1250)) - - -define KernelPackage/nls-cp1251 - SUBMENU:=Native Language Support - TITLE:=Codepage 1251 (Russian) - KCONFIG:=CONFIG_NLS_CODEPAGE_1251 - FILES:=$(LINUX_DIR)/fs/nls/nls_cp1251.ko - AUTOLOAD:=$(call AutoLoad,25,nls_cp1251) - $(call AddDepends/nls) -endef - -define KernelPackage/nls-cp1251/description - Kernel module for NLS Codepage 1251 (Russian) -endef - -$(eval $(call KernelPackage,nls-cp1251)) - - -define KernelPackage/nls-iso8859-1 - SUBMENU:=Native Language Support - TITLE:=ISO 8859-1 (Latin 1; Western European Languages) - KCONFIG:=CONFIG_NLS_ISO8859_1 - FILES:=$(LINUX_DIR)/fs/nls/nls_iso8859-1.ko - AUTOLOAD:=$(call AutoLoad,25,nls_iso8859-1) - $(call AddDepends/nls) -endef - -define KernelPackage/nls-iso8859-1/description - Kernel module for NLS ISO 8859-1 (Latin 1) -endef - -$(eval $(call KernelPackage,nls-iso8859-1)) - - -define KernelPackage/nls-iso8859-2 - SUBMENU:=Native Language Support - TITLE:=ISO 8859-2 (Latin 2; Central European Languages) - KCONFIG:=CONFIG_NLS_ISO8859_2 - FILES:=$(LINUX_DIR)/fs/nls/nls_iso8859-2.ko - AUTOLOAD:=$(call AutoLoad,25,nls_iso8859-2) - $(call AddDepends/nls) -endef - -define KernelPackage/nls-iso8859-2/description - Kernel module for NLS ISO 8859-2 (Latin 2) -endef - -$(eval $(call KernelPackage,nls-iso8859-2)) - - -define KernelPackage/nls-iso8859-6 - SUBMENU:=Native Language Support - TITLE:=ISO 8859-6 (Arabic) - KCONFIG:=CONFIG_NLS_ISO8859_6 - FILES:=$(LINUX_DIR)/fs/nls/nls_iso8859-6.ko - AUTOLOAD:=$(call AutoLoad,25,nls_iso8859-6) - $(call AddDepends/nls) -endef - -define KernelPackage/nls-iso8859-6/description - Kernel module for NLS ISO 8859-6 (Arabic) -endef - -$(eval $(call KernelPackage,nls-iso8859-6)) - - -define KernelPackage/nls-iso8859-8 - SUBMENU:=Native Language Support - TITLE:=ISO 8859-8, CP1255 (Hebrew) - KCONFIG:=CONFIG_NLS_ISO8859_8 - FILES:=$(LINUX_DIR)/fs/nls/nls_cp1255.ko - AUTOLOAD:=$(call AutoLoad,25,nls_cp1255) - $(call AddDepends/nls) -endef - -define KernelPackage/nls-iso8859-8/description - Kernel module for Hebrew charsets (ISO-8859-8, CP1255) -endef - -$(eval $(call KernelPackage,nls-iso8859-8)) - - -define KernelPackage/nls-iso8859-13 - SUBMENU:=Native Language Support - TITLE:=ISO 8859-13 (Latin 7; Baltic) - KCONFIG:=CONFIG_NLS_ISO8859_13 - FILES:=$(LINUX_DIR)/fs/nls/nls_iso8859-13.ko - AUTOLOAD:=$(call AutoLoad,25,nls_iso8859-13) - $(call AddDepends/nls) -endef - -define KernelPackage/nls-iso8859-13/description - Kernel module for NLS ISO 8859-13 (Latin 7; Baltic) -endef - -$(eval $(call KernelPackage,nls-iso8859-13)) - - -define KernelPackage/nls-iso8859-15 - SUBMENU:=Native Language Support - TITLE:=ISO 8859-15 (Latin 9; Western, with Euro symbol) - KCONFIG:=CONFIG_NLS_ISO8859_15 - FILES:=$(LINUX_DIR)/fs/nls/nls_iso8859-15.ko - AUTOLOAD:=$(call AutoLoad,25,nls_iso8859-15) - $(call AddDepends/nls) -endef - -define KernelPackage/nls-iso8859-15/description - Kernel module for NLS ISO 8859-15 (Latin 9) -endef - -$(eval $(call KernelPackage,nls-iso8859-15)) - - -define KernelPackage/nls-koi8r - SUBMENU:=Native Language Support - TITLE:=KOI8-R (Russian) - KCONFIG:=CONFIG_NLS_KOI8_R - FILES:=$(LINUX_DIR)/fs/nls/nls_koi8-r.ko - AUTOLOAD:=$(call AutoLoad,25,nls_koi8-r) - $(call AddDepends/nls) -endef - -define KernelPackage/nls-koi8r/description - Kernel module for NLS KOI8-R (Russian) -endef - -$(eval $(call KernelPackage,nls-koi8r)) - - -define KernelPackage/nls-utf8 - SUBMENU:=Native Language Support - TITLE:=UTF-8 - KCONFIG:=CONFIG_NLS_UTF8 - FILES:=$(LINUX_DIR)/fs/nls/nls_utf8.ko - AUTOLOAD:=$(call AutoLoad,25,nls_utf8) - $(call AddDepends/nls) -endef - -define KernelPackage/nls-utf8/description - Kernel module for NLS UTF-8 -endef - -$(eval $(call KernelPackage,nls-utf8)) diff --git a/root/package/kernel/linux/modules/other.mk b/root/package/kernel/linux/modules/other.mk index 33e36ef8..12bf1872 100755 --- a/root/package/kernel/linux/modules/other.mk +++ b/root/package/kernel/linux/modules/other.mk @@ -52,10 +52,8 @@ define KernelPackage/bluetooth $(LINUX_DIR)/net/bluetooth/rfcomm/rfcomm.ko \ $(LINUX_DIR)/net/bluetooth/bnep/bnep.ko \ $(LINUX_DIR)/net/bluetooth/hidp/hidp.ko \ - $(LINUX_DIR)/drivers/bluetooth/hci_uart.ko \ - $(LINUX_DIR)/drivers/bluetooth/btusb.ko \ - $(LINUX_DIR)/drivers/bluetooth/btintel.ko - AUTOLOAD:=$(call AutoProbe,bluetooth rfcomm bnep hidp hci_uart btusb) + $(LINUX_DIR)/drivers/bluetooth/hci_uart.ko + AUTOLOAD:=$(call AutoProbe,bluetooth rfcomm bnep hidp hci_uart) endef define KernelPackage/bluetooth/description @@ -128,7 +126,7 @@ define KernelPackage/dma-buf KCONFIG:=CONFIG_DMA_SHARED_BUFFER ifeq ($(strip $(CONFIG_EXTERNAL_KERNEL_TREE)),"") ifeq ($(strip $(CONFIG_KERNEL_GIT_CLONE_URI)),"") - FILES:=$(LINUX_DIR)/drivers/dma-buf/dma-shared-buffer.ko + FILES:=$(LINUX_DIR)/drivers/dma-buf/dma-shared-buffer.ko@lt5.14 endif endif AUTOLOAD:=$(call AutoLoad,20,dma-shared-buffer) @@ -182,6 +180,22 @@ endef $(eval $(call KernelPackage,eeprom-at25)) +define KernelPackage/gpio-dev + SUBMENU:=$(OTHER_MENU) + TITLE:=Generic GPIO char device support + DEPENDS:=@GPIO_SUPPORT + KCONFIG:=CONFIG_GPIO_DEVICE + FILES:=$(LINUX_DIR)/drivers/char/gpio_dev.ko + AUTOLOAD:=$(call AutoLoad,40,gpio_dev) +endef + +define KernelPackage/gpio-dev/description + Kernel module to allows control of GPIO pins using a character device. +endef + +$(eval $(call KernelPackage,gpio-dev)) + + define KernelPackage/gpio-f7188x SUBMENU:=$(OTHER_MENU) TITLE:=Fintek F718xx/F818xx GPIO Support @@ -898,6 +912,7 @@ $(eval $(call KernelPackage,ikconfig)) define KernelPackage/zram SUBMENU:=$(OTHER_MENU) TITLE:=ZRAM + DEPENDS:=+kmod-lib-lzo KCONFIG:= \ CONFIG_ZSMALLOC \ CONFIG_ZRAM \ @@ -914,32 +929,9 @@ define KernelPackage/zram/description Compressed RAM block device support endef -define KernelPackage/zram/config - choice - prompt "ZRAM Default compressor" - default ZRAM_DEF_COMP_LZORLE - - config ZRAM_DEF_COMP_LZORLE - bool "lzo-rle" - select PACKAGE_kmod-lib-lzo - - config ZRAM_DEF_COMP_LZO - bool "lzo" - select PACKAGE_kmod-lib-lzo - - config ZRAM_DEF_COMP_LZ4 - bool "lz4" - select PACKAGE_kmod-lib-lz4 - - config ZRAM_DEF_COMP_ZSTD - bool "zstd" - select PACKAGE_kmod-lib-zstd - - endchoice -endef - $(eval $(call KernelPackage,zram)) + define KernelPackage/pps SUBMENU:=$(OTHER_MENU) TITLE:=PPS support @@ -1014,7 +1006,7 @@ $(eval $(call KernelPackage,ptp)) define KernelPackage/ptp-qoriq SUBMENU:=$(OTHER_MENU) TITLE:=Freescale QorIQ PTP support - DEPENDS:=@(TARGET_mpc85xx||TARGET_qoriq) +kmod-ptp + DEPENDS:=@TARGET_mpc85xx +kmod-ptp KCONFIG:=CONFIG_PTP_1588_CLOCK_QORIQ FILES:=$(LINUX_DIR)/drivers/ptp/ptp-qoriq.ko AUTOLOAD:=$(call AutoProbe,ptp-qoriq) @@ -1151,8 +1143,7 @@ $(eval $(call KernelPackage,keys-trusted)) define KernelPackage/tpm SUBMENU:=$(OTHER_MENU) TITLE:=TPM Hardware Support - DEPENDS:= +kmod-random-core +(LINUX_5_15):kmod-asn1-decoder \ - +(LINUX_5_15):kmod-asn1-encoder +(LINUX_5_15):kmod-oid-registry + DEPENDS:= +kmod-random-core KCONFIG:= CONFIG_TCG_TPM FILES:= $(LINUX_DIR)/drivers/char/tpm/tpm.ko AUTOLOAD:=$(call AutoLoad,10,tpm,1) @@ -1279,36 +1270,3 @@ define KernelPackage/f71808e-wdt/description endef $(eval $(call KernelPackage,f71808e-wdt)) - - -define KernelPackage/qcom-qmi-helpers - SUBMENU:=$(OTHER_MENU) - TITLE:=Qualcomm QMI Helpers - KCONFIG:=CONFIG_QCOM_QMI_HELPERS - FILES:=$(LINUX_DIR)/drivers/soc/qcom/qmi_helpers.ko - AUTOLOAD:=$(call AutoProbe,qmi_helpers) -endef - -define KernelPackage/qcom-qmi-helpers/description - Qualcomm QMI Helpers -endef - -$(eval $(call KernelPackage,qcom-qmi-helpers)) - -define KernelPackage/mhi - SUBMENU:=$(OTHER_MENU) - TITLE:=Modem Host Interface (MHI) bus - DEPENDS:=@LINUX_5_15 - KCONFIG:=CONFIG_MHI_BUS \ - CONFIG_MHI_BUS_DEBUG=y \ - CONFIG_MHI_BUS_PCI_GENERIC=n \ - CONFIG_MHI_NET=n - FILES:=$(LINUX_DIR)/drivers/bus/mhi/core/mhi.ko - AUTOLOAD:=$(call AutoProbe,mhi) -endef - -define KernelPackage/mhi/description - Bus driver for MHI protocol. -endef - -$(eval $(call KernelPackage,mhi)) diff --git a/root/package/kernel/linux/modules/pcmcia.mk b/root/package/kernel/linux/modules/pcmcia.mk deleted file mode 100755 index 11c2106c..00000000 --- a/root/package/kernel/linux/modules/pcmcia.mk +++ /dev/null @@ -1,113 +0,0 @@ -# -# Copyright (C) 2006-2010 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -PCMCIA_MENU:=PCMCIA support - -define KernelPackage/pcmcia-core - SUBMENU:=$(PCMCIA_MENU) - TITLE:=PCMCIA/CardBus support - DEPENDS:=@PCMCIA_SUPPORT - KCONFIG:= \ - CONFIG_PCMCIA \ - CONFIG_PCMCIA_LOAD_CIS=y \ - CONFIG_CARDBUS \ - CONFIG_PCCARD \ - PCMCIA_DEBUG=n - FILES:= \ - $(LINUX_DIR)/drivers/pcmcia/pcmcia_core.ko \ - $(LINUX_DIR)/drivers/pcmcia/pcmcia.ko - AUTOLOAD:=$(call AutoLoad,25,pcmcia_core pcmcia) -endef - -define KernelPackage/pcmcia-core/description - Kernel support for PCMCIA/CardBus controllers -endef - -$(eval $(call KernelPackage,pcmcia-core)) - - -define AddDepends/pcmcia - SUBMENU:=$(PCMCIA_MENU) - DEPENDS+=kmod-pcmcia-core $(1) -endef - - -define KernelPackage/pcmcia-rsrc - TITLE:=PCMCIA resource support - KCONFIG:=CONFIG_PCCARD_NONSTATIC=y - FILES:=$(LINUX_DIR)/drivers/pcmcia/pcmcia_rsrc.ko - AUTOLOAD:=$(call AutoLoad,26,pcmcia_rsrc) - $(call AddDepends/pcmcia) -endef - -define KernelPackage/pcmcia-rsrc/description - Kernel support for PCMCIA resource allocation -endef - -$(eval $(call KernelPackage,pcmcia-rsrc)) - - -define KernelPackage/pcmcia-yenta - TITLE:=yenta socket driver - KCONFIG:=CONFIG_YENTA - FILES:=$(LINUX_DIR)/drivers/pcmcia/yenta_socket.ko - AUTOLOAD:=$(call AutoLoad,41,yenta_socket) - DEPENDS:=+kmod-pcmcia-rsrc - $(call AddDepends/pcmcia) -endef - -$(eval $(call KernelPackage,pcmcia-yenta)) - - -define KernelPackage/pcmcia-serial - TITLE:=Serial devices support - KCONFIG:= \ - CONFIG_PCMCIA_SERIAL_CS \ - CONFIG_SERIAL_8250_CS - FILES:=$(LINUX_DIR)/drivers/tty/serial/8250/serial_cs.ko - AUTOLOAD:=$(call AutoLoad,45,serial_cs) - DEPENDS:=+kmod-serial-8250 - $(call AddDepends/pcmcia) -endef - -define KernelPackage/pcmcia-serial/description - Kernel support for PCMCIA/CardBus serial devices -endef - -$(eval $(call KernelPackage,pcmcia-serial)) - - -define KernelPackage/pcmcia-pd6729 - TITLE:=Cirrus PD6729 compatible bridge support - KCONFIG:=CONFIG_PD6729 - FILES:=$(LINUX_DIR)/drivers/pcmcia/pd6729.ko - AUTOLOAD:=$(call AutoLoad,41,pd6729) - DEPENDS:=+kmod-pcmcia-rsrc - $(call AddDepends/pcmcia) -endef - -define KernelPackage/pcmcia-pd6729/description - Kernel support for the Cirrus PD6729 PCI-to-PCMCIA bridge -endef - -$(eval $(call KernelPackage,pcmcia-pd6729)) - - -define KernelPackage/pcmcia-nozomi - TITLE:=Option Fusion+ card - KCONFIG:=CONFIG_NOZOMI - FILES:=$(LINUX_DIR)/drivers/tty/nozomi.ko - AUTOLOAD:=$(call AutoLoad,60,nozomi) - DEPENDS:=+kmod-pcmcia-rsrc - $(call AddDepends/pcmcia) -endef - -define KernelPackage/pcmcia-nozomi/description - Kernel support for Option Fusion+ card -endef - -$(eval $(call KernelPackage,pcmcia-nozomi)) diff --git a/root/package/kernel/linux/modules/sound.mk b/root/package/kernel/linux/modules/sound.mk index 83b3355f..14bdf3ab 100755 --- a/root/package/kernel/linux/modules/sound.mk +++ b/root/package/kernel/linux/modules/sound.mk @@ -30,7 +30,7 @@ SOUNDCORE_FILES ?= \ $(LINUX_DIR)/sound/core/snd-pcm.ko \ $(LINUX_DIR)/sound/core/oss/snd-mixer-oss.ko \ $(LINUX_DIR)/sound/core/oss/snd-pcm-oss.ko \ - $(LINUX_DIR)/sound/core/snd-compress.ko + $(LINUX_DIR)/sound/core/snd-compress.ko@lt5.14 SOUNDCORE_LOAD += \ $(if $(CONFIG_SND_DMAENGINE_PCM),snd-pcm-dmaengine) @@ -225,12 +225,12 @@ define KernelPackage/sound-soc-imx $(LINUX_DIR)/sound/soc/fsl/snd-soc-fsl-ssi.ko \ $(LINUX_DIR)/sound/soc/fsl/imx-pcm-dma.ko AUTOLOAD:=$(call AutoLoad,56,snd-soc-imx-audmux snd-soc-fsl-ssi snd-soc-imx-pcm) - DEPENDS:=@TARGET_imx +kmod-sound-soc-core + DEPENDS:=@TARGET_imx6 +kmod-sound-soc-core $(call AddDepends/sound) endef define KernelPackage/sound-soc-imx/description - Support for i.MX Platform sound (ssi/audmux/pcm) + Support for i.MX6 Platform sound (ssi/audmux/pcm) endef $(eval $(call KernelPackage,sound-soc-imx)) @@ -243,12 +243,12 @@ define KernelPackage/sound-soc-imx-sgtl5000 $(LINUX_DIR)/sound/soc/codecs/snd-soc-sgtl5000.ko \ $(LINUX_DIR)/sound/soc/fsl/snd-soc-imx-sgtl5000.ko AUTOLOAD:=$(call AutoLoad,57,snd-soc-sgtl5000 snd-soc-imx-sgtl5000) - DEPENDS:=@TARGET_imx +kmod-sound-soc-imx +kmod-regmap-i2c + DEPENDS:=@TARGET_imx6 +kmod-sound-soc-imx $(call AddDepends/sound) endef define KernelPackage/sound-soc-imx-sgtl5000/description - Support for i.MX Platform sound SGTL5000 codec + Support for i.MX6 Platform sound SGTL5000 codec endef $(eval $(call KernelPackage,sound-soc-imx-sgtl5000)) diff --git a/root/package/kernel/linux/modules/spi.mk b/root/package/kernel/linux/modules/spi.mk deleted file mode 100755 index 01dc7dc7..00000000 --- a/root/package/kernel/linux/modules/spi.mk +++ /dev/null @@ -1,75 +0,0 @@ -# -# Copyright (C) 2006-2011 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -SPI_MENU:=SPI Support - -define KernelPackage/mmc-spi - SUBMENU:=$(SPI_MENU) - TITLE:=MMC/SD over SPI Support - DEPENDS:=+kmod-mmc +kmod-lib-crc-itu-t +kmod-lib-crc7 - KCONFIG:=CONFIG_MMC_SPI \ - CONFIG_SPI=y \ - CONFIG_SPI_MASTER=y - FILES:=\ - $(if $(CONFIG_OF),$(LINUX_DIR)/drivers/mmc/host/of_mmc_spi.ko) \ - $(LINUX_DIR)/drivers/mmc/host/mmc_spi.ko - AUTOLOAD:=$(call AutoProbe,$(if $(CONFIG_OF),of_mmc_spi) mmc_spi) -endef - -define KernelPackage/mmc-spi/description - Kernel support for MMC/SD over SPI -endef - -$(eval $(call KernelPackage,mmc-spi)) - - -define KernelPackage/spi-bitbang - SUBMENU:=$(SPI_MENU) - TITLE:=Serial Peripheral Interface bitbanging library - KCONFIG:=CONFIG_SPI_BITBANG \ - CONFIG_SPI=y \ - CONFIG_SPI_MASTER=y - FILES:=$(LINUX_DIR)/drivers/spi/spi-bitbang.ko -endef - -define KernelPackage/spi-bitbang/description - This package contains the SPI bitbanging library -endef - -$(eval $(call KernelPackage,spi-bitbang)) - - -define KernelPackage/spi-gpio - SUBMENU:=$(SPI_MENU) - TITLE:=GPIO-based bitbanging SPI Master - DEPENDS:=@GPIO_SUPPORT +kmod-spi-bitbang - KCONFIG:=CONFIG_SPI_GPIO - FILES:=$(LINUX_DIR)/drivers/spi/spi-gpio.ko - AUTOLOAD:=$(call AutoProbe,spi-gpio) -endef - -define KernelPackage/spi-gpio/description - This package contains the GPIO-based bitbanging SPI Master -endef - -$(eval $(call KernelPackage,spi-gpio)) - -define KernelPackage/spi-dev - SUBMENU:=$(SPI_MENU) - TITLE:=User mode SPI device driver - KCONFIG:=CONFIG_SPI_SPIDEV \ - CONFIG_SPI=y \ - CONFIG_SPI_MASTER=y - FILES:=$(LINUX_DIR)/drivers/spi/spidev.ko - AUTOLOAD:=$(call AutoProbe,spidev) -endef - -define KernelPackage/spi-dev/description - This package contains the user mode SPI device driver -endef - -$(eval $(call KernelPackage,spi-dev)) diff --git a/root/package/kernel/linux/modules/usb.mk b/root/package/kernel/linux/modules/usb.mk deleted file mode 100755 index 1dc16dca..00000000 --- a/root/package/kernel/linux/modules/usb.mk +++ /dev/null @@ -1,1816 +0,0 @@ -# -# Copyright (C) 2006-2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -USB_MENU:=USB Support - -USBNET_DIR:=net/usb -USBHID_DIR?=hid/usbhid -USBINPUT_DIR?=input/misc - -define KernelPackage/usb-core - SUBMENU:=$(USB_MENU) - TITLE:=Support for USB - DEPENDS:=@USB_SUPPORT - KCONFIG:=CONFIG_USB CONFIG_XPS_USB_HCD_XILINX=n CONFIG_USB_FHCI_HCD=n - FILES:= \ - $(LINUX_DIR)/drivers/usb/core/usbcore.ko \ - $(LINUX_DIR)/drivers/usb/common/usb-common.ko - AUTOLOAD:=$(call AutoLoad,20,usb-common usbcore,1) - $(call AddDepends/nls) -endef - -define KernelPackage/usb-core/description - Kernel support for USB -endef - -$(eval $(call KernelPackage,usb-core)) - - -define AddDepends/usb - SUBMENU:=$(USB_MENU) - DEPENDS+=+kmod-usb-core $(1) -endef - - -define KernelPackage/usb-ledtrig-usbport - TITLE:=LED trigger for USB ports - KCONFIG:=CONFIG_USB_LEDS_TRIGGER_USBPORT - FILES:=$(LINUX_DIR)/drivers/usb/core/ledtrig-usbport.ko - AUTOLOAD:=$(call AutoLoad,50,ledtrig-usbport) - $(call AddDepends/usb) -endef - -define KernelPackage/usb-ledtrig-usbport/description - This driver allows LEDs to be controlled by USB events. Enabling this - trigger allows specifying list of USB ports that should turn on LED - when some USB device gets connected. - If possible it should be prefered over similar ledtrig-usbdev. -endef - -$(eval $(call KernelPackage,usb-ledtrig-usbport)) - - -define KernelPackage/usb-phy-nop - TITLE:=Support for USB NOP transceiver - KCONFIG:=CONFIG_NOP_USB_XCEIV - HIDDEN:=1 - FILES:=$(LINUX_DIR)/drivers/usb/phy/phy-generic.ko - AUTOLOAD:=$(call AutoLoad,21,phy-generic,1) - $(call AddDepends/usb) -endef - -define KernelPackage/usb-phy-nop/description - Support for USB NOP transceiver -endef - -$(eval $(call KernelPackage,usb-phy-nop)) - - -define KernelPackage/phy-ath79-usb - TITLE:=Support for ATH79 USB PHY - KCONFIG:=CONFIG_PHY_AR7100_USB \ - CONFIG_PHY_AR7200_USB - DEPENDS:=@TARGET_ath79 - HIDDEN:=1 - FILES:=$(LINUX_DIR)/drivers/phy/phy-ar7100-usb.ko \ - $(LINUX_DIR)/drivers/phy/phy-ar7200-usb.ko - AUTOLOAD:=$(call AutoLoad,21,phy-ar7100-usb phy-ar7200-usb,1) - $(call AddDepends/usb) -endef - -define KernelPackage/phy-ath79-usb/description - Support for ATH79 USB transceiver -endef - -$(eval $(call KernelPackage,phy-ath79-usb)) - - -define KernelPackage/usb-gadget - TITLE:=USB Gadget support - KCONFIG:=CONFIG_USB_GADGET - HIDDEN:=1 - FILES:=\ - $(LINUX_DIR)/drivers/usb/gadget/udc/udc-core.ko - AUTOLOAD:=$(call AutoLoad,21,udc-core,1) - DEPENDS:=@USB_GADGET_SUPPORT - $(call AddDepends/usb) -endef - -define KernelPackage/usb-gadget/description - Kernel support for USB Gadget mode -endef - -$(eval $(call KernelPackage,usb-gadget)) - -define KernelPackage/usb-lib-composite - TITLE:=USB lib composite - KCONFIG:=CONFIG_USB_LIBCOMPOSITE - DEPENDS:=+kmod-usb-gadget +kmod-fs-configfs - HIDDEN:=1 - FILES:=$(LINUX_DIR)/drivers/usb/gadget/libcomposite.ko - AUTOLOAD:=$(call AutoLoad,50,libcomposite) - $(call AddDepends/usb) -endef - -define KernelPackage/usb-lib-composite/description - Lib Composite -endef - -$(eval $(call KernelPackage,usb-lib-composite)) - -define KernelPackage/usb-gadget-hid - TITLE:=USB HID Gadget Support - KCONFIG:=CONFIG_USB_G_HID - DEPENDS:=+kmod-usb-gadget +kmod-usb-lib-composite - FILES:= \ - $(LINUX_DIR)/drivers/usb/gadget/legacy/g_hid.ko \ - $(LINUX_DIR)/drivers/usb/gadget/function/usb_f_hid.ko - AUTOLOAD:=$(call AutoLoad,52,usb_f_hid) - $(call AddDepends/usb) -endef - -define KernelPackage/usb-gadget-hid/description - Kernel support for USB HID Gadget. -endef - -$(eval $(call KernelPackage,usb-gadget-hid)) - -define KernelPackage/usb-gadget-ehci-debug - TITLE:=USB EHCI debug port Gadget support - KCONFIG:=\ - CONFIG_USB_G_DBGP \ - CONFIG_USB_G_DBGP_SERIAL=y \ - CONFIG_USB_G_DBGP_PRINTK=n - DEPENDS:=+kmod-usb-gadget +kmod-usb-lib-composite +kmod-usb-gadget-serial - FILES:=$(LINUX_DIR)/drivers/usb/gadget/legacy/g_dbgp.ko - $(call AddDepends/usb) -endef - -define KernelPackage/usb-gadget-ehci-debug/description - Kernel support for USB EHCI debug port Gadget. -endef - -$(eval $(call KernelPackage,usb-gadget-ehci-debug)) - -define KernelPackage/usb-gadget-eth - TITLE:=USB Ethernet Gadget support - KCONFIG:= \ - CONFIG_USB_ETH \ - CONFIG_USB_ETH_RNDIS=y \ - CONFIG_USB_ETH_EEM=n - DEPENDS:=+kmod-usb-gadget +kmod-usb-lib-composite - FILES:= \ - $(LINUX_DIR)/drivers/usb/gadget/function/u_ether.ko \ - $(LINUX_DIR)/drivers/usb/gadget/function/usb_f_ecm.ko \ - $(LINUX_DIR)/drivers/usb/gadget/function/usb_f_ecm_subset.ko \ - $(LINUX_DIR)/drivers/usb/gadget/function/usb_f_rndis.ko \ - $(LINUX_DIR)/drivers/usb/gadget/legacy/g_ether.ko - AUTOLOAD:=$(call AutoLoad,52,usb_f_ecm) - $(call AddDepends/usb) -endef - -define KernelPackage/usb-gadget-eth/description - Kernel support for USB Ethernet Gadget -endef - -$(eval $(call KernelPackage,usb-gadget-eth)) - -define KernelPackage/usb-gadget-ncm - TITLE:=USB Network Control Model (NCM) Gadget support - KCONFIG:=CONFIG_USB_G_NCM - DEPENDS:=+kmod-usb-gadget +kmod-usb-lib-composite \ - +kmod-usb-gadget-eth - FILES:= \ - $(LINUX_DIR)/drivers/usb/gadget/function/usb_f_ncm.ko \ - $(LINUX_DIR)/drivers/usb/gadget/legacy/g_ncm.ko - AUTOLOAD:=$(call AutoLoad,52,usb_f_ncm) - $(call AddDepends/usb) -endef - -define KernelPackage/usb-gadget-ncm/description - Kernel support for USB Network Control Model (NCM) Gadget -endef - -$(eval $(call KernelPackage,usb-gadget-ncm)) - -define KernelPackage/usb-gadget-serial - TITLE:=USB Serial Gadget support - KCONFIG:=CONFIG_USB_G_SERIAL - DEPENDS:=+kmod-usb-gadget +kmod-usb-lib-composite - FILES:= \ - $(LINUX_DIR)/drivers/usb/gadget/function/u_serial.ko \ - $(LINUX_DIR)/drivers/usb/gadget/function/usb_f_acm.ko \ - $(LINUX_DIR)/drivers/usb/gadget/function/usb_f_obex.ko \ - $(LINUX_DIR)/drivers/usb/gadget/function/usb_f_serial.ko \ - $(LINUX_DIR)/drivers/usb/gadget/legacy/g_serial.ko - AUTOLOAD:=$(call AutoLoad,52,usb_f_acm) - $(call AddDepends/usb) -endef - -define KernelPackage/usb-gadget-serial/description - Kernel support for USB Serial Gadget. -endef - -$(eval $(call KernelPackage,usb-gadget-serial)) - -define KernelPackage/usb-gadget-mass-storage - TITLE:=USB Mass Storage support - KCONFIG:=CONFIG_USB_MASS_STORAGE - DEPENDS:=+kmod-usb-gadget +kmod-usb-lib-composite - FILES:= \ - $(LINUX_DIR)/drivers/usb/gadget/function/usb_f_mass_storage.ko \ - $(LINUX_DIR)/drivers/usb/gadget/legacy/g_mass_storage.ko - AUTOLOAD:=$(call AutoLoad,52,usb_f_mass_storage) - $(call AddDepends/usb) -endef - -define KernelPackage/usb-gadget-mass-storage/description - Kernel support for USB Gadget Mass Storage -endef - -$(eval $(call KernelPackage,usb-gadget-mass-storage)) - -define KernelPackage/usb-gadget-cdc-composite - TITLE:= USB CDC Composite (Ethernet + ACM) - KCONFIG:=CONFIG_USB_CDC_COMPOSITE - DEPENDS:=+kmod-usb-gadget +kmod-usb-lib-composite \ - +kmod-usb-gadget-eth +kmod-usb-gadget-serial - FILES:= $(LINUX_DIR)/drivers/usb/gadget/legacy/g_cdc.ko - $(call AddDepends/usb) -endef - -define KernelPackage/usb-gadget-cdc-composite/description - Kernel support for the USB CDC Composite gadget. - This appears as an ethernet + ACM serial gadget. -endef - -$(eval $(call KernelPackage,usb-gadget-cdc-composite)) - - -define KernelPackage/usb-uhci - TITLE:=Support for UHCI controllers - KCONFIG:= \ - CONFIG_USB_PCI=y \ - CONFIG_USB_UHCI_ALT \ - CONFIG_USB_UHCI_HCD - FILES:=$(LINUX_DIR)/drivers/usb/host/uhci-hcd.ko - AUTOLOAD:=$(call AutoLoad,50,uhci-hcd,1) - $(call AddDepends/usb) -endef - -define KernelPackage/usb-uhci/description - Kernel support for USB UHCI controllers -endef - -$(eval $(call KernelPackage,usb-uhci,1)) - - -define KernelPackage/usb-ohci - TITLE:=Support for OHCI controllers - DEPENDS:= \ - +TARGET_bcm53xx:kmod-usb-bcma \ - +TARGET_bcm47xx:kmod-usb-bcma \ - +TARGET_bcm47xx:kmod-usb-ssb - KCONFIG:= \ - CONFIG_USB_OHCI \ - CONFIG_USB_OHCI_HCD \ - CONFIG_USB_OHCI_ATH79=y \ - CONFIG_USB_OHCI_HCD_AT91=y \ - CONFIG_USB_OHCI_BCM63XX=y \ - CONFIG_USB_OCTEON_OHCI=y \ - CONFIG_USB_OHCI_HCD_OMAP3=y \ - CONFIG_USB_OHCI_HCD_PLATFORM=y - FILES:= \ - $(LINUX_DIR)/drivers/usb/host/ohci-hcd.ko \ - $(LINUX_DIR)/drivers/usb/host/ohci-platform.ko - ifneq ($(wildcard $(LINUX_DIR)/drivers/usb/host/ohci-at91.ko),) - FILES+=$(LINUX_DIR)/drivers/usb/host/ohci-at91.ko - endif - AUTOLOAD:=$(call AutoLoad,50,ohci-hcd ohci-platform ohci-at91,1) - $(call AddDepends/usb) -endef - -define KernelPackage/usb-ohci/description - Kernel support for USB OHCI controllers -endef - -$(eval $(call KernelPackage,usb-ohci,1)) - - -define KernelPackage/usb-ohci-pci - TITLE:=Support for PCI OHCI controllers - DEPENDS:=@PCI_SUPPORT +kmod-usb-ohci - KCONFIG:= \ - CONFIG_USB_PCI=y \ - CONFIG_USB_OHCI_HCD_PCI - FILES:=$(LINUX_DIR)/drivers/usb/host/ohci-pci.ko - AUTOLOAD:=$(call AutoLoad,51,ohci-pci,1) - $(call AddDepends/usb) -endef - -define KernelPackage/usb-ohci-pci/description - Kernel support for PCI OHCI controllers -endef - -$(eval $(call KernelPackage,usb-ohci-pci)) - - -define KernelPackage/usb-bcma - TITLE:=Support for BCMA USB controllers - DEPENDS:=@USB_SUPPORT @TARGET_bcm47xx||TARGET_bcm53xx - HIDDEN:=1 - KCONFIG:=CONFIG_USB_HCD_BCMA - FILES:= \ - $(if $(CONFIG_USB_HCD_BCMA),$(LINUX_DIR)/drivers/usb/host/bcma-hcd.ko) - AUTOLOAD:=$(call AutoLoad,19,$(if $(CONFIG_USB_HCD_BCMA),bcma-hcd),1) - $(call AddDepends/usb) -endef -$(eval $(call KernelPackage,usb-bcma)) - -define KernelPackage/usb-fotg210 - TITLE:=Support for FOTG210 USB host controllers - DEPENDS:=@USB_SUPPORT @TARGET_gemini - KCONFIG:=CONFIG_USB_FOTG210_HCD - FILES:= \ - $(if $(CONFIG_USB_FOTG210_HCD),$(LINUX_DIR)/drivers/usb/host/fotg210-hcd.ko) - AUTOLOAD:=$(call AutoLoad,50,fotg210-hcd,1) - $(call AddDepends/usb) -endef -$(eval $(call KernelPackage,usb-fotg210)) - -define KernelPackage/usb-ssb - TITLE:=Support for SSB USB controllers - DEPENDS:=@USB_SUPPORT @TARGET_bcm47xx - HIDDEN:=1 - KCONFIG:=CONFIG_USB_HCD_SSB - FILES:= \ - $(if $(CONFIG_USB_HCD_SSB),$(LINUX_DIR)/drivers/usb/host/ssb-hcd.ko) - AUTOLOAD:=$(call AutoLoad,19,$(if $(CONFIG_USB_HCD_SSB),ssb-hcd),1) - $(call AddDepends/usb) -endef -$(eval $(call KernelPackage,usb-ssb)) - -define KernelPackage/usb-ehci - TITLE:=EHCI controller support - HIDDEN:=1 - KCONFIG:= \ - CONFIG_USB_EHCI_HCD - FILES:= \ - $(LINUX_DIR)/drivers/usb/host/ehci-hcd.ko - AUTOLOAD:=$(call AutoLoad,35,ehci-hcd,1) - $(call AddDepends/usb) -endef -$(eval $(call KernelPackage,usb-ehci)) - -define KernelPackage/usb2 - TITLE:=Support for USB2 controllers - DEPENDS:=\ - +TARGET_bcm47xx:kmod-usb-bcma \ - +TARGET_bcm47xx:kmod-usb-ssb \ - +TARGET_bcm53xx:kmod-usb-bcma \ - +TARGET_bcm53xx:kmod-phy-bcm-ns-usb2 \ - +TARGET_ath79:kmod-phy-ath79-usb \ - +kmod-usb-ehci - KCONFIG:=\ - CONFIG_USB_EHCI_HCD_PLATFORM \ - CONFIG_USB_EHCI_BCM63XX=y \ - CONFIG_USB_IMX21_HCD=y \ - CONFIG_USB_EHCI_MXC=y \ - CONFIG_USB_OCTEON_EHCI=y \ - CONFIG_USB_EHCI_HCD_ORION=y \ - CONFIG_USB_EHCI_HCD_AT91=y \ - CONFIG_USB_EHCI_FSL - FILES:= \ - $(LINUX_DIR)/drivers/usb/host/ehci-platform.ko - ifneq ($(wildcard $(LINUX_DIR)/drivers/usb/host/ehci-orion.ko),) - FILES+=$(LINUX_DIR)/drivers/usb/host/ehci-orion.ko - endif - ifneq ($(wildcard $(LINUX_DIR)/drivers/usb/host/ehci-atmel.ko),) - FILES+=$(LINUX_DIR)/drivers/usb/host/ehci-atmel.ko - endif - ifneq ($(wildcard $(LINUX_DIR)/drivers/usb/host/ehci-fsl.ko),) - FILES+=$(LINUX_DIR)/drivers/usb/host/ehci-fsl.ko - endif - ifneq ($(wildcard $(LINUX_DIR)/drivers/usb/host/fsl-mph-dr-of.ko),) - FILES+=$(LINUX_DIR)/drivers/usb/host/fsl-mph-dr-of.ko - endif - AUTOLOAD:=$(call AutoLoad,40,ehci-hcd ehci-platform ehci-orion ehci-atmel ehci-fsl fsl-mph-dr-of,1) - $(call AddDepends/usb) -endef - -define KernelPackage/usb2/description - Kernel support for USB2 (EHCI) controllers -endef - -$(eval $(call KernelPackage,usb2)) - - -define KernelPackage/usb2-pci - TITLE:=Support for PCI USB2 controllers - DEPENDS:=@PCI_SUPPORT +kmod-usb2 - KCONFIG:= \ - CONFIG_USB_PCI=y \ - CONFIG_USB_EHCI_PCI - FILES:=$(LINUX_DIR)/drivers/usb/host/ehci-pci.ko - AUTOLOAD:=$(call AutoLoad,42,ehci-pci,1) - $(call AddDepends/usb) -endef - -define KernelPackage/usb2-pci/description - Kernel support for PCI USB2 (EHCI) controllers -endef - -$(eval $(call KernelPackage,usb2-pci)) - - -define KernelPackage/usb-dwc2 - TITLE:=DWC2 USB controller driver - DEPENDS:=+USB_GADGET_SUPPORT:kmod-usb-gadget +kmod-usb-roles - KCONFIG:= \ - CONFIG_USB_PCI=y \ - CONFIG_USB_DWC2 \ - CONFIG_USB_DWC2_PCI \ - CONFIG_USB_DWC2_PLATFORM \ - CONFIG_USB_DWC2_DEBUG=n \ - CONFIG_USB_DWC2_VERBOSE=n \ - CONFIG_USB_DWC2_TRACK_MISSED_SOFS=n \ - CONFIG_USB_DWC2_DEBUG_PERIODIC=n - FILES:= \ - $(LINUX_DIR)/drivers/usb/dwc2/dwc2.ko - AUTOLOAD:=$(call AutoLoad,54,dwc2,1) - $(call AddDepends/usb) -endef - -define KernelPackage/usb-dwc2/description - This driver provides USB Device Controller support for the - Synopsys DesignWare USB OTG Core -endef - -$(eval $(call KernelPackage,usb-dwc2)) - - -define KernelPackage/usb-dwc3 - TITLE:=DWC3 USB controller driver - KCONFIG:= \ - CONFIG_USB_DWC3 \ - CONFIG_USB_DWC3_HOST=y \ - CONFIG_USB_DWC3_GADGET=n \ - CONFIG_USB_DWC3_DUAL_ROLE=n \ - CONFIG_USB_DWC3_DEBUG=n \ - CONFIG_USB_DWC3_VERBOSE=n - FILES:= $(LINUX_DIR)/drivers/usb/dwc3/dwc3.ko - AUTOLOAD:=$(call AutoLoad,54,dwc3,1) - $(call AddDepends/usb) -endef - -define KernelPackage/usb-dwc3/description - This driver provides support for the Dual Role SuperSpeed - USB Controller based on the Synopsys DesignWare USB3 IP Core -endef - -$(eval $(call KernelPackage,usb-dwc3)) - - -define KernelPackage/usb-dwc3-qcom - TITLE:=DWC3 Qualcomm USB driver - DEPENDS:=@(TARGET_ipq40xx||TARGET_ipq806x||TARGET_ipq807x) +kmod-usb-dwc3 - KCONFIG:= CONFIG_USB_DWC3_QCOM - FILES:= $(LINUX_DIR)/drivers/usb/dwc3/dwc3-qcom.ko - AUTOLOAD:=$(call AutoLoad,53,dwc3-qcom,1) - $(call AddDepends/usb) -endef - -define KernelPackage/usb-dwc3-qcom/description - Some Qualcomm SoCs use DesignWare Core IP for USB2/3 functionality. - This driver also handles Qscratch wrapper which is needed for - peripheral mode support. -endef - - -$(eval $(call KernelPackage,usb-dwc3-qcom)) - - -define KernelPackage/usb-acm - TITLE:=Support for modems/isdn controllers - KCONFIG:=CONFIG_USB_ACM - FILES:=$(LINUX_DIR)/drivers/usb/class/cdc-acm.ko - AUTOLOAD:=$(call AutoProbe,cdc-acm) -$(call AddDepends/usb) -endef - -define KernelPackage/usb-acm/description - Kernel support for USB ACM devices (modems/isdn controllers) -endef - -$(eval $(call KernelPackage,usb-acm)) - - -define KernelPackage/usb-wdm - TITLE:=USB Wireless Device Management - KCONFIG:=CONFIG_USB_WDM - FILES:=$(LINUX_DIR)/drivers/usb/class/cdc-wdm.ko - AUTOLOAD:=$(call AutoProbe,cdc-wdm) -$(call AddDepends/usb) -$(call AddDepends/usb-net) -endef - -define KernelPackage/usb-wdm/description - USB Wireless Device Management support -endef - -$(eval $(call KernelPackage,usb-wdm)) - - -define KernelPackage/usb-audio - TITLE:=Support for USB audio devices - KCONFIG:= \ - CONFIG_USB_AUDIO \ - CONFIG_SND_USB=y \ - CONFIG_SND_USB_AUDIO - $(call AddDepends/usb) - $(call AddDepends/sound) - FILES:= \ - $(LINUX_DIR)/sound/usb/snd-usbmidi-lib.ko \ - $(LINUX_DIR)/sound/usb/snd-usb-audio.ko - AUTOLOAD:=$(call AutoProbe,snd-usbmidi-lib snd-usb-audio) -endef - -define KernelPackage/usb-audio/description - Kernel support for USB audio devices -endef - -$(eval $(call KernelPackage,usb-audio)) - - -define KernelPackage/usb-printer - TITLE:=Support for printers - KCONFIG:=CONFIG_USB_PRINTER - FILES:=$(LINUX_DIR)/drivers/usb/class/usblp.ko - AUTOLOAD:=$(call AutoProbe,usblp) - $(call AddDepends/usb) -endef - -define KernelPackage/usb-printer/description - Kernel support for USB printers -endef - -$(eval $(call KernelPackage,usb-printer)) - - -define KernelPackage/usb-serial - TITLE:=Support for USB-to-Serial converters - KCONFIG:=CONFIG_USB_SERIAL - FILES:=$(LINUX_DIR)/drivers/usb/serial/usbserial.ko - AUTOLOAD:=$(call AutoProbe,usbserial) - $(call AddDepends/usb) -endef - -define KernelPackage/usb-serial/description - Kernel support for USB-to-Serial converters -endef - -$(eval $(call KernelPackage,usb-serial)) - - -define AddDepends/usb-serial - SUBMENU:=$(USB_MENU) - DEPENDS+=+kmod-usb-serial $(1) -endef - - -define KernelPackage/usb-serial-belkin - TITLE:=Support for Belkin devices - KCONFIG:=CONFIG_USB_SERIAL_BELKIN - FILES:=$(LINUX_DIR)/drivers/usb/serial/belkin_sa.ko - AUTOLOAD:=$(call AutoProbe,belkin_sa) - $(call AddDepends/usb-serial) -endef - -define KernelPackage/usb-serial-belkin/description - Kernel support for Belkin USB-to-Serial converters -endef - -$(eval $(call KernelPackage,usb-serial-belkin)) - - -define KernelPackage/usb-serial-ch341 - TITLE:=Support for CH341 devices - KCONFIG:=CONFIG_USB_SERIAL_CH341 - FILES:=$(LINUX_DIR)/drivers/usb/serial/ch341.ko - AUTOLOAD:=$(call AutoProbe,ch341) - $(call AddDepends/usb-serial) -endef - -define KernelPackage/usb-serial-ch341/description - Kernel support for Winchiphead CH341 USB-to-Serial converters -endef - -$(eval $(call KernelPackage,usb-serial-ch341)) - - -define KernelPackage/usb-serial-edgeport - TITLE:=Support for Digi Edgeport devices - KCONFIG:=CONFIG_USB_SERIAL_EDGEPORT - FILES:=$(LINUX_DIR)/drivers/usb/serial/io_edgeport.ko - AUTOLOAD:=$(call AutoProbe,io_edgeport) - $(call AddDepends/usb-serial) - DEPENDS+=+edgeport-firmware -endef - -define KernelPackage/usb-serial-edgeport/description - Kernel support for Inside Out Networks (Digi) - Edgeport/4 - Rapidport/4 - Edgeport/4t - Edgeport/2 - Edgeport/4i - Edgeport/2i - Edgeport/421 - Edgeport/21 - Edgeport/8 - Edgeport/8 Dual - Edgeport/2D8 - Edgeport/4D8 - Edgeport/8i - Edgeport/2 DIN - Edgeport/4 DIN - Edgeport/16 Dual -endef - -$(eval $(call KernelPackage,usb-serial-edgeport)) - - -define KernelPackage/usb-serial-ftdi - TITLE:=Support for FTDI devices - KCONFIG:=CONFIG_USB_SERIAL_FTDI_SIO - FILES:=$(LINUX_DIR)/drivers/usb/serial/ftdi_sio.ko - AUTOLOAD:=$(call AutoProbe,ftdi_sio) - $(call AddDepends/usb-serial) -endef - -define KernelPackage/usb-serial-ftdi/description - Kernel support for FTDI USB-to-Serial converters -endef - -$(eval $(call KernelPackage,usb-serial-ftdi)) - - -define KernelPackage/usb-serial-garmin - TITLE:=Support for Garmin GPS devices - KCONFIG:=CONFIG_USB_SERIAL_GARMIN - FILES:=$(LINUX_DIR)/drivers/usb/serial/garmin_gps.ko - AUTOLOAD:=$(call AutoProbe,garmin_gps) - $(call AddDepends/usb-serial) -endef - -define KernelPackage/usb-serial-garmin/description - Should work with most Garmin GPS devices which have a native USB port. -endef - -$(eval $(call KernelPackage,usb-serial-garmin)) - - -define KernelPackage/usb-serial-simple - TITLE:=USB Serial Simple (Motorola phone) - KCONFIG:=CONFIG_USB_SERIAL_SIMPLE - FILES:=$(LINUX_DIR)/drivers/usb/serial/usb-serial-simple.ko - AUTOLOAD:=$(call AutoProbe,usb-serial-simple) - $(call AddDepends/usb-serial) -endef - -define KernelPackage/usb-serial-simple/description - Kernel support for "very simple devices". - -Specifically, it supports: - - Suunto ANT+ USB device. - - Medtronic CareLink USB device (3.18) - - Fundamental Software dongle. - - Google USB serial devices (3.19) - - HP4x calculators - - a number of Motorola phones - - Novatel Wireless GPS receivers (3.18) - - Siemens USB/MPI adapter. - - ViVOtech ViVOpay USB device. - - Infineon Modem Flashloader USB interface - - ZIO Motherboard USB serial interface -endef - -$(eval $(call KernelPackage,usb-serial-simple)) - - -define KernelPackage/usb-serial-ti-usb - TITLE:=Support for TI USB 3410/5052 - KCONFIG:=CONFIG_USB_SERIAL_TI - FILES:=$(LINUX_DIR)/drivers/usb/serial/ti_usb_3410_5052.ko - AUTOLOAD:=$(call AutoProbe,ti_usb_3410_5052) - $(call AddDepends/usb-serial) -endef - -define KernelPackage/usb-serial-ti-usb/description - Kernel support for TI USB 3410/5052 devices -endef - -$(eval $(call KernelPackage,usb-serial-ti-usb)) - - -define KernelPackage/usb-serial-ipw - TITLE:=Support for IPWireless 3G devices - KCONFIG:=CONFIG_USB_SERIAL_IPW - FILES:=$(LINUX_DIR)/drivers/usb/serial/ipw.ko - AUTOLOAD:=$(call AutoProbe,ipw) - $(call AddDepends/usb-serial,+kmod-usb-serial-wwan) -endef - -$(eval $(call KernelPackage,usb-serial-ipw)) - - -define KernelPackage/usb-serial-mct - TITLE:=Support for Magic Control Tech. devices - KCONFIG:=CONFIG_USB_SERIAL_MCT_U232 - FILES:=$(LINUX_DIR)/drivers/usb/serial/mct_u232.ko - AUTOLOAD:=$(call AutoProbe,mct_u232) - $(call AddDepends/usb-serial) -endef - -define KernelPackage/usb-serial-mct/description - Kernel support for Magic Control Technology USB-to-Serial converters -endef - -$(eval $(call KernelPackage,usb-serial-mct)) - - -define KernelPackage/usb-serial-mos7720 - TITLE:=Support for Moschip MOS7720 devices - KCONFIG:=CONFIG_USB_SERIAL_MOS7720 - FILES:=$(LINUX_DIR)/drivers/usb/serial/mos7720.ko - AUTOLOAD:=$(call AutoProbe,mos7720) - $(call AddDepends/usb-serial) -endef - -define KernelPackage/usb-serial-mos7720/description - Kernel support for Moschip MOS7720 USB-to-Serial converters -endef - -$(eval $(call KernelPackage,usb-serial-mos7720)) - - -define KernelPackage/usb-serial-mos7840 - TITLE:=Support for Moschip MOS7840 devices - KCONFIG:=CONFIG_USB_SERIAL_MOS7840 - FILES:=$(LINUX_DIR)/drivers/usb/serial/mos7840.ko - AUTOLOAD:=$(call AutoProbe,mos7840) - $(call AddDepends/usb-serial) -endef - -define KernelPackage/usb-serial-mos7840/description - Kernel support for Moschip MOS7840 USB-to-Serial converters -endef - -$(eval $(call KernelPackage,usb-serial-mos7840)) - - -define KernelPackage/usb-serial-pl2303 - TITLE:=Support for Prolific PL2303 devices - KCONFIG:=CONFIG_USB_SERIAL_PL2303 - FILES:=$(LINUX_DIR)/drivers/usb/serial/pl2303.ko - AUTOLOAD:=$(call AutoProbe,pl2303) - $(call AddDepends/usb-serial) -endef - -define KernelPackage/usb-serial-pl2303/description - Kernel support for Prolific PL2303 USB-to-Serial converters -endef - -$(eval $(call KernelPackage,usb-serial-pl2303)) - - -define KernelPackage/usb-serial-cp210x - TITLE:=Support for Silicon Labs cp210x devices - KCONFIG:=CONFIG_USB_SERIAL_CP210X - FILES:=$(LINUX_DIR)/drivers/usb/serial/cp210x.ko - AUTOLOAD:=$(call AutoProbe,cp210x) - $(call AddDepends/usb-serial) -endef - -define KernelPackage/usb-serial-cp210x/description - Kernel support for Silicon Labs cp210x USB-to-Serial converters -endef - -$(eval $(call KernelPackage,usb-serial-cp210x)) - - -define KernelPackage/usb-serial-ark3116 - TITLE:=Support for ArkMicroChips ARK3116 devices - KCONFIG:=CONFIG_USB_SERIAL_ARK3116 - FILES:=$(LINUX_DIR)/drivers/usb/serial/ark3116.ko - AUTOLOAD:=$(call AutoProbe,ark3116) - $(call AddDepends/usb-serial) -endef - -define KernelPackage/usb-serial-ark3116/description - Kernel support for ArkMicroChips ARK3116 USB-to-Serial converters -endef - -$(eval $(call KernelPackage,usb-serial-ark3116)) - - -define KernelPackage/usb-serial-oti6858 - TITLE:=Support for Ours Technology OTI6858 devices - KCONFIG:=CONFIG_USB_SERIAL_OTI6858 - FILES:=$(LINUX_DIR)/drivers/usb/serial/oti6858.ko - AUTOLOAD:=$(call AutoProbe,oti6858) - $(call AddDepends/usb-serial) -endef - -define KernelPackage/usb-serial-oti6858/description - Kernel support for Ours Technology OTI6858 USB-to-Serial converters -endef - -$(eval $(call KernelPackage,usb-serial-oti6858)) - - -define KernelPackage/usb-serial-sierrawireless - TITLE:=Support for Sierra Wireless devices - KCONFIG:=CONFIG_USB_SERIAL_SIERRAWIRELESS - FILES:=$(LINUX_DIR)/drivers/usb/serial/sierra.ko - AUTOLOAD:=$(call AutoProbe,sierra) - $(call AddDepends/usb-serial) -endef - -define KernelPackage/usb-serial-sierrawireless/description - Kernel support for Sierra Wireless devices -endef - -$(eval $(call KernelPackage,usb-serial-sierrawireless)) - - -define KernelPackage/usb-serial-visor - TITLE:=Support for Handspring Visor devices - KCONFIG:=CONFIG_USB_SERIAL_VISOR - FILES:=$(LINUX_DIR)/drivers/usb/serial/visor.ko - AUTOLOAD:=$(call AutoProbe,visor) - $(call AddDepends/usb-serial) -endef - -define KernelPackage/usb-serial-visor/description - Kernel support for Handspring Visor PDAs -endef - -$(eval $(call KernelPackage,usb-serial-visor)) - - -define KernelPackage/usb-serial-cypress-m8 - TITLE:=Support for CypressM8 USB-Serial - KCONFIG:=CONFIG_USB_SERIAL_CYPRESS_M8 - FILES:=$(LINUX_DIR)/drivers/usb/serial/cypress_m8.ko - AUTOLOAD:=$(call AutoProbe,cypress_m8) - $(call AddDepends/usb-serial) -endef - -define KernelPackage/usb-serial-cypress-m8/description - Kernel support for devices with Cypress M8 USB to Serial chip - (for example, the Delorme Earthmate LT-20 GPS) - Supported microcontrollers in the CY4601 family are: - CY7C63741 CY7C63742 CY7C63743 CY7C64013 -endef - -$(eval $(call KernelPackage,usb-serial-cypress-m8)) - - -define KernelPackage/usb-serial-keyspan - TITLE:=Support for Keyspan USB-to-Serial devices - KCONFIG:= \ - CONFIG_USB_SERIAL_KEYSPAN \ - CONFIG_USB_SERIAL_KEYSPAN_USA28 \ - CONFIG_USB_SERIAL_KEYSPAN_USA28X \ - CONFIG_USB_SERIAL_KEYSPAN_USA28XA \ - CONFIG_USB_SERIAL_KEYSPAN_USA28XB \ - CONFIG_USB_SERIAL_KEYSPAN_USA19 \ - CONFIG_USB_SERIAL_KEYSPAN_USA18X \ - CONFIG_USB_SERIAL_KEYSPAN_USA19W \ - CONFIG_USB_SERIAL_KEYSPAN_USA19QW \ - CONFIG_USB_SERIAL_KEYSPAN_USA19QI \ - CONFIG_USB_SERIAL_KEYSPAN_MPR \ - CONFIG_USB_SERIAL_KEYSPAN_USA49W \ - CONFIG_USB_SERIAL_KEYSPAN_USA49WLC - FILES:= \ - $(LINUX_DIR)/drivers/usb/serial/keyspan.ko \ - $(wildcard $(LINUX_DIR)/drivers/usb/misc/ezusb.ko) - AUTOLOAD:=$(call AutoProbe,ezusb keyspan) - $(call AddDepends/usb-serial) -endef - -define KernelPackage/usb-serial-keyspan/description - Kernel support for Keyspan USB-to-Serial devices -endef - -$(eval $(call KernelPackage,usb-serial-keyspan)) - - -define KernelPackage/usb-serial-wwan - TITLE:=Support for GSM and CDMA modems - KCONFIG:=CONFIG_USB_SERIAL_WWAN - FILES:=$(LINUX_DIR)/drivers/usb/serial/usb_wwan.ko - HIDDEN:=1 - AUTOLOAD:=$(call AutoProbe,usb_wwan) - $(call AddDepends/usb-serial) -endef - -define KernelPackage/usb-serial-wwan/description - Kernel support for USB GSM and CDMA modems -endef - -$(eval $(call KernelPackage,usb-serial-wwan)) - - -define KernelPackage/usb-serial-option - TITLE:=Support for Option HSDPA modems - KCONFIG:=CONFIG_USB_SERIAL_OPTION - FILES:=$(LINUX_DIR)/drivers/usb/serial/option.ko - AUTOLOAD:=$(call AutoProbe,option) - $(call AddDepends/usb-serial,+kmod-usb-serial-wwan) -endef - -define KernelPackage/usb-serial-option/description - Kernel support for Option HSDPA modems -endef - -$(eval $(call KernelPackage,usb-serial-option)) - - -define KernelPackage/usb-serial-qualcomm - TITLE:=Support for Qualcomm USB serial - KCONFIG:=CONFIG_USB_SERIAL_QUALCOMM - FILES:=$(LINUX_DIR)/drivers/usb/serial/qcserial.ko - AUTOLOAD:=$(call AutoProbe,qcserial) - $(call AddDepends/usb-serial,+kmod-usb-serial-wwan) -endef - -define KernelPackage/usb-serial-qualcomm/description - Kernel support for Qualcomm USB Serial devices (Gobi) -endef - -$(eval $(call KernelPackage,usb-serial-qualcomm)) - - -define KernelPackage/usb-storage - TITLE:=USB Storage support - DEPENDS:= +kmod-scsi-core - KCONFIG:=CONFIG_USB_STORAGE - FILES:=$(LINUX_DIR)/drivers/usb/storage/usb-storage.ko - AUTOLOAD:=$(call AutoProbe,usb-storage,1) - $(call AddDepends/usb) -endef - -define KernelPackage/usb-storage/description - Kernel support for USB Mass Storage devices -endef - -$(eval $(call KernelPackage,usb-storage)) - - -define KernelPackage/usb-storage-extras - SUBMENU:=$(USB_MENU) - TITLE:=Extra drivers for usb-storage - DEPENDS:=+kmod-usb-storage - KCONFIG:= \ - CONFIG_USB_STORAGE_ALAUDA \ - CONFIG_USB_STORAGE_CYPRESS_ATACB \ - CONFIG_USB_STORAGE_DATAFAB \ - CONFIG_USB_STORAGE_FREECOM \ - CONFIG_USB_STORAGE_ISD200 \ - CONFIG_USB_STORAGE_JUMPSHOT \ - CONFIG_USB_STORAGE_KARMA \ - CONFIG_USB_STORAGE_SDDR09 \ - CONFIG_USB_STORAGE_SDDR55 \ - CONFIG_USB_STORAGE_USBAT - FILES:= \ - $(LINUX_DIR)/drivers/usb/storage/ums-alauda.ko \ - $(LINUX_DIR)/drivers/usb/storage/ums-cypress.ko \ - $(LINUX_DIR)/drivers/usb/storage/ums-datafab.ko \ - $(LINUX_DIR)/drivers/usb/storage/ums-freecom.ko \ - $(LINUX_DIR)/drivers/usb/storage/ums-isd200.ko \ - $(LINUX_DIR)/drivers/usb/storage/ums-jumpshot.ko \ - $(LINUX_DIR)/drivers/usb/storage/ums-karma.ko \ - $(LINUX_DIR)/drivers/usb/storage/ums-sddr09.ko \ - $(LINUX_DIR)/drivers/usb/storage/ums-sddr55.ko \ - $(LINUX_DIR)/drivers/usb/storage/ums-usbat.ko - AUTOLOAD:=$(call AutoProbe,ums-alauda ums-cypress ums-datafab \ - ums-freecom ums-isd200 ums-jumpshot \ - ums-karma ums-sddr09 ums-sddr55 ums-usbat) -endef - -define KernelPackage/usb-storage-extras/description - Say Y here if you want to have some more drivers, - such as for SmartMedia card readers -endef - -$(eval $(call KernelPackage,usb-storage-extras)) - - -define KernelPackage/usb-storage-uas - SUBMENU:=$(USB_MENU) - TITLE:=USB Attached SCSI (UASP) support - DEPENDS:=+kmod-usb-storage - KCONFIG:=CONFIG_USB_UAS - FILES:=$(LINUX_DIR)/drivers/usb/storage/uas.ko - AUTOLOAD:=$(call AutoProbe,uas,1) -endef - -define KernelPackage/usb-storage-uas/description - Say Y here if you want to include support for - USB Attached SCSI (UAS/UASP), a higher - performance protocol available on many - newer USB 3.0 storage devices -endef - -$(eval $(call KernelPackage,usb-storage-uas)) - - -define KernelPackage/usb-atm - TITLE:=Support for ATM on USB bus - DEPENDS:=+kmod-atm - KCONFIG:=CONFIG_USB_ATM - FILES:=$(LINUX_DIR)/drivers/usb/atm/usbatm.ko - AUTOLOAD:=$(call AutoProbe,usbatm) - $(call AddDepends/usb) -endef - -define KernelPackage/usb-atm/description - Kernel support for USB DSL modems -endef - -$(eval $(call KernelPackage,usb-atm)) - - -define AddDepends/usb-atm - SUBMENU:=$(USB_MENU) - DEPENDS+=kmod-usb-atm $(1) -endef - - -define KernelPackage/usb-atm-speedtouch - TITLE:=SpeedTouch USB ADSL modems support - KCONFIG:=CONFIG_USB_SPEEDTOUCH - FILES:=$(LINUX_DIR)/drivers/usb/atm/speedtch.ko - AUTOLOAD:=$(call AutoProbe,speedtch) - $(call AddDepends/usb-atm) -endef - -define KernelPackage/usb-atm-speedtouch/description - Kernel support for SpeedTouch USB ADSL modems -endef - -$(eval $(call KernelPackage,usb-atm-speedtouch)) - - -define KernelPackage/usb-atm-ueagle - TITLE:=Eagle 8051 based USB ADSL modems support - FILES:=$(LINUX_DIR)/drivers/usb/atm/ueagle-atm.ko - KCONFIG:=CONFIG_USB_UEAGLEATM - AUTOLOAD:=$(call AutoProbe,ueagle-atm) - $(call AddDepends/usb-atm) -endef - -define KernelPackage/usb-atm-ueagle/description - Kernel support for Eagle 8051 based USB ADSL modems -endef - -$(eval $(call KernelPackage,usb-atm-ueagle)) - - -define KernelPackage/usb-atm-cxacru - TITLE:=cxacru - FILES:=$(LINUX_DIR)/drivers/usb/atm/cxacru.ko - KCONFIG:=CONFIG_USB_CXACRU - AUTOLOAD:=$(call AutoProbe,cxacru) - $(call AddDepends/usb-atm) -endef - -define KernelPackage/usb-atm-cxacru/description - Kernel support for cxacru based USB ADSL modems -endef - -$(eval $(call KernelPackage,usb-atm-cxacru)) - - -define KernelPackage/usb-net - TITLE:=Kernel modules for USB-to-Ethernet convertors - DEPENDS:=+kmod-mii - KCONFIG:=CONFIG_USB_USBNET \ - CONFIG_USB_NET_DRIVERS - AUTOLOAD:=$(call AutoProbe,usbnet) - FILES:=$(LINUX_DIR)/drivers/$(USBNET_DIR)/usbnet.ko - $(call AddDepends/usb) -endef - -define KernelPackage/usb-net/description - Kernel modules for USB-to-Ethernet convertors -endef - -$(eval $(call KernelPackage,usb-net)) - - -define AddDepends/usb-net - SUBMENU:=$(USB_MENU) - DEPENDS+=+kmod-usb-net $(1) -endef - - -define KernelPackage/usb-net-aqc111 - TITLE:=Support for USB-to-Ethernet Aquantia AQtion 5/2.5GbE - KCONFIG:=CONFIG_USB_NET_AQC111 - FILES:=$(LINUX_DIR)/drivers/$(USBNET_DIR)/aqc111.ko - AUTOLOAD:=$(call AutoProbe,aqc111) - $(call AddDepends/usb-net) -endef - -define KernelPackage/usb-net-aqc111/description - Support for USB-to-Ethernet Aquantia AQtion 5/2.5GbE -endef - -$(eval $(call KernelPackage,usb-net-aqc111)) - - -define KernelPackage/usb-net-asix - TITLE:=Kernel module for USB-to-Ethernet Asix convertors - DEPENDS:=+kmod-libphy - KCONFIG:=CONFIG_USB_NET_AX8817X - FILES:=$(LINUX_DIR)/drivers/$(USBNET_DIR)/asix.ko - AUTOLOAD:=$(call AutoProbe,asix) - $(call AddDepends/usb-net) -endef - -define KernelPackage/usb-net-asix/description - Kernel module for USB-to-Ethernet Asix convertors -endef - -$(eval $(call KernelPackage,usb-net-asix)) - - -define KernelPackage/usb-net-asix-ax88179 - TITLE:=Kernel module for USB-to-Gigabit-Ethernet Asix convertors - DEPENDS:=+kmod-libphy - KCONFIG:=CONFIG_USB_NET_AX88179_178A - FILES:=$(LINUX_DIR)/drivers/$(USBNET_DIR)/ax88179_178a.ko - AUTOLOAD:=$(call AutoProbe,ax88179_178a) - $(call AddDepends/usb-net) -endef - -define KernelPackage/usb-net-asix-ax88179/description - Kernel module for USB-to-Ethernet ASIX AX88179 based USB 3.0/2.0 - to Gigabit Ethernet adapters. -endef - -$(eval $(call KernelPackage,usb-net-asix-ax88179)) - - -define KernelPackage/usb-net-hso - TITLE:=Kernel module for Option USB High Speed Mobile Devices - KCONFIG:=CONFIG_USB_HSO - FILES:= \ - $(LINUX_DIR)/drivers/$(USBNET_DIR)/hso.ko - AUTOLOAD:=$(call AutoProbe,hso) - $(call AddDepends/usb-net) - $(call AddDepends/rfkill) -endef - -define KernelPackage/usb-net-hso/description - Kernel module for Option USB High Speed Mobile Devices -endef - -$(eval $(call KernelPackage,usb-net-hso)) - - -define KernelPackage/usb-net-kaweth - TITLE:=Kernel module for USB-to-Ethernet Kaweth convertors - KCONFIG:=CONFIG_USB_KAWETH - FILES:=$(LINUX_DIR)/drivers/$(USBNET_DIR)/kaweth.ko - AUTOLOAD:=$(call AutoProbe,kaweth) - $(call AddDepends/usb-net) -endef - -define KernelPackage/usb-net-kaweth/description - Kernel module for USB-to-Ethernet Kaweth convertors -endef - -$(eval $(call KernelPackage,usb-net-kaweth)) - - -define KernelPackage/usb-net-pegasus - TITLE:=Kernel module for USB-to-Ethernet Pegasus convertors - KCONFIG:=CONFIG_USB_PEGASUS - FILES:=$(LINUX_DIR)/drivers/$(USBNET_DIR)/pegasus.ko - AUTOLOAD:=$(call AutoProbe,pegasus) - $(call AddDepends/usb-net) -endef - -define KernelPackage/usb-net-pegasus/description - Kernel module for USB-to-Ethernet Pegasus convertors -endef - -$(eval $(call KernelPackage,usb-net-pegasus)) - - -define KernelPackage/usb-net-mcs7830 - TITLE:=Kernel module for USB-to-Ethernet MCS7830 convertors - KCONFIG:=CONFIG_USB_NET_MCS7830 - FILES:=$(LINUX_DIR)/drivers/$(USBNET_DIR)/mcs7830.ko - AUTOLOAD:=$(call AutoProbe,mcs7830) - $(call AddDepends/usb-net) -endef - -define KernelPackage/usb-net-mcs7830/description - Kernel module for USB-to-Ethernet MCS7830 convertors -endef - -$(eval $(call KernelPackage,usb-net-mcs7830)) - - -define KernelPackage/usb-net-smsc75xx - TITLE:=SMSC LAN75XX based USB 2.0 Gigabit ethernet devices - DEPENDS:=+!LINUX_5_4:kmod-libphy - KCONFIG:=CONFIG_USB_NET_SMSC75XX - FILES:=$(LINUX_DIR)/drivers/$(USBNET_DIR)/smsc75xx.ko - AUTOLOAD:=$(call AutoProbe,smsc75xx) - $(call AddDepends/usb-net, +kmod-lib-crc16) -endef - -define KernelPackage/usb-net-smsc75xx/description - Kernel module for SMSC LAN75XX based devices -endef - -$(eval $(call KernelPackage,usb-net-smsc75xx)) - - -define KernelPackage/usb-net-smsc95xx - TITLE:=SMSC LAN95XX based USB 2.0 10/100 ethernet devices - DEPENDS:=+LINUX_5_10:kmod-libphy - KCONFIG:=CONFIG_USB_NET_SMSC95XX - FILES:=$(LINUX_DIR)/drivers/$(USBNET_DIR)/smsc95xx.ko - AUTOLOAD:=$(call AutoProbe,smsc95xx) - $(call AddDepends/usb-net, +kmod-lib-crc16) -endef - -define KernelPackage/usb-net-smsc95xx/description - Kernel module for SMSC LAN95XX based devices -endef - -$(eval $(call KernelPackage,usb-net-smsc95xx)) - - -define KernelPackage/usb-net-dm9601-ether - TITLE:=Support for DM9601 ethernet connections - KCONFIG:=CONFIG_USB_NET_DM9601 - FILES:=$(LINUX_DIR)/drivers/$(USBNET_DIR)/dm9601.ko - AUTOLOAD:=$(call AutoProbe,dm9601) - $(call AddDepends/usb-net) -endef - -define KernelPackage/usb-net-dm9601-ether/description - Kernel support for USB DM9601 devices -endef - -$(eval $(call KernelPackage,usb-net-dm9601-ether)) - -define KernelPackage/usb-net-cdc-ether - TITLE:=Support for cdc ethernet connections - KCONFIG:=CONFIG_USB_NET_CDCETHER - FILES:=$(LINUX_DIR)/drivers/$(USBNET_DIR)/cdc_ether.ko - AUTOLOAD:=$(call AutoProbe,cdc_ether) - $(call AddDepends/usb-net) -endef - -define KernelPackage/usb-net-cdc-ether/description - Kernel support for USB CDC Ethernet devices -endef - -$(eval $(call KernelPackage,usb-net-cdc-ether)) - - -define KernelPackage/usb-net-cdc-eem - TITLE:=Support for CDC EEM connections - KCONFIG:=CONFIG_USB_NET_CDC_EEM - FILES:=$(LINUX_DIR)/drivers/$(USBNET_DIR)/cdc_eem.ko - AUTOLOAD:=$(call AutoProbe,cdc_eem) - $(call AddDepends/usb-net) -endef - -define KernelPackage/usb-net-cdc-eem/description - Kernel support for USB CDC EEM -endef - -$(eval $(call KernelPackage,usb-net-cdc-eem)) - - -define KernelPackage/usb-net-cdc-subset - TITLE:=Support for CDC Ethernet subset connections - KCONFIG:= \ - CONFIG_USB_NET_CDC_SUBSET \ - CONFIG_USB_ARMLINUX - FILES:=$(LINUX_DIR)/drivers/$(USBNET_DIR)/cdc_subset.ko - AUTOLOAD:=$(call AutoProbe,cdc_subset) - $(call AddDepends/usb-net) -endef - -define KernelPackage/usb-net-cdc-subset/description - Kernel support for Simple USB Network Links (CDC Ethernet subset) -endef - -$(eval $(call KernelPackage,usb-net-cdc-subset)) - - -define KernelPackage/usb-net-qmi-wwan - TITLE:=QMI WWAN driver - KCONFIG:=CONFIG_USB_NET_QMI_WWAN - FILES:= $(LINUX_DIR)/drivers/$(USBNET_DIR)/qmi_wwan.ko - AUTOLOAD:=$(call AutoProbe,qmi_wwan) - $(call AddDepends/usb-net,+kmod-usb-wdm) -endef - -define KernelPackage/usb-net-qmi-wwan/description - QMI WWAN driver for Qualcomm MSM based 3G and LTE modems -endef - -$(eval $(call KernelPackage,usb-net-qmi-wwan)) - - -define KernelPackage/usb-net-rtl8150 - TITLE:=Kernel module for USB-to-Ethernet Realtek convertors - KCONFIG:=CONFIG_USB_RTL8150 - FILES:=$(LINUX_DIR)/drivers/$(USBNET_DIR)/rtl8150.ko - AUTOLOAD:=$(call AutoProbe,rtl8150) - $(call AddDepends/usb-net) -endef - -define KernelPackage/usb-net-rtl8150/description - Kernel module for USB-to-Ethernet Realtek 8150 convertors -endef - -$(eval $(call KernelPackage,usb-net-rtl8150)) - - -define KernelPackage/usb-net-rtl8152 - TITLE:=Kernel module for USB-to-Ethernet Realtek convertors - KCONFIG:=CONFIG_USB_RTL8152 - FILES:=$(LINUX_DIR)/drivers/$(USBNET_DIR)/r8152.ko - AUTOLOAD:=$(call AutoProbe,r8152) - $(call AddDepends/usb-net, +LINUX_5_10:kmod-crypto-hash) -endef - -define KernelPackage/usb-net-rtl8152/description - Kernel module for USB-to-Ethernet Realtek 8152 USB2.0/3.0 convertors -endef - -$(eval $(call KernelPackage,usb-net-rtl8152)) - - -define KernelPackage/usb-net-sr9700 - TITLE:=Support for CoreChip SR9700 ethernet devices - KCONFIG:=CONFIG_USB_NET_SR9700 - FILES:=$(LINUX_DIR)/drivers/$(USBNET_DIR)/sr9700.ko - AUTOLOAD:=$(call AutoProbe,sr9700) - $(call AddDepends/usb-net) -endef - -define KernelPackage/usb-net-sr9700/description - Kernel module for CoreChip-sz SR9700 based USB 1.1 10/100 ethernet devices -endef - -$(eval $(call KernelPackage,usb-net-sr9700)) - - -define KernelPackage/usb-net-rndis - TITLE:=Support for RNDIS connections - KCONFIG:=CONFIG_USB_NET_RNDIS_HOST - FILES:= $(LINUX_DIR)/drivers/$(USBNET_DIR)/rndis_host.ko - AUTOLOAD:=$(call AutoProbe,rndis_host) - $(call AddDepends/usb-net,+kmod-usb-net-cdc-ether) -endef - -define KernelPackage/usb-net-rndis/description - Kernel support for RNDIS connections -endef - -$(eval $(call KernelPackage,usb-net-rndis)) - - -define KernelPackage/usb-net-cdc-mbim - SUBMENU:=$(USB_MENU) - TITLE:=Kernel module for MBIM Devices - KCONFIG:=CONFIG_USB_NET_CDC_MBIM - FILES:= \ - $(LINUX_DIR)/drivers/$(USBNET_DIR)/cdc_mbim.ko - AUTOLOAD:=$(call AutoProbe,cdc_mbim) - $(call AddDepends/usb-net,+kmod-usb-wdm +kmod-usb-net-cdc-ncm) -endef - -define KernelPackage/usb-net-cdc-mbim/description - Kernel module for CDC MBIM (Mobile Broadband Interface Model) devices -endef - -$(eval $(call KernelPackage,usb-net-cdc-mbim)) - - -define KernelPackage/usb-net-cdc-ncm - TITLE:=Support for CDC NCM connections - KCONFIG:=CONFIG_USB_NET_CDC_NCM - FILES:= $(LINUX_DIR)/drivers/$(USBNET_DIR)/cdc_ncm.ko - AUTOLOAD:=$(call AutoProbe,cdc_ncm) - $(call AddDepends/usb-net,+!LINUX_5_4:kmod-usb-net-cdc-ether) -endef - -define KernelPackage/usb-net-cdc-ncm/description - Kernel support for CDC NCM connections -endef - -$(eval $(call KernelPackage,usb-net-cdc-ncm)) - - -define KernelPackage/usb-net-huawei-cdc-ncm - TITLE:=Support for Huawei CDC NCM connections - KCONFIG:=CONFIG_USB_NET_HUAWEI_CDC_NCM - FILES:= $(LINUX_DIR)/drivers/$(USBNET_DIR)/huawei_cdc_ncm.ko - AUTOLOAD:=$(call AutoProbe,huawei_cdc_ncm) - $(call AddDepends/usb-net,+kmod-usb-net-cdc-ncm +kmod-usb-wdm) -endef - -define KernelPackage/usb-net-huawei-cdc-ncm/description - Kernel support for Huawei CDC NCM connections -endef - -$(eval $(call KernelPackage,usb-net-huawei-cdc-ncm)) - - -define KernelPackage/usb-net-sierrawireless - TITLE:=Support for Sierra Wireless devices - KCONFIG:=CONFIG_USB_SIERRA_NET - FILES:=$(LINUX_DIR)/drivers/net/usb/sierra_net.ko - AUTOLOAD:=$(call AutoProbe,sierra_net) - $(call AddDepends/usb-net) -endef - -define KernelPackage/usb-net-sierrawireless/description - Kernel support for Sierra Wireless devices -endef - -$(eval $(call KernelPackage,usb-net-sierrawireless)) - - -define KernelPackage/usb-net-ipheth - TITLE:=Apple iPhone USB Ethernet driver - KCONFIG:=CONFIG_USB_IPHETH - FILES:=$(LINUX_DIR)/drivers/net/usb/ipheth.ko - AUTOLOAD:=$(call AutoProbe,ipheth) - $(call AddDepends/usb-net) -endef - -define KernelPackage/usb-net-ipheth/description - Kernel support for Apple iPhone USB Ethernet driver -endef - -$(eval $(call KernelPackage,usb-net-ipheth)) - - -define KernelPackage/usb-net-kalmia - TITLE:=Samsung Kalmia based LTE USB modem - KCONFIG:=CONFIG_USB_NET_KALMIA - FILES:=$(LINUX_DIR)/drivers/net/usb/kalmia.ko - AUTOLOAD:=$(call AutoProbe,kalmia) - $(call AddDepends/usb-net) -endef - -define KernelPackage/usb-net-kalmia/description - Kernel support for Samsung Kalmia based LTE USB modem -endef - -$(eval $(call KernelPackage,usb-net-kalmia)) - -define KernelPackage/usb-net-pl - TITLE:=Prolific PL-2301/2302/25A1 based cables - KCONFIG:=CONFIG_USB_NET_PLUSB - FILES:=$(LINUX_DIR)/drivers/net/usb/plusb.ko - AUTOLOAD:=$(call AutoProbe,plusb) - $(call AddDepends/usb-net) -endef - -define KernelPackage/usb-net-pl/description - Kernel support for Prolific PL-2301/2302/25A1 based cables -endef - -$(eval $(call KernelPackage,usb-net-pl)) - -define KernelPackage/usb-hid - TITLE:=Support for USB Human Input Devices - KCONFIG:=CONFIG_HID_SUPPORT=y CONFIG_USB_HID CONFIG_USB_HIDDEV=y - DEPENDS:=+kmod-hid +kmod-hid-generic +kmod-input-evdev - FILES:=$(LINUX_DIR)/drivers/$(USBHID_DIR)/usbhid.ko - AUTOLOAD:=$(call AutoProbe,usbhid) - $(call AddDepends/usb) -endef - -define KernelPackage/usb-hid/description - Kernel support for USB HID devices such as keyboards and mice -endef - -$(eval $(call KernelPackage,usb-hid)) - - -define KernelPackage/usb-hid-cp2112 - SUBMENU:=$(USB_MENU) - TITLE:=Silicon Labs CP2112 HID USB to SMBus Master Bridge - KCONFIG:=CONFIG_GPIOLIB=y CONFIG_HID_CP2112 - DEPENDS:=+kmod-usb-hid +kmod-i2c-core - FILES:=$(LINUX_DIR)/drivers/hid/hid-cp2112.ko - AUTOLOAD:=$(call AutoProbe,hid-cp2112) -endef - -define KernelPackage/usb-hid-cp2112/description - HID device driver which registers as an i2c adapter and gpiochip to expose - these functions of the CP2112. -endef - -$(eval $(call KernelPackage,usb-hid-cp2112)) - - -define KernelPackage/usb-yealink - TITLE:=USB Yealink VOIP phone - DEPENDS:=+kmod-input-evdev - KCONFIG:=CONFIG_USB_YEALINK CONFIG_INPUT_YEALINK CONFIG_INPUT=m CONFIG_INPUT_MISC=y - FILES:=$(LINUX_DIR)/drivers/$(USBINPUT_DIR)/yealink.ko - AUTOLOAD:=$(call AutoProbe,yealink) - $(call AddDepends/usb) -endef - -define KernelPackage/usb-yealink/description - Kernel support for Yealink VOIP phone -endef - -$(eval $(call KernelPackage,usb-yealink)) - - -define KernelPackage/usb-cm109 - TITLE:=Support for CM109 device - DEPENDS:=+kmod-input-evdev - KCONFIG:=CONFIG_USB_CM109 CONFIG_INPUT_CM109 CONFIG_INPUT=m CONFIG_INPUT_MISC=y - FILES:=$(LINUX_DIR)/drivers/$(USBINPUT_DIR)/cm109.ko - AUTOLOAD:=$(call AutoProbe,cm109) - $(call AddDepends/usb) -endef - -define KernelPackage/usb-cm109/description - Kernel support for CM109 VOIP phone -endef - -$(eval $(call KernelPackage,usb-cm109)) - - -define KernelPackage/usb-test - TITLE:=USB Testing Driver - DEPENDS:=@DEVEL - KCONFIG:=CONFIG_USB_TEST - FILES:=$(LINUX_DIR)/drivers/usb/misc/usbtest.ko - $(call AddDepends/usb) -endef - -define KernelPackage/usb-test/description - Kernel support for testing USB Host Controller software -endef - -$(eval $(call KernelPackage,usb-test)) - - -define KernelPackage/usbip - TITLE := USB-over-IP kernel support - KCONFIG:= \ - CONFIG_USBIP_CORE \ - CONFIG_USBIP_DEBUG=n - FILES:=$(LINUX_DIR)/drivers/usb/usbip/usbip-core.ko - AUTOLOAD:=$(call AutoProbe,usbip-core) - $(call AddDepends/usb) -endef - -$(eval $(call KernelPackage,usbip)) - - -define KernelPackage/usbip-client - TITLE := USB-over-IP client driver - DEPENDS := +kmod-usbip - KCONFIG := CONFIG_USBIP_VHCI_HCD - FILES :=$(LINUX_DIR)/drivers/usb/usbip/vhci-hcd.ko - AUTOLOAD := $(call AutoProbe,vhci-hcd) - $(call AddDepends/usb) -endef - -$(eval $(call KernelPackage,usbip-client)) - - -define KernelPackage/usbip-server -$(call KernelPackage/usbip/Default) - TITLE := USB-over-IP host driver - DEPENDS := +kmod-usbip - KCONFIG := CONFIG_USBIP_HOST - FILES :=$(LINUX_DIR)/drivers/usb/usbip/usbip-host.ko - AUTOLOAD := $(call AutoProbe,usbip-host) - $(call AddDepends/usb) -endef - -$(eval $(call KernelPackage,usbip-server)) - -define KernelPackage/usb-chipidea - TITLE:=Host and device support for Chipidea controllers - DEPENDS:=+USB_GADGET_SUPPORT:kmod-usb-gadget @TARGET_ath79 +kmod-usb-ehci +kmod-usb-phy-nop +kmod-usb-roles - KCONFIG:= \ - CONFIG_EXTCON \ - CONFIG_USB_CHIPIDEA \ - CONFIG_USB_CHIPIDEA_GENERIC \ - CONFIG_USB_CHIPIDEA_HOST=y \ - CONFIG_USB_CHIPIDEA_UDC=y \ - CONFIG_USB_CHIPIDEA_DEBUG=y - FILES:= \ - $(LINUX_DIR)/drivers/extcon/extcon-core.ko \ - $(LINUX_DIR)/drivers/usb/chipidea/ci_hdrc.ko \ - $(LINUX_DIR)/drivers/usb/common/ulpi.ko - AUTOLOAD:=$(call AutoLoad,39,ci_hdrc,1) - $(call AddDepends/usb) -endef - -define KernelPackage/usb-chipidea/description - Kernel support for USB Chipidea controllers -endef - -$(eval $(call KernelPackage,usb-chipidea)) - - -define KernelPackage/usb-chipidea2 - TITLE:=Host and device support for Chipidea2 controllers - DEPENDS:=+kmod-usb-chipidea - KCONFIG:= \ - CONFIG_EXTCON \ - CONFIG_USB_CHIPIDEA \ - CONFIG_USB_CHIPIDEA_HOST=y \ - CONFIG_USB_CHIPIDEA_UDC=y \ - CONFIG_USB_CHIPIDEA_DEBUG=y - FILES:= \ - $(LINUX_DIR)/drivers/extcon/extcon-core.ko \ - $(LINUX_DIR)/drivers/usb/chipidea/ci_hdrc_usb2.ko - AUTOLOAD:=$(call AutoLoad,39,ci_hdrc_usb2,1) - $(call AddDepends/usb) -endef - -define KernelPackage/usb-chipidea2/description - Kernel support for USB Chipidea controllers -endef - -$(eval $(call KernelPackage,usb-chipidea2)) - - -define KernelPackage/usbmon - TITLE:=USB traffic monitor - KCONFIG:=CONFIG_USB_MON - $(call AddDepends/usb) - FILES:=$(LINUX_DIR)/drivers/usb/mon/usbmon.ko - AUTOLOAD:=$(call AutoProbe,usbmon) -endef - -define KernelPackage/usbmon/description - Kernel support for USB traffic monitoring -endef - -$(eval $(call KernelPackage,usbmon)) - -XHCI_MODULES := xhci-pci xhci-plat-hcd -XHCI_FILES := $(wildcard $(patsubst %,$(LINUX_DIR)/drivers/usb/host/%.ko,$(XHCI_MODULES))) -XHCI_AUTOLOAD := $(patsubst $(LINUX_DIR)/drivers/usb/host/%.ko,%,$(XHCI_FILES)) - -define KernelPackage/usb3 - TITLE:=Support for USB3 controllers - DEPENDS:= \ - +kmod-usb-xhci-hcd \ - +TARGET_bcm53xx:kmod-usb-bcma \ - +TARGET_bcm53xx:kmod-phy-bcm-ns-usb3 \ - +TARGET_ramips_mt7621:kmod-usb-xhci-mtk \ - +(TARGET_apm821xx_nand&&LINUX_5_10):kmod-usb-xhci-pci-renesas - KCONFIG:= \ - CONFIG_USB_PCI=y \ - CONFIG_USB_XHCI_PCI \ - CONFIG_USB_XHCI_PLATFORM - FILES:= \ - $(XHCI_FILES) - AUTOLOAD:=$(call AutoLoad,54,$(XHCI_AUTOLOAD),1) - $(call AddDepends/usb) -endef - -define KernelPackage/usb3/description - Kernel support for USB3 (XHCI) controllers -endef - -$(eval $(call KernelPackage,usb3)) - - -define KernelPackage/usb-net2280 - TITLE:=Support for NetChip 228x PCI USB peripheral controller - KCONFIG:= \ - CONFIG_USB_PCI=y \ - CONFIG_USB_NET2280 - DEPENDS:=@PCI_SUPPORT +kmod-usb-gadget - FILES:=$(LINUX_DIR)/drivers/usb/gadget/udc/net2280.ko - AUTOLOAD:=$(call AutoLoad,46,net2280) - $(call AddDepends/usb) -endef - -define KernelPackage/usb-net2280/description - Kernel support for NetChip 228x / PLX USB338x PCI USB peripheral controller. -endef - -$(eval $(call KernelPackage,usb-net2280)) - -define KernelPackage/usb-roles - TITLE:=USB Role Switch Library Module - KCONFIG:=CONFIG_USB_ROLE_SWITCH - HIDDEN:=1 - FILES:=$(LINUX_DIR)/drivers/usb/roles/roles.ko - $(call AddDepends/usb) -endef - -define KernelPackage/usb-roles/description - Support for USB Role Switch -endef - -$(eval $(call KernelPackage,usb-roles)) - - -define KernelPackage/usb-xhci-hcd - TITLE:=xHCI HCD (USB 3.0) support - KCONFIG:= \ - CONFIG_USB_XHCI_HCD \ - CONFIG_USB_XHCI_HCD_DEBUGGING=n - HIDDEN:=1 - FILES:=$(LINUX_DIR)/drivers/usb/host/xhci-hcd.ko - AUTOLOAD:=$(call AutoLoad,54,xhci-hcd,1) - $(call AddDepends/usb) -endef - -define KernelPackage/usb-xhci-hcd/description - The eXtensible Host Controller Interface (xHCI) is standard for USB 3.0 - "SuperSpeed" host controller hardware. -endef - -$(eval $(call KernelPackage,usb-xhci-hcd)) - - -define KernelPackage/usb-xhci-mtk - TITLE:=xHCI support for MediaTek SoCs - DEPENDS:=+kmod-usb-xhci-hcd - KCONFIG:=CONFIG_USB_XHCI_MTK - HIDDEN:=1 - FILES:=$(LINUX_DIR)/drivers/usb/host/xhci-mtk.ko - AUTOLOAD:=$(call AutoLoad,54,xhci-mtk,1) - $(call AddDepends/usb) -endef - -define KernelPackage/usb-xhci-mtk/description - Kernel support for the xHCI host controller found in MediaTek SoCs. -endef - -$(eval $(call KernelPackage,usb-xhci-mtk)) - - -define KernelPackage/usb-xhci-pci-renesas - TITLE:=Support for additional Renesas xHCI controller with firmware - DEPENDS:=@LINUX_5_10 - KCONFIG:=CONFIG_USB_XHCI_PCI_RENESAS - HIDDEN:=1 - FILES:=$(LINUX_DIR)/drivers/usb/host/xhci-pci-renesas.ko - AUTOLOAD:=$(call AutoLoad,54,xhci-pci-renesas,1) - $(call AddDepends/usb) -endef - -define KernelPackage/usb-xhci-pci-renesas/description - Kernel support for the Renesas xHCI controller with firmware. Make sure you have - the firwmare for the device and installed on your system for this device to work. -endef - -$(eval $(call KernelPackage,usb-xhci-pci-renesas)) - - -define KernelPackage/chaoskey - SUBMENU:=$(USB_MENU) - TITLE:=Chaoskey hardware RNG support - DEPENDS:=+kmod-random-core - KCONFIG:=CONFIG_USB_CHAOSKEY - FILES:=$(LINUX_DIR)/drivers/usb/misc/chaoskey.ko - AUTOLOAD:=$(call AutoProbe,chaoskey) - $(call AddDepends/usb) -endef - -define KernelPackage/chaoskey/description - Kernel module for chaoskey, USB attached true random number generator -endef - -$(eval $(call KernelPackage,chaoskey)) - diff --git a/root/package/kernel/linux/modules/video.mk b/root/package/kernel/linux/modules/video.mk deleted file mode 100755 index 76b0ebc9..00000000 --- a/root/package/kernel/linux/modules/video.mk +++ /dev/null @@ -1,1046 +0,0 @@ -# -# Copyright (C) 2009 David Cooper -# Copyright (C) 2006-2010 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -VIDEO_MENU:=Video Support - -V4L2_DIR=v4l2-core -V4L2_USB_DIR=usb - -# -# Video Display -# - -define KernelPackage/backlight - SUBMENU:=$(VIDEO_MENU) - TITLE:=Backlight support - DEPENDS:=@DISPLAY_SUPPORT - HIDDEN:=1 - KCONFIG:=CONFIG_BACKLIGHT_CLASS_DEVICE \ - CONFIG_BACKLIGHT_LCD_SUPPORT=y \ - CONFIG_LCD_CLASS_DEVICE=n \ - CONFIG_BACKLIGHT_GENERIC=n \ - CONFIG_BACKLIGHT_ADP8860=n \ - CONFIG_BACKLIGHT_ADP8870=n \ - CONFIG_BACKLIGHT_OT200=n \ - CONFIG_BACKLIGHT_PM8941_WLED=n - FILES:=$(LINUX_DIR)/drivers/video/backlight/backlight.ko - AUTOLOAD:=$(call AutoProbe,video backlight) -endef - -define KernelPackage/backlight/description - Kernel module for Backlight support. -endef - -$(eval $(call KernelPackage,backlight)) - -define KernelPackage/backlight-pwm - SUBMENU:=$(VIDEO_MENU) - TITLE:=PWM Backlight support - DEPENDS:=+kmod-backlight - KCONFIG:=CONFIG_BACKLIGHT_PWM - FILES:=$(LINUX_DIR)/drivers/video/backlight/pwm_bl.ko - AUTOLOAD:=$(call AutoProbe,video pwm_bl) -endef - -define KernelPackage/backlight-pwm/description - Kernel module for PWM based Backlight support. -endef - -$(eval $(call KernelPackage,backlight-pwm)) - - -define KernelPackage/fb - SUBMENU:=$(VIDEO_MENU) - TITLE:=Framebuffer and framebuffer console support - DEPENDS:=@DISPLAY_SUPPORT - KCONFIG:= \ - CONFIG_FB \ - CONFIG_FB_MXS=n \ - CONFIG_FB_SM750=n \ - CONFIG_FRAMEBUFFER_CONSOLE=y \ - CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y \ - CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y \ - CONFIG_FONTS=y \ - CONFIG_FONT_8x8=y \ - CONFIG_FONT_8x16=y \ - CONFIG_FONT_6x11=n \ - CONFIG_FONT_7x14=n \ - CONFIG_FONT_PEARL_8x8=n \ - CONFIG_FONT_ACORN_8x8=n \ - CONFIG_FONT_MINI_4x6=n \ - CONFIG_FONT_6x10=n \ - CONFIG_FONT_SUN8x16=n \ - CONFIG_FONT_SUN12x22=n \ - CONFIG_FONT_10x18=n \ - CONFIG_VT=y \ - CONFIG_CONSOLE_TRANSLATIONS=y \ - CONFIG_VT_CONSOLE=y \ - CONFIG_VT_HW_CONSOLE_BINDING=y - FILES:=$(LINUX_DIR)/drivers/video/fbdev/core/fb.ko \ - $(LINUX_DIR)/lib/fonts/font.ko - AUTOLOAD:=$(call AutoLoad,06,fb font) -endef - -define KernelPackage/fb/description - Kernel support for framebuffers and framebuffer console. -endef - -define KernelPackage/fb/x86 - FILES+=$(LINUX_DIR)/arch/x86/video/fbdev.ko - AUTOLOAD:=$(call AutoLoad,06,fbdev fb font) -endef - -$(eval $(call KernelPackage,fb)) - - -define KernelPackage/fb-cfb-fillrect - SUBMENU:=$(VIDEO_MENU) - TITLE:=Framebuffer software rectangle filling support - DEPENDS:=+kmod-fb - KCONFIG:=CONFIG_FB_CFB_FILLRECT - FILES:=$(LINUX_DIR)/drivers/video/fbdev/core/cfbfillrect.ko - AUTOLOAD:=$(call AutoLoad,07,cfbfillrect) -endef - -define KernelPackage/fb-cfb-fillrect/description - Kernel support for software rectangle filling -endef - -$(eval $(call KernelPackage,fb-cfb-fillrect)) - - -define KernelPackage/fb-cfb-copyarea - SUBMENU:=$(VIDEO_MENU) - TITLE:=Framebuffer software copy area support - DEPENDS:=+kmod-fb - KCONFIG:=CONFIG_FB_CFB_COPYAREA - FILES:=$(LINUX_DIR)/drivers/video/fbdev/core/cfbcopyarea.ko - AUTOLOAD:=$(call AutoLoad,07,cfbcopyarea) -endef - -define KernelPackage/fb-cfb-copyarea/description - Kernel support for software copy area -endef - -$(eval $(call KernelPackage,fb-cfb-copyarea)) - -define KernelPackage/fb-cfb-imgblt - SUBMENU:=$(VIDEO_MENU) - TITLE:=Framebuffer software image blit support - DEPENDS:=+kmod-fb - KCONFIG:=CONFIG_FB_CFB_IMAGEBLIT - FILES:=$(LINUX_DIR)/drivers/video/fbdev/core/cfbimgblt.ko - AUTOLOAD:=$(call AutoLoad,07,cfbimgblt) -endef - -define KernelPackage/fb-cfb-imgblt/description - Kernel support for software image blitting -endef - -$(eval $(call KernelPackage,fb-cfb-imgblt)) - - -define KernelPackage/fb-sys-fops - SUBMENU:=$(VIDEO_MENU) - TITLE:=Framebuffer software sys ops support - DEPENDS:=+kmod-fb - KCONFIG:=CONFIG_FB_SYS_FOPS - FILES:=$(LINUX_DIR)/drivers/video/fbdev/core/fb_sys_fops.ko - AUTOLOAD:=$(call AutoLoad,07,fb_sys_fops) -endef - -define KernelPackage/fb-sys-fops/description - Kernel support for framebuffer sys ops -endef - -$(eval $(call KernelPackage,fb-sys-fops)) - - -define KernelPackage/fb-sys-ram - SUBMENU:=$(VIDEO_MENU) - TITLE:=Framebuffer in system RAM support - DEPENDS:=+kmod-fb - KCONFIG:= \ - CONFIG_FB_SYS_COPYAREA \ - CONFIG_FB_SYS_FILLRECT \ - CONFIG_FB_SYS_IMAGEBLIT - FILES:= \ - $(LINUX_DIR)/drivers/video/fbdev/core/syscopyarea.ko \ - $(LINUX_DIR)/drivers/video/fbdev/core/sysfillrect.ko \ - $(LINUX_DIR)/drivers/video/fbdev/core/sysimgblt.ko - AUTOLOAD:=$(call AutoLoad,07,syscopyarea sysfillrect sysimgblt) -endef - -define KernelPackage/fb-sys-ram/description - Kernel support for framebuffers in system RAM -endef - -$(eval $(call KernelPackage,fb-sys-ram)) - - -define KernelPackage/fb-tft - SUBMENU:=$(VIDEO_MENU) - TITLE:=Support for small TFT LCD display modules - DEPENDS:= \ - @GPIO_SUPPORT +kmod-backlight \ - +kmod-fb +kmod-fb-sys-fops +kmod-fb-sys-ram +kmod-spi-bitbang - KCONFIG:= \ - CONFIG_FB_BACKLIGHT=y \ - CONFIG_FB_DEFERRED_IO=y \ - CONFIG_FB_TFT - FILES:= \ - $(LINUX_DIR)/drivers/staging/fbtft/fbtft.ko - AUTOLOAD:=$(call AutoLoad,08,fbtft) -endef - -define KernelPackage/fb-tft/description - Support for small TFT LCD display modules -endef - -$(eval $(call KernelPackage,fb-tft)) - - -define KernelPackage/fb-tft-ili9486 - SUBMENU:=$(VIDEO_MENU) - TITLE:=FB driver for the ILI9486 LCD Controller - DEPENDS:=+kmod-fb-tft - KCONFIG:=CONFIG_FB_TFT_ILI9486 - FILES:=$(LINUX_DIR)/drivers/staging/fbtft/fb_ili9486.ko - AUTOLOAD:=$(call AutoLoad,09,fb_ili9486) -endef - -define KernelPackage/fb-tft-ili9486/description - FB driver for the ILI9486 LCD Controller -endef - -$(eval $(call KernelPackage,fb-tft-ili9486)) - -define KernelPackage/multimedia-input - SUBMENU:=$(VIDEO_MENU) - TITLE:=Multimedia input support - KCONFIG:=CONFIG_RC_CORE \ - CONFIG_LIRC=y \ - CONFIG_RC_DECODERS=y \ - CONFIG_RC_DEVICES=y - FILES:=$(LINUX_DIR)/drivers/media/rc/rc-core.ko - AUTOLOAD:=$(call AutoProbe,rc-core) -endef - -define KernelPackage/multimedia-input/description - Enable multimedia input. -endef - -$(eval $(call KernelPackage,multimedia-input)) - -define KernelPackage/drm - SUBMENU:=$(VIDEO_MENU) - TITLE:=Direct Rendering Manager (DRM) support - HIDDEN:=1 - DEPENDS:=+kmod-dma-buf +kmod-i2c-core +PACKAGE_kmod-backlight:kmod-backlight - KCONFIG:=CONFIG_DRM - FILES:= \ - $(LINUX_DIR)/drivers/gpu/drm/drm.ko \ - $(LINUX_DIR)/drivers/gpu/drm/drm_panel_orientation_quirks.ko - AUTOLOAD:=$(call AutoLoad,05,drm) -endef - -define KernelPackage/drm/description - Direct Rendering Manager (DRM) core support -endef - -$(eval $(call KernelPackage,drm)) - -define KernelPackage/drm-ttm - SUBMENU:=$(VIDEO_MENU) - TITLE:=GPU memory management subsystem - DEPENDS:=@DISPLAY_SUPPORT +kmod-drm - KCONFIG:=CONFIG_DRM_TTM - FILES:=$(LINUX_DIR)/drivers/gpu/drm/ttm/ttm.ko - AUTOLOAD:=$(call AutoProbe,ttm) -endef - -define KernelPackage/drm-ttm/description - GPU memory management subsystem for devices with multiple GPU memory types. - Will be enabled automatically if a device driver uses it. -endef - -$(eval $(call KernelPackage,drm-ttm)) - -define KernelPackage/drm-kms-helper - SUBMENU:=$(VIDEO_MENU) - TITLE:=CRTC helpers for KMS drivers - DEPENDS:=@DISPLAY_SUPPORT +kmod-drm +kmod-fb +kmod-fb-sys-fops +kmod-fb-cfb-copyarea \ - +kmod-fb-cfb-fillrect +kmod-fb-cfb-imgblt +kmod-fb-sys-ram - KCONFIG:= \ - CONFIG_DRM_KMS_HELPER \ - CONFIG_DRM_KMS_FB_HELPER=y - FILES:=$(LINUX_DIR)/drivers/gpu/drm/drm_kms_helper.ko - AUTOLOAD:=$(call AutoProbe,drm_kms_helper) -endef - -define KernelPackage/drm-kms-helper/description - CRTC helpers for KMS drivers. -endef - -$(eval $(call KernelPackage,drm-kms-helper)) - -define KernelPackage/drm-amdgpu - SUBMENU:=$(VIDEO_MENU) - TITLE:=AMDGPU DRM support - DEPENDS:=@TARGET_x86 @DISPLAY_SUPPORT +kmod-backlight +kmod-drm-ttm \ - +kmod-drm-kms-helper +kmod-i2c-algo-bit +amdgpu-firmware - KCONFIG:=CONFIG_DRM_AMDGPU \ - CONFIG_DRM_AMDGPU_SI=y \ - CONFIG_DRM_AMDGPU_CIK=y \ - CONFIG_DRM_AMD_DC=y \ - CONFIG_DEBUG_KERNEL_DC=n - FILES:=$(LINUX_DIR)/drivers/gpu/drm/amd/amdgpu/amdgpu.ko \ - $(LINUX_DIR)/drivers/gpu/drm/scheduler/gpu-sched.ko - AUTOLOAD:=$(call AutoProbe,amdgpu) -endef - -define KernelPackage/drm-amdgpu/description - Direct Rendering Manager (DRM) support for AMDGPU Cards -endef - -$(eval $(call KernelPackage,drm-amdgpu)) - - -define KernelPackage/drm-imx - SUBMENU:=$(VIDEO_MENU) - TITLE:=Freescale i.MX DRM support - DEPENDS:=@TARGET_imx +kmod-drm-kms-helper - KCONFIG:=CONFIG_DRM_IMX \ - CONFIG_DRM_FBDEV_EMULATION=y \ - CONFIG_DRM_FBDEV_OVERALLOC=100 \ - CONFIG_IMX_IPUV3_CORE \ - CONFIG_RESET_CONTROLLER=y \ - CONFIG_DRM_IMX_IPUV3 \ - CONFIG_IMX_IPUV3 \ - CONFIG_DRM_GEM_CMA_HELPER=y \ - CONFIG_DRM_KMS_CMA_HELPER=y \ - CONFIG_DRM_IMX_FB_HELPER \ - CONFIG_DRM_IMX_PARALLEL_DISPLAY=n \ - CONFIG_DRM_IMX_TVE=n \ - CONFIG_DRM_IMX_LDB=n \ - CONFIG_DRM_IMX_HDMI=n - FILES:= \ - $(LINUX_DIR)/drivers/gpu/drm/imx/imxdrm.ko \ - $(LINUX_DIR)/drivers/gpu/ipu-v3/imx-ipu-v3.ko - AUTOLOAD:=$(call AutoLoad,08,imxdrm imx-ipu-v3 imx-ipuv3-crtc) -endef - -define KernelPackage/drm-imx/description - Direct Rendering Manager (DRM) support for Freescale i.MX -endef - -$(eval $(call KernelPackage,drm-imx)) - -define KernelPackage/drm-imx-hdmi - SUBMENU:=$(VIDEO_MENU) - TITLE:=Freescale i.MX HDMI DRM support - DEPENDS:=+kmod-sound-core kmod-drm-imx - KCONFIG:=CONFIG_DRM_IMX_HDMI \ - CONFIG_DRM_DW_HDMI_AHB_AUDIO \ - CONFIG_DRM_DW_HDMI_I2S_AUDIO - FILES:= \ - $(LINUX_DIR)/drivers/gpu/drm/bridge/synopsys/dw-hdmi.ko \ - $(LINUX_DIR)/drivers/gpu/drm/bridge/synopsys/dw-hdmi-ahb-audio.ko \ - $(LINUX_DIR)/drivers/gpu/drm/imx/dw_hdmi-imx.ko - AUTOLOAD:=$(call AutoLoad,08,dw-hdmi dw-hdmi-ahb-audio.ko dw_hdmi-imx) -endef - -define KernelPackage/drm-imx-hdmi/description - Direct Rendering Manager (DRM) support for Freescale i.MX HDMI -endef - -$(eval $(call KernelPackage,drm-imx-hdmi)) - -define KernelPackage/drm-imx-ldb - SUBMENU:=$(VIDEO_MENU) - TITLE:=Freescale i.MX LVDS DRM support - DEPENDS:=+kmod-backlight kmod-drm-imx - KCONFIG:=CONFIG_DRM_IMX_LDB \ - CONFIG_DRM_PANEL_SIMPLE \ - CONFIG_DRM_PANEL=y \ - CONFIG_DRM_PANEL_SAMSUNG_LD9040=n \ - CONFIG_DRM_PANEL_SAMSUNG_S6E8AA0=n \ - CONFIG_DRM_PANEL_LG_LG4573=n \ - CONFIG_DRM_PANEL_LD9040=n \ - CONFIG_DRM_PANEL_LVDS=n \ - CONFIG_DRM_PANEL_S6E8AA0=n \ - CONFIG_DRM_PANEL_SITRONIX_ST7789V=n - FILES:=$(LINUX_DIR)/drivers/gpu/drm/imx/imx-ldb.ko \ - $(LINUX_DIR)/drivers/gpu/drm/panel/panel-simple.ko - AUTOLOAD:=$(call AutoLoad,08,imx-ldb) -endef - -define KernelPackage/drm-imx-ldb/description - Direct Rendering Manager (DRM) support for Freescale i.MX LVDS -endef - -$(eval $(call KernelPackage,drm-imx-ldb)) - -define KernelPackage/drm-radeon - SUBMENU:=$(VIDEO_MENU) - TITLE:=Radeon DRM support - DEPENDS:=@TARGET_x86 @DISPLAY_SUPPORT +kmod-backlight +kmod-drm-kms-helper \ - +kmod-drm-ttm +kmod-i2c-algo-bit +radeon-firmware - KCONFIG:=CONFIG_DRM_RADEON - FILES:=$(LINUX_DIR)/drivers/gpu/drm/radeon/radeon.ko - AUTOLOAD:=$(call AutoProbe,radeon) -endef - -define KernelPackage/drm-radeon/description - Direct Rendering Manager (DRM) support for Radeon Cards -endef - -$(eval $(call KernelPackage,drm-radeon)) - -# -# Video Capture -# - -define KernelPackage/video-core - SUBMENU:=$(VIDEO_MENU) - TITLE=Video4Linux support - DEPENDS:=+PACKAGE_kmod-i2c-core:kmod-i2c-core - KCONFIG:= \ - CONFIG_MEDIA_SUPPORT \ - CONFIG_MEDIA_CAMERA_SUPPORT=y \ - CONFIG_VIDEO_DEV \ - CONFIG_V4L_PLATFORM_DRIVERS=y - FILES:= \ - $(LINUX_DIR)/drivers/media/$(V4L2_DIR)/videodev.ko - AUTOLOAD:=$(call AutoLoad,60, videodev v4l2-common) -endef - -define KernelPackage/video-core/description - Kernel modules for Video4Linux support -endef - -$(eval $(call KernelPackage,video-core)) - - -define AddDepends/video - SUBMENU:=$(VIDEO_MENU) - DEPENDS+=kmod-video-core $(1) -endef - -define AddDepends/camera -$(AddDepends/video) - KCONFIG+=CONFIG_MEDIA_USB_SUPPORT=y \ - CONFIG_MEDIA_CAMERA_SUPPORT=y -endef - - -define KernelPackage/video-videobuf2 - TITLE:=videobuf2 lib - DEPENDS:=+kmod-dma-buf - KCONFIG:= \ - CONFIG_VIDEOBUF2_CORE \ - CONFIG_VIDEOBUF2_MEMOPS \ - CONFIG_VIDEOBUF2_VMALLOC - FILES:= \ - $(LINUX_DIR)/drivers/media/common/videobuf2/videobuf2-common.ko \ - $(LINUX_DIR)/drivers/media/common/videobuf2/videobuf2-v4l2.ko \ - $(LINUX_DIR)/drivers/media/common/videobuf2/videobuf2-memops.ko \ - $(LINUX_DIR)/drivers/media/common/videobuf2/videobuf2-vmalloc.ko - AUTOLOAD:=$(call AutoLoad,65,videobuf2-core videobuf-v4l2 videobuf2-memops videobuf2-vmalloc) - $(call AddDepends/video) -endef - -define KernelPackage/video-videobuf2/description - Kernel modules that implements three basic types of media buffers. -endef - -$(eval $(call KernelPackage,video-videobuf2)) - - -define KernelPackage/video-cpia2 - TITLE:=CPIA2 video driver - DEPENDS:=@USB_SUPPORT +kmod-usb-core - KCONFIG:=CONFIG_VIDEO_CPIA2 - FILES:=$(LINUX_DIR)/drivers/media/$(V4L2_USB_DIR)/cpia2/cpia2.ko - AUTOLOAD:=$(call AutoProbe,cpia2) - $(call AddDepends/camera) -endef - -define KernelPackage/video-cpia2/description - Kernel modules for supporting CPIA2 USB based cameras -endef - -$(eval $(call KernelPackage,video-cpia2)) - - -define KernelPackage/video-pwc - TITLE:=Philips USB webcam support - DEPENDS:=@USB_SUPPORT +kmod-usb-core +kmod-video-videobuf2 - KCONFIG:= \ - CONFIG_USB_PWC \ - CONFIG_USB_PWC_DEBUG=n - FILES:=$(LINUX_DIR)/drivers/media/$(V4L2_USB_DIR)/pwc/pwc.ko - AUTOLOAD:=$(call AutoProbe,pwc) - $(call AddDepends/camera) -endef - -define KernelPackage/video-pwc/description - Kernel modules for supporting Philips USB based cameras -endef - -$(eval $(call KernelPackage,video-pwc)) - - -define KernelPackage/video-uvc - TITLE:=USB Video Class (UVC) support - DEPENDS:=@USB_SUPPORT +kmod-usb-core +kmod-video-videobuf2 +kmod-input-core - KCONFIG:= CONFIG_USB_VIDEO_CLASS - FILES:=$(LINUX_DIR)/drivers/media/$(V4L2_USB_DIR)/uvc/uvcvideo.ko - AUTOLOAD:=$(call AutoProbe,uvcvideo) - $(call AddDepends/camera) -endef - -define KernelPackage/video-uvc/description - Kernel modules for supporting USB Video Class (UVC) devices -endef - -$(eval $(call KernelPackage,video-uvc)) - - -define KernelPackage/video-gspca-core - MENU:=1 - TITLE:=GSPCA webcam core support framework - DEPENDS:=@USB_SUPPORT +kmod-usb-core +kmod-input-core +kmod-video-videobuf2 - KCONFIG:=CONFIG_USB_GSPCA - FILES:=$(LINUX_DIR)/drivers/media/$(V4L2_USB_DIR)/gspca/gspca_main.ko - AUTOLOAD:=$(call AutoProbe,gspca_main) - $(call AddDepends/camera) -endef - -define KernelPackage/video-gspca-core/description - Kernel modules for supporting GSPCA based webcam devices. Note this is just - the core of the driver, please select a submodule that supports your webcam. -endef - -$(eval $(call KernelPackage,video-gspca-core)) - - -define AddDepends/camera-gspca - SUBMENU:=$(VIDEO_MENU) - DEPENDS+=kmod-video-gspca-core $(1) -endef - - -define KernelPackage/video-gspca-conex - TITLE:=conex webcam support - KCONFIG:=CONFIG_USB_GSPCA_CONEX - FILES:=$(LINUX_DIR)/drivers/media/$(V4L2_USB_DIR)/gspca/gspca_conex.ko - AUTOLOAD:=$(call AutoProbe,gspca_conex) - $(call AddDepends/camera-gspca) -endef - -define KernelPackage/video-gspca-conex/description - The Conexant Camera Driver (conex) kernel module -endef - -$(eval $(call KernelPackage,video-gspca-conex)) - - -define KernelPackage/video-gspca-etoms - TITLE:=etoms webcam support - KCONFIG:=CONFIG_USB_GSPCA_ETOMS - FILES:=$(LINUX_DIR)/drivers/media/$(V4L2_USB_DIR)/gspca/gspca_etoms.ko - AUTOLOAD:=$(call AutoProbe,gspca_etoms) - $(call AddDepends/camera-gspca) -endef - -define KernelPackage/video-gspca-etoms/description - The Etoms USB Camera Driver (etoms) kernel module -endef - -$(eval $(call KernelPackage,video-gspca-etoms)) - - -define KernelPackage/video-gspca-finepix - TITLE:=finepix webcam support - KCONFIG:=CONFIG_USB_GSPCA_FINEPIX - FILES:=$(LINUX_DIR)/drivers/media/$(V4L2_USB_DIR)/gspca/gspca_finepix.ko - AUTOLOAD:=$(call AutoProbe,gspca_finepix) - $(call AddDepends/camera-gspca) -endef - -define KernelPackage/video-gspca-finepix/description - The Fujifilm FinePix USB V4L2 driver (finepix) kernel module -endef - -$(eval $(call KernelPackage,video-gspca-finepix)) - - -define KernelPackage/video-gspca-mars - TITLE:=mars webcam support - KCONFIG:=CONFIG_USB_GSPCA_MARS - FILES:=$(LINUX_DIR)/drivers/media/$(V4L2_USB_DIR)/gspca/gspca_mars.ko - AUTOLOAD:=$(call AutoProbe,gspca_mars) - $(call AddDepends/camera-gspca) -endef - -define KernelPackage/video-gspca-mars/description - The Mars USB Camera Driver (mars) kernel module -endef - -$(eval $(call KernelPackage,video-gspca-mars)) - - -define KernelPackage/video-gspca-mr97310a - TITLE:=mr97310a webcam support - KCONFIG:=CONFIG_USB_GSPCA_MR97310A - FILES:=$(LINUX_DIR)/drivers/media/$(V4L2_USB_DIR)/gspca/gspca_mr97310a.ko - AUTOLOAD:=$(call AutoProbe,gspca_mr97310a) - $(call AddDepends/camera-gspca) -endef - -define KernelPackage/video-gspca-mr97310a/description - The Mars-Semi MR97310A USB Camera Driver (mr97310a) kernel module -endef - -$(eval $(call KernelPackage,video-gspca-mr97310a)) - - -define KernelPackage/video-gspca-ov519 - TITLE:=ov519 webcam support - KCONFIG:=CONFIG_USB_GSPCA_OV519 - FILES:=$(LINUX_DIR)/drivers/media/$(V4L2_USB_DIR)/gspca/gspca_ov519.ko - AUTOLOAD:=$(call AutoProbe,gspca_ov519) - $(call AddDepends/camera-gspca) -endef - -define KernelPackage/video-gspca-ov519/description - The OV519 USB Camera Driver (ov519) kernel module -endef - -$(eval $(call KernelPackage,video-gspca-ov519)) - - -define KernelPackage/video-gspca-ov534 - TITLE:=ov534 webcam support - KCONFIG:=CONFIG_USB_GSPCA_OV534 - FILES:=$(LINUX_DIR)/drivers/media/$(V4L2_USB_DIR)/gspca/gspca_ov534.ko - AUTOLOAD:=$(call AutoProbe,gspca_ov534) - $(call AddDepends/camera-gspca) -endef - -define KernelPackage/video-gspca-ov534/description - The OV534 USB Camera Driver (ov534) kernel module -endef - -$(eval $(call KernelPackage,video-gspca-ov534)) - - -define KernelPackage/video-gspca-ov534-9 - TITLE:=ov534-9 webcam support - KCONFIG:=CONFIG_USB_GSPCA_OV534_9 - FILES:=$(LINUX_DIR)/drivers/media/$(V4L2_USB_DIR)/gspca/gspca_ov534_9.ko - AUTOLOAD:=$(call AutoProbe,gspca_ov534_9) - $(call AddDepends/camera-gspca) -endef - -define KernelPackage/video-gspca-ov534-9/description - The OV534-9 USB Camera Driver (ov534_9) kernel module -endef - -$(eval $(call KernelPackage,video-gspca-ov534-9)) - - -define KernelPackage/video-gspca-pac207 - TITLE:=pac207 webcam support - KCONFIG:=CONFIG_USB_GSPCA_PAC207 - FILES:=$(LINUX_DIR)/drivers/media/$(V4L2_USB_DIR)/gspca/gspca_pac207.ko - AUTOLOAD:=$(call AutoProbe,gspca_pac207) - $(call AddDepends/camera-gspca) -endef - -define KernelPackage/video-gspca-pac207/description - The Pixart PAC207 USB Camera Driver (pac207) kernel module -endef - -$(eval $(call KernelPackage,video-gspca-pac207)) - - -define KernelPackage/video-gspca-pac7311 - TITLE:=pac7311 webcam support - KCONFIG:=CONFIG_USB_GSPCA_PAC7311 - FILES:=$(LINUX_DIR)/drivers/media/$(V4L2_USB_DIR)/gspca/gspca_pac7311.ko - AUTOLOAD:=$(call AutoProbe,gspca_pac7311) - $(call AddDepends/camera-gspca) -endef - -define KernelPackage/video-gspca-pac7311/description - The Pixart PAC7311 USB Camera Driver (pac7311) kernel module -endef - -$(eval $(call KernelPackage,video-gspca-pac7311)) - - -define KernelPackage/video-gspca-se401 - TITLE:=se401 webcam support - KCONFIG:=CONFIG_USB_GSPCA_SE401 - FILES:=$(LINUX_DIR)/drivers/media/$(V4L2_USB_DIR)/gspca/gspca_se401.ko - AUTOLOAD:=$(call AutoProbe,gspca_se401) - $(call AddDepends/camera-gspca) -endef - -define KernelPackage/video-gspca-se401/description - The SE401 USB Camera Driver kernel module -endef - -$(eval $(call KernelPackage,video-gspca-se401)) - - -define KernelPackage/video-gspca-sn9c20x - TITLE:=sn9c20x webcam support - KCONFIG:=CONFIG_USB_GSPCA_SN9C20X - FILES:=$(LINUX_DIR)/drivers/media/$(V4L2_USB_DIR)/gspca/gspca_sn9c20x.ko - AUTOLOAD:=$(call AutoProbe,gspca_sn9c20x) - $(call AddDepends/camera-gspca) -endef - -define KernelPackage/video-gspca-sn9c20x/description - The SN9C20X USB Camera Driver (sn9c20x) kernel module -endef - -$(eval $(call KernelPackage,video-gspca-sn9c20x)) - - -define KernelPackage/video-gspca-sonixb - TITLE:=sonixb webcam support - KCONFIG:=CONFIG_USB_GSPCA_SONIXB - FILES:=$(LINUX_DIR)/drivers/media/$(V4L2_USB_DIR)/gspca/gspca_sonixb.ko - AUTOLOAD:=$(call AutoProbe,gspca_sonixb) - $(call AddDepends/camera-gspca) -endef - -define KernelPackage/video-gspca-sonixb/description - The SONIX Bayer USB Camera Driver (sonixb) kernel module -endef - -$(eval $(call KernelPackage,video-gspca-sonixb)) - - -define KernelPackage/video-gspca-sonixj - TITLE:=sonixj webcam support - KCONFIG:=CONFIG_USB_GSPCA_SONIXJ - FILES:=$(LINUX_DIR)/drivers/media/$(V4L2_USB_DIR)/gspca/gspca_sonixj.ko - AUTOLOAD:=$(call AutoProbe,gspca_sonixj) - $(call AddDepends/camera-gspca) -endef - -define KernelPackage/video-gspca-sonixj/description - The SONIX JPEG USB Camera Driver (sonixj) kernel module -endef - -$(eval $(call KernelPackage,video-gspca-sonixj)) - - -define KernelPackage/video-gspca-spca500 - TITLE:=spca500 webcam support - KCONFIG:=CONFIG_USB_GSPCA_SPCA500 - FILES:=$(LINUX_DIR)/drivers/media/$(V4L2_USB_DIR)/gspca/gspca_spca500.ko - AUTOLOAD:=$(call AutoProbe,gspca_spca500) - $(call AddDepends/camera-gspca) -endef - -define KernelPackage/video-gspca-spca500/description - The SPCA500 USB Camera Driver (spca500) kernel module -endef - -$(eval $(call KernelPackage,video-gspca-spca500)) - - -define KernelPackage/video-gspca-spca501 - TITLE:=spca501 webcam support - KCONFIG:=CONFIG_USB_GSPCA_SPCA501 - FILES:=$(LINUX_DIR)/drivers/media/$(V4L2_USB_DIR)/gspca/gspca_spca501.ko - AUTOLOAD:=$(call AutoProbe,gspca_spca501) - $(call AddDepends/camera-gspca) -endef - -define KernelPackage/video-gspca-spca501/description - The SPCA501 USB Camera Driver (spca501) kernel module -endef - -$(eval $(call KernelPackage,video-gspca-spca501)) - - -define KernelPackage/video-gspca-spca505 - TITLE:=spca505 webcam support - KCONFIG:=CONFIG_USB_GSPCA_SPCA505 - FILES:=$(LINUX_DIR)/drivers/media/$(V4L2_USB_DIR)/gspca/gspca_spca505.ko - AUTOLOAD:=$(call AutoProbe,gspca_spca505) - $(call AddDepends/camera-gspca) -endef - -define KernelPackage/video-gspca-spca505/description - The SPCA505 USB Camera Driver (spca505) kernel module -endef - -$(eval $(call KernelPackage,video-gspca-spca505)) - - -define KernelPackage/video-gspca-spca506 - TITLE:=spca506 webcam support - KCONFIG:=CONFIG_USB_GSPCA_SPCA506 - FILES:=$(LINUX_DIR)/drivers/media/$(V4L2_USB_DIR)/gspca/gspca_spca506.ko - AUTOLOAD:=$(call AutoProbe,gspca_spca506) - $(call AddDepends/camera-gspca) -endef - -define KernelPackage/video-gspca-spca506/description - The SPCA506 USB Camera Driver (spca506) kernel module -endef - -$(eval $(call KernelPackage,video-gspca-spca506)) - - -define KernelPackage/video-gspca-spca508 - TITLE:=spca508 webcam support - KCONFIG:=CONFIG_USB_GSPCA_SPCA508 - FILES:=$(LINUX_DIR)/drivers/media/$(V4L2_USB_DIR)/gspca/gspca_spca508.ko - AUTOLOAD:=$(call AutoProbe,gspca_spca508) - $(call AddDepends/camera-gspca) -endef - -define KernelPackage/video-gspca-spca508/description - The SPCA508 USB Camera Driver (spca508) kernel module -endef - -$(eval $(call KernelPackage,video-gspca-spca508)) - - -define KernelPackage/video-gspca-spca561 - TITLE:=spca561 webcam support - KCONFIG:=CONFIG_USB_GSPCA_SPCA561 - FILES:=$(LINUX_DIR)/drivers/media/$(V4L2_USB_DIR)/gspca/gspca_spca561.ko - AUTOLOAD:=$(call AutoProbe,gspca_spca561) - $(call AddDepends/camera-gspca) -endef - -define KernelPackage/video-gspca-spca561/description - The SPCA561 USB Camera Driver (spca561) kernel module -endef - -$(eval $(call KernelPackage,video-gspca-spca561)) - - -define KernelPackage/video-gspca-sq905 - TITLE:=sq905 webcam support - KCONFIG:=CONFIG_USB_GSPCA_SQ905 - FILES:=$(LINUX_DIR)/drivers/media/$(V4L2_USB_DIR)/gspca/gspca_sq905.ko - AUTOLOAD:=$(call AutoProbe,gspca_sq905) - $(call AddDepends/camera-gspca) -endef - -define KernelPackage/video-gspca-sq905/description - The SQ Technologies SQ905 based USB Camera Driver (sq905) kernel module -endef - -$(eval $(call KernelPackage,video-gspca-sq905)) - - -define KernelPackage/video-gspca-sq905c - TITLE:=sq905c webcam support - KCONFIG:=CONFIG_USB_GSPCA_SQ905C - FILES:=$(LINUX_DIR)/drivers/media/$(V4L2_USB_DIR)/gspca/gspca_sq905c.ko - AUTOLOAD:=$(call AutoProbe,gspca_sq905c) - $(call AddDepends/camera-gspca) -endef - -define KernelPackage/video-gspca-sq905c/description - The SQ Technologies SQ905C based USB Camera Driver (sq905c) kernel module -endef - -$(eval $(call KernelPackage,video-gspca-sq905c)) - - -define KernelPackage/video-gspca-sq930x - TITLE:=sq930x webcam support - KCONFIG:=CONFIG_USB_GSPCA_SQ930X - FILES:=$(LINUX_DIR)/drivers/media/$(V4L2_USB_DIR)/gspca/gspca_sq930x.ko - AUTOLOAD:=$(call AutoProbe,gspca_sq930x) - $(call AddDepends/camera-gspca) -endef - -define KernelPackage/video-gspca-sq930x/description - The SQ Technologies SQ930X based USB Camera Driver (sq930x) kernel module -endef - -$(eval $(call KernelPackage,video-gspca-sq930x)) - - -define KernelPackage/video-gspca-stk014 - TITLE:=stk014 webcam support - KCONFIG:=CONFIG_USB_GSPCA_STK014 - FILES:=$(LINUX_DIR)/drivers/media/$(V4L2_USB_DIR)/gspca/gspca_stk014.ko - AUTOLOAD:=$(call AutoProbe,gspca_stk014) - $(call AddDepends/camera-gspca) -endef - -define KernelPackage/video-gspca-stk014/description - The Syntek DV4000 (STK014) USB Camera Driver (stk014) kernel module -endef - -$(eval $(call KernelPackage,video-gspca-stk014)) - - -define KernelPackage/video-gspca-sunplus - TITLE:=sunplus webcam support - KCONFIG:=CONFIG_USB_GSPCA_SUNPLUS - FILES:=$(LINUX_DIR)/drivers/media/$(V4L2_USB_DIR)/gspca/gspca_sunplus.ko - AUTOLOAD:=$(call AutoProbe,gspca_sunplus) - $(call AddDepends/camera-gspca) -endef - -define KernelPackage/video-gspca-sunplus/description - The SUNPLUS USB Camera Driver (sunplus) kernel module -endef - -$(eval $(call KernelPackage,video-gspca-sunplus)) - - -define KernelPackage/video-gspca-t613 - TITLE:=t613 webcam support - KCONFIG:=CONFIG_USB_GSPCA_T613 - FILES:=$(LINUX_DIR)/drivers/media/$(V4L2_USB_DIR)/gspca/gspca_t613.ko - AUTOLOAD:=$(call AutoProbe,gspca_t613) - $(call AddDepends/camera-gspca) -endef - -define KernelPackage/video-gspca-t613/description - The T613 (JPEG Compliance) USB Camera Driver (t613) kernel module -endef - -$(eval $(call KernelPackage,video-gspca-t613)) - - -define KernelPackage/video-gspca-tv8532 - TITLE:=tv8532 webcam support - KCONFIG:=CONFIG_USB_GSPCA_TV8532 - FILES:=$(LINUX_DIR)/drivers/media/$(V4L2_USB_DIR)/gspca/gspca_tv8532.ko - AUTOLOAD:=$(call AutoProbe,gspca_tv8532) - $(call AddDepends/camera-gspca) -endef - -define KernelPackage/video-gspca-tv8532/description - The TV8532 USB Camera Driver (tv8532) kernel module -endef - -$(eval $(call KernelPackage,video-gspca-tv8532)) - - -define KernelPackage/video-gspca-vc032x - TITLE:=vc032x webcam support - KCONFIG:=CONFIG_USB_GSPCA_VC032X - FILES:=$(LINUX_DIR)/drivers/media/$(V4L2_USB_DIR)/gspca/gspca_vc032x.ko - AUTOLOAD:=$(call AutoProbe,gspca_vc032x) - $(call AddDepends/camera-gspca) -endef - -define KernelPackage/video-gspca-vc032x/description - The VC032X USB Camera Driver (vc032x) kernel module -endef - -$(eval $(call KernelPackage,video-gspca-vc032x)) - - -define KernelPackage/video-gspca-zc3xx - TITLE:=zc3xx webcam support - KCONFIG:=CONFIG_USB_GSPCA_ZC3XX - FILES:=$(LINUX_DIR)/drivers/media/$(V4L2_USB_DIR)/gspca/gspca_zc3xx.ko - AUTOLOAD:=$(call AutoProbe,gspca_zc3xx) - $(call AddDepends/camera-gspca) -endef - -define KernelPackage/video-gspca-zc3xx/description - The ZC3XX USB Camera Driver (zc3xx) kernel module -endef - -$(eval $(call KernelPackage,video-gspca-zc3xx)) - - -define KernelPackage/video-gspca-m5602 - TITLE:=m5602 webcam support - KCONFIG:=CONFIG_USB_M5602 - FILES:=$(LINUX_DIR)/drivers/media/$(V4L2_USB_DIR)/gspca/m5602/gspca_m5602.ko - AUTOLOAD:=$(call AutoProbe,gspca_m5602) - $(call AddDepends/camera-gspca) -endef - -define KernelPackage/video-gspca-m5602/description - The ALi USB m5602 Camera Driver (m5602) kernel module -endef - -$(eval $(call KernelPackage,video-gspca-m5602)) - - -define KernelPackage/video-gspca-stv06xx - TITLE:=stv06xx webcam support - KCONFIG:=CONFIG_USB_STV06XX - FILES:=$(LINUX_DIR)/drivers/media/$(V4L2_USB_DIR)/gspca/stv06xx/gspca_stv06xx.ko - AUTOLOAD:=$(call AutoProbe,gspca_stv06xx) - $(call AddDepends/camera-gspca) -endef - -define KernelPackage/video-gspca-stv06xx/description - The STV06XX USB Camera Driver (stv06xx) kernel module -endef - -$(eval $(call KernelPackage,video-gspca-stv06xx)) - - -define KernelPackage/video-gspca-gl860 - TITLE:=gl860 webcam support - KCONFIG:=CONFIG_USB_GL860 - FILES:=$(LINUX_DIR)/drivers/media/$(V4L2_USB_DIR)/gspca/gl860/gspca_gl860.ko - AUTOLOAD:=$(call AutoProbe,gspca_gl860) - $(call AddDepends/camera-gspca) -endef - -define KernelPackage/video-gspca-gl860/description - The GL860 USB Camera Driver (gl860) kernel module -endef - -$(eval $(call KernelPackage,video-gspca-gl860)) - - -define KernelPackage/video-gspca-jeilinj - TITLE:=jeilinj webcam support - KCONFIG:=CONFIG_USB_GSPCA_JEILINJ - FILES:=$(LINUX_DIR)/drivers/media/$(V4L2_USB_DIR)/gspca/gspca_jeilinj.ko - AUTOLOAD:=$(call AutoProbe,gspca_jeilinj) - $(call AddDepends/camera-gspca) -endef - -define KernelPackage/video-gspca-jeilinj/description - The JEILINJ USB Camera Driver (jeilinj) kernel module -endef - -$(eval $(call KernelPackage,video-gspca-jeilinj)) - - -define KernelPackage/video-gspca-konica - TITLE:=konica webcam support - KCONFIG:=CONFIG_USB_GSPCA_KONICA - FILES:=$(LINUX_DIR)/drivers/media/$(V4L2_USB_DIR)/gspca/gspca_konica.ko - AUTOLOAD:=$(call AutoProbe,gspca_konica) - $(call AddDepends/camera-gspca) -endef - -define KernelPackage/video-gspca-konica/description - The Konica USB Camera Driver (konica) kernel module -endef - -$(eval $(call KernelPackage,video-gspca-konica)) diff --git a/root/package/kernel/linux/modules/virt.mk b/root/package/kernel/linux/modules/virt.mk deleted file mode 100755 index 5ed0d5db..00000000 --- a/root/package/kernel/linux/modules/virt.mk +++ /dev/null @@ -1,74 +0,0 @@ -# -# Copyright (C) 2016 Yousong Zhou -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# -define KernelPackage/irqbypass - SUBMENU:=Virtualization - TITLE:=IRQ offload/bypass manager - KCONFIG:=CONFIG_IRQ_BYPASS_MANAGER - HIDDEN:=1 - FILES:= $(LINUX_DIR)/virt/lib/irqbypass.ko - AUTOLOAD:=$(call AutoProbe,irqbypass.ko) -endef -$(eval $(call KernelPackage,irqbypass)) - - -define KernelPackage/kvm-x86 - SUBMENU:=Virtualization - TITLE:=Kernel-based Virtual Machine (KVM) support - DEPENDS:=@TARGET_x86_generic||TARGET_x86_64 +kmod-irqbypass - KCONFIG:=\ - CONFIG_KVM \ - CONFIG_KVM_MMU_AUDIT=n \ - CONFIG_VIRTUALIZATION=y - FILES:= $(LINUX_DIR)/arch/$(LINUX_KARCH)/kvm/kvm.ko - AUTOLOAD:=$(call AutoProbe,kvm.ko) -endef - -define KernelPackage/kvm-x86/description - Support hosting fully virtualized guest machines using hardware - virtualization extensions. You will need a fairly recent - processor equipped with virtualization extensions. You will also - need to select one or more of the processor modules. - - This module provides access to the hardware capabilities through - a character device node named /dev/kvm. -endef - -$(eval $(call KernelPackage,kvm-x86)) - - -define KernelPackage/kvm-intel - SUBMENU:=Virtualization - TITLE:=KVM for Intel processors support - DEPENDS:=+kmod-kvm-x86 - KCONFIG:=CONFIG_KVM_INTEL - FILES:= $(LINUX_DIR)/arch/$(LINUX_KARCH)/kvm/kvm-intel.ko - AUTOLOAD:=$(call AutoProbe,kvm-intel.ko) -endef - -define KernelPackage/kvm-intel/description - Provides support for KVM on Intel processors equipped with the VT - extensions. -endef - -$(eval $(call KernelPackage,kvm-intel)) - - -define KernelPackage/kvm-amd - SUBMENU:=Virtualization - TITLE:=KVM for AMD processors support - DEPENDS:=+kmod-kvm-x86 - KCONFIG:=CONFIG_KVM_AMD - FILES:= $(LINUX_DIR)/arch/$(LINUX_KARCH)/kvm/kvm-amd.ko - AUTOLOAD:=$(call AutoProbe,kvm-amd.ko) -endef - -define KernelPackage/kvm-amd/description - Provides support for KVM on AMD processors equipped with the AMD-V - (SVM) extensions. -endef - -$(eval $(call KernelPackage,kvm-amd)) diff --git a/root/package/kernel/linux/modules/w1.mk b/root/package/kernel/linux/modules/w1.mk deleted file mode 100755 index e0f7eecb..00000000 --- a/root/package/kernel/linux/modules/w1.mk +++ /dev/null @@ -1,193 +0,0 @@ -# -# Copyright (C) 2008-2010 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -W1_MENU:=W1 support -W1_MASTERS_DIR:=$(LINUX_DIR)/drivers/w1/masters -W1_SLAVES_DIR:=$(LINUX_DIR)/drivers/w1/slaves - -define KernelPackage/w1 - SUBMENU:=$(W1_MENU) - TITLE:=Dallas's 1-wire support - KCONFIG:=CONFIG_W1 - FILES:=$(LINUX_DIR)/drivers/w1/wire.ko - DEPENDS:=+kmod-hwmon-core -endef - -define KernelPackage/w1/description - Kernel module for Dallas's 1-wire support -endef - -$(eval $(call KernelPackage,w1)) - - -define AddDepends/w1 - SUBMENU:=$(W1_MENU) - DEPENDS+=kmod-w1 $(1) -endef - - -# -# 1-wire masters -# -define KernelPackage/w1-master-gpio - TITLE:=GPIO 1-wire bus master driver - DEPENDS:=@GPIO_SUPPORT - KCONFIG:=CONFIG_W1_MASTER_GPIO - FILES:=$(W1_MASTERS_DIR)/w1-gpio.ko - AUTOLOAD:=$(call AutoProbe,w1-gpio) - $(call AddDepends/w1) -endef - -define KernelPackage/w1-master-gpio/description - Kernel module for the GPIO 1-wire bus master driver -endef - -$(eval $(call KernelPackage,w1-master-gpio)) - -define KernelPackage/w1-master-ds2482 - TITLE:=DS2482 1-wire i2c bus master driver - KCONFIG:=CONFIG_W1_MASTER_DS2482 - FILES:=$(W1_MASTERS_DIR)/ds2482.ko - AUTOLOAD:=$(call AutoProbe,ds2482) - $(call AddDepends/w1,+kmod-i2c-core) -endef - -define KernelPackage/w1-master-ds2482/description - Kernel module for the DS2482 i2c 1-wire bus master driver - NOTE: Init with: echo ds2482 0x18 > /sys/bus/i2c/devices/i2c-0/new_device - or use owfs -endef - -$(eval $(call KernelPackage,w1-master-ds2482)) - - -define KernelPackage/w1-master-ds2490 - TITLE:=DS2490 1-wire usb bus master driver - DEPENDS:=@USB_SUPPORT +kmod-usb-core - KCONFIG:=CONFIG_W1_MASTER_DS2490 - FILES:=$(W1_MASTERS_DIR)/ds2490.ko - AUTOLOAD:=$(call AutoProbe,ds2490) - $(call AddDepends/w1) -endef - -define KernelPackage/w1-master-ds2490/description - Kernel module for the DS2490 usb 1-wire bus master driver -endef - -$(eval $(call KernelPackage,w1-master-ds2490)) - - -define KernelPackage/w1-master-mxc - TITLE:=Freescale MXC 1-wire busmaster - DEPENDS:=@TARGET_imx - KCONFIG:=CONFIG_W1_MASTER_MXC - FILES:=$(W1_MASTERS_DIR)/mxc_w1.ko - AUTOLOAD:=$(call AutoProbe,mxc_w1) - $(call AddDepends/w1) -endef - -define KernelPackage/w1-master-mxc/description - Kernel module for 1-wire Freescale MXC 1-wire busmaster -endef - -$(eval $(call KernelPackage,w1-master-mxc)) - - -# -# 1-wire slaves -# -define KernelPackage/w1-slave-therm - TITLE:=Thermal family implementation - KCONFIG:=CONFIG_W1_SLAVE_THERM - FILES:=$(W1_SLAVES_DIR)/w1_therm.ko - AUTOLOAD:=$(call AutoProbe,w1_therm) - $(call AddDepends/w1) -endef - -define KernelPackage/w1-slave-therm/description - Kernel module for 1-wire thermal sensors -endef - -$(eval $(call KernelPackage,w1-slave-therm)) - - -define KernelPackage/w1-slave-smem - TITLE:=Simple 64bit memory family implementation - KCONFIG:=CONFIG_W1_SLAVE_SMEM - FILES:=$(W1_SLAVES_DIR)/w1_smem.ko - AUTOLOAD:=$(call AutoProbe,w1_smem) - $(call AddDepends/w1) -endef - -define KernelPackage/w1-slave-smem/description - Kernel module for 1-wire simple 64bit memory rom(ds2401/ds2411/ds1990*) -endef - -$(eval $(call KernelPackage,w1-slave-smem)) - -define KernelPackage/w1-slave-ds2431 - TITLE:=DS2431 1kb EEPROM driver - KCONFIG:= CONFIG_W1_SLAVE_DS2431 - FILES:=$(W1_SLAVES_DIR)/w1_ds2431.ko - AUTOLOAD:=$(call AutoProbe,w1_ds2431) - $(call AddDepends/w1) -endef - -define KernelPackage/w1-slave-ds2431/description - Kernel module for 1-wire 1kb EEPROM (DS2431) -endef - -$(eval $(call KernelPackage,w1-slave-ds2431)) - -define KernelPackage/w1-slave-ds2433 - TITLE:=DS2433 4kb EEPROM driver - KCONFIG:= \ - CONFIG_W1_SLAVE_DS2433 \ - CONFIG_W1_SLAVE_DS2433_CRC=n - FILES:=$(W1_SLAVES_DIR)/w1_ds2433.ko - AUTOLOAD:=$(call AutoProbe,w1_ds2433) - $(call AddDepends/w1) -endef - -define KernelPackage/w1-slave-ds2433/description - Kernel module for 1-wire 4kb EEPROM (DS2433) -endef - -$(eval $(call KernelPackage,w1-slave-ds2433)) - - -define KernelPackage/w1-slave-ds2760 - TITLE:=Dallas 2760 battery monitor chip (HP iPAQ & others) - KCONFIG:= \ - CONFIG_W1_SLAVE_DS2760 \ - CONFIG_W1_SLAVE_DS2433_CRC=n - FILES:=$(W1_SLAVES_DIR)/w1_ds2760.ko - AUTOLOAD:=$(call AutoProbe,w1_ds2760) - $(call AddDepends/w1) -endef - -define KernelPackage/w1-slave-ds2760/description - Kernel module for 1-wire DS2760 battery monitor chip support -endef - -$(eval $(call KernelPackage,w1-slave-ds2760)) - - -define KernelPackage/w1-slave-ds2413 - TITLE:=DS2413 2 Ch. Addressable Switch - KCONFIG:= \ - CONFIG_W1_SLAVE_DS2413 - FILES:=$(W1_SLAVES_DIR)/w1_ds2413.ko - AUTOLOAD:=$(call AutoProbe,w1_ds2413) - $(call AddDepends/w1) -endef - -define KernelPackage/w1-slave-ds2413/description - Kernel module for 1-wire DS2413 Dual Channel Addressable Switch support -endef - -$(eval $(call KernelPackage,w1-slave-ds2413)) diff --git a/root/package/kernel/linux/modules/wireless.mk b/root/package/kernel/linux/modules/wireless.mk deleted file mode 100755 index f7a40ba1..00000000 --- a/root/package/kernel/linux/modules/wireless.mk +++ /dev/null @@ -1,42 +0,0 @@ -# -# Copyright (C) 2006-2008 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -WIRELESS_MENU:=Wireless Drivers - -define KernelPackage/net-prism54 - SUBMENU:=$(WIRELESS_MENU) - TITLE:=Intersil Prism54 support - DEPENDS:=@PCI_SUPPORT +@DRIVER_WEXT_SUPPORT +prism54-firmware - KCONFIG:=CONFIG_PRISM54 - FILES:= \ - $(LINUX_DIR)/drivers/net/wireless/intersil/prism54/prism54.ko - AUTOLOAD:=$(call AutoProbe,prism54) -endef - -define KernelPackage/net-prism54/description - Kernel modules for Intersil Prism54 support -endef - -$(eval $(call KernelPackage,net-prism54)) - - -define KernelPackage/net-rtl8192su - SUBMENU:=$(WIRELESS_MENU) - TITLE:=RTL8192SU support (staging) - DEPENDS:=@USB_SUPPORT +@DRIVER_WEXT_SUPPORT +kmod-usb-core +rtl8192su-firmware - KCONFIG:=\ - CONFIG_STAGING=y \ - CONFIG_R8712U - FILES:=$(LINUX_DIR)/drivers/staging/rtl8712/r8712u.ko - AUTOLOAD:=$(call AutoProbe,r8712u) -endef - -define KernelPackage/net-rtl8192su/description - Kernel modules for RealTek RTL8712 and RTL81XXSU fullmac support. -endef - -$(eval $(call KernelPackage,net-rtl8192su)) diff --git a/root/package/kernel/linux/modules/wpan.mk b/root/package/kernel/linux/modules/wpan.mk deleted file mode 100755 index dab8a0cb..00000000 --- a/root/package/kernel/linux/modules/wpan.mk +++ /dev/null @@ -1,152 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. - -WPAN_MENU:=WPAN 802.15.4 Support - -define KernelPackage/ieee802154 - SUBMENU:=$(WPAN_MENU) - TITLE:=IEEE-802.15.4 support - KCONFIG:= \ - CONFIG_IEEE802154 \ - CONFIG_IEEE802154_SOCKET=y \ - CONFIG_IEEE802154_NL802154_EXPERIMENTAL=n - FILES:= \ - $(LINUX_DIR)/net/ieee802154/ieee802154.ko \ - $(LINUX_DIR)/net/ieee802154/ieee802154_socket.ko - AUTOLOAD:=$(call AutoLoad,90,ieee802154 ieee802154_socket) -endef - -define KernelPackage/ieee802154/description - IEEE Std 802.15.4 defines a low data rate, low power and low - complexity short range wireless personal area networks. It was - designed to organise networks of sensors, switches, etc automation - devices. Maximum allowed data rate is 250 kb/s and typical personal - operating space around 10m. -endef - -$(eval $(call KernelPackage,ieee802154)) - -define KernelPackage/mac802154 - SUBMENU:=$(WPAN_MENU) - TITLE:=MAC-802.15.4 support - DEPENDS:=+kmod-ieee802154 +kmod-crypto-aead +kmod-lib-crc-ccitt - KCONFIG:= \ - CONFIG_MAC802154 \ - CONFIG_IEEE802154_DRIVERS=y - FILES:=$(LINUX_DIR)/net/mac802154/mac802154.ko - AUTOLOAD:=$(call AutoLoad,91,mac802154) -endef - -define KernelPackage/mac802154/description - This option enables the hardware independent IEEE 802.15.4 - networking stack for SoftMAC devices (the ones implementing - only PHY level of IEEE 802.15.4 standard). - - Note: this implementation is neither certified, nor feature - complete! Compatibility with other implementations hasn't - been tested yet! -endef - -$(eval $(call KernelPackage,mac802154)) - -define KernelPackage/fakelb - SUBMENU:=$(WPAN_MENU) - TITLE:=Fake LR-WPAN driver - DEPENDS:=+kmod-mac802154 - KCONFIG:=CONFIG_IEEE802154_FAKELB - FILES:=$(LINUX_DIR)/drivers/net/ieee802154/fakelb.ko - AUTOLOAD:=$(call AutoLoad,92,fakelb) -endef - -define KernelPackage/fakelb/description - Say Y here to enable the fake driver that can emulate a net - of several interconnected radio devices. -endef - -$(eval $(call KernelPackage,fakelb)) - -define KernelPackage/atusb - SUBMENU:=$(WPAN_MENU) - TITLE:=ATUSB transceiver driver - DEPENDS:=@USB_SUPPORT +kmod-usb-core +kmod-mac802154 - KCONFIG:=CONFIG_IEEE802154_ATUSB - FILES:=$(LINUX_DIR)/drivers/net/ieee802154/atusb.ko - AUTOLOAD:=$(call AutoProbe,atusb) -endef - -$(eval $(call KernelPackage,atusb)) - -define KernelPackage/at86rf230 - SUBMENU:=$(WPAN_MENU) - TITLE:=AT86RF230 transceiver driver - DEPENDS:=+kmod-mac802154 +kmod-regmap-spi - KCONFIG:=CONFIG_IEEE802154_AT86RF230 \ - CONFIG_IEEE802154_AT86RF230_DEBUGFS=n \ - CONFIG_SPI=y \ - CONFIG_SPI_MASTER=y - FILES:=$(LINUX_DIR)/drivers/net/ieee802154/at86rf230.ko - AUTOLOAD:=$(call AutoProbe,at86rf230) -endef - -$(eval $(call KernelPackage,at86rf230)) - -define KernelPackage/mrf24j40 - SUBMENU:=$(WPAN_MENU) - TITLE:=MRF24J40 transceiver driver - DEPENDS:=+kmod-mac802154 +kmod-regmap-spi - KCONFIG:=CONFIG_IEEE802154_MRF24J40 \ - CONFIG_SPI=y \ - CONFIG_SPI_MASTER=y - FILES:=$(LINUX_DIR)/drivers/net/ieee802154/mrf24j40.ko - AUTOLOAD:=$(call AutoProbe,mrf24j40) -endef - -$(eval $(call KernelPackage,mrf24j40)) - -define KernelPackage/cc2520 - SUBMENU:=$(WPAN_MENU) - TITLE:=CC2520 transceiver driver - DEPENDS:=+kmod-mac802154 - KCONFIG:=CONFIG_IEEE802154_CC2520 \ - CONFIG_SPI=y \ - CONFIG_SPI_MASTER=y - FILES:=$(LINUX_DIR)/drivers/net/ieee802154/cc2520.ko - AUTOLOAD:=$(call AutoProbe,cc2520) -endef - -$(eval $(call KernelPackage,cc2520)) - - -define KernelPackage/ca8210 - SUBMENU:=$(WPAN_MENU) - TITLE:=CA8210 transceiver driver - DEPENDS:=+kmod-mac802154 - KCONFIG:=CONFIG_IEEE802154_CA8210 \ - CONFIG_SPI=y \ - CONFIG_SPI_MASTER=y \ - CONFIG_IEEE802154_CA8210_DEBUGFS=n - FILES:=$(LINUX_DIR)/drivers/net/ieee802154/ca8210.ko - AUTOLOAD:=$(call AutoProbe,ca8210) -endef - -$(eval $(call KernelPackage,ca8210)) - - -define KernelPackage/ieee802154-6lowpan - SUBMENU:=$(WPAN_MENU) - TITLE:= 6LoWPAN support over IEEE-802.15.4 - DEPENDS:=+kmod-6lowpan +kmod-ieee802154 - KCONFIG:=CONFIG_IEEE802154_6LOWPAN - FILES:= \ - $(LINUX_DIR)/net/ieee802154/6lowpan/ieee802154_6lowpan.ko - AUTOLOAD:=$(call AutoLoad,91,ieee802154_6lowpan) -endef - -define KernelPackage/ieee802154-6lowpan/description - IPv6 compression over IEEE 802.15.4 -endef - -$(eval $(call KernelPackage,ieee802154-6lowpan)) diff --git a/root/target/linux/generic/backport-5.15/011-kbuild-export-SUBARCH.patch b/root/target/linux/generic/backport-5.15/011-kbuild-export-SUBARCH.patch index 0aedad4b..d99dcc9f 100755 --- a/root/target/linux/generic/backport-5.15/011-kbuild-export-SUBARCH.patch +++ b/root/target/linux/generic/backport-5.15/011-kbuild-export-SUBARCH.patch @@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau --- a/Makefile +++ b/Makefile -@@ -523,7 +523,7 @@ KBUILD_LDFLAGS_MODULE := +@@ -524,7 +524,7 @@ KBUILD_LDFLAGS_MODULE := KBUILD_LDFLAGS := CLANG_FLAGS := diff --git a/root/target/linux/generic/backport-5.15/050-v5.16-00-MIPS-uasm-Enable-muhu-opcode-for-MIPS-R6.patch b/root/target/linux/generic/backport-5.15/050-v5.16-00-MIPS-uasm-Enable-muhu-opcode-for-MIPS-R6.patch deleted file mode 100755 index 82feb742..00000000 --- a/root/target/linux/generic/backport-5.15/050-v5.16-00-MIPS-uasm-Enable-muhu-opcode-for-MIPS-R6.patch +++ /dev/null @@ -1,65 +0,0 @@ -From: Johan Almbladh -Date: Tue, 5 Oct 2021 18:54:02 +0200 -Subject: [PATCH] MIPS: uasm: Enable muhu opcode for MIPS R6 - -Enable the 'muhu' instruction, complementing the existing 'mulu', needed -to implement a MIPS32 BPF JIT. - -Also fix a typo in the existing definition of 'dmulu'. - -Signed-off-by: Tony Ambardar - -This patch is a dependency for my 32-bit MIPS eBPF JIT. - -Signed-off-by: Johan Almbladh ---- - ---- a/arch/mips/include/asm/uasm.h -+++ b/arch/mips/include/asm/uasm.h -@@ -145,6 +145,7 @@ Ip_u1(_mtlo); - Ip_u3u1u2(_mul); - Ip_u1u2(_multu); - Ip_u3u1u2(_mulu); -+Ip_u3u1u2(_muhu); - Ip_u3u1u2(_nor); - Ip_u3u1u2(_or); - Ip_u2u1u3(_ori); ---- a/arch/mips/mm/uasm-mips.c -+++ b/arch/mips/mm/uasm-mips.c -@@ -90,7 +90,7 @@ static const struct insn insn_table[insn - RS | RT | RD}, - [insn_dmtc0] = {M(cop0_op, dmtc_op, 0, 0, 0, 0), RT | RD | SET}, - [insn_dmultu] = {M(spec_op, 0, 0, 0, 0, dmultu_op), RS | RT}, -- [insn_dmulu] = {M(spec_op, 0, 0, 0, dmult_dmul_op, dmultu_op), -+ [insn_dmulu] = {M(spec_op, 0, 0, 0, dmultu_dmulu_op, dmultu_op), - RS | RT | RD}, - [insn_drotr] = {M(spec_op, 1, 0, 0, 0, dsrl_op), RT | RD | RE}, - [insn_drotr32] = {M(spec_op, 1, 0, 0, 0, dsrl32_op), RT | RD | RE}, -@@ -150,6 +150,8 @@ static const struct insn insn_table[insn - [insn_mtlo] = {M(spec_op, 0, 0, 0, 0, mtlo_op), RS}, - [insn_mulu] = {M(spec_op, 0, 0, 0, multu_mulu_op, multu_op), - RS | RT | RD}, -+ [insn_muhu] = {M(spec_op, 0, 0, 0, multu_muhu_op, multu_op), -+ RS | RT | RD}, - #ifndef CONFIG_CPU_MIPSR6 - [insn_mul] = {M(spec2_op, 0, 0, 0, 0, mul_op), RS | RT | RD}, - #else ---- a/arch/mips/mm/uasm.c -+++ b/arch/mips/mm/uasm.c -@@ -59,7 +59,7 @@ enum opcode { - insn_lddir, insn_ldpte, insn_ldx, insn_lh, insn_lhu, insn_ll, insn_lld, - insn_lui, insn_lw, insn_lwu, insn_lwx, insn_mfc0, insn_mfhc0, insn_mfhi, - insn_mflo, insn_modu, insn_movn, insn_movz, insn_mtc0, insn_mthc0, -- insn_mthi, insn_mtlo, insn_mul, insn_multu, insn_mulu, insn_nor, -+ insn_mthi, insn_mtlo, insn_mul, insn_multu, insn_mulu, insn_muhu, insn_nor, - insn_or, insn_ori, insn_pref, insn_rfe, insn_rotr, insn_sb, insn_sc, - insn_scd, insn_seleqz, insn_selnez, insn_sd, insn_sh, insn_sll, - insn_sllv, insn_slt, insn_slti, insn_sltiu, insn_sltu, insn_sra, -@@ -344,6 +344,7 @@ I_u1(_mtlo) - I_u3u1u2(_mul) - I_u1u2(_multu) - I_u3u1u2(_mulu) -+I_u3u1u2(_muhu) - I_u3u1u2(_nor) - I_u3u1u2(_or) - I_u2u1u3(_ori) diff --git a/root/target/linux/generic/backport-5.15/050-v5.16-01-mips-uasm-Add-workaround-for-Loongson-2F-nop-CPU-err.patch b/root/target/linux/generic/backport-5.15/050-v5.16-01-mips-uasm-Add-workaround-for-Loongson-2F-nop-CPU-err.patch deleted file mode 100755 index 3a4d573f..00000000 --- a/root/target/linux/generic/backport-5.15/050-v5.16-01-mips-uasm-Add-workaround-for-Loongson-2F-nop-CPU-err.patch +++ /dev/null @@ -1,31 +0,0 @@ -From: Johan Almbladh -Date: Tue, 5 Oct 2021 18:54:03 +0200 -Subject: [PATCH] mips: uasm: Add workaround for Loongson-2F nop CPU errata - -This patch implements a workaround for the Loongson-2F nop in generated, -code, if the existing option CONFIG_CPU_NOP_WORKAROUND is set. Before, -the binutils option -mfix-loongson2f-nop was enabled, but no workaround -was done when emitting MIPS code. Now, the nop pseudo instruction is -emitted as "or ax,ax,zero" instead of the default "sll zero,zero,0". This -is consistent with the workaround implemented by binutils. - -Link: https://sourceware.org/legacy-ml/binutils/2009-11/msg00387.html - -Signed-off-by: Johan Almbladh -Reviewed-by: Jiaxun Yang ---- - ---- a/arch/mips/include/asm/uasm.h -+++ b/arch/mips/include/asm/uasm.h -@@ -249,7 +249,11 @@ static inline void uasm_l##lb(struct uas - #define uasm_i_bnezl(buf, rs, off) uasm_i_bnel(buf, rs, 0, off) - #define uasm_i_ehb(buf) uasm_i_sll(buf, 0, 0, 3) - #define uasm_i_move(buf, a, b) UASM_i_ADDU(buf, a, 0, b) -+#ifdef CONFIG_CPU_NOP_WORKAROUNDS -+#define uasm_i_nop(buf) uasm_i_or(buf, 1, 1, 0) -+#else - #define uasm_i_nop(buf) uasm_i_sll(buf, 0, 0, 0) -+#endif - #define uasm_i_ssnop(buf) uasm_i_sll(buf, 0, 0, 1) - - static inline void uasm_i_drotr_safe(u32 **p, unsigned int a1, diff --git a/root/target/linux/generic/backport-5.15/050-v5.16-02-mips-bpf-Add-eBPF-JIT-for-32-bit-MIPS.patch b/root/target/linux/generic/backport-5.15/050-v5.16-02-mips-bpf-Add-eBPF-JIT-for-32-bit-MIPS.patch deleted file mode 100755 index 79806599..00000000 --- a/root/target/linux/generic/backport-5.15/050-v5.16-02-mips-bpf-Add-eBPF-JIT-for-32-bit-MIPS.patch +++ /dev/null @@ -1,3078 +0,0 @@ -From: Johan Almbladh -Date: Tue, 5 Oct 2021 18:54:04 +0200 -Subject: [PATCH] mips: bpf: Add eBPF JIT for 32-bit MIPS - -This is an implementation of an eBPF JIT for 32-bit MIPS I-V and MIPS32. -The implementation supports all 32-bit and 64-bit ALU and JMP operations, -including the recently-added atomics. 64-bit div/mod and 64-bit atomics -are implemented using function calls to math64 and atomic64 functions, -respectively. All 32-bit operations are implemented natively by the JIT, -except if the CPU lacks ll/sc instructions. - -Register mapping -================ -All 64-bit eBPF registers are mapped to native 32-bit MIPS register pairs, -and does not use any stack scratch space for register swapping. This means -that all eBPF register data is kept in CPU registers all the time, and -this simplifies the register management a lot. It also reduces the JIT's -pressure on temporary registers since we do not have to move data around. - -Native register pairs are ordered according to CPU endiannes, following -the O32 calling convention for passing 64-bit arguments and return values. -The eBPF return value, arguments and callee-saved registers are mapped to -their native MIPS equivalents. - -Since the 32 highest bits in the eBPF FP (frame pointer) register are -always zero, only one general-purpose register is actually needed for the -mapping. The MIPS fp register is used for this purpose. The high bits are -mapped to MIPS register r0. This saves us one CPU register, which is much -needed for temporaries, while still allowing us to treat the R10 (FP) -register just like any other eBPF register in the JIT. - -The MIPS gp (global pointer) and at (assembler temporary) registers are -used as internal temporary registers for constant blinding. CPU registers -t6-t9 are used internally by the JIT when constructing more complex 64-bit -operations. This is precisely what is needed - two registers to store an -operand value, and two more as scratch registers when performing the -operation. - -The register mapping is shown below. - - R0 - $v1, $v0 return value - R1 - $a1, $a0 argument 1, passed in registers - R2 - $a3, $a2 argument 2, passed in registers - R3 - $t1, $t0 argument 3, passed on stack - R4 - $t3, $t2 argument 4, passed on stack - R5 - $t4, $t3 argument 5, passed on stack - R6 - $s1, $s0 callee-saved - R7 - $s3, $s2 callee-saved - R8 - $s5, $s4 callee-saved - R9 - $s7, $s6 callee-saved - FP - $r0, $fp 32-bit frame pointer - AX - $gp, $at constant-blinding - $t6 - $t9 unallocated, JIT temporaries - -Jump offsets -============ -The JIT tries to map all conditional JMP operations to MIPS conditional -PC-relative branches. The MIPS branch offset field is 18 bits, in bytes, -which is equivalent to the eBPF 16-bit instruction offset. However, since -the JIT may emit more than one CPU instruction per eBPF instruction, the -field width may overflow. If that happens, the JIT converts the long -conditional jump to a short PC-relative branch with the condition -inverted, jumping over a long unconditional absolute jmp (j). - -This conversion will change the instruction offset mapping used for jumps, -and may in turn result in more branch offset overflows. The JIT therefore -dry-runs the translation until no more branches are converted and the -offsets do not change anymore. There is an upper bound on this of course, -and if the JIT hits that limit, the last two iterations are run with all -branches being converted. - -Tail call count -=============== -The current tail call count is stored in the 16-byte area of the caller's -stack frame that is reserved for the callee in the o32 ABI. The value is -initialized in the prologue, and propagated to the tail-callee by skipping -the initialization instructions when emitting the tail call. - -Signed-off-by: Johan Almbladh ---- - create mode 100644 arch/mips/net/bpf_jit_comp.c - create mode 100644 arch/mips/net/bpf_jit_comp.h - create mode 100644 arch/mips/net/bpf_jit_comp32.c - ---- a/arch/mips/net/Makefile -+++ b/arch/mips/net/Makefile -@@ -2,4 +2,9 @@ - # MIPS networking code - - obj-$(CONFIG_MIPS_CBPF_JIT) += bpf_jit.o bpf_jit_asm.o --obj-$(CONFIG_MIPS_EBPF_JIT) += ebpf_jit.o -+ -+ifeq ($(CONFIG_32BIT),y) -+ obj-$(CONFIG_MIPS_EBPF_JIT) += bpf_jit_comp.o bpf_jit_comp32.o -+else -+ obj-$(CONFIG_MIPS_EBPF_JIT) += ebpf_jit.o -+endif ---- /dev/null -+++ b/arch/mips/net/bpf_jit_comp.c -@@ -0,0 +1,1020 @@ -+// SPDX-License-Identifier: GPL-2.0-only -+/* -+ * Just-In-Time compiler for eBPF bytecode on MIPS. -+ * Implementation of JIT functions common to 32-bit and 64-bit CPUs. -+ * -+ * Copyright (c) 2021 Anyfi Networks AB. -+ * Author: Johan Almbladh -+ * -+ * Based on code and ideas from -+ * Copyright (c) 2017 Cavium, Inc. -+ * Copyright (c) 2017 Shubham Bansal -+ * Copyright (c) 2011 Mircea Gherzan -+ */ -+ -+/* -+ * Code overview -+ * ============= -+ * -+ * - bpf_jit_comp.h -+ * Common definitions and utilities. -+ * -+ * - bpf_jit_comp.c -+ * Implementation of JIT top-level logic and exported JIT API functions. -+ * Implementation of internal operations shared by 32-bit and 64-bit code. -+ * JMP and ALU JIT control code, register control code, shared ALU and -+ * JMP/JMP32 JIT operations. -+ * -+ * - bpf_jit_comp32.c -+ * Implementation of functions to JIT prologue, epilogue and a single eBPF -+ * instruction for 32-bit MIPS CPUs. The functions use shared operations -+ * where possible, and implement the rest for 32-bit MIPS such as ALU64 -+ * operations. -+ * -+ * - bpf_jit_comp64.c -+ * Ditto, for 64-bit MIPS CPUs. -+ * -+ * Zero and sign extension -+ * ======================== -+ * 32-bit MIPS instructions on 64-bit MIPS registers use sign extension, -+ * but the eBPF instruction set mandates zero extension. We let the verifier -+ * insert explicit zero-extensions after 32-bit ALU operations, both for -+ * 32-bit and 64-bit MIPS JITs. Conditional JMP32 operations on 64-bit MIPs -+ * are JITed with sign extensions inserted when so expected. -+ * -+ * ALU operations -+ * ============== -+ * ALU operations on 32/64-bit MIPS and ALU64 operations on 64-bit MIPS are -+ * JITed in the following steps. ALU64 operations on 32-bit MIPS are more -+ * complicated and therefore only processed by special implementations in -+ * step (3). -+ * -+ * 1) valid_alu_i: -+ * Determine if an immediate operation can be emitted as such, or if -+ * we must fall back to the register version. -+ * -+ * 2) rewrite_alu_i: -+ * Convert BPF operation and immediate value to a canonical form for -+ * JITing. In some degenerate cases this form may be a no-op. -+ * -+ * 3) emit_alu_{i,i64,r,64}: -+ * Emit instructions for an ALU or ALU64 immediate or register operation. -+ * -+ * JMP operations -+ * ============== -+ * JMP and JMP32 operations require an JIT instruction offset table for -+ * translating the jump offset. This table is computed by dry-running the -+ * JIT without actually emitting anything. However, the computed PC-relative -+ * offset may overflow the 18-bit offset field width of the native MIPS -+ * branch instruction. In such cases, the long jump is converted into the -+ * following sequence. -+ * -+ * ! +2 Inverted PC-relative branch -+ * nop Delay slot -+ * j Unconditional absolute long jump -+ * nop Delay slot -+ * -+ * Since this converted sequence alters the offset table, all offsets must -+ * be re-calculated. This may in turn trigger new branch conversions, so -+ * the process is repeated until no further changes are made. Normally it -+ * completes in 1-2 iterations. If JIT_MAX_ITERATIONS should reached, we -+ * fall back to converting every remaining jump operation. The branch -+ * conversion is independent of how the JMP or JMP32 condition is JITed. -+ * -+ * JMP32 and JMP operations are JITed as follows. -+ * -+ * 1) setup_jmp_{i,r}: -+ * Convert jump conditional and offset into a form that can be JITed. -+ * This form may be a no-op, a canonical form, or an inverted PC-relative -+ * jump if branch conversion is necessary. -+ * -+ * 2) valid_jmp_i: -+ * Determine if an immediate operations can be emitted as such, or if -+ * we must fall back to the register version. Applies to JMP32 for 32-bit -+ * MIPS, and both JMP and JMP32 for 64-bit MIPS. -+ * -+ * 3) emit_jmp_{i,i64,r,r64}: -+ * Emit instructions for an JMP or JMP32 immediate or register operation. -+ * -+ * 4) finish_jmp_{i,r}: -+ * Emit any instructions needed to finish the jump. This includes a nop -+ * for the delay slot if a branch was emitted, and a long absolute jump -+ * if the branch was converted. -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include "bpf_jit_comp.h" -+ -+/* Convenience macros for descriptor access */ -+#define CONVERTED(desc) ((desc) & JIT_DESC_CONVERT) -+#define INDEX(desc) ((desc) & ~JIT_DESC_CONVERT) -+ -+/* -+ * Push registers on the stack, starting at a given depth from the stack -+ * pointer and increasing. The next depth to be written is returned. -+ */ -+int push_regs(struct jit_context *ctx, u32 mask, u32 excl, int depth) -+{ -+ int reg; -+ -+ for (reg = 0; reg < BITS_PER_BYTE * sizeof(mask); reg++) -+ if (mask & BIT(reg)) { -+ if ((excl & BIT(reg)) == 0) { -+ if (sizeof(long) == 4) -+ emit(ctx, sw, reg, depth, MIPS_R_SP); -+ else /* sizeof(long) == 8 */ -+ emit(ctx, sd, reg, depth, MIPS_R_SP); -+ } -+ depth += sizeof(long); -+ } -+ -+ ctx->stack_used = max((int)ctx->stack_used, depth); -+ return depth; -+} -+ -+/* -+ * Pop registers from the stack, starting at a given depth from the stack -+ * pointer and increasing. The next depth to be read is returned. -+ */ -+int pop_regs(struct jit_context *ctx, u32 mask, u32 excl, int depth) -+{ -+ int reg; -+ -+ for (reg = 0; reg < BITS_PER_BYTE * sizeof(mask); reg++) -+ if (mask & BIT(reg)) { -+ if ((excl & BIT(reg)) == 0) { -+ if (sizeof(long) == 4) -+ emit(ctx, lw, reg, depth, MIPS_R_SP); -+ else /* sizeof(long) == 8 */ -+ emit(ctx, ld, reg, depth, MIPS_R_SP); -+ } -+ depth += sizeof(long); -+ } -+ -+ return depth; -+} -+ -+/* Compute the 28-bit jump target address from a BPF program location */ -+int get_target(struct jit_context *ctx, u32 loc) -+{ -+ u32 index = INDEX(ctx->descriptors[loc]); -+ unsigned long pc = (unsigned long)&ctx->target[ctx->jit_index]; -+ unsigned long addr = (unsigned long)&ctx->target[index]; -+ -+ if (!ctx->target) -+ return 0; -+ -+ if ((addr ^ pc) & ~MIPS_JMP_MASK) -+ return -1; -+ -+ return addr & MIPS_JMP_MASK; -+} -+ -+/* Compute the PC-relative offset to relative BPF program offset */ -+int get_offset(const struct jit_context *ctx, int off) -+{ -+ return (INDEX(ctx->descriptors[ctx->bpf_index + off]) - -+ ctx->jit_index - 1) * sizeof(u32); -+} -+ -+/* dst = imm (register width) */ -+void emit_mov_i(struct jit_context *ctx, u8 dst, s32 imm) -+{ -+ if (imm >= -0x8000 && imm <= 0x7fff) { -+ emit(ctx, addiu, dst, MIPS_R_ZERO, imm); -+ } else { -+ emit(ctx, lui, dst, (s16)((u32)imm >> 16)); -+ emit(ctx, ori, dst, dst, (u16)(imm & 0xffff)); -+ } -+ clobber_reg(ctx, dst); -+} -+ -+/* dst = src (register width) */ -+void emit_mov_r(struct jit_context *ctx, u8 dst, u8 src) -+{ -+ emit(ctx, ori, dst, src, 0); -+ clobber_reg(ctx, dst); -+} -+ -+/* Validate ALU immediate range */ -+bool valid_alu_i(u8 op, s32 imm) -+{ -+ switch (BPF_OP(op)) { -+ case BPF_NEG: -+ case BPF_LSH: -+ case BPF_RSH: -+ case BPF_ARSH: -+ /* All legal eBPF values are valid */ -+ return true; -+ case BPF_ADD: -+ /* imm must be 16 bits */ -+ return imm >= -0x8000 && imm <= 0x7fff; -+ case BPF_SUB: -+ /* -imm must be 16 bits */ -+ return imm >= -0x7fff && imm <= 0x8000; -+ case BPF_AND: -+ case BPF_OR: -+ case BPF_XOR: -+ /* imm must be 16 bits unsigned */ -+ return imm >= 0 && imm <= 0xffff; -+ case BPF_MUL: -+ /* imm must be zero or a positive power of two */ -+ return imm == 0 || (imm > 0 && is_power_of_2(imm)); -+ case BPF_DIV: -+ case BPF_MOD: -+ /* imm must be an 17-bit power of two */ -+ return (u32)imm <= 0x10000 && is_power_of_2((u32)imm); -+ } -+ return false; -+} -+ -+/* Rewrite ALU immediate operation */ -+bool rewrite_alu_i(u8 op, s32 imm, u8 *alu, s32 *val) -+{ -+ bool act = true; -+ -+ switch (BPF_OP(op)) { -+ case BPF_LSH: -+ case BPF_RSH: -+ case BPF_ARSH: -+ case BPF_ADD: -+ case BPF_SUB: -+ case BPF_OR: -+ case BPF_XOR: -+ /* imm == 0 is a no-op */ -+ act = imm != 0; -+ break; -+ case BPF_MUL: -+ if (imm == 1) { -+ /* dst * 1 is a no-op */ -+ act = false; -+ } else if (imm == 0) { -+ /* dst * 0 is dst & 0 */ -+ op = BPF_AND; -+ } else { -+ /* dst * (1 << n) is dst << n */ -+ op = BPF_LSH; -+ imm = ilog2(abs(imm)); -+ } -+ break; -+ case BPF_DIV: -+ if (imm == 1) { -+ /* dst / 1 is a no-op */ -+ act = false; -+ } else { -+ /* dst / (1 << n) is dst >> n */ -+ op = BPF_RSH; -+ imm = ilog2(imm); -+ } -+ break; -+ case BPF_MOD: -+ /* dst % (1 << n) is dst & ((1 << n) - 1) */ -+ op = BPF_AND; -+ imm--; -+ break; -+ } -+ -+ *alu = op; -+ *val = imm; -+ return act; -+} -+ -+/* ALU immediate operation (32-bit) */ -+void emit_alu_i(struct jit_context *ctx, u8 dst, s32 imm, u8 op) -+{ -+ switch (BPF_OP(op)) { -+ /* dst = -dst */ -+ case BPF_NEG: -+ emit(ctx, subu, dst, MIPS_R_ZERO, dst); -+ break; -+ /* dst = dst & imm */ -+ case BPF_AND: -+ emit(ctx, andi, dst, dst, (u16)imm); -+ break; -+ /* dst = dst | imm */ -+ case BPF_OR: -+ emit(ctx, ori, dst, dst, (u16)imm); -+ break; -+ /* dst = dst ^ imm */ -+ case BPF_XOR: -+ emit(ctx, xori, dst, dst, (u16)imm); -+ break; -+ /* dst = dst << imm */ -+ case BPF_LSH: -+ emit(ctx, sll, dst, dst, imm); -+ break; -+ /* dst = dst >> imm */ -+ case BPF_RSH: -+ emit(ctx, srl, dst, dst, imm); -+ break; -+ /* dst = dst >> imm (arithmetic) */ -+ case BPF_ARSH: -+ emit(ctx, sra, dst, dst, imm); -+ break; -+ /* dst = dst + imm */ -+ case BPF_ADD: -+ emit(ctx, addiu, dst, dst, imm); -+ break; -+ /* dst = dst - imm */ -+ case BPF_SUB: -+ emit(ctx, addiu, dst, dst, -imm); -+ break; -+ } -+ clobber_reg(ctx, dst); -+} -+ -+/* ALU register operation (32-bit) */ -+void emit_alu_r(struct jit_context *ctx, u8 dst, u8 src, u8 op) -+{ -+ switch (BPF_OP(op)) { -+ /* dst = dst & src */ -+ case BPF_AND: -+ emit(ctx, and, dst, dst, src); -+ break; -+ /* dst = dst | src */ -+ case BPF_OR: -+ emit(ctx, or, dst, dst, src); -+ break; -+ /* dst = dst ^ src */ -+ case BPF_XOR: -+ emit(ctx, xor, dst, dst, src); -+ break; -+ /* dst = dst << src */ -+ case BPF_LSH: -+ emit(ctx, sllv, dst, dst, src); -+ break; -+ /* dst = dst >> src */ -+ case BPF_RSH: -+ emit(ctx, srlv, dst, dst, src); -+ break; -+ /* dst = dst >> src (arithmetic) */ -+ case BPF_ARSH: -+ emit(ctx, srav, dst, dst, src); -+ break; -+ /* dst = dst + src */ -+ case BPF_ADD: -+ emit(ctx, addu, dst, dst, src); -+ break; -+ /* dst = dst - src */ -+ case BPF_SUB: -+ emit(ctx, subu, dst, dst, src); -+ break; -+ /* dst = dst * src */ -+ case BPF_MUL: -+ if (cpu_has_mips32r1 || cpu_has_mips32r6) { -+ emit(ctx, mul, dst, dst, src); -+ } else { -+ emit(ctx, multu, dst, src); -+ emit(ctx, mflo, dst); -+ } -+ break; -+ /* dst = dst / src */ -+ case BPF_DIV: -+ if (cpu_has_mips32r6) { -+ emit(ctx, divu_r6, dst, dst, src); -+ } else { -+ emit(ctx, divu, dst, src); -+ emit(ctx, mflo, dst); -+ } -+ break; -+ /* dst = dst % src */ -+ case BPF_MOD: -+ if (cpu_has_mips32r6) { -+ emit(ctx, modu, dst, dst, src); -+ } else { -+ emit(ctx, divu, dst, src); -+ emit(ctx, mfhi, dst); -+ } -+ break; -+ } -+ clobber_reg(ctx, dst); -+} -+ -+/* Atomic read-modify-write (32-bit) */ -+void emit_atomic_r(struct jit_context *ctx, u8 dst, u8 src, s16 off, u8 code) -+{ -+ emit(ctx, ll, MIPS_R_T9, off, dst); -+ switch (code) { -+ case BPF_ADD: -+ emit(ctx, addu, MIPS_R_T8, MIPS_R_T9, src); -+ break; -+ case BPF_AND: -+ emit(ctx, and, MIPS_R_T8, MIPS_R_T9, src); -+ break; -+ case BPF_OR: -+ emit(ctx, or, MIPS_R_T8, MIPS_R_T9, src); -+ break; -+ case BPF_XOR: -+ emit(ctx, xor, MIPS_R_T8, MIPS_R_T9, src); -+ break; -+ } -+ emit(ctx, sc, MIPS_R_T8, off, dst); -+ emit(ctx, beqz, MIPS_R_T8, -16); -+ emit(ctx, nop); /* Delay slot */ -+} -+ -+/* Atomic compare-and-exchange (32-bit) */ -+void emit_cmpxchg_r(struct jit_context *ctx, u8 dst, u8 src, u8 res, s16 off) -+{ -+ emit(ctx, ll, MIPS_R_T9, off, dst); -+ emit(ctx, bne, MIPS_R_T9, res, 12); -+ emit(ctx, move, MIPS_R_T8, src); /* Delay slot */ -+ emit(ctx, sc, MIPS_R_T8, off, dst); -+ emit(ctx, beqz, MIPS_R_T8, -20); -+ emit(ctx, move, res, MIPS_R_T9); /* Delay slot */ -+ clobber_reg(ctx, res); -+} -+ -+/* Swap bytes and truncate a register word or half word */ -+void emit_bswap_r(struct jit_context *ctx, u8 dst, u32 width) -+{ -+ u8 tmp = MIPS_R_T8; -+ u8 msk = MIPS_R_T9; -+ -+ switch (width) { -+ /* Swap bytes in a word */ -+ case 32: -+ if (cpu_has_mips32r2 || cpu_has_mips32r6) { -+ emit(ctx, wsbh, dst, dst); -+ emit(ctx, rotr, dst, dst, 16); -+ } else { -+ emit(ctx, sll, tmp, dst, 16); /* tmp = dst << 16 */ -+ emit(ctx, srl, dst, dst, 16); /* dst = dst >> 16 */ -+ emit(ctx, or, dst, dst, tmp); /* dst = dst | tmp */ -+ -+ emit(ctx, lui, msk, 0xff); /* msk = 0x00ff0000 */ -+ emit(ctx, ori, msk, msk, 0xff); /* msk = msk | 0xff */ -+ -+ emit(ctx, and, tmp, dst, msk); /* tmp = dst & msk */ -+ emit(ctx, sll, tmp, tmp, 8); /* tmp = tmp << 8 */ -+ emit(ctx, srl, dst, dst, 8); /* dst = dst >> 8 */ -+ emit(ctx, and, dst, dst, msk); /* dst = dst & msk */ -+ emit(ctx, or, dst, dst, tmp); /* reg = dst | tmp */ -+ } -+ break; -+ /* Swap bytes in a half word */ -+ case 16: -+ if (cpu_has_mips32r2 || cpu_has_mips32r6) { -+ emit(ctx, wsbh, dst, dst); -+ emit(ctx, andi, dst, dst, 0xffff); -+ } else { -+ emit(ctx, andi, tmp, dst, 0xff00); /* t = d & 0xff00 */ -+ emit(ctx, srl, tmp, tmp, 8); /* t = t >> 8 */ -+ emit(ctx, andi, dst, dst, 0x00ff); /* d = d & 0x00ff */ -+ emit(ctx, sll, dst, dst, 8); /* d = d << 8 */ -+ emit(ctx, or, dst, dst, tmp); /* d = d | t */ -+ } -+ break; -+ } -+ clobber_reg(ctx, dst); -+} -+ -+/* Validate jump immediate range */ -+bool valid_jmp_i(u8 op, s32 imm) -+{ -+ switch (op) { -+ case JIT_JNOP: -+ /* Immediate value not used */ -+ return true; -+ case BPF_JEQ: -+ case BPF_JNE: -+ /* No immediate operation */ -+ return false; -+ case BPF_JSET: -+ case JIT_JNSET: -+ /* imm must be 16 bits unsigned */ -+ return imm >= 0 && imm <= 0xffff; -+ case BPF_JGE: -+ case BPF_JLT: -+ case BPF_JSGE: -+ case BPF_JSLT: -+ /* imm must be 16 bits */ -+ return imm >= -0x8000 && imm <= 0x7fff; -+ case BPF_JGT: -+ case BPF_JLE: -+ case BPF_JSGT: -+ case BPF_JSLE: -+ /* imm + 1 must be 16 bits */ -+ return imm >= -0x8001 && imm <= 0x7ffe; -+ } -+ return false; -+} -+ -+/* Invert a conditional jump operation */ -+static u8 invert_jmp(u8 op) -+{ -+ switch (op) { -+ case BPF_JA: return JIT_JNOP; -+ case BPF_JEQ: return BPF_JNE; -+ case BPF_JNE: return BPF_JEQ; -+ case BPF_JSET: return JIT_JNSET; -+ case BPF_JGT: return BPF_JLE; -+ case BPF_JGE: return BPF_JLT; -+ case BPF_JLT: return BPF_JGE; -+ case BPF_JLE: return BPF_JGT; -+ case BPF_JSGT: return BPF_JSLE; -+ case BPF_JSGE: return BPF_JSLT; -+ case BPF_JSLT: return BPF_JSGE; -+ case BPF_JSLE: return BPF_JSGT; -+ } -+ return 0; -+} -+ -+/* Prepare a PC-relative jump operation */ -+static void setup_jmp(struct jit_context *ctx, u8 bpf_op, -+ s16 bpf_off, u8 *jit_op, s32 *jit_off) -+{ -+ u32 *descp = &ctx->descriptors[ctx->bpf_index]; -+ int op = bpf_op; -+ int offset = 0; -+ -+ /* Do not compute offsets on the first pass */ -+ if (INDEX(*descp) == 0) -+ goto done; -+ -+ /* Skip jumps never taken */ -+ if (bpf_op == JIT_JNOP) -+ goto done; -+ -+ /* Convert jumps always taken */ -+ if (bpf_op == BPF_JA) -+ *descp |= JIT_DESC_CONVERT; -+ -+ /* -+ * Current ctx->jit_index points to the start of the branch preamble. -+ * Since the preamble differs among different branch conditionals, -+ * the current index cannot be used to compute the branch offset. -+ * Instead, we use the offset table value for the next instruction, -+ * which gives the index immediately after the branch delay slot. -+ */ -+ if (!CONVERTED(*descp)) { -+ int target = ctx->bpf_index + bpf_off + 1; -+ int origin = ctx->bpf_index + 1; -+ -+ offset = (INDEX(ctx->descriptors[target]) - -+ INDEX(ctx->descriptors[origin]) + 1) * sizeof(u32); -+ } -+ -+ /* -+ * The PC-relative branch offset field on MIPS is 18 bits signed, -+ * so if the computed offset is larger than this we generate a an -+ * absolute jump that we skip with an inverted conditional branch. -+ */ -+ if (CONVERTED(*descp) || offset < -0x20000 || offset > 0x1ffff) { -+ offset = 3 * sizeof(u32); -+ op = invert_jmp(bpf_op); -+ ctx->changes += !CONVERTED(*descp); -+ *descp |= JIT_DESC_CONVERT; -+ } -+ -+done: -+ *jit_off = offset; -+ *jit_op = op; -+} -+ -+/* Prepare a PC-relative jump operation with immediate conditional */ -+void setup_jmp_i(struct jit_context *ctx, s32 imm, u8 width, -+ u8 bpf_op, s16 bpf_off, u8 *jit_op, s32 *jit_off) -+{ -+ bool always = false; -+ bool never = false; -+ -+ switch (bpf_op) { -+ case BPF_JEQ: -+ case BPF_JNE: -+ break; -+ case BPF_JSET: -+ case BPF_JLT: -+ never = imm == 0; -+ break; -+ case BPF_JGE: -+ always = imm == 0; -+ break; -+ case BPF_JGT: -+ never = (u32)imm == U32_MAX; -+ break; -+ case BPF_JLE: -+ always = (u32)imm == U32_MAX; -+ break; -+ case BPF_JSGT: -+ never = imm == S32_MAX && width == 32; -+ break; -+ case BPF_JSGE: -+ always = imm == S32_MIN && width == 32; -+ break; -+ case BPF_JSLT: -+ never = imm == S32_MIN && width == 32; -+ break; -+ case BPF_JSLE: -+ always = imm == S32_MAX && width == 32; -+ break; -+ } -+ -+ if (never) -+ bpf_op = JIT_JNOP; -+ if (always) -+ bpf_op = BPF_JA; -+ setup_jmp(ctx, bpf_op, bpf_off, jit_op, jit_off); -+} -+ -+/* Prepare a PC-relative jump operation with register conditional */ -+void setup_jmp_r(struct jit_context *ctx, bool same_reg, -+ u8 bpf_op, s16 bpf_off, u8 *jit_op, s32 *jit_off) -+{ -+ switch (bpf_op) { -+ case BPF_JSET: -+ break; -+ case BPF_JEQ: -+ case BPF_JGE: -+ case BPF_JLE: -+ case BPF_JSGE: -+ case BPF_JSLE: -+ if (same_reg) -+ bpf_op = BPF_JA; -+ break; -+ case BPF_JNE: -+ case BPF_JLT: -+ case BPF_JGT: -+ case BPF_JSGT: -+ case BPF_JSLT: -+ if (same_reg) -+ bpf_op = JIT_JNOP; -+ break; -+ } -+ setup_jmp(ctx, bpf_op, bpf_off, jit_op, jit_off); -+} -+ -+/* Finish a PC-relative jump operation */ -+int finish_jmp(struct jit_context *ctx, u8 jit_op, s16 bpf_off) -+{ -+ /* Emit conditional branch delay slot */ -+ if (jit_op != JIT_JNOP) -+ emit(ctx, nop); -+ /* -+ * Emit an absolute long jump with delay slot, -+ * if the PC-relative branch was converted. -+ */ -+ if (CONVERTED(ctx->descriptors[ctx->bpf_index])) { -+ int target = get_target(ctx, ctx->bpf_index + bpf_off + 1); -+ -+ if (target < 0) -+ return -1; -+ emit(ctx, j, target); -+ emit(ctx, nop); -+ } -+ return 0; -+} -+ -+/* Jump immediate (32-bit) */ -+void emit_jmp_i(struct jit_context *ctx, u8 dst, s32 imm, s32 off, u8 op) -+{ -+ switch (op) { -+ /* No-op, used internally for branch optimization */ -+ case JIT_JNOP: -+ break; -+ /* PC += off if dst & imm */ -+ case BPF_JSET: -+ emit(ctx, andi, MIPS_R_T9, dst, (u16)imm); -+ emit(ctx, bnez, MIPS_R_T9, off); -+ break; -+ /* PC += off if (dst & imm) == 0 (not in BPF, used for long jumps) */ -+ case JIT_JNSET: -+ emit(ctx, andi, MIPS_R_T9, dst, (u16)imm); -+ emit(ctx, beqz, MIPS_R_T9, off); -+ break; -+ /* PC += off if dst > imm */ -+ case BPF_JGT: -+ emit(ctx, sltiu, MIPS_R_T9, dst, imm + 1); -+ emit(ctx, beqz, MIPS_R_T9, off); -+ break; -+ /* PC += off if dst >= imm */ -+ case BPF_JGE: -+ emit(ctx, sltiu, MIPS_R_T9, dst, imm); -+ emit(ctx, beqz, MIPS_R_T9, off); -+ break; -+ /* PC += off if dst < imm */ -+ case BPF_JLT: -+ emit(ctx, sltiu, MIPS_R_T9, dst, imm); -+ emit(ctx, bnez, MIPS_R_T9, off); -+ break; -+ /* PC += off if dst <= imm */ -+ case BPF_JLE: -+ emit(ctx, sltiu, MIPS_R_T9, dst, imm + 1); -+ emit(ctx, bnez, MIPS_R_T9, off); -+ break; -+ /* PC += off if dst > imm (signed) */ -+ case BPF_JSGT: -+ emit(ctx, slti, MIPS_R_T9, dst, imm + 1); -+ emit(ctx, beqz, MIPS_R_T9, off); -+ break; -+ /* PC += off if dst >= imm (signed) */ -+ case BPF_JSGE: -+ emit(ctx, slti, MIPS_R_T9, dst, imm); -+ emit(ctx, beqz, MIPS_R_T9, off); -+ break; -+ /* PC += off if dst < imm (signed) */ -+ case BPF_JSLT: -+ emit(ctx, slti, MIPS_R_T9, dst, imm); -+ emit(ctx, bnez, MIPS_R_T9, off); -+ break; -+ /* PC += off if dst <= imm (signed) */ -+ case BPF_JSLE: -+ emit(ctx, slti, MIPS_R_T9, dst, imm + 1); -+ emit(ctx, bnez, MIPS_R_T9, off); -+ break; -+ } -+} -+ -+/* Jump register (32-bit) */ -+void emit_jmp_r(struct jit_context *ctx, u8 dst, u8 src, s32 off, u8 op) -+{ -+ switch (op) { -+ /* No-op, used internally for branch optimization */ -+ case JIT_JNOP: -+ break; -+ /* PC += off if dst == src */ -+ case BPF_JEQ: -+ emit(ctx, beq, dst, src, off); -+ break; -+ /* PC += off if dst != src */ -+ case BPF_JNE: -+ emit(ctx, bne, dst, src, off); -+ break; -+ /* PC += off if dst & src */ -+ case BPF_JSET: -+ emit(ctx, and, MIPS_R_T9, dst, src); -+ emit(ctx, bnez, MIPS_R_T9, off); -+ break; -+ /* PC += off if (dst & imm) == 0 (not in BPF, used for long jumps) */ -+ case JIT_JNSET: -+ emit(ctx, and, MIPS_R_T9, dst, src); -+ emit(ctx, beqz, MIPS_R_T9, off); -+ break; -+ /* PC += off if dst > src */ -+ case BPF_JGT: -+ emit(ctx, sltu, MIPS_R_T9, src, dst); -+ emit(ctx, bnez, MIPS_R_T9, off); -+ break; -+ /* PC += off if dst >= src */ -+ case BPF_JGE: -+ emit(ctx, sltu, MIPS_R_T9, dst, src); -+ emit(ctx, beqz, MIPS_R_T9, off); -+ break; -+ /* PC += off if dst < src */ -+ case BPF_JLT: -+ emit(ctx, sltu, MIPS_R_T9, dst, src); -+ emit(ctx, bnez, MIPS_R_T9, off); -+ break; -+ /* PC += off if dst <= src */ -+ case BPF_JLE: -+ emit(ctx, sltu, MIPS_R_T9, src, dst); -+ emit(ctx, beqz, MIPS_R_T9, off); -+ break; -+ /* PC += off if dst > src (signed) */ -+ case BPF_JSGT: -+ emit(ctx, slt, MIPS_R_T9, src, dst); -+ emit(ctx, bnez, MIPS_R_T9, off); -+ break; -+ /* PC += off if dst >= src (signed) */ -+ case BPF_JSGE: -+ emit(ctx, slt, MIPS_R_T9, dst, src); -+ emit(ctx, beqz, MIPS_R_T9, off); -+ break; -+ /* PC += off if dst < src (signed) */ -+ case BPF_JSLT: -+ emit(ctx, slt, MIPS_R_T9, dst, src); -+ emit(ctx, bnez, MIPS_R_T9, off); -+ break; -+ /* PC += off if dst <= src (signed) */ -+ case BPF_JSLE: -+ emit(ctx, slt, MIPS_R_T9, src, dst); -+ emit(ctx, beqz, MIPS_R_T9, off); -+ break; -+ } -+} -+ -+/* Jump always */ -+int emit_ja(struct jit_context *ctx, s16 off) -+{ -+ int target = get_target(ctx, ctx->bpf_index + off + 1); -+ -+ if (target < 0) -+ return -1; -+ emit(ctx, j, target); -+ emit(ctx, nop); -+ return 0; -+} -+ -+/* Jump to epilogue */ -+int emit_exit(struct jit_context *ctx) -+{ -+ int target = get_target(ctx, ctx->program->len); -+ -+ if (target < 0) -+ return -1; -+ emit(ctx, j, target); -+ emit(ctx, nop); -+ return 0; -+} -+ -+/* Build the program body from eBPF bytecode */ -+static int build_body(struct jit_context *ctx) -+{ -+ const struct bpf_prog *prog = ctx->program; -+ unsigned int i; -+ -+ ctx->stack_used = 0; -+ for (i = 0; i < prog->len; i++) { -+ const struct bpf_insn *insn = &prog->insnsi[i]; -+ u32 *descp = &ctx->descriptors[i]; -+ int ret; -+ -+ access_reg(ctx, insn->src_reg); -+ access_reg(ctx, insn->dst_reg); -+ -+ ctx->bpf_index = i; -+ if (ctx->target == NULL) { -+ ctx->changes += INDEX(*descp) != ctx->jit_index; -+ *descp &= JIT_DESC_CONVERT; -+ *descp |= ctx->jit_index; -+ } -+ -+ ret = build_insn(insn, ctx); -+ if (ret < 0) -+ return ret; -+ -+ if (ret > 0) { -+ i++; -+ if (ctx->target == NULL) -+ descp[1] = ctx->jit_index; -+ } -+ } -+ -+ /* Store the end offset, where the epilogue begins */ -+ ctx->descriptors[prog->len] = ctx->jit_index; -+ return 0; -+} -+ -+/* Set the branch conversion flag on all instructions */ -+static void set_convert_flag(struct jit_context *ctx, bool enable) -+{ -+ const struct bpf_prog *prog = ctx->program; -+ u32 flag = enable ? JIT_DESC_CONVERT : 0; -+ unsigned int i; -+ -+ for (i = 0; i <= prog->len; i++) -+ ctx->descriptors[i] = INDEX(ctx->descriptors[i]) | flag; -+} -+ -+static void jit_fill_hole(void *area, unsigned int size) -+{ -+ u32 *p; -+ -+ /* We are guaranteed to have aligned memory. */ -+ for (p = area; size >= sizeof(u32); size -= sizeof(u32)) -+ uasm_i_break(&p, BRK_BUG); /* Increments p */ -+} -+ -+bool bpf_jit_needs_zext(void) -+{ -+ return true; -+} -+ -+struct bpf_prog *bpf_int_jit_compile(struct bpf_prog *prog) -+{ -+ struct bpf_prog *tmp, *orig_prog = prog; -+ struct bpf_binary_header *header = NULL; -+ struct jit_context ctx; -+ bool tmp_blinded = false; -+ unsigned int tmp_idx; -+ unsigned int image_size; -+ u8 *image_ptr; -+ int tries; -+ -+ /* -+ * If BPF JIT was not enabled then we must fall back to -+ * the interpreter. -+ */ -+ if (!prog->jit_requested) -+ return orig_prog; -+ /* -+ * If constant blinding was enabled and we failed during blinding -+ * then we must fall back to the interpreter. Otherwise, we save -+ * the new JITed code. -+ */ -+ tmp = bpf_jit_blind_constants(prog); -+ if (IS_ERR(tmp)) -+ return orig_prog; -+ if (tmp != prog) { -+ tmp_blinded = true; -+ prog = tmp; -+ } -+ -+ memset(&ctx, 0, sizeof(ctx)); -+ ctx.program = prog; -+ -+ /* -+ * Not able to allocate memory for descriptors[], then -+ * we must fall back to the interpreter -+ */ -+ ctx.descriptors = kcalloc(prog->len + 1, sizeof(*ctx.descriptors), -+ GFP_KERNEL); -+ if (ctx.descriptors == NULL) -+ goto out_err; -+ -+ /* First pass discovers used resources */ -+ if (build_body(&ctx) < 0) -+ goto out_err; -+ /* -+ * Second pass computes instruction offsets. -+ * If any PC-relative branches are out of range, a sequence of -+ * a PC-relative branch + a jump is generated, and we have to -+ * try again from the beginning to generate the new offsets. -+ * This is done until no additional conversions are necessary. -+ * The last two iterations are done with all branches being -+ * converted, to guarantee offset table convergence within a -+ * fixed number of iterations. -+ */ -+ ctx.jit_index = 0; -+ build_prologue(&ctx); -+ tmp_idx = ctx.jit_index; -+ -+ tries = JIT_MAX_ITERATIONS; -+ do { -+ ctx.jit_index = tmp_idx; -+ ctx.changes = 0; -+ if (tries == 2) -+ set_convert_flag(&ctx, true); -+ if (build_body(&ctx) < 0) -+ goto out_err; -+ } while (ctx.changes > 0 && --tries > 0); -+ -+ if (WARN_ONCE(ctx.changes > 0, "JIT offsets failed to converge")) -+ goto out_err; -+ -+ build_epilogue(&ctx, MIPS_R_RA); -+ -+ /* Now we know the size of the structure to make */ -+ image_size = sizeof(u32) * ctx.jit_index; -+ header = bpf_jit_binary_alloc(image_size, &image_ptr, -+ sizeof(u32), jit_fill_hole); -+ /* -+ * Not able to allocate memory for the structure then -+ * we must fall back to the interpretation -+ */ -+ if (header == NULL) -+ goto out_err; -+ -+ /* Actual pass to generate final JIT code */ -+ ctx.target = (u32 *)image_ptr; -+ ctx.jit_index = 0; -+ -+ /* -+ * If building the JITed code fails somehow, -+ * we fall back to the interpretation. -+ */ -+ build_prologue(&ctx); -+ if (build_body(&ctx) < 0) -+ goto out_err; -+ build_epilogue(&ctx, MIPS_R_RA); -+ -+ /* Populate line info meta data */ -+ set_convert_flag(&ctx, false); -+ bpf_prog_fill_jited_linfo(prog, &ctx.descriptors[1]); -+ -+ /* Set as read-only exec and flush instruction cache */ -+ bpf_jit_binary_lock_ro(header); -+ flush_icache_range((unsigned long)header, -+ (unsigned long)&ctx.target[ctx.jit_index]); -+ -+ if (bpf_jit_enable > 1) -+ bpf_jit_dump(prog->len, image_size, 2, ctx.target); -+ -+ prog->bpf_func = (void *)ctx.target; -+ prog->jited = 1; -+ prog->jited_len = image_size; -+ -+out: -+ if (tmp_blinded) -+ bpf_jit_prog_release_other(prog, prog == orig_prog ? -+ tmp : orig_prog); -+ kfree(ctx.descriptors); -+ return prog; -+ -+out_err: -+ prog = orig_prog; -+ if (header) -+ bpf_jit_binary_free(header); -+ goto out; -+} ---- /dev/null -+++ b/arch/mips/net/bpf_jit_comp.h -@@ -0,0 +1,211 @@ -+/* SPDX-License-Identifier: GPL-2.0-only */ -+/* -+ * Just-In-Time compiler for eBPF bytecode on 32-bit and 64-bit MIPS. -+ * -+ * Copyright (c) 2021 Anyfi Networks AB. -+ * Author: Johan Almbladh -+ * -+ * Based on code and ideas from -+ * Copyright (c) 2017 Cavium, Inc. -+ * Copyright (c) 2017 Shubham Bansal -+ * Copyright (c) 2011 Mircea Gherzan -+ */ -+ -+#ifndef _BPF_JIT_COMP_H -+#define _BPF_JIT_COMP_H -+ -+/* MIPS registers */ -+#define MIPS_R_ZERO 0 /* Const zero */ -+#define MIPS_R_AT 1 /* Asm temp */ -+#define MIPS_R_V0 2 /* Result */ -+#define MIPS_R_V1 3 /* Result */ -+#define MIPS_R_A0 4 /* Argument */ -+#define MIPS_R_A1 5 /* Argument */ -+#define MIPS_R_A2 6 /* Argument */ -+#define MIPS_R_A3 7 /* Argument */ -+#define MIPS_R_A4 8 /* Arg (n64) */ -+#define MIPS_R_A5 9 /* Arg (n64) */ -+#define MIPS_R_A6 10 /* Arg (n64) */ -+#define MIPS_R_A7 11 /* Arg (n64) */ -+#define MIPS_R_T0 8 /* Temp (o32) */ -+#define MIPS_R_T1 9 /* Temp (o32) */ -+#define MIPS_R_T2 10 /* Temp (o32) */ -+#define MIPS_R_T3 11 /* Temp (o32) */ -+#define MIPS_R_T4 12 /* Temporary */ -+#define MIPS_R_T5 13 /* Temporary */ -+#define MIPS_R_T6 14 /* Temporary */ -+#define MIPS_R_T7 15 /* Temporary */ -+#define MIPS_R_S0 16 /* Saved */ -+#define MIPS_R_S1 17 /* Saved */ -+#define MIPS_R_S2 18 /* Saved */ -+#define MIPS_R_S3 19 /* Saved */ -+#define MIPS_R_S4 20 /* Saved */ -+#define MIPS_R_S5 21 /* Saved */ -+#define MIPS_R_S6 22 /* Saved */ -+#define MIPS_R_S7 23 /* Saved */ -+#define MIPS_R_T8 24 /* Temporary */ -+#define MIPS_R_T9 25 /* Temporary */ -+/* MIPS_R_K0 26 Reserved */ -+/* MIPS_R_K1 27 Reserved */ -+#define MIPS_R_GP 28 /* Global ptr */ -+#define MIPS_R_SP 29 /* Stack ptr */ -+#define MIPS_R_FP 30 /* Frame ptr */ -+#define MIPS_R_RA 31 /* Return */ -+ -+/* -+ * Jump address mask for immediate jumps. The four most significant bits -+ * must be equal to PC. -+ */ -+#define MIPS_JMP_MASK 0x0fffffffUL -+ -+/* Maximum number of iterations in offset table computation */ -+#define JIT_MAX_ITERATIONS 8 -+ -+/* -+ * Jump pseudo-instructions used internally -+ * for branch conversion and branch optimization. -+ */ -+#define JIT_JNSET 0xe0 -+#define JIT_JNOP 0xf0 -+ -+/* Descriptor flag for PC-relative branch conversion */ -+#define JIT_DESC_CONVERT BIT(31) -+ -+/* JIT context for an eBPF program */ -+struct jit_context { -+ struct bpf_prog *program; /* The eBPF program being JITed */ -+ u32 *descriptors; /* eBPF to JITed CPU insn descriptors */ -+ u32 *target; /* JITed code buffer */ -+ u32 bpf_index; /* Index of current BPF program insn */ -+ u32 jit_index; /* Index of current JIT target insn */ -+ u32 changes; /* Number of PC-relative branch conv */ -+ u32 accessed; /* Bit mask of read eBPF registers */ -+ u32 clobbered; /* Bit mask of modified CPU registers */ -+ u32 stack_size; /* Total allocated stack size in bytes */ -+ u32 saved_size; /* Size of callee-saved registers */ -+ u32 stack_used; /* Stack size used for function calls */ -+}; -+ -+/* Emit the instruction if the JIT memory space has been allocated */ -+#define emit(ctx, func, ...) \ -+do { \ -+ if ((ctx)->target != NULL) { \ -+ u32 *p = &(ctx)->target[ctx->jit_index]; \ -+ uasm_i_##func(&p, ##__VA_ARGS__); \ -+ } \ -+ (ctx)->jit_index++; \ -+} while (0) -+ -+/* -+ * Mark a BPF register as accessed, it needs to be -+ * initialized by the program if expected, e.g. FP. -+ */ -+static inline void access_reg(struct jit_context *ctx, u8 reg) -+{ -+ ctx->accessed |= BIT(reg); -+} -+ -+/* -+ * Mark a CPU register as clobbered, it needs to be -+ * saved/restored by the program if callee-saved. -+ */ -+static inline void clobber_reg(struct jit_context *ctx, u8 reg) -+{ -+ ctx->clobbered |= BIT(reg); -+} -+ -+/* -+ * Push registers on the stack, starting at a given depth from the stack -+ * pointer and increasing. The next depth to be written is returned. -+ */ -+int push_regs(struct jit_context *ctx, u32 mask, u32 excl, int depth); -+ -+/* -+ * Pop registers from the stack, starting at a given depth from the stack -+ * pointer and increasing. The next depth to be read is returned. -+ */ -+int pop_regs(struct jit_context *ctx, u32 mask, u32 excl, int depth); -+ -+/* Compute the 28-bit jump target address from a BPF program location */ -+int get_target(struct jit_context *ctx, u32 loc); -+ -+/* Compute the PC-relative offset to relative BPF program offset */ -+int get_offset(const struct jit_context *ctx, int off); -+ -+/* dst = imm (32-bit) */ -+void emit_mov_i(struct jit_context *ctx, u8 dst, s32 imm); -+ -+/* dst = src (32-bit) */ -+void emit_mov_r(struct jit_context *ctx, u8 dst, u8 src); -+ -+/* Validate ALU/ALU64 immediate range */ -+bool valid_alu_i(u8 op, s32 imm); -+ -+/* Rewrite ALU/ALU64 immediate operation */ -+bool rewrite_alu_i(u8 op, s32 imm, u8 *alu, s32 *val); -+ -+/* ALU immediate operation (32-bit) */ -+void emit_alu_i(struct jit_context *ctx, u8 dst, s32 imm, u8 op); -+ -+/* ALU register operation (32-bit) */ -+void emit_alu_r(struct jit_context *ctx, u8 dst, u8 src, u8 op); -+ -+/* Atomic read-modify-write (32-bit) */ -+void emit_atomic_r(struct jit_context *ctx, u8 dst, u8 src, s16 off, u8 code); -+ -+/* Atomic compare-and-exchange (32-bit) */ -+void emit_cmpxchg_r(struct jit_context *ctx, u8 dst, u8 src, u8 res, s16 off); -+ -+/* Swap bytes and truncate a register word or half word */ -+void emit_bswap_r(struct jit_context *ctx, u8 dst, u32 width); -+ -+/* Validate JMP/JMP32 immediate range */ -+bool valid_jmp_i(u8 op, s32 imm); -+ -+/* Prepare a PC-relative jump operation with immediate conditional */ -+void setup_jmp_i(struct jit_context *ctx, s32 imm, u8 width, -+ u8 bpf_op, s16 bpf_off, u8 *jit_op, s32 *jit_off); -+ -+/* Prepare a PC-relative jump operation with register conditional */ -+void setup_jmp_r(struct jit_context *ctx, bool same_reg, -+ u8 bpf_op, s16 bpf_off, u8 *jit_op, s32 *jit_off); -+ -+/* Finish a PC-relative jump operation */ -+int finish_jmp(struct jit_context *ctx, u8 jit_op, s16 bpf_off); -+ -+/* Conditional JMP/JMP32 immediate */ -+void emit_jmp_i(struct jit_context *ctx, u8 dst, s32 imm, s32 off, u8 op); -+ -+/* Conditional JMP/JMP32 register */ -+void emit_jmp_r(struct jit_context *ctx, u8 dst, u8 src, s32 off, u8 op); -+ -+/* Jump always */ -+int emit_ja(struct jit_context *ctx, s16 off); -+ -+/* Jump to epilogue */ -+int emit_exit(struct jit_context *ctx); -+ -+/* -+ * Build program prologue to set up the stack and registers. -+ * This function is implemented separately for 32-bit and 64-bit JITs. -+ */ -+void build_prologue(struct jit_context *ctx); -+ -+/* -+ * Build the program epilogue to restore the stack and registers. -+ * This function is implemented separately for 32-bit and 64-bit JITs. -+ */ -+void build_epilogue(struct jit_context *ctx, int dest_reg); -+ -+/* -+ * Convert an eBPF instruction to native instruction, i.e -+ * JITs an eBPF instruction. -+ * Returns : -+ * 0 - Successfully JITed an 8-byte eBPF instruction -+ * >0 - Successfully JITed a 16-byte eBPF instruction -+ * <0 - Failed to JIT. -+ * This function is implemented separately for 32-bit and 64-bit JITs. -+ */ -+int build_insn(const struct bpf_insn *insn, struct jit_context *ctx); -+ -+#endif /* _BPF_JIT_COMP_H */ ---- /dev/null -+++ b/arch/mips/net/bpf_jit_comp32.c -@@ -0,0 +1,1741 @@ -+// SPDX-License-Identifier: GPL-2.0-only -+/* -+ * Just-In-Time compiler for eBPF bytecode on MIPS. -+ * Implementation of JIT functions for 32-bit CPUs. -+ * -+ * Copyright (c) 2021 Anyfi Networks AB. -+ * Author: Johan Almbladh -+ * -+ * Based on code and ideas from -+ * Copyright (c) 2017 Cavium, Inc. -+ * Copyright (c) 2017 Shubham Bansal -+ * Copyright (c) 2011 Mircea Gherzan -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include "bpf_jit_comp.h" -+ -+/* MIPS a4-a7 are not available in the o32 ABI */ -+#undef MIPS_R_A4 -+#undef MIPS_R_A5 -+#undef MIPS_R_A6 -+#undef MIPS_R_A7 -+ -+/* Stack is 8-byte aligned in o32 ABI */ -+#define MIPS_STACK_ALIGNMENT 8 -+ -+/* -+ * The top 16 bytes of a stack frame is reserved for the callee in O32 ABI. -+ * This corresponds to stack space for register arguments a0-a3. -+ */ -+#define JIT_RESERVED_STACK 16 -+ -+/* Temporary 64-bit register used by JIT */ -+#define JIT_REG_TMP MAX_BPF_JIT_REG -+ -+/* -+ * Number of prologue bytes to skip when doing a tail call. -+ * Tail call count (TCC) initialization (8 bytes) always, plus -+ * R0-to-v0 assignment (4 bytes) if big endian. -+ */ -+#ifdef __BIG_ENDIAN -+#define JIT_TCALL_SKIP 12 -+#else -+#define JIT_TCALL_SKIP 8 -+#endif -+ -+/* CPU registers holding the callee return value */ -+#define JIT_RETURN_REGS \ -+ (BIT(MIPS_R_V0) | \ -+ BIT(MIPS_R_V1)) -+ -+/* CPU registers arguments passed to callee directly */ -+#define JIT_ARG_REGS \ -+ (BIT(MIPS_R_A0) | \ -+ BIT(MIPS_R_A1) | \ -+ BIT(MIPS_R_A2) | \ -+ BIT(MIPS_R_A3)) -+ -+/* CPU register arguments passed to callee on stack */ -+#define JIT_STACK_REGS \ -+ (BIT(MIPS_R_T0) | \ -+ BIT(MIPS_R_T1) | \ -+ BIT(MIPS_R_T2) | \ -+ BIT(MIPS_R_T3) | \ -+ BIT(MIPS_R_T4) | \ -+ BIT(MIPS_R_T5)) -+ -+/* Caller-saved CPU registers */ -+#define JIT_CALLER_REGS \ -+ (JIT_RETURN_REGS | \ -+ JIT_ARG_REGS | \ -+ JIT_STACK_REGS) -+ -+/* Callee-saved CPU registers */ -+#define JIT_CALLEE_REGS \ -+ (BIT(MIPS_R_S0) | \ -+ BIT(MIPS_R_S1) | \ -+ BIT(MIPS_R_S2) | \ -+ BIT(MIPS_R_S3) | \ -+ BIT(MIPS_R_S4) | \ -+ BIT(MIPS_R_S5) | \ -+ BIT(MIPS_R_S6) | \ -+ BIT(MIPS_R_S7) | \ -+ BIT(MIPS_R_GP) | \ -+ BIT(MIPS_R_FP) | \ -+ BIT(MIPS_R_RA)) -+ -+/* -+ * Mapping of 64-bit eBPF registers to 32-bit native MIPS registers. -+ * -+ * 1) Native register pairs are ordered according to CPU endiannes, following -+ * the MIPS convention for passing 64-bit arguments and return values. -+ * 2) The eBPF return value, arguments and callee-saved registers are mapped -+ * to their native MIPS equivalents. -+ * 3) Since the 32 highest bits in the eBPF FP register are always zero, -+ * only one general-purpose register is actually needed for the mapping. -+ * We use the fp register for this purpose, and map the highest bits to -+ * the MIPS register r0 (zero). -+ * 4) We use the MIPS gp and at registers as internal temporary registers -+ * for constant blinding. The gp register is callee-saved. -+ * 5) One 64-bit temporary register is mapped for use when sign-extending -+ * immediate operands. MIPS registers t6-t9 are available to the JIT -+ * for as temporaries when implementing complex 64-bit operations. -+ * -+ * With this scheme all eBPF registers are being mapped to native MIPS -+ * registers without having to use any stack scratch space. The direct -+ * register mapping (2) simplifies the handling of function calls. -+ */ -+static const u8 bpf2mips32[][2] = { -+ /* Return value from in-kernel function, and exit value from eBPF */ -+ [BPF_REG_0] = {MIPS_R_V1, MIPS_R_V0}, -+ /* Arguments from eBPF program to in-kernel function */ -+ [BPF_REG_1] = {MIPS_R_A1, MIPS_R_A0}, -+ [BPF_REG_2] = {MIPS_R_A3, MIPS_R_A2}, -+ /* Remaining arguments, to be passed on the stack per O32 ABI */ -+ [BPF_REG_3] = {MIPS_R_T1, MIPS_R_T0}, -+ [BPF_REG_4] = {MIPS_R_T3, MIPS_R_T2}, -+ [BPF_REG_5] = {MIPS_R_T5, MIPS_R_T4}, -+ /* Callee-saved registers that in-kernel function will preserve */ -+ [BPF_REG_6] = {MIPS_R_S1, MIPS_R_S0}, -+ [BPF_REG_7] = {MIPS_R_S3, MIPS_R_S2}, -+ [BPF_REG_8] = {MIPS_R_S5, MIPS_R_S4}, -+ [BPF_REG_9] = {MIPS_R_S7, MIPS_R_S6}, -+ /* Read-only frame pointer to access the eBPF stack */ -+#ifdef __BIG_ENDIAN -+ [BPF_REG_FP] = {MIPS_R_FP, MIPS_R_ZERO}, -+#else -+ [BPF_REG_FP] = {MIPS_R_ZERO, MIPS_R_FP}, -+#endif -+ /* Temporary register for blinding constants */ -+ [BPF_REG_AX] = {MIPS_R_GP, MIPS_R_AT}, -+ /* Temporary register for internal JIT use */ -+ [JIT_REG_TMP] = {MIPS_R_T7, MIPS_R_T6}, -+}; -+ -+/* Get low CPU register for a 64-bit eBPF register mapping */ -+static inline u8 lo(const u8 reg[]) -+{ -+#ifdef __BIG_ENDIAN -+ return reg[0]; -+#else -+ return reg[1]; -+#endif -+} -+ -+/* Get high CPU register for a 64-bit eBPF register mapping */ -+static inline u8 hi(const u8 reg[]) -+{ -+#ifdef __BIG_ENDIAN -+ return reg[1]; -+#else -+ return reg[0]; -+#endif -+} -+ -+/* -+ * Mark a 64-bit CPU register pair as clobbered, it needs to be -+ * saved/restored by the program if callee-saved. -+ */ -+static void clobber_reg64(struct jit_context *ctx, const u8 reg[]) -+{ -+ clobber_reg(ctx, reg[0]); -+ clobber_reg(ctx, reg[1]); -+} -+ -+/* dst = imm (sign-extended) */ -+static void emit_mov_se_i64(struct jit_context *ctx, const u8 dst[], s32 imm) -+{ -+ emit_mov_i(ctx, lo(dst), imm); -+ if (imm < 0) -+ emit(ctx, addiu, hi(dst), MIPS_R_ZERO, -1); -+ else -+ emit(ctx, move, hi(dst), MIPS_R_ZERO); -+ clobber_reg64(ctx, dst); -+} -+ -+/* Zero extension, if verifier does not do it for us */ -+static void emit_zext_ver(struct jit_context *ctx, const u8 dst[]) -+{ -+ if (!ctx->program->aux->verifier_zext) { -+ emit(ctx, move, hi(dst), MIPS_R_ZERO); -+ clobber_reg(ctx, hi(dst)); -+ } -+} -+ -+/* Load delay slot, if ISA mandates it */ -+static void emit_load_delay(struct jit_context *ctx) -+{ -+ if (!cpu_has_mips_2_3_4_5_r) -+ emit(ctx, nop); -+} -+ -+/* ALU immediate operation (64-bit) */ -+static void emit_alu_i64(struct jit_context *ctx, -+ const u8 dst[], s32 imm, u8 op) -+{ -+ u8 src = MIPS_R_T6; -+ -+ /* -+ * ADD/SUB with all but the max negative imm can be handled by -+ * inverting the operation and the imm value, saving one insn. -+ */ -+ if (imm > S32_MIN && imm < 0) -+ switch (op) { -+ case BPF_ADD: -+ op = BPF_SUB; -+ imm = -imm; -+ break; -+ case BPF_SUB: -+ op = BPF_ADD; -+ imm = -imm; -+ break; -+ } -+ -+ /* Move immediate to temporary register */ -+ emit_mov_i(ctx, src, imm); -+ -+ switch (op) { -+ /* dst = dst + imm */ -+ case BPF_ADD: -+ emit(ctx, addu, lo(dst), lo(dst), src); -+ emit(ctx, sltu, MIPS_R_T9, lo(dst), src); -+ emit(ctx, addu, hi(dst), hi(dst), MIPS_R_T9); -+ if (imm < 0) -+ emit(ctx, addiu, hi(dst), hi(dst), -1); -+ break; -+ /* dst = dst - imm */ -+ case BPF_SUB: -+ emit(ctx, sltu, MIPS_R_T9, lo(dst), src); -+ emit(ctx, subu, lo(dst), lo(dst), src); -+ emit(ctx, subu, hi(dst), hi(dst), MIPS_R_T9); -+ if (imm < 0) -+ emit(ctx, addiu, hi(dst), hi(dst), 1); -+ break; -+ /* dst = dst | imm */ -+ case BPF_OR: -+ emit(ctx, or, lo(dst), lo(dst), src); -+ if (imm < 0) -+ emit(ctx, addiu, hi(dst), MIPS_R_ZERO, -1); -+ break; -+ /* dst = dst & imm */ -+ case BPF_AND: -+ emit(ctx, and, lo(dst), lo(dst), src); -+ if (imm >= 0) -+ emit(ctx, move, hi(dst), MIPS_R_ZERO); -+ break; -+ /* dst = dst ^ imm */ -+ case BPF_XOR: -+ emit(ctx, xor, lo(dst), lo(dst), src); -+ if (imm < 0) { -+ emit(ctx, subu, hi(dst), MIPS_R_ZERO, hi(dst)); -+ emit(ctx, addiu, hi(dst), hi(dst), -1); -+ } -+ break; -+ } -+ clobber_reg64(ctx, dst); -+} -+ -+/* ALU register operation (64-bit) */ -+static void emit_alu_r64(struct jit_context *ctx, -+ const u8 dst[], const u8 src[], u8 op) -+{ -+ switch (BPF_OP(op)) { -+ /* dst = dst + src */ -+ case BPF_ADD: -+ if (src == dst) { -+ emit(ctx, srl, MIPS_R_T9, lo(dst), 31); -+ emit(ctx, addu, lo(dst), lo(dst), lo(dst)); -+ } else { -+ emit(ctx, addu, lo(dst), lo(dst), lo(src)); -+ emit(ctx, sltu, MIPS_R_T9, lo(dst), lo(src)); -+ } -+ emit(ctx, addu, hi(dst), hi(dst), hi(src)); -+ emit(ctx, addu, hi(dst), hi(dst), MIPS_R_T9); -+ break; -+ /* dst = dst - src */ -+ case BPF_SUB: -+ emit(ctx, sltu, MIPS_R_T9, lo(dst), lo(src)); -+ emit(ctx, subu, lo(dst), lo(dst), lo(src)); -+ emit(ctx, subu, hi(dst), hi(dst), hi(src)); -+ emit(ctx, subu, hi(dst), hi(dst), MIPS_R_T9); -+ break; -+ /* dst = dst | src */ -+ case BPF_OR: -+ emit(ctx, or, lo(dst), lo(dst), lo(src)); -+ emit(ctx, or, hi(dst), hi(dst), hi(src)); -+ break; -+ /* dst = dst & src */ -+ case BPF_AND: -+ emit(ctx, and, lo(dst), lo(dst), lo(src)); -+ emit(ctx, and, hi(dst), hi(dst), hi(src)); -+ break; -+ /* dst = dst ^ src */ -+ case BPF_XOR: -+ emit(ctx, xor, lo(dst), lo(dst), lo(src)); -+ emit(ctx, xor, hi(dst), hi(dst), hi(src)); -+ break; -+ } -+ clobber_reg64(ctx, dst); -+} -+ -+/* ALU invert (64-bit) */ -+static void emit_neg_i64(struct jit_context *ctx, const u8 dst[]) -+{ -+ emit(ctx, sltu, MIPS_R_T9, MIPS_R_ZERO, lo(dst)); -+ emit(ctx, subu, lo(dst), MIPS_R_ZERO, lo(dst)); -+ emit(ctx, subu, hi(dst), MIPS_R_ZERO, hi(dst)); -+ emit(ctx, subu, hi(dst), hi(dst), MIPS_R_T9); -+ -+ clobber_reg64(ctx, dst); -+} -+ -+/* ALU shift immediate (64-bit) */ -+static void emit_shift_i64(struct jit_context *ctx, -+ const u8 dst[], u32 imm, u8 op) -+{ -+ switch (BPF_OP(op)) { -+ /* dst = dst << imm */ -+ case BPF_LSH: -+ if (imm < 32) { -+ emit(ctx, srl, MIPS_R_T9, lo(dst), 32 - imm); -+ emit(ctx, sll, lo(dst), lo(dst), imm); -+ emit(ctx, sll, hi(dst), hi(dst), imm); -+ emit(ctx, or, hi(dst), hi(dst), MIPS_R_T9); -+ } else { -+ emit(ctx, sll, hi(dst), lo(dst), imm - 32); -+ emit(ctx, move, lo(dst), MIPS_R_ZERO); -+ } -+ break; -+ /* dst = dst >> imm */ -+ case BPF_RSH: -+ if (imm < 32) { -+ emit(ctx, sll, MIPS_R_T9, hi(dst), 32 - imm); -+ emit(ctx, srl, lo(dst), lo(dst), imm); -+ emit(ctx, srl, hi(dst), hi(dst), imm); -+ emit(ctx, or, lo(dst), lo(dst), MIPS_R_T9); -+ } else { -+ emit(ctx, srl, lo(dst), hi(dst), imm - 32); -+ emit(ctx, move, hi(dst), MIPS_R_ZERO); -+ } -+ break; -+ /* dst = dst >> imm (arithmetic) */ -+ case BPF_ARSH: -+ if (imm < 32) { -+ emit(ctx, sll, MIPS_R_T9, hi(dst), 32 - imm); -+ emit(ctx, srl, lo(dst), lo(dst), imm); -+ emit(ctx, sra, hi(dst), hi(dst), imm); -+ emit(ctx, or, lo(dst), lo(dst), MIPS_R_T9); -+ } else { -+ emit(ctx, sra, lo(dst), hi(dst), imm - 32); -+ emit(ctx, sra, hi(dst), hi(dst), 31); -+ } -+ break; -+ } -+ clobber_reg64(ctx, dst); -+} -+ -+/* ALU shift register (64-bit) */ -+static void emit_shift_r64(struct jit_context *ctx, -+ const u8 dst[], u8 src, u8 op) -+{ -+ u8 t1 = MIPS_R_T8; -+ u8 t2 = MIPS_R_T9; -+ -+ emit(ctx, andi, t1, src, 32); /* t1 = src & 32 */ -+ emit(ctx, beqz, t1, 16); /* PC += 16 if t1 == 0 */ -+ emit(ctx, nor, t2, src, MIPS_R_ZERO); /* t2 = ~src (delay slot) */ -+ -+ switch (BPF_OP(op)) { -+ /* dst = dst << src */ -+ case BPF_LSH: -+ /* Next: shift >= 32 */ -+ emit(ctx, sllv, hi(dst), lo(dst), src); /* dh = dl << src */ -+ emit(ctx, move, lo(dst), MIPS_R_ZERO); /* dl = 0 */ -+ emit(ctx, b, 20); /* PC += 20 */ -+ /* +16: shift < 32 */ -+ emit(ctx, srl, t1, lo(dst), 1); /* t1 = dl >> 1 */ -+ emit(ctx, srlv, t1, t1, t2); /* t1 = t1 >> t2 */ -+ emit(ctx, sllv, lo(dst), lo(dst), src); /* dl = dl << src */ -+ emit(ctx, sllv, hi(dst), hi(dst), src); /* dh = dh << src */ -+ emit(ctx, or, hi(dst), hi(dst), t1); /* dh = dh | t1 */ -+ break; -+ /* dst = dst >> src */ -+ case BPF_RSH: -+ /* Next: shift >= 32 */ -+ emit(ctx, srlv, lo(dst), hi(dst), src); /* dl = dh >> src */ -+ emit(ctx, move, hi(dst), MIPS_R_ZERO); /* dh = 0 */ -+ emit(ctx, b, 20); /* PC += 20 */ -+ /* +16: shift < 32 */ -+ emit(ctx, sll, t1, hi(dst), 1); /* t1 = dl << 1 */ -+ emit(ctx, sllv, t1, t1, t2); /* t1 = t1 << t2 */ -+ emit(ctx, srlv, lo(dst), lo(dst), src); /* dl = dl >> src */ -+ emit(ctx, srlv, hi(dst), hi(dst), src); /* dh = dh >> src */ -+ emit(ctx, or, lo(dst), lo(dst), t1); /* dl = dl | t1 */ -+ break; -+ /* dst = dst >> src (arithmetic) */ -+ case BPF_ARSH: -+ /* Next: shift >= 32 */ -+ emit(ctx, srav, lo(dst), hi(dst), src); /* dl = dh >>a src */ -+ emit(ctx, sra, hi(dst), hi(dst), 31); /* dh = dh >>a 31 */ -+ emit(ctx, b, 20); /* PC += 20 */ -+ /* +16: shift < 32 */ -+ emit(ctx, sll, t1, hi(dst), 1); /* t1 = dl << 1 */ -+ emit(ctx, sllv, t1, t1, t2); /* t1 = t1 << t2 */ -+ emit(ctx, srlv, lo(dst), lo(dst), src); /* dl = dl >>a src */ -+ emit(ctx, srav, hi(dst), hi(dst), src); /* dh = dh >> src */ -+ emit(ctx, or, lo(dst), lo(dst), t1); /* dl = dl | t1 */ -+ break; -+ } -+ -+ /* +20: Done */ -+ clobber_reg64(ctx, dst); -+} -+ -+/* ALU mul immediate (64x32-bit) */ -+static void emit_mul_i64(struct jit_context *ctx, const u8 dst[], s32 imm) -+{ -+ u8 src = MIPS_R_T6; -+ u8 tmp = MIPS_R_T9; -+ -+ switch (imm) { -+ /* dst = dst * 1 is a no-op */ -+ case 1: -+ break; -+ /* dst = dst * -1 */ -+ case -1: -+ emit_neg_i64(ctx, dst); -+ break; -+ case 0: -+ emit_mov_r(ctx, lo(dst), MIPS_R_ZERO); -+ emit_mov_r(ctx, hi(dst), MIPS_R_ZERO); -+ break; -+ /* Full 64x32 multiply */ -+ default: -+ /* hi(dst) = hi(dst) * src(imm) */ -+ emit_mov_i(ctx, src, imm); -+ if (cpu_has_mips32r1 || cpu_has_mips32r6) { -+ emit(ctx, mul, hi(dst), hi(dst), src); -+ } else { -+ emit(ctx, multu, hi(dst), src); -+ emit(ctx, mflo, hi(dst)); -+ } -+ -+ /* hi(dst) = hi(dst) - lo(dst) */ -+ if (imm < 0) -+ emit(ctx, subu, hi(dst), hi(dst), lo(dst)); -+ -+ /* tmp = lo(dst) * src(imm) >> 32 */ -+ /* lo(dst) = lo(dst) * src(imm) */ -+ if (cpu_has_mips32r6) { -+ emit(ctx, muhu, tmp, lo(dst), src); -+ emit(ctx, mulu, lo(dst), lo(dst), src); -+ } else { -+ emit(ctx, multu, lo(dst), src); -+ emit(ctx, mflo, lo(dst)); -+ emit(ctx, mfhi, tmp); -+ } -+ -+ /* hi(dst) += tmp */ -+ emit(ctx, addu, hi(dst), hi(dst), tmp); -+ clobber_reg64(ctx, dst); -+ break; -+ } -+} -+ -+/* ALU mul register (64x64-bit) */ -+static void emit_mul_r64(struct jit_context *ctx, -+ const u8 dst[], const u8 src[]) -+{ -+ u8 acc = MIPS_R_T8; -+ u8 tmp = MIPS_R_T9; -+ -+ /* acc = hi(dst) * lo(src) */ -+ if (cpu_has_mips32r1 || cpu_has_mips32r6) { -+ emit(ctx, mul, acc, hi(dst), lo(src)); -+ } else { -+ emit(ctx, multu, hi(dst), lo(src)); -+ emit(ctx, mflo, acc); -+ } -+ -+ /* tmp = lo(dst) * hi(src) */ -+ if (cpu_has_mips32r1 || cpu_has_mips32r6) { -+ emit(ctx, mul, tmp, lo(dst), hi(src)); -+ } else { -+ emit(ctx, multu, lo(dst), hi(src)); -+ emit(ctx, mflo, tmp); -+ } -+ -+ /* acc += tmp */ -+ emit(ctx, addu, acc, acc, tmp); -+ -+ /* tmp = lo(dst) * lo(src) >> 32 */ -+ /* lo(dst) = lo(dst) * lo(src) */ -+ if (cpu_has_mips32r6) { -+ emit(ctx, muhu, tmp, lo(dst), lo(src)); -+ emit(ctx, mulu, lo(dst), lo(dst), lo(src)); -+ } else { -+ emit(ctx, multu, lo(dst), lo(src)); -+ emit(ctx, mflo, lo(dst)); -+ emit(ctx, mfhi, tmp); -+ } -+ -+ /* hi(dst) = acc + tmp */ -+ emit(ctx, addu, hi(dst), acc, tmp); -+ clobber_reg64(ctx, dst); -+} -+ -+/* Helper function for 64-bit modulo */ -+static u64 jit_mod64(u64 a, u64 b) -+{ -+ u64 rem; -+ -+ div64_u64_rem(a, b, &rem); -+ return rem; -+} -+ -+/* ALU div/mod register (64-bit) */ -+static void emit_divmod_r64(struct jit_context *ctx, -+ const u8 dst[], const u8 src[], u8 op) -+{ -+ const u8 *r0 = bpf2mips32[BPF_REG_0]; /* Mapped to v0-v1 */ -+ const u8 *r1 = bpf2mips32[BPF_REG_1]; /* Mapped to a0-a1 */ -+ const u8 *r2 = bpf2mips32[BPF_REG_2]; /* Mapped to a2-a3 */ -+ int exclude, k; -+ u32 addr = 0; -+ -+ /* Push caller-saved registers on stack */ -+ push_regs(ctx, ctx->clobbered & JIT_CALLER_REGS, -+ 0, JIT_RESERVED_STACK); -+ -+ /* Put 64-bit arguments 1 and 2 in registers a0-a3 */ -+ for (k = 0; k < 2; k++) { -+ emit(ctx, move, MIPS_R_T9, src[k]); -+ emit(ctx, move, r1[k], dst[k]); -+ emit(ctx, move, r2[k], MIPS_R_T9); -+ } -+ -+ /* Emit function call */ -+ switch (BPF_OP(op)) { -+ /* dst = dst / src */ -+ case BPF_DIV: -+ addr = (u32)&div64_u64; -+ break; -+ /* dst = dst % src */ -+ case BPF_MOD: -+ addr = (u32)&jit_mod64; -+ break; -+ } -+ emit_mov_i(ctx, MIPS_R_T9, addr); -+ emit(ctx, jalr, MIPS_R_RA, MIPS_R_T9); -+ emit(ctx, nop); /* Delay slot */ -+ -+ /* Store the 64-bit result in dst */ -+ emit(ctx, move, dst[0], r0[0]); -+ emit(ctx, move, dst[1], r0[1]); -+ -+ /* Restore caller-saved registers, excluding the computed result */ -+ exclude = BIT(lo(dst)) | BIT(hi(dst)); -+ pop_regs(ctx, ctx->clobbered & JIT_CALLER_REGS, -+ exclude, JIT_RESERVED_STACK); -+ emit_load_delay(ctx); -+ -+ clobber_reg64(ctx, dst); -+ clobber_reg(ctx, MIPS_R_V0); -+ clobber_reg(ctx, MIPS_R_V1); -+ clobber_reg(ctx, MIPS_R_RA); -+} -+ -+/* Swap bytes in a register word */ -+static void emit_swap8_r(struct jit_context *ctx, u8 dst, u8 src, u8 mask) -+{ -+ u8 tmp = MIPS_R_T9; -+ -+ emit(ctx, and, tmp, src, mask); /* tmp = src & 0x00ff00ff */ -+ emit(ctx, sll, tmp, tmp, 8); /* tmp = tmp << 8 */ -+ emit(ctx, srl, dst, src, 8); /* dst = src >> 8 */ -+ emit(ctx, and, dst, dst, mask); /* dst = dst & 0x00ff00ff */ -+ emit(ctx, or, dst, dst, tmp); /* dst = dst | tmp */ -+} -+ -+/* Swap half words in a register word */ -+static void emit_swap16_r(struct jit_context *ctx, u8 dst, u8 src) -+{ -+ u8 tmp = MIPS_R_T9; -+ -+ emit(ctx, sll, tmp, src, 16); /* tmp = src << 16 */ -+ emit(ctx, srl, dst, src, 16); /* dst = src >> 16 */ -+ emit(ctx, or, dst, dst, tmp); /* dst = dst | tmp */ -+} -+ -+/* Swap bytes and truncate a register double word, word or half word */ -+static void emit_bswap_r64(struct jit_context *ctx, const u8 dst[], u32 width) -+{ -+ u8 tmp = MIPS_R_T8; -+ -+ switch (width) { -+ /* Swap bytes in a double word */ -+ case 64: -+ if (cpu_has_mips32r2 || cpu_has_mips32r6) { -+ emit(ctx, rotr, tmp, hi(dst), 16); -+ emit(ctx, rotr, hi(dst), lo(dst), 16); -+ emit(ctx, wsbh, lo(dst), tmp); -+ emit(ctx, wsbh, hi(dst), hi(dst)); -+ } else { -+ emit_swap16_r(ctx, tmp, lo(dst)); -+ emit_swap16_r(ctx, lo(dst), hi(dst)); -+ emit(ctx, move, hi(dst), tmp); -+ -+ emit(ctx, lui, tmp, 0xff); /* tmp = 0x00ff0000 */ -+ emit(ctx, ori, tmp, tmp, 0xff); /* tmp = 0x00ff00ff */ -+ emit_swap8_r(ctx, lo(dst), lo(dst), tmp); -+ emit_swap8_r(ctx, hi(dst), hi(dst), tmp); -+ } -+ break; -+ /* Swap bytes in a word */ -+ /* Swap bytes in a half word */ -+ case 32: -+ case 16: -+ emit_bswap_r(ctx, lo(dst), width); -+ emit(ctx, move, hi(dst), MIPS_R_ZERO); -+ break; -+ } -+ clobber_reg64(ctx, dst); -+} -+ -+/* Truncate a register double word, word or half word */ -+static void emit_trunc_r64(struct jit_context *ctx, const u8 dst[], u32 width) -+{ -+ switch (width) { -+ case 64: -+ break; -+ /* Zero-extend a word */ -+ case 32: -+ emit(ctx, move, hi(dst), MIPS_R_ZERO); -+ clobber_reg(ctx, hi(dst)); -+ break; -+ /* Zero-extend a half word */ -+ case 16: -+ emit(ctx, move, hi(dst), MIPS_R_ZERO); -+ emit(ctx, andi, lo(dst), lo(dst), 0xffff); -+ clobber_reg64(ctx, dst); -+ break; -+ } -+} -+ -+/* Load operation: dst = *(size*)(src + off) */ -+static void emit_ldx(struct jit_context *ctx, -+ const u8 dst[], u8 src, s16 off, u8 size) -+{ -+ switch (size) { -+ /* Load a byte */ -+ case BPF_B: -+ emit(ctx, lbu, lo(dst), off, src); -+ emit(ctx, move, hi(dst), MIPS_R_ZERO); -+ break; -+ /* Load a half word */ -+ case BPF_H: -+ emit(ctx, lhu, lo(dst), off, src); -+ emit(ctx, move, hi(dst), MIPS_R_ZERO); -+ break; -+ /* Load a word */ -+ case BPF_W: -+ emit(ctx, lw, lo(dst), off, src); -+ emit(ctx, move, hi(dst), MIPS_R_ZERO); -+ break; -+ /* Load a double word */ -+ case BPF_DW: -+ if (dst[1] == src) { -+ emit(ctx, lw, dst[0], off + 4, src); -+ emit(ctx, lw, dst[1], off, src); -+ } else { -+ emit(ctx, lw, dst[1], off, src); -+ emit(ctx, lw, dst[0], off + 4, src); -+ } -+ emit_load_delay(ctx); -+ break; -+ } -+ clobber_reg64(ctx, dst); -+} -+ -+/* Store operation: *(size *)(dst + off) = src */ -+static void emit_stx(struct jit_context *ctx, -+ const u8 dst, const u8 src[], s16 off, u8 size) -+{ -+ switch (size) { -+ /* Store a byte */ -+ case BPF_B: -+ emit(ctx, sb, lo(src), off, dst); -+ break; -+ /* Store a half word */ -+ case BPF_H: -+ emit(ctx, sh, lo(src), off, dst); -+ break; -+ /* Store a word */ -+ case BPF_W: -+ emit(ctx, sw, lo(src), off, dst); -+ break; -+ /* Store a double word */ -+ case BPF_DW: -+ emit(ctx, sw, src[1], off, dst); -+ emit(ctx, sw, src[0], off + 4, dst); -+ break; -+ } -+} -+ -+/* Atomic read-modify-write (32-bit, non-ll/sc fallback) */ -+static void emit_atomic_r32(struct jit_context *ctx, -+ u8 dst, u8 src, s16 off, u8 code) -+{ -+ u32 exclude = 0; -+ u32 addr = 0; -+ -+ /* Push caller-saved registers on stack */ -+ push_regs(ctx, ctx->clobbered & JIT_CALLER_REGS, -+ 0, JIT_RESERVED_STACK); -+ /* -+ * Argument 1: dst+off if xchg, otherwise src, passed in register a0 -+ * Argument 2: src if xchg, othersize dst+off, passed in register a1 -+ */ -+ emit(ctx, move, MIPS_R_T9, dst); -+ emit(ctx, move, MIPS_R_A0, src); -+ emit(ctx, addiu, MIPS_R_A1, MIPS_R_T9, off); -+ -+ /* Emit function call */ -+ switch (code) { -+ case BPF_ADD: -+ addr = (u32)&atomic_add; -+ break; -+ case BPF_SUB: -+ addr = (u32)&atomic_sub; -+ break; -+ case BPF_OR: -+ addr = (u32)&atomic_or; -+ break; -+ case BPF_AND: -+ addr = (u32)&atomic_and; -+ break; -+ case BPF_XOR: -+ addr = (u32)&atomic_xor; -+ break; -+ } -+ emit_mov_i(ctx, MIPS_R_T9, addr); -+ emit(ctx, jalr, MIPS_R_RA, MIPS_R_T9); -+ emit(ctx, nop); /* Delay slot */ -+ -+ /* Restore caller-saved registers, except any fetched value */ -+ pop_regs(ctx, ctx->clobbered & JIT_CALLER_REGS, -+ exclude, JIT_RESERVED_STACK); -+ emit_load_delay(ctx); -+ clobber_reg(ctx, MIPS_R_RA); -+} -+ -+/* Atomic read-modify-write (64-bit) */ -+static void emit_atomic_r64(struct jit_context *ctx, -+ u8 dst, const u8 src[], s16 off, u8 code) -+{ -+ const u8 *r1 = bpf2mips32[BPF_REG_1]; /* Mapped to a0-a1 */ -+ u32 exclude = 0; -+ u32 addr = 0; -+ -+ /* Push caller-saved registers on stack */ -+ push_regs(ctx, ctx->clobbered & JIT_CALLER_REGS, -+ 0, JIT_RESERVED_STACK); -+ /* -+ * Argument 1: 64-bit src, passed in registers a0-a1 -+ * Argument 2: 32-bit dst+off, passed in register a2 -+ */ -+ emit(ctx, move, MIPS_R_T9, dst); -+ emit(ctx, move, r1[0], src[0]); -+ emit(ctx, move, r1[1], src[1]); -+ emit(ctx, addiu, MIPS_R_A2, MIPS_R_T9, off); -+ -+ /* Emit function call */ -+ switch (code) { -+ case BPF_ADD: -+ addr = (u32)&atomic64_add; -+ break; -+ case BPF_SUB: -+ addr = (u32)&atomic64_sub; -+ break; -+ case BPF_OR: -+ addr = (u32)&atomic64_or; -+ break; -+ case BPF_AND: -+ addr = (u32)&atomic64_and; -+ break; -+ case BPF_XOR: -+ addr = (u32)&atomic64_xor; -+ break; -+ } -+ emit_mov_i(ctx, MIPS_R_T9, addr); -+ emit(ctx, jalr, MIPS_R_RA, MIPS_R_T9); -+ emit(ctx, nop); /* Delay slot */ -+ -+ /* Restore caller-saved registers, except any fetched value */ -+ pop_regs(ctx, ctx->clobbered & JIT_CALLER_REGS, -+ exclude, JIT_RESERVED_STACK); -+ emit_load_delay(ctx); -+ clobber_reg(ctx, MIPS_R_RA); -+} -+ -+/* -+ * Conditional movz or an emulated equivalent. -+ * Note that the rs register may be modified. -+ */ -+static void emit_movz_r(struct jit_context *ctx, u8 rd, u8 rs, u8 rt) -+{ -+ if (cpu_has_mips_2) { -+ emit(ctx, movz, rd, rs, rt); /* rd = rt ? rd : rs */ -+ } else if (cpu_has_mips32r6) { -+ if (rs != MIPS_R_ZERO) -+ emit(ctx, seleqz, rs, rs, rt); /* rs = 0 if rt == 0 */ -+ emit(ctx, selnez, rd, rd, rt); /* rd = 0 if rt != 0 */ -+ if (rs != MIPS_R_ZERO) -+ emit(ctx, or, rd, rd, rs); /* rd = rd | rs */ -+ } else { -+ emit(ctx, bnez, rt, 8); /* PC += 8 if rd != 0 */ -+ emit(ctx, nop); /* +0: delay slot */ -+ emit(ctx, or, rd, rs, MIPS_R_ZERO); /* +4: rd = rs */ -+ } -+ clobber_reg(ctx, rd); -+ clobber_reg(ctx, rs); -+} -+ -+/* -+ * Conditional movn or an emulated equivalent. -+ * Note that the rs register may be modified. -+ */ -+static void emit_movn_r(struct jit_context *ctx, u8 rd, u8 rs, u8 rt) -+{ -+ if (cpu_has_mips_2) { -+ emit(ctx, movn, rd, rs, rt); /* rd = rt ? rs : rd */ -+ } else if (cpu_has_mips32r6) { -+ if (rs != MIPS_R_ZERO) -+ emit(ctx, selnez, rs, rs, rt); /* rs = 0 if rt == 0 */ -+ emit(ctx, seleqz, rd, rd, rt); /* rd = 0 if rt != 0 */ -+ if (rs != MIPS_R_ZERO) -+ emit(ctx, or, rd, rd, rs); /* rd = rd | rs */ -+ } else { -+ emit(ctx, beqz, rt, 8); /* PC += 8 if rd == 0 */ -+ emit(ctx, nop); /* +0: delay slot */ -+ emit(ctx, or, rd, rs, MIPS_R_ZERO); /* +4: rd = rs */ -+ } -+ clobber_reg(ctx, rd); -+ clobber_reg(ctx, rs); -+} -+ -+/* Emulation of 64-bit sltiu rd, rs, imm, where imm may be S32_MAX + 1 */ -+static void emit_sltiu_r64(struct jit_context *ctx, u8 rd, -+ const u8 rs[], s64 imm) -+{ -+ u8 tmp = MIPS_R_T9; -+ -+ if (imm < 0) { -+ emit_mov_i(ctx, rd, imm); /* rd = imm */ -+ emit(ctx, sltu, rd, lo(rs), rd); /* rd = rsl < rd */ -+ emit(ctx, sltiu, tmp, hi(rs), -1); /* tmp = rsh < ~0U */ -+ emit(ctx, or, rd, rd, tmp); /* rd = rd | tmp */ -+ } else { /* imm >= 0 */ -+ if (imm > 0x7fff) { -+ emit_mov_i(ctx, rd, (s32)imm); /* rd = imm */ -+ emit(ctx, sltu, rd, lo(rs), rd); /* rd = rsl < rd */ -+ } else { -+ emit(ctx, sltiu, rd, lo(rs), imm); /* rd = rsl < imm */ -+ } -+ emit_movn_r(ctx, rd, MIPS_R_ZERO, hi(rs)); /* rd = 0 if rsh */ -+ } -+} -+ -+/* Emulation of 64-bit sltu rd, rs, rt */ -+static void emit_sltu_r64(struct jit_context *ctx, u8 rd, -+ const u8 rs[], const u8 rt[]) -+{ -+ u8 tmp = MIPS_R_T9; -+ -+ emit(ctx, sltu, rd, lo(rs), lo(rt)); /* rd = rsl < rtl */ -+ emit(ctx, subu, tmp, hi(rs), hi(rt)); /* tmp = rsh - rth */ -+ emit_movn_r(ctx, rd, MIPS_R_ZERO, tmp); /* rd = 0 if tmp != 0 */ -+ emit(ctx, sltu, tmp, hi(rs), hi(rt)); /* tmp = rsh < rth */ -+ emit(ctx, or, rd, rd, tmp); /* rd = rd | tmp */ -+} -+ -+/* Emulation of 64-bit slti rd, rs, imm, where imm may be S32_MAX + 1 */ -+static void emit_slti_r64(struct jit_context *ctx, u8 rd, -+ const u8 rs[], s64 imm) -+{ -+ u8 t1 = MIPS_R_T8; -+ u8 t2 = MIPS_R_T9; -+ u8 cmp; -+ -+ /* -+ * if ((rs < 0) ^ (imm < 0)) t1 = imm >u rsl -+ * else t1 = rsl > 31 */ -+ if (imm < 0) -+ emit_movz_r(ctx, t1, t2, rd); /* t1 = rd ? t1 : t2 */ -+ else -+ emit_movn_r(ctx, t1, t2, rd); /* t1 = rd ? t2 : t1 */ -+ /* -+ * if ((imm < 0 && rsh != 0xffffffff) || -+ * (imm >= 0 && rsh != 0)) -+ * t1 = 0 -+ */ -+ if (imm < 0) { -+ emit(ctx, addiu, rd, hi(rs), 1); /* rd = rsh + 1 */ -+ cmp = rd; -+ } else { /* imm >= 0 */ -+ cmp = hi(rs); -+ } -+ emit_movn_r(ctx, t1, MIPS_R_ZERO, cmp); /* t1 = 0 if cmp != 0 */ -+ -+ /* -+ * if (imm < 0) rd = rsh < -1 -+ * else rd = rsh != 0 -+ * rd = rd | t1 -+ */ -+ emit(ctx, slti, rd, hi(rs), imm < 0 ? -1 : 0); /* rd = rsh < hi(imm) */ -+ emit(ctx, or, rd, rd, t1); /* rd = rd | t1 */ -+} -+ -+/* Emulation of 64-bit(slt rd, rs, rt) */ -+static void emit_slt_r64(struct jit_context *ctx, u8 rd, -+ const u8 rs[], const u8 rt[]) -+{ -+ u8 t1 = MIPS_R_T7; -+ u8 t2 = MIPS_R_T8; -+ u8 t3 = MIPS_R_T9; -+ -+ /* -+ * if ((rs < 0) ^ (rt < 0)) t1 = rtl > 31 */ -+ emit_movn_r(ctx, t1, t2, rd); /* t1 = rd ? t2 : t1 */ -+ emit_movn_r(ctx, t1, MIPS_R_ZERO, t3); /* t1 = 0 if t3 != 0 */ -+ -+ /* rd = (rsh < rth) | t1 */ -+ emit(ctx, slt, rd, hi(rs), hi(rt)); /* rd = rsh = -0x7fff && imm <= 0x8000) { -+ emit(ctx, addiu, tmp, lo(dst), -imm); -+ } else if ((u32)imm <= 0xffff) { -+ emit(ctx, xori, tmp, lo(dst), imm); -+ } else { /* Register fallback */ -+ emit_mov_i(ctx, tmp, imm); -+ emit(ctx, xor, tmp, lo(dst), tmp); -+ } -+ if (imm < 0) { /* Compare sign extension */ -+ emit(ctx, addu, MIPS_R_T9, hi(dst), 1); -+ emit(ctx, or, tmp, tmp, MIPS_R_T9); -+ } else { /* Compare zero extension */ -+ emit(ctx, or, tmp, tmp, hi(dst)); -+ } -+ if (op == BPF_JEQ) -+ emit(ctx, beqz, tmp, off); -+ else /* BPF_JNE */ -+ emit(ctx, bnez, tmp, off); -+ break; -+ /* PC += off if dst & imm */ -+ /* PC += off if (dst & imm) == 0 (not in BPF, used for long jumps) */ -+ case BPF_JSET: -+ case JIT_JNSET: -+ if ((u32)imm <= 0xffff) { -+ emit(ctx, andi, tmp, lo(dst), imm); -+ } else { /* Register fallback */ -+ emit_mov_i(ctx, tmp, imm); -+ emit(ctx, and, tmp, lo(dst), tmp); -+ } -+ if (imm < 0) /* Sign-extension pulls in high word */ -+ emit(ctx, or, tmp, tmp, hi(dst)); -+ if (op == BPF_JSET) -+ emit(ctx, bnez, tmp, off); -+ else /* JIT_JNSET */ -+ emit(ctx, beqz, tmp, off); -+ break; -+ /* PC += off if dst > imm */ -+ case BPF_JGT: -+ emit_sltiu_r64(ctx, tmp, dst, (s64)imm + 1); -+ emit(ctx, beqz, tmp, off); -+ break; -+ /* PC += off if dst >= imm */ -+ case BPF_JGE: -+ emit_sltiu_r64(ctx, tmp, dst, imm); -+ emit(ctx, beqz, tmp, off); -+ break; -+ /* PC += off if dst < imm */ -+ case BPF_JLT: -+ emit_sltiu_r64(ctx, tmp, dst, imm); -+ emit(ctx, bnez, tmp, off); -+ break; -+ /* PC += off if dst <= imm */ -+ case BPF_JLE: -+ emit_sltiu_r64(ctx, tmp, dst, (s64)imm + 1); -+ emit(ctx, bnez, tmp, off); -+ break; -+ /* PC += off if dst > imm (signed) */ -+ case BPF_JSGT: -+ emit_slti_r64(ctx, tmp, dst, (s64)imm + 1); -+ emit(ctx, beqz, tmp, off); -+ break; -+ /* PC += off if dst >= imm (signed) */ -+ case BPF_JSGE: -+ emit_slti_r64(ctx, tmp, dst, imm); -+ emit(ctx, beqz, tmp, off); -+ break; -+ /* PC += off if dst < imm (signed) */ -+ case BPF_JSLT: -+ emit_slti_r64(ctx, tmp, dst, imm); -+ emit(ctx, bnez, tmp, off); -+ break; -+ /* PC += off if dst <= imm (signed) */ -+ case BPF_JSLE: -+ emit_slti_r64(ctx, tmp, dst, (s64)imm + 1); -+ emit(ctx, bnez, tmp, off); -+ break; -+ } -+} -+ -+/* Jump register (64-bit) */ -+static void emit_jmp_r64(struct jit_context *ctx, -+ const u8 dst[], const u8 src[], s32 off, u8 op) -+{ -+ u8 t1 = MIPS_R_T6; -+ u8 t2 = MIPS_R_T7; -+ -+ switch (op) { -+ /* No-op, used internally for branch optimization */ -+ case JIT_JNOP: -+ break; -+ /* PC += off if dst == src */ -+ /* PC += off if dst != src */ -+ case BPF_JEQ: -+ case BPF_JNE: -+ emit(ctx, subu, t1, lo(dst), lo(src)); -+ emit(ctx, subu, t2, hi(dst), hi(src)); -+ emit(ctx, or, t1, t1, t2); -+ if (op == BPF_JEQ) -+ emit(ctx, beqz, t1, off); -+ else /* BPF_JNE */ -+ emit(ctx, bnez, t1, off); -+ break; -+ /* PC += off if dst & src */ -+ /* PC += off if (dst & imm) == 0 (not in BPF, used for long jumps) */ -+ case BPF_JSET: -+ case JIT_JNSET: -+ emit(ctx, and, t1, lo(dst), lo(src)); -+ emit(ctx, and, t2, hi(dst), hi(src)); -+ emit(ctx, or, t1, t1, t2); -+ if (op == BPF_JSET) -+ emit(ctx, bnez, t1, off); -+ else /* JIT_JNSET */ -+ emit(ctx, beqz, t1, off); -+ break; -+ /* PC += off if dst > src */ -+ case BPF_JGT: -+ emit_sltu_r64(ctx, t1, src, dst); -+ emit(ctx, bnez, t1, off); -+ break; -+ /* PC += off if dst >= src */ -+ case BPF_JGE: -+ emit_sltu_r64(ctx, t1, dst, src); -+ emit(ctx, beqz, t1, off); -+ break; -+ /* PC += off if dst < src */ -+ case BPF_JLT: -+ emit_sltu_r64(ctx, t1, dst, src); -+ emit(ctx, bnez, t1, off); -+ break; -+ /* PC += off if dst <= src */ -+ case BPF_JLE: -+ emit_sltu_r64(ctx, t1, src, dst); -+ emit(ctx, beqz, t1, off); -+ break; -+ /* PC += off if dst > src (signed) */ -+ case BPF_JSGT: -+ emit_slt_r64(ctx, t1, src, dst); -+ emit(ctx, bnez, t1, off); -+ break; -+ /* PC += off if dst >= src (signed) */ -+ case BPF_JSGE: -+ emit_slt_r64(ctx, t1, dst, src); -+ emit(ctx, beqz, t1, off); -+ break; -+ /* PC += off if dst < src (signed) */ -+ case BPF_JSLT: -+ emit_slt_r64(ctx, t1, dst, src); -+ emit(ctx, bnez, t1, off); -+ break; -+ /* PC += off if dst <= src (signed) */ -+ case BPF_JSLE: -+ emit_slt_r64(ctx, t1, src, dst); -+ emit(ctx, beqz, t1, off); -+ break; -+ } -+} -+ -+/* Function call */ -+static int emit_call(struct jit_context *ctx, const struct bpf_insn *insn) -+{ -+ bool fixed; -+ u64 addr; -+ -+ /* Decode the call address */ -+ if (bpf_jit_get_func_addr(ctx->program, insn, false, -+ &addr, &fixed) < 0) -+ return -1; -+ if (!fixed) -+ return -1; -+ -+ /* Push stack arguments */ -+ push_regs(ctx, JIT_STACK_REGS, 0, JIT_RESERVED_STACK); -+ -+ /* Emit function call */ -+ emit_mov_i(ctx, MIPS_R_T9, addr); -+ emit(ctx, jalr, MIPS_R_RA, MIPS_R_T9); -+ emit(ctx, nop); /* Delay slot */ -+ -+ clobber_reg(ctx, MIPS_R_RA); -+ clobber_reg(ctx, MIPS_R_V0); -+ clobber_reg(ctx, MIPS_R_V1); -+ return 0; -+} -+ -+/* Function tail call */ -+static int emit_tail_call(struct jit_context *ctx) -+{ -+ u8 ary = lo(bpf2mips32[BPF_REG_2]); -+ u8 ind = lo(bpf2mips32[BPF_REG_3]); -+ u8 t1 = MIPS_R_T8; -+ u8 t2 = MIPS_R_T9; -+ int off; -+ -+ /* -+ * Tail call: -+ * eBPF R1 - function argument (context ptr), passed in a0-a1 -+ * eBPF R2 - ptr to object with array of function entry points -+ * eBPF R3 - array index of function to be called -+ * stack[sz] - remaining tail call count, initialized in prologue -+ */ -+ -+ /* if (ind >= ary->map.max_entries) goto out */ -+ off = offsetof(struct bpf_array, map.max_entries); -+ if (off > 0x7fff) -+ return -1; -+ emit(ctx, lw, t1, off, ary); /* t1 = ary->map.max_entries*/ -+ emit_load_delay(ctx); /* Load delay slot */ -+ emit(ctx, sltu, t1, ind, t1); /* t1 = ind < t1 */ -+ emit(ctx, beqz, t1, get_offset(ctx, 1)); /* PC += off(1) if t1 == 0 */ -+ /* (next insn delay slot) */ -+ /* if (TCC-- <= 0) goto out */ -+ emit(ctx, lw, t2, ctx->stack_size, MIPS_R_SP); /* t2 = *(SP + size) */ -+ emit_load_delay(ctx); /* Load delay slot */ -+ emit(ctx, blez, t2, get_offset(ctx, 1)); /* PC += off(1) if t2 < 0 */ -+ emit(ctx, addiu, t2, t2, -1); /* t2-- (delay slot) */ -+ emit(ctx, sw, t2, ctx->stack_size, MIPS_R_SP); /* *(SP + size) = t2 */ -+ -+ /* prog = ary->ptrs[ind] */ -+ off = offsetof(struct bpf_array, ptrs); -+ if (off > 0x7fff) -+ return -1; -+ emit(ctx, sll, t1, ind, 2); /* t1 = ind << 2 */ -+ emit(ctx, addu, t1, t1, ary); /* t1 += ary */ -+ emit(ctx, lw, t2, off, t1); /* t2 = *(t1 + off) */ -+ emit_load_delay(ctx); /* Load delay slot */ -+ -+ /* if (prog == 0) goto out */ -+ emit(ctx, beqz, t2, get_offset(ctx, 1)); /* PC += off(1) if t2 == 0 */ -+ emit(ctx, nop); /* Delay slot */ -+ -+ /* func = prog->bpf_func + 8 (prologue skip offset) */ -+ off = offsetof(struct bpf_prog, bpf_func); -+ if (off > 0x7fff) -+ return -1; -+ emit(ctx, lw, t1, off, t2); /* t1 = *(t2 + off) */ -+ emit_load_delay(ctx); /* Load delay slot */ -+ emit(ctx, addiu, t1, t1, JIT_TCALL_SKIP); /* t1 += skip (8 or 12) */ -+ -+ /* goto func */ -+ build_epilogue(ctx, t1); -+ return 0; -+} -+ -+/* -+ * Stack frame layout for a JITed program (stack grows down). -+ * -+ * Higher address : Caller's stack frame : -+ * :----------------------------: -+ * : 64-bit eBPF args r3-r5 : -+ * :----------------------------: -+ * : Reserved / tail call count : -+ * +============================+ <--- MIPS sp before call -+ * | Callee-saved registers, | -+ * | including RA and FP | -+ * +----------------------------+ <--- eBPF FP (MIPS zero,fp) -+ * | Local eBPF variables | -+ * | allocated by program | -+ * +----------------------------+ -+ * | Reserved for caller-saved | -+ * | registers | -+ * +----------------------------+ -+ * | Reserved for 64-bit eBPF | -+ * | args r3-r5 & args passed | -+ * | on stack in kernel calls | -+ * Lower address +============================+ <--- MIPS sp -+ */ -+ -+/* Build program prologue to set up the stack and registers */ -+void build_prologue(struct jit_context *ctx) -+{ -+ const u8 *r1 = bpf2mips32[BPF_REG_1]; -+ const u8 *fp = bpf2mips32[BPF_REG_FP]; -+ int stack, saved, locals, reserved; -+ -+ /* -+ * The first two instructions initialize TCC in the reserved (for us) -+ * 16-byte area in the parent's stack frame. On a tail call, the -+ * calling function jumps into the prologue after these instructions. -+ */ -+ emit(ctx, ori, MIPS_R_T9, MIPS_R_ZERO, -+ min(MAX_TAIL_CALL_CNT + 1, 0xffff)); -+ emit(ctx, sw, MIPS_R_T9, 0, MIPS_R_SP); -+ -+ /* -+ * Register eBPF R1 contains the 32-bit context pointer argument. -+ * A 32-bit argument is always passed in MIPS register a0, regardless -+ * of CPU endianness. Initialize R1 accordingly and zero-extend. -+ */ -+#ifdef __BIG_ENDIAN -+ emit(ctx, move, lo(r1), MIPS_R_A0); -+#endif -+ -+ /* === Entry-point for tail calls === */ -+ -+ /* Zero-extend the 32-bit argument */ -+ emit(ctx, move, hi(r1), MIPS_R_ZERO); -+ -+ /* If the eBPF frame pointer was accessed it must be saved */ -+ if (ctx->accessed & BIT(BPF_REG_FP)) -+ clobber_reg64(ctx, fp); -+ -+ /* Compute the stack space needed for callee-saved registers */ -+ saved = hweight32(ctx->clobbered & JIT_CALLEE_REGS) * sizeof(u32); -+ saved = ALIGN(saved, MIPS_STACK_ALIGNMENT); -+ -+ /* Stack space used by eBPF program local data */ -+ locals = ALIGN(ctx->program->aux->stack_depth, MIPS_STACK_ALIGNMENT); -+ -+ /* -+ * If we are emitting function calls, reserve extra stack space for -+ * caller-saved registers and function arguments passed on the stack. -+ * The required space is computed automatically during resource -+ * usage discovery (pass 1). -+ */ -+ reserved = ctx->stack_used; -+ -+ /* Allocate the stack frame */ -+ stack = ALIGN(saved + locals + reserved, MIPS_STACK_ALIGNMENT); -+ emit(ctx, addiu, MIPS_R_SP, MIPS_R_SP, -stack); -+ -+ /* Store callee-saved registers on stack */ -+ push_regs(ctx, ctx->clobbered & JIT_CALLEE_REGS, 0, stack - saved); -+ -+ /* Initialize the eBPF frame pointer if accessed */ -+ if (ctx->accessed & BIT(BPF_REG_FP)) -+ emit(ctx, addiu, lo(fp), MIPS_R_SP, stack - saved); -+ -+ ctx->saved_size = saved; -+ ctx->stack_size = stack; -+} -+ -+/* Build the program epilogue to restore the stack and registers */ -+void build_epilogue(struct jit_context *ctx, int dest_reg) -+{ -+ /* Restore callee-saved registers from stack */ -+ pop_regs(ctx, ctx->clobbered & JIT_CALLEE_REGS, 0, -+ ctx->stack_size - ctx->saved_size); -+ /* -+ * A 32-bit return value is always passed in MIPS register v0, -+ * but on big-endian targets the low part of R0 is mapped to v1. -+ */ -+#ifdef __BIG_ENDIAN -+ emit(ctx, move, MIPS_R_V0, MIPS_R_V1); -+#endif -+ -+ /* Jump to the return address and adjust the stack pointer */ -+ emit(ctx, jr, dest_reg); -+ emit(ctx, addiu, MIPS_R_SP, MIPS_R_SP, ctx->stack_size); -+} -+ -+/* Build one eBPF instruction */ -+int build_insn(const struct bpf_insn *insn, struct jit_context *ctx) -+{ -+ const u8 *dst = bpf2mips32[insn->dst_reg]; -+ const u8 *src = bpf2mips32[insn->src_reg]; -+ const u8 *tmp = bpf2mips32[JIT_REG_TMP]; -+ u8 code = insn->code; -+ s16 off = insn->off; -+ s32 imm = insn->imm; -+ s32 val, rel; -+ u8 alu, jmp; -+ -+ switch (code) { -+ /* ALU operations */ -+ /* dst = imm */ -+ case BPF_ALU | BPF_MOV | BPF_K: -+ emit_mov_i(ctx, lo(dst), imm); -+ emit_zext_ver(ctx, dst); -+ break; -+ /* dst = src */ -+ case BPF_ALU | BPF_MOV | BPF_X: -+ if (imm == 1) { -+ /* Special mov32 for zext */ -+ emit_mov_i(ctx, hi(dst), 0); -+ } else { -+ emit_mov_r(ctx, lo(dst), lo(src)); -+ emit_zext_ver(ctx, dst); -+ } -+ break; -+ /* dst = -dst */ -+ case BPF_ALU | BPF_NEG: -+ emit_alu_i(ctx, lo(dst), 0, BPF_NEG); -+ emit_zext_ver(ctx, dst); -+ break; -+ /* dst = dst & imm */ -+ /* dst = dst | imm */ -+ /* dst = dst ^ imm */ -+ /* dst = dst << imm */ -+ /* dst = dst >> imm */ -+ /* dst = dst >> imm (arithmetic) */ -+ /* dst = dst + imm */ -+ /* dst = dst - imm */ -+ /* dst = dst * imm */ -+ /* dst = dst / imm */ -+ /* dst = dst % imm */ -+ case BPF_ALU | BPF_OR | BPF_K: -+ case BPF_ALU | BPF_AND | BPF_K: -+ case BPF_ALU | BPF_XOR | BPF_K: -+ case BPF_ALU | BPF_LSH | BPF_K: -+ case BPF_ALU | BPF_RSH | BPF_K: -+ case BPF_ALU | BPF_ARSH | BPF_K: -+ case BPF_ALU | BPF_ADD | BPF_K: -+ case BPF_ALU | BPF_SUB | BPF_K: -+ case BPF_ALU | BPF_MUL | BPF_K: -+ case BPF_ALU | BPF_DIV | BPF_K: -+ case BPF_ALU | BPF_MOD | BPF_K: -+ if (!valid_alu_i(BPF_OP(code), imm)) { -+ emit_mov_i(ctx, MIPS_R_T6, imm); -+ emit_alu_r(ctx, lo(dst), MIPS_R_T6, BPF_OP(code)); -+ } else if (rewrite_alu_i(BPF_OP(code), imm, &alu, &val)) { -+ emit_alu_i(ctx, lo(dst), val, alu); -+ } -+ emit_zext_ver(ctx, dst); -+ break; -+ /* dst = dst & src */ -+ /* dst = dst | src */ -+ /* dst = dst ^ src */ -+ /* dst = dst << src */ -+ /* dst = dst >> src */ -+ /* dst = dst >> src (arithmetic) */ -+ /* dst = dst + src */ -+ /* dst = dst - src */ -+ /* dst = dst * src */ -+ /* dst = dst / src */ -+ /* dst = dst % src */ -+ case BPF_ALU | BPF_AND | BPF_X: -+ case BPF_ALU | BPF_OR | BPF_X: -+ case BPF_ALU | BPF_XOR | BPF_X: -+ case BPF_ALU | BPF_LSH | BPF_X: -+ case BPF_ALU | BPF_RSH | BPF_X: -+ case BPF_ALU | BPF_ARSH | BPF_X: -+ case BPF_ALU | BPF_ADD | BPF_X: -+ case BPF_ALU | BPF_SUB | BPF_X: -+ case BPF_ALU | BPF_MUL | BPF_X: -+ case BPF_ALU | BPF_DIV | BPF_X: -+ case BPF_ALU | BPF_MOD | BPF_X: -+ emit_alu_r(ctx, lo(dst), lo(src), BPF_OP(code)); -+ emit_zext_ver(ctx, dst); -+ break; -+ /* dst = imm (64-bit) */ -+ case BPF_ALU64 | BPF_MOV | BPF_K: -+ emit_mov_se_i64(ctx, dst, imm); -+ break; -+ /* dst = src (64-bit) */ -+ case BPF_ALU64 | BPF_MOV | BPF_X: -+ emit_mov_r(ctx, lo(dst), lo(src)); -+ emit_mov_r(ctx, hi(dst), hi(src)); -+ break; -+ /* dst = -dst (64-bit) */ -+ case BPF_ALU64 | BPF_NEG: -+ emit_neg_i64(ctx, dst); -+ break; -+ /* dst = dst & imm (64-bit) */ -+ case BPF_ALU64 | BPF_AND | BPF_K: -+ emit_alu_i64(ctx, dst, imm, BPF_OP(code)); -+ break; -+ /* dst = dst | imm (64-bit) */ -+ /* dst = dst ^ imm (64-bit) */ -+ /* dst = dst + imm (64-bit) */ -+ /* dst = dst - imm (64-bit) */ -+ case BPF_ALU64 | BPF_OR | BPF_K: -+ case BPF_ALU64 | BPF_XOR | BPF_K: -+ case BPF_ALU64 | BPF_ADD | BPF_K: -+ case BPF_ALU64 | BPF_SUB | BPF_K: -+ if (imm) -+ emit_alu_i64(ctx, dst, imm, BPF_OP(code)); -+ break; -+ /* dst = dst << imm (64-bit) */ -+ /* dst = dst >> imm (64-bit) */ -+ /* dst = dst >> imm (64-bit, arithmetic) */ -+ case BPF_ALU64 | BPF_LSH | BPF_K: -+ case BPF_ALU64 | BPF_RSH | BPF_K: -+ case BPF_ALU64 | BPF_ARSH | BPF_K: -+ if (imm) -+ emit_shift_i64(ctx, dst, imm, BPF_OP(code)); -+ break; -+ /* dst = dst * imm (64-bit) */ -+ case BPF_ALU64 | BPF_MUL | BPF_K: -+ emit_mul_i64(ctx, dst, imm); -+ break; -+ /* dst = dst / imm (64-bit) */ -+ /* dst = dst % imm (64-bit) */ -+ case BPF_ALU64 | BPF_DIV | BPF_K: -+ case BPF_ALU64 | BPF_MOD | BPF_K: -+ /* -+ * Sign-extend the immediate value into a temporary register, -+ * and then do the operation on this register. -+ */ -+ emit_mov_se_i64(ctx, tmp, imm); -+ emit_divmod_r64(ctx, dst, tmp, BPF_OP(code)); -+ break; -+ /* dst = dst & src (64-bit) */ -+ /* dst = dst | src (64-bit) */ -+ /* dst = dst ^ src (64-bit) */ -+ /* dst = dst + src (64-bit) */ -+ /* dst = dst - src (64-bit) */ -+ case BPF_ALU64 | BPF_AND | BPF_X: -+ case BPF_ALU64 | BPF_OR | BPF_X: -+ case BPF_ALU64 | BPF_XOR | BPF_X: -+ case BPF_ALU64 | BPF_ADD | BPF_X: -+ case BPF_ALU64 | BPF_SUB | BPF_X: -+ emit_alu_r64(ctx, dst, src, BPF_OP(code)); -+ break; -+ /* dst = dst << src (64-bit) */ -+ /* dst = dst >> src (64-bit) */ -+ /* dst = dst >> src (64-bit, arithmetic) */ -+ case BPF_ALU64 | BPF_LSH | BPF_X: -+ case BPF_ALU64 | BPF_RSH | BPF_X: -+ case BPF_ALU64 | BPF_ARSH | BPF_X: -+ emit_shift_r64(ctx, dst, lo(src), BPF_OP(code)); -+ break; -+ /* dst = dst * src (64-bit) */ -+ case BPF_ALU64 | BPF_MUL | BPF_X: -+ emit_mul_r64(ctx, dst, src); -+ break; -+ /* dst = dst / src (64-bit) */ -+ /* dst = dst % src (64-bit) */ -+ case BPF_ALU64 | BPF_DIV | BPF_X: -+ case BPF_ALU64 | BPF_MOD | BPF_X: -+ emit_divmod_r64(ctx, dst, src, BPF_OP(code)); -+ break; -+ /* dst = htole(dst) */ -+ /* dst = htobe(dst) */ -+ case BPF_ALU | BPF_END | BPF_FROM_LE: -+ case BPF_ALU | BPF_END | BPF_FROM_BE: -+ if (BPF_SRC(code) == -+#ifdef __BIG_ENDIAN -+ BPF_FROM_LE -+#else -+ BPF_FROM_BE -+#endif -+ ) -+ emit_bswap_r64(ctx, dst, imm); -+ else -+ emit_trunc_r64(ctx, dst, imm); -+ break; -+ /* dst = imm64 */ -+ case BPF_LD | BPF_IMM | BPF_DW: -+ emit_mov_i(ctx, lo(dst), imm); -+ emit_mov_i(ctx, hi(dst), insn[1].imm); -+ return 1; -+ /* LDX: dst = *(size *)(src + off) */ -+ case BPF_LDX | BPF_MEM | BPF_W: -+ case BPF_LDX | BPF_MEM | BPF_H: -+ case BPF_LDX | BPF_MEM | BPF_B: -+ case BPF_LDX | BPF_MEM | BPF_DW: -+ emit_ldx(ctx, dst, lo(src), off, BPF_SIZE(code)); -+ break; -+ /* ST: *(size *)(dst + off) = imm */ -+ case BPF_ST | BPF_MEM | BPF_W: -+ case BPF_ST | BPF_MEM | BPF_H: -+ case BPF_ST | BPF_MEM | BPF_B: -+ case BPF_ST | BPF_MEM | BPF_DW: -+ switch (BPF_SIZE(code)) { -+ case BPF_DW: -+ /* Sign-extend immediate value into temporary reg */ -+ emit_mov_se_i64(ctx, tmp, imm); -+ break; -+ case BPF_W: -+ case BPF_H: -+ case BPF_B: -+ emit_mov_i(ctx, lo(tmp), imm); -+ break; -+ } -+ emit_stx(ctx, lo(dst), tmp, off, BPF_SIZE(code)); -+ break; -+ /* STX: *(size *)(dst + off) = src */ -+ case BPF_STX | BPF_MEM | BPF_W: -+ case BPF_STX | BPF_MEM | BPF_H: -+ case BPF_STX | BPF_MEM | BPF_B: -+ case BPF_STX | BPF_MEM | BPF_DW: -+ emit_stx(ctx, lo(dst), src, off, BPF_SIZE(code)); -+ break; -+ /* Speculation barrier */ -+ case BPF_ST | BPF_NOSPEC: -+ break; -+ /* Atomics */ -+ case BPF_STX | BPF_XADD | BPF_W: -+ switch (imm) { -+ case BPF_ADD: -+ case BPF_AND: -+ case BPF_OR: -+ case BPF_XOR: -+ if (cpu_has_llsc) -+ emit_atomic_r(ctx, lo(dst), lo(src), off, imm); -+ else /* Non-ll/sc fallback */ -+ emit_atomic_r32(ctx, lo(dst), lo(src), -+ off, imm); -+ break; -+ default: -+ goto notyet; -+ } -+ break; -+ /* Atomics (64-bit) */ -+ case BPF_STX | BPF_XADD | BPF_DW: -+ switch (imm) { -+ case BPF_ADD: -+ case BPF_AND: -+ case BPF_OR: -+ case BPF_XOR: -+ emit_atomic_r64(ctx, lo(dst), src, off, imm); -+ break; -+ default: -+ goto notyet; -+ } -+ break; -+ /* PC += off if dst == src */ -+ /* PC += off if dst != src */ -+ /* PC += off if dst & src */ -+ /* PC += off if dst > src */ -+ /* PC += off if dst >= src */ -+ /* PC += off if dst < src */ -+ /* PC += off if dst <= src */ -+ /* PC += off if dst > src (signed) */ -+ /* PC += off if dst >= src (signed) */ -+ /* PC += off if dst < src (signed) */ -+ /* PC += off if dst <= src (signed) */ -+ case BPF_JMP32 | BPF_JEQ | BPF_X: -+ case BPF_JMP32 | BPF_JNE | BPF_X: -+ case BPF_JMP32 | BPF_JSET | BPF_X: -+ case BPF_JMP32 | BPF_JGT | BPF_X: -+ case BPF_JMP32 | BPF_JGE | BPF_X: -+ case BPF_JMP32 | BPF_JLT | BPF_X: -+ case BPF_JMP32 | BPF_JLE | BPF_X: -+ case BPF_JMP32 | BPF_JSGT | BPF_X: -+ case BPF_JMP32 | BPF_JSGE | BPF_X: -+ case BPF_JMP32 | BPF_JSLT | BPF_X: -+ case BPF_JMP32 | BPF_JSLE | BPF_X: -+ if (off == 0) -+ break; -+ setup_jmp_r(ctx, dst == src, BPF_OP(code), off, &jmp, &rel); -+ emit_jmp_r(ctx, lo(dst), lo(src), rel, jmp); -+ if (finish_jmp(ctx, jmp, off) < 0) -+ goto toofar; -+ break; -+ /* PC += off if dst == imm */ -+ /* PC += off if dst != imm */ -+ /* PC += off if dst & imm */ -+ /* PC += off if dst > imm */ -+ /* PC += off if dst >= imm */ -+ /* PC += off if dst < imm */ -+ /* PC += off if dst <= imm */ -+ /* PC += off if dst > imm (signed) */ -+ /* PC += off if dst >= imm (signed) */ -+ /* PC += off if dst < imm (signed) */ -+ /* PC += off if dst <= imm (signed) */ -+ case BPF_JMP32 | BPF_JEQ | BPF_K: -+ case BPF_JMP32 | BPF_JNE | BPF_K: -+ case BPF_JMP32 | BPF_JSET | BPF_K: -+ case BPF_JMP32 | BPF_JGT | BPF_K: -+ case BPF_JMP32 | BPF_JGE | BPF_K: -+ case BPF_JMP32 | BPF_JLT | BPF_K: -+ case BPF_JMP32 | BPF_JLE | BPF_K: -+ case BPF_JMP32 | BPF_JSGT | BPF_K: -+ case BPF_JMP32 | BPF_JSGE | BPF_K: -+ case BPF_JMP32 | BPF_JSLT | BPF_K: -+ case BPF_JMP32 | BPF_JSLE | BPF_K: -+ if (off == 0) -+ break; -+ setup_jmp_i(ctx, imm, 32, BPF_OP(code), off, &jmp, &rel); -+ if (valid_jmp_i(jmp, imm)) { -+ emit_jmp_i(ctx, lo(dst), imm, rel, jmp); -+ } else { -+ /* Move large immediate to register */ -+ emit_mov_i(ctx, MIPS_R_T6, imm); -+ emit_jmp_r(ctx, lo(dst), MIPS_R_T6, rel, jmp); -+ } -+ if (finish_jmp(ctx, jmp, off) < 0) -+ goto toofar; -+ break; -+ /* PC += off if dst == src */ -+ /* PC += off if dst != src */ -+ /* PC += off if dst & src */ -+ /* PC += off if dst > src */ -+ /* PC += off if dst >= src */ -+ /* PC += off if dst < src */ -+ /* PC += off if dst <= src */ -+ /* PC += off if dst > src (signed) */ -+ /* PC += off if dst >= src (signed) */ -+ /* PC += off if dst < src (signed) */ -+ /* PC += off if dst <= src (signed) */ -+ case BPF_JMP | BPF_JEQ | BPF_X: -+ case BPF_JMP | BPF_JNE | BPF_X: -+ case BPF_JMP | BPF_JSET | BPF_X: -+ case BPF_JMP | BPF_JGT | BPF_X: -+ case BPF_JMP | BPF_JGE | BPF_X: -+ case BPF_JMP | BPF_JLT | BPF_X: -+ case BPF_JMP | BPF_JLE | BPF_X: -+ case BPF_JMP | BPF_JSGT | BPF_X: -+ case BPF_JMP | BPF_JSGE | BPF_X: -+ case BPF_JMP | BPF_JSLT | BPF_X: -+ case BPF_JMP | BPF_JSLE | BPF_X: -+ if (off == 0) -+ break; -+ setup_jmp_r(ctx, dst == src, BPF_OP(code), off, &jmp, &rel); -+ emit_jmp_r64(ctx, dst, src, rel, jmp); -+ if (finish_jmp(ctx, jmp, off) < 0) -+ goto toofar; -+ break; -+ /* PC += off if dst == imm */ -+ /* PC += off if dst != imm */ -+ /* PC += off if dst & imm */ -+ /* PC += off if dst > imm */ -+ /* PC += off if dst >= imm */ -+ /* PC += off if dst < imm */ -+ /* PC += off if dst <= imm */ -+ /* PC += off if dst > imm (signed) */ -+ /* PC += off if dst >= imm (signed) */ -+ /* PC += off if dst < imm (signed) */ -+ /* PC += off if dst <= imm (signed) */ -+ case BPF_JMP | BPF_JEQ | BPF_K: -+ case BPF_JMP | BPF_JNE | BPF_K: -+ case BPF_JMP | BPF_JSET | BPF_K: -+ case BPF_JMP | BPF_JGT | BPF_K: -+ case BPF_JMP | BPF_JGE | BPF_K: -+ case BPF_JMP | BPF_JLT | BPF_K: -+ case BPF_JMP | BPF_JLE | BPF_K: -+ case BPF_JMP | BPF_JSGT | BPF_K: -+ case BPF_JMP | BPF_JSGE | BPF_K: -+ case BPF_JMP | BPF_JSLT | BPF_K: -+ case BPF_JMP | BPF_JSLE | BPF_K: -+ if (off == 0) -+ break; -+ setup_jmp_i(ctx, imm, 64, BPF_OP(code), off, &jmp, &rel); -+ emit_jmp_i64(ctx, dst, imm, rel, jmp); -+ if (finish_jmp(ctx, jmp, off) < 0) -+ goto toofar; -+ break; -+ /* PC += off */ -+ case BPF_JMP | BPF_JA: -+ if (off == 0) -+ break; -+ if (emit_ja(ctx, off) < 0) -+ goto toofar; -+ break; -+ /* Tail call */ -+ case BPF_JMP | BPF_TAIL_CALL: -+ if (emit_tail_call(ctx) < 0) -+ goto invalid; -+ break; -+ /* Function call */ -+ case BPF_JMP | BPF_CALL: -+ if (emit_call(ctx, insn) < 0) -+ goto invalid; -+ break; -+ /* Function return */ -+ case BPF_JMP | BPF_EXIT: -+ /* -+ * Optimization: when last instruction is EXIT -+ * simply continue to epilogue. -+ */ -+ if (ctx->bpf_index == ctx->program->len - 1) -+ break; -+ if (emit_exit(ctx) < 0) -+ goto toofar; -+ break; -+ -+ default: -+invalid: -+ pr_err_once("unknown opcode %02x\n", code); -+ return -EINVAL; -+notyet: -+ pr_info_once("*** NOT YET: opcode %02x ***\n", code); -+ return -EFAULT; -+toofar: -+ pr_info_once("*** TOO FAR: jump at %u opcode %02x ***\n", -+ ctx->bpf_index, code); -+ return -E2BIG; -+ } -+ return 0; -+} diff --git a/root/target/linux/generic/backport-5.15/050-v5.16-03-mips-bpf-Add-new-eBPF-JIT-for-64-bit-MIPS.patch b/root/target/linux/generic/backport-5.15/050-v5.16-03-mips-bpf-Add-new-eBPF-JIT-for-64-bit-MIPS.patch deleted file mode 100755 index 38b46c0b..00000000 --- a/root/target/linux/generic/backport-5.15/050-v5.16-03-mips-bpf-Add-new-eBPF-JIT-for-64-bit-MIPS.patch +++ /dev/null @@ -1,1005 +0,0 @@ -From: Johan Almbladh -Date: Tue, 5 Oct 2021 18:54:05 +0200 -Subject: [PATCH] mips: bpf: Add new eBPF JIT for 64-bit MIPS - -This is an implementation on of an eBPF JIT for 64-bit MIPS III-V and -MIPS64r1-r6. It uses the same framework introduced by the 32-bit JIT. - -Signed-off-by: Johan Almbladh ---- - create mode 100644 arch/mips/net/bpf_jit_comp64.c - ---- /dev/null -+++ b/arch/mips/net/bpf_jit_comp64.c -@@ -0,0 +1,991 @@ -+// SPDX-License-Identifier: GPL-2.0-only -+/* -+ * Just-In-Time compiler for eBPF bytecode on MIPS. -+ * Implementation of JIT functions for 64-bit CPUs. -+ * -+ * Copyright (c) 2021 Anyfi Networks AB. -+ * Author: Johan Almbladh -+ * -+ * Based on code and ideas from -+ * Copyright (c) 2017 Cavium, Inc. -+ * Copyright (c) 2017 Shubham Bansal -+ * Copyright (c) 2011 Mircea Gherzan -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include "bpf_jit_comp.h" -+ -+/* MIPS t0-t3 are not available in the n64 ABI */ -+#undef MIPS_R_T0 -+#undef MIPS_R_T1 -+#undef MIPS_R_T2 -+#undef MIPS_R_T3 -+ -+/* Stack is 16-byte aligned in n64 ABI */ -+#define MIPS_STACK_ALIGNMENT 16 -+ -+/* Extra 64-bit eBPF registers used by JIT */ -+#define JIT_REG_TC (MAX_BPF_JIT_REG + 0) -+#define JIT_REG_ZX (MAX_BPF_JIT_REG + 1) -+ -+/* Number of prologue bytes to skip when doing a tail call */ -+#define JIT_TCALL_SKIP 4 -+ -+/* Callee-saved CPU registers that the JIT must preserve */ -+#define JIT_CALLEE_REGS \ -+ (BIT(MIPS_R_S0) | \ -+ BIT(MIPS_R_S1) | \ -+ BIT(MIPS_R_S2) | \ -+ BIT(MIPS_R_S3) | \ -+ BIT(MIPS_R_S4) | \ -+ BIT(MIPS_R_S5) | \ -+ BIT(MIPS_R_S6) | \ -+ BIT(MIPS_R_S7) | \ -+ BIT(MIPS_R_GP) | \ -+ BIT(MIPS_R_FP) | \ -+ BIT(MIPS_R_RA)) -+ -+/* Caller-saved CPU registers available for JIT use */ -+#define JIT_CALLER_REGS \ -+ (BIT(MIPS_R_A5) | \ -+ BIT(MIPS_R_A6) | \ -+ BIT(MIPS_R_A7)) -+/* -+ * Mapping of 64-bit eBPF registers to 64-bit native MIPS registers. -+ * MIPS registers t4 - t7 may be used by the JIT as temporary registers. -+ * MIPS registers t8 - t9 are reserved for single-register common functions. -+ */ -+static const u8 bpf2mips64[] = { -+ /* Return value from in-kernel function, and exit value from eBPF */ -+ [BPF_REG_0] = MIPS_R_V0, -+ /* Arguments from eBPF program to in-kernel function */ -+ [BPF_REG_1] = MIPS_R_A0, -+ [BPF_REG_2] = MIPS_R_A1, -+ [BPF_REG_3] = MIPS_R_A2, -+ [BPF_REG_4] = MIPS_R_A3, -+ [BPF_REG_5] = MIPS_R_A4, -+ /* Callee-saved registers that in-kernel function will preserve */ -+ [BPF_REG_6] = MIPS_R_S0, -+ [BPF_REG_7] = MIPS_R_S1, -+ [BPF_REG_8] = MIPS_R_S2, -+ [BPF_REG_9] = MIPS_R_S3, -+ /* Read-only frame pointer to access the eBPF stack */ -+ [BPF_REG_FP] = MIPS_R_FP, -+ /* Temporary register for blinding constants */ -+ [BPF_REG_AX] = MIPS_R_AT, -+ /* Tail call count register, caller-saved */ -+ [JIT_REG_TC] = MIPS_R_A5, -+ /* Constant for register zero-extension */ -+ [JIT_REG_ZX] = MIPS_R_V1, -+}; -+ -+/* -+ * MIPS 32-bit operations on 64-bit registers generate a sign-extended -+ * result. However, the eBPF ISA mandates zero-extension, so we rely on the -+ * verifier to add that for us (emit_zext_ver). In addition, ALU arithmetic -+ * operations, right shift and byte swap require properly sign-extended -+ * operands or the result is unpredictable. We emit explicit sign-extensions -+ * in those cases. -+ */ -+ -+/* Sign extension */ -+static void emit_sext(struct jit_context *ctx, u8 dst, u8 src) -+{ -+ emit(ctx, sll, dst, src, 0); -+ clobber_reg(ctx, dst); -+} -+ -+/* Zero extension */ -+static void emit_zext(struct jit_context *ctx, u8 dst) -+{ -+ if (cpu_has_mips64r2 || cpu_has_mips64r6) { -+ emit(ctx, dinsu, dst, MIPS_R_ZERO, 32, 32); -+ } else { -+ emit(ctx, and, dst, dst, bpf2mips64[JIT_REG_ZX]); -+ access_reg(ctx, JIT_REG_ZX); /* We need the ZX register */ -+ } -+ clobber_reg(ctx, dst); -+} -+ -+/* Zero extension, if verifier does not do it for us */ -+static void emit_zext_ver(struct jit_context *ctx, u8 dst) -+{ -+ if (!ctx->program->aux->verifier_zext) -+ emit_zext(ctx, dst); -+} -+ -+/* dst = imm (64-bit) */ -+static void emit_mov_i64(struct jit_context *ctx, u8 dst, u64 imm64) -+{ -+ if (imm64 >= 0xffffffffffff8000ULL || imm64 < 0x8000ULL) { -+ emit(ctx, daddiu, dst, MIPS_R_ZERO, (s16)imm64); -+ } else if (imm64 >= 0xffffffff80000000ULL || -+ (imm64 < 0x80000000 && imm64 > 0xffff)) { -+ emit(ctx, lui, dst, (s16)(imm64 >> 16)); -+ emit(ctx, ori, dst, dst, (u16)imm64 & 0xffff); -+ } else { -+ u8 acc = MIPS_R_ZERO; -+ int k; -+ -+ for (k = 0; k < 4; k++) { -+ u16 half = imm64 >> (48 - 16 * k); -+ -+ if (acc == dst) -+ emit(ctx, dsll, dst, dst, 16); -+ -+ if (half) { -+ emit(ctx, ori, dst, acc, half); -+ acc = dst; -+ } -+ } -+ } -+ clobber_reg(ctx, dst); -+} -+ -+/* ALU immediate operation (64-bit) */ -+static void emit_alu_i64(struct jit_context *ctx, u8 dst, s32 imm, u8 op) -+{ -+ switch (BPF_OP(op)) { -+ /* dst = dst | imm */ -+ case BPF_OR: -+ emit(ctx, ori, dst, dst, (u16)imm); -+ break; -+ /* dst = dst ^ imm */ -+ case BPF_XOR: -+ emit(ctx, xori, dst, dst, (u16)imm); -+ break; -+ /* dst = -dst */ -+ case BPF_NEG: -+ emit(ctx, dsubu, dst, MIPS_R_ZERO, dst); -+ break; -+ /* dst = dst << imm */ -+ case BPF_LSH: -+ emit(ctx, dsll_safe, dst, dst, imm); -+ break; -+ /* dst = dst >> imm */ -+ case BPF_RSH: -+ emit(ctx, dsrl_safe, dst, dst, imm); -+ break; -+ /* dst = dst >> imm (arithmetic) */ -+ case BPF_ARSH: -+ emit(ctx, dsra_safe, dst, dst, imm); -+ break; -+ /* dst = dst + imm */ -+ case BPF_ADD: -+ emit(ctx, daddiu, dst, dst, imm); -+ break; -+ /* dst = dst - imm */ -+ case BPF_SUB: -+ emit(ctx, daddiu, dst, dst, -imm); -+ break; -+ default: -+ /* Width-generic operations */ -+ emit_alu_i(ctx, dst, imm, op); -+ } -+ clobber_reg(ctx, dst); -+} -+ -+/* ALU register operation (64-bit) */ -+static void emit_alu_r64(struct jit_context *ctx, u8 dst, u8 src, u8 op) -+{ -+ switch (BPF_OP(op)) { -+ /* dst = dst << src */ -+ case BPF_LSH: -+ emit(ctx, dsllv, dst, dst, src); -+ break; -+ /* dst = dst >> src */ -+ case BPF_RSH: -+ emit(ctx, dsrlv, dst, dst, src); -+ break; -+ /* dst = dst >> src (arithmetic) */ -+ case BPF_ARSH: -+ emit(ctx, dsrav, dst, dst, src); -+ break; -+ /* dst = dst + src */ -+ case BPF_ADD: -+ emit(ctx, daddu, dst, dst, src); -+ break; -+ /* dst = dst - src */ -+ case BPF_SUB: -+ emit(ctx, dsubu, dst, dst, src); -+ break; -+ /* dst = dst * src */ -+ case BPF_MUL: -+ if (cpu_has_mips64r6) { -+ emit(ctx, dmulu, dst, dst, src); -+ } else { -+ emit(ctx, dmultu, dst, src); -+ emit(ctx, mflo, dst); -+ } -+ break; -+ /* dst = dst / src */ -+ case BPF_DIV: -+ if (cpu_has_mips64r6) { -+ emit(ctx, ddivu_r6, dst, dst, src); -+ } else { -+ emit(ctx, ddivu, dst, src); -+ emit(ctx, mflo, dst); -+ } -+ break; -+ /* dst = dst % src */ -+ case BPF_MOD: -+ if (cpu_has_mips64r6) { -+ emit(ctx, dmodu, dst, dst, src); -+ } else { -+ emit(ctx, ddivu, dst, src); -+ emit(ctx, mfhi, dst); -+ } -+ break; -+ default: -+ /* Width-generic operations */ -+ emit_alu_r(ctx, dst, src, op); -+ } -+ clobber_reg(ctx, dst); -+} -+ -+/* Swap sub words in a register double word */ -+static void emit_swap_r64(struct jit_context *ctx, u8 dst, u8 mask, u32 bits) -+{ -+ u8 tmp = MIPS_R_T9; -+ -+ emit(ctx, and, tmp, dst, mask); /* tmp = dst & mask */ -+ emit(ctx, dsll, tmp, tmp, bits); /* tmp = tmp << bits */ -+ emit(ctx, dsrl, dst, dst, bits); /* dst = dst >> bits */ -+ emit(ctx, and, dst, dst, mask); /* dst = dst & mask */ -+ emit(ctx, or, dst, dst, tmp); /* dst = dst | tmp */ -+} -+ -+/* Swap bytes and truncate a register double word, word or half word */ -+static void emit_bswap_r64(struct jit_context *ctx, u8 dst, u32 width) -+{ -+ switch (width) { -+ /* Swap bytes in a double word */ -+ case 64: -+ if (cpu_has_mips64r2 || cpu_has_mips64r6) { -+ emit(ctx, dsbh, dst, dst); -+ emit(ctx, dshd, dst, dst); -+ } else { -+ u8 t1 = MIPS_R_T6; -+ u8 t2 = MIPS_R_T7; -+ -+ emit(ctx, dsll32, t2, dst, 0); /* t2 = dst << 32 */ -+ emit(ctx, dsrl32, dst, dst, 0); /* dst = dst >> 32 */ -+ emit(ctx, or, dst, dst, t2); /* dst = dst | t2 */ -+ -+ emit(ctx, ori, t2, MIPS_R_ZERO, 0xffff); -+ emit(ctx, dsll32, t1, t2, 0); /* t1 = t2 << 32 */ -+ emit(ctx, or, t1, t1, t2); /* t1 = t1 | t2 */ -+ emit_swap_r64(ctx, dst, t1, 16);/* dst = swap16(dst) */ -+ -+ emit(ctx, lui, t2, 0xff); /* t2 = 0x00ff0000 */ -+ emit(ctx, ori, t2, t2, 0xff); /* t2 = t2 | 0x00ff */ -+ emit(ctx, dsll32, t1, t2, 0); /* t1 = t2 << 32 */ -+ emit(ctx, or, t1, t1, t2); /* t1 = t1 | t2 */ -+ emit_swap_r64(ctx, dst, t1, 8); /* dst = swap8(dst) */ -+ } -+ break; -+ /* Swap bytes in a half word */ -+ /* Swap bytes in a word */ -+ case 32: -+ case 16: -+ emit_sext(ctx, dst, dst); -+ emit_bswap_r(ctx, dst, width); -+ if (cpu_has_mips64r2 || cpu_has_mips64r6) -+ emit_zext(ctx, dst); -+ break; -+ } -+ clobber_reg(ctx, dst); -+} -+ -+/* Truncate a register double word, word or half word */ -+static void emit_trunc_r64(struct jit_context *ctx, u8 dst, u32 width) -+{ -+ switch (width) { -+ case 64: -+ break; -+ /* Zero-extend a word */ -+ case 32: -+ emit_zext(ctx, dst); -+ break; -+ /* Zero-extend a half word */ -+ case 16: -+ emit(ctx, andi, dst, dst, 0xffff); -+ break; -+ } -+ clobber_reg(ctx, dst); -+} -+ -+/* Load operation: dst = *(size*)(src + off) */ -+static void emit_ldx(struct jit_context *ctx, u8 dst, u8 src, s16 off, u8 size) -+{ -+ switch (size) { -+ /* Load a byte */ -+ case BPF_B: -+ emit(ctx, lbu, dst, off, src); -+ break; -+ /* Load a half word */ -+ case BPF_H: -+ emit(ctx, lhu, dst, off, src); -+ break; -+ /* Load a word */ -+ case BPF_W: -+ emit(ctx, lwu, dst, off, src); -+ break; -+ /* Load a double word */ -+ case BPF_DW: -+ emit(ctx, ld, dst, off, src); -+ break; -+ } -+ clobber_reg(ctx, dst); -+} -+ -+/* Store operation: *(size *)(dst + off) = src */ -+static void emit_stx(struct jit_context *ctx, u8 dst, u8 src, s16 off, u8 size) -+{ -+ switch (size) { -+ /* Store a byte */ -+ case BPF_B: -+ emit(ctx, sb, src, off, dst); -+ break; -+ /* Store a half word */ -+ case BPF_H: -+ emit(ctx, sh, src, off, dst); -+ break; -+ /* Store a word */ -+ case BPF_W: -+ emit(ctx, sw, src, off, dst); -+ break; -+ /* Store a double word */ -+ case BPF_DW: -+ emit(ctx, sd, src, off, dst); -+ break; -+ } -+} -+ -+/* Atomic read-modify-write */ -+static void emit_atomic_r64(struct jit_context *ctx, -+ u8 dst, u8 src, s16 off, u8 code) -+{ -+ u8 t1 = MIPS_R_T6; -+ u8 t2 = MIPS_R_T7; -+ -+ emit(ctx, lld, t1, off, dst); -+ switch (code) { -+ case BPF_ADD: -+ emit(ctx, daddu, t2, t1, src); -+ break; -+ case BPF_AND: -+ emit(ctx, and, t2, t1, src); -+ break; -+ case BPF_OR: -+ emit(ctx, or, t2, t1, src); -+ break; -+ case BPF_XOR: -+ emit(ctx, xor, t2, t1, src); -+ break; -+ } -+ emit(ctx, scd, t2, off, dst); -+ emit(ctx, beqz, t2, -16); -+ emit(ctx, nop); /* Delay slot */ -+} -+ -+/* Function call */ -+static int emit_call(struct jit_context *ctx, const struct bpf_insn *insn) -+{ -+ u8 zx = bpf2mips64[JIT_REG_ZX]; -+ u8 tmp = MIPS_R_T6; -+ bool fixed; -+ u64 addr; -+ -+ /* Decode the call address */ -+ if (bpf_jit_get_func_addr(ctx->program, insn, false, -+ &addr, &fixed) < 0) -+ return -1; -+ if (!fixed) -+ return -1; -+ -+ /* Push caller-saved registers on stack */ -+ push_regs(ctx, ctx->clobbered & JIT_CALLER_REGS, 0, 0); -+ -+ /* Emit function call */ -+ emit_mov_i64(ctx, tmp, addr); -+ emit(ctx, jalr, MIPS_R_RA, tmp); -+ emit(ctx, nop); /* Delay slot */ -+ -+ /* Restore caller-saved registers */ -+ pop_regs(ctx, ctx->clobbered & JIT_CALLER_REGS, 0, 0); -+ -+ /* Re-initialize the JIT zero-extension register if accessed */ -+ if (ctx->accessed & BIT(JIT_REG_ZX)) { -+ emit(ctx, daddiu, zx, MIPS_R_ZERO, -1); -+ emit(ctx, dsrl32, zx, zx, 0); -+ } -+ -+ clobber_reg(ctx, MIPS_R_RA); -+ clobber_reg(ctx, MIPS_R_V0); -+ clobber_reg(ctx, MIPS_R_V1); -+ return 0; -+} -+ -+/* Function tail call */ -+static int emit_tail_call(struct jit_context *ctx) -+{ -+ u8 ary = bpf2mips64[BPF_REG_2]; -+ u8 ind = bpf2mips64[BPF_REG_3]; -+ u8 tcc = bpf2mips64[JIT_REG_TC]; -+ u8 tmp = MIPS_R_T6; -+ int off; -+ -+ /* -+ * Tail call: -+ * eBPF R1 - function argument (context ptr), passed in a0-a1 -+ * eBPF R2 - ptr to object with array of function entry points -+ * eBPF R3 - array index of function to be called -+ */ -+ -+ /* if (ind >= ary->map.max_entries) goto out */ -+ off = offsetof(struct bpf_array, map.max_entries); -+ if (off > 0x7fff) -+ return -1; -+ emit(ctx, lwu, tmp, off, ary); /* tmp = ary->map.max_entrs*/ -+ emit(ctx, sltu, tmp, ind, tmp); /* tmp = ind < t1 */ -+ emit(ctx, beqz, tmp, get_offset(ctx, 1)); /* PC += off(1) if tmp == 0*/ -+ -+ /* if (--TCC < 0) goto out */ -+ emit(ctx, daddiu, tcc, tcc, -1); /* tcc-- (delay slot) */ -+ emit(ctx, bltz, tcc, get_offset(ctx, 1)); /* PC += off(1) if tcc < 0 */ -+ /* (next insn delay slot) */ -+ /* prog = ary->ptrs[ind] */ -+ off = offsetof(struct bpf_array, ptrs); -+ if (off > 0x7fff) -+ return -1; -+ emit(ctx, dsll, tmp, ind, 3); /* tmp = ind << 3 */ -+ emit(ctx, daddu, tmp, tmp, ary); /* tmp += ary */ -+ emit(ctx, ld, tmp, off, tmp); /* tmp = *(tmp + off) */ -+ -+ /* if (prog == 0) goto out */ -+ emit(ctx, beqz, tmp, get_offset(ctx, 1)); /* PC += off(1) if tmp == 0*/ -+ emit(ctx, nop); /* Delay slot */ -+ -+ /* func = prog->bpf_func + 8 (prologue skip offset) */ -+ off = offsetof(struct bpf_prog, bpf_func); -+ if (off > 0x7fff) -+ return -1; -+ emit(ctx, ld, tmp, off, tmp); /* tmp = *(tmp + off) */ -+ emit(ctx, daddiu, tmp, tmp, JIT_TCALL_SKIP); /* tmp += skip (4) */ -+ -+ /* goto func */ -+ build_epilogue(ctx, tmp); -+ access_reg(ctx, JIT_REG_TC); -+ return 0; -+} -+ -+/* -+ * Stack frame layout for a JITed program (stack grows down). -+ * -+ * Higher address : Previous stack frame : -+ * +===========================+ <--- MIPS sp before call -+ * | Callee-saved registers, | -+ * | including RA and FP | -+ * +---------------------------+ <--- eBPF FP (MIPS fp) -+ * | Local eBPF variables | -+ * | allocated by program | -+ * +---------------------------+ -+ * | Reserved for caller-saved | -+ * | registers | -+ * Lower address +===========================+ <--- MIPS sp -+ */ -+ -+/* Build program prologue to set up the stack and registers */ -+void build_prologue(struct jit_context *ctx) -+{ -+ u8 fp = bpf2mips64[BPF_REG_FP]; -+ u8 tc = bpf2mips64[JIT_REG_TC]; -+ u8 zx = bpf2mips64[JIT_REG_ZX]; -+ int stack, saved, locals, reserved; -+ -+ /* -+ * The first instruction initializes the tail call count register. -+ * On a tail call, the calling function jumps into the prologue -+ * after this instruction. -+ */ -+ emit(ctx, addiu, tc, MIPS_R_ZERO, min(MAX_TAIL_CALL_CNT + 1, 0xffff)); -+ -+ /* === Entry-point for tail calls === */ -+ -+ /* -+ * If the eBPF frame pointer and tail call count registers were -+ * accessed they must be preserved. Mark them as clobbered here -+ * to save and restore them on the stack as needed. -+ */ -+ if (ctx->accessed & BIT(BPF_REG_FP)) -+ clobber_reg(ctx, fp); -+ if (ctx->accessed & BIT(JIT_REG_TC)) -+ clobber_reg(ctx, tc); -+ if (ctx->accessed & BIT(JIT_REG_ZX)) -+ clobber_reg(ctx, zx); -+ -+ /* Compute the stack space needed for callee-saved registers */ -+ saved = hweight32(ctx->clobbered & JIT_CALLEE_REGS) * sizeof(u64); -+ saved = ALIGN(saved, MIPS_STACK_ALIGNMENT); -+ -+ /* Stack space used by eBPF program local data */ -+ locals = ALIGN(ctx->program->aux->stack_depth, MIPS_STACK_ALIGNMENT); -+ -+ /* -+ * If we are emitting function calls, reserve extra stack space for -+ * caller-saved registers needed by the JIT. The required space is -+ * computed automatically during resource usage discovery (pass 1). -+ */ -+ reserved = ctx->stack_used; -+ -+ /* Allocate the stack frame */ -+ stack = ALIGN(saved + locals + reserved, MIPS_STACK_ALIGNMENT); -+ if (stack) -+ emit(ctx, daddiu, MIPS_R_SP, MIPS_R_SP, -stack); -+ -+ /* Store callee-saved registers on stack */ -+ push_regs(ctx, ctx->clobbered & JIT_CALLEE_REGS, 0, stack - saved); -+ -+ /* Initialize the eBPF frame pointer if accessed */ -+ if (ctx->accessed & BIT(BPF_REG_FP)) -+ emit(ctx, daddiu, fp, MIPS_R_SP, stack - saved); -+ -+ /* Initialize the ePF JIT zero-extension register if accessed */ -+ if (ctx->accessed & BIT(JIT_REG_ZX)) { -+ emit(ctx, daddiu, zx, MIPS_R_ZERO, -1); -+ emit(ctx, dsrl32, zx, zx, 0); -+ } -+ -+ ctx->saved_size = saved; -+ ctx->stack_size = stack; -+} -+ -+/* Build the program epilogue to restore the stack and registers */ -+void build_epilogue(struct jit_context *ctx, int dest_reg) -+{ -+ /* Restore callee-saved registers from stack */ -+ pop_regs(ctx, ctx->clobbered & JIT_CALLEE_REGS, 0, -+ ctx->stack_size - ctx->saved_size); -+ -+ /* Release the stack frame */ -+ if (ctx->stack_size) -+ emit(ctx, daddiu, MIPS_R_SP, MIPS_R_SP, ctx->stack_size); -+ -+ /* Jump to return address and sign-extend the 32-bit return value */ -+ emit(ctx, jr, dest_reg); -+ emit(ctx, sll, MIPS_R_V0, MIPS_R_V0, 0); /* Delay slot */ -+} -+ -+/* Build one eBPF instruction */ -+int build_insn(const struct bpf_insn *insn, struct jit_context *ctx) -+{ -+ u8 dst = bpf2mips64[insn->dst_reg]; -+ u8 src = bpf2mips64[insn->src_reg]; -+ u8 code = insn->code; -+ s16 off = insn->off; -+ s32 imm = insn->imm; -+ s32 val, rel; -+ u8 alu, jmp; -+ -+ switch (code) { -+ /* ALU operations */ -+ /* dst = imm */ -+ case BPF_ALU | BPF_MOV | BPF_K: -+ emit_mov_i(ctx, dst, imm); -+ emit_zext_ver(ctx, dst); -+ break; -+ /* dst = src */ -+ case BPF_ALU | BPF_MOV | BPF_X: -+ if (imm == 1) { -+ /* Special mov32 for zext */ -+ emit_zext(ctx, dst); -+ } else { -+ emit_mov_r(ctx, dst, src); -+ emit_zext_ver(ctx, dst); -+ } -+ break; -+ /* dst = -dst */ -+ case BPF_ALU | BPF_NEG: -+ emit_sext(ctx, dst, dst); -+ emit_alu_i(ctx, dst, 0, BPF_NEG); -+ emit_zext_ver(ctx, dst); -+ break; -+ /* dst = dst & imm */ -+ /* dst = dst | imm */ -+ /* dst = dst ^ imm */ -+ /* dst = dst << imm */ -+ case BPF_ALU | BPF_OR | BPF_K: -+ case BPF_ALU | BPF_AND | BPF_K: -+ case BPF_ALU | BPF_XOR | BPF_K: -+ case BPF_ALU | BPF_LSH | BPF_K: -+ if (!valid_alu_i(BPF_OP(code), imm)) { -+ emit_mov_i(ctx, MIPS_R_T4, imm); -+ emit_alu_r(ctx, dst, MIPS_R_T4, BPF_OP(code)); -+ } else if (rewrite_alu_i(BPF_OP(code), imm, &alu, &val)) { -+ emit_alu_i(ctx, dst, val, alu); -+ } -+ emit_zext_ver(ctx, dst); -+ break; -+ /* dst = dst >> imm */ -+ /* dst = dst >> imm (arithmetic) */ -+ /* dst = dst + imm */ -+ /* dst = dst - imm */ -+ /* dst = dst * imm */ -+ /* dst = dst / imm */ -+ /* dst = dst % imm */ -+ case BPF_ALU | BPF_RSH | BPF_K: -+ case BPF_ALU | BPF_ARSH | BPF_K: -+ case BPF_ALU | BPF_ADD | BPF_K: -+ case BPF_ALU | BPF_SUB | BPF_K: -+ case BPF_ALU | BPF_MUL | BPF_K: -+ case BPF_ALU | BPF_DIV | BPF_K: -+ case BPF_ALU | BPF_MOD | BPF_K: -+ if (!valid_alu_i(BPF_OP(code), imm)) { -+ emit_sext(ctx, dst, dst); -+ emit_mov_i(ctx, MIPS_R_T4, imm); -+ emit_alu_r(ctx, dst, MIPS_R_T4, BPF_OP(code)); -+ } else if (rewrite_alu_i(BPF_OP(code), imm, &alu, &val)) { -+ emit_sext(ctx, dst, dst); -+ emit_alu_i(ctx, dst, val, alu); -+ } -+ emit_zext_ver(ctx, dst); -+ break; -+ /* dst = dst & src */ -+ /* dst = dst | src */ -+ /* dst = dst ^ src */ -+ /* dst = dst << src */ -+ case BPF_ALU | BPF_AND | BPF_X: -+ case BPF_ALU | BPF_OR | BPF_X: -+ case BPF_ALU | BPF_XOR | BPF_X: -+ case BPF_ALU | BPF_LSH | BPF_X: -+ emit_alu_r(ctx, dst, src, BPF_OP(code)); -+ emit_zext_ver(ctx, dst); -+ break; -+ /* dst = dst >> src */ -+ /* dst = dst >> src (arithmetic) */ -+ /* dst = dst + src */ -+ /* dst = dst - src */ -+ /* dst = dst * src */ -+ /* dst = dst / src */ -+ /* dst = dst % src */ -+ case BPF_ALU | BPF_RSH | BPF_X: -+ case BPF_ALU | BPF_ARSH | BPF_X: -+ case BPF_ALU | BPF_ADD | BPF_X: -+ case BPF_ALU | BPF_SUB | BPF_X: -+ case BPF_ALU | BPF_MUL | BPF_X: -+ case BPF_ALU | BPF_DIV | BPF_X: -+ case BPF_ALU | BPF_MOD | BPF_X: -+ emit_sext(ctx, dst, dst); -+ emit_sext(ctx, MIPS_R_T4, src); -+ emit_alu_r(ctx, dst, MIPS_R_T4, BPF_OP(code)); -+ emit_zext_ver(ctx, dst); -+ break; -+ /* dst = imm (64-bit) */ -+ case BPF_ALU64 | BPF_MOV | BPF_K: -+ emit_mov_i(ctx, dst, imm); -+ break; -+ /* dst = src (64-bit) */ -+ case BPF_ALU64 | BPF_MOV | BPF_X: -+ emit_mov_r(ctx, dst, src); -+ break; -+ /* dst = -dst (64-bit) */ -+ case BPF_ALU64 | BPF_NEG: -+ emit_alu_i64(ctx, dst, 0, BPF_NEG); -+ break; -+ /* dst = dst & imm (64-bit) */ -+ /* dst = dst | imm (64-bit) */ -+ /* dst = dst ^ imm (64-bit) */ -+ /* dst = dst << imm (64-bit) */ -+ /* dst = dst >> imm (64-bit) */ -+ /* dst = dst >> imm ((64-bit, arithmetic) */ -+ /* dst = dst + imm (64-bit) */ -+ /* dst = dst - imm (64-bit) */ -+ /* dst = dst * imm (64-bit) */ -+ /* dst = dst / imm (64-bit) */ -+ /* dst = dst % imm (64-bit) */ -+ case BPF_ALU64 | BPF_AND | BPF_K: -+ case BPF_ALU64 | BPF_OR | BPF_K: -+ case BPF_ALU64 | BPF_XOR | BPF_K: -+ case BPF_ALU64 | BPF_LSH | BPF_K: -+ case BPF_ALU64 | BPF_RSH | BPF_K: -+ case BPF_ALU64 | BPF_ARSH | BPF_K: -+ case BPF_ALU64 | BPF_ADD | BPF_K: -+ case BPF_ALU64 | BPF_SUB | BPF_K: -+ case BPF_ALU64 | BPF_MUL | BPF_K: -+ case BPF_ALU64 | BPF_DIV | BPF_K: -+ case BPF_ALU64 | BPF_MOD | BPF_K: -+ if (!valid_alu_i(BPF_OP(code), imm)) { -+ emit_mov_i(ctx, MIPS_R_T4, imm); -+ emit_alu_r64(ctx, dst, MIPS_R_T4, BPF_OP(code)); -+ } else if (rewrite_alu_i(BPF_OP(code), imm, &alu, &val)) { -+ emit_alu_i64(ctx, dst, val, alu); -+ } -+ break; -+ /* dst = dst & src (64-bit) */ -+ /* dst = dst | src (64-bit) */ -+ /* dst = dst ^ src (64-bit) */ -+ /* dst = dst << src (64-bit) */ -+ /* dst = dst >> src (64-bit) */ -+ /* dst = dst >> src (64-bit, arithmetic) */ -+ /* dst = dst + src (64-bit) */ -+ /* dst = dst - src (64-bit) */ -+ /* dst = dst * src (64-bit) */ -+ /* dst = dst / src (64-bit) */ -+ /* dst = dst % src (64-bit) */ -+ case BPF_ALU64 | BPF_AND | BPF_X: -+ case BPF_ALU64 | BPF_OR | BPF_X: -+ case BPF_ALU64 | BPF_XOR | BPF_X: -+ case BPF_ALU64 | BPF_LSH | BPF_X: -+ case BPF_ALU64 | BPF_RSH | BPF_X: -+ case BPF_ALU64 | BPF_ARSH | BPF_X: -+ case BPF_ALU64 | BPF_ADD | BPF_X: -+ case BPF_ALU64 | BPF_SUB | BPF_X: -+ case BPF_ALU64 | BPF_MUL | BPF_X: -+ case BPF_ALU64 | BPF_DIV | BPF_X: -+ case BPF_ALU64 | BPF_MOD | BPF_X: -+ emit_alu_r64(ctx, dst, src, BPF_OP(code)); -+ break; -+ /* dst = htole(dst) */ -+ /* dst = htobe(dst) */ -+ case BPF_ALU | BPF_END | BPF_FROM_LE: -+ case BPF_ALU | BPF_END | BPF_FROM_BE: -+ if (BPF_SRC(code) == -+#ifdef __BIG_ENDIAN -+ BPF_FROM_LE -+#else -+ BPF_FROM_BE -+#endif -+ ) -+ emit_bswap_r64(ctx, dst, imm); -+ else -+ emit_trunc_r64(ctx, dst, imm); -+ break; -+ /* dst = imm64 */ -+ case BPF_LD | BPF_IMM | BPF_DW: -+ emit_mov_i64(ctx, dst, (u32)imm | ((u64)insn[1].imm << 32)); -+ return 1; -+ /* LDX: dst = *(size *)(src + off) */ -+ case BPF_LDX | BPF_MEM | BPF_W: -+ case BPF_LDX | BPF_MEM | BPF_H: -+ case BPF_LDX | BPF_MEM | BPF_B: -+ case BPF_LDX | BPF_MEM | BPF_DW: -+ emit_ldx(ctx, dst, src, off, BPF_SIZE(code)); -+ break; -+ /* ST: *(size *)(dst + off) = imm */ -+ case BPF_ST | BPF_MEM | BPF_W: -+ case BPF_ST | BPF_MEM | BPF_H: -+ case BPF_ST | BPF_MEM | BPF_B: -+ case BPF_ST | BPF_MEM | BPF_DW: -+ emit_mov_i(ctx, MIPS_R_T4, imm); -+ emit_stx(ctx, dst, MIPS_R_T4, off, BPF_SIZE(code)); -+ break; -+ /* STX: *(size *)(dst + off) = src */ -+ case BPF_STX | BPF_MEM | BPF_W: -+ case BPF_STX | BPF_MEM | BPF_H: -+ case BPF_STX | BPF_MEM | BPF_B: -+ case BPF_STX | BPF_MEM | BPF_DW: -+ emit_stx(ctx, dst, src, off, BPF_SIZE(code)); -+ break; -+ /* Speculation barrier */ -+ case BPF_ST | BPF_NOSPEC: -+ break; -+ /* Atomics */ -+ case BPF_STX | BPF_XADD | BPF_W: -+ case BPF_STX | BPF_XADD | BPF_DW: -+ switch (imm) { -+ case BPF_ADD: -+ case BPF_AND: -+ case BPF_OR: -+ case BPF_XOR: -+ if (BPF_SIZE(code) == BPF_DW) { -+ emit_atomic_r64(ctx, dst, src, off, imm); -+ } else { /* 32-bit, no fetch */ -+ emit_sext(ctx, MIPS_R_T4, src); -+ emit_atomic_r(ctx, dst, MIPS_R_T4, off, imm); -+ } -+ break; -+ default: -+ goto notyet; -+ } -+ break; -+ /* PC += off if dst == src */ -+ /* PC += off if dst != src */ -+ /* PC += off if dst & src */ -+ /* PC += off if dst > src */ -+ /* PC += off if dst >= src */ -+ /* PC += off if dst < src */ -+ /* PC += off if dst <= src */ -+ /* PC += off if dst > src (signed) */ -+ /* PC += off if dst >= src (signed) */ -+ /* PC += off if dst < src (signed) */ -+ /* PC += off if dst <= src (signed) */ -+ case BPF_JMP32 | BPF_JEQ | BPF_X: -+ case BPF_JMP32 | BPF_JNE | BPF_X: -+ case BPF_JMP32 | BPF_JSET | BPF_X: -+ case BPF_JMP32 | BPF_JGT | BPF_X: -+ case BPF_JMP32 | BPF_JGE | BPF_X: -+ case BPF_JMP32 | BPF_JLT | BPF_X: -+ case BPF_JMP32 | BPF_JLE | BPF_X: -+ case BPF_JMP32 | BPF_JSGT | BPF_X: -+ case BPF_JMP32 | BPF_JSGE | BPF_X: -+ case BPF_JMP32 | BPF_JSLT | BPF_X: -+ case BPF_JMP32 | BPF_JSLE | BPF_X: -+ if (off == 0) -+ break; -+ setup_jmp_r(ctx, dst == src, BPF_OP(code), off, &jmp, &rel); -+ emit_sext(ctx, MIPS_R_T4, dst); /* Sign-extended dst */ -+ emit_sext(ctx, MIPS_R_T5, src); /* Sign-extended src */ -+ emit_jmp_r(ctx, MIPS_R_T4, MIPS_R_T5, rel, jmp); -+ if (finish_jmp(ctx, jmp, off) < 0) -+ goto toofar; -+ break; -+ /* PC += off if dst == imm */ -+ /* PC += off if dst != imm */ -+ /* PC += off if dst & imm */ -+ /* PC += off if dst > imm */ -+ /* PC += off if dst >= imm */ -+ /* PC += off if dst < imm */ -+ /* PC += off if dst <= imm */ -+ /* PC += off if dst > imm (signed) */ -+ /* PC += off if dst >= imm (signed) */ -+ /* PC += off if dst < imm (signed) */ -+ /* PC += off if dst <= imm (signed) */ -+ case BPF_JMP32 | BPF_JEQ | BPF_K: -+ case BPF_JMP32 | BPF_JNE | BPF_K: -+ case BPF_JMP32 | BPF_JSET | BPF_K: -+ case BPF_JMP32 | BPF_JGT | BPF_K: -+ case BPF_JMP32 | BPF_JGE | BPF_K: -+ case BPF_JMP32 | BPF_JLT | BPF_K: -+ case BPF_JMP32 | BPF_JLE | BPF_K: -+ case BPF_JMP32 | BPF_JSGT | BPF_K: -+ case BPF_JMP32 | BPF_JSGE | BPF_K: -+ case BPF_JMP32 | BPF_JSLT | BPF_K: -+ case BPF_JMP32 | BPF_JSLE | BPF_K: -+ if (off == 0) -+ break; -+ setup_jmp_i(ctx, imm, 32, BPF_OP(code), off, &jmp, &rel); -+ emit_sext(ctx, MIPS_R_T4, dst); /* Sign-extended dst */ -+ if (valid_jmp_i(jmp, imm)) { -+ emit_jmp_i(ctx, MIPS_R_T4, imm, rel, jmp); -+ } else { -+ /* Move large immediate to register, sign-extended */ -+ emit_mov_i(ctx, MIPS_R_T5, imm); -+ emit_jmp_r(ctx, MIPS_R_T4, MIPS_R_T5, rel, jmp); -+ } -+ if (finish_jmp(ctx, jmp, off) < 0) -+ goto toofar; -+ break; -+ /* PC += off if dst == src */ -+ /* PC += off if dst != src */ -+ /* PC += off if dst & src */ -+ /* PC += off if dst > src */ -+ /* PC += off if dst >= src */ -+ /* PC += off if dst < src */ -+ /* PC += off if dst <= src */ -+ /* PC += off if dst > src (signed) */ -+ /* PC += off if dst >= src (signed) */ -+ /* PC += off if dst < src (signed) */ -+ /* PC += off if dst <= src (signed) */ -+ case BPF_JMP | BPF_JEQ | BPF_X: -+ case BPF_JMP | BPF_JNE | BPF_X: -+ case BPF_JMP | BPF_JSET | BPF_X: -+ case BPF_JMP | BPF_JGT | BPF_X: -+ case BPF_JMP | BPF_JGE | BPF_X: -+ case BPF_JMP | BPF_JLT | BPF_X: -+ case BPF_JMP | BPF_JLE | BPF_X: -+ case BPF_JMP | BPF_JSGT | BPF_X: -+ case BPF_JMP | BPF_JSGE | BPF_X: -+ case BPF_JMP | BPF_JSLT | BPF_X: -+ case BPF_JMP | BPF_JSLE | BPF_X: -+ if (off == 0) -+ break; -+ setup_jmp_r(ctx, dst == src, BPF_OP(code), off, &jmp, &rel); -+ emit_jmp_r(ctx, dst, src, rel, jmp); -+ if (finish_jmp(ctx, jmp, off) < 0) -+ goto toofar; -+ break; -+ /* PC += off if dst == imm */ -+ /* PC += off if dst != imm */ -+ /* PC += off if dst & imm */ -+ /* PC += off if dst > imm */ -+ /* PC += off if dst >= imm */ -+ /* PC += off if dst < imm */ -+ /* PC += off if dst <= imm */ -+ /* PC += off if dst > imm (signed) */ -+ /* PC += off if dst >= imm (signed) */ -+ /* PC += off if dst < imm (signed) */ -+ /* PC += off if dst <= imm (signed) */ -+ case BPF_JMP | BPF_JEQ | BPF_K: -+ case BPF_JMP | BPF_JNE | BPF_K: -+ case BPF_JMP | BPF_JSET | BPF_K: -+ case BPF_JMP | BPF_JGT | BPF_K: -+ case BPF_JMP | BPF_JGE | BPF_K: -+ case BPF_JMP | BPF_JLT | BPF_K: -+ case BPF_JMP | BPF_JLE | BPF_K: -+ case BPF_JMP | BPF_JSGT | BPF_K: -+ case BPF_JMP | BPF_JSGE | BPF_K: -+ case BPF_JMP | BPF_JSLT | BPF_K: -+ case BPF_JMP | BPF_JSLE | BPF_K: -+ if (off == 0) -+ break; -+ setup_jmp_i(ctx, imm, 64, BPF_OP(code), off, &jmp, &rel); -+ if (valid_jmp_i(jmp, imm)) { -+ emit_jmp_i(ctx, dst, imm, rel, jmp); -+ } else { -+ /* Move large immediate to register */ -+ emit_mov_i(ctx, MIPS_R_T4, imm); -+ emit_jmp_r(ctx, dst, MIPS_R_T4, rel, jmp); -+ } -+ if (finish_jmp(ctx, jmp, off) < 0) -+ goto toofar; -+ break; -+ /* PC += off */ -+ case BPF_JMP | BPF_JA: -+ if (off == 0) -+ break; -+ if (emit_ja(ctx, off) < 0) -+ goto toofar; -+ break; -+ /* Tail call */ -+ case BPF_JMP | BPF_TAIL_CALL: -+ if (emit_tail_call(ctx) < 0) -+ goto invalid; -+ break; -+ /* Function call */ -+ case BPF_JMP | BPF_CALL: -+ if (emit_call(ctx, insn) < 0) -+ goto invalid; -+ break; -+ /* Function return */ -+ case BPF_JMP | BPF_EXIT: -+ /* -+ * Optimization: when last instruction is EXIT -+ * simply continue to epilogue. -+ */ -+ if (ctx->bpf_index == ctx->program->len - 1) -+ break; -+ if (emit_exit(ctx) < 0) -+ goto toofar; -+ break; -+ -+ default: -+invalid: -+ pr_err_once("unknown opcode %02x\n", code); -+ return -EINVAL; -+notyet: -+ pr_info_once("*** NOT YET: opcode %02x ***\n", code); -+ return -EFAULT; -+toofar: -+ pr_info_once("*** TOO FAR: jump at %u opcode %02x ***\n", -+ ctx->bpf_index, code); -+ return -E2BIG; -+ } -+ return 0; -+} diff --git a/root/target/linux/generic/backport-5.15/050-v5.16-04-mips-bpf-Add-JIT-workarounds-for-CPU-errata.patch b/root/target/linux/generic/backport-5.15/050-v5.16-04-mips-bpf-Add-JIT-workarounds-for-CPU-errata.patch deleted file mode 100755 index 63553ebe..00000000 --- a/root/target/linux/generic/backport-5.15/050-v5.16-04-mips-bpf-Add-JIT-workarounds-for-CPU-errata.patch +++ /dev/null @@ -1,120 +0,0 @@ -From: Johan Almbladh -Date: Tue, 5 Oct 2021 18:54:06 +0200 -Subject: [PATCH] mips: bpf: Add JIT workarounds for CPU errata - -This patch adds workarounds for the following CPU errata to the MIPS -eBPF JIT, if enabled in the kernel configuration. - - - R10000 ll/sc weak ordering - - Loongson-3 ll/sc weak ordering - - Loongson-2F jump hang - -The Loongson-2F nop errata is implemented in uasm, which the JIT uses, -so no additional mitigations are needed for that. - -Signed-off-by: Johan Almbladh -Reviewed-by: Jiaxun Yang ---- - ---- a/arch/mips/net/bpf_jit_comp.c -+++ b/arch/mips/net/bpf_jit_comp.c -@@ -404,6 +404,7 @@ void emit_alu_r(struct jit_context *ctx, - /* Atomic read-modify-write (32-bit) */ - void emit_atomic_r(struct jit_context *ctx, u8 dst, u8 src, s16 off, u8 code) - { -+ LLSC_sync(ctx); - emit(ctx, ll, MIPS_R_T9, off, dst); - switch (code) { - case BPF_ADD: -@@ -420,18 +421,19 @@ void emit_atomic_r(struct jit_context *c - break; - } - emit(ctx, sc, MIPS_R_T8, off, dst); -- emit(ctx, beqz, MIPS_R_T8, -16); -+ emit(ctx, LLSC_beqz, MIPS_R_T8, -16 - LLSC_offset); - emit(ctx, nop); /* Delay slot */ - } - - /* Atomic compare-and-exchange (32-bit) */ - void emit_cmpxchg_r(struct jit_context *ctx, u8 dst, u8 src, u8 res, s16 off) - { -+ LLSC_sync(ctx); - emit(ctx, ll, MIPS_R_T9, off, dst); - emit(ctx, bne, MIPS_R_T9, res, 12); - emit(ctx, move, MIPS_R_T8, src); /* Delay slot */ - emit(ctx, sc, MIPS_R_T8, off, dst); -- emit(ctx, beqz, MIPS_R_T8, -20); -+ emit(ctx, LLSC_beqz, MIPS_R_T8, -20 - LLSC_offset); - emit(ctx, move, res, MIPS_R_T9); /* Delay slot */ - clobber_reg(ctx, res); - } ---- a/arch/mips/net/bpf_jit_comp.h -+++ b/arch/mips/net/bpf_jit_comp.h -@@ -87,7 +87,7 @@ struct jit_context { - }; - - /* Emit the instruction if the JIT memory space has been allocated */ --#define emit(ctx, func, ...) \ -+#define __emit(ctx, func, ...) \ - do { \ - if ((ctx)->target != NULL) { \ - u32 *p = &(ctx)->target[ctx->jit_index]; \ -@@ -95,6 +95,30 @@ do { \ - } \ - (ctx)->jit_index++; \ - } while (0) -+#define emit(...) __emit(__VA_ARGS__) -+ -+/* Workaround for R10000 ll/sc errata */ -+#ifdef CONFIG_WAR_R10000 -+#define LLSC_beqz beqzl -+#else -+#define LLSC_beqz beqz -+#endif -+ -+/* Workaround for Loongson-3 ll/sc errata */ -+#ifdef CONFIG_CPU_LOONGSON3_WORKAROUNDS -+#define LLSC_sync(ctx) emit(ctx, sync, 0) -+#define LLSC_offset 4 -+#else -+#define LLSC_sync(ctx) -+#define LLSC_offset 0 -+#endif -+ -+/* Workaround for Loongson-2F jump errata */ -+#ifdef CONFIG_CPU_JUMP_WORKAROUNDS -+#define JALR_MASK 0xffffffffcfffffffULL -+#else -+#define JALR_MASK (~0ULL) -+#endif - - /* - * Mark a BPF register as accessed, it needs to be ---- a/arch/mips/net/bpf_jit_comp64.c -+++ b/arch/mips/net/bpf_jit_comp64.c -@@ -375,6 +375,7 @@ static void emit_atomic_r64(struct jit_c - u8 t1 = MIPS_R_T6; - u8 t2 = MIPS_R_T7; - -+ LLSC_sync(ctx); - emit(ctx, lld, t1, off, dst); - switch (code) { - case BPF_ADD: -@@ -391,7 +392,7 @@ static void emit_atomic_r64(struct jit_c - break; - } - emit(ctx, scd, t2, off, dst); -- emit(ctx, beqz, t2, -16); -+ emit(ctx, LLSC_beqz, t2, -16 - LLSC_offset); - emit(ctx, nop); /* Delay slot */ - } - -@@ -414,7 +415,7 @@ static int emit_call(struct jit_context - push_regs(ctx, ctx->clobbered & JIT_CALLER_REGS, 0, 0); - - /* Emit function call */ -- emit_mov_i64(ctx, tmp, addr); -+ emit_mov_i64(ctx, tmp, addr & JALR_MASK); - emit(ctx, jalr, MIPS_R_RA, tmp); - emit(ctx, nop); /* Delay slot */ - diff --git a/root/target/linux/generic/backport-5.15/050-v5.16-05-mips-bpf-Enable-eBPF-JITs.patch b/root/target/linux/generic/backport-5.15/050-v5.16-05-mips-bpf-Enable-eBPF-JITs.patch deleted file mode 100755 index 00b3536b..00000000 --- a/root/target/linux/generic/backport-5.15/050-v5.16-05-mips-bpf-Enable-eBPF-JITs.patch +++ /dev/null @@ -1,61 +0,0 @@ -From: Johan Almbladh -Date: Tue, 5 Oct 2021 18:54:07 +0200 -Subject: [PATCH] mips: bpf: Enable eBPF JITs - -This patch enables the new eBPF JITs for 32-bit and 64-bit MIPS. It also -disables the old cBPF JIT to so cBPF programs are converted to use the -new JIT. - -Workarounds for R4000 CPU errata are not implemented by the JIT, so the -JIT is disabled if any of those workarounds are configured. - -Signed-off-by: Johan Almbladh ---- - ---- a/MAINTAINERS -+++ b/MAINTAINERS -@@ -3428,6 +3428,7 @@ S: Supported - F: arch/arm64/net/ - - BPF JIT for MIPS (32-BIT AND 64-BIT) -+M: Johan Almbladh - M: Paul Burton - L: netdev@vger.kernel.org - L: bpf@vger.kernel.org ---- a/arch/mips/Kconfig -+++ b/arch/mips/Kconfig -@@ -57,7 +57,6 @@ config MIPS - select HAVE_ARCH_TRACEHOOK - select HAVE_ARCH_TRANSPARENT_HUGEPAGE if CPU_SUPPORTS_HUGEPAGES - select HAVE_ASM_MODVERSIONS -- select HAVE_CBPF_JIT if !64BIT && !CPU_MICROMIPS - select HAVE_CONTEXT_TRACKING - select HAVE_TIF_NOHZ - select HAVE_C_RECORDMCOUNT -@@ -65,7 +64,10 @@ config MIPS - select HAVE_DEBUG_STACKOVERFLOW - select HAVE_DMA_CONTIGUOUS - select HAVE_DYNAMIC_FTRACE -- select HAVE_EBPF_JIT if 64BIT && !CPU_MICROMIPS && TARGET_ISA_REV >= 2 -+ select HAVE_EBPF_JIT if !CPU_MICROMIPS && \ -+ !CPU_DADDI_WORKAROUNDS && \ -+ !CPU_R4000_WORKAROUNDS && \ -+ !CPU_R4400_WORKAROUNDS - select HAVE_EXIT_THREAD - select HAVE_FAST_GUP - select HAVE_FTRACE_MCOUNT_RECORD ---- a/arch/mips/net/Makefile -+++ b/arch/mips/net/Makefile -@@ -2,9 +2,10 @@ - # MIPS networking code - - obj-$(CONFIG_MIPS_CBPF_JIT) += bpf_jit.o bpf_jit_asm.o -+obj-$(CONFIG_MIPS_EBPF_JIT) += bpf_jit_comp.o - - ifeq ($(CONFIG_32BIT),y) -- obj-$(CONFIG_MIPS_EBPF_JIT) += bpf_jit_comp.o bpf_jit_comp32.o -+ obj-$(CONFIG_MIPS_EBPF_JIT) += bpf_jit_comp32.o - else -- obj-$(CONFIG_MIPS_EBPF_JIT) += ebpf_jit.o -+ obj-$(CONFIG_MIPS_EBPF_JIT) += bpf_jit_comp64.o - endif diff --git a/root/target/linux/generic/backport-5.15/050-v5.16-06-mips-bpf-Remove-old-BPF-JIT-implementations.patch b/root/target/linux/generic/backport-5.15/050-v5.16-06-mips-bpf-Remove-old-BPF-JIT-implementations.patch deleted file mode 100755 index e25c3368..00000000 --- a/root/target/linux/generic/backport-5.15/050-v5.16-06-mips-bpf-Remove-old-BPF-JIT-implementations.patch +++ /dev/null @@ -1,387 +0,0 @@ -From: Johan Almbladh -Date: Tue, 5 Oct 2021 18:54:08 +0200 -Subject: [PATCH] mips: bpf: Remove old BPF JIT implementations - -This patch removes the old 32-bit cBPF and 64-bit eBPF JIT implementations. -They are replaced by a new eBPF implementation that supports both 32-bit -and 64-bit MIPS CPUs. - -Signed-off-by: Johan Almbladh ---- - delete mode 100644 arch/mips/net/bpf_jit.c - delete mode 100644 arch/mips/net/bpf_jit.h - delete mode 100644 arch/mips/net/bpf_jit_asm.S - delete mode 100644 arch/mips/net/ebpf_jit.c - ---- a/arch/mips/net/bpf_jit.h -+++ /dev/null -@@ -1,81 +0,0 @@ --/* SPDX-License-Identifier: GPL-2.0-only */ --/* -- * Just-In-Time compiler for BPF filters on MIPS -- * -- * Copyright (c) 2014 Imagination Technologies Ltd. -- * Author: Markos Chandras -- */ -- --#ifndef BPF_JIT_MIPS_OP_H --#define BPF_JIT_MIPS_OP_H -- --/* Registers used by JIT */ --#define MIPS_R_ZERO 0 --#define MIPS_R_V0 2 --#define MIPS_R_A0 4 --#define MIPS_R_A1 5 --#define MIPS_R_T4 12 --#define MIPS_R_T5 13 --#define MIPS_R_T6 14 --#define MIPS_R_T7 15 --#define MIPS_R_S0 16 --#define MIPS_R_S1 17 --#define MIPS_R_S2 18 --#define MIPS_R_S3 19 --#define MIPS_R_S4 20 --#define MIPS_R_S5 21 --#define MIPS_R_S6 22 --#define MIPS_R_S7 23 --#define MIPS_R_SP 29 --#define MIPS_R_RA 31 -- --/* Conditional codes */ --#define MIPS_COND_EQ 0x1 --#define MIPS_COND_GE (0x1 << 1) --#define MIPS_COND_GT (0x1 << 2) --#define MIPS_COND_NE (0x1 << 3) --#define MIPS_COND_ALL (0x1 << 4) --/* Conditionals on X register or K immediate */ --#define MIPS_COND_X (0x1 << 5) --#define MIPS_COND_K (0x1 << 6) -- --#define r_ret MIPS_R_V0 -- --/* -- * Use 2 scratch registers to avoid pipeline interlocks. -- * There is no overhead during epilogue and prologue since -- * any of the $s0-$s6 registers will only be preserved if -- * they are going to actually be used. -- */ --#define r_skb_hl MIPS_R_S0 /* skb header length */ --#define r_skb_data MIPS_R_S1 /* skb actual data */ --#define r_off MIPS_R_S2 --#define r_A MIPS_R_S3 --#define r_X MIPS_R_S4 --#define r_skb MIPS_R_S5 --#define r_M MIPS_R_S6 --#define r_skb_len MIPS_R_S7 --#define r_s0 MIPS_R_T4 /* scratch reg 1 */ --#define r_s1 MIPS_R_T5 /* scratch reg 2 */ --#define r_tmp_imm MIPS_R_T6 /* No need to preserve this */ --#define r_tmp MIPS_R_T7 /* No need to preserve this */ --#define r_zero MIPS_R_ZERO --#define r_sp MIPS_R_SP --#define r_ra MIPS_R_RA -- --#ifndef __ASSEMBLY__ -- --/* Declare ASM helpers */ -- --#define DECLARE_LOAD_FUNC(func) \ -- extern u8 func(unsigned long *skb, int offset); \ -- extern u8 func##_negative(unsigned long *skb, int offset); \ -- extern u8 func##_positive(unsigned long *skb, int offset) -- --DECLARE_LOAD_FUNC(sk_load_word); --DECLARE_LOAD_FUNC(sk_load_half); --DECLARE_LOAD_FUNC(sk_load_byte); -- --#endif -- --#endif /* BPF_JIT_MIPS_OP_H */ ---- a/arch/mips/net/bpf_jit_asm.S -+++ /dev/null -@@ -1,285 +0,0 @@ --/* -- * bpf_jib_asm.S: Packet/header access helper functions for MIPS/MIPS64 BPF -- * compiler. -- * -- * Copyright (C) 2015 Imagination Technologies Ltd. -- * Author: Markos Chandras -- * -- * This program is free software; you can redistribute it and/or modify it -- * under the terms of the GNU General Public License as published by the -- * Free Software Foundation; version 2 of the License. -- */ -- --#include --#include --#include --#include "bpf_jit.h" -- --/* ABI -- * -- * r_skb_hl skb header length -- * r_skb_data skb data -- * r_off(a1) offset register -- * r_A BPF register A -- * r_X PF register X -- * r_skb(a0) *skb -- * r_M *scratch memory -- * r_skb_le skb length -- * r_s0 Scratch register 0 -- * r_s1 Scratch register 1 -- * -- * On entry: -- * a0: *skb -- * a1: offset (imm or imm + X) -- * -- * All non-BPF-ABI registers are free for use. On return, we only -- * care about r_ret. The BPF-ABI registers are assumed to remain -- * unmodified during the entire filter operation. -- */ -- --#define skb a0 --#define offset a1 --#define SKF_LL_OFF (-0x200000) /* Can't include linux/filter.h in assembly */ -- -- /* We know better :) so prevent assembler reordering etc */ -- .set noreorder -- --#define is_offset_negative(TYPE) \ -- /* If offset is negative we have more work to do */ \ -- slti t0, offset, 0; \ -- bgtz t0, bpf_slow_path_##TYPE##_neg; \ -- /* Be careful what follows in DS. */ -- --#define is_offset_in_header(SIZE, TYPE) \ -- /* Reading from header? */ \ -- addiu $r_s0, $r_skb_hl, -SIZE; \ -- slt t0, $r_s0, offset; \ -- bgtz t0, bpf_slow_path_##TYPE; \ -- --LEAF(sk_load_word) -- is_offset_negative(word) --FEXPORT(sk_load_word_positive) -- is_offset_in_header(4, word) -- /* Offset within header boundaries */ -- PTR_ADDU t1, $r_skb_data, offset -- .set reorder -- lw $r_A, 0(t1) -- .set noreorder --#ifdef CONFIG_CPU_LITTLE_ENDIAN --# if MIPS_ISA_REV >= 2 -- wsbh t0, $r_A -- rotr $r_A, t0, 16 --# else -- sll t0, $r_A, 24 -- srl t1, $r_A, 24 -- srl t2, $r_A, 8 -- or t0, t0, t1 -- andi t2, t2, 0xff00 -- andi t1, $r_A, 0xff00 -- or t0, t0, t2 -- sll t1, t1, 8 -- or $r_A, t0, t1 --# endif --#endif -- jr $r_ra -- move $r_ret, zero -- END(sk_load_word) -- --LEAF(sk_load_half) -- is_offset_negative(half) --FEXPORT(sk_load_half_positive) -- is_offset_in_header(2, half) -- /* Offset within header boundaries */ -- PTR_ADDU t1, $r_skb_data, offset -- lhu $r_A, 0(t1) --#ifdef CONFIG_CPU_LITTLE_ENDIAN --# if MIPS_ISA_REV >= 2 -- wsbh $r_A, $r_A --# else -- sll t0, $r_A, 8 -- srl t1, $r_A, 8 -- andi t0, t0, 0xff00 -- or $r_A, t0, t1 --# endif --#endif -- jr $r_ra -- move $r_ret, zero -- END(sk_load_half) -- --LEAF(sk_load_byte) -- is_offset_negative(byte) --FEXPORT(sk_load_byte_positive) -- is_offset_in_header(1, byte) -- /* Offset within header boundaries */ -- PTR_ADDU t1, $r_skb_data, offset -- lbu $r_A, 0(t1) -- jr $r_ra -- move $r_ret, zero -- END(sk_load_byte) -- --/* -- * call skb_copy_bits: -- * (prototype in linux/skbuff.h) -- * -- * int skb_copy_bits(sk_buff *skb, int offset, void *to, int len) -- * -- * o32 mandates we leave 4 spaces for argument registers in case -- * the callee needs to use them. Even though we don't care about -- * the argument registers ourselves, we need to allocate that space -- * to remain ABI compliant since the callee may want to use that space. -- * We also allocate 2 more spaces for $r_ra and our return register (*to). -- * -- * n64 is a bit different. The *caller* will allocate the space to preserve -- * the arguments. So in 64-bit kernels, we allocate the 4-arg space for no -- * good reason but it does not matter that much really. -- * -- * (void *to) is returned in r_s0 -- * -- */ --#ifdef CONFIG_CPU_LITTLE_ENDIAN --#define DS_OFFSET(SIZE) (4 * SZREG) --#else --#define DS_OFFSET(SIZE) ((4 * SZREG) + (4 - SIZE)) --#endif --#define bpf_slow_path_common(SIZE) \ -- /* Quick check. Are we within reasonable boundaries? */ \ -- LONG_ADDIU $r_s1, $r_skb_len, -SIZE; \ -- sltu $r_s0, offset, $r_s1; \ -- beqz $r_s0, fault; \ -- /* Load 4th argument in DS */ \ -- LONG_ADDIU a3, zero, SIZE; \ -- PTR_ADDIU $r_sp, $r_sp, -(6 * SZREG); \ -- PTR_LA t0, skb_copy_bits; \ -- PTR_S $r_ra, (5 * SZREG)($r_sp); \ -- /* Assign low slot to a2 */ \ -- PTR_ADDIU a2, $r_sp, DS_OFFSET(SIZE); \ -- jalr t0; \ -- /* Reset our destination slot (DS but it's ok) */ \ -- INT_S zero, (4 * SZREG)($r_sp); \ -- /* \ -- * skb_copy_bits returns 0 on success and -EFAULT \ -- * on error. Our data live in a2. Do not bother with \ -- * our data if an error has been returned. \ -- */ \ -- /* Restore our frame */ \ -- PTR_L $r_ra, (5 * SZREG)($r_sp); \ -- INT_L $r_s0, (4 * SZREG)($r_sp); \ -- bltz v0, fault; \ -- PTR_ADDIU $r_sp, $r_sp, 6 * SZREG; \ -- move $r_ret, zero; \ -- --NESTED(bpf_slow_path_word, (6 * SZREG), $r_sp) -- bpf_slow_path_common(4) --#ifdef CONFIG_CPU_LITTLE_ENDIAN --# if MIPS_ISA_REV >= 2 -- wsbh t0, $r_s0 -- jr $r_ra -- rotr $r_A, t0, 16 --# else -- sll t0, $r_s0, 24 -- srl t1, $r_s0, 24 -- srl t2, $r_s0, 8 -- or t0, t0, t1 -- andi t2, t2, 0xff00 -- andi t1, $r_s0, 0xff00 -- or t0, t0, t2 -- sll t1, t1, 8 -- jr $r_ra -- or $r_A, t0, t1 --# endif --#else -- jr $r_ra -- move $r_A, $r_s0 --#endif -- -- END(bpf_slow_path_word) -- --NESTED(bpf_slow_path_half, (6 * SZREG), $r_sp) -- bpf_slow_path_common(2) --#ifdef CONFIG_CPU_LITTLE_ENDIAN --# if MIPS_ISA_REV >= 2 -- jr $r_ra -- wsbh $r_A, $r_s0 --# else -- sll t0, $r_s0, 8 -- andi t1, $r_s0, 0xff00 -- andi t0, t0, 0xff00 -- srl t1, t1, 8 -- jr $r_ra -- or $r_A, t0, t1 --# endif --#else -- jr $r_ra -- move $r_A, $r_s0 --#endif -- -- END(bpf_slow_path_half) -- --NESTED(bpf_slow_path_byte, (6 * SZREG), $r_sp) -- bpf_slow_path_common(1) -- jr $r_ra -- move $r_A, $r_s0 -- -- END(bpf_slow_path_byte) -- --/* -- * Negative entry points -- */ -- .macro bpf_is_end_of_data -- li t0, SKF_LL_OFF -- /* Reading link layer data? */ -- slt t1, offset, t0 -- bgtz t1, fault -- /* Be careful what follows in DS. */ -- .endm --/* -- * call skb_copy_bits: -- * (prototype in linux/filter.h) -- * -- * void *bpf_internal_load_pointer_neg_helper(const struct sk_buff *skb, -- * int k, unsigned int size) -- * -- * see above (bpf_slow_path_common) for ABI restrictions -- */ --#define bpf_negative_common(SIZE) \ -- PTR_ADDIU $r_sp, $r_sp, -(6 * SZREG); \ -- PTR_LA t0, bpf_internal_load_pointer_neg_helper; \ -- PTR_S $r_ra, (5 * SZREG)($r_sp); \ -- jalr t0; \ -- li a2, SIZE; \ -- PTR_L $r_ra, (5 * SZREG)($r_sp); \ -- /* Check return pointer */ \ -- beqz v0, fault; \ -- PTR_ADDIU $r_sp, $r_sp, 6 * SZREG; \ -- /* Preserve our pointer */ \ -- move $r_s0, v0; \ -- /* Set return value */ \ -- move $r_ret, zero; \ -- --bpf_slow_path_word_neg: -- bpf_is_end_of_data --NESTED(sk_load_word_negative, (6 * SZREG), $r_sp) -- bpf_negative_common(4) -- jr $r_ra -- lw $r_A, 0($r_s0) -- END(sk_load_word_negative) -- --bpf_slow_path_half_neg: -- bpf_is_end_of_data --NESTED(sk_load_half_negative, (6 * SZREG), $r_sp) -- bpf_negative_common(2) -- jr $r_ra -- lhu $r_A, 0($r_s0) -- END(sk_load_half_negative) -- --bpf_slow_path_byte_neg: -- bpf_is_end_of_data --NESTED(sk_load_byte_negative, (6 * SZREG), $r_sp) -- bpf_negative_common(1) -- jr $r_ra -- lbu $r_A, 0($r_s0) -- END(sk_load_byte_negative) -- --fault: -- jr $r_ra -- addiu $r_ret, zero, 1 diff --git a/root/target/linux/generic/backport-5.15/343-netfilter-nft_flow_offload-handle-netdevice-events-f.patch b/root/target/linux/generic/backport-5.15/343-netfilter-nft_flow_offload-handle-netdevice-events-f.patch index 9a6b802f..aa4ecf1b 100755 --- a/root/target/linux/generic/backport-5.15/343-netfilter-nft_flow_offload-handle-netdevice-events-f.patch +++ b/root/target/linux/generic/backport-5.15/343-netfilter-nft_flow_offload-handle-netdevice-events-f.patch @@ -10,7 +10,7 @@ Signed-off-by: Pablo Neira Ayuso --- a/net/netfilter/nf_flow_table_core.c +++ b/net/netfilter/nf_flow_table_core.c -@@ -646,13 +646,41 @@ void nf_flow_table_free(struct nf_flowta +@@ -656,13 +656,41 @@ void nf_flow_table_free(struct nf_flowta } EXPORT_SYMBOL_GPL(nf_flow_table_free); diff --git a/root/target/linux/generic/backport-5.15/734-v5.16-0001-net-bgmac-improve-handling-PHY.patch b/root/target/linux/generic/backport-5.15/734-v5.16-0001-net-bgmac-improve-handling-PHY.patch deleted file mode 100755 index 6788a2ec..00000000 --- a/root/target/linux/generic/backport-5.15/734-v5.16-0001-net-bgmac-improve-handling-PHY.patch +++ /dev/null @@ -1,84 +0,0 @@ -From b5375509184dc23d2b7fa0c5ed8763899ccc9674 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= -Date: Sat, 2 Oct 2021 19:58:11 +0200 -Subject: [PATCH] net: bgmac: improve handling PHY -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -1. Use info from DT if available - -It allows describing for example a fixed link. It's more accurate than -just guessing there may be one (depending on a chipset). - -2. Verify PHY ID before trying to connect PHY - -PHY addr 0x1e (30) is special in Broadcom routers and means a switch -connected as MDIO devices instead of a real PHY. Don't try connecting to -it. - -Signed-off-by: Rafał Miłecki -Signed-off-by: David S. Miller ---- - drivers/net/ethernet/broadcom/bgmac-bcma.c | 33 ++++++++++++++-------- - 1 file changed, 21 insertions(+), 12 deletions(-) - ---- a/drivers/net/ethernet/broadcom/bgmac-bcma.c -+++ b/drivers/net/ethernet/broadcom/bgmac-bcma.c -@@ -11,6 +11,7 @@ - #include - #include - #include -+#include - #include - #include "bgmac.h" - -@@ -86,17 +87,28 @@ static int bcma_phy_connect(struct bgmac - struct phy_device *phy_dev; - char bus_id[MII_BUS_ID_SIZE + 3]; - -+ /* DT info should be the most accurate */ -+ phy_dev = of_phy_get_and_connect(bgmac->net_dev, bgmac->dev->of_node, -+ bgmac_adjust_link); -+ if (phy_dev) -+ return 0; -+ - /* Connect to the PHY */ -- snprintf(bus_id, sizeof(bus_id), PHY_ID_FMT, bgmac->mii_bus->id, -- bgmac->phyaddr); -- phy_dev = phy_connect(bgmac->net_dev, bus_id, bgmac_adjust_link, -- PHY_INTERFACE_MODE_MII); -- if (IS_ERR(phy_dev)) { -- dev_err(bgmac->dev, "PHY connection failed\n"); -- return PTR_ERR(phy_dev); -+ if (bgmac->mii_bus && bgmac->phyaddr != BGMAC_PHY_NOREGS) { -+ snprintf(bus_id, sizeof(bus_id), PHY_ID_FMT, bgmac->mii_bus->id, -+ bgmac->phyaddr); -+ phy_dev = phy_connect(bgmac->net_dev, bus_id, bgmac_adjust_link, -+ PHY_INTERFACE_MODE_MII); -+ if (IS_ERR(phy_dev)) { -+ dev_err(bgmac->dev, "PHY connection failed\n"); -+ return PTR_ERR(phy_dev); -+ } -+ -+ return 0; - } - -- return 0; -+ /* Assume a fixed link to the switch port */ -+ return bgmac_phy_connect_direct(bgmac); - } - - static const struct bcma_device_id bgmac_bcma_tbl[] = { -@@ -297,10 +309,7 @@ static int bgmac_probe(struct bcma_devic - bgmac->cco_ctl_maskset = bcma_bgmac_cco_ctl_maskset; - bgmac->get_bus_clock = bcma_bgmac_get_bus_clock; - bgmac->cmn_maskset32 = bcma_bgmac_cmn_maskset32; -- if (bgmac->mii_bus) -- bgmac->phy_connect = bcma_phy_connect; -- else -- bgmac->phy_connect = bgmac_phy_connect_direct; -+ bgmac->phy_connect = bcma_phy_connect; - - err = bgmac_enet_probe(bgmac); - if (err) diff --git a/root/target/linux/generic/backport-5.15/734-v5.16-0002-net-bgmac-support-MDIO-described-in-DT.patch b/root/target/linux/generic/backport-5.15/734-v5.16-0002-net-bgmac-support-MDIO-described-in-DT.patch deleted file mode 100755 index f1348282..00000000 --- a/root/target/linux/generic/backport-5.15/734-v5.16-0002-net-bgmac-support-MDIO-described-in-DT.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 45c9d966688e7fad7f24bfc450547d91e4304d0b Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= -Date: Sat, 2 Oct 2021 19:58:12 +0200 -Subject: [PATCH] net: bgmac: support MDIO described in DT -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Check ethernet controller DT node for "mdio" subnode and use it with -of_mdiobus_register() when present. That allows specifying MDIO and its -PHY devices in a standard DT based way. - -This is required for BCM53573 SoC support. That family is sometimes -called Northstar (by marketing?) but is quite different from it. It uses -different CPU(s) and many different hw blocks. - -One of shared blocks in BCM53573 is Ethernet controller. Switch however -is not SRAB accessible (as it Northstar) but is MDIO attached. - -Signed-off-by: Rafał Miłecki -Signed-off-by: David S. Miller ---- - drivers/net/ethernet/broadcom/bgmac-bcma-mdio.c | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - ---- a/drivers/net/ethernet/broadcom/bgmac-bcma-mdio.c -+++ b/drivers/net/ethernet/broadcom/bgmac-bcma-mdio.c -@@ -10,6 +10,7 @@ - - #include - #include -+#include - #include "bgmac.h" - - static bool bcma_mdio_wait_value(struct bcma_device *core, u16 reg, u32 mask, -@@ -211,6 +212,7 @@ struct mii_bus *bcma_mdio_mii_register(s - { - struct bcma_device *core = bgmac->bcma.core; - struct mii_bus *mii_bus; -+ struct device_node *np; - int err; - - mii_bus = mdiobus_alloc(); -@@ -229,7 +231,9 @@ struct mii_bus *bcma_mdio_mii_register(s - mii_bus->parent = &core->dev; - mii_bus->phy_mask = ~(1 << bgmac->phyaddr); - -- err = mdiobus_register(mii_bus); -+ np = of_get_child_by_name(core->dev.of_node, "mdio"); -+ -+ err = of_mdiobus_register(mii_bus, np); - if (err) { - dev_err(&core->dev, "Registration of mii bus failed\n"); - goto err_free_bus; diff --git a/root/target/linux/generic/backport-5.15/742-v5.16-net-phy-at803x-add-support-for-qca-8327-internal-phy.patch b/root/target/linux/generic/backport-5.15/742-v5.16-net-phy-at803x-add-support-for-qca-8327-internal-phy.patch deleted file mode 100755 index e4bead89..00000000 --- a/root/target/linux/generic/backport-5.15/742-v5.16-net-phy-at803x-add-support-for-qca-8327-internal-phy.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 0ccf8511182436183c031e8a2f740ae91a02c625 Mon Sep 17 00:00:00 2001 -From: Ansuel Smith -Date: Tue, 14 Sep 2021 14:33:45 +0200 -Subject: net: phy: at803x: add support for qca 8327 internal phy - -Add support for qca8327 internal phy needed for correct init of the -switch port. It does use the same qca8337 function and reg just with a -different id. - -Signed-off-by: Ansuel Smith -Tested-by: Rosen Penev -Tested-by: Andrew Lunn -Signed-off-by: David S. Miller ---- - drivers/net/phy/at803x.c | 15 +++++++++++++++ - 1 file changed, 15 insertions(+) - ---- a/drivers/net/phy/at803x.c -+++ b/drivers/net/phy/at803x.c -@@ -1420,6 +1420,19 @@ static struct phy_driver at803x_driver[] - .get_sset_count = at803x_get_sset_count, - .get_strings = at803x_get_strings, - .get_stats = at803x_get_stats, -+}, { -+ /* QCA8327 */ -+ .phy_id = QCA8327_PHY_ID, -+ .phy_id_mask = QCA8K_PHY_ID_MASK, -+ .name = "QCA PHY 8327", -+ /* PHY_GBIT_FEATURES */ -+ .probe = at803x_probe, -+ .flags = PHY_IS_INTERNAL, -+ .config_init = qca83xx_config_init, -+ .soft_reset = genphy_soft_reset, -+ .get_sset_count = at803x_get_sset_count, -+ .get_strings = at803x_get_strings, -+ .get_stats = at803x_get_stats, - }, }; - - module_phy_driver(at803x_driver); -@@ -1430,6 +1443,8 @@ static struct mdio_device_id __maybe_unu - { PHY_ID_MATCH_EXACT(ATH8032_PHY_ID) }, - { PHY_ID_MATCH_EXACT(ATH8035_PHY_ID) }, - { PHY_ID_MATCH_EXACT(ATH9331_PHY_ID) }, -+ { PHY_ID_MATCH_EXACT(QCA8337_PHY_ID) }, -+ { PHY_ID_MATCH_EXACT(QCA8327_PHY_ID) }, - { } - }; - diff --git a/root/target/linux/generic/backport-5.15/743-v5.16-0001-net-dsa-b53-Include-all-ports-in-enabled_ports.patch b/root/target/linux/generic/backport-5.15/743-v5.16-0001-net-dsa-b53-Include-all-ports-in-enabled_ports.patch deleted file mode 100755 index eb84b45b..00000000 --- a/root/target/linux/generic/backport-5.15/743-v5.16-0001-net-dsa-b53-Include-all-ports-in-enabled_ports.patch +++ /dev/null @@ -1,131 +0,0 @@ -From 983d96a9116a328668601555d96736261d33170c Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= -Date: Thu, 16 Sep 2021 14:03:51 +0200 -Subject: [PATCH] net: dsa: b53: Include all ports in "enabled_ports" -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Make "enabled_ports" bitfield contain all available switch ports -including a CPU port. This way there is no need for fixup during -initialization. - -For BCM53010, BCM53018 and BCM53019 include also other available ports. - -Signed-off-by: Rafał Miłecki -Reviewed-by: Florian Fainelli -Tested-by: Florian Fainelli -Signed-off-by: Jakub Kicinski ---- - drivers/net/dsa/b53/b53_common.c | 23 +++++++++++------------ - 1 file changed, 11 insertions(+), 12 deletions(-) - ---- a/drivers/net/dsa/b53/b53_common.c -+++ b/drivers/net/dsa/b53/b53_common.c -@@ -2302,7 +2302,7 @@ static const struct b53_chip_data b53_sw - .chip_id = BCM5325_DEVICE_ID, - .dev_name = "BCM5325", - .vlans = 16, -- .enabled_ports = 0x1f, -+ .enabled_ports = 0x3f, - .arl_bins = 2, - .arl_buckets = 1024, - .imp_port = 5, -@@ -2313,7 +2313,7 @@ static const struct b53_chip_data b53_sw - .chip_id = BCM5365_DEVICE_ID, - .dev_name = "BCM5365", - .vlans = 256, -- .enabled_ports = 0x1f, -+ .enabled_ports = 0x3f, - .arl_bins = 2, - .arl_buckets = 1024, - .imp_port = 5, -@@ -2324,7 +2324,7 @@ static const struct b53_chip_data b53_sw - .chip_id = BCM5389_DEVICE_ID, - .dev_name = "BCM5389", - .vlans = 4096, -- .enabled_ports = 0x1f, -+ .enabled_ports = 0x11f, - .arl_bins = 4, - .arl_buckets = 1024, - .imp_port = 8, -@@ -2338,7 +2338,7 @@ static const struct b53_chip_data b53_sw - .chip_id = BCM5395_DEVICE_ID, - .dev_name = "BCM5395", - .vlans = 4096, -- .enabled_ports = 0x1f, -+ .enabled_ports = 0x11f, - .arl_bins = 4, - .arl_buckets = 1024, - .imp_port = 8, -@@ -2352,7 +2352,7 @@ static const struct b53_chip_data b53_sw - .chip_id = BCM5397_DEVICE_ID, - .dev_name = "BCM5397", - .vlans = 4096, -- .enabled_ports = 0x1f, -+ .enabled_ports = 0x11f, - .arl_bins = 4, - .arl_buckets = 1024, - .imp_port = 8, -@@ -2366,7 +2366,7 @@ static const struct b53_chip_data b53_sw - .chip_id = BCM5398_DEVICE_ID, - .dev_name = "BCM5398", - .vlans = 4096, -- .enabled_ports = 0x7f, -+ .enabled_ports = 0x17f, - .arl_bins = 4, - .arl_buckets = 1024, - .imp_port = 8, -@@ -2380,7 +2380,7 @@ static const struct b53_chip_data b53_sw - .chip_id = BCM53115_DEVICE_ID, - .dev_name = "BCM53115", - .vlans = 4096, -- .enabled_ports = 0x1f, -+ .enabled_ports = 0x11f, - .arl_bins = 4, - .arl_buckets = 1024, - .vta_regs = B53_VTA_REGS, -@@ -2394,7 +2394,7 @@ static const struct b53_chip_data b53_sw - .chip_id = BCM53125_DEVICE_ID, - .dev_name = "BCM53125", - .vlans = 4096, -- .enabled_ports = 0xff, -+ .enabled_ports = 0x1ff, - .arl_bins = 4, - .arl_buckets = 1024, - .imp_port = 8, -@@ -2436,7 +2436,7 @@ static const struct b53_chip_data b53_sw - .chip_id = BCM53010_DEVICE_ID, - .dev_name = "BCM53010", - .vlans = 4096, -- .enabled_ports = 0x1f, -+ .enabled_ports = 0x1bf, - .arl_bins = 4, - .arl_buckets = 1024, - .imp_port = 8, -@@ -2478,7 +2478,7 @@ static const struct b53_chip_data b53_sw - .chip_id = BCM53018_DEVICE_ID, - .dev_name = "BCM53018", - .vlans = 4096, -- .enabled_ports = 0x1f, -+ .enabled_ports = 0x1bf, - .arl_bins = 4, - .arl_buckets = 1024, - .imp_port = 8, -@@ -2492,7 +2492,7 @@ static const struct b53_chip_data b53_sw - .chip_id = BCM53019_DEVICE_ID, - .dev_name = "BCM53019", - .vlans = 4096, -- .enabled_ports = 0x1f, -+ .enabled_ports = 0x1bf, - .arl_bins = 4, - .arl_buckets = 1024, - .imp_port = 8, -@@ -2634,7 +2634,6 @@ static int b53_switch_init(struct b53_de - dev->cpu_port = 5; - } - -- dev->enabled_ports |= BIT(dev->cpu_port); - dev->num_ports = fls(dev->enabled_ports); - - dev->ds->num_ports = min_t(unsigned int, dev->num_ports, DSA_MAX_PORTS); diff --git a/root/target/linux/generic/backport-5.15/743-v5.16-0002-net-dsa-b53-Drop-BCM5301x-workaround-for-a-wrong-CPU.patch b/root/target/linux/generic/backport-5.15/743-v5.16-0002-net-dsa-b53-Drop-BCM5301x-workaround-for-a-wrong-CPU.patch deleted file mode 100755 index 23805a90..00000000 --- a/root/target/linux/generic/backport-5.15/743-v5.16-0002-net-dsa-b53-Drop-BCM5301x-workaround-for-a-wrong-CPU.patch +++ /dev/null @@ -1,42 +0,0 @@ -From b290c6384afabbca5ae6e2af72fb1b2bc37922be Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= -Date: Thu, 16 Sep 2021 14:03:52 +0200 -Subject: [PATCH] net: dsa: b53: Drop BCM5301x workaround for a wrong CPU/IMP - port -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -On BCM5301x port 8 requires a fixed link when used. - -Years ago when b53 was an OpenWrt downstream driver (with configuration -based on sometimes bugged NVRAM) there was a need for a fixup. In case -of forcing fixed link for (incorrectly specified) port 5 the code had to -actually setup port 8 link. - -For upstream b53 driver with setup based on DT there is no need for that -workaround. In DT we have and require correct ports setup. - -Signed-off-by: Rafał Miłecki -Reviewed-by: Florian Fainelli -Tested-by: Florian Fainelli -Signed-off-by: Jakub Kicinski ---- - drivers/net/dsa/b53/b53_common.c | 6 ------ - 1 file changed, 6 deletions(-) - ---- a/drivers/net/dsa/b53/b53_common.c -+++ b/drivers/net/dsa/b53/b53_common.c -@@ -1291,12 +1291,6 @@ static void b53_adjust_link(struct dsa_s - return; - } - } -- } else if (is5301x(dev)) { -- if (port != dev->cpu_port) { -- b53_force_port_config(dev, dev->cpu_port, 2000, -- DUPLEX_FULL, true, true); -- b53_force_link(dev, dev->cpu_port, 1); -- } - } - - /* Re-negotiate EEE if it was enabled already */ diff --git a/root/target/linux/generic/backport-5.15/743-v5.16-0003-net-dsa-b53-Improve-flow-control-setup-on-BCM5301x.patch b/root/target/linux/generic/backport-5.15/743-v5.16-0003-net-dsa-b53-Improve-flow-control-setup-on-BCM5301x.patch deleted file mode 100755 index 941fa23e..00000000 --- a/root/target/linux/generic/backport-5.15/743-v5.16-0003-net-dsa-b53-Improve-flow-control-setup-on-BCM5301x.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 3ff26b29230c54fea2353b63124c589b61953e14 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= -Date: Thu, 16 Sep 2021 14:03:53 +0200 -Subject: [PATCH] net: dsa: b53: Improve flow control setup on BCM5301x -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -According to the Broadcom's reference driver flow control needs to be -enabled for any CPU switch port (5, 7 or 8 - depending on which one is -used). Current code makes it work only for the port 5. Use -dsa_is_cpu_port() which solved that problem. - -Signed-off-by: Rafał Miłecki -Reviewed-by: Florian Fainelli -Tested-by: Florian Fainelli -Signed-off-by: Jakub Kicinski ---- - drivers/net/dsa/b53/b53_common.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/drivers/net/dsa/b53/b53_common.c -+++ b/drivers/net/dsa/b53/b53_common.c -@@ -1222,7 +1222,7 @@ static void b53_adjust_link(struct dsa_s - return; - - /* Enable flow control on BCM5301x's CPU port */ -- if (is5301x(dev) && port == dev->cpu_port) -+ if (is5301x(dev) && dsa_is_cpu_port(ds, port)) - tx_pause = rx_pause = true; - - if (phydev->pause) { diff --git a/root/target/linux/generic/backport-5.15/743-v5.16-0004-net-dsa-b53-Drop-unused-cpu_port-field.patch b/root/target/linux/generic/backport-5.15/743-v5.16-0004-net-dsa-b53-Drop-unused-cpu_port-field.patch deleted file mode 100755 index 746a1e39..00000000 --- a/root/target/linux/generic/backport-5.15/743-v5.16-0004-net-dsa-b53-Drop-unused-cpu_port-field.patch +++ /dev/null @@ -1,205 +0,0 @@ -From 7d5af56418d7d01e43247a33b6fe6492ea871923 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= -Date: Thu, 16 Sep 2021 14:03:54 +0200 -Subject: [PATCH] net: dsa: b53: Drop unused "cpu_port" field -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -It's set but never used anymore. - -Signed-off-by: Rafał Miłecki -Reviewed-by: Florian Fainelli -Tested-by: Florian Fainelli -Signed-off-by: Jakub Kicinski ---- - drivers/net/dsa/b53/b53_common.c | 28 ---------------------------- - drivers/net/dsa/b53/b53_priv.h | 1 - - 2 files changed, 29 deletions(-) - ---- a/drivers/net/dsa/b53/b53_common.c -+++ b/drivers/net/dsa/b53/b53_common.c -@@ -2300,7 +2300,6 @@ static const struct b53_chip_data b53_sw - .arl_bins = 2, - .arl_buckets = 1024, - .imp_port = 5, -- .cpu_port = B53_CPU_PORT_25, - .duplex_reg = B53_DUPLEX_STAT_FE, - }, - { -@@ -2311,7 +2310,6 @@ static const struct b53_chip_data b53_sw - .arl_bins = 2, - .arl_buckets = 1024, - .imp_port = 5, -- .cpu_port = B53_CPU_PORT_25, - .duplex_reg = B53_DUPLEX_STAT_FE, - }, - { -@@ -2322,7 +2320,6 @@ static const struct b53_chip_data b53_sw - .arl_bins = 4, - .arl_buckets = 1024, - .imp_port = 8, -- .cpu_port = B53_CPU_PORT, - .vta_regs = B53_VTA_REGS, - .duplex_reg = B53_DUPLEX_STAT_GE, - .jumbo_pm_reg = B53_JUMBO_PORT_MASK, -@@ -2336,7 +2333,6 @@ static const struct b53_chip_data b53_sw - .arl_bins = 4, - .arl_buckets = 1024, - .imp_port = 8, -- .cpu_port = B53_CPU_PORT, - .vta_regs = B53_VTA_REGS, - .duplex_reg = B53_DUPLEX_STAT_GE, - .jumbo_pm_reg = B53_JUMBO_PORT_MASK, -@@ -2350,7 +2346,6 @@ static const struct b53_chip_data b53_sw - .arl_bins = 4, - .arl_buckets = 1024, - .imp_port = 8, -- .cpu_port = B53_CPU_PORT, - .vta_regs = B53_VTA_REGS_9798, - .duplex_reg = B53_DUPLEX_STAT_GE, - .jumbo_pm_reg = B53_JUMBO_PORT_MASK, -@@ -2364,7 +2359,6 @@ static const struct b53_chip_data b53_sw - .arl_bins = 4, - .arl_buckets = 1024, - .imp_port = 8, -- .cpu_port = B53_CPU_PORT, - .vta_regs = B53_VTA_REGS_9798, - .duplex_reg = B53_DUPLEX_STAT_GE, - .jumbo_pm_reg = B53_JUMBO_PORT_MASK, -@@ -2379,7 +2373,6 @@ static const struct b53_chip_data b53_sw - .arl_buckets = 1024, - .vta_regs = B53_VTA_REGS, - .imp_port = 8, -- .cpu_port = B53_CPU_PORT, - .duplex_reg = B53_DUPLEX_STAT_GE, - .jumbo_pm_reg = B53_JUMBO_PORT_MASK, - .jumbo_size_reg = B53_JUMBO_MAX_SIZE, -@@ -2392,7 +2385,6 @@ static const struct b53_chip_data b53_sw - .arl_bins = 4, - .arl_buckets = 1024, - .imp_port = 8, -- .cpu_port = B53_CPU_PORT, - .vta_regs = B53_VTA_REGS, - .duplex_reg = B53_DUPLEX_STAT_GE, - .jumbo_pm_reg = B53_JUMBO_PORT_MASK, -@@ -2406,7 +2398,6 @@ static const struct b53_chip_data b53_sw - .arl_bins = 4, - .arl_buckets = 1024, - .imp_port = 8, -- .cpu_port = B53_CPU_PORT, - .vta_regs = B53_VTA_REGS, - .duplex_reg = B53_DUPLEX_STAT_GE, - .jumbo_pm_reg = B53_JUMBO_PORT_MASK, -@@ -2420,7 +2411,6 @@ static const struct b53_chip_data b53_sw - .arl_bins = 4, - .arl_buckets = 1024, - .imp_port = 8, -- .cpu_port = B53_CPU_PORT, - .vta_regs = B53_VTA_REGS_63XX, - .duplex_reg = B53_DUPLEX_STAT_63XX, - .jumbo_pm_reg = B53_JUMBO_PORT_MASK_63XX, -@@ -2434,7 +2424,6 @@ static const struct b53_chip_data b53_sw - .arl_bins = 4, - .arl_buckets = 1024, - .imp_port = 8, -- .cpu_port = B53_CPU_PORT_25, /* TODO: auto detect */ - .vta_regs = B53_VTA_REGS, - .duplex_reg = B53_DUPLEX_STAT_GE, - .jumbo_pm_reg = B53_JUMBO_PORT_MASK, -@@ -2448,7 +2437,6 @@ static const struct b53_chip_data b53_sw - .arl_bins = 4, - .arl_buckets = 1024, - .imp_port = 8, -- .cpu_port = B53_CPU_PORT_25, /* TODO: auto detect */ - .vta_regs = B53_VTA_REGS, - .duplex_reg = B53_DUPLEX_STAT_GE, - .jumbo_pm_reg = B53_JUMBO_PORT_MASK, -@@ -2462,7 +2450,6 @@ static const struct b53_chip_data b53_sw - .arl_bins = 4, - .arl_buckets = 1024, - .imp_port = 8, -- .cpu_port = B53_CPU_PORT_25, /* TODO: auto detect */ - .vta_regs = B53_VTA_REGS, - .duplex_reg = B53_DUPLEX_STAT_GE, - .jumbo_pm_reg = B53_JUMBO_PORT_MASK, -@@ -2476,7 +2463,6 @@ static const struct b53_chip_data b53_sw - .arl_bins = 4, - .arl_buckets = 1024, - .imp_port = 8, -- .cpu_port = B53_CPU_PORT_25, /* TODO: auto detect */ - .vta_regs = B53_VTA_REGS, - .duplex_reg = B53_DUPLEX_STAT_GE, - .jumbo_pm_reg = B53_JUMBO_PORT_MASK, -@@ -2490,7 +2476,6 @@ static const struct b53_chip_data b53_sw - .arl_bins = 4, - .arl_buckets = 1024, - .imp_port = 8, -- .cpu_port = B53_CPU_PORT_25, /* TODO: auto detect */ - .vta_regs = B53_VTA_REGS, - .duplex_reg = B53_DUPLEX_STAT_GE, - .jumbo_pm_reg = B53_JUMBO_PORT_MASK, -@@ -2504,7 +2489,6 @@ static const struct b53_chip_data b53_sw - .arl_bins = 4, - .arl_buckets = 1024, - .imp_port = 8, -- .cpu_port = B53_CPU_PORT, - .vta_regs = B53_VTA_REGS, - .duplex_reg = B53_DUPLEX_STAT_GE, - .jumbo_pm_reg = B53_JUMBO_PORT_MASK, -@@ -2518,7 +2502,6 @@ static const struct b53_chip_data b53_sw - .arl_bins = 4, - .arl_buckets = 1024, - .imp_port = 8, -- .cpu_port = B53_CPU_PORT, - .vta_regs = B53_VTA_REGS, - .duplex_reg = B53_DUPLEX_STAT_GE, - .jumbo_pm_reg = B53_JUMBO_PORT_MASK, -@@ -2547,7 +2530,6 @@ static const struct b53_chip_data b53_sw - .arl_bins = 4, - .arl_buckets = 1024, - .imp_port = 8, -- .cpu_port = B53_CPU_PORT, - .vta_regs = B53_VTA_REGS, - .duplex_reg = B53_DUPLEX_STAT_GE, - .jumbo_pm_reg = B53_JUMBO_PORT_MASK, -@@ -2561,7 +2543,6 @@ static const struct b53_chip_data b53_sw - .arl_bins = 4, - .arl_buckets = 256, - .imp_port = 8, -- .cpu_port = B53_CPU_PORT, - .vta_regs = B53_VTA_REGS, - .duplex_reg = B53_DUPLEX_STAT_GE, - .jumbo_pm_reg = B53_JUMBO_PORT_MASK, -@@ -2587,7 +2568,6 @@ static int b53_switch_init(struct b53_de - dev->vta_regs[2] = chip->vta_regs[2]; - dev->jumbo_pm_reg = chip->jumbo_pm_reg; - dev->imp_port = chip->imp_port; -- dev->cpu_port = chip->cpu_port; - dev->num_vlans = chip->vlans; - dev->num_arl_bins = chip->arl_bins; - dev->num_arl_buckets = chip->arl_buckets; -@@ -2619,13 +2599,6 @@ static int b53_switch_init(struct b53_de - break; - #endif - } -- } else if (dev->chip_id == BCM53115_DEVICE_ID) { -- u64 strap_value; -- -- b53_read48(dev, B53_STAT_PAGE, B53_STRAP_VALUE, &strap_value); -- /* use second IMP port if GMII is enabled */ -- if (strap_value & SV_GMII_CTRL_115) -- dev->cpu_port = 5; - } - - dev->num_ports = fls(dev->enabled_ports); ---- a/drivers/net/dsa/b53/b53_priv.h -+++ b/drivers/net/dsa/b53/b53_priv.h -@@ -124,7 +124,6 @@ struct b53_device { - /* used ports mask */ - u16 enabled_ports; - unsigned int imp_port; -- unsigned int cpu_port; - - /* connect specific data */ - u8 current_page; diff --git a/root/target/linux/generic/backport-5.15/745-v5.16-01-net-phy-at803x-add-support-for-qca-8327-A-variant.patch b/root/target/linux/generic/backport-5.15/745-v5.16-01-net-phy-at803x-add-support-for-qca-8327-A-variant.patch deleted file mode 100755 index 07428364..00000000 --- a/root/target/linux/generic/backport-5.15/745-v5.16-01-net-phy-at803x-add-support-for-qca-8327-A-variant.patch +++ /dev/null @@ -1,65 +0,0 @@ -From b4df02b562f4aa14ff6811f30e1b4d2159585c59 Mon Sep 17 00:00:00 2001 -From: Ansuel Smith -Date: Sun, 19 Sep 2021 18:28:15 +0200 -Subject: net: phy: at803x: add support for qca 8327 A variant internal phy - -For qca8327 internal phy there are 2 different switch variant with 2 -different phy id. Add this missing variant so the internal phy can be -correctly identified and fixed. - -Signed-off-by: Ansuel Smith -Reviewed-by: Andrew Lunn -Signed-off-by: David S. Miller ---- - drivers/net/phy/at803x.c | 25 ++++++++++++++++++++----- - 1 file changed, 20 insertions(+), 5 deletions(-) - ---- a/drivers/net/phy/at803x.c -+++ b/drivers/net/phy/at803x.c -@@ -150,7 +150,8 @@ - #define ATH8035_PHY_ID 0x004dd072 - #define AT8030_PHY_ID_MASK 0xffffffef - --#define QCA8327_PHY_ID 0x004dd034 -+#define QCA8327_A_PHY_ID 0x004dd033 -+#define QCA8327_B_PHY_ID 0x004dd034 - #define QCA8337_PHY_ID 0x004dd036 - #define QCA8K_PHY_ID_MASK 0xffffffff - -@@ -1421,10 +1422,23 @@ static struct phy_driver at803x_driver[] - .get_strings = at803x_get_strings, - .get_stats = at803x_get_stats, - }, { -- /* QCA8327 */ -- .phy_id = QCA8327_PHY_ID, -+ /* QCA8327-A from switch QCA8327-AL1A */ -+ .phy_id = QCA8327_A_PHY_ID, - .phy_id_mask = QCA8K_PHY_ID_MASK, -- .name = "QCA PHY 8327", -+ .name = "QCA PHY 8327-A", -+ /* PHY_GBIT_FEATURES */ -+ .probe = at803x_probe, -+ .flags = PHY_IS_INTERNAL, -+ .config_init = qca83xx_config_init, -+ .soft_reset = genphy_soft_reset, -+ .get_sset_count = at803x_get_sset_count, -+ .get_strings = at803x_get_strings, -+ .get_stats = at803x_get_stats, -+}, { -+ /* QCA8327-B from switch QCA8327-BL1A */ -+ .phy_id = QCA8327_B_PHY_ID, -+ .phy_id_mask = QCA8K_PHY_ID_MASK, -+ .name = "QCA PHY 8327-B", - /* PHY_GBIT_FEATURES */ - .probe = at803x_probe, - .flags = PHY_IS_INTERNAL, -@@ -1444,7 +1458,8 @@ static struct mdio_device_id __maybe_unu - { PHY_ID_MATCH_EXACT(ATH8035_PHY_ID) }, - { PHY_ID_MATCH_EXACT(ATH9331_PHY_ID) }, - { PHY_ID_MATCH_EXACT(QCA8337_PHY_ID) }, -- { PHY_ID_MATCH_EXACT(QCA8327_PHY_ID) }, -+ { PHY_ID_MATCH_EXACT(QCA8327_A_PHY_ID) }, -+ { PHY_ID_MATCH_EXACT(QCA8327_B_PHY_ID) }, - { } - }; - diff --git a/root/target/linux/generic/backport-5.15/745-v5.16-02-net-phy-at803x-add-resume-suspend-function-to-qca83x.patch b/root/target/linux/generic/backport-5.15/745-v5.16-02-net-phy-at803x-add-resume-suspend-function-to-qca83x.patch deleted file mode 100755 index a572a318..00000000 --- a/root/target/linux/generic/backport-5.15/745-v5.16-02-net-phy-at803x-add-resume-suspend-function-to-qca83x.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 15b9df4ece17d084f14eb0ca1cf05f2ad497e425 Mon Sep 17 00:00:00 2001 -From: Ansuel Smith -Date: Sun, 19 Sep 2021 18:28:16 +0200 -Subject: net: phy: at803x: add resume/suspend function to qca83xx phy - -Add resume/suspend function to qca83xx internal phy. -We can't use the at803x generic function as the documentation lacks of -any support for WoL regs. - -Signed-off-by: Ansuel Smith -Reviewed-by: Andrew Lunn -Signed-off-by: David S. Miller ---- - drivers/net/phy/at803x.c | 6 ++++++ - 1 file changed, 6 insertions(+) - ---- a/drivers/net/phy/at803x.c -+++ b/drivers/net/phy/at803x.c -@@ -1421,6 +1421,8 @@ static struct phy_driver at803x_driver[] - .get_sset_count = at803x_get_sset_count, - .get_strings = at803x_get_strings, - .get_stats = at803x_get_stats, -+ .suspend = genphy_suspend, -+ .resume = genphy_resume, - }, { - /* QCA8327-A from switch QCA8327-AL1A */ - .phy_id = QCA8327_A_PHY_ID, -@@ -1434,6 +1436,8 @@ static struct phy_driver at803x_driver[] - .get_sset_count = at803x_get_sset_count, - .get_strings = at803x_get_strings, - .get_stats = at803x_get_stats, -+ .suspend = genphy_suspend, -+ .resume = genphy_resume, - }, { - /* QCA8327-B from switch QCA8327-BL1A */ - .phy_id = QCA8327_B_PHY_ID, -@@ -1447,6 +1451,8 @@ static struct phy_driver at803x_driver[] - .get_sset_count = at803x_get_sset_count, - .get_strings = at803x_get_strings, - .get_stats = at803x_get_stats, -+ .suspend = genphy_suspend, -+ .resume = genphy_resume, - }, }; - - module_phy_driver(at803x_driver); diff --git a/root/target/linux/generic/backport-5.15/745-v5.16-03-net-phy-at803x-fix-spacing-and-improve-name-for-83xx.patch b/root/target/linux/generic/backport-5.15/745-v5.16-03-net-phy-at803x-fix-spacing-and-improve-name-for-83xx.patch deleted file mode 100755 index 45c1ff27..00000000 --- a/root/target/linux/generic/backport-5.15/745-v5.16-03-net-phy-at803x-fix-spacing-and-improve-name-for-83xx.patch +++ /dev/null @@ -1,95 +0,0 @@ -From d44fd8604a4ab92119adb35f05fd87612af722b5 Mon Sep 17 00:00:00 2001 -From: Ansuel Smith -Date: Sun, 19 Sep 2021 18:28:17 +0200 -Subject: net: phy: at803x: fix spacing and improve name for 83xx phy - -Fix spacing and improve name for 83xx phy following other phy in the -same driver. - -Signed-off-by: Ansuel Smith -Reviewed-by: Andrew Lunn -Signed-off-by: David S. Miller ---- - drivers/net/phy/at803x.c | 60 ++++++++++++++++++++++++------------------------ - 1 file changed, 30 insertions(+), 30 deletions(-) - ---- a/drivers/net/phy/at803x.c -+++ b/drivers/net/phy/at803x.c -@@ -1410,47 +1410,47 @@ static struct phy_driver at803x_driver[] - .config_aneg = at803x_config_aneg, - }, { - /* QCA8337 */ -- .phy_id = QCA8337_PHY_ID, -- .phy_id_mask = QCA8K_PHY_ID_MASK, -- .name = "QCA PHY 8337", -+ .phy_id = QCA8337_PHY_ID, -+ .phy_id_mask = QCA8K_PHY_ID_MASK, -+ .name = "Qualcomm Atheros 8337 internal PHY", - /* PHY_GBIT_FEATURES */ -- .probe = at803x_probe, -- .flags = PHY_IS_INTERNAL, -- .config_init = qca83xx_config_init, -- .soft_reset = genphy_soft_reset, -- .get_sset_count = at803x_get_sset_count, -- .get_strings = at803x_get_strings, -- .get_stats = at803x_get_stats, -+ .probe = at803x_probe, -+ .flags = PHY_IS_INTERNAL, -+ .config_init = qca83xx_config_init, -+ .soft_reset = genphy_soft_reset, -+ .get_sset_count = at803x_get_sset_count, -+ .get_strings = at803x_get_strings, -+ .get_stats = at803x_get_stats, - .suspend = genphy_suspend, - .resume = genphy_resume, - }, { - /* QCA8327-A from switch QCA8327-AL1A */ -- .phy_id = QCA8327_A_PHY_ID, -- .phy_id_mask = QCA8K_PHY_ID_MASK, -- .name = "QCA PHY 8327-A", -+ .phy_id = QCA8327_A_PHY_ID, -+ .phy_id_mask = QCA8K_PHY_ID_MASK, -+ .name = "Qualcomm Atheros 8327-A internal PHY", - /* PHY_GBIT_FEATURES */ -- .probe = at803x_probe, -- .flags = PHY_IS_INTERNAL, -- .config_init = qca83xx_config_init, -- .soft_reset = genphy_soft_reset, -- .get_sset_count = at803x_get_sset_count, -- .get_strings = at803x_get_strings, -- .get_stats = at803x_get_stats, -+ .probe = at803x_probe, -+ .flags = PHY_IS_INTERNAL, -+ .config_init = qca83xx_config_init, -+ .soft_reset = genphy_soft_reset, -+ .get_sset_count = at803x_get_sset_count, -+ .get_strings = at803x_get_strings, -+ .get_stats = at803x_get_stats, - .suspend = genphy_suspend, - .resume = genphy_resume, - }, { - /* QCA8327-B from switch QCA8327-BL1A */ -- .phy_id = QCA8327_B_PHY_ID, -- .phy_id_mask = QCA8K_PHY_ID_MASK, -- .name = "QCA PHY 8327-B", -+ .phy_id = QCA8327_B_PHY_ID, -+ .phy_id_mask = QCA8K_PHY_ID_MASK, -+ .name = "Qualcomm Atheros 8327-B internal PHY", - /* PHY_GBIT_FEATURES */ -- .probe = at803x_probe, -- .flags = PHY_IS_INTERNAL, -- .config_init = qca83xx_config_init, -- .soft_reset = genphy_soft_reset, -- .get_sset_count = at803x_get_sset_count, -- .get_strings = at803x_get_strings, -- .get_stats = at803x_get_stats, -+ .probe = at803x_probe, -+ .flags = PHY_IS_INTERNAL, -+ .config_init = qca83xx_config_init, -+ .soft_reset = genphy_soft_reset, -+ .get_sset_count = at803x_get_sset_count, -+ .get_strings = at803x_get_strings, -+ .get_stats = at803x_get_stats, - .suspend = genphy_suspend, - .resume = genphy_resume, - }, }; diff --git a/root/target/linux/generic/backport-5.15/746-v5.16-01-net-phy-at803x-fix-resume-for-QCA8327-phy.patch b/root/target/linux/generic/backport-5.15/746-v5.16-01-net-phy-at803x-fix-resume-for-QCA8327-phy.patch deleted file mode 100755 index 7f9182ab..00000000 --- a/root/target/linux/generic/backport-5.15/746-v5.16-01-net-phy-at803x-fix-resume-for-QCA8327-phy.patch +++ /dev/null @@ -1,131 +0,0 @@ -From ba3c01ee02ed0d821c9f241f179bbc9457542b8f Mon Sep 17 00:00:00 2001 -From: Ansuel Smith -Date: Sun, 10 Oct 2021 00:46:15 +0200 -Subject: net: phy: at803x: fix resume for QCA8327 phy - -From Documentation phy resume triggers phy reset and restart -auto-negotiation. Add a dedicated function to wait reset to finish as -it was notice a regression where port sometime are not reliable after a -suspend/resume session. The reset wait logic is copied from phy_poll_reset. -Add dedicated suspend function to use genphy_suspend only with QCA8337 -phy and set only additional debug settings for QCA8327. With more test -it was reported that QCA8327 doesn't proprely support this mode and -using this cause the unreliability of the switch ports, especially the -malfunction of the port0. - -Fixes: 15b9df4ece17 ("net: phy: at803x: add resume/suspend function to qca83xx phy") -Signed-off-by: Ansuel Smith -Signed-off-by: David S. Miller ---- - drivers/net/phy/at803x.c | 69 +++++++++++++++++++++++++++++++++++++++++++----- - 1 file changed, 63 insertions(+), 6 deletions(-) - ---- a/drivers/net/phy/at803x.c -+++ b/drivers/net/phy/at803x.c -@@ -92,9 +92,14 @@ - #define AT803X_DEBUG_REG_5 0x05 - #define AT803X_DEBUG_TX_CLK_DLY_EN BIT(8) - -+#define AT803X_DEBUG_REG_HIB_CTRL 0x0b -+#define AT803X_DEBUG_HIB_CTRL_SEL_RST_80U BIT(10) -+#define AT803X_DEBUG_HIB_CTRL_EN_ANY_CHANGE BIT(13) -+ - #define AT803X_DEBUG_REG_3C 0x3C - - #define AT803X_DEBUG_REG_3D 0x3D -+#define AT803X_DEBUG_GATE_CLK_IN1000 BIT(6) - - #define AT803X_DEBUG_REG_1F 0x1F - #define AT803X_DEBUG_PLL_ON BIT(2) -@@ -1312,6 +1317,58 @@ static int qca83xx_config_init(struct ph - return 0; - } - -+static int qca83xx_resume(struct phy_device *phydev) -+{ -+ int ret, val; -+ -+ /* Skip reset if not suspended */ -+ if (!phydev->suspended) -+ return 0; -+ -+ /* Reinit the port, reset values set by suspend */ -+ qca83xx_config_init(phydev); -+ -+ /* Reset the port on port resume */ -+ phy_set_bits(phydev, MII_BMCR, BMCR_RESET | BMCR_ANENABLE); -+ -+ /* On resume from suspend the switch execute a reset and -+ * restart auto-negotiation. Wait for reset to complete. -+ */ -+ ret = phy_read_poll_timeout(phydev, MII_BMCR, val, !(val & BMCR_RESET), -+ 50000, 600000, true); -+ if (ret) -+ return ret; -+ -+ msleep(1); -+ -+ return 0; -+} -+ -+static int qca83xx_suspend(struct phy_device *phydev) -+{ -+ u16 mask = 0; -+ -+ /* Only QCA8337 support actual suspend. -+ * QCA8327 cause port unreliability when phy suspend -+ * is set. -+ */ -+ if (phydev->drv->phy_id == QCA8337_PHY_ID) { -+ genphy_suspend(phydev); -+ } else { -+ mask |= ~(BMCR_SPEED1000 | BMCR_FULLDPLX); -+ phy_modify(phydev, MII_BMCR, mask, 0); -+ } -+ -+ at803x_debug_reg_mask(phydev, AT803X_DEBUG_REG_3D, -+ AT803X_DEBUG_GATE_CLK_IN1000, 0); -+ -+ at803x_debug_reg_mask(phydev, AT803X_DEBUG_REG_HIB_CTRL, -+ AT803X_DEBUG_HIB_CTRL_EN_ANY_CHANGE | -+ AT803X_DEBUG_HIB_CTRL_SEL_RST_80U, 0); -+ -+ return 0; -+} -+ - static struct phy_driver at803x_driver[] = { - { - /* Qualcomm Atheros AR8035 */ -@@ -1421,8 +1478,8 @@ static struct phy_driver at803x_driver[] - .get_sset_count = at803x_get_sset_count, - .get_strings = at803x_get_strings, - .get_stats = at803x_get_stats, -- .suspend = genphy_suspend, -- .resume = genphy_resume, -+ .suspend = qca83xx_suspend, -+ .resume = qca83xx_resume, - }, { - /* QCA8327-A from switch QCA8327-AL1A */ - .phy_id = QCA8327_A_PHY_ID, -@@ -1436,8 +1493,8 @@ static struct phy_driver at803x_driver[] - .get_sset_count = at803x_get_sset_count, - .get_strings = at803x_get_strings, - .get_stats = at803x_get_stats, -- .suspend = genphy_suspend, -- .resume = genphy_resume, -+ .suspend = qca83xx_suspend, -+ .resume = qca83xx_resume, - }, { - /* QCA8327-B from switch QCA8327-BL1A */ - .phy_id = QCA8327_B_PHY_ID, -@@ -1451,8 +1508,8 @@ static struct phy_driver at803x_driver[] - .get_sset_count = at803x_get_sset_count, - .get_strings = at803x_get_strings, - .get_stats = at803x_get_stats, -- .suspend = genphy_suspend, -- .resume = genphy_resume, -+ .suspend = qca83xx_suspend, -+ .resume = qca83xx_resume, - }, }; - - module_phy_driver(at803x_driver); diff --git a/root/target/linux/generic/backport-5.15/746-v5.16-02-net-phy-at803x-add-DAC-amplitude-fix-for-8327-phy.patch b/root/target/linux/generic/backport-5.15/746-v5.16-02-net-phy-at803x-add-DAC-amplitude-fix-for-8327-phy.patch deleted file mode 100755 index cfdfe2c4..00000000 --- a/root/target/linux/generic/backport-5.15/746-v5.16-02-net-phy-at803x-add-DAC-amplitude-fix-for-8327-phy.patch +++ /dev/null @@ -1,91 +0,0 @@ -From 1ca8311949aec5c9447645731ef1c6bc5bd71350 Mon Sep 17 00:00:00 2001 -From: Ansuel Smith -Date: Sun, 10 Oct 2021 00:46:16 +0200 -Subject: net: phy: at803x: add DAC amplitude fix for 8327 phy - -QCA8327 internal phy require DAC amplitude adjustement set to +6% with -100m speed. Also add additional define to report a change of the same -reg in QCA8337. (different scope it does set 1000m voltage) -Add link_change_notify function to set the proper amplitude adjustement -on PHY_RUNNING state and disable on any other state. - -Fixes: b4df02b562f4 ("net: phy: at803x: add support for qca 8327 A variant internal phy") -Signed-off-by: Ansuel Smith -Signed-off-by: David S. Miller ---- - drivers/net/phy/at803x.c | 33 +++++++++++++++++++++++++++++++++ - 1 file changed, 33 insertions(+) - ---- a/drivers/net/phy/at803x.c -+++ b/drivers/net/phy/at803x.c -@@ -87,6 +87,8 @@ - #define AT803X_PSSR_MR_AN_COMPLETE 0x0200 - - #define AT803X_DEBUG_REG_0 0x00 -+#define QCA8327_DEBUG_MANU_CTRL_EN BIT(2) -+#define QCA8337_DEBUG_MANU_CTRL_EN GENMASK(3, 2) - #define AT803X_DEBUG_RX_CLK_DLY_EN BIT(15) - - #define AT803X_DEBUG_REG_5 0x05 -@@ -1314,9 +1316,37 @@ static int qca83xx_config_init(struct ph - break; - } - -+ /* QCA8327 require DAC amplitude adjustment for 100m set to +6%. -+ * Disable on init and enable only with 100m speed following -+ * qca original source code. -+ */ -+ if (phydev->drv->phy_id == QCA8327_A_PHY_ID || -+ phydev->drv->phy_id == QCA8327_B_PHY_ID) -+ at803x_debug_reg_mask(phydev, AT803X_DEBUG_REG_0, -+ QCA8327_DEBUG_MANU_CTRL_EN, 0); -+ - return 0; - } - -+static void qca83xx_link_change_notify(struct phy_device *phydev) -+{ -+ /* QCA8337 doesn't require DAC Amplitude adjustement */ -+ if (phydev->drv->phy_id == QCA8337_PHY_ID) -+ return; -+ -+ /* Set DAC Amplitude adjustment to +6% for 100m on link running */ -+ if (phydev->state == PHY_RUNNING) { -+ if (phydev->speed == SPEED_100) -+ at803x_debug_reg_mask(phydev, AT803X_DEBUG_REG_0, -+ QCA8327_DEBUG_MANU_CTRL_EN, -+ QCA8327_DEBUG_MANU_CTRL_EN); -+ } else { -+ /* Reset DAC Amplitude adjustment */ -+ at803x_debug_reg_mask(phydev, AT803X_DEBUG_REG_0, -+ QCA8327_DEBUG_MANU_CTRL_EN, 0); -+ } -+} -+ - static int qca83xx_resume(struct phy_device *phydev) - { - int ret, val; -@@ -1471,6 +1501,7 @@ static struct phy_driver at803x_driver[] - .phy_id_mask = QCA8K_PHY_ID_MASK, - .name = "Qualcomm Atheros 8337 internal PHY", - /* PHY_GBIT_FEATURES */ -+ .link_change_notify = qca83xx_link_change_notify, - .probe = at803x_probe, - .flags = PHY_IS_INTERNAL, - .config_init = qca83xx_config_init, -@@ -1486,6 +1517,7 @@ static struct phy_driver at803x_driver[] - .phy_id_mask = QCA8K_PHY_ID_MASK, - .name = "Qualcomm Atheros 8327-A internal PHY", - /* PHY_GBIT_FEATURES */ -+ .link_change_notify = qca83xx_link_change_notify, - .probe = at803x_probe, - .flags = PHY_IS_INTERNAL, - .config_init = qca83xx_config_init, -@@ -1501,6 +1533,7 @@ static struct phy_driver at803x_driver[] - .phy_id_mask = QCA8K_PHY_ID_MASK, - .name = "Qualcomm Atheros 8327-B internal PHY", - /* PHY_GBIT_FEATURES */ -+ .link_change_notify = qca83xx_link_change_notify, - .probe = at803x_probe, - .flags = PHY_IS_INTERNAL, - .config_init = qca83xx_config_init, diff --git a/root/target/linux/generic/backport-5.15/746-v5.16-03-net-phy-at803x-enable-prefer-master-for-83xx-interna.patch b/root/target/linux/generic/backport-5.15/746-v5.16-03-net-phy-at803x-enable-prefer-master-for-83xx-interna.patch deleted file mode 100755 index 71c1e60f..00000000 --- a/root/target/linux/generic/backport-5.15/746-v5.16-03-net-phy-at803x-enable-prefer-master-for-83xx-interna.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 9d1c29b4028557a496be9c5eb2b4b86063700636 Mon Sep 17 00:00:00 2001 -From: Ansuel Smith -Date: Sun, 10 Oct 2021 00:46:17 +0200 -Subject: net: phy: at803x: enable prefer master for 83xx internal phy - -From original QCA source code the port was set to prefer master as port -type in 1000BASE-T mode. Apply the same settings also here. - -Signed-off-by: Ansuel Smith -Reviewed-by: Andrew Lunn -Signed-off-by: David S. Miller ---- - drivers/net/phy/at803x.c | 3 +++ - 1 file changed, 3 insertions(+) - ---- a/drivers/net/phy/at803x.c -+++ b/drivers/net/phy/at803x.c -@@ -1325,6 +1325,9 @@ static int qca83xx_config_init(struct ph - at803x_debug_reg_mask(phydev, AT803X_DEBUG_REG_0, - QCA8327_DEBUG_MANU_CTRL_EN, 0); - -+ /* Following original QCA sourcecode set port to prefer master */ -+ phy_set_bits(phydev, MII_CTRL1000, CTL1000_PREFER_MASTER); -+ - return 0; - } - diff --git a/root/target/linux/generic/backport-5.15/746-v5.16-04-net-phy-at803x-better-describe-debug-regs.patch b/root/target/linux/generic/backport-5.15/746-v5.16-04-net-phy-at803x-better-describe-debug-regs.patch deleted file mode 100755 index 64163bfb..00000000 --- a/root/target/linux/generic/backport-5.15/746-v5.16-04-net-phy-at803x-better-describe-debug-regs.patch +++ /dev/null @@ -1,127 +0,0 @@ -From 67999555ff42e91de7654488d9a7735bd9e84555 Mon Sep 17 00:00:00 2001 -From: Ansuel Smith -Date: Sun, 10 Oct 2021 00:46:18 +0200 -Subject: net: phy: at803x: better describe debug regs - -Give a name to known debug regs from Documentation instead of using -unknown hex values. - -Signed-off-by: Ansuel Smith -Reviewed-by: Andrew Lunn -Signed-off-by: David S. Miller ---- - drivers/net/phy/at803x.c | 30 +++++++++++++++--------------- - 1 file changed, 15 insertions(+), 15 deletions(-) - ---- a/drivers/net/phy/at803x.c -+++ b/drivers/net/phy/at803x.c -@@ -86,12 +86,12 @@ - #define AT803X_PSSR 0x11 /*PHY-Specific Status Register*/ - #define AT803X_PSSR_MR_AN_COMPLETE 0x0200 - --#define AT803X_DEBUG_REG_0 0x00 -+#define AT803X_DEBUG_ANALOG_TEST_CTRL 0x00 - #define QCA8327_DEBUG_MANU_CTRL_EN BIT(2) - #define QCA8337_DEBUG_MANU_CTRL_EN GENMASK(3, 2) - #define AT803X_DEBUG_RX_CLK_DLY_EN BIT(15) - --#define AT803X_DEBUG_REG_5 0x05 -+#define AT803X_DEBUG_SYSTEM_CTRL_MODE 0x05 - #define AT803X_DEBUG_TX_CLK_DLY_EN BIT(8) - - #define AT803X_DEBUG_REG_HIB_CTRL 0x0b -@@ -100,7 +100,7 @@ - - #define AT803X_DEBUG_REG_3C 0x3C - --#define AT803X_DEBUG_REG_3D 0x3D -+#define AT803X_DEBUG_REG_GREEN 0x3D - #define AT803X_DEBUG_GATE_CLK_IN1000 BIT(6) - - #define AT803X_DEBUG_REG_1F 0x1F -@@ -284,25 +284,25 @@ static int at803x_read_page(struct phy_d - - static int at803x_enable_rx_delay(struct phy_device *phydev) - { -- return at803x_debug_reg_mask(phydev, AT803X_DEBUG_REG_0, 0, -+ return at803x_debug_reg_mask(phydev, AT803X_DEBUG_ANALOG_TEST_CTRL, 0, - AT803X_DEBUG_RX_CLK_DLY_EN); - } - - static int at803x_enable_tx_delay(struct phy_device *phydev) - { -- return at803x_debug_reg_mask(phydev, AT803X_DEBUG_REG_5, 0, -+ return at803x_debug_reg_mask(phydev, AT803X_DEBUG_SYSTEM_CTRL_MODE, 0, - AT803X_DEBUG_TX_CLK_DLY_EN); - } - - static int at803x_disable_rx_delay(struct phy_device *phydev) - { -- return at803x_debug_reg_mask(phydev, AT803X_DEBUG_REG_0, -+ return at803x_debug_reg_mask(phydev, AT803X_DEBUG_ANALOG_TEST_CTRL, - AT803X_DEBUG_RX_CLK_DLY_EN, 0); - } - - static int at803x_disable_tx_delay(struct phy_device *phydev) - { -- return at803x_debug_reg_mask(phydev, AT803X_DEBUG_REG_5, -+ return at803x_debug_reg_mask(phydev, AT803X_DEBUG_SYSTEM_CTRL_MODE, - AT803X_DEBUG_TX_CLK_DLY_EN, 0); - } - -@@ -1300,9 +1300,9 @@ static int qca83xx_config_init(struct ph - switch (switch_revision) { - case 1: - /* For 100M waveform */ -- at803x_debug_reg_write(phydev, AT803X_DEBUG_REG_0, 0x02ea); -+ at803x_debug_reg_write(phydev, AT803X_DEBUG_ANALOG_TEST_CTRL, 0x02ea); - /* Turn on Gigabit clock */ -- at803x_debug_reg_write(phydev, AT803X_DEBUG_REG_3D, 0x68a0); -+ at803x_debug_reg_write(phydev, AT803X_DEBUG_REG_GREEN, 0x68a0); - break; - - case 2: -@@ -1310,8 +1310,8 @@ static int qca83xx_config_init(struct ph - fallthrough; - case 4: - phy_write_mmd(phydev, MDIO_MMD_PCS, MDIO_AZ_DEBUG, 0x803f); -- at803x_debug_reg_write(phydev, AT803X_DEBUG_REG_3D, 0x6860); -- at803x_debug_reg_write(phydev, AT803X_DEBUG_REG_5, 0x2c46); -+ at803x_debug_reg_write(phydev, AT803X_DEBUG_REG_GREEN, 0x6860); -+ at803x_debug_reg_write(phydev, AT803X_DEBUG_SYSTEM_CTRL_MODE, 0x2c46); - at803x_debug_reg_write(phydev, AT803X_DEBUG_REG_3C, 0x6000); - break; - } -@@ -1322,7 +1322,7 @@ static int qca83xx_config_init(struct ph - */ - if (phydev->drv->phy_id == QCA8327_A_PHY_ID || - phydev->drv->phy_id == QCA8327_B_PHY_ID) -- at803x_debug_reg_mask(phydev, AT803X_DEBUG_REG_0, -+ at803x_debug_reg_mask(phydev, AT803X_DEBUG_ANALOG_TEST_CTRL, - QCA8327_DEBUG_MANU_CTRL_EN, 0); - - /* Following original QCA sourcecode set port to prefer master */ -@@ -1340,12 +1340,12 @@ static void qca83xx_link_change_notify(s - /* Set DAC Amplitude adjustment to +6% for 100m on link running */ - if (phydev->state == PHY_RUNNING) { - if (phydev->speed == SPEED_100) -- at803x_debug_reg_mask(phydev, AT803X_DEBUG_REG_0, -+ at803x_debug_reg_mask(phydev, AT803X_DEBUG_ANALOG_TEST_CTRL, - QCA8327_DEBUG_MANU_CTRL_EN, - QCA8327_DEBUG_MANU_CTRL_EN); - } else { - /* Reset DAC Amplitude adjustment */ -- at803x_debug_reg_mask(phydev, AT803X_DEBUG_REG_0, -+ at803x_debug_reg_mask(phydev, AT803X_DEBUG_ANALOG_TEST_CTRL, - QCA8327_DEBUG_MANU_CTRL_EN, 0); - } - } -@@ -1392,7 +1392,7 @@ static int qca83xx_suspend(struct phy_de - phy_modify(phydev, MII_BMCR, mask, 0); - } - -- at803x_debug_reg_mask(phydev, AT803X_DEBUG_REG_3D, -+ at803x_debug_reg_mask(phydev, AT803X_DEBUG_REG_GREEN, - AT803X_DEBUG_GATE_CLK_IN1000, 0); - - at803x_debug_reg_mask(phydev, AT803X_DEBUG_REG_HIB_CTRL, diff --git a/root/target/linux/generic/backport-5.15/747-v5.16-01-dsa-qca8k-add-mac-power-sel-support.patch b/root/target/linux/generic/backport-5.15/747-v5.16-01-dsa-qca8k-add-mac-power-sel-support.patch deleted file mode 100755 index c8d424de..00000000 --- a/root/target/linux/generic/backport-5.15/747-v5.16-01-dsa-qca8k-add-mac-power-sel-support.patch +++ /dev/null @@ -1,80 +0,0 @@ -From d8b6f5bae6d3b648a67b6958cb98e4e97256d652 Mon Sep 17 00:00:00 2001 -From: Ansuel Smith -Date: Thu, 14 Oct 2021 00:39:06 +0200 -Subject: dsa: qca8k: add mac_power_sel support - -Add missing mac power sel support needed for ipq8064/5 SoC that require -1.8v for the internal regulator port instead of the default 1.5v. -If other device needs this, consider adding a dedicated binding to -support this. - -Signed-off-by: Ansuel Smith -Reviewed-by: Vladimir Oltean -Reviewed-by: Florian Fainelli -Signed-off-by: David S. Miller ---- - drivers/net/dsa/qca8k.c | 31 +++++++++++++++++++++++++++++++ - drivers/net/dsa/qca8k.h | 5 +++++ - 2 files changed, 36 insertions(+) - ---- a/drivers/net/dsa/qca8k.c -+++ b/drivers/net/dsa/qca8k.c -@@ -951,6 +951,33 @@ qca8k_setup_of_rgmii_delay(struct qca8k_ - } - - static int -+qca8k_setup_mac_pwr_sel(struct qca8k_priv *priv) -+{ -+ u32 mask = 0; -+ int ret = 0; -+ -+ /* SoC specific settings for ipq8064. -+ * If more device require this consider adding -+ * a dedicated binding. -+ */ -+ if (of_machine_is_compatible("qcom,ipq8064")) -+ mask |= QCA8K_MAC_PWR_RGMII0_1_8V; -+ -+ /* SoC specific settings for ipq8065 */ -+ if (of_machine_is_compatible("qcom,ipq8065")) -+ mask |= QCA8K_MAC_PWR_RGMII1_1_8V; -+ -+ if (mask) { -+ ret = qca8k_rmw(priv, QCA8K_REG_MAC_PWR_SEL, -+ QCA8K_MAC_PWR_RGMII0_1_8V | -+ QCA8K_MAC_PWR_RGMII1_1_8V, -+ mask); -+ } -+ -+ return ret; -+} -+ -+static int - qca8k_setup(struct dsa_switch *ds) - { - struct qca8k_priv *priv = (struct qca8k_priv *)ds->priv; -@@ -979,6 +1006,10 @@ qca8k_setup(struct dsa_switch *ds) - if (ret) - return ret; - -+ ret = qca8k_setup_mac_pwr_sel(priv); -+ if (ret) -+ return ret; -+ - /* Enable CPU Port */ - ret = qca8k_reg_set(priv, QCA8K_REG_GLOBAL_FW_CTRL0, - QCA8K_GLOBAL_FW_CTRL0_CPU_PORT_EN); ---- a/drivers/net/dsa/qca8k.h -+++ b/drivers/net/dsa/qca8k.h -@@ -100,6 +100,11 @@ - #define QCA8K_SGMII_MODE_CTRL_PHY (1 << 22) - #define QCA8K_SGMII_MODE_CTRL_MAC (2 << 22) - -+/* MAC_PWR_SEL registers */ -+#define QCA8K_REG_MAC_PWR_SEL 0x0e4 -+#define QCA8K_MAC_PWR_RGMII1_1_8V BIT(18) -+#define QCA8K_MAC_PWR_RGMII0_1_8V BIT(19) -+ - /* EEE control registers */ - #define QCA8K_REG_EEE_CTRL 0x100 - #define QCA8K_REG_EEE_CTRL_LPI_EN(_i) ((_i + 1) * 2) diff --git a/root/target/linux/generic/backport-5.15/747-v5.16-02-dt-bindings-net-dsa-qca8k-Add-SGMII-clock-phase-prop.patch b/root/target/linux/generic/backport-5.15/747-v5.16-02-dt-bindings-net-dsa-qca8k-Add-SGMII-clock-phase-prop.patch deleted file mode 100755 index bd768ec2..00000000 --- a/root/target/linux/generic/backport-5.15/747-v5.16-02-dt-bindings-net-dsa-qca8k-Add-SGMII-clock-phase-prop.patch +++ /dev/null @@ -1,30 +0,0 @@ -From fdbf35df9c091db9c46e57e9938e3f7a4f603a7c Mon Sep 17 00:00:00 2001 -From: Ansuel Smith -Date: Thu, 14 Oct 2021 00:39:07 +0200 -Subject: dt-bindings: net: dsa: qca8k: Add SGMII clock phase properties - -Add names and descriptions of additional PORT0_PAD_CTRL properties. -qca,sgmii-(rx|tx)clk-falling-edge are for setting the respective clock -phase to failling edge. - -Co-developed-by: Matthew Hagan -Signed-off-by: Matthew Hagan -Signed-off-by: Ansuel Smith -Signed-off-by: David S. Miller ---- - Documentation/devicetree/bindings/net/dsa/qca8k.txt | 4 ++++ - 1 file changed, 4 insertions(+) - ---- a/Documentation/devicetree/bindings/net/dsa/qca8k.txt -+++ b/Documentation/devicetree/bindings/net/dsa/qca8k.txt -@@ -37,6 +37,10 @@ A CPU port node has the following option - managed entity. See - Documentation/devicetree/bindings/net/fixed-link.txt - for details. -+- qca,sgmii-rxclk-falling-edge: Set the receive clock phase to falling edge. -+ Mostly used in qca8327 with CPU port 0 set to -+ sgmii. -+- qca,sgmii-txclk-falling-edge: Set the transmit clock phase to falling edge. - - For QCA8K the 'fixed-link' sub-node supports only the following properties: - diff --git a/root/target/linux/generic/backport-5.15/747-v5.16-03-net-dsa-qca8k-add-support-for-sgmii-falling-edge.patch b/root/target/linux/generic/backport-5.15/747-v5.16-03-net-dsa-qca8k-add-support-for-sgmii-falling-edge.patch deleted file mode 100755 index e464452d..00000000 --- a/root/target/linux/generic/backport-5.15/747-v5.16-03-net-dsa-qca8k-add-support-for-sgmii-falling-edge.patch +++ /dev/null @@ -1,127 +0,0 @@ -From 6c43809bf1bee76c434e365a26546a92a5fbec14 Mon Sep 17 00:00:00 2001 -From: Ansuel Smith -Date: Thu, 14 Oct 2021 00:39:08 +0200 -Subject: net: dsa: qca8k: add support for sgmii falling edge - -Add support for this in the qca8k driver. Also add support for SGMII -rx/tx clock falling edge. This is only present for pad0, pad5 and -pad6 have these bit reserved from Documentation. Add a comment that this -is hardcoded to PAD0 as qca8327/28/34/37 have an unique sgmii line and -setting falling in port0 applies to both configuration with sgmii used -for port0 or port6. - -Co-developed-by: Matthew Hagan -Signed-off-by: Matthew Hagan -Signed-off-by: Ansuel Smith -Signed-off-by: David S. Miller ---- - drivers/net/dsa/qca8k.c | 63 +++++++++++++++++++++++++++++++++++++++++++++++++ - drivers/net/dsa/qca8k.h | 4 ++++ - 2 files changed, 67 insertions(+) - ---- a/drivers/net/dsa/qca8k.c -+++ b/drivers/net/dsa/qca8k.c -@@ -978,6 +978,42 @@ qca8k_setup_mac_pwr_sel(struct qca8k_pri - } - - static int -+qca8k_parse_port_config(struct qca8k_priv *priv) -+{ -+ struct device_node *port_dn; -+ phy_interface_t mode; -+ struct dsa_port *dp; -+ int port, ret; -+ -+ /* We have 2 CPU port. Check them */ -+ for (port = 0; port < QCA8K_NUM_PORTS; port++) { -+ /* Skip every other port */ -+ if (port != 0 && port != 6) -+ continue; -+ -+ dp = dsa_to_port(priv->ds, port); -+ port_dn = dp->dn; -+ -+ if (!of_device_is_available(port_dn)) -+ continue; -+ -+ ret = of_get_phy_mode(port_dn, &mode); -+ if (ret) -+ continue; -+ -+ if (mode == PHY_INTERFACE_MODE_SGMII) { -+ if (of_property_read_bool(port_dn, "qca,sgmii-txclk-falling-edge")) -+ priv->sgmii_tx_clk_falling_edge = true; -+ -+ if (of_property_read_bool(port_dn, "qca,sgmii-rxclk-falling-edge")) -+ priv->sgmii_rx_clk_falling_edge = true; -+ } -+ } -+ -+ return 0; -+} -+ -+static int - qca8k_setup(struct dsa_switch *ds) - { - struct qca8k_priv *priv = (struct qca8k_priv *)ds->priv; -@@ -990,6 +1026,11 @@ qca8k_setup(struct dsa_switch *ds) - return -EINVAL; - } - -+ /* Parse CPU port config to be later used in phy_link mac_config */ -+ ret = qca8k_parse_port_config(priv); -+ if (ret) -+ return ret; -+ - mutex_init(&priv->reg_mutex); - - /* Start by setting up the register mapping */ -@@ -1274,6 +1315,28 @@ qca8k_phylink_mac_config(struct dsa_swit - } - - qca8k_write(priv, QCA8K_REG_SGMII_CTRL, val); -+ -+ /* For qca8327/qca8328/qca8334/qca8338 sgmii is unique and -+ * falling edge is set writing in the PORT0 PAD reg -+ */ -+ if (priv->switch_id == QCA8K_ID_QCA8327 || -+ priv->switch_id == QCA8K_ID_QCA8337) -+ reg = QCA8K_REG_PORT0_PAD_CTRL; -+ -+ val = 0; -+ -+ /* SGMII Clock phase configuration */ -+ if (priv->sgmii_rx_clk_falling_edge) -+ val |= QCA8K_PORT0_PAD_SGMII_RXCLK_FALLING_EDGE; -+ -+ if (priv->sgmii_tx_clk_falling_edge) -+ val |= QCA8K_PORT0_PAD_SGMII_TXCLK_FALLING_EDGE; -+ -+ if (val) -+ ret = qca8k_rmw(priv, reg, -+ QCA8K_PORT0_PAD_SGMII_RXCLK_FALLING_EDGE | -+ QCA8K_PORT0_PAD_SGMII_TXCLK_FALLING_EDGE, -+ val); - break; - default: - dev_err(ds->dev, "xMII mode %s not supported for port %d\n", ---- a/drivers/net/dsa/qca8k.h -+++ b/drivers/net/dsa/qca8k.h -@@ -35,6 +35,8 @@ - #define QCA8K_MASK_CTRL_DEVICE_ID_MASK GENMASK(15, 8) - #define QCA8K_MASK_CTRL_DEVICE_ID(x) ((x) >> 8) - #define QCA8K_REG_PORT0_PAD_CTRL 0x004 -+#define QCA8K_PORT0_PAD_SGMII_RXCLK_FALLING_EDGE BIT(19) -+#define QCA8K_PORT0_PAD_SGMII_TXCLK_FALLING_EDGE BIT(18) - #define QCA8K_REG_PORT5_PAD_CTRL 0x008 - #define QCA8K_REG_PORT6_PAD_CTRL 0x00c - #define QCA8K_PORT_PAD_RGMII_EN BIT(26) -@@ -260,6 +262,8 @@ struct qca8k_priv { - u8 switch_revision; - u8 rgmii_tx_delay; - u8 rgmii_rx_delay; -+ bool sgmii_rx_clk_falling_edge; -+ bool sgmii_tx_clk_falling_edge; - bool legacy_phy_port_mapping; - struct regmap *regmap; - struct mii_bus *bus; diff --git a/root/target/linux/generic/backport-5.15/747-v5.16-04-dt-bindings-net-dsa-qca8k-Document-support-for-CPU-p.patch b/root/target/linux/generic/backport-5.15/747-v5.16-04-dt-bindings-net-dsa-qca8k-Document-support-for-CPU-p.patch deleted file mode 100755 index 606ac0af..00000000 --- a/root/target/linux/generic/backport-5.15/747-v5.16-04-dt-bindings-net-dsa-qca8k-Document-support-for-CPU-p.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 731d613338ec6de482053ffa3f71be2325b0f8eb Mon Sep 17 00:00:00 2001 -From: Ansuel Smith -Date: Thu, 14 Oct 2021 00:39:09 +0200 -Subject: dt-bindings: net: dsa: qca8k: Document support for CPU port 6 - -The switch now support CPU port to be set 6 instead of be hardcoded to -0. Document support for it and describe logic selection. - -Signed-off-by: Ansuel Smith -Signed-off-by: David S. Miller ---- - Documentation/devicetree/bindings/net/dsa/qca8k.txt | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - ---- a/Documentation/devicetree/bindings/net/dsa/qca8k.txt -+++ b/Documentation/devicetree/bindings/net/dsa/qca8k.txt -@@ -29,7 +29,11 @@ the mdio MASTER is used as communication - Don't use mixed external and internal mdio-bus configurations, as this is - not supported by the hardware. - --The CPU port of this switch is always port 0. -+This switch support 2 CPU port. Normally and advised configuration is with -+CPU port set to port 0. It is also possible to set the CPU port to port 6 -+if the device requires it. The driver will configure the switch to the defined -+port. With both CPU port declared the first CPU port is selected as primary -+and the secondary CPU ignored. - - A CPU port node has the following optional node: - diff --git a/root/target/linux/generic/backport-5.15/747-v5.16-05-net-dsa-qca8k-add-support-for-cpu-port-6.patch b/root/target/linux/generic/backport-5.15/747-v5.16-05-net-dsa-qca8k-add-support-for-cpu-port-6.patch deleted file mode 100755 index 320db8fa..00000000 --- a/root/target/linux/generic/backport-5.15/747-v5.16-05-net-dsa-qca8k-add-support-for-cpu-port-6.patch +++ /dev/null @@ -1,153 +0,0 @@ -From 3fcf734aa482487df83cf8f18608438fcf59127f Mon Sep 17 00:00:00 2001 -From: Ansuel Smith -Date: Thu, 14 Oct 2021 00:39:10 +0200 -Subject: net: dsa: qca8k: add support for cpu port 6 - -Currently CPU port is always hardcoded to port 0. This switch have 2 CPU -ports. The original intention of this driver seems to be use the -mac06_exchange bit to swap MAC0 with MAC6 in the strange configuration -where device have connected only the CPU port 6. To skip the -introduction of a new binding, rework the driver to address the -secondary CPU port as primary and drop any reference of hardcoded port. -With configuration of mac06 exchange, just skip the definition of port0 -and define the CPU port as a secondary. The driver will autoconfigure -the switch to use that as the primary CPU port. - -Signed-off-by: Ansuel Smith -Signed-off-by: David S. Miller ---- - drivers/net/dsa/qca8k.c | 51 ++++++++++++++++++++++++++++++++++--------------- - drivers/net/dsa/qca8k.h | 2 -- - 2 files changed, 36 insertions(+), 17 deletions(-) - ---- a/drivers/net/dsa/qca8k.c -+++ b/drivers/net/dsa/qca8k.c -@@ -977,6 +977,22 @@ qca8k_setup_mac_pwr_sel(struct qca8k_pri - return ret; - } - -+static int qca8k_find_cpu_port(struct dsa_switch *ds) -+{ -+ struct qca8k_priv *priv = ds->priv; -+ -+ /* Find the connected cpu port. Valid port are 0 or 6 */ -+ if (dsa_is_cpu_port(ds, 0)) -+ return 0; -+ -+ dev_dbg(priv->dev, "port 0 is not the CPU port. Checking port 6"); -+ -+ if (dsa_is_cpu_port(ds, 6)) -+ return 6; -+ -+ return -EINVAL; -+} -+ - static int - qca8k_parse_port_config(struct qca8k_priv *priv) - { -@@ -1017,13 +1033,13 @@ static int - qca8k_setup(struct dsa_switch *ds) - { - struct qca8k_priv *priv = (struct qca8k_priv *)ds->priv; -- int ret, i; -+ int cpu_port, ret, i; - u32 mask; - -- /* Make sure that port 0 is the cpu port */ -- if (!dsa_is_cpu_port(ds, 0)) { -- dev_err(priv->dev, "port 0 is not the CPU port"); -- return -EINVAL; -+ cpu_port = qca8k_find_cpu_port(ds); -+ if (cpu_port < 0) { -+ dev_err(priv->dev, "No cpu port configured in both cpu port0 and port6"); -+ return cpu_port; - } - - /* Parse CPU port config to be later used in phy_link mac_config */ -@@ -1065,7 +1081,7 @@ qca8k_setup(struct dsa_switch *ds) - dev_warn(priv->dev, "mib init failed"); - - /* Enable QCA header mode on the cpu port */ -- ret = qca8k_write(priv, QCA8K_REG_PORT_HDR_CTRL(QCA8K_CPU_PORT), -+ ret = qca8k_write(priv, QCA8K_REG_PORT_HDR_CTRL(cpu_port), - QCA8K_PORT_HDR_CTRL_ALL << QCA8K_PORT_HDR_CTRL_TX_S | - QCA8K_PORT_HDR_CTRL_ALL << QCA8K_PORT_HDR_CTRL_RX_S); - if (ret) { -@@ -1087,10 +1103,10 @@ qca8k_setup(struct dsa_switch *ds) - - /* Forward all unknown frames to CPU port for Linux processing */ - ret = qca8k_write(priv, QCA8K_REG_GLOBAL_FW_CTRL1, -- BIT(0) << QCA8K_GLOBAL_FW_CTRL1_IGMP_DP_S | -- BIT(0) << QCA8K_GLOBAL_FW_CTRL1_BC_DP_S | -- BIT(0) << QCA8K_GLOBAL_FW_CTRL1_MC_DP_S | -- BIT(0) << QCA8K_GLOBAL_FW_CTRL1_UC_DP_S); -+ BIT(cpu_port) << QCA8K_GLOBAL_FW_CTRL1_IGMP_DP_S | -+ BIT(cpu_port) << QCA8K_GLOBAL_FW_CTRL1_BC_DP_S | -+ BIT(cpu_port) << QCA8K_GLOBAL_FW_CTRL1_MC_DP_S | -+ BIT(cpu_port) << QCA8K_GLOBAL_FW_CTRL1_UC_DP_S); - if (ret) - return ret; - -@@ -1098,7 +1114,7 @@ qca8k_setup(struct dsa_switch *ds) - for (i = 0; i < QCA8K_NUM_PORTS; i++) { - /* CPU port gets connected to all user ports of the switch */ - if (dsa_is_cpu_port(ds, i)) { -- ret = qca8k_rmw(priv, QCA8K_PORT_LOOKUP_CTRL(QCA8K_CPU_PORT), -+ ret = qca8k_rmw(priv, QCA8K_PORT_LOOKUP_CTRL(cpu_port), - QCA8K_PORT_LOOKUP_MEMBER, dsa_user_ports(ds)); - if (ret) - return ret; -@@ -1110,7 +1126,7 @@ qca8k_setup(struct dsa_switch *ds) - - ret = qca8k_rmw(priv, QCA8K_PORT_LOOKUP_CTRL(i), - QCA8K_PORT_LOOKUP_MEMBER, -- BIT(QCA8K_CPU_PORT)); -+ BIT(cpu_port)); - if (ret) - return ret; - -@@ -1616,9 +1632,12 @@ static int - qca8k_port_bridge_join(struct dsa_switch *ds, int port, struct net_device *br) - { - struct qca8k_priv *priv = (struct qca8k_priv *)ds->priv; -- int port_mask = BIT(QCA8K_CPU_PORT); -+ int port_mask, cpu_port; - int i, ret; - -+ cpu_port = dsa_to_port(ds, port)->cpu_dp->index; -+ port_mask = BIT(cpu_port); -+ - for (i = 1; i < QCA8K_NUM_PORTS; i++) { - if (dsa_to_port(ds, i)->bridge_dev != br) - continue; -@@ -1645,7 +1664,9 @@ static void - qca8k_port_bridge_leave(struct dsa_switch *ds, int port, struct net_device *br) - { - struct qca8k_priv *priv = (struct qca8k_priv *)ds->priv; -- int i; -+ int cpu_port, i; -+ -+ cpu_port = dsa_to_port(ds, port)->cpu_dp->index; - - for (i = 1; i < QCA8K_NUM_PORTS; i++) { - if (dsa_to_port(ds, i)->bridge_dev != br) -@@ -1662,7 +1683,7 @@ qca8k_port_bridge_leave(struct dsa_switc - * this port - */ - qca8k_rmw(priv, QCA8K_PORT_LOOKUP_CTRL(port), -- QCA8K_PORT_LOOKUP_MEMBER, BIT(QCA8K_CPU_PORT)); -+ QCA8K_PORT_LOOKUP_MEMBER, BIT(cpu_port)); - } - - static int ---- a/drivers/net/dsa/qca8k.h -+++ b/drivers/net/dsa/qca8k.h -@@ -24,8 +24,6 @@ - - #define QCA8K_NUM_FDB_RECORDS 2048 - --#define QCA8K_CPU_PORT 0 -- - #define QCA8K_PORT_VID_DEF 1 - - /* Global control registers */ diff --git a/root/target/linux/generic/backport-5.15/747-v5.16-06-net-dsa-qca8k-rework-rgmii-delay-logic-and-scan-for-.patch b/root/target/linux/generic/backport-5.15/747-v5.16-06-net-dsa-qca8k-rework-rgmii-delay-logic-and-scan-for-.patch deleted file mode 100755 index de201764..00000000 --- a/root/target/linux/generic/backport-5.15/747-v5.16-06-net-dsa-qca8k-rework-rgmii-delay-logic-and-scan-for-.patch +++ /dev/null @@ -1,295 +0,0 @@ -From 5654ec78dd7e64b1e04777b24007344329e6a63b Mon Sep 17 00:00:00 2001 -From: Ansuel Smith -Date: Thu, 14 Oct 2021 00:39:11 +0200 -Subject: net: dsa: qca8k: rework rgmii delay logic and scan for cpu port 6 - -Future proof commit. This switch have 2 CPU ports and one valid -configuration is first CPU port set to sgmii and second CPU port set to -rgmii-id. The current implementation detects delay only for CPU port -zero set to rgmii and doesn't count any delay set in a secondary CPU -port. Drop the current delay scan function and move it to the sgmii -parser function to generalize and implicitly add support for secondary -CPU port set to rgmii-id. Introduce new logic where delay is enabled -also with internal delay binding declared and rgmii set as PHY mode. - -Signed-off-by: Ansuel Smith -Signed-off-by: David S. Miller ---- - drivers/net/dsa/qca8k.c | 165 ++++++++++++++++++++++++------------------------ - drivers/net/dsa/qca8k.h | 10 ++- - 2 files changed, 89 insertions(+), 86 deletions(-) - ---- a/drivers/net/dsa/qca8k.c -+++ b/drivers/net/dsa/qca8k.c -@@ -889,68 +889,6 @@ qca8k_setup_mdio_bus(struct qca8k_priv * - } - - static int --qca8k_setup_of_rgmii_delay(struct qca8k_priv *priv) --{ -- struct device_node *port_dn; -- phy_interface_t mode; -- struct dsa_port *dp; -- u32 val; -- -- /* CPU port is already checked */ -- dp = dsa_to_port(priv->ds, 0); -- -- port_dn = dp->dn; -- -- /* Check if port 0 is set to the correct type */ -- of_get_phy_mode(port_dn, &mode); -- if (mode != PHY_INTERFACE_MODE_RGMII_ID && -- mode != PHY_INTERFACE_MODE_RGMII_RXID && -- mode != PHY_INTERFACE_MODE_RGMII_TXID) { -- return 0; -- } -- -- switch (mode) { -- case PHY_INTERFACE_MODE_RGMII_ID: -- case PHY_INTERFACE_MODE_RGMII_RXID: -- if (of_property_read_u32(port_dn, "rx-internal-delay-ps", &val)) -- val = 2; -- else -- /* Switch regs accept value in ns, convert ps to ns */ -- val = val / 1000; -- -- if (val > QCA8K_MAX_DELAY) { -- dev_err(priv->dev, "rgmii rx delay is limited to a max value of 3ns, setting to the max value"); -- val = 3; -- } -- -- priv->rgmii_rx_delay = val; -- /* Stop here if we need to check only for rx delay */ -- if (mode != PHY_INTERFACE_MODE_RGMII_ID) -- break; -- -- fallthrough; -- case PHY_INTERFACE_MODE_RGMII_TXID: -- if (of_property_read_u32(port_dn, "tx-internal-delay-ps", &val)) -- val = 1; -- else -- /* Switch regs accept value in ns, convert ps to ns */ -- val = val / 1000; -- -- if (val > QCA8K_MAX_DELAY) { -- dev_err(priv->dev, "rgmii tx delay is limited to a max value of 3ns, setting to the max value"); -- val = 3; -- } -- -- priv->rgmii_tx_delay = val; -- break; -- default: -- return 0; -- } -- -- return 0; --} -- --static int - qca8k_setup_mac_pwr_sel(struct qca8k_priv *priv) - { - u32 mask = 0; -@@ -996,19 +934,21 @@ static int qca8k_find_cpu_port(struct ds - static int - qca8k_parse_port_config(struct qca8k_priv *priv) - { -+ int port, cpu_port_index = 0, ret; - struct device_node *port_dn; - phy_interface_t mode; - struct dsa_port *dp; -- int port, ret; -+ u32 delay; - - /* We have 2 CPU port. Check them */ -- for (port = 0; port < QCA8K_NUM_PORTS; port++) { -+ for (port = 0; port < QCA8K_NUM_PORTS && cpu_port_index < QCA8K_NUM_CPU_PORTS; port++) { - /* Skip every other port */ - if (port != 0 && port != 6) - continue; - - dp = dsa_to_port(priv->ds, port); - port_dn = dp->dn; -+ cpu_port_index++; - - if (!of_device_is_available(port_dn)) - continue; -@@ -1017,12 +957,54 @@ qca8k_parse_port_config(struct qca8k_pri - if (ret) - continue; - -- if (mode == PHY_INTERFACE_MODE_SGMII) { -+ switch (mode) { -+ case PHY_INTERFACE_MODE_RGMII: -+ case PHY_INTERFACE_MODE_RGMII_ID: -+ case PHY_INTERFACE_MODE_RGMII_TXID: -+ case PHY_INTERFACE_MODE_RGMII_RXID: -+ delay = 0; -+ -+ if (!of_property_read_u32(port_dn, "tx-internal-delay-ps", &delay)) -+ /* Switch regs accept value in ns, convert ps to ns */ -+ delay = delay / 1000; -+ else if (mode == PHY_INTERFACE_MODE_RGMII_ID || -+ mode == PHY_INTERFACE_MODE_RGMII_TXID) -+ delay = 1; -+ -+ if (delay > QCA8K_MAX_DELAY) { -+ dev_err(priv->dev, "rgmii tx delay is limited to a max value of 3ns, setting to the max value"); -+ delay = 3; -+ } -+ -+ priv->rgmii_tx_delay[cpu_port_index] = delay; -+ -+ delay = 0; -+ -+ if (!of_property_read_u32(port_dn, "rx-internal-delay-ps", &delay)) -+ /* Switch regs accept value in ns, convert ps to ns */ -+ delay = delay / 1000; -+ else if (mode == PHY_INTERFACE_MODE_RGMII_ID || -+ mode == PHY_INTERFACE_MODE_RGMII_RXID) -+ delay = 2; -+ -+ if (delay > QCA8K_MAX_DELAY) { -+ dev_err(priv->dev, "rgmii rx delay is limited to a max value of 3ns, setting to the max value"); -+ delay = 3; -+ } -+ -+ priv->rgmii_rx_delay[cpu_port_index] = delay; -+ -+ break; -+ case PHY_INTERFACE_MODE_SGMII: - if (of_property_read_bool(port_dn, "qca,sgmii-txclk-falling-edge")) - priv->sgmii_tx_clk_falling_edge = true; - - if (of_property_read_bool(port_dn, "qca,sgmii-rxclk-falling-edge")) - priv->sgmii_rx_clk_falling_edge = true; -+ -+ break; -+ default: -+ continue; - } - } - -@@ -1059,10 +1041,6 @@ qca8k_setup(struct dsa_switch *ds) - if (ret) - return ret; - -- ret = qca8k_setup_of_rgmii_delay(priv); -- if (ret) -- return ret; -- - ret = qca8k_setup_mac_pwr_sel(priv); - if (ret) - return ret; -@@ -1229,8 +1207,8 @@ qca8k_phylink_mac_config(struct dsa_swit - const struct phylink_link_state *state) - { - struct qca8k_priv *priv = ds->priv; -- u32 reg, val; -- int ret; -+ int cpu_port_index, ret; -+ u32 reg, val, delay; - - switch (port) { - case 0: /* 1st CPU port */ -@@ -1242,6 +1220,7 @@ qca8k_phylink_mac_config(struct dsa_swit - return; - - reg = QCA8K_REG_PORT0_PAD_CTRL; -+ cpu_port_index = QCA8K_CPU_PORT0; - break; - case 1: - case 2: -@@ -1260,6 +1239,7 @@ qca8k_phylink_mac_config(struct dsa_swit - return; - - reg = QCA8K_REG_PORT6_PAD_CTRL; -+ cpu_port_index = QCA8K_CPU_PORT6; - break; - default: - dev_err(ds->dev, "%s: unsupported port: %i\n", __func__, port); -@@ -1274,23 +1254,40 @@ qca8k_phylink_mac_config(struct dsa_swit - - switch (state->interface) { - case PHY_INTERFACE_MODE_RGMII: -- /* RGMII mode means no delay so don't enable the delay */ -- qca8k_write(priv, reg, QCA8K_PORT_PAD_RGMII_EN); -- break; - case PHY_INTERFACE_MODE_RGMII_ID: - case PHY_INTERFACE_MODE_RGMII_TXID: - case PHY_INTERFACE_MODE_RGMII_RXID: -- /* RGMII_ID needs internal delay. This is enabled through -- * PORT5_PAD_CTRL for all ports, rather than individual port -- * registers -+ val = QCA8K_PORT_PAD_RGMII_EN; -+ -+ /* Delay can be declared in 3 different way. -+ * Mode to rgmii and internal-delay standard binding defined -+ * rgmii-id or rgmii-tx/rx phy mode set. -+ * The parse logic set a delay different than 0 only when one -+ * of the 3 different way is used. In all other case delay is -+ * not enabled. With ID or TX/RXID delay is enabled and set -+ * to the default and recommended value. -+ */ -+ if (priv->rgmii_tx_delay[cpu_port_index]) { -+ delay = priv->rgmii_tx_delay[cpu_port_index]; -+ -+ val |= QCA8K_PORT_PAD_RGMII_TX_DELAY(delay) | -+ QCA8K_PORT_PAD_RGMII_TX_DELAY_EN; -+ } -+ -+ if (priv->rgmii_rx_delay[cpu_port_index]) { -+ delay = priv->rgmii_rx_delay[cpu_port_index]; -+ -+ val |= QCA8K_PORT_PAD_RGMII_RX_DELAY(delay) | -+ QCA8K_PORT_PAD_RGMII_RX_DELAY_EN; -+ } -+ -+ /* Set RGMII delay based on the selected values */ -+ qca8k_write(priv, reg, val); -+ -+ /* QCA8337 requires to set rgmii rx delay for all ports. -+ * This is enabled through PORT5_PAD_CTRL for all ports, -+ * rather than individual port registers. - */ -- qca8k_write(priv, reg, -- QCA8K_PORT_PAD_RGMII_EN | -- QCA8K_PORT_PAD_RGMII_TX_DELAY(priv->rgmii_tx_delay) | -- QCA8K_PORT_PAD_RGMII_RX_DELAY(priv->rgmii_rx_delay) | -- QCA8K_PORT_PAD_RGMII_TX_DELAY_EN | -- QCA8K_PORT_PAD_RGMII_RX_DELAY_EN); -- /* QCA8337 requires to set rgmii rx delay */ - if (priv->switch_id == QCA8K_ID_QCA8337) - qca8k_write(priv, QCA8K_REG_PORT5_PAD_CTRL, - QCA8K_PORT_PAD_RGMII_RX_DELAY_EN); ---- a/drivers/net/dsa/qca8k.h -+++ b/drivers/net/dsa/qca8k.h -@@ -13,6 +13,7 @@ - #include - - #define QCA8K_NUM_PORTS 7 -+#define QCA8K_NUM_CPU_PORTS 2 - #define QCA8K_MAX_MTU 9000 - - #define PHY_ID_QCA8327 0x004dd034 -@@ -255,13 +256,18 @@ struct qca8k_match_data { - u8 id; - }; - -+enum { -+ QCA8K_CPU_PORT0, -+ QCA8K_CPU_PORT6, -+}; -+ - struct qca8k_priv { - u8 switch_id; - u8 switch_revision; -- u8 rgmii_tx_delay; -- u8 rgmii_rx_delay; - bool sgmii_rx_clk_falling_edge; - bool sgmii_tx_clk_falling_edge; -+ u8 rgmii_rx_delay[QCA8K_NUM_CPU_PORTS]; /* 0: CPU port0, 1: CPU port6 */ -+ u8 rgmii_tx_delay[QCA8K_NUM_CPU_PORTS]; /* 0: CPU port0, 1: CPU port6 */ - bool legacy_phy_port_mapping; - struct regmap *regmap; - struct mii_bus *bus; diff --git a/root/target/linux/generic/backport-5.15/747-v5.16-07-dt-bindings-net-dsa-qca8k-Document-qca-sgmii-enable-.patch b/root/target/linux/generic/backport-5.15/747-v5.16-07-dt-bindings-net-dsa-qca8k-Document-qca-sgmii-enable-.patch deleted file mode 100755 index 8abd264e..00000000 --- a/root/target/linux/generic/backport-5.15/747-v5.16-07-dt-bindings-net-dsa-qca8k-Document-qca-sgmii-enable-.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 13ad5ccc093ff448b99ac7e138e91e78796adb48 Mon Sep 17 00:00:00 2001 -From: Ansuel Smith -Date: Thu, 14 Oct 2021 00:39:12 +0200 -Subject: dt-bindings: net: dsa: qca8k: Document qca,sgmii-enable-pll - -Document qca,sgmii-enable-pll binding used in the CPU nodes to -enable SGMII PLL on MAC config. - -Signed-off-by: Ansuel Smith -Signed-off-by: David S. Miller ---- - Documentation/devicetree/bindings/net/dsa/qca8k.txt | 10 ++++++++++ - 1 file changed, 10 insertions(+) - ---- a/Documentation/devicetree/bindings/net/dsa/qca8k.txt -+++ b/Documentation/devicetree/bindings/net/dsa/qca8k.txt -@@ -45,6 +45,16 @@ A CPU port node has the following option - Mostly used in qca8327 with CPU port 0 set to - sgmii. - - qca,sgmii-txclk-falling-edge: Set the transmit clock phase to falling edge. -+- qca,sgmii-enable-pll : For SGMII CPU port, explicitly enable PLL, TX and RX -+ chain along with Signal Detection. -+ This should NOT be enabled for qca8327. If enabled with -+ qca8327 the sgmii port won't correctly init and an err -+ is printed. -+ This can be required for qca8337 switch with revision 2. -+ A warning is displayed when used with revision greater -+ 2. -+ With CPU port set to sgmii and qca8337 it is advised -+ to set this unless a communication problem is observed. - - For QCA8K the 'fixed-link' sub-node supports only the following properties: - diff --git a/root/target/linux/generic/backport-5.15/747-v5.16-08-net-dsa-qca8k-add-explicit-SGMII-PLL-enable.patch b/root/target/linux/generic/backport-5.15/747-v5.16-08-net-dsa-qca8k-add-explicit-SGMII-PLL-enable.patch deleted file mode 100755 index 2b5a84a1..00000000 --- a/root/target/linux/generic/backport-5.15/747-v5.16-08-net-dsa-qca8k-add-explicit-SGMII-PLL-enable.patch +++ /dev/null @@ -1,65 +0,0 @@ -From bbc4799e8bb6c397e3b3fec13de68e179f5db9ff Mon Sep 17 00:00:00 2001 -From: Ansuel Smith -Date: Thu, 14 Oct 2021 00:39:13 +0200 -Subject: net: dsa: qca8k: add explicit SGMII PLL enable - -Support enabling PLL on the SGMII CPU port. Some device require this -special configuration or no traffic is transmitted and the switch -doesn't work at all. A dedicated binding is added to the CPU node -port to apply the correct reg on mac config. -Fail to correctly configure sgmii with qca8327 switch and warn if pll is -used on qca8337 with a revision greater than 1. - -Signed-off-by: Ansuel Smith -Reviewed-by: Florian Fainelli -Signed-off-by: David S. Miller ---- - drivers/net/dsa/qca8k.c | 19 +++++++++++++++++-- - drivers/net/dsa/qca8k.h | 1 + - 2 files changed, 18 insertions(+), 2 deletions(-) - ---- a/drivers/net/dsa/qca8k.c -+++ b/drivers/net/dsa/qca8k.c -@@ -1002,6 +1002,18 @@ qca8k_parse_port_config(struct qca8k_pri - if (of_property_read_bool(port_dn, "qca,sgmii-rxclk-falling-edge")) - priv->sgmii_rx_clk_falling_edge = true; - -+ if (of_property_read_bool(port_dn, "qca,sgmii-enable-pll")) { -+ priv->sgmii_enable_pll = true; -+ -+ if (priv->switch_id == QCA8K_ID_QCA8327) { -+ dev_err(priv->dev, "SGMII PLL should NOT be enabled for qca8327. Aborting enabling"); -+ priv->sgmii_enable_pll = false; -+ } -+ -+ if (priv->switch_revision < 2) -+ dev_warn(priv->dev, "SGMII PLL should NOT be enabled for qca8337 with revision 2 or more."); -+ } -+ - break; - default: - continue; -@@ -1312,8 +1324,11 @@ qca8k_phylink_mac_config(struct dsa_swit - if (ret) - return; - -- val |= QCA8K_SGMII_EN_PLL | QCA8K_SGMII_EN_RX | -- QCA8K_SGMII_EN_TX | QCA8K_SGMII_EN_SD; -+ val |= QCA8K_SGMII_EN_SD; -+ -+ if (priv->sgmii_enable_pll) -+ val |= QCA8K_SGMII_EN_PLL | QCA8K_SGMII_EN_RX | -+ QCA8K_SGMII_EN_TX; - - if (dsa_is_cpu_port(ds, port)) { - /* CPU port, we're talking to the CPU MAC, be a PHY */ ---- a/drivers/net/dsa/qca8k.h -+++ b/drivers/net/dsa/qca8k.h -@@ -266,6 +266,7 @@ struct qca8k_priv { - u8 switch_revision; - bool sgmii_rx_clk_falling_edge; - bool sgmii_tx_clk_falling_edge; -+ bool sgmii_enable_pll; - u8 rgmii_rx_delay[QCA8K_NUM_CPU_PORTS]; /* 0: CPU port0, 1: CPU port6 */ - u8 rgmii_tx_delay[QCA8K_NUM_CPU_PORTS]; /* 0: CPU port0, 1: CPU port6 */ - bool legacy_phy_port_mapping; diff --git a/root/target/linux/generic/backport-5.15/747-v5.16-09-dt-bindings-net-dsa-qca8k-Document-qca-led-open-drai.patch b/root/target/linux/generic/backport-5.15/747-v5.16-09-dt-bindings-net-dsa-qca8k-Document-qca-led-open-drai.patch deleted file mode 100755 index 38dc954e..00000000 --- a/root/target/linux/generic/backport-5.15/747-v5.16-09-dt-bindings-net-dsa-qca8k-Document-qca-led-open-drai.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 924087c5c3d41553700b0eb83ca2a53b91643dca Mon Sep 17 00:00:00 2001 -From: Ansuel Smith -Date: Thu, 14 Oct 2021 00:39:14 +0200 -Subject: dt-bindings: net: dsa: qca8k: Document qca,led-open-drain binding - -Document new binding qca,ignore-power-on-sel used to ignore -power on strapping and use sw regs instead. -Document qca,led-open.drain to set led to open drain mode, the -qca,ignore-power-on-sel is mandatory with this enabled or an error will -be reported. - -Signed-off-by: Ansuel Smith -Signed-off-by: David S. Miller ---- - Documentation/devicetree/bindings/net/dsa/qca8k.txt | 11 +++++++++++ - 1 file changed, 11 insertions(+) - ---- a/Documentation/devicetree/bindings/net/dsa/qca8k.txt -+++ b/Documentation/devicetree/bindings/net/dsa/qca8k.txt -@@ -13,6 +13,17 @@ Required properties: - Optional properties: - - - reset-gpios: GPIO to be used to reset the whole device -+- qca,ignore-power-on-sel: Ignore power on pin strapping to configure led open -+ drain or eeprom presence. This is needed for broken -+ devices that have wrong configuration or when the oem -+ decided to not use pin strapping and fallback to sw -+ regs. -+- qca,led-open-drain: Set leds to open-drain mode. This requires the -+ qca,ignore-power-on-sel to be set or the driver will fail -+ to probe. This is needed if the oem doesn't use pin -+ strapping to set this mode and prefers to set it using sw -+ regs. The pin strapping related to led open drain mode is -+ the pin B68 for QCA832x and B49 for QCA833x - - Subnodes: - diff --git a/root/target/linux/generic/backport-5.15/747-v5.16-10-net-dsa-qca8k-add-support-for-pws-config-reg.patch b/root/target/linux/generic/backport-5.15/747-v5.16-10-net-dsa-qca8k-add-support-for-pws-config-reg.patch deleted file mode 100755 index aa5d92a4..00000000 --- a/root/target/linux/generic/backport-5.15/747-v5.16-10-net-dsa-qca8k-add-support-for-pws-config-reg.patch +++ /dev/null @@ -1,92 +0,0 @@ -From 362bb238d8bf1470424214a8a5968d9c6cce68fa Mon Sep 17 00:00:00 2001 -From: Ansuel Smith -Date: Thu, 14 Oct 2021 00:39:15 +0200 -Subject: net: dsa: qca8k: add support for pws config reg - -Some qca8327 switch require to force the ignore of power on sel -strapping. Some switch require to set the led open drain mode in regs -instead of using strapping. While most of the device implements this -using the correct way using pin strapping, there are still some broken -device that require to be set using sw regs. -Introduce a new binding and support these special configuration. -As led open drain require to ignore pin strapping to work, the probe -fails with EINVAL error with incorrect configuration. - -Signed-off-by: Ansuel Smith -Reviewed-by: Florian Fainelli -Signed-off-by: David S. Miller ---- - drivers/net/dsa/qca8k.c | 39 +++++++++++++++++++++++++++++++++++++++ - drivers/net/dsa/qca8k.h | 6 ++++++ - 2 files changed, 45 insertions(+) - ---- a/drivers/net/dsa/qca8k.c -+++ b/drivers/net/dsa/qca8k.c -@@ -932,6 +932,41 @@ static int qca8k_find_cpu_port(struct ds - } - - static int -+qca8k_setup_of_pws_reg(struct qca8k_priv *priv) -+{ -+ struct device_node *node = priv->dev->of_node; -+ u32 val = 0; -+ int ret; -+ -+ /* QCA8327 require to set to the correct mode. -+ * His bigger brother QCA8328 have the 172 pin layout. -+ * Should be applied by default but we set this just to make sure. -+ */ -+ if (priv->switch_id == QCA8K_ID_QCA8327) { -+ ret = qca8k_rmw(priv, QCA8K_REG_PWS, QCA8327_PWS_PACKAGE148_EN, -+ QCA8327_PWS_PACKAGE148_EN); -+ if (ret) -+ return ret; -+ } -+ -+ if (of_property_read_bool(node, "qca,ignore-power-on-sel")) -+ val |= QCA8K_PWS_POWER_ON_SEL; -+ -+ if (of_property_read_bool(node, "qca,led-open-drain")) { -+ if (!(val & QCA8K_PWS_POWER_ON_SEL)) { -+ dev_err(priv->dev, "qca,led-open-drain require qca,ignore-power-on-sel to be set."); -+ return -EINVAL; -+ } -+ -+ val |= QCA8K_PWS_LED_OPEN_EN_CSR; -+ } -+ -+ return qca8k_rmw(priv, QCA8K_REG_PWS, -+ QCA8K_PWS_LED_OPEN_EN_CSR | QCA8K_PWS_POWER_ON_SEL, -+ val); -+} -+ -+static int - qca8k_parse_port_config(struct qca8k_priv *priv) - { - int port, cpu_port_index = 0, ret; -@@ -1053,6 +1088,10 @@ qca8k_setup(struct dsa_switch *ds) - if (ret) - return ret; - -+ ret = qca8k_setup_of_pws_reg(priv); -+ if (ret) -+ return ret; -+ - ret = qca8k_setup_mac_pwr_sel(priv); - if (ret) - return ret; ---- a/drivers/net/dsa/qca8k.h -+++ b/drivers/net/dsa/qca8k.h -@@ -46,6 +46,12 @@ - #define QCA8K_MAX_DELAY 3 - #define QCA8K_PORT_PAD_SGMII_EN BIT(7) - #define QCA8K_REG_PWS 0x010 -+#define QCA8K_PWS_POWER_ON_SEL BIT(31) -+/* This reg is only valid for QCA832x and toggle the package -+ * type from 176 pin (by default) to 148 pin used on QCA8327 -+ */ -+#define QCA8327_PWS_PACKAGE148_EN BIT(30) -+#define QCA8K_PWS_LED_OPEN_EN_CSR BIT(24) - #define QCA8K_PWS_SERDES_AEN_DIS BIT(7) - #define QCA8K_REG_MODULE_EN 0x030 - #define QCA8K_MODULE_EN_MIB BIT(0) diff --git a/root/target/linux/generic/backport-5.15/747-v5.16-11-dt-bindings-net-dsa-qca8k-document-support-for-qca83.patch b/root/target/linux/generic/backport-5.15/747-v5.16-11-dt-bindings-net-dsa-qca8k-document-support-for-qca83.patch deleted file mode 100755 index 1bfb00c5..00000000 --- a/root/target/linux/generic/backport-5.15/747-v5.16-11-dt-bindings-net-dsa-qca8k-document-support-for-qca83.patch +++ /dev/null @@ -1,32 +0,0 @@ -From ed7988d77fbfb79366b68f9e7fa60a6080da23d4 Mon Sep 17 00:00:00 2001 -From: Ansuel Smith -Date: Thu, 14 Oct 2021 00:39:16 +0200 -Subject: dt-bindings: net: dsa: qca8k: document support for qca8328 - -QCA8328 is the bigger brother of qca8327. Document the new compatible -binding and add some information to understand the various switch -compatible. - -Signed-off-by: Ansuel Smith -Reviewed-by: Florian Fainelli -Signed-off-by: David S. Miller ---- - Documentation/devicetree/bindings/net/dsa/qca8k.txt | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) - ---- a/Documentation/devicetree/bindings/net/dsa/qca8k.txt -+++ b/Documentation/devicetree/bindings/net/dsa/qca8k.txt -@@ -3,9 +3,10 @@ - Required properties: - - - compatible: should be one of: -- "qca,qca8327" -- "qca,qca8334" -- "qca,qca8337" -+ "qca,qca8328": referenced as AR8328(N)-AK1(A/B) QFN 176 pin package -+ "qca,qca8327": referenced as AR8327(N)-AL1A DR-QFN 148 pin package -+ "qca,qca8334": referenced as QCA8334-AL3C QFN 88 pin package -+ "qca,qca8337": referenced as QCA8337N-AL3(B/C) DR-QFN 148 pin package - - - #size-cells: must be 0 - - #address-cells: must be 1 diff --git a/root/target/linux/generic/backport-5.15/747-v5.16-12-net-dsa-qca8k-add-support-for-QCA8328.patch b/root/target/linux/generic/backport-5.15/747-v5.16-12-net-dsa-qca8k-add-support-for-QCA8328.patch deleted file mode 100755 index 70f227fb..00000000 --- a/root/target/linux/generic/backport-5.15/747-v5.16-12-net-dsa-qca8k-add-support-for-QCA8328.patch +++ /dev/null @@ -1,78 +0,0 @@ -From f477d1c8bdbef4f400718238e350f16f521d2a3e Mon Sep 17 00:00:00 2001 -From: Ansuel Smith -Date: Thu, 14 Oct 2021 00:39:17 +0200 -Subject: net: dsa: qca8k: add support for QCA8328 - -QCA8328 switch is the bigger brother of the qca8327. Same regs different -chip. Change the function to set the correct pin layout and introduce a -new match_data to differentiate the 2 switch as they have the same ID -and their internal PHY have the same ID. - -Signed-off-by: Ansuel Smith -Reviewed-by: Florian Fainelli -Signed-off-by: David S. Miller ---- - drivers/net/dsa/qca8k.c | 19 ++++++++++++++++--- - drivers/net/dsa/qca8k.h | 1 + - 2 files changed, 17 insertions(+), 3 deletions(-) - ---- a/drivers/net/dsa/qca8k.c -+++ b/drivers/net/dsa/qca8k.c -@@ -935,6 +935,7 @@ static int - qca8k_setup_of_pws_reg(struct qca8k_priv *priv) - { - struct device_node *node = priv->dev->of_node; -+ const struct qca8k_match_data *data; - u32 val = 0; - int ret; - -@@ -943,8 +944,14 @@ qca8k_setup_of_pws_reg(struct qca8k_priv - * Should be applied by default but we set this just to make sure. - */ - if (priv->switch_id == QCA8K_ID_QCA8327) { -+ data = of_device_get_match_data(priv->dev); -+ -+ /* Set the correct package of 148 pin for QCA8327 */ -+ if (data->reduced_package) -+ val |= QCA8327_PWS_PACKAGE148_EN; -+ - ret = qca8k_rmw(priv, QCA8K_REG_PWS, QCA8327_PWS_PACKAGE148_EN, -- QCA8327_PWS_PACKAGE148_EN); -+ val); - if (ret) - return ret; - } -@@ -2105,7 +2112,12 @@ static int qca8k_resume(struct device *d - static SIMPLE_DEV_PM_OPS(qca8k_pm_ops, - qca8k_suspend, qca8k_resume); - --static const struct qca8k_match_data qca832x = { -+static const struct qca8k_match_data qca8327 = { -+ .id = QCA8K_ID_QCA8327, -+ .reduced_package = true, -+}; -+ -+static const struct qca8k_match_data qca8328 = { - .id = QCA8K_ID_QCA8327, - }; - -@@ -2114,7 +2126,8 @@ static const struct qca8k_match_data qca - }; - - static const struct of_device_id qca8k_of_match[] = { -- { .compatible = "qca,qca8327", .data = &qca832x }, -+ { .compatible = "qca,qca8327", .data = &qca8327 }, -+ { .compatible = "qca,qca8328", .data = &qca8328 }, - { .compatible = "qca,qca8334", .data = &qca833x }, - { .compatible = "qca,qca8337", .data = &qca833x }, - { /* sentinel */ }, ---- a/drivers/net/dsa/qca8k.h -+++ b/drivers/net/dsa/qca8k.h -@@ -260,6 +260,7 @@ struct ar8xxx_port_status { - - struct qca8k_match_data { - u8 id; -+ bool reduced_package; - }; - - enum { diff --git a/root/target/linux/generic/backport-5.15/747-v5.16-13-net-dsa-qca8k-set-internal-delay-also-for-sgmii.patch b/root/target/linux/generic/backport-5.15/747-v5.16-13-net-dsa-qca8k-set-internal-delay-also-for-sgmii.patch deleted file mode 100755 index 27f94dca..00000000 --- a/root/target/linux/generic/backport-5.15/747-v5.16-13-net-dsa-qca8k-set-internal-delay-also-for-sgmii.patch +++ /dev/null @@ -1,159 +0,0 @@ -From cef08115846e581f80ff99abf7bf218da1840616 Mon Sep 17 00:00:00 2001 -From: Ansuel Smith -Date: Thu, 14 Oct 2021 00:39:18 +0200 -Subject: net: dsa: qca8k: set internal delay also for sgmii - -QCA original code report port instability and sa that SGMII also require -to set internal delay. Generalize the rgmii delay function and apply the -advised value if they are not defined in DT. - -Signed-off-by: Ansuel Smith -Signed-off-by: David S. Miller ---- - drivers/net/dsa/qca8k.c | 88 +++++++++++++++++++++++++++++++++---------------- - drivers/net/dsa/qca8k.h | 2 ++ - 2 files changed, 62 insertions(+), 28 deletions(-) - ---- a/drivers/net/dsa/qca8k.c -+++ b/drivers/net/dsa/qca8k.c -@@ -1004,6 +1004,7 @@ qca8k_parse_port_config(struct qca8k_pri - case PHY_INTERFACE_MODE_RGMII_ID: - case PHY_INTERFACE_MODE_RGMII_TXID: - case PHY_INTERFACE_MODE_RGMII_RXID: -+ case PHY_INTERFACE_MODE_SGMII: - delay = 0; - - if (!of_property_read_u32(port_dn, "tx-internal-delay-ps", &delay)) -@@ -1036,8 +1037,13 @@ qca8k_parse_port_config(struct qca8k_pri - - priv->rgmii_rx_delay[cpu_port_index] = delay; - -- break; -- case PHY_INTERFACE_MODE_SGMII: -+ /* Skip sgmii parsing for rgmii* mode */ -+ if (mode == PHY_INTERFACE_MODE_RGMII || -+ mode == PHY_INTERFACE_MODE_RGMII_ID || -+ mode == PHY_INTERFACE_MODE_RGMII_TXID || -+ mode == PHY_INTERFACE_MODE_RGMII_RXID) -+ break; -+ - if (of_property_read_bool(port_dn, "qca,sgmii-txclk-falling-edge")) - priv->sgmii_tx_clk_falling_edge = true; - -@@ -1261,12 +1267,53 @@ qca8k_setup(struct dsa_switch *ds) - } - - static void -+qca8k_mac_config_setup_internal_delay(struct qca8k_priv *priv, int cpu_port_index, -+ u32 reg) -+{ -+ u32 delay, val = 0; -+ int ret; -+ -+ /* Delay can be declared in 3 different way. -+ * Mode to rgmii and internal-delay standard binding defined -+ * rgmii-id or rgmii-tx/rx phy mode set. -+ * The parse logic set a delay different than 0 only when one -+ * of the 3 different way is used. In all other case delay is -+ * not enabled. With ID or TX/RXID delay is enabled and set -+ * to the default and recommended value. -+ */ -+ if (priv->rgmii_tx_delay[cpu_port_index]) { -+ delay = priv->rgmii_tx_delay[cpu_port_index]; -+ -+ val |= QCA8K_PORT_PAD_RGMII_TX_DELAY(delay) | -+ QCA8K_PORT_PAD_RGMII_TX_DELAY_EN; -+ } -+ -+ if (priv->rgmii_rx_delay[cpu_port_index]) { -+ delay = priv->rgmii_rx_delay[cpu_port_index]; -+ -+ val |= QCA8K_PORT_PAD_RGMII_RX_DELAY(delay) | -+ QCA8K_PORT_PAD_RGMII_RX_DELAY_EN; -+ } -+ -+ /* Set RGMII delay based on the selected values */ -+ ret = qca8k_rmw(priv, reg, -+ QCA8K_PORT_PAD_RGMII_TX_DELAY_MASK | -+ QCA8K_PORT_PAD_RGMII_RX_DELAY_MASK | -+ QCA8K_PORT_PAD_RGMII_TX_DELAY_EN | -+ QCA8K_PORT_PAD_RGMII_RX_DELAY_EN, -+ val); -+ if (ret) -+ dev_err(priv->dev, "Failed to set internal delay for CPU port%d", -+ cpu_port_index == QCA8K_CPU_PORT0 ? 0 : 6); -+} -+ -+static void - qca8k_phylink_mac_config(struct dsa_switch *ds, int port, unsigned int mode, - const struct phylink_link_state *state) - { - struct qca8k_priv *priv = ds->priv; - int cpu_port_index, ret; -- u32 reg, val, delay; -+ u32 reg, val; - - switch (port) { - case 0: /* 1st CPU port */ -@@ -1315,32 +1362,10 @@ qca8k_phylink_mac_config(struct dsa_swit - case PHY_INTERFACE_MODE_RGMII_ID: - case PHY_INTERFACE_MODE_RGMII_TXID: - case PHY_INTERFACE_MODE_RGMII_RXID: -- val = QCA8K_PORT_PAD_RGMII_EN; -- -- /* Delay can be declared in 3 different way. -- * Mode to rgmii and internal-delay standard binding defined -- * rgmii-id or rgmii-tx/rx phy mode set. -- * The parse logic set a delay different than 0 only when one -- * of the 3 different way is used. In all other case delay is -- * not enabled. With ID or TX/RXID delay is enabled and set -- * to the default and recommended value. -- */ -- if (priv->rgmii_tx_delay[cpu_port_index]) { -- delay = priv->rgmii_tx_delay[cpu_port_index]; -- -- val |= QCA8K_PORT_PAD_RGMII_TX_DELAY(delay) | -- QCA8K_PORT_PAD_RGMII_TX_DELAY_EN; -- } -- -- if (priv->rgmii_rx_delay[cpu_port_index]) { -- delay = priv->rgmii_rx_delay[cpu_port_index]; -- -- val |= QCA8K_PORT_PAD_RGMII_RX_DELAY(delay) | -- QCA8K_PORT_PAD_RGMII_RX_DELAY_EN; -- } -+ qca8k_write(priv, reg, QCA8K_PORT_PAD_RGMII_EN); - -- /* Set RGMII delay based on the selected values */ -- qca8k_write(priv, reg, val); -+ /* Configure rgmii delay */ -+ qca8k_mac_config_setup_internal_delay(priv, cpu_port_index, reg); - - /* QCA8337 requires to set rgmii rx delay for all ports. - * This is enabled through PORT5_PAD_CTRL for all ports, -@@ -1411,6 +1436,13 @@ qca8k_phylink_mac_config(struct dsa_swit - QCA8K_PORT0_PAD_SGMII_RXCLK_FALLING_EDGE | - QCA8K_PORT0_PAD_SGMII_TXCLK_FALLING_EDGE, - val); -+ -+ /* From original code is reported port instability as SGMII also -+ * require delay set. Apply advised values here or take them from DT. -+ */ -+ if (state->interface == PHY_INTERFACE_MODE_SGMII) -+ qca8k_mac_config_setup_internal_delay(priv, cpu_port_index, reg); -+ - break; - default: - dev_err(ds->dev, "xMII mode %s not supported for port %d\n", ---- a/drivers/net/dsa/qca8k.h -+++ b/drivers/net/dsa/qca8k.h -@@ -39,7 +39,9 @@ - #define QCA8K_REG_PORT5_PAD_CTRL 0x008 - #define QCA8K_REG_PORT6_PAD_CTRL 0x00c - #define QCA8K_PORT_PAD_RGMII_EN BIT(26) -+#define QCA8K_PORT_PAD_RGMII_TX_DELAY_MASK GENMASK(23, 22) - #define QCA8K_PORT_PAD_RGMII_TX_DELAY(x) ((x) << 22) -+#define QCA8K_PORT_PAD_RGMII_RX_DELAY_MASK GENMASK(21, 20) - #define QCA8K_PORT_PAD_RGMII_RX_DELAY(x) ((x) << 20) - #define QCA8K_PORT_PAD_RGMII_TX_DELAY_EN BIT(25) - #define QCA8K_PORT_PAD_RGMII_RX_DELAY_EN BIT(24) diff --git a/root/target/linux/generic/backport-5.15/747-v5.16-14-net-dsa-qca8k-move-port-config-to-dedicated-struct.patch b/root/target/linux/generic/backport-5.15/747-v5.16-14-net-dsa-qca8k-move-port-config-to-dedicated-struct.patch deleted file mode 100755 index b991798c..00000000 --- a/root/target/linux/generic/backport-5.15/747-v5.16-14-net-dsa-qca8k-move-port-config-to-dedicated-struct.patch +++ /dev/null @@ -1,124 +0,0 @@ -From fd0bb28c547f7c8affb1691128cece38f5b626a1 Mon Sep 17 00:00:00 2001 -From: Ansuel Smith -Date: Thu, 14 Oct 2021 00:39:19 +0200 -Subject: net: dsa: qca8k: move port config to dedicated struct - -Move ports related config to dedicated struct to keep things organized. - -Signed-off-by: Ansuel Smith -Reviewed-by: Florian Fainelli -Signed-off-by: David S. Miller ---- - drivers/net/dsa/qca8k.c | 26 +++++++++++++------------- - drivers/net/dsa/qca8k.h | 10 +++++++--- - 2 files changed, 20 insertions(+), 16 deletions(-) - ---- a/drivers/net/dsa/qca8k.c -+++ b/drivers/net/dsa/qca8k.c -@@ -1019,7 +1019,7 @@ qca8k_parse_port_config(struct qca8k_pri - delay = 3; - } - -- priv->rgmii_tx_delay[cpu_port_index] = delay; -+ priv->ports_config.rgmii_tx_delay[cpu_port_index] = delay; - - delay = 0; - -@@ -1035,7 +1035,7 @@ qca8k_parse_port_config(struct qca8k_pri - delay = 3; - } - -- priv->rgmii_rx_delay[cpu_port_index] = delay; -+ priv->ports_config.rgmii_rx_delay[cpu_port_index] = delay; - - /* Skip sgmii parsing for rgmii* mode */ - if (mode == PHY_INTERFACE_MODE_RGMII || -@@ -1045,17 +1045,17 @@ qca8k_parse_port_config(struct qca8k_pri - break; - - if (of_property_read_bool(port_dn, "qca,sgmii-txclk-falling-edge")) -- priv->sgmii_tx_clk_falling_edge = true; -+ priv->ports_config.sgmii_tx_clk_falling_edge = true; - - if (of_property_read_bool(port_dn, "qca,sgmii-rxclk-falling-edge")) -- priv->sgmii_rx_clk_falling_edge = true; -+ priv->ports_config.sgmii_rx_clk_falling_edge = true; - - if (of_property_read_bool(port_dn, "qca,sgmii-enable-pll")) { -- priv->sgmii_enable_pll = true; -+ priv->ports_config.sgmii_enable_pll = true; - - if (priv->switch_id == QCA8K_ID_QCA8327) { - dev_err(priv->dev, "SGMII PLL should NOT be enabled for qca8327. Aborting enabling"); -- priv->sgmii_enable_pll = false; -+ priv->ports_config.sgmii_enable_pll = false; - } - - if (priv->switch_revision < 2) -@@ -1281,15 +1281,15 @@ qca8k_mac_config_setup_internal_delay(st - * not enabled. With ID or TX/RXID delay is enabled and set - * to the default and recommended value. - */ -- if (priv->rgmii_tx_delay[cpu_port_index]) { -- delay = priv->rgmii_tx_delay[cpu_port_index]; -+ if (priv->ports_config.rgmii_tx_delay[cpu_port_index]) { -+ delay = priv->ports_config.rgmii_tx_delay[cpu_port_index]; - - val |= QCA8K_PORT_PAD_RGMII_TX_DELAY(delay) | - QCA8K_PORT_PAD_RGMII_TX_DELAY_EN; - } - -- if (priv->rgmii_rx_delay[cpu_port_index]) { -- delay = priv->rgmii_rx_delay[cpu_port_index]; -+ if (priv->ports_config.rgmii_rx_delay[cpu_port_index]) { -+ delay = priv->ports_config.rgmii_rx_delay[cpu_port_index]; - - val |= QCA8K_PORT_PAD_RGMII_RX_DELAY(delay) | - QCA8K_PORT_PAD_RGMII_RX_DELAY_EN; -@@ -1397,7 +1397,7 @@ qca8k_phylink_mac_config(struct dsa_swit - - val |= QCA8K_SGMII_EN_SD; - -- if (priv->sgmii_enable_pll) -+ if (priv->ports_config.sgmii_enable_pll) - val |= QCA8K_SGMII_EN_PLL | QCA8K_SGMII_EN_RX | - QCA8K_SGMII_EN_TX; - -@@ -1425,10 +1425,10 @@ qca8k_phylink_mac_config(struct dsa_swit - val = 0; - - /* SGMII Clock phase configuration */ -- if (priv->sgmii_rx_clk_falling_edge) -+ if (priv->ports_config.sgmii_rx_clk_falling_edge) - val |= QCA8K_PORT0_PAD_SGMII_RXCLK_FALLING_EDGE; - -- if (priv->sgmii_tx_clk_falling_edge) -+ if (priv->ports_config.sgmii_tx_clk_falling_edge) - val |= QCA8K_PORT0_PAD_SGMII_TXCLK_FALLING_EDGE; - - if (val) ---- a/drivers/net/dsa/qca8k.h -+++ b/drivers/net/dsa/qca8k.h -@@ -270,15 +270,19 @@ enum { - QCA8K_CPU_PORT6, - }; - --struct qca8k_priv { -- u8 switch_id; -- u8 switch_revision; -+struct qca8k_ports_config { - bool sgmii_rx_clk_falling_edge; - bool sgmii_tx_clk_falling_edge; - bool sgmii_enable_pll; - u8 rgmii_rx_delay[QCA8K_NUM_CPU_PORTS]; /* 0: CPU port0, 1: CPU port6 */ - u8 rgmii_tx_delay[QCA8K_NUM_CPU_PORTS]; /* 0: CPU port0, 1: CPU port6 */ -+}; -+ -+struct qca8k_priv { -+ u8 switch_id; -+ u8 switch_revision; - bool legacy_phy_port_mapping; -+ struct qca8k_ports_config ports_config; - struct regmap *regmap; - struct mii_bus *bus; - struct ar8xxx_port_status port_sts[QCA8K_NUM_PORTS]; diff --git a/root/target/linux/generic/backport-5.15/747-v5.16-15-dt-bindings-net-ipq8064-mdio-fix-warning-with-new-qc.patch b/root/target/linux/generic/backport-5.15/747-v5.16-15-dt-bindings-net-ipq8064-mdio-fix-warning-with-new-qc.patch deleted file mode 100755 index f7cb5141..00000000 --- a/root/target/linux/generic/backport-5.15/747-v5.16-15-dt-bindings-net-ipq8064-mdio-fix-warning-with-new-qc.patch +++ /dev/null @@ -1,26 +0,0 @@ -From e52073a8e3086046a098b8a7cbeb282ff0cdb424 Mon Sep 17 00:00:00 2001 -From: Ansuel Smith -Date: Thu, 14 Oct 2021 00:39:20 +0200 -Subject: dt-bindings: net: ipq8064-mdio: fix warning with new qca8k switch - -Fix warning now that we have qca8k switch Documentation using yaml. - -Signed-off-by: Ansuel Smith -Signed-off-by: David S. Miller ---- - Documentation/devicetree/bindings/net/qcom,ipq8064-mdio.yaml | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - ---- a/Documentation/devicetree/bindings/net/qcom,ipq8064-mdio.yaml -+++ b/Documentation/devicetree/bindings/net/qcom,ipq8064-mdio.yaml -@@ -51,6 +51,9 @@ examples: - switch@10 { - compatible = "qca,qca8337"; - reg = <0x10>; -- /* ... */ -+ -+ ports { -+ /* ... */ -+ }; - }; - }; diff --git a/root/target/linux/generic/backport-5.15/747-v5.16-16-dt-bindings-net-dsa-qca8k-convert-to-YAML-schema.patch b/root/target/linux/generic/backport-5.15/747-v5.16-16-dt-bindings-net-dsa-qca8k-convert-to-YAML-schema.patch deleted file mode 100755 index b9bce97d..00000000 --- a/root/target/linux/generic/backport-5.15/747-v5.16-16-dt-bindings-net-dsa-qca8k-convert-to-YAML-schema.patch +++ /dev/null @@ -1,631 +0,0 @@ -From d291fbb8245d5ba04979fed85575860a5cea7196 Mon Sep 17 00:00:00 2001 -From: Matthew Hagan -Date: Thu, 14 Oct 2021 00:39:21 +0200 -Subject: dt-bindings: net: dsa: qca8k: convert to YAML schema - -Convert the qca8k bindings to YAML format. - -Signed-off-by: Matthew Hagan -Co-developed-by: Ansuel Smith -Signed-off-by: Ansuel Smith -Signed-off-by: David S. Miller ---- - .../devicetree/bindings/net/dsa/qca8k.txt | 245 -------------- - .../devicetree/bindings/net/dsa/qca8k.yaml | 362 +++++++++++++++++++++ - 2 files changed, 362 insertions(+), 245 deletions(-) - delete mode 100644 Documentation/devicetree/bindings/net/dsa/qca8k.txt - create mode 100644 Documentation/devicetree/bindings/net/dsa/qca8k.yaml - ---- a/Documentation/devicetree/bindings/net/dsa/qca8k.txt -+++ /dev/null -@@ -1,245 +0,0 @@ --* Qualcomm Atheros QCA8xxx switch family -- --Required properties: -- --- compatible: should be one of: -- "qca,qca8328": referenced as AR8328(N)-AK1(A/B) QFN 176 pin package -- "qca,qca8327": referenced as AR8327(N)-AL1A DR-QFN 148 pin package -- "qca,qca8334": referenced as QCA8334-AL3C QFN 88 pin package -- "qca,qca8337": referenced as QCA8337N-AL3(B/C) DR-QFN 148 pin package -- --- #size-cells: must be 0 --- #address-cells: must be 1 -- --Optional properties: -- --- reset-gpios: GPIO to be used to reset the whole device --- qca,ignore-power-on-sel: Ignore power on pin strapping to configure led open -- drain or eeprom presence. This is needed for broken -- devices that have wrong configuration or when the oem -- decided to not use pin strapping and fallback to sw -- regs. --- qca,led-open-drain: Set leds to open-drain mode. This requires the -- qca,ignore-power-on-sel to be set or the driver will fail -- to probe. This is needed if the oem doesn't use pin -- strapping to set this mode and prefers to set it using sw -- regs. The pin strapping related to led open drain mode is -- the pin B68 for QCA832x and B49 for QCA833x -- --Subnodes: -- --The integrated switch subnode should be specified according to the binding --described in dsa/dsa.txt. If the QCA8K switch is connect to a SoC's external --mdio-bus each subnode describing a port needs to have a valid phandle --referencing the internal PHY it is connected to. This is because there's no --N:N mapping of port and PHY id. --To declare the internal mdio-bus configuration, declare a mdio node in the --switch node and declare the phandle for the port referencing the internal --PHY is connected to. In this config a internal mdio-bus is registered and --the mdio MASTER is used as communication. -- --Don't use mixed external and internal mdio-bus configurations, as this is --not supported by the hardware. -- --This switch support 2 CPU port. Normally and advised configuration is with --CPU port set to port 0. It is also possible to set the CPU port to port 6 --if the device requires it. The driver will configure the switch to the defined --port. With both CPU port declared the first CPU port is selected as primary --and the secondary CPU ignored. -- --A CPU port node has the following optional node: -- --- fixed-link : Fixed-link subnode describing a link to a non-MDIO -- managed entity. See -- Documentation/devicetree/bindings/net/fixed-link.txt -- for details. --- qca,sgmii-rxclk-falling-edge: Set the receive clock phase to falling edge. -- Mostly used in qca8327 with CPU port 0 set to -- sgmii. --- qca,sgmii-txclk-falling-edge: Set the transmit clock phase to falling edge. --- qca,sgmii-enable-pll : For SGMII CPU port, explicitly enable PLL, TX and RX -- chain along with Signal Detection. -- This should NOT be enabled for qca8327. If enabled with -- qca8327 the sgmii port won't correctly init and an err -- is printed. -- This can be required for qca8337 switch with revision 2. -- A warning is displayed when used with revision greater -- 2. -- With CPU port set to sgmii and qca8337 it is advised -- to set this unless a communication problem is observed. -- --For QCA8K the 'fixed-link' sub-node supports only the following properties: -- --- 'speed' (integer, mandatory), to indicate the link speed. Accepted -- values are 10, 100 and 1000 --- 'full-duplex' (boolean, optional), to indicate that full duplex is -- used. When absent, half duplex is assumed. -- --Examples: -- --for the external mdio-bus configuration: -- -- &mdio0 { -- phy_port1: phy@0 { -- reg = <0>; -- }; -- -- phy_port2: phy@1 { -- reg = <1>; -- }; -- -- phy_port3: phy@2 { -- reg = <2>; -- }; -- -- phy_port4: phy@3 { -- reg = <3>; -- }; -- -- phy_port5: phy@4 { -- reg = <4>; -- }; -- -- switch@10 { -- compatible = "qca,qca8337"; -- #address-cells = <1>; -- #size-cells = <0>; -- -- reset-gpios = <&gpio 42 GPIO_ACTIVE_LOW>; -- reg = <0x10>; -- -- ports { -- #address-cells = <1>; -- #size-cells = <0>; -- port@0 { -- reg = <0>; -- label = "cpu"; -- ethernet = <&gmac1>; -- phy-mode = "rgmii"; -- fixed-link { -- speed = 1000; -- full-duplex; -- }; -- }; -- -- port@1 { -- reg = <1>; -- label = "lan1"; -- phy-handle = <&phy_port1>; -- }; -- -- port@2 { -- reg = <2>; -- label = "lan2"; -- phy-handle = <&phy_port2>; -- }; -- -- port@3 { -- reg = <3>; -- label = "lan3"; -- phy-handle = <&phy_port3>; -- }; -- -- port@4 { -- reg = <4>; -- label = "lan4"; -- phy-handle = <&phy_port4>; -- }; -- -- port@5 { -- reg = <5>; -- label = "wan"; -- phy-handle = <&phy_port5>; -- }; -- }; -- }; -- }; -- --for the internal master mdio-bus configuration: -- -- &mdio0 { -- switch@10 { -- compatible = "qca,qca8337"; -- #address-cells = <1>; -- #size-cells = <0>; -- -- reset-gpios = <&gpio 42 GPIO_ACTIVE_LOW>; -- reg = <0x10>; -- -- ports { -- #address-cells = <1>; -- #size-cells = <0>; -- -- port@0 { -- reg = <0>; -- label = "cpu"; -- ethernet = <&gmac1>; -- phy-mode = "rgmii"; -- fixed-link { -- speed = 1000; -- full-duplex; -- }; -- }; -- -- port@1 { -- reg = <1>; -- label = "lan1"; -- phy-mode = "internal"; -- phy-handle = <&phy_port1>; -- }; -- -- port@2 { -- reg = <2>; -- label = "lan2"; -- phy-mode = "internal"; -- phy-handle = <&phy_port2>; -- }; -- -- port@3 { -- reg = <3>; -- label = "lan3"; -- phy-mode = "internal"; -- phy-handle = <&phy_port3>; -- }; -- -- port@4 { -- reg = <4>; -- label = "lan4"; -- phy-mode = "internal"; -- phy-handle = <&phy_port4>; -- }; -- -- port@5 { -- reg = <5>; -- label = "wan"; -- phy-mode = "internal"; -- phy-handle = <&phy_port5>; -- }; -- }; -- -- mdio { -- #address-cells = <1>; -- #size-cells = <0>; -- -- phy_port1: phy@0 { -- reg = <0>; -- }; -- -- phy_port2: phy@1 { -- reg = <1>; -- }; -- -- phy_port3: phy@2 { -- reg = <2>; -- }; -- -- phy_port4: phy@3 { -- reg = <3>; -- }; -- -- phy_port5: phy@4 { -- reg = <4>; -- }; -- }; -- }; -- }; ---- /dev/null -+++ b/Documentation/devicetree/bindings/net/dsa/qca8k.yaml -@@ -0,0 +1,362 @@ -+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) -+%YAML 1.2 -+--- -+$id: http://devicetree.org/schemas/net/dsa/qca8k.yaml# -+$schema: http://devicetree.org/meta-schemas/core.yaml# -+ -+title: Qualcomm Atheros QCA83xx switch family -+ -+maintainers: -+ - John Crispin -+ -+description: -+ If the QCA8K switch is connect to an SoC's external mdio-bus, each subnode -+ describing a port needs to have a valid phandle referencing the internal PHY -+ it is connected to. This is because there is no N:N mapping of port and PHY -+ ID. To declare the internal mdio-bus configuration, declare an MDIO node in -+ the switch node and declare the phandle for the port, referencing the internal -+ PHY it is connected to. In this config, an internal mdio-bus is registered and -+ the MDIO master is used for communication. Mixed external and internal -+ mdio-bus configurations are not supported by the hardware. -+ -+properties: -+ compatible: -+ oneOf: -+ - enum: -+ - qca,qca8327 -+ - qca,qca8328 -+ - qca,qca8334 -+ - qca,qca8337 -+ description: | -+ qca,qca8328: referenced as AR8328(N)-AK1(A/B) QFN 176 pin package -+ qca,qca8327: referenced as AR8327(N)-AL1A DR-QFN 148 pin package -+ qca,qca8334: referenced as QCA8334-AL3C QFN 88 pin package -+ qca,qca8337: referenced as QCA8337N-AL3(B/C) DR-QFN 148 pin package -+ -+ reg: -+ maxItems: 1 -+ -+ reset-gpios: -+ description: -+ GPIO to be used to reset the whole device -+ maxItems: 1 -+ -+ qca,ignore-power-on-sel: -+ $ref: /schemas/types.yaml#/definitions/flag -+ description: -+ Ignore power-on pin strapping to configure LED open-drain or EEPROM -+ presence. This is needed for devices with incorrect configuration or when -+ the OEM has decided not to use pin strapping and falls back to SW regs. -+ -+ qca,led-open-drain: -+ $ref: /schemas/types.yaml#/definitions/flag -+ description: -+ Set LEDs to open-drain mode. This requires the qca,ignore-power-on-sel to -+ be set, otherwise the driver will fail at probe. This is required if the -+ OEM does not use pin strapping to set this mode and prefers to set it -+ using SW regs. The pin strappings related to LED open-drain mode are -+ B68 on the QCA832x and B49 on the QCA833x. -+ -+ mdio: -+ type: object -+ description: Qca8k switch have an internal mdio to access switch port. -+ If this is not present, the legacy mapping is used and the -+ internal mdio access is used. -+ With the legacy mapping the reg corresponding to the internal -+ mdio is the switch reg with an offset of -1. -+ -+ properties: -+ '#address-cells': -+ const: 1 -+ '#size-cells': -+ const: 0 -+ -+ patternProperties: -+ "^(ethernet-)?phy@[0-4]$": -+ type: object -+ -+ allOf: -+ - $ref: "http://devicetree.org/schemas/net/mdio.yaml#" -+ -+ properties: -+ reg: -+ maxItems: 1 -+ -+ required: -+ - reg -+ -+patternProperties: -+ "^(ethernet-)?ports$": -+ type: object -+ properties: -+ '#address-cells': -+ const: 1 -+ '#size-cells': -+ const: 0 -+ -+ patternProperties: -+ "^(ethernet-)?port@[0-6]$": -+ type: object -+ description: Ethernet switch ports -+ -+ properties: -+ reg: -+ description: Port number -+ -+ label: -+ description: -+ Describes the label associated with this port, which will become -+ the netdev name -+ $ref: /schemas/types.yaml#/definitions/string -+ -+ link: -+ description: -+ Should be a list of phandles to other switch's DSA port. This -+ port is used as the outgoing port towards the phandle ports. The -+ full routing information must be given, not just the one hop -+ routes to neighbouring switches -+ $ref: /schemas/types.yaml#/definitions/phandle-array -+ -+ ethernet: -+ description: -+ Should be a phandle to a valid Ethernet device node. This host -+ device is what the switch port is connected to -+ $ref: /schemas/types.yaml#/definitions/phandle -+ -+ phy-handle: true -+ -+ phy-mode: true -+ -+ fixed-link: true -+ -+ mac-address: true -+ -+ sfp: true -+ -+ qca,sgmii-rxclk-falling-edge: -+ $ref: /schemas/types.yaml#/definitions/flag -+ description: -+ Set the receive clock phase to falling edge. Mostly commonly used on -+ the QCA8327 with CPU port 0 set to SGMII. -+ -+ qca,sgmii-txclk-falling-edge: -+ $ref: /schemas/types.yaml#/definitions/flag -+ description: -+ Set the transmit clock phase to falling edge. -+ -+ qca,sgmii-enable-pll: -+ $ref: /schemas/types.yaml#/definitions/flag -+ description: -+ For SGMII CPU port, explicitly enable PLL, TX and RX chain along with -+ Signal Detection. On the QCA8327 this should not be enabled, otherwise -+ the SGMII port will not initialize. When used on the QCA8337, revision 3 -+ or greater, a warning will be displayed. When the CPU port is set to -+ SGMII on the QCA8337, it is advised to set this unless a communication -+ issue is observed. -+ -+ required: -+ - reg -+ -+ additionalProperties: false -+ -+oneOf: -+ - required: -+ - ports -+ - required: -+ - ethernet-ports -+ -+required: -+ - compatible -+ - reg -+ -+additionalProperties: true -+ -+examples: -+ - | -+ #include -+ -+ mdio { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ -+ external_phy_port1: ethernet-phy@0 { -+ reg = <0>; -+ }; -+ -+ external_phy_port2: ethernet-phy@1 { -+ reg = <1>; -+ }; -+ -+ external_phy_port3: ethernet-phy@2 { -+ reg = <2>; -+ }; -+ -+ external_phy_port4: ethernet-phy@3 { -+ reg = <3>; -+ }; -+ -+ external_phy_port5: ethernet-phy@4 { -+ reg = <4>; -+ }; -+ -+ switch@10 { -+ compatible = "qca,qca8337"; -+ #address-cells = <1>; -+ #size-cells = <0>; -+ reset-gpios = <&gpio 42 GPIO_ACTIVE_LOW>; -+ reg = <0x10>; -+ -+ ports { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ -+ port@0 { -+ reg = <0>; -+ label = "cpu"; -+ ethernet = <&gmac1>; -+ phy-mode = "rgmii"; -+ -+ fixed-link { -+ speed = <1000>; -+ full-duplex; -+ }; -+ }; -+ -+ port@1 { -+ reg = <1>; -+ label = "lan1"; -+ phy-handle = <&external_phy_port1>; -+ }; -+ -+ port@2 { -+ reg = <2>; -+ label = "lan2"; -+ phy-handle = <&external_phy_port2>; -+ }; -+ -+ port@3 { -+ reg = <3>; -+ label = "lan3"; -+ phy-handle = <&external_phy_port3>; -+ }; -+ -+ port@4 { -+ reg = <4>; -+ label = "lan4"; -+ phy-handle = <&external_phy_port4>; -+ }; -+ -+ port@5 { -+ reg = <5>; -+ label = "wan"; -+ phy-handle = <&external_phy_port5>; -+ }; -+ }; -+ }; -+ }; -+ - | -+ #include -+ -+ mdio { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ -+ switch@10 { -+ compatible = "qca,qca8337"; -+ #address-cells = <1>; -+ #size-cells = <0>; -+ reset-gpios = <&gpio 42 GPIO_ACTIVE_LOW>; -+ reg = <0x10>; -+ -+ ports { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ -+ port@0 { -+ reg = <0>; -+ label = "cpu"; -+ ethernet = <&gmac1>; -+ phy-mode = "rgmii"; -+ -+ fixed-link { -+ speed = <1000>; -+ full-duplex; -+ }; -+ }; -+ -+ port@1 { -+ reg = <1>; -+ label = "lan1"; -+ phy-mode = "internal"; -+ phy-handle = <&internal_phy_port1>; -+ }; -+ -+ port@2 { -+ reg = <2>; -+ label = "lan2"; -+ phy-mode = "internal"; -+ phy-handle = <&internal_phy_port2>; -+ }; -+ -+ port@3 { -+ reg = <3>; -+ label = "lan3"; -+ phy-mode = "internal"; -+ phy-handle = <&internal_phy_port3>; -+ }; -+ -+ port@4 { -+ reg = <4>; -+ label = "lan4"; -+ phy-mode = "internal"; -+ phy-handle = <&internal_phy_port4>; -+ }; -+ -+ port@5 { -+ reg = <5>; -+ label = "wan"; -+ phy-mode = "internal"; -+ phy-handle = <&internal_phy_port5>; -+ }; -+ -+ port@6 { -+ reg = <0>; -+ label = "cpu"; -+ ethernet = <&gmac1>; -+ phy-mode = "sgmii"; -+ -+ qca,sgmii-rxclk-falling-edge; -+ -+ fixed-link { -+ speed = <1000>; -+ full-duplex; -+ }; -+ }; -+ }; -+ -+ mdio { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ -+ internal_phy_port1: ethernet-phy@0 { -+ reg = <0>; -+ }; -+ -+ internal_phy_port2: ethernet-phy@1 { -+ reg = <1>; -+ }; -+ -+ internal_phy_port3: ethernet-phy@2 { -+ reg = <2>; -+ }; -+ -+ internal_phy_port4: ethernet-phy@3 { -+ reg = <3>; -+ }; -+ -+ internal_phy_port5: ethernet-phy@4 { -+ reg = <4>; -+ }; -+ }; -+ }; -+ }; diff --git a/root/target/linux/generic/backport-5.15/748-v5.16-net-dsa-qca8k-fix-delay-applied-to-wrong-cpu-in-parse-p.patch b/root/target/linux/generic/backport-5.15/748-v5.16-net-dsa-qca8k-fix-delay-applied-to-wrong-cpu-in-parse-p.patch deleted file mode 100755 index a510cfdc..00000000 --- a/root/target/linux/generic/backport-5.15/748-v5.16-net-dsa-qca8k-fix-delay-applied-to-wrong-cpu-in-parse-p.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 06dd34a628ae5b6a839b757e746de165d6789ca8 Mon Sep 17 00:00:00 2001 -From: Ansuel Smith -Date: Sun, 17 Oct 2021 16:56:46 +0200 -Subject: net: dsa: qca8k: fix delay applied to wrong cpu in parse_port_config - -Fix delay settings applied to wrong cpu in parse_port_config. The delay -values is set to the wrong index as the cpu_port_index is incremented -too early. Start the cpu_port_index to -1 so the correct value is -applied to address also the case with invalid phy mode and not available -port. - -Signed-off-by: Ansuel Smith -Signed-off-by: David S. Miller ---- - drivers/net/dsa/qca8k.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/drivers/net/dsa/qca8k.c -+++ b/drivers/net/dsa/qca8k.c -@@ -976,7 +976,7 @@ qca8k_setup_of_pws_reg(struct qca8k_priv - static int - qca8k_parse_port_config(struct qca8k_priv *priv) - { -- int port, cpu_port_index = 0, ret; -+ int port, cpu_port_index = -1, ret; - struct device_node *port_dn; - phy_interface_t mode; - struct dsa_port *dp; diff --git a/root/target/linux/generic/backport-5.15/749-v5.16-net-dsa-qca8k-tidy-for-loop-in-setup-and-add-cpu-port-c.patch b/root/target/linux/generic/backport-5.15/749-v5.16-net-dsa-qca8k-tidy-for-loop-in-setup-and-add-cpu-port-c.patch deleted file mode 100755 index 71fa3022..00000000 --- a/root/target/linux/generic/backport-5.15/749-v5.16-net-dsa-qca8k-tidy-for-loop-in-setup-and-add-cpu-port-c.patch +++ /dev/null @@ -1,151 +0,0 @@ -From 040e926f5813a5f4cc18dbff7c942d1e52f368f2 Mon Sep 17 00:00:00 2001 -From: Ansuel Smith -Date: Tue, 19 Oct 2021 02:08:50 +0200 -Subject: net: dsa: qca8k: tidy for loop in setup and add cpu port check - -Tidy and organize qca8k setup function from multiple for loop. -Change for loop in bridge leave/join to scan all port and skip cpu port. -No functional change intended. - -Signed-off-by: Ansuel Smith -Signed-off-by: David S. Miller ---- - drivers/net/dsa/qca8k.c | 74 +++++++++++++++++++++++++++++-------------------- - 1 file changed, 44 insertions(+), 30 deletions(-) - ---- a/drivers/net/dsa/qca8k.c -+++ b/drivers/net/dsa/qca8k.c -@@ -1122,28 +1122,34 @@ qca8k_setup(struct dsa_switch *ds) - if (ret) - dev_warn(priv->dev, "mib init failed"); - -- /* Enable QCA header mode on the cpu port */ -- ret = qca8k_write(priv, QCA8K_REG_PORT_HDR_CTRL(cpu_port), -- QCA8K_PORT_HDR_CTRL_ALL << QCA8K_PORT_HDR_CTRL_TX_S | -- QCA8K_PORT_HDR_CTRL_ALL << QCA8K_PORT_HDR_CTRL_RX_S); -- if (ret) { -- dev_err(priv->dev, "failed enabling QCA header mode"); -- return ret; -- } -- -- /* Disable forwarding by default on all ports */ -+ /* Initial setup of all ports */ - for (i = 0; i < QCA8K_NUM_PORTS; i++) { -+ /* Disable forwarding by default on all ports */ - ret = qca8k_rmw(priv, QCA8K_PORT_LOOKUP_CTRL(i), - QCA8K_PORT_LOOKUP_MEMBER, 0); - if (ret) - return ret; -- } - -- /* Disable MAC by default on all ports */ -- for (i = 1; i < QCA8K_NUM_PORTS; i++) -- qca8k_port_set_status(priv, i, 0); -+ /* Enable QCA header mode on all cpu ports */ -+ if (dsa_is_cpu_port(ds, i)) { -+ ret = qca8k_write(priv, QCA8K_REG_PORT_HDR_CTRL(i), -+ QCA8K_PORT_HDR_CTRL_ALL << QCA8K_PORT_HDR_CTRL_TX_S | -+ QCA8K_PORT_HDR_CTRL_ALL << QCA8K_PORT_HDR_CTRL_RX_S); -+ if (ret) { -+ dev_err(priv->dev, "failed enabling QCA header mode"); -+ return ret; -+ } -+ } -+ -+ /* Disable MAC by default on all user ports */ -+ if (dsa_is_user_port(ds, i)) -+ qca8k_port_set_status(priv, i, 0); -+ } - -- /* Forward all unknown frames to CPU port for Linux processing */ -+ /* Forward all unknown frames to CPU port for Linux processing -+ * Notice that in multi-cpu config only one port should be set -+ * for igmp, unknown, multicast and broadcast packet -+ */ - ret = qca8k_write(priv, QCA8K_REG_GLOBAL_FW_CTRL1, - BIT(cpu_port) << QCA8K_GLOBAL_FW_CTRL1_IGMP_DP_S | - BIT(cpu_port) << QCA8K_GLOBAL_FW_CTRL1_BC_DP_S | -@@ -1152,11 +1158,13 @@ qca8k_setup(struct dsa_switch *ds) - if (ret) - return ret; - -- /* Setup connection between CPU port & user ports */ -+ /* Setup connection between CPU port & user ports -+ * Configure specific switch configuration for ports -+ */ - for (i = 0; i < QCA8K_NUM_PORTS; i++) { - /* CPU port gets connected to all user ports of the switch */ - if (dsa_is_cpu_port(ds, i)) { -- ret = qca8k_rmw(priv, QCA8K_PORT_LOOKUP_CTRL(cpu_port), -+ ret = qca8k_rmw(priv, QCA8K_PORT_LOOKUP_CTRL(i), - QCA8K_PORT_LOOKUP_MEMBER, dsa_user_ports(ds)); - if (ret) - return ret; -@@ -1193,16 +1201,14 @@ qca8k_setup(struct dsa_switch *ds) - if (ret) - return ret; - } -- } - -- /* The port 5 of the qca8337 have some problem in flood condition. The -- * original legacy driver had some specific buffer and priority settings -- * for the different port suggested by the QCA switch team. Add this -- * missing settings to improve switch stability under load condition. -- * This problem is limited to qca8337 and other qca8k switch are not affected. -- */ -- if (priv->switch_id == QCA8K_ID_QCA8337) { -- for (i = 0; i < QCA8K_NUM_PORTS; i++) { -+ /* The port 5 of the qca8337 have some problem in flood condition. The -+ * original legacy driver had some specific buffer and priority settings -+ * for the different port suggested by the QCA switch team. Add this -+ * missing settings to improve switch stability under load condition. -+ * This problem is limited to qca8337 and other qca8k switch are not affected. -+ */ -+ if (priv->switch_id == QCA8K_ID_QCA8337) { - switch (i) { - /* The 2 CPU port and port 5 requires some different - * priority than any other ports. -@@ -1238,6 +1244,12 @@ qca8k_setup(struct dsa_switch *ds) - QCA8K_PORT_HOL_CTRL1_WRED_EN, - mask); - } -+ -+ /* Set initial MTU for every port. -+ * We have only have a general MTU setting. So track -+ * every port and set the max across all port. -+ */ -+ priv->port_mtu[i] = ETH_FRAME_LEN + ETH_FCS_LEN; - } - - /* Special GLOBAL_FC_THRESH value are needed for ar8327 switch */ -@@ -1251,8 +1263,6 @@ qca8k_setup(struct dsa_switch *ds) - } - - /* Setup our port MTUs to match power on defaults */ -- for (i = 0; i < QCA8K_NUM_PORTS; i++) -- priv->port_mtu[i] = ETH_FRAME_LEN + ETH_FCS_LEN; - ret = qca8k_write(priv, QCA8K_MAX_FRAME_SIZE, ETH_FRAME_LEN + ETH_FCS_LEN); - if (ret) - dev_warn(priv->dev, "failed setting MTU settings"); -@@ -1728,7 +1738,9 @@ qca8k_port_bridge_join(struct dsa_switch - cpu_port = dsa_to_port(ds, port)->cpu_dp->index; - port_mask = BIT(cpu_port); - -- for (i = 1; i < QCA8K_NUM_PORTS; i++) { -+ for (i = 0; i < QCA8K_NUM_PORTS; i++) { -+ if (dsa_is_cpu_port(ds, i)) -+ continue; - if (dsa_to_port(ds, i)->bridge_dev != br) - continue; - /* Add this port to the portvlan mask of the other ports -@@ -1758,7 +1770,9 @@ qca8k_port_bridge_leave(struct dsa_switc - - cpu_port = dsa_to_port(ds, port)->cpu_dp->index; - -- for (i = 1; i < QCA8K_NUM_PORTS; i++) { -+ for (i = 0; i < QCA8K_NUM_PORTS; i++) { -+ if (dsa_is_cpu_port(ds, i)) -+ continue; - if (dsa_to_port(ds, i)->bridge_dev != br) - continue; - /* Remove this port to the portvlan mask of the other ports diff --git a/root/target/linux/generic/backport-5.15/750-v5.16-net-dsa-qca8k-make-sure-pad0-mac06-exchange-is-disabled.patch b/root/target/linux/generic/backport-5.15/750-v5.16-net-dsa-qca8k-make-sure-pad0-mac06-exchange-is-disabled.patch deleted file mode 100755 index 4a61703c..00000000 --- a/root/target/linux/generic/backport-5.15/750-v5.16-net-dsa-qca8k-make-sure-pad0-mac06-exchange-is-disabled.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 5f15d392dcb4aa250a63d6f2c5adfc26c0aedc78 Mon Sep 17 00:00:00 2001 -From: Ansuel Smith -Date: Tue, 2 Nov 2021 19:30:41 +0100 -Subject: net: dsa: qca8k: make sure PAD0 MAC06 exchange is disabled - -Some device set MAC06 exchange in the bootloader. This cause some -problem as we don't support this strange mode and we just set the port6 -as the primary CPU port. With MAC06 exchange, PAD0 reg configure port6 -instead of port0. Add an extra check and explicitly disable MAC06 exchange -to correctly configure the port PAD config. - -Signed-off-by: Ansuel Smith -Fixes: 3fcf734aa482 ("net: dsa: qca8k: add support for cpu port 6") -Reviewed-by: Vladimir Oltean -Signed-off-by: David S. Miller ---- - drivers/net/dsa/qca8k.c | 8 ++++++++ - drivers/net/dsa/qca8k.h | 1 + - 2 files changed, 9 insertions(+) - ---- a/drivers/net/dsa/qca8k.c -+++ b/drivers/net/dsa/qca8k.c -@@ -1109,6 +1109,14 @@ qca8k_setup(struct dsa_switch *ds) - if (ret) - return ret; - -+ /* Make sure MAC06 is disabled */ -+ ret = qca8k_reg_clear(priv, QCA8K_REG_PORT0_PAD_CTRL, -+ QCA8K_PORT0_PAD_MAC06_EXCHANGE_EN); -+ if (ret) { -+ dev_err(priv->dev, "failed disabling MAC06 exchange"); -+ return ret; -+ } -+ - /* Enable CPU Port */ - ret = qca8k_reg_set(priv, QCA8K_REG_GLOBAL_FW_CTRL0, - QCA8K_GLOBAL_FW_CTRL0_CPU_PORT_EN); ---- a/drivers/net/dsa/qca8k.h -+++ b/drivers/net/dsa/qca8k.h -@@ -34,6 +34,7 @@ - #define QCA8K_MASK_CTRL_DEVICE_ID_MASK GENMASK(15, 8) - #define QCA8K_MASK_CTRL_DEVICE_ID(x) ((x) >> 8) - #define QCA8K_REG_PORT0_PAD_CTRL 0x004 -+#define QCA8K_PORT0_PAD_MAC06_EXCHANGE_EN BIT(31) - #define QCA8K_PORT0_PAD_SGMII_RXCLK_FALLING_EDGE BIT(19) - #define QCA8K_PORT0_PAD_SGMII_TXCLK_FALLING_EDGE BIT(18) - #define QCA8K_REG_PORT5_PAD_CTRL 0x008 diff --git a/root/target/linux/generic/hack-5.15/204-module_strip.patch b/root/target/linux/generic/hack-5.15/204-module_strip.patch index 0968d6a1..9b25707f 100755 --- a/root/target/linux/generic/hack-5.15/204-module_strip.patch +++ b/root/target/linux/generic/hack-5.15/204-module_strip.patch @@ -88,7 +88,7 @@ Signed-off-by: Felix Fietkau --- a/init/Kconfig +++ b/init/Kconfig -@@ -2347,6 +2347,13 @@ config UNUSED_KSYMS_WHITELIST +@@ -2324,6 +2324,13 @@ config UNUSED_KSYMS_WHITELIST one per line. The path can be absolute, or relative to the kernel source tree. @@ -104,23 +104,7 @@ Signed-off-by: Felix Fietkau config MODULES_TREE_LOOKUP --- a/kernel/module.c +++ b/kernel/module.c -@@ -1218,6 +1218,7 @@ static struct module_attribute *modinfo_ - - static const char vermagic[] = VERMAGIC_STRING; - -+#if defined(CONFIG_MODVERSIONS) || !defined(CONFIG_MODULE_STRIPPED) - static int try_to_force_load(struct module *mod, const char *reason) - { - #ifdef CONFIG_MODULE_FORCE_LOAD -@@ -1229,6 +1230,7 @@ static int try_to_force_load(struct modu - return -ENOEXEC; - #endif - } -+#endif - - #ifdef CONFIG_MODVERSIONS - -@@ -3227,9 +3229,11 @@ static int setup_load_info(struct load_i +@@ -3227,9 +3227,11 @@ static int setup_load_info(struct load_i static int check_modinfo(struct module *mod, struct load_info *info, int flags) { @@ -133,7 +117,7 @@ Signed-off-by: Felix Fietkau if (flags & MODULE_INIT_IGNORE_VERMAGIC) modmagic = NULL; -@@ -3250,6 +3254,7 @@ static int check_modinfo(struct module * +@@ -3250,6 +3252,7 @@ static int check_modinfo(struct module * mod->name); add_taint_module(mod, TAINT_OOT_MODULE, LOCKDEP_STILL_OK); } @@ -143,7 +127,7 @@ Signed-off-by: Felix Fietkau --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c -@@ -2033,7 +2033,9 @@ static void read_symbols(const char *mod +@@ -2024,7 +2024,9 @@ static void read_symbols(const char *mod symname = remove_dot(info.strtab + sym->st_name); handle_symbol(mod, &info, sym, symname); @@ -153,7 +137,7 @@ Signed-off-by: Felix Fietkau } for (sym = info.symtab_start; sym < info.symtab_stop; sym++) { -@@ -2212,8 +2214,10 @@ static void add_header(struct buffer *b, +@@ -2203,8 +2205,10 @@ static void add_header(struct buffer *b, buf_printf(b, "BUILD_SALT;\n"); buf_printf(b, "BUILD_LTO_INFO;\n"); buf_printf(b, "\n"); @@ -164,7 +148,7 @@ Signed-off-by: Felix Fietkau buf_printf(b, "\n"); buf_printf(b, "__visible struct module __this_module\n"); buf_printf(b, "__section(\".gnu.linkonce.this_module\") = {\n"); -@@ -2230,8 +2234,10 @@ static void add_header(struct buffer *b, +@@ -2221,8 +2225,10 @@ static void add_header(struct buffer *b, static void add_intree_flag(struct buffer *b, int is_intree) { @@ -175,7 +159,7 @@ Signed-off-by: Felix Fietkau } /* Cannot check for assembler */ -@@ -2244,8 +2250,10 @@ static void add_retpoline(struct buffer +@@ -2235,8 +2241,10 @@ static void add_retpoline(struct buffer static void add_staging_flag(struct buffer *b, const char *name) { @@ -186,7 +170,7 @@ Signed-off-by: Felix Fietkau } /** -@@ -2325,11 +2333,13 @@ static void add_depends(struct buffer *b +@@ -2316,11 +2324,13 @@ static void add_depends(struct buffer *b static void add_srcversion(struct buffer *b, struct module *mod) { @@ -200,7 +184,7 @@ Signed-off-by: Felix Fietkau } static void write_buf(struct buffer *b, const char *fname) -@@ -2578,7 +2588,9 @@ int main(int argc, char **argv) +@@ -2569,7 +2579,9 @@ int main(int argc, char **argv) add_staging_flag(&buf, mod->name); add_versions(&buf, mod); add_depends(&buf, mod); diff --git a/root/target/linux/generic/hack-5.15/205-kconfig-exit.patch b/root/target/linux/generic/hack-5.15/205-kconfig-exit.patch deleted file mode 100755 index e61c3ffd..00000000 --- a/root/target/linux/generic/hack-5.15/205-kconfig-exit.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/scripts/kconfig/conf.c -+++ b/scripts/kconfig/conf.c -@@ -435,6 +435,8 @@ static int conf_sym(struct menu *menu) - break; - continue; - case 0: -+ if (!sym_has_value(sym) && !tty_stdio && getenv("FAIL_ON_UNCONFIGURED")) -+ exit(1); - newval = oldval; - break; - case '?': diff --git a/root/target/linux/generic/hack-5.15/210-darwin_scripts_include.patch b/root/target/linux/generic/hack-5.15/210-darwin_scripts_include.patch index be6adc0d..d68e2f88 100755 --- a/root/target/linux/generic/hack-5.15/210-darwin_scripts_include.patch +++ b/root/target/linux/generic/hack-5.15/210-darwin_scripts_include.patch @@ -3039,7 +3039,7 @@ Signed-off-by: Florian Fainelli main(int argc, char **argv) --- a/scripts/mod/modpost.h +++ b/scripts/mod/modpost.h -@@ -8,7 +8,11 @@ +@@ -9,7 +9,11 @@ #include #include #include diff --git a/root/target/linux/generic/hack-5.15/212-tools_portability.patch b/root/target/linux/generic/hack-5.15/212-tools_portability.patch index b488155f..ffbb7d14 100755 --- a/root/target/linux/generic/hack-5.15/212-tools_portability.patch +++ b/root/target/linux/generic/hack-5.15/212-tools_portability.patch @@ -68,10 +68,14 @@ Signed-off-by: Felix Fietkau +#endif --- a/tools/include/linux/types.h +++ b/tools/include/linux/types.h -@@ -10,8 +10,12 @@ - #define __SANE_USERSPACE_TYPES__ /* For PPC64, to get LL64 types */ - #endif +@@ -6,12 +6,13 @@ + #include + #include +-#ifndef __SANE_USERSPACE_TYPES__ + #define __SANE_USERSPACE_TYPES__ /* For PPC64, to get LL64 types */ +-#endif +- +#ifndef __linux__ +#include +#else diff --git a/root/target/linux/generic/hack-5.15/220-arm-gc_sections.patch b/root/target/linux/generic/hack-5.15/220-arm-gc_sections.patch deleted file mode 100755 index 305556be..00000000 --- a/root/target/linux/generic/hack-5.15/220-arm-gc_sections.patch +++ /dev/null @@ -1,122 +0,0 @@ -From e3d8676f5722b7622685581e06e8f53e6138e3ab Mon Sep 17 00:00:00 2001 -From: Felix Fietkau -Date: Sat, 15 Jul 2017 23:42:36 +0200 -Subject: use -ffunction-sections, -fdata-sections and --gc-sections - -In combination with kernel symbol export stripping this significantly reduces -the kernel image size. Used on both ARM and MIPS architectures. - -Signed-off-by: Felix Fietkau -Signed-off-by: Jonas Gorski -Signed-off-by: Gabor Juhos ---- ---- a/arch/arm/Kconfig -+++ b/arch/arm/Kconfig -@@ -117,6 +117,7 @@ config ARM - select HAVE_UID16 - select HAVE_VIRT_CPU_ACCOUNTING_GEN - select IRQ_FORCED_THREADING -+ select HAVE_LD_DEAD_CODE_DATA_ELIMINATION - select MODULES_USE_ELF_REL - select NEED_DMA_MAP_STATE - select OF_EARLY_FLATTREE if OF ---- a/arch/arm/boot/compressed/Makefile -+++ b/arch/arm/boot/compressed/Makefile -@@ -92,6 +92,7 @@ endif - ifeq ($(CONFIG_USE_OF),y) - OBJS += $(libfdt_objs) fdt_check_mem_start.o - endif -+KBUILD_CFLAGS_KERNEL := $(patsubst -f%-sections,,$(KBUILD_CFLAGS_KERNEL)) - - # -fstack-protector-strong triggers protection checks in this code, - # but it is being used too early to link to meaningful stack_chk logic. ---- a/arch/arm/kernel/vmlinux.lds.S -+++ b/arch/arm/kernel/vmlinux.lds.S -@@ -75,7 +75,7 @@ SECTIONS - . = ALIGN(4); - __ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET) { - __start___ex_table = .; -- ARM_MMU_KEEP(*(__ex_table)) -+ KEEP(*(__ex_table)) - __stop___ex_table = .; - } - -@@ -100,24 +100,24 @@ SECTIONS - } - .init.arch.info : { - __arch_info_begin = .; -- *(.arch.info.init) -+ KEEP(*(.arch.info.init)) - __arch_info_end = .; - } - .init.tagtable : { - __tagtable_begin = .; -- *(.taglist.init) -+ KEEP(*(.taglist.init)) - __tagtable_end = .; - } - #ifdef CONFIG_SMP_ON_UP - .init.smpalt : { - __smpalt_begin = .; -- *(.alt.smp.init) -+ KEEP(*(.alt.smp.init)) - __smpalt_end = .; - } - #endif - .init.pv_table : { - __pv_table_begin = .; -- *(.pv_table) -+ KEEP(*(.pv_table)) - __pv_table_end = .; - } - ---- a/arch/arm/include/asm/vmlinux.lds.h -+++ b/arch/arm/include/asm/vmlinux.lds.h -@@ -29,13 +29,13 @@ - #define PROC_INFO \ - . = ALIGN(4); \ - __proc_info_begin = .; \ -- *(.proc.info.init) \ -+ KEEP(*(.proc.info.init)) \ - __proc_info_end = .; - - #define IDMAP_TEXT \ - ALIGN_FUNCTION(); \ - __idmap_text_start = .; \ -- *(.idmap.text) \ -+ KEEP(*(.idmap.text)) \ - __idmap_text_end = .; \ - - #define ARM_DISCARD \ -@@ -96,12 +96,12 @@ - . = ALIGN(8); \ - .ARM.unwind_idx : { \ - __start_unwind_idx = .; \ -- *(.ARM.exidx*) \ -+ KEEP(*(.ARM.exidx*)) \ - __stop_unwind_idx = .; \ - } \ - .ARM.unwind_tab : { \ - __start_unwind_tab = .; \ -- *(.ARM.extab*) \ -+ KEEP(*(.ARM.extab*)) \ - __stop_unwind_tab = .; \ - } - -@@ -112,14 +112,14 @@ - #define ARM_VECTORS \ - __vectors_start = .; \ - .vectors 0xffff0000 : AT(__vectors_start) { \ -- *(.vectors) \ -+ KEEP(*(.vectors)) \ - } \ - . = __vectors_start + SIZEOF(.vectors); \ - __vectors_end = .; \ - \ - __stubs_start = .; \ - .stubs ADDR(.vectors) + 0x1000 : AT(__stubs_start) { \ -- *(.stubs) \ -+ KEEP(*(.stubs)) \ - } \ - . = __stubs_start + SIZEOF(.stubs); \ - __stubs_end = .; \ diff --git a/root/target/linux/generic/hack-5.15/221-module_exports.patch b/root/target/linux/generic/hack-5.15/221-module_exports.patch index 65cee1a5..0153d3a5 100755 --- a/root/target/linux/generic/hack-5.15/221-module_exports.patch +++ b/root/target/linux/generic/hack-5.15/221-module_exports.patch @@ -30,7 +30,7 @@ Signed-off-by: Felix Fietkau /* Align . to a 8 byte boundary equals to maximum function alignment. */ #define ALIGN_FUNCTION() . = ALIGN(8) -@@ -484,14 +494,14 @@ +@@ -486,14 +496,14 @@ /* Kernel symbol table: Normal symbols */ \ __ksymtab : AT(ADDR(__ksymtab) - LOAD_OFFSET) { \ __start___ksymtab = .; \ @@ -47,7 +47,7 @@ Signed-off-by: Felix Fietkau __stop___ksymtab_gpl = .; \ } \ \ -@@ -511,7 +521,7 @@ +@@ -513,7 +523,7 @@ \ /* Kernel symbol table: strings */ \ __ksymtab_strings : AT(ADDR(__ksymtab_strings) - LOAD_OFFSET) { \ @@ -56,7 +56,7 @@ Signed-off-by: Felix Fietkau } \ \ /* __*init sections */ \ -@@ -1018,6 +1028,8 @@ +@@ -1009,6 +1019,8 @@ #define COMMON_DISCARDS \ SANITIZER_DISCARDS \ @@ -91,7 +91,7 @@ Signed-off-by: Felix Fietkau "__kstrtabns_" #sym ": \n" \ --- a/scripts/Makefile.build +++ b/scripts/Makefile.build -@@ -385,7 +385,7 @@ targets += $(real-dtb-y) $(lib-y) $(alwa +@@ -358,7 +358,7 @@ targets += $(real-dtb-y) $(lib-y) $(alwa # Linker scripts preprocessor (.lds.S -> .lds) # --------------------------------------------------------------------------- quiet_cmd_cpp_lds_S = LDS $@ diff --git a/root/target/linux/generic/hack-5.15/230-openwrt_lzma_options.patch b/root/target/linux/generic/hack-5.15/230-openwrt_lzma_options.patch index 8aa5b7c5..6bc5d1de 100755 --- a/root/target/linux/generic/hack-5.15/230-openwrt_lzma_options.patch +++ b/root/target/linux/generic/hack-5.15/230-openwrt_lzma_options.patch @@ -23,7 +23,7 @@ Signed-off-by: Imre Kaloz { {0x02, 0x21}, "lz4", unlz4 }, --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib -@@ -413,7 +413,7 @@ quiet_cmd_bzip2 = BZIP2 $@ +@@ -408,7 +408,7 @@ quiet_cmd_bzip2 = BZIP2 $@ # --------------------------------------------------------------------------- quiet_cmd_lzma = LZMA $@ diff --git a/root/target/linux/generic/hack-5.15/251-kconfig.patch b/root/target/linux/generic/hack-5.15/251-kconfig.patch index ea830272..004f18c0 100755 --- a/root/target/linux/generic/hack-5.15/251-kconfig.patch +++ b/root/target/linux/generic/hack-5.15/251-kconfig.patch @@ -92,7 +92,7 @@ Signed-off-by: John Crispin bool --- a/lib/Kconfig +++ b/lib/Kconfig -@@ -439,16 +439,16 @@ config BCH_CONST_T +@@ -433,16 +433,16 @@ config BCH_CONST_T # Textsearch support is select'ed if needed # config TEXTSEARCH diff --git a/root/target/linux/generic/hack-5.15/252-SATA_PMP.patch b/root/target/linux/generic/hack-5.15/252-SATA_PMP.patch deleted file mode 100755 index 6502d1d6..00000000 --- a/root/target/linux/generic/hack-5.15/252-SATA_PMP.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 8c817e33be829c7249c2cfd59ff48ad5fac6a31d Mon Sep 17 00:00:00 2001 -From: Sungbo Eo -Date: Fri, 7 Jul 2017 17:09:21 +0200 -Subject: [PATCH] kconfig: solidify SATA_PMP config - -SATA_PMP option in kernel config file disappears for every kernel_oldconfig refresh. -To prevent this, SATA_HOST is now selected automatically when SATA_PMP is enabled. -This patch can be dropped if SATA_MV is ever re-added into the config. ---- - drivers/ata/Kconfig | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/drivers/ata/Kconfig -+++ b/drivers/ata/Kconfig -@@ -112,7 +112,7 @@ config SATA_ZPODD - - config SATA_PMP - bool "SATA Port Multiplier support" -- depends on SATA_HOST -+ select SATA_HOST - default y - help - This option adds support for SATA Port Multipliers diff --git a/root/target/linux/generic/hack-5.15/259-regmap_dynamic.patch b/root/target/linux/generic/hack-5.15/259-regmap_dynamic.patch deleted file mode 100755 index d1d56a11..00000000 --- a/root/target/linux/generic/hack-5.15/259-regmap_dynamic.patch +++ /dev/null @@ -1,144 +0,0 @@ -From 811d9e2268a62b830cfe93cd8bc929afcb8b198b Mon Sep 17 00:00:00 2001 -From: Felix Fietkau -Date: Sat, 15 Jul 2017 21:12:38 +0200 -Subject: kernel: move regmap bloat out of the kernel image if it is only being used in modules - -lede-commit: 96f39119815028073583e4fca3a9c5fe9141e998 -Signed-off-by: Felix Fietkau ---- - drivers/base/regmap/Kconfig | 15 ++++++++++----- - drivers/base/regmap/Makefile | 12 ++++++++---- - drivers/base/regmap/regmap.c | 3 +++ - include/linux/regmap.h | 2 +- - 4 files changed, 22 insertions(+), 10 deletions(-) - ---- a/drivers/base/regmap/Kconfig -+++ b/drivers/base/regmap/Kconfig -@@ -4,10 +4,9 @@ - # subsystems should select the appropriate symbols. - - config REGMAP -- default y if (REGMAP_I2C || REGMAP_SPI || REGMAP_SPMI || REGMAP_W1 || REGMAP_AC97 || REGMAP_MMIO || REGMAP_IRQ || REGMAP_SOUNDWIRE || REGMAP_SOUNDWIRE_MBQ || REGMAP_SCCB || REGMAP_I3C || REGMAP_SPI_AVMM || REGMAP_MDIO) - select IRQ_DOMAIN if REGMAP_IRQ - select MDIO_BUS if REGMAP_MDIO -- bool -+ tristate - - config REGCACHE_COMPRESSED - select LZO_COMPRESS -@@ -15,53 +14,67 @@ config REGCACHE_COMPRESSED - bool - - config REGMAP_AC97 -+ select REGMAP - tristate - - config REGMAP_I2C -+ select REGMAP - tristate - depends on I2C - - config REGMAP_SLIMBUS -+ select REGMAP - tristate - depends on SLIMBUS - - config REGMAP_SPI -+ select REGMAP - tristate - depends on SPI - - config REGMAP_SPMI -+ select REGMAP - tristate - depends on SPMI - - config REGMAP_W1 -+ select REGMAP - tristate - depends on W1 - - config REGMAP_MDIO -+ select REGMAP - tristate - - config REGMAP_MMIO -+ select REGMAP - tristate - - config REGMAP_IRQ -+ select REGMAP - bool - - config REGMAP_SOUNDWIRE -+ select REGMAP - tristate - depends on SOUNDWIRE - - config REGMAP_SOUNDWIRE_MBQ -+ select REGMAP - tristate - depends on SOUNDWIRE - - config REGMAP_SCCB -+ select REGMAP - tristate - depends on I2C - - config REGMAP_I3C -+ select REGMAP - tristate - depends on I3C - - config REGMAP_SPI_AVMM -+ select REGMAP - tristate - depends on SPI ---- a/drivers/base/regmap/Makefile -+++ b/drivers/base/regmap/Makefile -@@ -2,10 +2,14 @@ - # For include/trace/define_trace.h to include trace.h - CFLAGS_regmap.o := -I$(src) - --obj-$(CONFIG_REGMAP) += regmap.o regcache.o --obj-$(CONFIG_REGMAP) += regcache-rbtree.o regcache-flat.o --obj-$(CONFIG_REGCACHE_COMPRESSED) += regcache-lzo.o --obj-$(CONFIG_DEBUG_FS) += regmap-debugfs.o -+regmap-core-objs = regmap.o regcache.o regcache-rbtree.o regcache-flat.o -+ifdef CONFIG_DEBUG_FS -+regmap-core-objs += regmap-debugfs.o -+endif -+ifdef CONFIG_REGCACHE_COMPRESSED -+regmap-core-objs += regcache-lzo.o -+endif -+obj-$(CONFIG_REGMAP) += regmap-core.o - obj-$(CONFIG_REGMAP_AC97) += regmap-ac97.o - obj-$(CONFIG_REGMAP_I2C) += regmap-i2c.o - obj-$(CONFIG_REGMAP_SLIMBUS) += regmap-slimbus.o ---- a/drivers/base/regmap/regmap.c -+++ b/drivers/base/regmap/regmap.c -@@ -9,6 +9,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -3339,3 +3340,5 @@ static int __init regmap_initcall(void) - return 0; - } - postcore_initcall(regmap_initcall); -+ -+MODULE_LICENSE("GPL"); ---- a/include/linux/regmap.h -+++ b/include/linux/regmap.h -@@ -180,7 +180,7 @@ struct reg_sequence { - __ret ?: __tmp; \ - }) - --#ifdef CONFIG_REGMAP -+#if IS_REACHABLE(CONFIG_REGMAP) - - enum regmap_endian { - /* Unspecified -> 0 -> Backwards compatible default */ diff --git a/root/target/linux/generic/hack-5.15/301-mips_image_cmdline_hack.patch b/root/target/linux/generic/hack-5.15/301-mips_image_cmdline_hack.patch index 15e233ac..993b1e6f 100755 --- a/root/target/linux/generic/hack-5.15/301-mips_image_cmdline_hack.patch +++ b/root/target/linux/generic/hack-5.15/301-mips_image_cmdline_hack.patch @@ -10,7 +10,7 @@ Signed-off-by: Gabor Juhos --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig -@@ -1180,6 +1180,10 @@ config MIPS_MSC +@@ -1202,6 +1202,10 @@ config MIPS_MSC config SYNC_R4K bool diff --git a/root/target/linux/generic/hack-5.15/401-mtd-super-don-t-reply-on-mtdblock-device-minor.patch b/root/target/linux/generic/hack-5.15/401-mtd-super-don-t-reply-on-mtdblock-device-minor.patch deleted file mode 100755 index 8f985c0b..00000000 --- a/root/target/linux/generic/hack-5.15/401-mtd-super-don-t-reply-on-mtdblock-device-minor.patch +++ /dev/null @@ -1,84 +0,0 @@ -From f9760b158f610b1792a222cc924073724c061bfb Mon Sep 17 00:00:00 2001 -From: Daniel Golle -Date: Wed, 7 Apr 2021 22:37:57 +0100 -Subject: [PATCH 1/2] mtd: super: don't reply on mtdblock device minor -To: linux-mtd@lists.infradead.org -Cc: Vignesh Raghavendra , - Richard Weinberger , - Miquel Raynal , - David Woodhouse - -For blktrans devices with partitions (ie. part_bits != 0) the -assumption that the minor number of the mtdblock device matches -the mtdnum doesn't hold true. -Properly resolve mtd device from blktrans layer instead. - -Signed-off-by: Daniel Golle ---- - drivers/mtd/mtdsuper.c | 33 ++++++++++++++++++++++++++------- - 1 file changed, 26 insertions(+), 7 deletions(-) - ---- a/drivers/mtd/mtdsuper.c -+++ b/drivers/mtd/mtdsuper.c -@@ -9,6 +9,7 @@ - */ - - #include -+#include - #include - #include - #include -@@ -120,8 +121,9 @@ int get_tree_mtd(struct fs_context *fc, - struct fs_context *fc)) - { - #ifdef CONFIG_BLOCK -- dev_t dev; -- int ret; -+ struct mtd_blktrans_dev *blktrans_dev; -+ struct block_device *bdev; -+ int ret, part_bits; - #endif - int mtdnr; - -@@ -169,16 +171,36 @@ int get_tree_mtd(struct fs_context *fc, - /* try the old way - the hack where we allowed users to mount - * /dev/mtdblock$(n) but didn't actually _use_ the blockdev - */ -- ret = lookup_bdev(fc->source, &dev); -- if (ret) { -+ bdev = blkdev_get_by_path(fc->source, FMODE_READ, NULL); -+ if (IS_ERR(bdev)) { -+ ret = PTR_ERR(bdev); - errorf(fc, "MTD: Couldn't look up '%s': %d", fc->source, ret); - return ret; - } -- pr_debug("MTDSB: lookup_bdev() returned 0\n"); -+ pr_debug("MTDSB: blkdev_get_by_path() returned 0\n"); - -- if (MAJOR(dev) == MTD_BLOCK_MAJOR) -- return mtd_get_sb_by_nr(fc, MINOR(dev), fill_super); -+ if (MAJOR(bdev->bd_dev) == MTD_BLOCK_MAJOR) { -+ if (!bdev->bd_disk) { -+ blkdev_put(bdev, FMODE_READ); -+ BUG(); -+ return -EINVAL; -+ } - -+ blktrans_dev = (struct mtd_blktrans_dev *)(bdev->bd_disk->private_data); -+ if (!blktrans_dev || !blktrans_dev->tr) { -+ blkdev_put(bdev, FMODE_READ); -+ BUG(); -+ return -EINVAL; -+ } -+ mtdnr = blktrans_dev->devnum; -+ part_bits = blktrans_dev->tr->part_bits; -+ blkdev_put(bdev, FMODE_READ); -+ if (MINOR(bdev->bd_dev) != (mtdnr << part_bits)) -+ return -EINVAL; -+ -+ return mtd_get_sb_by_nr(fc, mtdnr, fill_super); -+ } -+ blkdev_put(bdev, FMODE_READ); - #endif /* CONFIG_BLOCK */ - - if (!(fc->sb_flags & SB_SILENT)) diff --git a/root/target/linux/generic/hack-5.15/402-mtd-blktrans-call-add-disks-after-mtd-device.patch b/root/target/linux/generic/hack-5.15/402-mtd-blktrans-call-add-disks-after-mtd-device.patch deleted file mode 100755 index c9821b57..00000000 --- a/root/target/linux/generic/hack-5.15/402-mtd-blktrans-call-add-disks-after-mtd-device.patch +++ /dev/null @@ -1,98 +0,0 @@ -From 0bccc3722bdd88e8ae995e77ef9f7b77ee4cbdee Mon Sep 17 00:00:00 2001 -From: Daniel Golle -Date: Wed, 7 Apr 2021 22:45:54 +0100 -Subject: [PATCH 2/2] mtd: blktrans: call add disks after mtd device -To: linux-mtd@lists.infradead.org -Cc: Vignesh Raghavendra , - Richard Weinberger , - Miquel Raynal , - David Woodhouse - -Calling device_add_disk while holding mtd_table_mutex leads -to deadlock in case part_bits!=0 as block partition parsers -will try to open the newly created disks, trying to acquire -mutex once again. -Move device_add_disk to additional function called after -add partitions of an MTD device have been added and locks -have been released. - -Signed-off-by: Daniel Golle ---- - drivers/mtd/mtd_blkdevs.c | 33 ++++++++++++++++++++++++++------- - drivers/mtd/mtdcore.c | 3 +++ - include/linux/mtd/blktrans.h | 1 + - 3 files changed, 30 insertions(+), 7 deletions(-) - ---- a/drivers/mtd/mtd_blkdevs.c -+++ b/drivers/mtd/mtd_blkdevs.c -@@ -384,13 +384,6 @@ int add_mtd_blktrans_dev(struct mtd_blkt - if (new->readonly) - set_disk_ro(gd, 1); - -- device_add_disk(&new->mtd->dev, gd, NULL); -- -- if (new->disk_attributes) { -- ret = sysfs_create_group(&disk_to_dev(gd)->kobj, -- new->disk_attributes); -- WARN_ON(ret); -- } - return 0; - - out_free_tag_set: -@@ -402,6 +395,27 @@ out_list_del: - return ret; - } - -+void register_mtd_blktrans_devs(void) -+{ -+ struct mtd_blktrans_ops *tr; -+ struct mtd_blktrans_dev *dev, *next; -+ int ret; -+ -+ list_for_each_entry(tr, &blktrans_majors, list) { -+ list_for_each_entry_safe(dev, next, &tr->devs, list) { -+ if (disk_live(dev->disk)) -+ continue; -+ -+ device_add_disk(&dev->mtd->dev, dev->disk, NULL); -+ if (dev->disk_attributes) { -+ ret = sysfs_create_group(&disk_to_dev(dev->disk)->kobj, -+ dev->disk_attributes); -+ WARN_ON(ret); -+ } -+ } -+ } -+} -+ - int del_mtd_blktrans_dev(struct mtd_blktrans_dev *old) - { - unsigned long flags; ---- a/drivers/mtd/mtdcore.c -+++ b/drivers/mtd/mtdcore.c -@@ -31,6 +31,7 @@ - - #include - #include -+#include - - #include "mtdcore.h" - -@@ -1000,6 +1001,8 @@ int mtd_device_parse_register(struct mtd - - ret = mtd_otp_nvmem_add(mtd); - -+ register_mtd_blktrans_devs(); -+ - out: - if (ret && device_is_registered(&mtd->dev)) - del_mtd_device(mtd); ---- a/include/linux/mtd/blktrans.h -+++ b/include/linux/mtd/blktrans.h -@@ -76,6 +76,7 @@ extern int deregister_mtd_blktrans(struc - extern int add_mtd_blktrans_dev(struct mtd_blktrans_dev *dev); - extern int del_mtd_blktrans_dev(struct mtd_blktrans_dev *dev); - extern int mtd_blktrans_cease_background(struct mtd_blktrans_dev *dev); -+extern void register_mtd_blktrans_devs(void); - - /** - * module_mtd_blktrans() - Helper macro for registering a mtd blktrans driver diff --git a/root/target/linux/generic/hack-5.15/410-block-fit-partition-parser.patch b/root/target/linux/generic/hack-5.15/410-block-fit-partition-parser.patch deleted file mode 100755 index 2ac6cb03..00000000 --- a/root/target/linux/generic/hack-5.15/410-block-fit-partition-parser.patch +++ /dev/null @@ -1,220 +0,0 @@ ---- a/block/blk.h -+++ b/block/blk.h -@@ -354,6 +354,7 @@ void blk_free_ext_minor(unsigned int min - #define ADDPART_FLAG_NONE 0 - #define ADDPART_FLAG_RAID 1 - #define ADDPART_FLAG_WHOLEDISK 2 -+#define ADDPART_FLAG_ROOTDEV 4 - int bdev_add_partition(struct gendisk *disk, int partno, sector_t start, - sector_t length); - int bdev_del_partition(struct gendisk *disk, int partno); ---- a/block/partitions/Kconfig -+++ b/block/partitions/Kconfig -@@ -101,6 +101,13 @@ config ATARI_PARTITION - Say Y here if you would like to use hard disks under Linux which - were partitioned under the Atari OS. - -+config FIT_PARTITION -+ bool "Flattened-Image-Tree (FIT) partition support" if PARTITION_ADVANCED -+ default n -+ help -+ Say Y here if your system needs to mount the filesystem part of -+ a Flattened-Image-Tree (FIT) image commonly used with Das U-Boot. -+ - config IBM_PARTITION - bool "IBM disk label and partition support" - depends on PARTITION_ADVANCED && S390 ---- a/block/partitions/Makefile -+++ b/block/partitions/Makefile -@@ -8,6 +8,7 @@ obj-$(CONFIG_ACORN_PARTITION) += acorn.o - obj-$(CONFIG_AMIGA_PARTITION) += amiga.o - obj-$(CONFIG_ATARI_PARTITION) += atari.o - obj-$(CONFIG_AIX_PARTITION) += aix.o -+obj-$(CONFIG_FIT_PARTITION) += fit.o - obj-$(CONFIG_CMDLINE_PARTITION) += cmdline.o - obj-$(CONFIG_MAC_PARTITION) += mac.o - obj-$(CONFIG_LDM_PARTITION) += ldm.o ---- a/block/partitions/check.h -+++ b/block/partitions/check.h -@@ -58,6 +58,7 @@ int amiga_partition(struct parsed_partit - int atari_partition(struct parsed_partitions *state); - int cmdline_partition(struct parsed_partitions *state); - int efi_partition(struct parsed_partitions *state); -+int fit_partition(struct parsed_partitions *state); - int ibm_partition(struct parsed_partitions *); - int karma_partition(struct parsed_partitions *state); - int ldm_partition(struct parsed_partitions *state); -@@ -68,3 +69,5 @@ int sgi_partition(struct parsed_partitio - int sun_partition(struct parsed_partitions *state); - int sysv68_partition(struct parsed_partitions *state); - int ultrix_partition(struct parsed_partitions *state); -+ -+int parse_fit_partitions(struct parsed_partitions *state, u64 start_sector, u64 nr_sectors, int *slot, int add_remain); ---- a/block/partitions/core.c -+++ b/block/partitions/core.c -@@ -11,6 +11,10 @@ - #include - #include - #include -+#ifdef CONFIG_FIT_PARTITION -+#include -+#endif -+ - #include "check.h" - - static int (*check_part[])(struct parsed_partitions *) = { -@@ -47,6 +51,9 @@ static int (*check_part[])(struct parsed - #ifdef CONFIG_EFI_PARTITION - efi_partition, /* this must come before msdos */ - #endif -+#ifdef CONFIG_FIT_PARTITION -+ fit_partition, -+#endif - #ifdef CONFIG_SGI_PARTITION - sgi_partition, - #endif -@@ -597,6 +604,11 @@ static bool blk_add_partition(struct gen - (state->parts[p].flags & ADDPART_FLAG_RAID)) - md_autodetect_dev(part->bd_dev); - -+#ifdef CONFIG_FIT_PARTITION -+ if ((state->parts[p].flags & ADDPART_FLAG_ROOTDEV) && ROOT_DEV == 0) -+ ROOT_DEV = part_to_dev(part)->devt; -+#endif -+ - return true; - } - ---- a/drivers/mtd/ubi/block.c -+++ b/drivers/mtd/ubi/block.c -@@ -419,7 +419,11 @@ int ubiblock_create(struct ubi_volume_in - - gd->fops = &ubiblock_ops; - gd->major = ubiblock_major; -+#ifdef CONFIG_FIT_PARTITION -+ gd->minors = 0; -+#else - gd->minors = 1; -+#endif - gd->first_minor = idr_alloc(&ubiblock_minor_idr, dev, 0, 0, GFP_KERNEL); - if (gd->first_minor < 0) { - dev_err(disk_to_dev(gd), -@@ -428,6 +432,9 @@ int ubiblock_create(struct ubi_volume_in - goto out_cleanup_disk; - } - gd->private_data = dev; -+#ifdef CONFIG_FIT_PARTITION -+ gd->flags |= GENHD_FL_EXT_DEVT; -+#endif - sprintf(gd->disk_name, "ubiblock%d_%d", dev->ubi_num, dev->vol_id); - set_capacity(gd, disk_capacity); - dev->gd = gd; ---- a/block/partitions/efi.c -+++ b/block/partitions/efi.c -@@ -716,6 +716,9 @@ int efi_partition(struct parsed_partitio - gpt_entry *ptes = NULL; - u32 i; - unsigned ssz = queue_logical_block_size(state->disk->queue) / 512; -+#ifdef CONFIG_FIT_PARTITION -+ u32 extra_slot = 64; -+#endif - - if (!find_valid_gpt(state, &gpt, &ptes) || !gpt || !ptes) { - kfree(gpt); -@@ -749,6 +752,11 @@ int efi_partition(struct parsed_partitio - ARRAY_SIZE(ptes[i].partition_name)); - utf16_le_to_7bit(ptes[i].partition_name, label_max, info->volname); - state->parts[i + 1].has_info = true; -+#ifdef CONFIG_FIT_PARTITION -+ /* If this is a U-Boot FIT volume it may have subpartitions */ -+ if (!efi_guidcmp(ptes[i].partition_type_guid, PARTITION_LINUX_FIT_GUID)) -+ (void) parse_fit_partitions(state, start * ssz, size * ssz, &extra_slot, 1); -+#endif - } - kfree(ptes); - kfree(gpt); ---- a/block/partitions/efi.h -+++ b/block/partitions/efi.h -@@ -52,6 +52,9 @@ - #define PARTITION_LINUX_LVM_GUID \ - EFI_GUID( 0xe6d6d379, 0xf507, 0x44c2, \ - 0xa2, 0x3c, 0x23, 0x8f, 0x2a, 0x3d, 0xf9, 0x28) -+#define PARTITION_LINUX_FIT_GUID \ -+ EFI_GUID( 0xcae9be83, 0xb15f, 0x49cc, \ -+ 0x86, 0x3f, 0x08, 0x1b, 0x74, 0x4a, 0x2d, 0x93) - - typedef struct _gpt_header { - __le64 signature; ---- a/drivers/mtd/mtdblock.c -+++ b/drivers/mtd/mtdblock.c -@@ -338,7 +338,11 @@ static void mtdblock_remove_dev(struct m - static struct mtd_blktrans_ops mtdblock_tr = { - .name = "mtdblock", - .major = MTD_BLOCK_MAJOR, -+#ifdef CONFIG_FIT_PARTITION -+ .part_bits = 1, -+#else - .part_bits = 0, -+#endif - .blksize = 512, - .open = mtdblock_open, - .flush = mtdblock_flush, ---- a/drivers/mtd/mtd_blkdevs.c -+++ b/drivers/mtd/mtd_blkdevs.c -@@ -346,18 +346,8 @@ int add_mtd_blktrans_dev(struct mtd_blkt - gd->minors = 1 << tr->part_bits; - gd->fops = &mtd_block_ops; - -- if (tr->part_bits) -- if (new->devnum < 26) -- snprintf(gd->disk_name, sizeof(gd->disk_name), -- "%s%c", tr->name, 'a' + new->devnum); -- else -- snprintf(gd->disk_name, sizeof(gd->disk_name), -- "%s%c%c", tr->name, -- 'a' - 1 + new->devnum / 26, -- 'a' + new->devnum % 26); -- else -- snprintf(gd->disk_name, sizeof(gd->disk_name), -- "%s%d", tr->name, new->devnum); -+ snprintf(gd->disk_name, sizeof(gd->disk_name), -+ "%s%d", tr->name, new->devnum); - - set_capacity(gd, ((u64)new->size * tr->blksize) >> 9); - ---- a/block/partitions/msdos.c -+++ b/block/partitions/msdos.c -@@ -564,6 +564,15 @@ static void parse_minix(struct parsed_pa - #endif /* CONFIG_MINIX_SUBPARTITION */ - } - -+static void parse_fit_mbr(struct parsed_partitions *state, -+ sector_t offset, sector_t size, int origin) -+{ -+#ifdef CONFIG_FIT_PARTITION -+ u32 extra_slot = 64; -+ (void) parse_fit_partitions(state, offset, size, &extra_slot, 1); -+#endif /* CONFIG_FIT_PARTITION */ -+} -+ - static struct { - unsigned char id; - void (*parse)(struct parsed_partitions *, sector_t, sector_t, int); -@@ -575,6 +584,7 @@ static struct { - {UNIXWARE_PARTITION, parse_unixware}, - {SOLARIS_X86_PARTITION, parse_solaris_x86}, - {NEW_SOLARIS_X86_PARTITION, parse_solaris_x86}, -+ {FIT_PARTITION, parse_fit_mbr}, - {0, NULL}, - }; - ---- a/include/linux/msdos_partition.h -+++ b/include/linux/msdos_partition.h -@@ -31,6 +31,7 @@ enum msdos_sys_ind { - LINUX_LVM_PARTITION = 0x8e, - LINUX_RAID_PARTITION = 0xfd, /* autodetect RAID partition */ - -+ FIT_PARTITION = 0x2e, /* U-Boot uImage.FIT */ - SOLARIS_X86_PARTITION = 0x82, /* also Linux swap partitions */ - NEW_SOLARIS_X86_PARTITION = 0xbf, - diff --git a/root/target/linux/generic/hack-5.15/420-mtd-set-rootfs-to-be-root-dev.patch b/root/target/linux/generic/hack-5.15/420-mtd-set-rootfs-to-be-root-dev.patch index aa1d4df0..91a91b36 100755 --- a/root/target/linux/generic/hack-5.15/420-mtd-set-rootfs-to-be-root-dev.patch +++ b/root/target/linux/generic/hack-5.15/420-mtd-set-rootfs-to-be-root-dev.patch @@ -20,7 +20,7 @@ Signed-off-by: Gabor Juhos #include #include -@@ -696,6 +697,19 @@ int add_mtd_device(struct mtd_info *mtd) +@@ -694,6 +695,19 @@ int add_mtd_device(struct mtd_info *mtd) of this try_ nonsense, and no bitching about it either. :) */ __module_get(THIS_MODULE); diff --git a/root/target/linux/generic/hack-5.15/640-bridge-only-accept-EAP-locally.patch b/root/target/linux/generic/hack-5.15/640-bridge-only-accept-EAP-locally.patch index 15c1e342..29a4f7f3 100755 --- a/root/target/linux/generic/hack-5.15/640-bridge-only-accept-EAP-locally.patch +++ b/root/target/linux/generic/hack-5.15/640-bridge-only-accept-EAP-locally.patch @@ -12,7 +12,7 @@ Signed-off-by: Etienne Champetier --- a/net/bridge/br_input.c +++ b/net/bridge/br_input.c -@@ -108,10 +108,14 @@ int br_handle_frame_finish(struct net *n +@@ -103,10 +103,14 @@ int br_handle_frame_finish(struct net *n } } @@ -30,7 +30,7 @@ Signed-off-by: Etienne Champetier if (IS_ENABLED(CONFIG_INET) && --- a/net/bridge/br_private.h +++ b/net/bridge/br_private.h -@@ -468,6 +468,8 @@ struct net_bridge { +@@ -402,6 +402,8 @@ struct net_bridge { u16 group_fwd_mask; u16 group_fwd_mask_required; @@ -39,45 +39,3 @@ Signed-off-by: Etienne Champetier /* STP */ bridge_id designated_root; bridge_id bridge_id; ---- a/net/bridge/br_sysfs_br.c -+++ b/net/bridge/br_sysfs_br.c -@@ -197,6 +197,31 @@ static ssize_t group_fwd_mask_store(stru - } - static DEVICE_ATTR_RW(group_fwd_mask); - -+static ssize_t disable_eap_hack_show(struct device *d, -+ struct device_attribute *attr, -+ char *buf) -+{ -+ struct net_bridge *br = to_bridge(d); -+ return sprintf(buf, "%u\n", br->disable_eap_hack); -+} -+ -+static int set_disable_eap_hack(struct net_bridge *br, unsigned long val, -+ struct netlink_ext_ack *extack) -+{ -+ br->disable_eap_hack = !!val; -+ -+ return 0; -+} -+ -+static ssize_t disable_eap_hack_store(struct device *d, -+ struct device_attribute *attr, -+ const char *buf, -+ size_t len) -+{ -+ return store_bridge_parm(d, buf, len, set_disable_eap_hack); -+} -+static DEVICE_ATTR_RW(disable_eap_hack); -+ - static ssize_t priority_show(struct device *d, struct device_attribute *attr, - char *buf) - { -@@ -937,6 +962,7 @@ static struct attribute *bridge_attrs[] - &dev_attr_ageing_time.attr, - &dev_attr_stp_state.attr, - &dev_attr_group_fwd_mask.attr, -+ &dev_attr_disable_eap_hack.attr, - &dev_attr_priority.attr, - &dev_attr_bridge_id.attr, - &dev_attr_root_id.attr, diff --git a/root/target/linux/generic/hack-5.15/650-netfilter-add-xt_FLOWOFFLOAD-target.patch b/root/target/linux/generic/hack-5.15/650-netfilter-add-xt_FLOWOFFLOAD-target.patch index b48f981f..c303114c 100755 --- a/root/target/linux/generic/hack-5.15/650-netfilter-add-xt_FLOWOFFLOAD-target.patch +++ b/root/target/linux/generic/hack-5.15/650-netfilter-add-xt_FLOWOFFLOAD-target.patch @@ -98,7 +98,7 @@ Signed-off-by: Felix Fietkau obj-$(CONFIG_NETFILTER_XT_TARGET_LED) += xt_LED.o --- /dev/null +++ b/net/netfilter/xt_FLOWOFFLOAD.c -@@ -0,0 +1,656 @@ +@@ -0,0 +1,658 @@ +/* + * Copyright (C) 2018-2021 Felix Fietkau + * @@ -278,6 +278,8 @@ Signed-off-by: Felix Fietkau + hook->used = true; + } + spin_unlock_bh(&hooks_lock); ++ ++ cond_resched(); +} + +static void @@ -765,7 +767,7 @@ Signed-off-by: Felix Fietkau #include #include #include -@@ -397,8 +396,7 @@ flow_offload_lookup(struct nf_flowtable +@@ -407,8 +406,7 @@ flow_offload_lookup(struct nf_flowtable } EXPORT_SYMBOL_GPL(flow_offload_lookup); @@ -775,7 +777,7 @@ Signed-off-by: Felix Fietkau void (*iter)(struct flow_offload *flow, void *data), void *data) { -@@ -430,6 +428,7 @@ nf_flow_table_iterate(struct nf_flowtabl +@@ -440,6 +438,7 @@ nf_flow_table_iterate(struct nf_flowtabl return err; } diff --git a/root/target/linux/generic/hack-5.15/651-wireless_mesh_header.patch b/root/target/linux/generic/hack-5.15/651-wireless_mesh_header.patch index 12a031ec..0639ad4e 100755 --- a/root/target/linux/generic/hack-5.15/651-wireless_mesh_header.patch +++ b/root/target/linux/generic/hack-5.15/651-wireless_mesh_header.patch @@ -11,7 +11,7 @@ Signed-off-by: Imre Kaloz --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h -@@ -145,8 +145,8 @@ static inline bool dev_xmit_complete(int +@@ -144,8 +144,8 @@ static inline bool dev_xmit_complete(int #if defined(CONFIG_HYPERV_NET) # define LL_MAX_HEADER 128 diff --git a/root/target/linux/generic/hack-5.15/661-use_fq_codel_by_default.patch b/root/target/linux/generic/hack-5.15/661-use_fq_codel_by_default.patch index 35dbe426..c4168e2a 100755 --- a/root/target/linux/generic/hack-5.15/661-use_fq_codel_by_default.patch +++ b/root/target/linux/generic/hack-5.15/661-use_fq_codel_by_default.patch @@ -14,7 +14,7 @@ Signed-off-by: Felix Fietkau --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h -@@ -626,12 +626,13 @@ extern struct Qdisc_ops noop_qdisc_ops; +@@ -624,12 +624,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; diff --git a/root/target/linux/generic/hack-5.15/710-net-dsa-mv88e6xxx-default-VID-1.patch b/root/target/linux/generic/hack-5.15/710-net-dsa-mv88e6xxx-default-VID-1.patch index d0cefbfb..3c5d1b1d 100755 --- a/root/target/linux/generic/hack-5.15/710-net-dsa-mv88e6xxx-default-VID-1.patch +++ b/root/target/linux/generic/hack-5.15/710-net-dsa-mv88e6xxx-default-VID-1.patch @@ -1,6 +1,6 @@ --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c -@@ -2317,6 +2317,7 @@ static int mv88e6xxx_port_fdb_add(struct +@@ -2225,6 +2225,7 @@ static int mv88e6xxx_port_fdb_add(struct struct mv88e6xxx_chip *chip = ds->priv; int err; @@ -8,7 +8,7 @@ mv88e6xxx_reg_lock(chip); err = mv88e6xxx_port_db_load_purge(chip, port, addr, vid, MV88E6XXX_G1_ATU_DATA_STATE_UC_STATIC); -@@ -2331,6 +2332,7 @@ static int mv88e6xxx_port_fdb_del(struct +@@ -2239,6 +2240,7 @@ static int mv88e6xxx_port_fdb_del(struct struct mv88e6xxx_chip *chip = ds->priv; int err; diff --git a/root/target/linux/generic/hack-5.15/711-net-dsa-mv88e6xxx-disable-ATU-violation.patch b/root/target/linux/generic/hack-5.15/711-net-dsa-mv88e6xxx-disable-ATU-violation.patch index b94851cf..95b3894b 100755 --- a/root/target/linux/generic/hack-5.15/711-net-dsa-mv88e6xxx-disable-ATU-violation.patch +++ b/root/target/linux/generic/hack-5.15/711-net-dsa-mv88e6xxx-disable-ATU-violation.patch @@ -1,6 +1,6 @@ --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c -@@ -2979,6 +2979,9 @@ static int mv88e6xxx_setup_port(struct m +@@ -2817,6 +2817,9 @@ static int mv88e6xxx_setup_port(struct m else reg = 1 << port; diff --git a/root/target/linux/generic/hack-5.15/720-net-phy-add-aqr-phys.patch b/root/target/linux/generic/hack-5.15/720-net-phy-add-aqr-phys.patch deleted file mode 100755 index 51c9a9f8..00000000 --- a/root/target/linux/generic/hack-5.15/720-net-phy-add-aqr-phys.patch +++ /dev/null @@ -1,142 +0,0 @@ -From: Birger Koblitz -Date: Sun, 5 Sep 2021 15:13:10 +0200 -Subject: [PATCH] kernel: Add AQR113C and AQR813 support - -This hack adds support for the Aquantia 4th generation, 10GBit -PHYs AQR113C and AQR813. - -Signed-off-by: Birger Koblitz - ---- a/drivers/net/phy/aquantia_main.c -+++ b/drivers/net/phy/aquantia_main.c -@@ -20,8 +20,10 @@ - #define PHY_ID_AQR105 0x03a1b4a2 - #define PHY_ID_AQR106 0x03a1b4d0 - #define PHY_ID_AQR107 0x03a1b4e0 -+#define PHY_ID_AQR113C 0x31c31c12 - #define PHY_ID_AQCS109 0x03a1b5c2 - #define PHY_ID_AQR405 0x03a1b4b0 -+#define PHY_ID_AQR813 0x31c31cb2 - - #define MDIO_PHYXS_VEND_IF_STATUS 0xe812 - #define MDIO_PHYXS_VEND_IF_STATUS_TYPE_MASK GENMASK(7, 3) -@@ -359,6 +361,49 @@ static int aqr107_read_rate(struct phy_d - return 0; - } - -+static int aqr113c_read_status(struct phy_device *phydev) -+{ -+ int val, ret; -+ -+ ret = aqr_read_status(phydev); -+ if (ret) -+ return ret; -+ -+ if (!phydev->link || phydev->autoneg == AUTONEG_DISABLE) -+ return 0; -+ -+ // On AQR113C, the speed returned by aqr_read_status is wrong -+ aqr107_read_rate(phydev); -+ -+ val = phy_read_mmd(phydev, MDIO_MMD_PHYXS, MDIO_PHYXS_VEND_IF_STATUS); -+ if (val < 0) -+ return val; -+ -+ switch (FIELD_GET(MDIO_PHYXS_VEND_IF_STATUS_TYPE_MASK, val)) { -+ case MDIO_PHYXS_VEND_IF_STATUS_TYPE_KR: -+ phydev->interface = PHY_INTERFACE_MODE_10GKR; -+ break; -+ case MDIO_PHYXS_VEND_IF_STATUS_TYPE_XFI: -+ phydev->interface = PHY_INTERFACE_MODE_10GBASER; -+ break; -+ case MDIO_PHYXS_VEND_IF_STATUS_TYPE_USXGMII: -+ phydev->interface = PHY_INTERFACE_MODE_USXGMII; -+ break; -+ case MDIO_PHYXS_VEND_IF_STATUS_TYPE_SGMII: -+ phydev->interface = PHY_INTERFACE_MODE_SGMII; -+ break; -+ case MDIO_PHYXS_VEND_IF_STATUS_TYPE_OCSGMII: -+ phydev->interface = PHY_INTERFACE_MODE_2500BASEX; -+ break; -+ default: -+ phydev->interface = PHY_INTERFACE_MODE_NA; -+ break; -+ } -+ -+ /* Read downshifted rate from vendor register */ -+ return aqr107_read_rate(phydev); -+} -+ - static int aqr107_read_status(struct phy_device *phydev) - { - int val, ret; -@@ -489,7 +534,7 @@ static void aqr107_chip_info(struct phy_ - build_id = FIELD_GET(VEND1_GLOBAL_RSVD_STAT1_FW_BUILD_ID, val); - prov_id = FIELD_GET(VEND1_GLOBAL_RSVD_STAT1_PROV_ID, val); - -- phydev_dbg(phydev, "FW %u.%u, Build %u, Provisioning %u\n", -+ phydev_info(phydev, "FW %u.%u, Build %u, Provisioning %u\n", - fw_major, fw_minor, build_id, prov_id); - } - -@@ -661,6 +706,24 @@ static struct phy_driver aqr_driver[] = - .link_change_notify = aqr107_link_change_notify, - }, - { -+ PHY_ID_MATCH_MODEL(PHY_ID_AQR113C), -+ .name = "Aquantia AQR113C", -+ .probe = aqr107_probe, -+ .config_init = aqr107_config_init, -+ .config_aneg = aqr_config_aneg, -+ .config_intr = aqr_config_intr, -+ .ack_interrupt = aqr_ack_interrupt, -+ .read_status = aqr113c_read_status, -+ .get_tunable = aqr107_get_tunable, -+ .set_tunable = aqr107_set_tunable, -+ .suspend = aqr107_suspend, -+ .resume = aqr107_resume, -+ .get_sset_count = aqr107_get_sset_count, -+ .get_strings = aqr107_get_strings, -+ .get_stats = aqr107_get_stats, -+ .link_change_notify = aqr107_link_change_notify, -+}, -+{ - PHY_ID_MATCH_MODEL(PHY_ID_AQCS109), - .name = "Aquantia AQCS109", - .probe = aqr107_probe, -@@ -686,6 +749,24 @@ static struct phy_driver aqr_driver[] = - .handle_interrupt = aqr_handle_interrupt, - .read_status = aqr_read_status, - }, -+{ -+ PHY_ID_MATCH_MODEL(PHY_ID_AQR813), -+ .name = "Aquantia AQR813", -+ .probe = aqr107_probe, -+ .config_init = aqr107_config_init, -+ .config_aneg = aqr_config_aneg, -+ .config_intr = aqr_config_intr, -+ .ack_interrupt = aqr_ack_interrupt, -+ .read_status = aqr113c_read_status, -+ .get_tunable = aqr107_get_tunable, -+ .set_tunable = aqr107_set_tunable, -+ .suspend = aqr107_suspend, -+ .resume = aqr107_resume, -+ .get_sset_count = aqr107_get_sset_count, -+ .get_strings = aqr107_get_strings, -+ .get_stats = aqr107_get_stats, -+ .link_change_notify = aqr107_link_change_notify, -+}, - }; - - module_phy_driver(aqr_driver); -@@ -696,8 +777,10 @@ static struct mdio_device_id __maybe_unu - { PHY_ID_MATCH_MODEL(PHY_ID_AQR105) }, - { PHY_ID_MATCH_MODEL(PHY_ID_AQR106) }, - { PHY_ID_MATCH_MODEL(PHY_ID_AQR107) }, -+ { PHY_ID_MATCH_MODEL(PHY_ID_AQR113C) }, - { PHY_ID_MATCH_MODEL(PHY_ID_AQCS109) }, - { PHY_ID_MATCH_MODEL(PHY_ID_AQR405) }, -+ { PHY_ID_MATCH_MODEL(PHY_ID_AQR813) }, - { } - }; - diff --git a/root/target/linux/generic/hack-5.15/721-net-add-packet-mangeling.patch b/root/target/linux/generic/hack-5.15/721-net-add-packet-mangeling.patch deleted file mode 100755 index cea52fdc..00000000 --- a/root/target/linux/generic/hack-5.15/721-net-add-packet-mangeling.patch +++ /dev/null @@ -1,178 +0,0 @@ -From ffe387740bbe88dd88bbe04d6375902708003d6e Mon Sep 17 00:00:00 2001 -From: Felix Fietkau -Date: Fri, 7 Jul 2017 17:25:00 +0200 -Subject: net: add packet mangeling - -ar8216 switches have a hardware bug, which renders normal 802.1q support -unusable. Packet mangling is required to fix up the vlan for incoming -packets. - -Signed-off-by: Felix Fietkau ---- - include/linux/netdevice.h | 11 +++++++++++ - include/linux/skbuff.h | 14 ++++---------- - net/Kconfig | 6 ++++++ - net/core/dev.c | 20 +++++++++++++++----- - net/core/skbuff.c | 17 +++++++++++++++++ - net/ethernet/eth.c | 6 ++++++ - 6 files changed, 59 insertions(+), 15 deletions(-) - ---- a/include/linux/netdevice.h -+++ b/include/linux/netdevice.h -@@ -1648,6 +1648,10 @@ enum netdev_priv_flags { - IFF_TX_SKB_NO_LINEAR = 1<<31, - }; - -+enum netdev_extra_priv_flags { -+ IFF_NO_IP_ALIGN = 1<<0, -+}; -+ - #define IFF_802_1Q_VLAN IFF_802_1Q_VLAN - #define IFF_EBRIDGE IFF_EBRIDGE - #define IFF_BONDING IFF_BONDING -@@ -1680,6 +1684,7 @@ enum netdev_priv_flags { - #define IFF_L3MDEV_RX_HANDLER IFF_L3MDEV_RX_HANDLER - #define IFF_LIVE_RENAME_OK IFF_LIVE_RENAME_OK - #define IFF_TX_SKB_NO_LINEAR IFF_TX_SKB_NO_LINEAR -+#define IFF_NO_IP_ALIGN IFF_NO_IP_ALIGN - - /* Specifies the type of the struct net_device::ml_priv pointer */ - enum netdev_ml_priv_type { -@@ -1981,6 +1986,7 @@ struct net_device { - /* Read-mostly cache-line for fast-path access */ - unsigned int flags; - unsigned int priv_flags; -+ unsigned int extra_priv_flags; - const struct net_device_ops *netdev_ops; - int ifindex; - unsigned short gflags; -@@ -2041,6 +2047,11 @@ struct net_device { - const struct tlsdev_ops *tlsdev_ops; - #endif - -+#ifdef CONFIG_ETHERNET_PACKET_MANGLE -+ void (*eth_mangle_rx)(struct net_device *dev, struct sk_buff *skb); -+ struct sk_buff *(*eth_mangle_tx)(struct net_device *dev, struct sk_buff *skb); -+#endif -+ - const struct header_ops *header_ops; - - unsigned char operstate; -@@ -2115,6 +2126,10 @@ struct net_device { - struct mctp_dev __rcu *mctp_ptr; - #endif - -+#ifdef CONFIG_ETHERNET_PACKET_MANGLE -+ void *phy_ptr; /* PHY device specific data */ -+#endif -+ - /* - * Cache lines mostly used on receive path (including eth_type_trans()) - */ ---- a/include/linux/skbuff.h -+++ b/include/linux/skbuff.h -@@ -2758,6 +2758,10 @@ static inline int pskb_trim(struct sk_bu - return (len < skb->len) ? __pskb_trim(skb, len) : 0; - } - -+extern struct sk_buff *__netdev_alloc_skb_ip_align(struct net_device *dev, -+ unsigned int length, gfp_t gfp); -+ -+ - /** - * pskb_trim_unique - remove end from a paged unique (not cloned) buffer - * @skb: buffer to alter -@@ -2908,16 +2912,6 @@ static inline struct sk_buff *dev_alloc_ - } - - --static inline struct sk_buff *__netdev_alloc_skb_ip_align(struct net_device *dev, -- unsigned int length, gfp_t gfp) --{ -- struct sk_buff *skb = __netdev_alloc_skb(dev, length + NET_IP_ALIGN, gfp); -- -- if (NET_IP_ALIGN && skb) -- skb_reserve(skb, NET_IP_ALIGN); -- return skb; --} -- - static inline struct sk_buff *netdev_alloc_skb_ip_align(struct net_device *dev, - unsigned int length) - { ---- a/net/Kconfig -+++ b/net/Kconfig -@@ -26,6 +26,12 @@ menuconfig NET - - if NET - -+config ETHERNET_PACKET_MANGLE -+ bool -+ help -+ This option can be selected by phy drivers that need to mangle -+ packets going in or out of an ethernet device. -+ - config WANT_COMPAT_NETLINK_MESSAGES - bool - help ---- a/net/core/dev.c -+++ b/net/core/dev.c -@@ -3578,6 +3578,11 @@ static int xmit_one(struct sk_buff *skb, - if (dev_nit_active(dev)) - dev_queue_xmit_nit(skb, dev); - -+#ifdef CONFIG_ETHERNET_PACKET_MANGLE -+ if (dev->eth_mangle_tx && !(skb = dev->eth_mangle_tx(dev, skb))) -+ return NETDEV_TX_OK; -+#endif -+ - len = skb->len; - PRANDOM_ADD_NOISE(skb, dev, txq, len + jiffies); - trace_net_dev_start_xmit(skb, dev); ---- a/net/core/skbuff.c -+++ b/net/core/skbuff.c -@@ -61,6 +61,7 @@ - #include - #include - #include -+#include - - #include - #include -@@ -602,6 +603,22 @@ skb_fail: - } - EXPORT_SYMBOL(__napi_alloc_skb); - -+struct sk_buff *__netdev_alloc_skb_ip_align(struct net_device *dev, -+ unsigned int length, gfp_t gfp) -+{ -+ struct sk_buff *skb = __netdev_alloc_skb(dev, length + NET_IP_ALIGN, gfp); -+ -+#ifdef CONFIG_ETHERNET_PACKET_MANGLE -+ if (dev && (dev->extra_priv_flags & IFF_NO_IP_ALIGN)) -+ return skb; -+#endif -+ -+ if (NET_IP_ALIGN && skb) -+ skb_reserve(skb, NET_IP_ALIGN); -+ return skb; -+} -+EXPORT_SYMBOL(__netdev_alloc_skb_ip_align); -+ - void skb_add_rx_frag(struct sk_buff *skb, int i, struct page *page, int off, - int size, unsigned int truesize) - { ---- a/net/ethernet/eth.c -+++ b/net/ethernet/eth.c -@@ -170,6 +170,12 @@ __be16 eth_type_trans(struct sk_buff *sk - const struct ethhdr *eth; - - skb->dev = dev; -+ -+#ifdef CONFIG_ETHERNET_PACKET_MANGLE -+ if (dev->eth_mangle_rx) -+ dev->eth_mangle_rx(dev, skb); -+#endif -+ - skb_reset_mac_header(skb); - - eth = (struct ethhdr *)skb->data; diff --git a/root/target/linux/generic/hack-5.15/760-net-usb-r8152-add-LED-configuration-from-OF.patch b/root/target/linux/generic/hack-5.15/760-net-usb-r8152-add-LED-configuration-from-OF.patch deleted file mode 100755 index 1b854608..00000000 --- a/root/target/linux/generic/hack-5.15/760-net-usb-r8152-add-LED-configuration-from-OF.patch +++ /dev/null @@ -1,74 +0,0 @@ -From 82985725e071f2a5735052f18e109a32aeac3a0b Mon Sep 17 00:00:00 2001 -From: David Bauer -Date: Sun, 26 Jul 2020 02:38:31 +0200 -Subject: [PATCH] net: usb: r8152: add LED configuration from OF - -This adds the ability to configure the LED configuration register using -OF. This way, the correct value for board specific LED configuration can -be determined. - -Signed-off-by: David Bauer ---- - drivers/net/usb/r8152.c | 23 +++++++++++++++++++++++ - 1 file changed, 23 insertions(+) - ---- a/drivers/net/usb/r8152.c -+++ b/drivers/net/usb/r8152.c -@@ -11,6 +11,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -6822,6 +6823,22 @@ static void rtl_tally_reset(struct r8152 - ocp_write_word(tp, MCU_TYPE_PLA, PLA_RSTTALLY, ocp_data); - } - -+static int r8152_led_configuration(struct r8152 *tp) -+{ -+ u32 led_data; -+ int ret; -+ -+ ret = of_property_read_u32(tp->udev->dev.of_node, "realtek,led-data", -+ &led_data); -+ -+ if (ret) -+ return ret; -+ -+ ocp_write_word(tp, MCU_TYPE_PLA, PLA_LEDSEL, led_data); -+ -+ return 0; -+} -+ - static void r8152b_init(struct r8152 *tp) - { - u32 ocp_data; -@@ -6863,6 +6880,8 @@ static void r8152b_init(struct r8152 *tp - ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_USB_CTRL); - ocp_data &= ~(RX_AGG_DISABLE | RX_ZERO_EN); - ocp_write_word(tp, MCU_TYPE_USB, USB_USB_CTRL, ocp_data); -+ -+ r8152_led_configuration(tp); - } - - static void r8153_init(struct r8152 *tp) -@@ -7003,6 +7022,8 @@ static void r8153_init(struct r8152 *tp) - tp->coalesce = COALESCE_SLOW; - break; - } -+ -+ r8152_led_configuration(tp); - } - - static void r8153b_init(struct r8152 *tp) -@@ -7085,6 +7106,8 @@ static void r8153b_init(struct r8152 *tp - rtl_tally_reset(tp); - - tp->coalesce = 15000; /* 15 us */ -+ -+ r8152_led_configuration(tp); - } - - static void r8153c_init(struct r8152 *tp) diff --git a/root/target/linux/generic/hack-5.15/761-dt-bindings-net-add-RTL8152-binding-documentation.patch b/root/target/linux/generic/hack-5.15/761-dt-bindings-net-add-RTL8152-binding-documentation.patch deleted file mode 100755 index be262b99..00000000 --- a/root/target/linux/generic/hack-5.15/761-dt-bindings-net-add-RTL8152-binding-documentation.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 3ee05f4aa64fc86af3be5bc176ba5808de9260a7 Mon Sep 17 00:00:00 2001 -From: David Bauer -Date: Sun, 26 Jul 2020 15:30:33 +0200 -Subject: [PATCH] dt-bindings: net: add RTL8152 binding documentation - -Add binding documentation for the Realtek RTL8152 / RTL8153 USB ethernet -adapters. - -Signed-off-by: David Bauer ---- - .../bindings/net/realtek,rtl8152.yaml | 36 +++++++++++++++++++ - 1 file changed, 36 insertions(+) - create mode 100644 Documentation/devicetree/bindings/net/realtek,rtl8152.yaml - ---- /dev/null -+++ b/Documentation/devicetree/bindings/net/realtek,rtl8152.yaml -@@ -0,0 +1,36 @@ -+# SPDX-License-Identifier: GPL-2.0 -+%YAML 1.2 -+--- -+$id: http://devicetree.org/schemas/net/realtek,rtl8152.yaml# -+$schema: http://devicetree.org/meta-schemas/core.yaml# -+ -+title: Realtek RTL8152/RTL8153 series USB ethernet -+ -+maintainers: -+ - David Bauer -+ -+properties: -+ compatible: -+ oneOf: -+ - items: -+ - enum: -+ - realtek,rtl8152 -+ - realtek,rtl8153 -+ -+ reg: -+ description: The device number on the USB bus -+ -+ realtek,led-data: -+ description: Value to be written to the LED configuration register. -+ -+required: -+ - compatible -+ - reg -+ -+examples: -+ - | -+ usb-eth@2 { -+ compatible = "realtek,rtl8153"; -+ reg = <2>; -+ realtek,led-data = <0x87>; -+ }; -\ No newline at end of file diff --git a/root/target/linux/generic/hack-5.15/773-bgmac-add-srab-switch.patch b/root/target/linux/generic/hack-5.15/773-bgmac-add-srab-switch.patch index 1e4fc446..cc6eddbf 100755 --- a/root/target/linux/generic/hack-5.15/773-bgmac-add-srab-switch.patch +++ b/root/target/linux/generic/hack-5.15/773-bgmac-add-srab-switch.patch @@ -14,7 +14,7 @@ Signed-off-by: Hauke Mehrtens --- a/drivers/net/ethernet/broadcom/bgmac-bcma.c +++ b/drivers/net/ethernet/broadcom/bgmac-bcma.c -@@ -280,6 +280,7 @@ static int bgmac_probe(struct bcma_devic +@@ -268,6 +268,7 @@ static int bgmac_probe(struct bcma_devic bgmac->feature_flags |= BGMAC_FEAT_CLKCTLST; bgmac->feature_flags |= BGMAC_FEAT_NO_RESET; bgmac->feature_flags |= BGMAC_FEAT_FORCE_SPEED_2500; @@ -55,7 +55,7 @@ Signed-off-by: Hauke Mehrtens net_dev->max_mtu = BGMAC_RX_MAX_FRAME_SIZE - ETH_FCS_LEN; + if ((bgmac->feature_flags & BGMAC_FEAT_SRAB) && !bgmac_b53_pdata.regs) { -+ bgmac_b53_pdata.regs = ioremap(0x18007000, 0x1000); ++ bgmac_b53_pdata.regs = ioremap_nocache(0x18007000, 0x1000); + + err = platform_device_register(&bgmac_b53_dev); + if (!err) diff --git a/root/target/linux/generic/hack-5.15/780-net-ipheth-fix-RX-EOVERFLOW.patch b/root/target/linux/generic/hack-5.15/780-net-ipheth-fix-RX-EOVERFLOW.patch new file mode 100755 index 00000000..7d7c5aa4 --- /dev/null +++ b/root/target/linux/generic/hack-5.15/780-net-ipheth-fix-RX-EOVERFLOW.patch @@ -0,0 +1,52 @@ +From dd109ded2b526636fff438d33433ab64ffd21583 Mon Sep 17 00:00:00 2001 +From: Georgi Valkov +Date: Fri, 16 Apr 2021 20:44:36 +0300 +Subject: [PATCH] ipheth: fix EOVERFLOW in ipheth_rcvbulk_callback + +When rx_buf is allocated we need to account for IPHETH_IP_ALIGN, +which reduces the usable size by 2 bytes. Otherwise we have 1512 +bytes usable instead of 1514, and if we receive more than 1512 +bytes, ipheth_rcvbulk_callback is called with status -EOVERFLOW, +after which the driver malfunctiones and all communication stops. + +Fixes: ipheth 2-1:4.2: ipheth_rcvbulk_callback: urb status: -75 + +Signed-off-by: Georgi Valkov +--- + drivers/net/usb/ipheth.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/drivers/net/usb/ipheth.c b/drivers/net/usb/ipheth.c +index 207e59e74935..06d9f19ca142 100644 +--- a/drivers/net/usb/ipheth.c ++++ b/drivers/net/usb/ipheth.c +@@ -121,7 +121,7 @@ static int ipheth_alloc_urbs(struct ipheth_device *iphone) + if (tx_buf == NULL) + goto free_rx_urb; + +- rx_buf = usb_alloc_coherent(iphone->udev, IPHETH_BUF_SIZE, ++ rx_buf = usb_alloc_coherent(iphone->udev, IPHETH_BUF_SIZE + IPHETH_IP_ALIGN, + GFP_KERNEL, &rx_urb->transfer_dma); + if (rx_buf == NULL) + goto free_tx_buf; +@@ -146,7 +146,7 @@ static int ipheth_alloc_urbs(struct ipheth_device *iphone) + + static void ipheth_free_urbs(struct ipheth_device *iphone) + { +- usb_free_coherent(iphone->udev, IPHETH_BUF_SIZE, iphone->rx_buf, ++ usb_free_coherent(iphone->udev, IPHETH_BUF_SIZE + IPHETH_IP_ALIGN, iphone->rx_buf, + iphone->rx_urb->transfer_dma); + usb_free_coherent(iphone->udev, IPHETH_BUF_SIZE, iphone->tx_buf, + iphone->tx_urb->transfer_dma); +@@ -317,7 +317,7 @@ static int ipheth_rx_submit(struct ipheth_device *dev, gfp_t mem_flags) + + usb_fill_bulk_urb(dev->rx_urb, udev, + usb_rcvbulkpipe(udev, dev->bulk_in), +- dev->rx_buf, IPHETH_BUF_SIZE, ++ dev->rx_buf, IPHETH_BUF_SIZE + IPHETH_IP_ALIGN, + ipheth_rcvbulk_callback, + dev); + dev->rx_urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP; +-- +2.31.1 + diff --git a/root/target/linux/generic/hack-5.15/800-GPIO-add-named-gpio-exports.patch b/root/target/linux/generic/hack-5.15/800-GPIO-add-named-gpio-exports.patch index 40c3309f..76f89acd 100755 --- a/root/target/linux/generic/hack-5.15/800-GPIO-add-named-gpio-exports.patch +++ b/root/target/linux/generic/hack-5.15/800-GPIO-add-named-gpio-exports.patch @@ -15,9 +15,9 @@ Signed-off-by: John Crispin #include "gpiolib.h" #include "gpiolib-of.h" -@@ -1052,3 +1054,72 @@ void of_gpio_dev_init(struct gpio_chip * - else - gc->of_node = gdev->dev.of_node; +@@ -1039,3 +1041,72 @@ void of_gpiochip_remove(struct gpio_chip + { + of_node_put(chip->of_node); } + +#ifdef CONFIG_GPIO_SYSFS @@ -129,7 +129,7 @@ Signed-off-by: John Crispin { --- a/drivers/gpio/gpiolib-sysfs.c +++ b/drivers/gpio/gpiolib-sysfs.c -@@ -564,7 +564,7 @@ static struct class gpio_class = { +@@ -572,7 +572,7 @@ static struct class gpio_class = { * * Returns zero on success, else an error. */ @@ -138,7 +138,7 @@ Signed-off-by: John Crispin { struct gpio_chip *chip; struct gpio_device *gdev; -@@ -626,6 +626,8 @@ int gpiod_export(struct gpio_desc *desc, +@@ -634,6 +634,8 @@ int gpiod_export(struct gpio_desc *desc, offset = gpio_chip_hwgpio(desc); if (chip->names && chip->names[offset]) ioname = chip->names[offset]; @@ -147,7 +147,7 @@ Signed-off-by: John Crispin dev = device_create_with_groups(&gpio_class, &gdev->dev, MKDEV(0, 0), data, gpio_groups, -@@ -647,6 +649,12 @@ err_unlock: +@@ -655,6 +657,12 @@ err_unlock: gpiod_dbg(desc, "%s: status %d\n", __func__, status); return status; } diff --git a/root/target/linux/generic/hack-5.15/901-debloat_sock_diag.patch b/root/target/linux/generic/hack-5.15/901-debloat_sock_diag.patch index 44f0e617..34e73831 100755 --- a/root/target/linux/generic/hack-5.15/901-debloat_sock_diag.patch +++ b/root/target/linux/generic/hack-5.15/901-debloat_sock_diag.patch @@ -16,7 +16,7 @@ Signed-off-by: Felix Fietkau --- a/net/Kconfig +++ b/net/Kconfig -@@ -104,6 +104,9 @@ source "net/mptcp/Kconfig" +@@ -98,6 +98,9 @@ source "net/mptcp/Kconfig" endif # if INET @@ -58,7 +58,7 @@ Signed-off-by: Felix Fietkau static void sock_inuse_add(struct net *net, int val); -@@ -545,6 +547,18 @@ discard_and_relse: +@@ -544,6 +546,18 @@ discard_and_relse: } EXPORT_SYMBOL(__sk_receive_skb); @@ -77,7 +77,7 @@ Signed-off-by: Felix Fietkau INDIRECT_CALLABLE_DECLARE(struct dst_entry *ip6_dst_check(struct dst_entry *, u32)); INDIRECT_CALLABLE_DECLARE(struct dst_entry *ipv4_dst_check(struct dst_entry *, -@@ -1981,9 +1995,11 @@ static void __sk_free(struct sock *sk) +@@ -1967,9 +1981,11 @@ static void __sk_free(struct sock *sk) if (likely(sk->sk_net_refcnt)) sock_inuse_add(sock_net(sk), -1); @@ -152,7 +152,7 @@ Signed-off-by: Felix Fietkau Support for PF_PACKET sockets monitoring interface used by the ss tool. --- a/net/unix/Kconfig +++ b/net/unix/Kconfig -@@ -33,6 +33,7 @@ config AF_UNIX_OOB +@@ -28,6 +28,7 @@ config UNIX_SCM config UNIX_DIAG tristate "UNIX: socket monitoring interface" depends on UNIX diff --git a/root/target/linux/generic/hack-5.15/902-debloat_proc.patch b/root/target/linux/generic/hack-5.15/902-debloat_proc.patch index 0b2d5e31..349a2c02 100755 --- a/root/target/linux/generic/hack-5.15/902-debloat_proc.patch +++ b/root/target/linux/generic/hack-5.15/902-debloat_proc.patch @@ -29,7 +29,7 @@ Signed-off-by: Felix Fietkau --- a/fs/locks.c +++ b/fs/locks.c -@@ -2929,6 +2929,8 @@ static const struct seq_operations locks +@@ -3044,6 +3044,8 @@ static const struct seq_operations locks static int __init proc_locks_init(void) { @@ -158,7 +158,7 @@ Signed-off-by: Felix Fietkau IPC_SEM_IDS, sysvipc_sem_proc_show); --- a/ipc/shm.c +++ b/ipc/shm.c -@@ -154,6 +154,8 @@ pure_initcall(ipc_ns_init); +@@ -144,6 +144,8 @@ pure_initcall(ipc_ns_init); void __init shm_init(void) { @@ -235,7 +235,7 @@ Signed-off-by: Felix Fietkau if (!pe) --- a/mm/vmalloc.c +++ b/mm/vmalloc.c -@@ -3961,6 +3961,8 @@ static const struct seq_operations vmall +@@ -3899,6 +3899,8 @@ static const struct seq_operations vmall static int __init proc_vmalloc_init(void) { @@ -246,7 +246,7 @@ Signed-off-by: Felix Fietkau &vmalloc_op, --- a/mm/vmstat.c +++ b/mm/vmstat.c -@@ -2083,10 +2083,12 @@ void __init init_mm_internals(void) +@@ -2044,10 +2044,12 @@ void __init init_mm_internals(void) start_shepherd_timer(); #endif #ifdef CONFIG_PROC_FS @@ -330,7 +330,7 @@ Signed-off-by: Felix Fietkau --- a/net/core/sock.c +++ b/net/core/sock.c -@@ -3853,6 +3853,8 @@ static __net_initdata struct pernet_oper +@@ -3839,6 +3839,8 @@ static __net_initdata struct pernet_oper static int __init proto_init(void) { @@ -396,7 +396,7 @@ Signed-off-by: Felix Fietkau } --- a/net/ipv4/route.c +++ b/net/ipv4/route.c -@@ -387,6 +387,9 @@ static struct pernet_operations ip_rt_pr +@@ -386,6 +386,9 @@ static struct pernet_operations ip_rt_pr static int __init ip_rt_proc_init(void) { diff --git a/root/target/linux/generic/hack-5.15/904-debloat_dma_buf.patch b/root/target/linux/generic/hack-5.15/904-debloat_dma_buf.patch deleted file mode 100755 index fc7cd209..00000000 --- a/root/target/linux/generic/hack-5.15/904-debloat_dma_buf.patch +++ /dev/null @@ -1,92 +0,0 @@ -From e3692cb2fcd5ba1244512a0f43b8118f65f1c375 Mon Sep 17 00:00:00 2001 -From: Felix Fietkau -Date: Sat, 8 Jul 2017 08:20:43 +0200 -Subject: debloat: dmabuf - -Signed-off-by: Felix Fietkau ---- - drivers/base/Kconfig | 2 +- - drivers/dma-buf/Makefile | 10 +++++++--- - drivers/dma-buf/dma-buf.c | 4 +++- - kernel/sched/core.c | 1 + - 4 files changed, 12 insertions(+), 5 deletions(-) - ---- a/drivers/base/Kconfig -+++ b/drivers/base/Kconfig -@@ -187,7 +187,7 @@ config SOC_BUS - source "drivers/base/regmap/Kconfig" - - config DMA_SHARED_BUFFER -- bool -+ tristate - default n - select IRQ_WORK - help ---- a/drivers/dma-buf/heaps/Makefile -+++ b/drivers/dma-buf/heaps/Makefile -@@ -1,3 +1,3 @@ - # SPDX-License-Identifier: GPL-2.0 --obj-$(CONFIG_DMABUF_HEAPS_SYSTEM) += system_heap.o --obj-$(CONFIG_DMABUF_HEAPS_CMA) += cma_heap.o -+dma-buf-objs-$(CONFIG_DMABUF_HEAPS_SYSTEM) += system_heap.o -+dma-buf-objs-$(CONFIG_DMABUF_HEAPS_CMA) += cma_heap.o ---- a/drivers/dma-buf/Makefile -+++ b/drivers/dma-buf/Makefile -@@ -1,16 +1,20 @@ - # SPDX-License-Identifier: GPL-2.0-only --obj-y := dma-buf.o dma-fence.o dma-fence-array.o dma-fence-chain.o \ -+obj-$(CONFIG_DMA_SHARED_BUFFER) := dma-shared-buffer.o -+ -+dma-buf-objs-y := dma-buf.o dma-fence.o dma-fence-array.o dma-fence-chain.o \ - dma-resv.o seqno-fence.o --obj-$(CONFIG_DMABUF_HEAPS) += dma-heap.o --obj-$(CONFIG_DMABUF_HEAPS) += heaps/ --obj-$(CONFIG_SYNC_FILE) += sync_file.o --obj-$(CONFIG_SW_SYNC) += sw_sync.o sync_debug.o --obj-$(CONFIG_UDMABUF) += udmabuf.o --obj-$(CONFIG_DMABUF_SYSFS_STATS) += dma-buf-sysfs-stats.o -+dma-buf-objs-$(CONFIG_DMABUF_HEAPS) += dma-heap.o -+obj-$(CONFIG_DMABUF_HEAPS) += heaps/ -+dma-buf-objs-$(CONFIG_SYNC_FILE) += sync_file.o -+dma-buf-objs-$(CONFIG_SW_SYNC) += sw_sync.o sync_debug.o -+dma-buf-objs-$(CONFIG_UDMABUF) += udmabuf.o -+dma-buf-objs-$(CONFIG_DMABUF_SYSFS_STATS) += udmabuf.o - - dmabuf_selftests-y := \ - selftest.o \ - st-dma-fence.o \ - st-dma-fence-chain.o - --obj-$(CONFIG_DMABUF_SELFTESTS) += dmabuf_selftests.o -+dma-buf-objs-$(CONFIG_DMABUF_SELFTESTS) += dmabuf_selftests.o -+ -+dma-shared-buffer-objs := $(dma-buf-objs-y) ---- a/drivers/dma-buf/dma-buf.c -+++ b/drivers/dma-buf/dma-buf.c -@@ -1498,4 +1498,5 @@ static void __exit dma_buf_deinit(void) - kern_unmount(dma_buf_mnt); - dma_buf_uninit_sysfs_statistics(); - } --__exitcall(dma_buf_deinit); -+module_exit(dma_buf_deinit); -+MODULE_LICENSE("GPL"); ---- a/kernel/sched/core.c -+++ b/kernel/sched/core.c -@@ -4174,6 +4174,7 @@ int wake_up_state(struct task_struct *p, - { - return try_to_wake_up(p, state, 0); - } -+EXPORT_SYMBOL_GPL(wake_up_state); - - /* - * Perform scheduler related setup for a newly forked process p. ---- a/fs/d_path.c -+++ b/fs/d_path.c -@@ -316,6 +316,7 @@ char *dynamic_dname(struct dentry *dentr - buffer += buflen - sz; - return memcpy(buffer, temp, sz); - } -+EXPORT_SYMBOL_GPL(dynamic_dname); - - char *simple_dname(struct dentry *dentry, char *buffer, int buflen) - { diff --git a/root/target/linux/generic/pending-5.15/050-dtc-checks-Drop-interrupt-provider-address-cells-check.patch b/root/target/linux/generic/pending-5.15/050-dtc-checks-Drop-interrupt-provider-address-cells-check.patch deleted file mode 100755 index 75f63728..00000000 --- a/root/target/linux/generic/pending-5.15/050-dtc-checks-Drop-interrupt-provider-address-cells-check.patch +++ /dev/null @@ -1,28 +0,0 @@ -From d8d1a9a77863a8c7031ae82a1d461aa78eb72a7b Mon Sep 17 00:00:00 2001 -From: Rob Herring -Date: Mon, 11 Oct 2021 14:12:43 -0500 -Subject: [PATCH] checks: Drop interrupt provider '#address-cells' check - -'#address-cells' is only needed when parsing 'interrupt-map' properties, so -remove it from the common interrupt-provider test. - -Cc: Andre Przywara -Reviewed-by: David Gibson -Signed-off-by: Rob Herring -Message-Id: <20211011191245.1009682-3-robh@kernel.org> -Signed-off-by: David Gibson ---- ---- a/scripts/dtc/checks.c -+++ b/scripts/dtc/checks.c -@@ -1569,11 +1569,6 @@ static void check_interrupt_provider(str - if (!prop) - FAIL(c, dti, node, - "Missing #interrupt-cells in interrupt provider"); -- -- prop = get_property(node, "#address-cells"); -- if (!prop) -- FAIL(c, dti, node, -- "Missing #address-cells in interrupt provider"); - } - WARNING(interrupt_provider, check_interrupt_provider, NULL); - diff --git a/root/target/linux/generic/pending-5.15/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch b/root/target/linux/generic/pending-5.15/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch index f18b4c87..bf4ef8c7 100755 --- a/root/target/linux/generic/pending-5.15/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch +++ b/root/target/linux/generic/pending-5.15/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch @@ -71,7 +71,7 @@ Signed-off-by: Tobias Wolf --- a/mm/page_alloc.c +++ b/mm/page_alloc.c -@@ -7550,7 +7550,7 @@ static void __init alloc_node_mem_map(st +@@ -7544,7 +7544,7 @@ static void __ref alloc_node_mem_map(str if (pgdat == NODE_DATA(0)) { mem_map = NODE_DATA(0)->node_mem_map; if (page_to_pfn(mem_map) != pgdat->node_start_pfn) diff --git a/root/target/linux/generic/pending-5.15/130-add-linux-spidev-compatible-si3210.patch b/root/target/linux/generic/pending-5.15/130-add-linux-spidev-compatible-si3210.patch index d260cf1f..986149f4 100755 --- a/root/target/linux/generic/pending-5.15/130-add-linux-spidev-compatible-si3210.patch +++ b/root/target/linux/generic/pending-5.15/130-add-linux-spidev-compatible-si3210.patch @@ -8,11 +8,11 @@ Signed-off-by: Giuseppe Lippolis --- a/drivers/spi/spidev.c +++ b/drivers/spi/spidev.c -@@ -696,6 +696,7 @@ static const struct of_device_id spidev_ +@@ -682,6 +682,7 @@ static const struct of_device_id spidev_ + { .compatible = "lwn,bk4" }, + { .compatible = "dh,dhcom-board" }, { .compatible = "menlo,m53cpld" }, ++ { .compatible = "siliconlabs,si3210" }, { .compatible = "cisco,spi-petra" }, { .compatible = "micron,spi-authenta" }, -+ { .compatible = "siliconlabs,si3210" }, {}, - }; - MODULE_DEVICE_TABLE(of, spidev_dt_ids); diff --git a/root/target/linux/generic/pending-5.15/140-jffs2-use-.rename2-and-add-RENAME_WHITEOUT-support.patch b/root/target/linux/generic/pending-5.15/140-jffs2-use-.rename2-and-add-RENAME_WHITEOUT-support.patch deleted file mode 100755 index 8f40ae3b..00000000 --- a/root/target/linux/generic/pending-5.15/140-jffs2-use-.rename2-and-add-RENAME_WHITEOUT-support.patch +++ /dev/null @@ -1,81 +0,0 @@ -From: Felix Fietkau -Subject: jffs2: use .rename2 and add RENAME_WHITEOUT support - -It is required for renames on overlayfs - -Signed-off-by: Felix Fietkau ---- - ---- a/fs/jffs2/dir.c -+++ b/fs/jffs2/dir.c -@@ -614,8 +614,8 @@ static int jffs2_rmdir (struct inode *di - return ret; - } - --static int jffs2_mknod (struct user_namespace *mnt_userns, struct inode *dir_i, -- struct dentry *dentry, umode_t mode, dev_t rdev) -+static int __jffs2_mknod (struct user_namespace *mnt_userns, struct inode *dir_i, -+ struct dentry *dentry, umode_t mode, dev_t rdev, bool whiteout) - { - struct jffs2_inode_info *f, *dir_f; - struct jffs2_sb_info *c; -@@ -754,7 +754,11 @@ static int jffs2_mknod (struct user_name - mutex_unlock(&dir_f->sem); - jffs2_complete_reservation(c); - -- d_instantiate_new(dentry, inode); -+ if (!whiteout) -+ d_instantiate_new(dentry, inode); -+ else -+ unlock_new_inode(inode); -+ - return 0; - - fail: -@@ -762,6 +766,19 @@ static int jffs2_mknod (struct user_name - return ret; - } - -+static int jffs2_mknod (struct user_namespace *mnt_userns, struct inode *dir_i, -+ struct dentry *dentry, umode_t mode, dev_t rdev) -+{ -+ return __jffs2_mknod(mnt_userns, dir_i, dentry, mode, rdev, false); -+} -+ -+static int jffs2_whiteout (struct user_namespace *mnt_userns, struct inode *old_dir, -+ struct dentry *old_dentry) -+{ -+ return __jffs2_mknod(mnt_userns, old_dir, old_dentry, S_IFCHR | WHITEOUT_MODE, -+ WHITEOUT_DEV, true); -+} -+ - static int jffs2_rename (struct user_namespace *mnt_userns, - struct inode *old_dir_i, struct dentry *old_dentry, - struct inode *new_dir_i, struct dentry *new_dentry, -@@ -773,7 +790,7 @@ static int jffs2_rename (struct user_nam - uint8_t type; - uint32_t now; - -- if (flags & ~RENAME_NOREPLACE) -+ if (flags & ~(RENAME_NOREPLACE|RENAME_WHITEOUT)) - return -EINVAL; - - /* The VFS will check for us and prevent trying to rename a -@@ -839,9 +856,14 @@ static int jffs2_rename (struct user_nam - if (d_is_dir(old_dentry) && !victim_f) - inc_nlink(new_dir_i); - -- /* Unlink the original */ -- ret = jffs2_do_unlink(c, JFFS2_INODE_INFO(old_dir_i), -- old_dentry->d_name.name, old_dentry->d_name.len, NULL, now); -+ if (flags & RENAME_WHITEOUT) -+ /* Replace with whiteout */ -+ ret = jffs2_whiteout(mnt_userns, old_dir_i, old_dentry); -+ else -+ /* Unlink the original */ -+ ret = jffs2_do_unlink(c, JFFS2_INODE_INFO(old_dir_i), -+ old_dentry->d_name.name, -+ old_dentry->d_name.len, NULL, now); - - /* We don't touch inode->i_nlink */ - diff --git a/root/target/linux/generic/pending-5.15/141-jffs2-add-RENAME_EXCHANGE-support.patch b/root/target/linux/generic/pending-5.15/141-jffs2-add-RENAME_EXCHANGE-support.patch deleted file mode 100755 index f58fc791..00000000 --- a/root/target/linux/generic/pending-5.15/141-jffs2-add-RENAME_EXCHANGE-support.patch +++ /dev/null @@ -1,73 +0,0 @@ -From: Felix Fietkau -Subject: jffs2: add RENAME_EXCHANGE support - -Signed-off-by: Felix Fietkau ---- - ---- a/fs/jffs2/dir.c -+++ b/fs/jffs2/dir.c -@@ -787,18 +787,31 @@ static int jffs2_rename (struct user_nam - int ret; - struct jffs2_sb_info *c = JFFS2_SB_INFO(old_dir_i->i_sb); - struct jffs2_inode_info *victim_f = NULL; -+ struct inode *fst_inode = d_inode(old_dentry); -+ struct inode *snd_inode = d_inode(new_dentry); - uint8_t type; - uint32_t now; - -- if (flags & ~(RENAME_NOREPLACE|RENAME_WHITEOUT)) -+ if (flags & ~(RENAME_NOREPLACE|RENAME_WHITEOUT|RENAME_EXCHANGE)) - return -EINVAL; - -+ if ((flags & RENAME_EXCHANGE) && (old_dir_i != new_dir_i)) { -+ if (S_ISDIR(fst_inode->i_mode) && !S_ISDIR(snd_inode->i_mode)) { -+ inc_nlink(new_dir_i); -+ drop_nlink(old_dir_i); -+ } -+ else if (!S_ISDIR(fst_inode->i_mode) && S_ISDIR(snd_inode->i_mode)) { -+ drop_nlink(new_dir_i); -+ inc_nlink(old_dir_i); -+ } -+ } -+ - /* The VFS will check for us and prevent trying to rename a - * file over a directory and vice versa, but if it's a directory, - * the VFS can't check whether the victim is empty. The filesystem - * needs to do that for itself. - */ -- if (d_really_is_positive(new_dentry)) { -+ if (d_really_is_positive(new_dentry) && !(flags & RENAME_EXCHANGE)) { - victim_f = JFFS2_INODE_INFO(d_inode(new_dentry)); - if (d_is_dir(new_dentry)) { - struct jffs2_full_dirent *fd; -@@ -833,7 +846,7 @@ static int jffs2_rename (struct user_nam - if (ret) - return ret; - -- if (victim_f) { -+ if (victim_f && !(flags & RENAME_EXCHANGE)) { - /* There was a victim. Kill it off nicely */ - if (d_is_dir(new_dentry)) - clear_nlink(d_inode(new_dentry)); -@@ -859,6 +872,12 @@ static int jffs2_rename (struct user_nam - if (flags & RENAME_WHITEOUT) - /* Replace with whiteout */ - ret = jffs2_whiteout(mnt_userns, old_dir_i, old_dentry); -+ else if (flags & RENAME_EXCHANGE) -+ /* Replace the original */ -+ ret = jffs2_do_link(c, JFFS2_INODE_INFO(old_dir_i), -+ d_inode(new_dentry)->i_ino, type, -+ old_dentry->d_name.name, old_dentry->d_name.len, -+ now); - else - /* Unlink the original */ - ret = jffs2_do_unlink(c, JFFS2_INODE_INFO(old_dir_i), -@@ -890,7 +909,7 @@ static int jffs2_rename (struct user_nam - return ret; - } - -- if (d_is_dir(old_dentry)) -+ if (d_is_dir(old_dentry) && !(flags & RENAME_EXCHANGE)) - drop_nlink(old_dir_i); - - new_dir_i->i_mtime = new_dir_i->i_ctime = old_dir_i->i_mtime = old_dir_i->i_ctime = ITIME(now); diff --git a/root/target/linux/generic/pending-5.15/142-jffs2-add-splice-ops.patch b/root/target/linux/generic/pending-5.15/142-jffs2-add-splice-ops.patch deleted file mode 100755 index de847a1f..00000000 --- a/root/target/linux/generic/pending-5.15/142-jffs2-add-splice-ops.patch +++ /dev/null @@ -1,20 +0,0 @@ -From: Felix Fietkau -Subject: jffs2: add splice ops - -Add splice_read using generic_file_splice_read. -Add splice_write using iter_file_splice_write - -Signed-off-by: Felix Fietkau ---- - ---- a/fs/jffs2/file.c -+++ b/fs/jffs2/file.c -@@ -53,6 +53,8 @@ const struct file_operations jffs2_file_ - .open = generic_file_open, - .read_iter = generic_file_read_iter, - .write_iter = generic_file_write_iter, -+ .splice_read = generic_file_splice_read, -+ .splice_write = iter_file_splice_write, - .unlocked_ioctl=jffs2_ioctl, - .mmap = generic_file_readonly_mmap, - .fsync = jffs2_fsync, diff --git a/root/target/linux/generic/pending-5.15/150-bridge_allow_receiption_on_disabled_port.patch b/root/target/linux/generic/pending-5.15/150-bridge_allow_receiption_on_disabled_port.patch index 2b9570e9..bf97e987 100755 --- a/root/target/linux/generic/pending-5.15/150-bridge_allow_receiption_on_disabled_port.patch +++ b/root/target/linux/generic/pending-5.15/150-bridge_allow_receiption_on_disabled_port.patch @@ -15,7 +15,7 @@ Signed-off-by: Felix Fietkau --- a/net/bridge/br_input.c +++ b/net/bridge/br_input.c -@@ -197,6 +197,9 @@ static void __br_handle_local_finish(str +@@ -192,6 +192,9 @@ static void __br_handle_local_finish(str /* note: already called with rcu_read_lock */ static int br_handle_local_finish(struct net *net, struct sock *sk, struct sk_buff *skb) { @@ -25,7 +25,7 @@ Signed-off-by: Felix Fietkau __br_handle_local_finish(skb); /* return 1 to signal the okfn() was called so it's ok to use the skb */ -@@ -362,6 +365,17 @@ static rx_handler_result_t br_handle_fra +@@ -360,6 +363,17 @@ static rx_handler_result_t br_handle_fra forward: switch (p->state) { diff --git a/root/target/linux/generic/pending-5.15/201-extra_optimization.patch b/root/target/linux/generic/pending-5.15/201-extra_optimization.patch index 5300a5c4..8ca487f6 100755 --- a/root/target/linux/generic/pending-5.15/201-extra_optimization.patch +++ b/root/target/linux/generic/pending-5.15/201-extra_optimization.patch @@ -14,7 +14,7 @@ Signed-off-by: Felix Fietkau --- a/Makefile +++ b/Makefile -@@ -752,11 +752,11 @@ KBUILD_CFLAGS += $(call cc-disable-warni +@@ -763,11 +763,11 @@ KBUILD_CFLAGS += $(call cc-disable-warni KBUILD_CFLAGS += $(call cc-disable-warning, address-of-packed-member) ifdef CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE diff --git a/root/target/linux/generic/pending-5.15/203-kallsyms_uncompressed.patch b/root/target/linux/generic/pending-5.15/203-kallsyms_uncompressed.patch index 370fc97e..6e8dea3e 100755 --- a/root/target/linux/generic/pending-5.15/203-kallsyms_uncompressed.patch +++ b/root/target/linux/generic/pending-5.15/203-kallsyms_uncompressed.patch @@ -13,7 +13,7 @@ Signed-off-by: Felix Fietkau --- a/init/Kconfig +++ b/init/Kconfig -@@ -1438,6 +1438,17 @@ config SYSCTL_ARCH_UNALIGN_ALLOW +@@ -1410,6 +1410,17 @@ config SYSCTL_ARCH_UNALIGN_ALLOW the unaligned access emulation. see arch/parisc/kernel/unaligned.c for reference @@ -106,7 +106,7 @@ Signed-off-by: Felix Fietkau } --- a/scripts/link-vmlinux.sh +++ b/scripts/link-vmlinux.sh -@@ -260,6 +260,10 @@ kallsyms() +@@ -273,6 +273,10 @@ kallsyms() kallsymopt="${kallsymopt} --base-relative" fi diff --git a/root/target/linux/generic/pending-5.15/270-platform-mikrotik-build-bits.patch b/root/target/linux/generic/pending-5.15/270-platform-mikrotik-build-bits.patch index 99f83bb2..31f86f4a 100755 --- a/root/target/linux/generic/pending-5.15/270-platform-mikrotik-build-bits.patch +++ b/root/target/linux/generic/pending-5.15/270-platform-mikrotik-build-bits.patch @@ -16,16 +16,20 @@ Signed-off-by: Thibaut VARÈNE --- a/drivers/platform/Kconfig +++ b/drivers/platform/Kconfig -@@ -15,3 +15,5 @@ source "drivers/platform/mellanox/Kconfi +@@ -12,6 +12,8 @@ source "drivers/platform/chrome/Kconfig" + + source "drivers/platform/mellanox/Kconfig" + ++source "drivers/platform/mikrotik/Kconfig" ++ source "drivers/platform/olpc/Kconfig" source "drivers/platform/surface/Kconfig" -+ -+source "drivers/platform/mikrotik/Kconfig" --- a/drivers/platform/Makefile +++ b/drivers/platform/Makefile -@@ -10,3 +10,4 @@ obj-$(CONFIG_OLPC_EC) += olpc/ +@@ -9,4 +9,5 @@ obj-$(CONFIG_MIPS) += mips/ + obj-$(CONFIG_OLPC_EC) += olpc/ obj-$(CONFIG_GOLDFISH) += goldfish/ obj-$(CONFIG_CHROME_PLATFORMS) += chrome/ - obj-$(CONFIG_SURFACE_PLATFORMS) += surface/ +obj-$(CONFIG_MIKROTIK) += mikrotik/ + obj-$(CONFIG_SURFACE_PLATFORMS) += surface/ diff --git a/root/target/linux/generic/pending-5.15/300-mips_expose_boot_raw.patch b/root/target/linux/generic/pending-5.15/300-mips_expose_boot_raw.patch index 092f00b5..c94f40d1 100755 --- a/root/target/linux/generic/pending-5.15/300-mips_expose_boot_raw.patch +++ b/root/target/linux/generic/pending-5.15/300-mips_expose_boot_raw.patch @@ -9,7 +9,7 @@ Acked-by: Rob Landley --- --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig -@@ -1100,9 +1100,6 @@ config FW_ARC +@@ -1122,9 +1122,6 @@ config FW_ARC config ARCH_MAY_HAVE_PC_FDC bool @@ -19,7 +19,7 @@ Acked-by: Rob Landley config CEVT_BCM1480 bool -@@ -3178,6 +3175,18 @@ choice +@@ -3199,6 +3196,18 @@ choice bool "Extend builtin kernel arguments with bootloader arguments" endchoice diff --git a/root/target/linux/generic/pending-5.15/305-mips_module_reloc.patch b/root/target/linux/generic/pending-5.15/305-mips_module_reloc.patch index bbea1f61..13cd2d77 100755 --- a/root/target/linux/generic/pending-5.15/305-mips_module_reloc.patch +++ b/root/target/linux/generic/pending-5.15/305-mips_module_reloc.patch @@ -165,7 +165,6 @@ Signed-off-by: Felix Fietkau + page++; + } while (free); +} -+ + void *module_alloc(unsigned long size) { @@ -300,6 +299,7 @@ Signed-off-by: Felix Fietkau + me->arch.virt_plt_tbl, v); + +} ++ + static int apply_r_mips_26(struct module *me, u32 *location, u32 base, Elf_Addr v) diff --git a/root/target/linux/generic/pending-5.15/309-MIPS-Add-CPU-option-reporting-to-proc-cpuinfo.patch b/root/target/linux/generic/pending-5.15/309-MIPS-Add-CPU-option-reporting-to-proc-cpuinfo.patch index 318c0b1b..794f027f 100755 --- a/root/target/linux/generic/pending-5.15/309-MIPS-Add-CPU-option-reporting-to-proc-cpuinfo.patch +++ b/root/target/linux/generic/pending-5.15/309-MIPS-Add-CPU-option-reporting-to-proc-cpuinfo.patch @@ -17,7 +17,7 @@ Signed-off-by: Hauke Mehrtens --- a/arch/mips/kernel/proc.c +++ b/arch/mips/kernel/proc.c -@@ -138,6 +138,116 @@ static int show_cpuinfo(struct seq_file +@@ -138,6 +138,120 @@ static int show_cpuinfo(struct seq_file seq_printf(m, "micromips kernel\t: %s\n", (read_c0_config3() & MIPS_CONF3_ISA_OE) ? "yes" : "no"); } @@ -45,6 +45,10 @@ Signed-off-by: Hauke Mehrtens + seq_printf(m, "%s", " 3k_cache"); + if (cpu_has_4k_cache) + seq_printf(m, "%s", " 4k_cache"); ++ if (cpu_has_6k_cache) ++ seq_printf(m, "%s", " 6k_cache"); ++ if (cpu_has_8k_cache) ++ seq_printf(m, "%s", " 8k_cache"); + if (cpu_has_tx39_cache) + seq_printf(m, "%s", " tx39_cache"); + if (cpu_has_octeon_cache) diff --git a/root/target/linux/generic/pending-5.15/330-MIPS-kexec-Accept-command-line-parameters-from-users.patch b/root/target/linux/generic/pending-5.15/330-MIPS-kexec-Accept-command-line-parameters-from-users.patch index 2880d3ee..da50880d 100755 --- a/root/target/linux/generic/pending-5.15/330-MIPS-kexec-Accept-command-line-parameters-from-users.patch +++ b/root/target/linux/generic/pending-5.15/330-MIPS-kexec-Accept-command-line-parameters-from-users.patch @@ -238,7 +238,7 @@ Signed-off-by: Yousong Zhou +#endif --- a/arch/mips/kernel/relocate_kernel.S +++ b/arch/mips/kernel/relocate_kernel.S -@@ -10,10 +10,11 @@ +@@ -10,10 +10,12 @@ #include #include #include @@ -248,10 +248,11 @@ Signed-off-by: Yousong Zhou -LEAF(relocate_new_kernel) +LEAF(kexec_relocate_new_kernel) ++ PTR_L a0, arg0 PTR_L a1, arg1 PTR_L a2, arg2 -@@ -98,7 +99,7 @@ done: +@@ -98,7 +100,7 @@ done: #endif /* jump to kexec_start_address */ j s1 @@ -260,7 +261,7 @@ Signed-off-by: Yousong Zhou #ifdef CONFIG_SMP /* -@@ -181,9 +182,15 @@ kexec_indirection_page: +@@ -181,9 +183,15 @@ kexec_indirection_page: PTR 0 .size kexec_indirection_page, PTRSIZE diff --git a/root/target/linux/generic/pending-5.15/342-powerpc-Enable-kernel-XZ-compression-option-on-PPC_8.patch b/root/target/linux/generic/pending-5.15/342-powerpc-Enable-kernel-XZ-compression-option-on-PPC_8.patch index cb9f2952..de1e0fc1 100755 --- a/root/target/linux/generic/pending-5.15/342-powerpc-Enable-kernel-XZ-compression-option-on-PPC_8.patch +++ b/root/target/linux/generic/pending-5.15/342-powerpc-Enable-kernel-XZ-compression-option-on-PPC_8.patch @@ -14,7 +14,7 @@ Signed-off-by: Pawel Dembicki --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig -@@ -222,7 +222,7 @@ config PPC +@@ -226,7 +226,7 @@ config PPC select HAVE_KERNEL_GZIP select HAVE_KERNEL_LZMA if DEFAULT_UIMAGE select HAVE_KERNEL_LZO if DEFAULT_UIMAGE diff --git a/root/target/linux/generic/pending-5.15/420-mtd-redboot_space.patch b/root/target/linux/generic/pending-5.15/420-mtd-redboot_space.patch deleted file mode 100755 index fee19365..00000000 --- a/root/target/linux/generic/pending-5.15/420-mtd-redboot_space.patch +++ /dev/null @@ -1,41 +0,0 @@ -From: Felix Fietkau -Subject: add patch for including unpartitioned space in the rootfs partition for redboot devices (if applicable) - -[john@phrozen.org: used by ixp and others] - -lede-commit: 394918851f84e4d00fa16eb900e7700e95091f00 -Signed-off-by: Felix Fietkau ---- - drivers/mtd/redboot.c | 19 +++++++++++++------ - 1 file changed, 13 insertions(+), 6 deletions(-) - ---- a/drivers/mtd/parsers/redboot.c -+++ b/drivers/mtd/parsers/redboot.c -@@ -277,14 +277,21 @@ nogood: - #endif - names += strlen(names) + 1; - --#ifdef CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED - if (fl->next && fl->img->flash_base + fl->img->size + master->erasesize <= fl->next->img->flash_base) { -- i++; -- parts[i].offset = parts[i - 1].size + parts[i - 1].offset; -- parts[i].size = fl->next->img->flash_base - parts[i].offset; -- parts[i].name = nullname; -- } -+ if (!strcmp(parts[i].name, "rootfs")) { -+ parts[i].size = fl->next->img->flash_base; -+ parts[i].size &= ~(master->erasesize - 1); -+ parts[i].size -= parts[i].offset; -+#ifdef CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED -+ nrparts--; -+ } else { -+ i++; -+ parts[i].offset = parts[i-1].size + parts[i-1].offset; -+ parts[i].size = fl->next->img->flash_base - parts[i].offset; -+ parts[i].name = nullname; - #endif -+ } -+ } - tmp_fl = fl; - fl = fl->next; - kfree(tmp_fl); diff --git a/root/target/linux/generic/pending-5.15/435-mtd-add-routerbootpart-parser-config.patch b/root/target/linux/generic/pending-5.15/435-mtd-add-routerbootpart-parser-config.patch index 721a4d3a..b5384673 100755 --- a/root/target/linux/generic/pending-5.15/435-mtd-add-routerbootpart-parser-config.patch +++ b/root/target/linux/generic/pending-5.15/435-mtd-add-routerbootpart-parser-config.patch @@ -16,11 +16,10 @@ Signed-off-by: Thibaut VARÈNE --- a/drivers/mtd/parsers/Kconfig +++ b/drivers/mtd/parsers/Kconfig -@@ -202,3 +202,12 @@ config MTD_QCOMSMEM_PARTS - help - This provides support for parsing partitions from Shared Memory (SMEM) - for NAND and SPI flash on Qualcomm platforms. -+ +@@ -196,6 +196,15 @@ config MTD_REDBOOT_PARTS_READONLY + + endif # MTD_REDBOOT_PARTS + +config MTD_ROUTERBOOT_PARTS + tristate "RouterBoot flash partition parser" + depends on MTD && OF @@ -29,10 +28,15 @@ Signed-off-by: Thibaut VARÈNE + flash, some of which are fixed and some of which are located at + variable offsets. This parser handles both cases via properly + formatted DTS. ++ + config MTD_QCOMSMEM_PARTS + tristate "Qualcomm SMEM flash partition parser" + depends on QCOM_SMEM --- a/drivers/mtd/parsers/Makefile +++ b/drivers/mtd/parsers/Makefile -@@ -14,3 +14,4 @@ obj-$(CONFIG_MTD_PARSER_TRX) += parser_ +@@ -13,4 +13,5 @@ obj-$(CONFIG_MTD_AFS_PARTS) += afs.o + obj-$(CONFIG_MTD_PARSER_TRX) += parser_trx.o obj-$(CONFIG_MTD_SHARPSL_PARTS) += sharpslpart.o obj-$(CONFIG_MTD_REDBOOT_PARTS) += redboot.o - obj-$(CONFIG_MTD_QCOMSMEM_PARTS) += qcomsmempart.o +obj-$(CONFIG_MTD_ROUTERBOOT_PARTS) += routerbootpart.o + obj-$(CONFIG_MTD_QCOMSMEM_PARTS) += qcomsmempart.o diff --git a/root/target/linux/generic/pending-5.15/481-mtd-spi-nor-rework-broken-flash-reset-support.patch b/root/target/linux/generic/pending-5.15/481-mtd-spi-nor-rework-broken-flash-reset-support.patch deleted file mode 100755 index 8fb46b90..00000000 --- a/root/target/linux/generic/pending-5.15/481-mtd-spi-nor-rework-broken-flash-reset-support.patch +++ /dev/null @@ -1,182 +0,0 @@ -From ea92cbb50a78404e29de2cc3999a240615ffb1c8 Mon Sep 17 00:00:00 2001 -From: Chuanhong Guo -Date: Mon, 6 Apr 2020 17:58:48 +0800 -Subject: [PATCH] mtd: spi-nor: rework broken-flash-reset support - -Instead of resetting flash to 3B address on remove hook, this -implementation only enters 4B mode when needed, which prevents -more unexpected reboot stuck. This implementation makes it only -break when a kernel panic happens during flash operation on 16M+ -areas. -*OpenWrt only*: silent broken-flash-reset warning. We are not dealing -with vendors and it's unpleasant for users to se that unnecessary -and long WARN_ON print. - -Signed-off-by: Chuanhong Guo ---- - drivers/mtd/spi-nor/spi-nor.c | 52 +++++++++++++++++++++++++++++++++-- - 1 file changed, 49 insertions(+), 3 deletions(-) - ---- a/drivers/mtd/spi-nor/core.c -+++ b/drivers/mtd/spi-nor/core.c -@@ -1637,6 +1637,23 @@ destroy_erase_cmd_list: - return ret; - } - -+int spi_nor_check_set_addr_width(struct spi_nor *nor, loff_t addr) -+{ -+ u8 addr_width; -+ -+ if ((nor->flags & (SNOR_F_4B_OPCODES | SNOR_F_BROKEN_RESET)) != -+ SNOR_F_BROKEN_RESET) -+ return 0; -+ -+ addr_width = addr & 0xff000000 ? 4 : 3; -+ if (nor->addr_width == addr_width) -+ return 0; -+ -+ nor->addr_width = addr_width; -+ -+ return nor->params->set_4byte_addr_mode(nor, addr_width == 4); -+} -+ - /* - * Erase an address range on the nor chip. The address range may extend - * one or more erase sectors. Return an error if there is a problem erasing. -@@ -1664,6 +1681,10 @@ static int spi_nor_erase(struct mtd_info - if (ret) - return ret; - -+ ret = spi_nor_check_set_addr_width(nor, instr->addr + instr->len); -+ if (ret < 0) -+ return ret; -+ - /* whole-chip erase? */ - if (len == mtd->size && !(nor->flags & SNOR_F_NO_OP_CHIP_ERASE)) { - unsigned long timeout; -@@ -1723,6 +1744,7 @@ static int spi_nor_erase(struct mtd_info - ret = spi_nor_write_disable(nor); - - erase_err: -+ spi_nor_check_set_addr_width(nor, 0); - spi_nor_unlock_and_unprep(nor); - - return ret; -@@ -1915,6 +1937,10 @@ static int spi_nor_read(struct mtd_info - if (ret) - return ret; - -+ ret = spi_nor_check_set_addr_width(nor, from + len); -+ if (ret < 0) -+ return ret; -+ - while (len) { - loff_t addr = from; - -@@ -1938,6 +1964,7 @@ static int spi_nor_read(struct mtd_info - ret = 0; - - read_err: -+ spi_nor_check_set_addr_width(nor, 0); - spi_nor_unlock_and_unprep(nor); - return ret; - } -@@ -1960,6 +1987,10 @@ static int spi_nor_write(struct mtd_info - if (ret) - return ret; - -+ ret = spi_nor_check_set_addr_width(nor, to + len); -+ if (ret < 0) -+ return ret; -+ - for (i = 0; i < len; ) { - ssize_t written; - loff_t addr = to + i; -@@ -1999,6 +2030,7 @@ static int spi_nor_write(struct mtd_info - } - - write_err: -+ spi_nor_check_set_addr_width(nor, 0); - spi_nor_unlock_and_unprep(nor); - return ret; - } -@@ -2846,9 +2878,13 @@ static int spi_nor_init(struct spi_nor * - * reboots (e.g., crashes). Warn the user (or hopefully, system - * designer) that this is bad. - */ -- WARN_ONCE(nor->flags & SNOR_F_BROKEN_RESET, -- "enabling reset hack; may not recover from unexpected reboots\n"); -- nor->params->set_4byte_addr_mode(nor, true); -+ if (nor->flags & SNOR_F_BROKEN_RESET) { -+ dev_warn(nor->dev, -+ "enabling reset hack; may not recover from unexpected reboots\n"); -+ nor->addr_width = 3; -+ } else { -+ nor->params->set_4byte_addr_mode(nor, true); -+ } - } - - return 0; ---- a/drivers/mtd/spi-nor/swp.c -+++ b/drivers/mtd/spi-nor/swp.c -@@ -352,7 +352,9 @@ static int spi_nor_lock(struct mtd_info - if (ret) - return ret; - -+ spi_nor_check_set_addr_width(nor, ofs + len); - ret = nor->params->locking_ops->lock(nor, ofs, len); -+ spi_nor_check_set_addr_width(nor, 0); - - spi_nor_unlock_and_unprep(nor); - return ret; -@@ -367,7 +369,9 @@ static int spi_nor_unlock(struct mtd_inf - if (ret) - return ret; - -+ spi_nor_check_set_addr_width(nor, ofs + len); - ret = nor->params->locking_ops->unlock(nor, ofs, len); -+ spi_nor_check_set_addr_width(nor, 0); - - spi_nor_unlock_and_unprep(nor); - return ret; -@@ -382,7 +386,9 @@ static int spi_nor_is_locked(struct mtd_ - if (ret) - return ret; - -+ spi_nor_check_set_addr_width(nor, ofs + len); - ret = nor->params->locking_ops->is_locked(nor, ofs, len); -+ spi_nor_check_set_addr_width(nor, 0); - - spi_nor_unlock_and_unprep(nor); - return ret; ---- a/drivers/mtd/spi-nor/core.h -+++ b/drivers/mtd/spi-nor/core.h -@@ -496,6 +496,7 @@ extern const struct attribute_group *spi - void spi_nor_spimem_setup_op(const struct spi_nor *nor, - struct spi_mem_op *op, - const enum spi_nor_protocol proto); -+int spi_nor_check_set_addr_width(struct spi_nor *nor, loff_t addr); - int spi_nor_write_enable(struct spi_nor *nor); - int spi_nor_write_disable(struct spi_nor *nor); - int spi_nor_set_4byte_addr_mode(struct spi_nor *nor, bool enable); ---- a/drivers/mtd/spi-nor/sst.c -+++ b/drivers/mtd/spi-nor/sst.c -@@ -104,6 +104,10 @@ static int sst_write(struct mtd_info *mt - if (ret) - return ret; - -+ ret = spi_nor_check_set_addr_width(nor, to + len); -+ if (ret < 0) -+ return ret; -+ - ret = spi_nor_write_enable(nor); - if (ret) - goto out; -@@ -173,6 +177,7 @@ static int sst_write(struct mtd_info *mt - } - out: - *retlen += actual; -+ spi_nor_check_set_addr_width(nor, 0); - spi_nor_unlock_and_unprep(nor); - return ret; - } diff --git a/root/target/linux/generic/pending-5.15/483-mtd-spinand-add-support-for-xtx-xt26g0xa.patch b/root/target/linux/generic/pending-5.15/483-mtd-spinand-add-support-for-xtx-xt26g0xa.patch deleted file mode 100755 index 4672f8c8..00000000 --- a/root/target/linux/generic/pending-5.15/483-mtd-spinand-add-support-for-xtx-xt26g0xa.patch +++ /dev/null @@ -1,178 +0,0 @@ -From a07e31adf2753cad2fd9790db5bfc047c81e8152 Mon Sep 17 00:00:00 2001 -From: Felix Matouschek -Date: Fri, 2 Jul 2021 20:31:23 +0200 -Subject: [PATCH] mtd: spinand: Add support for XTX XT26G0xA - -Add support for XTX Technology XT26G01AXXXXX, XTX26G02AXXXXX and -XTX26G04AXXXXX SPI NAND. - -These are 3V, 1G/2G/4Gbit serial SLC NAND flash devices with on-die ECC -(8bit strength per 512bytes). - -Tested on Teltonika RUTX10 flashed with OpenWrt. - -Datasheets available at -http://www.xtxtech.com/download/?AId=225 -https://datasheet.lcsc.com/szlcsc/2005251034_XTX-XT26G01AWSEGA_C558841.pdf - -Signed-off-by: Felix Matouschek ---- - drivers/mtd/nand/spi/Makefile | 2 +- - drivers/mtd/nand/spi/core.c | 1 + - drivers/mtd/nand/spi/xtx.c | 122 ++++++++++++++++++++++++++++++++++ - include/linux/mtd/spinand.h | 1 + - 4 files changed, 125 insertions(+), 1 deletion(-) - create mode 100644 drivers/mtd/nand/spi/xtx.c - ---- a/drivers/mtd/nand/spi/Makefile -+++ b/drivers/mtd/nand/spi/Makefile -@@ -1,3 +1,3 @@ - # SPDX-License-Identifier: GPL-2.0 --spinand-objs := core.o gigadevice.o macronix.o micron.o paragon.o toshiba.o winbond.o -+spinand-objs := core.o gigadevice.o macronix.o micron.o paragon.o toshiba.o winbond.o xtx.o - obj-$(CONFIG_MTD_SPI_NAND) += spinand.o ---- a/drivers/mtd/nand/spi/core.c -+++ b/drivers/mtd/nand/spi/core.c -@@ -902,6 +902,7 @@ static const struct spinand_manufacturer - ¶gon_spinand_manufacturer, - &toshiba_spinand_manufacturer, - &winbond_spinand_manufacturer, -+ &xtx_spinand_manufacturer, - }; - - static int spinand_manufacturer_match(struct spinand_device *spinand, ---- /dev/null -+++ b/drivers/mtd/nand/spi/xtx.c -@@ -0,0 +1,122 @@ -+// SPDX-License-Identifier: GPL-2.0 -+/* -+ * Author: -+ * Felix Matouschek -+ */ -+ -+#include -+#include -+#include -+ -+#define SPINAND_MFR_XTX 0x0B -+ -+#define XT26G0XA_STATUS_ECC_MASK GENMASK(5, 2) -+#define XT26G0XA_STATUS_ECC_NO_DETECTED (0 << 2) -+#define XT26G0XA_STATUS_ECC_8_CORRECTED (3 << 4) -+#define XT26G0XA_STATUS_ECC_UNCOR_ERROR (2 << 4) -+ -+static SPINAND_OP_VARIANTS(read_cache_variants, -+ SPINAND_PAGE_READ_FROM_CACHE_QUADIO_OP(0, 1, NULL, 0), -+ SPINAND_PAGE_READ_FROM_CACHE_X4_OP(0, 1, NULL, 0), -+ SPINAND_PAGE_READ_FROM_CACHE_DUALIO_OP(0, 1, NULL, 0), -+ SPINAND_PAGE_READ_FROM_CACHE_X2_OP(0, 1, NULL, 0), -+ SPINAND_PAGE_READ_FROM_CACHE_OP(true, 0, 1, NULL, 0), -+ SPINAND_PAGE_READ_FROM_CACHE_OP(false, 0, 1, NULL, 0)); -+ -+static SPINAND_OP_VARIANTS(write_cache_variants, -+ SPINAND_PROG_LOAD_X4(true, 0, NULL, 0), -+ SPINAND_PROG_LOAD(true, 0, NULL, 0)); -+ -+static SPINAND_OP_VARIANTS(update_cache_variants, -+ SPINAND_PROG_LOAD_X4(false, 0, NULL, 0), -+ SPINAND_PROG_LOAD(false, 0, NULL, 0)); -+ -+static int xt26g0xa_ooblayout_ecc(struct mtd_info *mtd, int section, -+ struct mtd_oob_region *region) -+{ -+ if (section) -+ return -ERANGE; -+ -+ region->offset = 8; -+ region->length = 40; -+ -+ return 0; -+} -+ -+static int xt26g0xa_ooblayout_free(struct mtd_info *mtd, int section, -+ struct mtd_oob_region *region) -+{ -+ if (section) -+ return -ERANGE; -+ -+ region->offset = 1; -+ region->length = 7; -+ -+ return 0; -+} -+ -+static const struct mtd_ooblayout_ops xt26g0xa_ooblayout = { -+ .ecc = xt26g0xa_ooblayout_ecc, -+ .free = xt26g0xa_ooblayout_free, -+}; -+ -+static int xt26g0xa_ecc_get_status(struct spinand_device *spinand, -+ u8 status) -+{ -+ switch (status & XT26G0XA_STATUS_ECC_MASK) { -+ case XT26G0XA_STATUS_ECC_NO_DETECTED: -+ return 0; -+ case XT26G0XA_STATUS_ECC_8_CORRECTED: -+ return 8; -+ case XT26G0XA_STATUS_ECC_UNCOR_ERROR: -+ return -EBADMSG; -+ default: /* (1 << 2) through (7 << 2) are 1-7 corrected errors */ -+ return (status & XT26G0XA_STATUS_ECC_MASK) >> 2; -+ } -+ -+ return -EINVAL; -+} -+ -+static const struct spinand_info xtx_spinand_table[] = { -+ SPINAND_INFO("XT26G01A", -+ SPINAND_ID(SPINAND_READID_METHOD_OPCODE_DUMMY, 0xE1), -+ NAND_MEMORG(1, 2048, 64, 64, 1024, 20, 1, 1, 1), -+ NAND_ECCREQ(8, 512), -+ SPINAND_INFO_OP_VARIANTS(&read_cache_variants, -+ &write_cache_variants, -+ &update_cache_variants), -+ SPINAND_HAS_QE_BIT, -+ SPINAND_ECCINFO(&xt26g0xa_ooblayout, -+ xt26g0xa_ecc_get_status)), -+ SPINAND_INFO("XT26G02A", -+ SPINAND_ID(SPINAND_READID_METHOD_OPCODE_DUMMY, 0xE2), -+ NAND_MEMORG(1, 2048, 64, 64, 2048, 40, 1, 1, 1), -+ NAND_ECCREQ(8, 512), -+ SPINAND_INFO_OP_VARIANTS(&read_cache_variants, -+ &write_cache_variants, -+ &update_cache_variants), -+ SPINAND_HAS_QE_BIT, -+ SPINAND_ECCINFO(&xt26g0xa_ooblayout, -+ xt26g0xa_ecc_get_status)), -+ SPINAND_INFO("XT26G04A", -+ SPINAND_ID(SPINAND_READID_METHOD_OPCODE_DUMMY, 0xE3), -+ NAND_MEMORG(1, 2048, 64, 128, 2048, 40, 1, 1, 1), -+ NAND_ECCREQ(8, 512), -+ SPINAND_INFO_OP_VARIANTS(&read_cache_variants, -+ &write_cache_variants, -+ &update_cache_variants), -+ SPINAND_HAS_QE_BIT, -+ SPINAND_ECCINFO(&xt26g0xa_ooblayout, -+ xt26g0xa_ecc_get_status)), -+}; -+ -+static const struct spinand_manufacturer_ops xtx_spinand_manuf_ops = { -+}; -+ -+const struct spinand_manufacturer xtx_spinand_manufacturer = { -+ .id = SPINAND_MFR_XTX, -+ .name = "XTX", -+ .chips = xtx_spinand_table, -+ .nchips = ARRAY_SIZE(xtx_spinand_table), -+ .ops = &xtx_spinand_manuf_ops, -+}; ---- a/include/linux/mtd/spinand.h -+++ b/include/linux/mtd/spinand.h -@@ -266,6 +266,7 @@ extern const struct spinand_manufacturer - extern const struct spinand_manufacturer paragon_spinand_manufacturer; - extern const struct spinand_manufacturer toshiba_spinand_manufacturer; - extern const struct spinand_manufacturer winbond_spinand_manufacturer; -+extern const struct spinand_manufacturer xtx_spinand_manufacturer; - - /** - * struct spinand_op_variants - SPI NAND operation variants diff --git a/root/target/linux/generic/pending-5.15/484-mtd-spi-nor-add-esmt-f25l16pa.patch b/root/target/linux/generic/pending-5.15/484-mtd-spi-nor-add-esmt-f25l16pa.patch deleted file mode 100755 index b2f0b92a..00000000 --- a/root/target/linux/generic/pending-5.15/484-mtd-spi-nor-add-esmt-f25l16pa.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/drivers/mtd/spi-nor/esmt.c -+++ b/drivers/mtd/spi-nor/esmt.c -@@ -10,6 +10,8 @@ - - static const struct flash_info esmt_parts[] = { - /* ESMT */ -+ { "f25l16pa-2s", INFO(0x8c2115, 0, 64 * 1024, 32, -+ SECT_4K | SPI_NOR_HAS_LOCK) }, - { "f25l32pa", INFO(0x8c2016, 0, 64 * 1024, 64, - SECT_4K | SPI_NOR_HAS_LOCK | SPI_NOR_SWP_IS_VOLATILE) }, - { "f25l32qa", INFO(0x8c4116, 0, 64 * 1024, 64, diff --git a/root/target/linux/generic/pending-5.15/492-try-auto-mounting-ubi0-rootfs-in-init-do_mounts.c.patch b/root/target/linux/generic/pending-5.15/492-try-auto-mounting-ubi0-rootfs-in-init-do_mounts.c.patch deleted file mode 100755 index c27aee8f..00000000 --- a/root/target/linux/generic/pending-5.15/492-try-auto-mounting-ubi0-rootfs-in-init-do_mounts.c.patch +++ /dev/null @@ -1,51 +0,0 @@ -From: Daniel Golle -Subject: try auto-mounting ubi0:rootfs in init/do_mounts.c - -Signed-off-by: Daniel Golle ---- - init/do_mounts.c | 26 +++++++++++++++++++++++++- - 1 file changed, 25 insertions(+), 1 deletion(-) - ---- a/init/do_mounts.c -+++ b/init/do_mounts.c -@@ -447,7 +447,28 @@ retry: - out: - put_page(page); - } -- -+ -+static int __init mount_ubi_rootfs(void) -+{ -+ int flags = MS_SILENT; -+ int err, tried = 0; -+ -+ while (tried < 2) { -+ err = do_mount_root("ubi0:rootfs", "ubifs", flags, \ -+ root_mount_data); -+ switch (err) { -+ case -EACCES: -+ flags |= MS_RDONLY; -+ tried++; -+ break; -+ default: -+ return err; -+ } -+ } -+ -+ return -EINVAL; -+} -+ - #ifdef CONFIG_ROOT_NFS - - #define NFSROOT_TIMEOUT_MIN 5 -@@ -580,6 +601,10 @@ void __init mount_root(void) - return; - } - #endif -+#ifdef CONFIG_MTD_ROOTFS_ROOT_DEV -+ if (!mount_ubi_rootfs()) -+ return; -+#endif - if (ROOT_DEV == 0 && root_device_name && root_fs_names) { - if (mount_nodev_root() == 0) - return; diff --git a/root/target/linux/generic/pending-5.15/497-mtd-mtdconcat-add-dt-driver-for-concat-devices.patch b/root/target/linux/generic/pending-5.15/497-mtd-mtdconcat-add-dt-driver-for-concat-devices.patch index 32168015..3f236228 100755 --- a/root/target/linux/generic/pending-5.15/497-mtd-mtdconcat-add-dt-driver-for-concat-devices.patch +++ b/root/target/linux/generic/pending-5.15/497-mtd-mtdconcat-add-dt-driver-for-concat-devices.patch @@ -43,7 +43,7 @@ Signed-off-by: Bernhard Frauendienst --- a/drivers/mtd/Kconfig +++ b/drivers/mtd/Kconfig -@@ -241,4 +241,6 @@ source "drivers/mtd/ubi/Kconfig" +@@ -239,4 +239,6 @@ source "drivers/mtd/ubi/Kconfig" source "drivers/mtd/hyperbus/Kconfig" diff --git a/root/target/linux/generic/pending-5.15/530-jffs2_make_lzma_available.patch b/root/target/linux/generic/pending-5.15/530-jffs2_make_lzma_available.patch index 01aba80e..cf2ab71d 100755 --- a/root/target/linux/generic/pending-5.15/530-jffs2_make_lzma_available.patch +++ b/root/target/linux/generic/pending-5.15/530-jffs2_make_lzma_available.patch @@ -1087,7 +1087,7 @@ Signed-off-by: Alexandros C. Couloumbis #define JFFS2_NODE_ACCURATE 0x2000 --- a/lib/Kconfig +++ b/lib/Kconfig -@@ -336,6 +336,12 @@ config ZSTD_DECOMPRESS +@@ -330,6 +330,12 @@ config ZSTD_DECOMPRESS source "lib/xz/Kconfig" diff --git a/root/target/linux/generic/pending-5.15/600-netfilter_conntrack_flush.patch b/root/target/linux/generic/pending-5.15/600-netfilter_conntrack_flush.patch index a88e3d7d..f4b815c8 100755 --- a/root/target/linux/generic/pending-5.15/600-netfilter_conntrack_flush.patch +++ b/root/target/linux/generic/pending-5.15/600-netfilter_conntrack_flush.patch @@ -17,7 +17,7 @@ Signed-off-by: Felix Fietkau #include #ifdef CONFIG_SYSCTL #include -@@ -462,6 +463,56 @@ static int ct_cpu_seq_show(struct seq_fi +@@ -459,6 +460,56 @@ static int ct_cpu_seq_show(struct seq_fi return 0; } @@ -74,7 +74,7 @@ Signed-off-by: Felix Fietkau static const struct seq_operations ct_cpu_seq_ops = { .start = ct_cpu_seq_start, .next = ct_cpu_seq_next, -@@ -475,8 +526,9 @@ static int nf_conntrack_standalone_init_ +@@ -472,8 +523,9 @@ static int nf_conntrack_standalone_init_ kuid_t root_uid; kgid_t root_gid; diff --git a/root/target/linux/generic/pending-5.15/613-netfilter_optional_tcp_window_check.patch b/root/target/linux/generic/pending-5.15/613-netfilter_optional_tcp_window_check.patch index 249c3c8a..53abd9f7 100755 --- a/root/target/linux/generic/pending-5.15/613-netfilter_optional_tcp_window_check.patch +++ b/root/target/linux/generic/pending-5.15/613-netfilter_optional_tcp_window_check.patch @@ -8,42 +8,62 @@ Signed-off-by: Felix Fietkau --- a/net/netfilter/nf_conntrack_proto_tcp.c +++ b/net/netfilter/nf_conntrack_proto_tcp.c -@@ -465,6 +465,9 @@ static bool tcp_in_window(struct nf_conn +@@ -31,6 +31,9 @@ + #include + #include + ++/* Do not check the TCP window for incoming packets */ ++static int nf_ct_tcp_no_window_check __read_mostly = 1; ++ + /* FIXME: Examine ipfilter's timeouts and conntrack transitions more + closely. They're more complex. --RR */ + +@@ -465,6 +468,9 @@ static bool tcp_in_window(struct nf_conn s32 receiver_offset; bool res, in_recv_win; -+ if (net->ct.sysctl_no_window_check) ++ if (nf_ct_tcp_no_window_check) + return true; + /* * Get the required data from the packet. */ -@@ -1151,7 +1154,7 @@ int nf_conntrack_tcp_packet(struct nf_co +@@ -1151,7 +1157,7 @@ int nf_conntrack_tcp_packet(struct nf_co IP_CT_TCP_FLAG_DATA_UNACKNOWLEDGED && timeouts[new_state] > timeouts[TCP_CONNTRACK_UNACK]) timeout = timeouts[TCP_CONNTRACK_UNACK]; - else if (ct->proto.tcp.last_win == 0 && -+ else if (!net->ct.sysctl_no_window_check && ct->proto.tcp.last_win == 0 && ++ else if (!nf_ct_tcp_no_window_check && ct->proto.tcp.last_win == 0 && timeouts[new_state] > timeouts[TCP_CONNTRACK_RETRANS]) timeout = timeouts[TCP_CONNTRACK_RETRANS]; else --- a/net/netfilter/nf_conntrack_standalone.c +++ b/net/netfilter/nf_conntrack_standalone.c -@@ -671,6 +671,7 @@ enum nf_ct_sysctl_index { - NF_SYSCTL_CT_LWTUNNEL, +@@ -25,6 +25,9 @@ + #include + #include + ++/* Do not check the TCP window for incoming packets */ ++static int nf_ct_tcp_no_window_check __read_mostly = 1; ++ + static bool enable_hooks __read_mostly; + MODULE_PARM_DESC(enable_hooks, "Always enable conntrack hooks"); + module_param(enable_hooks, bool, 0000); +@@ -665,6 +668,7 @@ enum nf_ct_sysctl_index { + NF_SYSCTL_CT_PROTO_TIMEOUT_GRE_STREAM, #endif + NF_SYSCTL_CT_PROTO_TCP_NO_WINDOW_CHECK, __NF_SYSCTL_CT_LAST_SYSCTL, }; -@@ -1026,6 +1027,13 @@ static struct ctl_table nf_ct_sysctl_tab - .proc_handler = nf_hooks_lwtunnel_sysctl_handler, +@@ -1011,6 +1015,13 @@ static struct ctl_table nf_ct_sysctl_tab + .proc_handler = proc_dointvec_jiffies, }, #endif + [NF_SYSCTL_CT_PROTO_TCP_NO_WINDOW_CHECK] = { + .procname = "nf_conntrack_tcp_no_window_check", -+ .data = &init_net.ct.sysctl_no_window_check, ++ .data = &nf_ct_tcp_no_window_check, + .maxlen = sizeof(unsigned int), + .mode = 0644, + .proc_handler = proc_dointvec, @@ -51,29 +71,3 @@ Signed-off-by: Felix Fietkau {} }; -@@ -1153,6 +1161,7 @@ static int nf_conntrack_standalone_init_ - #ifdef CONFIG_NF_CONNTRACK_EVENTS - table[NF_SYSCTL_CT_EVENTS].data = &net->ct.sysctl_events; - #endif -+ table[NF_SYSCTL_CT_PROTO_TCP_NO_WINDOW_CHECK].data = &net->ct.sysctl_no_window_check; - #ifdef CONFIG_NF_CONNTRACK_TIMESTAMP - table[NF_SYSCTL_CT_TIMESTAMP].data = &net->ct.sysctl_tstamp; - #endif -@@ -1222,6 +1231,7 @@ static int nf_conntrack_pernet_init(stru - int ret; - - net->ct.sysctl_checksum = 1; -+ net->ct.sysctl_no_window_check = 1; - - ret = nf_conntrack_standalone_init_sysctl(net); - if (ret < 0) ---- a/include/net/netns/conntrack.h -+++ b/include/net/netns/conntrack.h -@@ -109,6 +109,7 @@ struct netns_ct { - u8 sysctl_auto_assign_helper; - u8 sysctl_tstamp; - u8 sysctl_checksum; -+ u8 sysctl_no_window_check; - - struct ct_pcpu __percpu *pcpu_lists; - struct ip_conntrack_stat __percpu *stat; diff --git a/root/target/linux/generic/pending-5.15/630-packet_socket_type.patch b/root/target/linux/generic/pending-5.15/630-packet_socket_type.patch index 7f646b5a..92db60b8 100755 --- a/root/target/linux/generic/pending-5.15/630-packet_socket_type.patch +++ b/root/target/linux/generic/pending-5.15/630-packet_socket_type.patch @@ -30,7 +30,7 @@ Signed-off-by: Felix Fietkau #define PACKET_FANOUT_LB 1 --- a/net/packet/af_packet.c +++ b/net/packet/af_packet.c -@@ -1821,6 +1821,7 @@ static int packet_rcv_spkt(struct sk_buf +@@ -1820,6 +1820,7 @@ static int packet_rcv_spkt(struct sk_buf { struct sock *sk; struct sockaddr_pkt *spkt; @@ -38,7 +38,7 @@ Signed-off-by: Felix Fietkau /* * When we registered the protocol we saved the socket in the data -@@ -1828,6 +1829,7 @@ static int packet_rcv_spkt(struct sk_buf +@@ -1827,6 +1828,7 @@ static int packet_rcv_spkt(struct sk_buf */ sk = pt->af_packet_priv; @@ -46,7 +46,7 @@ Signed-off-by: Felix Fietkau /* * Yank back the headers [hope the device set this -@@ -1840,7 +1842,7 @@ static int packet_rcv_spkt(struct sk_buf +@@ -1839,7 +1841,7 @@ static int packet_rcv_spkt(struct sk_buf * so that this procedure is noop. */ @@ -55,7 +55,7 @@ Signed-off-by: Felix Fietkau goto out; if (!net_eq(dev_net(dev), sock_net(sk))) -@@ -2078,12 +2080,12 @@ static int packet_rcv(struct sk_buff *sk +@@ -2077,12 +2079,12 @@ static int packet_rcv(struct sk_buff *sk unsigned int snaplen, res; bool is_drop_n_account = false; @@ -71,7 +71,7 @@ Signed-off-by: Felix Fietkau if (!net_eq(dev_net(dev), sock_net(sk))) goto drop; -@@ -2209,12 +2211,12 @@ static int tpacket_rcv(struct sk_buff *s +@@ -2208,12 +2210,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); @@ -87,7 +87,7 @@ Signed-off-by: Felix Fietkau if (!net_eq(dev_net(dev), sock_net(sk))) goto drop; -@@ -3318,6 +3320,7 @@ static int packet_create(struct net *net +@@ -3320,6 +3322,7 @@ static int packet_create(struct net *net mutex_init(&po->pg_vec_lock); po->rollover = NULL; po->prot_hook.func = packet_rcv; @@ -95,7 +95,7 @@ Signed-off-by: Felix Fietkau if (sock->type == SOCK_PACKET) po->prot_hook.func = packet_rcv_spkt; -@@ -3951,6 +3954,16 @@ packet_setsockopt(struct socket *sock, i +@@ -3953,6 +3956,16 @@ packet_setsockopt(struct socket *sock, i po->xmit = val ? packet_direct_xmit : dev_queue_xmit; return 0; } @@ -112,7 +112,7 @@ Signed-off-by: Felix Fietkau default: return -ENOPROTOOPT; } -@@ -4007,6 +4020,13 @@ static int packet_getsockopt(struct sock +@@ -4009,6 +4022,13 @@ static int packet_getsockopt(struct sock case PACKET_VNET_HDR: val = po->has_vnet_hdr; break; diff --git a/root/target/linux/generic/pending-5.15/655-increase_skb_pad.patch b/root/target/linux/generic/pending-5.15/655-increase_skb_pad.patch index 98d9afb6..c7d35f20 100755 --- a/root/target/linux/generic/pending-5.15/655-increase_skb_pad.patch +++ b/root/target/linux/generic/pending-5.15/655-increase_skb_pad.patch @@ -9,7 +9,7 @@ Signed-off-by: Felix Fietkau --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h -@@ -2724,7 +2724,7 @@ static inline int pskb_network_may_pull( +@@ -2703,7 +2703,7 @@ static inline int pskb_network_may_pull( * NET_IP_ALIGN(2) + ethernet_header(14) + IP_header(20/40) + ports(8) */ #ifndef NET_SKB_PAD diff --git a/root/target/linux/generic/pending-5.15/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch b/root/target/linux/generic/pending-5.15/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch index 09efa1e7..45c95c21 100755 --- a/root/target/linux/generic/pending-5.15/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch +++ b/root/target/linux/generic/pending-5.15/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch @@ -361,7 +361,7 @@ Signed-off-by: Steven Barth memcpy(p->name, u->name, sizeof(u->name)); } -@@ -1949,6 +2119,15 @@ static int ip6_tnl_validate(struct nlatt +@@ -1948,6 +2118,15 @@ static int ip6_tnl_validate(struct nlatt return 0; } @@ -377,7 +377,7 @@ Signed-off-by: Steven Barth static void ip6_tnl_netlink_parms(struct nlattr *data[], struct __ip6_tnl_parm *parms) { -@@ -1986,6 +2165,46 @@ static void ip6_tnl_netlink_parms(struct +@@ -1985,6 +2164,46 @@ static void ip6_tnl_netlink_parms(struct if (data[IFLA_IPTUN_FWMARK]) parms->fwmark = nla_get_u32(data[IFLA_IPTUN_FWMARK]); @@ -424,7 +424,7 @@ Signed-off-by: Steven Barth } static bool ip6_tnl_netlink_encap_parms(struct nlattr *data[], -@@ -2101,6 +2320,12 @@ static void ip6_tnl_dellink(struct net_d +@@ -2100,6 +2319,12 @@ static void ip6_tnl_dellink(struct net_d static size_t ip6_tnl_get_size(const struct net_device *dev) { @@ -437,7 +437,7 @@ Signed-off-by: Steven Barth return /* IFLA_IPTUN_LINK */ nla_total_size(4) + -@@ -2130,6 +2355,24 @@ static size_t ip6_tnl_get_size(const str +@@ -2129,6 +2354,24 @@ static size_t ip6_tnl_get_size(const str nla_total_size(0) + /* IFLA_IPTUN_FWMARK */ nla_total_size(4) + @@ -462,7 +462,7 @@ Signed-off-by: Steven Barth 0; } -@@ -2137,6 +2380,9 @@ static int ip6_tnl_fill_info(struct sk_b +@@ -2136,6 +2379,9 @@ static int ip6_tnl_fill_info(struct sk_b { struct ip6_tnl *tunnel = netdev_priv(dev); struct __ip6_tnl_parm *parm = &tunnel->parms; @@ -472,7 +472,7 @@ Signed-off-by: Steven Barth if (nla_put_u32(skb, IFLA_IPTUN_LINK, parm->link) || nla_put_in6_addr(skb, IFLA_IPTUN_LOCAL, &parm->laddr) || -@@ -2146,9 +2392,27 @@ static int ip6_tnl_fill_info(struct sk_b +@@ -2145,9 +2391,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) || @@ -501,7 +501,7 @@ Signed-off-by: Steven Barth 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) || -@@ -2188,6 +2452,7 @@ static const struct nla_policy ip6_tnl_p +@@ -2187,6 +2451,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 }, diff --git a/root/target/linux/generic/pending-5.15/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch b/root/target/linux/generic/pending-5.15/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch index 81a9b38e..9a398de6 100755 --- a/root/target/linux/generic/pending-5.15/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch +++ b/root/target/linux/generic/pending-5.15/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch @@ -20,7 +20,7 @@ Signed-off-by: Jonas Gorski --- a/include/net/netns/ipv6.h +++ b/include/net/netns/ipv6.h -@@ -84,6 +84,7 @@ struct netns_ipv6 { +@@ -82,6 +82,7 @@ struct netns_ipv6 { unsigned int fib6_routes_require_src; #endif struct rt6_info *ip6_prohibit_entry; diff --git a/root/target/linux/generic/pending-5.15/680-NET-skip-GRO-for-foreign-MAC-addresses.patch b/root/target/linux/generic/pending-5.15/680-NET-skip-GRO-for-foreign-MAC-addresses.patch index 2fcfce82..e621bb90 100755 --- a/root/target/linux/generic/pending-5.15/680-NET-skip-GRO-for-foreign-MAC-addresses.patch +++ b/root/target/linux/generic/pending-5.15/680-NET-skip-GRO-for-foreign-MAC-addresses.patch @@ -11,7 +11,7 @@ Signed-off-by: Felix Fietkau --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h -@@ -2068,6 +2068,8 @@ struct net_device { +@@ -2051,6 +2051,8 @@ struct net_device { struct netdev_hw_addr_list mc; struct netdev_hw_addr_list dev_addrs; @@ -22,17 +22,17 @@ Signed-off-by: Felix Fietkau #endif --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h -@@ -852,6 +852,7 @@ struct sk_buff { - #ifdef CONFIG_IPV6_NDISC_NODETYPE - __u8 ndisc_nodetype:2; +@@ -870,6 +870,7 @@ struct sk_buff { + #ifdef CONFIG_TLS_DEVICE + __u8 decrypted:1; #endif + __u8 gro_skip:1; - __u8 ipvs_property:1; - __u8 inner_protocol_type:1; + #ifdef CONFIG_NET_SCHED + __u16 tc_index; /* traffic control index */ --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -6051,6 +6051,9 @@ static enum gro_result dev_gro_receive(s +@@ -6108,6 +6108,9 @@ static enum gro_result dev_gro_receive(s int same_flow; int grow; @@ -42,7 +42,7 @@ Signed-off-by: Felix Fietkau if (netif_elide_gro(skb->dev)) goto normal; -@@ -8065,6 +8068,48 @@ static void __netdev_adjacent_dev_unlink +@@ -8118,6 +8121,48 @@ static void __netdev_adjacent_dev_unlink &upper_dev->adj_list.lower); } @@ -91,7 +91,7 @@ Signed-off-by: Felix Fietkau static int __netdev_upper_dev_link(struct net_device *dev, struct net_device *upper_dev, bool master, void *upper_priv, void *upper_info, -@@ -8116,6 +8161,7 @@ static int __netdev_upper_dev_link(struc +@@ -8169,6 +8214,7 @@ static int __netdev_upper_dev_link(struc if (ret) return ret; @@ -99,7 +99,7 @@ Signed-off-by: Felix Fietkau ret = call_netdevice_notifiers_info(NETDEV_CHANGEUPPER, &changeupper_info.info); ret = notifier_to_errno(ret); -@@ -8212,6 +8258,7 @@ static void __netdev_upper_dev_unlink(st +@@ -8265,6 +8311,7 @@ static void __netdev_upper_dev_unlink(st __netdev_adjacent_dev_unlink_neighbour(dev, upper_dev); @@ -107,7 +107,7 @@ Signed-off-by: Felix Fietkau call_netdevice_notifiers_info(NETDEV_CHANGEUPPER, &changeupper_info.info); -@@ -9031,6 +9078,7 @@ int dev_set_mac_address(struct net_devic +@@ -9084,6 +9131,7 @@ int dev_set_mac_address(struct net_devic if (err) return err; dev->addr_assign_type = NET_ADDR_SET; @@ -117,7 +117,7 @@ Signed-off-by: Felix Fietkau return 0; --- a/net/ethernet/eth.c +++ b/net/ethernet/eth.c -@@ -142,6 +142,18 @@ u32 eth_get_headlen(const struct net_dev +@@ -144,6 +144,18 @@ u32 eth_get_headlen(const struct net_dev } EXPORT_SYMBOL(eth_get_headlen); @@ -136,7 +136,7 @@ Signed-off-by: Felix Fietkau /** * eth_type_trans - determine the packet's protocol ID. * @skb: received socket data -@@ -173,6 +185,10 @@ __be16 eth_type_trans(struct sk_buff *sk +@@ -175,6 +187,10 @@ __be16 eth_type_trans(struct sk_buff *sk } else { skb->pkt_type = PACKET_OTHERHOST; } diff --git a/root/target/linux/generic/pending-5.15/681-NET-add-mtd-mac-address-support-to-of_get_mac_addres.patch b/root/target/linux/generic/pending-5.15/681-NET-add-mtd-mac-address-support-to-of_get_mac_addres.patch new file mode 100755 index 00000000..1fe0d915 --- /dev/null +++ b/root/target/linux/generic/pending-5.15/681-NET-add-mtd-mac-address-support-to-of_get_mac_addres.patch @@ -0,0 +1,102 @@ +From 6f8e5369ae054ec6c9265581d5a7e39738a5cd84 Mon Sep 17 00:00:00 2001 +From: Ansuel Smith +Date: Tue, 30 Mar 2021 13:16:38 +0200 +Subject: [PATCH 1/2] NET: add mtd-mac-address support to of_get_mac_address() + +Many embedded devices have information such as mac addresses stored inside mtd +devices. This patch allows us to add a property inside a node describing a +network interface. The new property points at a mtd partition with an offset +where the mac address can be found. + +Signed-off-by: John Crispin +Signed-off-by: Felix Fietkau +Signed-off-by: Ansuel Smith +--- + drivers/of/of_net.c | 75 ++++++++++++++++++++++++++++++++++++++++++++- + 1 file changed, 74 insertions(+), 1 deletion(-) + +--- a/drivers/of/of_net.c ++++ b/drivers/of/of_net.c +@@ -12,6 +12,7 @@ + #include + #include + #include ++#include + + /** + * of_get_phy_mode - Get phy mode for given device_node +@@ -95,6 +96,52 @@ static int of_get_mac_addr_nvmem(struct + return 0; + } + ++static int of_get_mac_address_mtd(struct device_node *np, u8 *addr) ++{ ++#ifdef CONFIG_MTD ++ struct platform_device *pdev = of_find_device_by_node(np); ++ struct device_node *mtd_np = NULL; ++ size_t retlen; ++ int size, ret; ++ struct mtd_info *mtd; ++ const char *part; ++ const __be32 *list; ++ phandle phandle; ++ u8 mac[ETH_ALEN]; ++ ++ list = of_get_property(np, "mtd-mac-address", &size); ++ if (!list || (size != (2 * sizeof(*list)))) ++ return -ENODEV; ++ ++ phandle = be32_to_cpup(list++); ++ if (phandle) ++ mtd_np = of_find_node_by_phandle(phandle); ++ ++ if (!mtd_np) ++ return -ENODEV; ++ ++ part = of_get_property(mtd_np, "label", NULL); ++ if (!part) ++ part = mtd_np->name; ++ ++ mtd = get_mtd_device_nm(part); ++ if (IS_ERR(mtd)) ++ return -ENODEV; ++ ++ ret = mtd_read(mtd, be32_to_cpup(list), 6, &retlen, mac); ++ put_mtd_device(mtd); ++ ++ if (!is_valid_ether_addr(mac)) ++ return -EINVAL; ++ ++ memcpy(addr, mac, ETH_ALEN); ++ ++ return 0; ++#endif ++ return -EINVAL; ++} ++ ++ + /** + * of_get_mac_address() + * @np: Caller's Device Node +@@ -119,6 +166,10 @@ static int of_get_mac_addr_nvmem(struct + * this case, the real MAC is in 'local-mac-address', and 'mac-address' exists + * but is all zeros. + * ++ * ++ * If a mtd-mac-address property exists, try to fetch the MAC address from the ++ * specified mtd device. ++ * + * Return: 0 on success and errno in case of error. + */ + int of_get_mac_address(struct device_node *np, u8 *addr) +@@ -140,6 +191,10 @@ int of_get_mac_address(struct device_nod + if (!ret) + return 0; + ++ ret = of_get_mac_address_mtd(np, addr); ++ if (!ret) ++ return 0; ++ + return of_get_mac_addr_nvmem(np, addr); + } + EXPORT_SYMBOL(of_get_mac_address); diff --git a/root/target/linux/generic/pending-5.15/682-of_net-add-mac-address-increment-support.patch b/root/target/linux/generic/pending-5.15/682-of_net-add-mac-address-increment-support.patch index 43a06a23..eb295b17 100755 --- a/root/target/linux/generic/pending-5.15/682-of_net-add-mac-address-increment-support.patch +++ b/root/target/linux/generic/pending-5.15/682-of_net-add-mac-address-increment-support.patch @@ -1,7 +1,7 @@ -From 844c273286f328acf0dab5fbd5d864366b4904dc Mon Sep 17 00:00:00 2001 +From 639dba857aa554f2a78572adc4cf3c32de9ec2e2 Mon Sep 17 00:00:00 2001 From: Ansuel Smith Date: Tue, 30 Mar 2021 18:21:14 +0200 -Subject: [PATCH] of_net: add mac-address-increment support +Subject: [PATCH 2/2] of_net: add mac-address-increment support Lots of embedded devices use the mac-address of other interface extracted from nvmem cells and increments it by one or two. Add two @@ -15,30 +15,28 @@ early has to be increased. Signed-off-by: Ansuel Smith --- - drivers/of/of_net.c | 43 +++++++++++++++++++++++++++++++++++++++---- - 1 file changed, 39 insertions(+), 4 deletions(-) + drivers/of/of_net.c | 59 ++++++++++++++++++++++++++++++++++----------- + 1 file changed, 45 insertions(+), 14 deletions(-) --- a/drivers/of/of_net.c +++ b/drivers/of/of_net.c -@@ -119,27 +119,62 @@ static int of_get_mac_addr_nvmem(struct - * this case, the real MAC is in 'local-mac-address', and 'mac-address' exists - * but is all zeros. +@@ -170,31 +170,56 @@ static int of_get_mac_address_mtd(struct + * If a mtd-mac-address property exists, try to fetch the MAC address from the + * specified mtd device. * + * DT can tell the system to increment the mac-address after is extracted by + * using: + * - mac-address-increment-byte to decide what byte to increase + * (if not defined is increased the last byte) -+ * - mac-address-increment to decide how much to increase. The value WILL -+ * overflow to other bytes if the increment is over 255 or the total -+ * increment will exceed 255 of the current byte. -+ * (example 00:01:02:03:04:ff + 1 == 00:01:02:03:05:00) -+ * (example 00:01:02:03:04:fe + 5 == 00:01:02:03:05:03) ++ * - mac-address-increment to decide how much to increase. The value will ++ * not overflow to other bytes if the increment is over 255. ++ * (example 00:01:02:03:04:ff + 1 == 00:01:02:03:04:00) + * * Return: 0 on success and errno in case of error. */ int of_get_mac_address(struct device_node *np, u8 *addr) { -+ u32 inc_idx, mac_inc, mac_val; ++ u32 inc_idx, mac_inc; int ret; + /* Check first if the increment byte is present and valid. @@ -65,6 +63,11 @@ Signed-off-by: Ansuel Smith ret = of_get_mac_addr(np, "address", addr); if (!ret) - return 0; ++ goto found; + + ret = of_get_mac_address_mtd(np, addr); + if (!ret) +- return 0; + goto found; + + ret = of_get_mac_addr_nvmem(np, addr); @@ -72,16 +75,8 @@ Signed-off-by: Ansuel Smith + return ret; + +found: -+ if (!of_property_read_u32(np, "mac-address-increment", &mac_inc)) { -+ /* Convert to a contiguous value */ -+ mac_val = (addr[3] << 16) + (addr[4] << 8) + addr[5]; -+ mac_val += mac_inc << 8 * (5-inc_idx); -+ -+ /* Apply the incremented value handling overflow case */ -+ addr[3] = (mac_val >> 16) & 0xff; -+ addr[4] = (mac_val >> 8) & 0xff; -+ addr[5] = (mac_val >> 0) & 0xff; -+ } ++ if (!of_property_read_u32(np, "mac-address-increment", &mac_inc)) ++ addr[inc_idx] += mac_inc; - return of_get_mac_addr_nvmem(np, addr); + return ret; diff --git a/root/target/linux/generic/pending-5.15/683-of_net-add-mac-address-to-of-tree.patch b/root/target/linux/generic/pending-5.15/683-of_net-add-mac-address-to-of-tree.patch index 50bcf73c..04df11f7 100755 --- a/root/target/linux/generic/pending-5.15/683-of_net-add-mac-address-to-of-tree.patch +++ b/root/target/linux/generic/pending-5.15/683-of_net-add-mac-address-to-of-tree.patch @@ -1,7 +1,7 @@ --- a/drivers/of/of_net.c +++ b/drivers/of/of_net.c -@@ -95,6 +95,27 @@ static int of_get_mac_addr_nvmem(struct - return 0; +@@ -141,6 +141,26 @@ static int of_get_mac_address_mtd(struct + return -EINVAL; } +static int of_add_mac_address(struct device_node *np, u8* addr) @@ -24,13 +24,12 @@ + kfree(prop); + return -ENOMEM; +} -+ + /** * of_get_mac_address() - * @np: Caller's Device Node -@@ -175,6 +196,7 @@ found: - addr[5] = (mac_val >> 0) & 0xff; - } +@@ -220,6 +240,7 @@ found: + if (!of_property_read_u32(np, "mac-address-increment", &mac_inc)) + addr[inc_idx] += mac_inc; + of_add_mac_address(np, addr); return ret; diff --git a/root/target/linux/generic/pending-5.15/703-phy-add-detach-callback-to-struct-phy_driver.patch b/root/target/linux/generic/pending-5.15/703-phy-add-detach-callback-to-struct-phy_driver.patch index 723dbacd..016ed94a 100755 --- a/root/target/linux/generic/pending-5.15/703-phy-add-detach-callback-to-struct-phy_driver.patch +++ b/root/target/linux/generic/pending-5.15/703-phy-add-detach-callback-to-struct-phy_driver.patch @@ -11,7 +11,7 @@ Signed-off-by: Gabor Juhos --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c -@@ -1715,6 +1715,9 @@ void phy_detach(struct phy_device *phyde +@@ -1701,6 +1701,9 @@ void phy_detach(struct phy_device *phyde struct module *ndev_owner = NULL; struct mii_bus *bus; diff --git a/root/target/linux/generic/pending-5.15/710-bridge-add-knob-for-filtering-rx-tx-BPDU-pack.patch b/root/target/linux/generic/pending-5.15/710-bridge-add-knob-for-filtering-rx-tx-BPDU-pack.patch deleted file mode 100755 index 70e45d13..00000000 --- a/root/target/linux/generic/pending-5.15/710-bridge-add-knob-for-filtering-rx-tx-BPDU-pack.patch +++ /dev/null @@ -1,174 +0,0 @@ -From: Felix Fietkau -Date: Fri, 27 Aug 2021 12:22:32 +0200 -Subject: [PATCH] bridge: add knob for filtering rx/tx BPDU packets on a port - -Some devices (e.g. wireless APs) can't have devices behind them be part of -a bridge topology with redundant links, due to address limitations. -Additionally, broadcast traffic on these devices is somewhat expensive, due to -the low data rate and wakeups of clients in powersave mode. -This knob can be used to ensure that BPDU packets are never sent or forwarded -to/from these devices - -Signed-off-by: Felix Fietkau ---- - ---- a/include/linux/if_bridge.h -+++ b/include/linux/if_bridge.h -@@ -58,6 +58,7 @@ struct br_ip_list { - #define BR_MRP_LOST_CONT BIT(18) - #define BR_MRP_LOST_IN_CONT BIT(19) - #define BR_TX_FWD_OFFLOAD BIT(20) -+#define BR_BPDU_FILTER BIT(21) - - #define BR_DEFAULT_AGEING_TIME (300 * HZ) - ---- a/net/bridge/br_forward.c -+++ b/net/bridge/br_forward.c -@@ -199,6 +199,7 @@ out: - void br_flood(struct net_bridge *br, struct sk_buff *skb, - enum br_pkt_type pkt_type, bool local_rcv, bool local_orig) - { -+ const unsigned char *dest = eth_hdr(skb)->h_dest; - struct net_bridge_port *prev = NULL; - struct net_bridge_port *p; - -@@ -214,6 +215,10 @@ void br_flood(struct net_bridge *br, str - case BR_PKT_MULTICAST: - if (!(p->flags & BR_MCAST_FLOOD) && skb->dev != br->dev) - continue; -+ if ((p->flags & BR_BPDU_FILTER) && -+ unlikely(is_link_local_ether_addr(dest) && -+ dest[5] == 0)) -+ continue; - break; - case BR_PKT_BROADCAST: - if (!(p->flags & BR_BCAST_FLOOD) && skb->dev != br->dev) ---- a/net/bridge/br_input.c -+++ b/net/bridge/br_input.c -@@ -319,6 +319,8 @@ static rx_handler_result_t br_handle_fra - fwd_mask |= p->group_fwd_mask; - switch (dest[5]) { - case 0x00: /* Bridge Group Address */ -+ if (p->flags & BR_BPDU_FILTER) -+ goto drop; - /* If STP is turned off, - then must forward to keep loop detection */ - if (p->br->stp_enabled == BR_NO_STP || ---- a/net/bridge/br_sysfs_if.c -+++ b/net/bridge/br_sysfs_if.c -@@ -240,6 +240,7 @@ BRPORT_ATTR_FLAG(multicast_flood, BR_MCA - BRPORT_ATTR_FLAG(broadcast_flood, BR_BCAST_FLOOD); - BRPORT_ATTR_FLAG(neigh_suppress, BR_NEIGH_SUPPRESS); - BRPORT_ATTR_FLAG(isolated, BR_ISOLATED); -+BRPORT_ATTR_FLAG(bpdu_filter, BR_BPDU_FILTER); - - #ifdef CONFIG_BRIDGE_IGMP_SNOOPING - static ssize_t show_multicast_router(struct net_bridge_port *p, char *buf) -@@ -292,6 +293,7 @@ static const struct brport_attribute *br - &brport_attr_group_fwd_mask, - &brport_attr_neigh_suppress, - &brport_attr_isolated, -+ &brport_attr_bpdu_filter, - &brport_attr_backup_port, - NULL - }; ---- a/net/bridge/br_stp_bpdu.c -+++ b/net/bridge/br_stp_bpdu.c -@@ -80,7 +80,8 @@ void br_send_config_bpdu(struct net_brid - { - unsigned char buf[35]; - -- if (p->br->stp_enabled != BR_KERNEL_STP) -+ if (p->br->stp_enabled != BR_KERNEL_STP || -+ (p->flags & BR_BPDU_FILTER)) - return; - - buf[0] = 0; -@@ -127,7 +128,8 @@ void br_send_tcn_bpdu(struct net_bridge_ - { - unsigned char buf[4]; - -- if (p->br->stp_enabled != BR_KERNEL_STP) -+ if (p->br->stp_enabled != BR_KERNEL_STP || -+ (p->flags & BR_BPDU_FILTER)) - return; - - buf[0] = 0; -@@ -172,6 +174,9 @@ void br_stp_rcv(const struct stp_proto * - if (!(br->dev->flags & IFF_UP)) - goto out; - -+ if (p->flags & BR_BPDU_FILTER) -+ goto out; -+ - if (p->state == BR_STATE_DISABLED) - goto out; - ---- a/include/uapi/linux/if_link.h -+++ b/include/uapi/linux/if_link.h -@@ -536,6 +536,7 @@ enum { - IFLA_BRPORT_MRP_IN_OPEN, - IFLA_BRPORT_MCAST_EHT_HOSTS_LIMIT, - IFLA_BRPORT_MCAST_EHT_HOSTS_CNT, -+ IFLA_BRPORT_BPDU_FILTER, - __IFLA_BRPORT_MAX - }; - #define IFLA_BRPORT_MAX (__IFLA_BRPORT_MAX - 1) ---- a/net/bridge/br_netlink.c -+++ b/net/bridge/br_netlink.c -@@ -184,6 +184,7 @@ static inline size_t br_port_info_size(v - + nla_total_size(1) /* IFLA_BRPORT_VLAN_TUNNEL */ - + nla_total_size(1) /* IFLA_BRPORT_NEIGH_SUPPRESS */ - + nla_total_size(1) /* IFLA_BRPORT_ISOLATED */ -+ + nla_total_size(1) /* IFLA_BRPORT_BPDU_FILTER */ - + nla_total_size(sizeof(struct ifla_bridge_id)) /* IFLA_BRPORT_ROOT_ID */ - + nla_total_size(sizeof(struct ifla_bridge_id)) /* IFLA_BRPORT_BRIDGE_ID */ - + nla_total_size(sizeof(u16)) /* IFLA_BRPORT_DESIGNATED_PORT */ -@@ -269,7 +270,8 @@ static int br_port_fill_attrs(struct sk_ - BR_MRP_LOST_CONT)) || - nla_put_u8(skb, IFLA_BRPORT_MRP_IN_OPEN, - !!(p->flags & BR_MRP_LOST_IN_CONT)) || -- nla_put_u8(skb, IFLA_BRPORT_ISOLATED, !!(p->flags & BR_ISOLATED))) -+ nla_put_u8(skb, IFLA_BRPORT_ISOLATED, !!(p->flags & BR_ISOLATED)) || -+ nla_put_u8(skb, IFLA_BRPORT_BPDU_FILTER, !!(p->flags & BR_BPDU_FILTER))) - return -EMSGSIZE; - - timerval = br_timer_value(&p->message_age_timer); -@@ -829,6 +831,7 @@ static const struct nla_policy br_port_p - [IFLA_BRPORT_ISOLATED] = { .type = NLA_U8 }, - [IFLA_BRPORT_BACKUP_PORT] = { .type = NLA_U32 }, - [IFLA_BRPORT_MCAST_EHT_HOSTS_LIMIT] = { .type = NLA_U32 }, -+ [IFLA_BRPORT_BPDU_FILTER] = { .type = NLA_U8 }, - }; - - /* Change the state of the port and notify spanning tree */ -@@ -893,6 +896,7 @@ static int br_setport(struct net_bridge_ - br_set_port_flag(p, tb, IFLA_BRPORT_VLAN_TUNNEL, BR_VLAN_TUNNEL); - br_set_port_flag(p, tb, IFLA_BRPORT_NEIGH_SUPPRESS, BR_NEIGH_SUPPRESS); - br_set_port_flag(p, tb, IFLA_BRPORT_ISOLATED, BR_ISOLATED); -+ br_set_port_flag(p, tb, IFLA_BRPORT_BPDU_FILTER, BR_BPDU_FILTER); - - changed_mask = old_flags ^ p->flags; - ---- a/net/core/rtnetlink.c -+++ b/net/core/rtnetlink.c -@@ -55,7 +55,7 @@ - #include - - #define RTNL_MAX_TYPE 50 --#define RTNL_SLAVE_MAX_TYPE 40 -+#define RTNL_SLAVE_MAX_TYPE 41 - - struct rtnl_link { - rtnl_doit_func doit; -@@ -4685,7 +4685,9 @@ int ndo_dflt_bridge_getlink(struct sk_bu - brport_nla_put_flag(skb, flags, mask, - IFLA_BRPORT_MCAST_FLOOD, BR_MCAST_FLOOD) || - brport_nla_put_flag(skb, flags, mask, -- IFLA_BRPORT_BCAST_FLOOD, BR_BCAST_FLOOD)) { -+ IFLA_BRPORT_BCAST_FLOOD, BR_BCAST_FLOOD) || -+ brport_nla_put_flag(skb, flags, mask, -+ IFLA_BRPORT_BPDU_FILTER, BR_BPDU_FILTER)) { - nla_nest_cancel(skb, protinfo); - goto nla_put_failure; - } diff --git a/root/target/linux/generic/pending-5.15/735-net-phy-at803x-fix-at8033-sgmii-mode.patch b/root/target/linux/generic/pending-5.15/735-net-phy-at803x-fix-at8033-sgmii-mode.patch new file mode 100755 index 00000000..33a994a9 --- /dev/null +++ b/root/target/linux/generic/pending-5.15/735-net-phy-at803x-fix-at8033-sgmii-mode.patch @@ -0,0 +1,51 @@ +From: Roman Yeryomin +Subject: kernel: add at803x fix for sgmii mode + +Some (possibly broken) bootloaders incorreclty initialize at8033 +phy. This patch enables sgmii autonegotiation mode. + +[john@phrozen.org: felix added this to his upstream queue] + +Signed-off-by: Roman Yeryomin +--- + drivers/net/phy/at803x.c | 25 +++++++++++++++++++++++++ + 1 file changed, 25 insertions(+) + +--- a/drivers/net/phy/at803x.c ++++ b/drivers/net/phy/at803x.c +@@ -76,6 +76,7 @@ + #define AT803X_LOC_MAC_ADDR_32_47_OFFSET 0x804A + #define AT803X_REG_CHIP_CONFIG 0x1f + #define AT803X_BT_BX_REG_SEL 0x8000 ++#define AT803X_SGMII_ANEG_EN 0x1000 + + #define AT803X_DEBUG_ADDR 0x1D + #define AT803X_DEBUG_DATA 0x1E +@@ -790,6 +791,27 @@ static int at8031_pll_config(struct phy_ + static int at803x_config_init(struct phy_device *phydev) + { + int ret; ++ u32 v; ++ ++ if (phydev->drv->phy_id == ATH8031_PHY_ID && ++ phydev->interface == PHY_INTERFACE_MODE_SGMII) ++ { ++ v = phy_read(phydev, AT803X_REG_CHIP_CONFIG); ++ /* select SGMII/fiber page */ ++ ret = phy_write(phydev, AT803X_REG_CHIP_CONFIG, ++ v & ~AT803X_BT_BX_REG_SEL); ++ if (ret) ++ return ret; ++ /* enable SGMII autonegotiation */ ++ ret = phy_write(phydev, MII_BMCR, AT803X_SGMII_ANEG_EN); ++ if (ret) ++ return ret; ++ /* select copper page */ ++ ret = phy_write(phydev, AT803X_REG_CHIP_CONFIG, ++ v | AT803X_BT_BX_REG_SEL); ++ if (ret) ++ return ret; ++ } + + /* The RX and TX delay default is: + * after HW reset: RX delay enabled and TX delay disabled diff --git a/root/target/linux/generic/pending-5.15/760-net-dsa-mv88e6xxx-fix-vlan-setup.patch b/root/target/linux/generic/pending-5.15/760-net-dsa-mv88e6xxx-fix-vlan-setup.patch index 6287d202..ecc3a384 100755 --- a/root/target/linux/generic/pending-5.15/760-net-dsa-mv88e6xxx-fix-vlan-setup.patch +++ b/root/target/linux/generic/pending-5.15/760-net-dsa-mv88e6xxx-fix-vlan-setup.patch @@ -17,11 +17,11 @@ Signed-off-by: DENG Qingfang --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c -@@ -3189,6 +3189,7 @@ static int mv88e6xxx_setup(struct dsa_sw +@@ -3027,6 +3027,7 @@ static int mv88e6xxx_setup(struct dsa_sw chip->ds = ds; ds->slave_mii_bus = mv88e6xxx_default_mdio_bus(chip); + ds->configure_vlan_while_not_filtering = true; - /* Since virtual bridges are mapped in the PVT, the number we support - * depends on the physical switch topology. We need to let DSA figure + mv88e6xxx_reg_lock(chip); + diff --git a/root/target/linux/generic/pending-5.15/761-net-dsa-mt7530-Support-EEE-features.patch b/root/target/linux/generic/pending-5.15/761-net-dsa-mt7530-Support-EEE-features.patch new file mode 100755 index 00000000..405f87ff --- /dev/null +++ b/root/target/linux/generic/pending-5.15/761-net-dsa-mt7530-Support-EEE-features.patch @@ -0,0 +1,103 @@ +From 9cfb2d426c38272f245e9e6f62b3552d1ed5852b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ren=C3=A9=20van=20Dorst?= +Date: Tue, 21 Apr 2020 00:18:08 +0200 +Subject: [PATCH] net: dsa: mt7530: Support EEE features +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: René van Dorst +--- a/drivers/net/dsa/mt7530.c ++++ b/drivers/net/dsa/mt7530.c +@@ -2752,9 +2752,13 @@ static void mt753x_phylink_mac_link_up(s + switch (speed) { + case SPEED_1000: + mcr |= PMCR_FORCE_SPEED_1000; ++ if (priv->eee_enable & BIT(port)) ++ mcr |= PMCR_FORCE_EEE1G; + break; + case SPEED_100: + mcr |= PMCR_FORCE_SPEED_100; ++ if (priv->eee_enable & BIT(port)) ++ mcr |= PMCR_FORCE_EEE100; + break; + } + if (duplex == DUPLEX_FULL) { +@@ -3031,6 +3035,54 @@ static int mt753x_set_mac_eee(struct dsa + + return 0; + } ++ ++static int mt7530_get_mac_eee(struct dsa_switch *ds, int port, ++ struct ethtool_eee *e) ++{ ++ struct mt7530_priv *priv = ds->priv; ++ u32 eeecr, pmsr; ++ ++ e->eee_enabled = !!(priv->eee_enable & BIT(port)); ++ ++ if (e->eee_enabled) { ++ eeecr = mt7530_read(priv, MT7530_PMEEECR_P(port)); ++ e->tx_lpi_enabled = !(eeecr & LPI_MODE_EN); ++ e->tx_lpi_timer = (eeecr >> 4) & 0xFFF; ++ pmsr = mt7530_read(priv, MT7530_PMSR_P(port)); ++ e->eee_active = e->eee_enabled && !!(pmsr & PMSR_EEE1G); ++ } else { ++ e->tx_lpi_enabled = 0; ++ e->tx_lpi_timer = 0; ++ e->eee_active = 0; ++ } ++ ++ return 0; ++} ++ ++static int mt7530_set_mac_eee(struct dsa_switch *ds, int port, ++ struct ethtool_eee *e) ++{ ++ struct mt7530_priv *priv = ds->priv; ++ u32 eeecr; ++ ++ if (e->tx_lpi_enabled && e->tx_lpi_timer > 0xFFF) ++ return -EINVAL; ++ ++ if (e->eee_enabled) { ++ priv->eee_enable |= BIT(port); ++ //MT7530_PMEEECR_P ++ eeecr = mt7530_read(priv, MT7530_PMEEECR_P(port)); ++ eeecr &= 0xFFFF0000; ++ if (!e->tx_lpi_enabled) ++ eeecr |= LPI_MODE_EN; ++ eeecr = LPI_THRESH(e->tx_lpi_timer); ++ mt7530_write(priv, MT7530_PMEEECR_P(port), eeecr); ++ } else { ++ priv->eee_enable &= ~(BIT(port)); ++ } ++ ++ return 0; ++} + + static const struct dsa_switch_ops mt7530_switch_ops = { + .get_tag_protocol = mtk_get_tag_protocol, +--- a/drivers/net/dsa/mt7530.h ++++ b/drivers/net/dsa/mt7530.h +@@ -329,6 +329,12 @@ enum mt7530_vlan_port_attr { + #define MAX_RX_PKT_LEN_1552 0x2 + #define MAX_RX_PKT_LEN_JUMBO 0x3 + ++#define MT7530_PMEEECR_P(x) (0x3004 + (x) * 0x100) ++#define WAKEUP_TIME_1000(x) ((x & 0xFF) << 24) ++#define WAKEUP_TIME_100(x) ((x & 0xFF) << 16) ++#define LPI_THRESH(x) ((x & 0xFFF) << 4) ++#define LPI_MODE_EN BIT(0) ++ + /* Register for MIB */ + #define MT7530_PORT_MIB_COUNTER(x) (0x4000 + (x) * 0x100) + #define MT7530_MIB_CCR 0x4fe0 +@@ -804,6 +810,7 @@ struct mt7530_priv { + unsigned int p5_intf_sel; + u8 mirror_rx; + u8 mirror_tx; ++ u8 eee_enable; + + struct mt7530_port ports[MT7530_NUM_PORTS]; + /* protect among processes for registers access*/ diff --git a/root/target/linux/generic/pending-5.15/768-net-dsa-mv88e6xxx-Request-assisted-learning-on-CPU-port.patch b/root/target/linux/generic/pending-5.15/768-net-dsa-mv88e6xxx-Request-assisted-learning-on-CPU-port.patch index 6ad9b449..83171f24 100755 --- a/root/target/linux/generic/pending-5.15/768-net-dsa-mv88e6xxx-Request-assisted-learning-on-CPU-port.patch +++ b/root/target/linux/generic/pending-5.15/768-net-dsa-mv88e6xxx-Request-assisted-learning-on-CPU-port.patch @@ -17,7 +17,7 @@ Signed-off-by: Tobias Waldekranz --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c -@@ -6310,6 +6310,7 @@ static int mv88e6xxx_register_switch(str +@@ -6144,6 +6144,7 @@ static int mv88e6xxx_register_switch(str ds->ops = &mv88e6xxx_switch_ops; ds->ageing_time_min = chip->info->age_time_coeff; ds->ageing_time_max = chip->info->age_time_coeff * U8_MAX; diff --git a/root/target/linux/generic/pending-5.15/780-ARM-kirkwood-add-missing-linux-if_ether.h-for-ETH_AL.patch b/root/target/linux/generic/pending-5.15/780-ARM-kirkwood-add-missing-linux-if_ether.h-for-ETH_AL.patch deleted file mode 100755 index fcf7892c..00000000 --- a/root/target/linux/generic/pending-5.15/780-ARM-kirkwood-add-missing-linux-if_ether.h-for-ETH_AL.patch +++ /dev/null @@ -1,61 +0,0 @@ -From patchwork Thu Aug 5 22:23:30 2021 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -X-Patchwork-Submitter: Daniel Golle -X-Patchwork-Id: 12422209 -Date: Thu, 5 Aug 2021 23:23:30 +0100 -From: Daniel Golle -To: linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, - linux-kernel@vger.kernel.org -Cc: "David S. Miller" , Andrew Lunn , - Michael Walle -Subject: [PATCH] ARM: kirkwood: add missing for ETH_ALEN -Message-ID: -MIME-Version: 1.0 -Content-Disposition: inline -X-BeenThere: linux-arm-kernel@lists.infradead.org -X-Mailman-Version: 2.1.34 -Precedence: list -List-Id: -List-Archive: -Sender: "linux-arm-kernel" - -After commit 83216e3988cd1 ("of: net: pass the dst buffer to -of_get_mac_address()") build fails for kirkwood as ETH_ALEN is not -defined. - -arch/arm/mach-mvebu/kirkwood.c: In function 'kirkwood_dt_eth_fixup': -arch/arm/mach-mvebu/kirkwood.c:87:13: error: 'ETH_ALEN' undeclared (first use in this function); did you mean 'ESTALE'? - u8 tmpmac[ETH_ALEN]; - ^~~~~~~~ - ESTALE -arch/arm/mach-mvebu/kirkwood.c:87:13: note: each undeclared identifier is reported only once for each function it appears in -arch/arm/mach-mvebu/kirkwood.c:87:6: warning: unused variable 'tmpmac' [-Wunused-variable] - u8 tmpmac[ETH_ALEN]; - ^~~~~~ -make[5]: *** [scripts/Makefile.build:262: arch/arm/mach-mvebu/kirkwood.o] Error 1 -make[5]: *** Waiting for unfinished jobs.... - -Add missing #include to fix this. - -Cc: David S. Miller -Cc: Andrew Lunn -Cc: Michael Walle -Reported-by: https://buildbot.openwrt.org/master/images/#/builders/56/builds/220/steps/44/logs/stdio -Fixes: 83216e3988cd1 ("of: net: pass the dst buffer to of_get_mac_address()") -Signed-off-by: Daniel Golle ---- - arch/arm/mach-mvebu/kirkwood.c | 1 + - 1 file changed, 1 insertion(+) - ---- a/arch/arm/mach-mvebu/kirkwood.c -+++ b/arch/arm/mach-mvebu/kirkwood.c -@@ -14,6 +14,7 @@ - #include - #include - #include -+#include - #include - #include - #include diff --git a/root/target/linux/generic/pending-5.15/800-bcma-get-SoC-device-struct-copy-its-DMA-params-to-th.patch b/root/target/linux/generic/pending-5.15/800-bcma-get-SoC-device-struct-copy-its-DMA-params-to-th.patch index 478a2cb2..8ea307ea 100755 --- a/root/target/linux/generic/pending-5.15/800-bcma-get-SoC-device-struct-copy-its-DMA-params-to-th.patch +++ b/root/target/linux/generic/pending-5.15/800-bcma-get-SoC-device-struct-copy-its-DMA-params-to-th.patch @@ -54,14 +54,12 @@ Signed-off-by: Rafał Miłecki void bcma_prepare_core(struct bcma_bus *bus, struct bcma_device *core) { -- device_initialize(&core->dev); + struct device *dev = &core->dev; + -+ device_initialize(dev); + device_initialize(&core->dev); core->dev.release = bcma_release_core_dev; core->dev.bus = &bcma_bus_type; -- dev_set_name(&core->dev, "bcma%d:%d", bus->num, core->core_index); -+ dev_set_name(dev, "bcma%d:%d", bus->num, core->core_index); + dev_set_name(&core->dev, "bcma%d:%d", bus->num, core->core_index); core->dev.parent = bus->dev; - if (bus->dev) + if (bus->dev) { diff --git a/root/target/linux/generic/pending-5.15/810-pci_disable_common_quirks.patch b/root/target/linux/generic/pending-5.15/810-pci_disable_common_quirks.patch index 165ae672..deddd188 100755 --- a/root/target/linux/generic/pending-5.15/810-pci_disable_common_quirks.patch +++ b/root/target/linux/generic/pending-5.15/810-pci_disable_common_quirks.patch @@ -33,7 +33,7 @@ Signed-off-by: Gabor Juhos /* * The Mellanox Tavor device gives false positive parity errors. Disable * parity error reporting. -@@ -3351,6 +3352,8 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_I +@@ -3312,6 +3313,8 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_I DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x65f9, quirk_intel_mc_errata); DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x65fa, quirk_intel_mc_errata); @@ -42,7 +42,7 @@ Signed-off-by: Gabor Juhos /* * Ivytown NTB BAR sizes are misreported by the hardware due to an erratum. * To work around this, query the size it should be configured to by the -@@ -3376,6 +3379,8 @@ static void quirk_intel_ntb(struct pci_d +@@ -3337,6 +3340,8 @@ static void quirk_intel_ntb(struct pci_d DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0e08, quirk_intel_ntb); DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0e0d, quirk_intel_ntb); @@ -51,7 +51,7 @@ Signed-off-by: Gabor Juhos /* * Some BIOS implementations leave the Intel GPU interrupts enabled, even * though no one is handling them (e.g., if the i915 driver is never -@@ -3414,6 +3419,8 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_IN +@@ -3375,6 +3380,8 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_IN DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x010a, disable_igfx_irq); DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x0152, disable_igfx_irq); diff --git a/root/target/linux/generic/pending-5.15/811-pci_disable_usb_common_quirks.patch b/root/target/linux/generic/pending-5.15/811-pci_disable_usb_common_quirks.patch index 9b0ce710..67406bac 100755 --- a/root/target/linux/generic/pending-5.15/811-pci_disable_usb_common_quirks.patch +++ b/root/target/linux/generic/pending-5.15/811-pci_disable_usb_common_quirks.patch @@ -98,7 +98,7 @@ Signed-off-by: Felix Fietkau #endif /* __LINUX_USB_PCI_QUIRKS_H */ --- a/include/linux/usb/hcd.h +++ b/include/linux/usb/hcd.h -@@ -495,7 +495,14 @@ extern int usb_hcd_pci_probe(struct pci_ +@@ -497,7 +497,14 @@ extern int usb_hcd_pci_probe(struct pci_ extern void usb_hcd_pci_remove(struct pci_dev *dev); extern void usb_hcd_pci_shutdown(struct pci_dev *dev); diff --git a/root/target/linux/generic/pending-5.15/834-ledtrig-libata.patch b/root/target/linux/generic/pending-5.15/834-ledtrig-libata.patch index ee911e3c..fddec74d 100755 --- a/root/target/linux/generic/pending-5.15/834-ledtrig-libata.patch +++ b/root/target/linux/generic/pending-5.15/834-ledtrig-libata.patch @@ -45,7 +45,7 @@ Signed-off-by: Daniel Golle depends on ACPI --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c -@@ -656,6 +656,19 @@ u64 ata_tf_read_block(const struct ata_t +@@ -650,6 +650,19 @@ u64 ata_tf_read_block(const struct ata_t return block; } @@ -65,7 +65,7 @@ Signed-off-by: Daniel Golle /** * ata_build_rw_tf - Build ATA taskfile for given read/write request * @tf: Target ATA taskfile -@@ -4572,6 +4585,9 @@ struct ata_queued_cmd *ata_qc_new_init(s +@@ -4545,6 +4558,9 @@ struct ata_queued_cmd *ata_qc_new_init(s if (tag < 0) return NULL; } @@ -75,7 +75,7 @@ Signed-off-by: Daniel Golle qc = __ata_qc_from_tag(ap, tag); qc->tag = qc->hw_tag = tag; -@@ -5350,6 +5366,9 @@ struct ata_port *ata_port_alloc(struct a +@@ -5323,6 +5339,9 @@ struct ata_port *ata_port_alloc(struct a ap->stats.unhandled_irq = 1; ap->stats.idle_irq = 1; #endif @@ -85,7 +85,7 @@ Signed-off-by: Daniel Golle ata_sff_port_init(ap); return ap; -@@ -5385,6 +5404,12 @@ static void ata_host_release(struct kref +@@ -5358,6 +5377,12 @@ static void ata_host_release(struct kref kfree(ap->pmp_link); kfree(ap->slave_link); @@ -98,7 +98,7 @@ Signed-off-by: Daniel Golle kfree(ap); host->ports[i] = NULL; } -@@ -5791,7 +5816,23 @@ int ata_host_register(struct ata_host *h +@@ -5764,7 +5789,23 @@ int ata_host_register(struct ata_host *h host->ports[i]->print_id = atomic_inc_return(&ata_print_id); host->ports[i]->local_port_no = i + 1; } @@ -134,7 +134,7 @@ Signed-off-by: Daniel Golle /* * Define if arch has non-standard setup. This is a _PCI_ standard -@@ -888,6 +891,12 @@ struct ata_port { +@@ -883,6 +886,12 @@ struct ata_port { #ifdef CONFIG_ATA_ACPI struct ata_acpi_gtm __acpi_init_gtm; /* use ata_acpi_init_gtm() */ #endif diff --git a/root/target/linux/generic/pending-5.15/920-mangle_bootargs.patch b/root/target/linux/generic/pending-5.15/920-mangle_bootargs.patch index d3f3a1c6..3299151e 100755 --- a/root/target/linux/generic/pending-5.15/920-mangle_bootargs.patch +++ b/root/target/linux/generic/pending-5.15/920-mangle_bootargs.patch @@ -13,7 +13,7 @@ Signed-off-by: Imre Kaloz --- a/init/Kconfig +++ b/init/Kconfig -@@ -1805,6 +1805,15 @@ config EMBEDDED +@@ -1782,6 +1782,15 @@ config EMBEDDED an embedded system so certain expert options are available for configuration. @@ -31,7 +31,7 @@ Signed-off-by: Imre Kaloz help --- a/init/main.c +++ b/init/main.c -@@ -614,6 +614,29 @@ static inline void setup_nr_cpu_ids(void +@@ -604,6 +604,29 @@ static inline void setup_nr_cpu_ids(void static inline void smp_prepare_cpus(unsigned int maxcpus) { } #endif @@ -61,7 +61,7 @@ Signed-off-by: Imre Kaloz /* * We need to store the untouched command line for future reference. * We also need to store the touched command line since the parameter -@@ -954,6 +977,7 @@ asmlinkage __visible void __init __no_sa +@@ -935,6 +958,7 @@ asmlinkage __visible void __init __no_sa pr_notice("%s", linux_banner); early_security_init(); setup_arch(&command_line); diff --git a/root/target/linux/generic/pending-5.15/930-qcom-qmi-helpers.patch b/root/target/linux/generic/pending-5.15/930-qcom-qmi-helpers.patch deleted file mode 100755 index 2f427742..00000000 --- a/root/target/linux/generic/pending-5.15/930-qcom-qmi-helpers.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/drivers/soc/qcom/Kconfig -+++ b/drivers/soc/qcom/Kconfig -@@ -92,7 +92,7 @@ config QCOM_PDR_HELPERS - select QCOM_QMI_HELPERS - - config QCOM_QMI_HELPERS -- tristate -+ tristate "Qualcomm QMI Helpers" - depends on NET - - config QCOM_RMTFS_MEM