Compare commits

..

51 Commits

Author SHA1 Message Date
daiqingshuang
1441c2a559 编译脚本 2025-03-19 10:59:56 +08:00
Álvaro Fernández Rojas
6935d0fac5 kernel: r8126: update to v10.015.00
Changelog: https://github.com/openwrt/rtl8126/compare/10.014.01...10.015.00

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry picked from commit 3d3328bf5f)
2025-02-27 12:04:22 +01:00
Álvaro Fernández Rojas
7aac01cf88 kernel: r8125: update to v9.015.00
Changelog: https://github.com/openwrt/rtl8125/compare/9.014.01...9.015.00

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry picked from commit a8dea562aa)
2025-02-27 12:04:19 +01:00
Álvaro Fernández Rojas
4e41f2385d kernel: r8168: update to v8.055.00
Changelog: https://github.com/openwrt/rtl8168/compare/8.054.00...8.055.00

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry picked from commit 5dd763680e)
2025-02-05 15:19:31 +01:00
Daniel Golle
d62241cf5a mediatek: mt7622: fix SATA on BPi-R64
A commit which made their way into Linux stable down to 5.15 broke the
SATA support on the BPi-R64.

Fix this by importing a (still pending) patch re-adding the 'syscon'
compatible to the pciesys clock-controller which also contains phy-mode
bits referenced by the ahci_mtk driver expecting to access them using
syscon_regmap_lookup_by_phandle().

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit 69890e16b3)
2025-02-01 05:19:18 +00:00
Álvaro Fernández Rojas
1292a493a6 bmips: shg2500: add missing led controller cells
Fixes the following DT warnings:
../dts/bcm63168-sercomm-shg2500.dts:76.4-14: Warning (reg_format): /ubus/spi@10001000/led-controller@1/led@1:reg: property has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1)
../dts/bcm63168-sercomm-shg2500.dts:75.9-78.5: Warning (avoid_default_addr_size): /ubus/spi@10001000/led-controller@1/led@1: Relying on default #address-cells value
../dts/bcm63168-sercomm-shg2500.dts:75.9-78.5: Warning (avoid_default_addr_size): /ubus/spi@10001000/led-controller@1/led@1: Relying on default #size-cells value

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry picked from commit fbe0bd5f64)
2025-01-28 08:36:43 +01:00
Sander Vanheule
4f2c6dbc39 realtek: Fix old compatible for HPE 1920-8G PoE
Supported devices are listed in the metadata as the first part of the
DTS compatible. This normally follows the format "vendor,device".

When updating the device name of the 180W 1920-8G PoE an underscore was
used, instead of a comma, to join the vendor and device name. This will
lead to warnings for users wanting to sysupgrade a device with an older
compatible, as the device's info does not match the one the metadata.

Fixes: 987c96e889 ("realtek: rename hpe,1920-8g-poe to match hardware")
Signed-off-by: Sander Vanheule <sander@svanheule.net>
(cherry picked from commit 6a7fa68569)
2025-01-24 17:17:19 +01:00
Álvaro Fernández Rojas
b5ad709554 generic: backport pending gpio-regmap ops patch
This patch has been accepted for linux v6.14 so we can move it from pending
to backport.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry picked from commit 2f2e21a52b)
2025-01-22 21:01:01 +01:00
Álvaro Fernández Rojas
55af6e1af0 generic: add gpio-regmap request/free ops patch
This patch is needed on bmips since it fixes issues with GPIOs not being
properly configured due to gpio_request_enable not being called on bcm63xx
devices. Therefore we can now drop the bcm63268 gpio function patch.

Backported from f5b1d340be with the exception of
the realtek and bmips patches removal.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry picked from commit f5b1d340be)
2025-01-08 19:59:28 +01:00
David Lutz
125a2e1311 ath79: Add support for Sophos AP15C
The Sophos AP15C uses the same hardware as the AP15, but has a reset button.

Based on:
commit 6f1efb2898 ("ath79: add support for Sophos AP100/AP55 family")
author    Andrew Powers-Holmes <andrew@omnom.net>
          Fri, 3 Sep 2021 15:53:57 +0200 (23:53 +1000)
committer Hauke Mehrtens <hauke@hauke-m.de>
          Sat, 16 Apr 2022 16:59:29 +0200 (16:59 +0200)

Unique to AP15C:
 - Reset button
 - External RJ45 serial console port

Flashing instructions:

This firmware can be flashed either via a compatible Sophos SG or XG
firewall appliance, which does not require disassembling the device, or via
the U-Boot console available on the internal UART header.

To flash via XG appliance:
 - Register on Sophos' website for a no-cost Home Use XG firewall license
 - Download and install the XG software on a compatible PC or virtual
   machine, complete initial appliance setup, and enable SSH console access
 - Connect the target AP device to the XG appliance's LAN interface
 - Approve the AP from the XG Web UI and wait until it shows as Active
   (this can take 3-5 minutes)
 - Connect to the XG appliance over SSH and access the Advanced Console
   (Menu option 5, then menu option 3)
 - Run `sudo awetool` and select the menu option to connect to an AP via
   SSH. When prompted to enable SSH on the target AP, select Yes.
 - Wait 2-3 minutes, then select the AP from the awetool menu again. This
   will connect you to a root shell on the target AP.
 - Copy the firmware to /tmp/openwrt.bin on the target AP via SCP/TFTP/etc
 - Run `mtd -r write /tmp/openwrt.bin astaro_image`
 - When complete, the access point will reboot to OpenWRT.

To flash via U-Boot serial console:
 - Configure a TFTP server on your PC, and set IP address 192.168.99.8 with
   netmask 255.255.255.0
 - Copy the firmware .bin to the TFTP server and rename to 'uImage_AP15C'
 - Open the target AP's enclosure and locate the 4-pin 3.3V UART header [4]
 - Connect the AP ethernet to your PC's ethernet port
 - Connect a terminal to the UART at 115200 8/N/1 as usual
 - Power on the AP and press a key to cancel autoboot when prompted
 - Run the following commands at the U-Boot console:
    - `tftpboot`
    - `cp.b $fileaddr 0x9f070000 $filesize`
    - `boot`
 - The access point will boot to OpenWRT.

Signed-off-by: David Lutz <kpanic@hirnduenger.de>
2024-12-27 13:18:24 +01:00
Kyle Hendry
515ffb40cb bmips: dts: fix pinctrl error
The kernel logs the error "bcm6368_nand 10000200.nand: there is not valid
maps for state default" on boot and all nand pins show as UNCLAIMED in
sysfs pinmux-pins.

bcm6362.dtsi, bcm6368.dtsi and bcm63268.dtsi use the undocumented property
group which the driver doesn't understand. This has been documented upstream
in commit caf963efd4b0b9ff42ca12e52b8efe277264d35b.

Replacing group with pins allows the nand pins to be properly configured.

Signed-off-by: Kyle Hendry <kylehendrydev@gmail.com>
[add bcm636/bcm6368 and fix commit title]
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry picked from commit d1e9c50d06)
2024-12-24 11:26:42 +01:00
Chris Jones
b551214c9d ipq40xx: make GL.iNet A1300 switch functional
Set the physical switch to KEY_RFKILL, since its previous value
(KEY_SETUP) is unsupported. This should also make the KEY_RESET button
functional, by allowing the gpio-button-hotplug kmod to load.

Signed-off-by: Chris Jones <cmsj@tenshu.net>
Link: https://github.com/openwrt/openwrt/pull/16564
Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
(cherry picked from commit 83a04cd2b8)
Link: https://github.com/openwrt/openwrt/pull/17228
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-12-11 17:03:26 +01:00
Christian Marangi
239cdcd90c build: Unconditionally append kmod feed for BuildBot
Recent changes to BuildBot config moved the kmods to a dedicated
directory and dropped them from the packages dir. This was needed as
both OPKG and APK gets confused if both entry are present.

To fix this, unconditionally append the kmod feed line if
CONFIG_BUILDBOT is enabled.

Fixes: #17146
Link: https://github.com/openwrt/openwrt/pull/17151
(cherry picked from commit 53ee2e8c03)
[ fix conflict error for missing APK support ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-12-03 12:42:34 +01:00
Eric Fahlgren
db554fd450 build: profiles.json: add kernel version information
Currently downstream tools like ASU lack information about kernel
version to find out the relevant kmod build folder on downloads server.

So lets fix it by providing a new `linux_kernel` JSON array which would
for the start provide Linux kernel version, revision and vermagic
information.

  "linux_kernel": {
     "release": "1",
     "vermagic": "b57450c07d3a786158c3601fc5cee57d",
     "version": "6.6.61"
   },

Fixes: openwrt/openwrt#17036
Fixes: efahl/owut#9
Co-developed-by: Petr Štetiar <ynezz@true.cz>
Signed-off-by: Eric Fahlgren <ericfahlgren@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17042
Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit c857145e03)
2024-11-29 21:45:01 +01:00
Michael Pratt
6d5c434b14 build: ensure silent Make behavior for json scripts
Run the invocation of Make with verbosity in order to
prevent the printing of Makefile level and subtarget status.
e.g.  make[3] -C target/linux val.DEFAULT_PACKAGES val.ARCH_PACKAGES

Remove piping of stderr, which is only useful when using
the "communicate" method over the "run" method,
and this script would not be written to handle a captured error anyway.

For error testing, stdout and stderr can be set to a file object
with the open() function like this:

out = open('json_out', 'w')
err = open('json_err', 'w')

...
...
stdout=out,
stderr=err,

Signed-off-by: Michael Pratt <mcpratt@pm.me>
(cherry picked from commit fd3376c5ee)
2024-11-29 21:44:54 +01:00
Hauke Mehrtens
a281c02288 wifi-scripts: Fix parsing of Capabilities
Fixup capabilities parsing in iw output.

In addition to the normal capabilities iw now also outputs HE MAC, HE
PHY and EHT MAC and EHT PHY capabilities. Exclude them in the parsing.

The grep returns this with mac80211-hwsim:
```
root@OpenWrt:~# iw phy phy0 info | grep 'Capabilities:'
		Capabilities: 0x107e
			HE PHY Capabilities: (0x02bfce0000000000000000):
			EHT PHY Capabilities: (0x7c0000feffff7f01):
			HE PHY Capabilities: (0x02bfce0000000000000000):
			EHT PHY Capabilities: (0x7c0000feffff7f01):
			HE PHY Capabilities: (0x02bf000000000000000000):
		Capabilities: 0x107e
			HE PHY Capabilities: (0x1cbfce0000000000000000):
			EHT PHY Capabilities: (0xfc1f3ffeffff7f37):
			HE PHY Capabilities: (0x1cbfce0000000000000000):
			EHT PHY Capabilities: (0xfc1f3ffeffff7f37):
			HE PHY Capabilities: (0x1cbf000000000000000000):
			HE PHY Capabilities: (0x1cbfce0000000000000000):
			EHT PHY Capabilities: (0xfefffffeffffff7f):
			HE PHY Capabilities: (0x1cbfce0000000000000000):
			EHT PHY Capabilities: (0xfefffffeffffff7f):
			HE PHY Capabilities: (0x1cbf000000000000000000):
		Capabilities: 0x107e
```

With busybox 1.36.1 the ht_cap_mask variable will be set to
-72057598332895361. With busybox 1.37.0 it will be set to -1.
Both values are wrong, after this change it will be set to 4222
(0x107E).

Link: https://github.com/openwrt/openwrt/pull/17043
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit adf958c919)
2024-11-23 23:49:37 +01:00
Shiji Yang
d557e23932 ath79: lzma-loader: fix syntax error
C compiler can't parse '#else if'.

Fixes: f84a9f7dc0 ("ath79: add support for Huawei AP6010DN")
Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/16989
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 98f26346cb)
2024-11-23 23:23:23 +01:00
Marco von Rosenberg
769253775c ath79: add support for Huawei AP6010DN
Huawei AP6010DN is a dual-band, dual-radio 802.11a/b/g/n 2x2 MIMO
enterprise access point with one Gigabit Ethernet port and PoE
support.

Hardware highlights:
- CPU: AR9344 SoC at 480MHz
- RAM: 128MB DDR2
- Flash: 32MB SPI-NOR
- Wi-Fi 2.4GHz: AR9344-internal radio
- Wi-Fi 5GHz: AR9580 PCIe WLAN SoC
- Ethernet: 10/100/1000 Mbps Ethernet through Atheros AR8035 PHY
- PoE: yes
- Standalone 12V/2A power input
- Serial console externally available through RJ45 port
- External watchdog: CAT706SVI (1.6s timeout)

Serial console:
  9600n8 (9600 baud, no stop bits, no parity, 8 data bits)

MAC addresses:
  Each device has 32 consecutive MAC addresses allocated by
  the vendor, which don't overlap between devices.
  This was confirmed with multiple devices with consecutive
  serial numbers.
  The MAC address range starts with the address on the label.
  To be able to distinguish between the interfaces,
  the following MAC address scheme is used:
    - eth0 = label MAC
    - radio0 (Wi-Fi 2.4GHz) = label MAC + 1
    - radio1 (Wi-Fi 5GHz) = label MAC + 2

Installation:
0. Connect some sort of RJ45-to-USB adapter to "Console" port of the AP

1. Power up the AP

2. At prompt "Press f or F  to stop Auto-Boot in 3 seconds",
   do what they say.
   Log in with default admin password "admin@huawei.com".

3. Boot the OpenWrt initramfs from TFTP using the hidden script "run ramboot".
   Replace IP address as needed:

   > setenv serverip 192.168.1.10
   > setenv ipaddr 192.168.1.1
   > setenv rambootfile openwrt-ath79-generic-huawei_ap6010dn-initramfs-kernel.bin
   > saveenv
   > run ramboot

4. Optional but recommended as the factory firmware cannot be downloaded publicly:
   Back up contents of "firmware" partition using the web interface or ssh:

   $ ssh root@192.168.1.1 cat /dev/mtd11 > huawei_ap6010dn_fw_backup.bin

5. Run sysupgrade using sysupgrade image. OpenWrt
   shall boot from flash afterwards.

Return to factory firmware (using firmware upgrade package downloaded from non-public Huawei website):
1. Start a TFTP server in the directory where
   the firmware upgrade package is located

2. Boot to u-boot as described above

3. Install firmware upgrade package and format the config partitions:

   > update system FatAP6X10XN_SOMEVERSION.bin
   > format_fs

Return to factory firmware (from previously created backup):
1. Copy over the firmware partition backup to /tmp,
   for example using scp

2. Use sysupgrade with force to restore the backup:
   sysupgrade -F huawei_ap6010dn_fw_backup.bin

3. Boot AP to U-Boot as described above

Quirks and known issues:
- The stock firmware has a semi dual boot concept where the primary
kernel uses a squashfs as root partition and the secondary kernel uses
an initramfs. This dual boot concept is circumvented on purpose to gain
more flash space and since the stock firmware's flash layout isn't
compatible with mtdsplit.
- The external watchdog's timeout of 1.6s is very hard to satisfy
during bootup. This is why the GPIO15 pin connected to the watchdog input
is configured directly in the LZMA loader to output the AHB_CLK/2 signal
which keeps the watchdog happy until the wdt-gpio kernel driver takes
over. Because it would also take too long to read the whole kernel image
from flash, the uImage header only includes the loader which then reads
the kernel image from flash after GPIO15 is configured.

Signed-off-by: Marco von Rosenberg <marcovr@selfnet.de>
(cherry picked from commit f84a9f7dc0)
Link: https://github.com/openwrt/openwrt/pull/16978
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-11-23 23:22:27 +01:00
Hauke Mehrtens
cafbecf853 kernel: bump 5.15 to 5.15.173
Removed because they are upstream:
   generic/backport-5.15/430-v6.3-udf-Allocate-name-buffer-in-directory-iterator-on-he.patch
   https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.15.y&id=5ea4b73e268bf9e1d26271943f2f7c4517253395

   generic/backport-5.15/431-v6.3-udf-Avoid-directory-type-conversion-failure-due-to-E.patch
   https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.15.y&id=8b1d55e43cee631e142d46ee94c91ccd894341e9

Link: https://github.com/openwrt/openwrt/pull/16999
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-11-23 23:20:16 +01:00
Hauke Mehrtens
265d9112b3 kernel: bump 5.15 to 5.15.172
No manual changes needed.

Link: https://github.com/openwrt/openwrt/pull/16999
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-11-23 23:20:16 +01:00
Hauke Mehrtens
cd9998ef1b kernel: bump 5.15 to 5.15.171
No manual changes needed.

Link: https://github.com/openwrt/openwrt/pull/16882
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-11-16 00:03:52 +01:00
Mieczyslaw Nalewaj
0edb5d4fc0 mac80211: compatibility with kernel 6.6.59
Fix genlmsg_multicast_allns() build error on kernel 6.6.59.
Based on kernel patch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit?h=v6.6.59&id=e0f83d268974dab0361d11904dfc9acec53f96a6

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/16835
(cherry picked from commit 31f1dabb4b)
Link: https://github.com/openwrt/openwrt/pull/16882
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-11-16 00:03:52 +01:00
Hauke Mehrtens
25f85d4293 kernel: bump 5.15 to 5.15.170
Removed because they are upstream:
   generic/backport-5.15/777-netfilter-xtables-fix-typo-causing-some-targets-to-not-load-on-IPv6.patch
   https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.15.y&id=90baa455aa7e099152898cfa5eb3928d6152da12

Link: https://github.com/openwrt/openwrt/pull/16882
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-11-16 00:03:52 +01:00
Hauke Mehrtens
e3b120f682 kernel: bump 5.15 to 5.15.169
Added patch:
   generic/backport-5.15/430-v6.3-udf-Allocate-name-buffer-in-directory-iterator-on-he.patch
   This patch fixes the following compile warning:
```
  CC [M]  fs/udf/namei.o
fs/udf/namei.c: In function 'udf_rename':
fs/udf/namei.c:878:1: error: the frame size of 1144 bytes is larger than 1024 bytes [-Werror=frame-larger-than=]
  878 | }
      | ^
cc1: all warnings being treated as errors
make[7]: *** [scripts/Makefile.build:289: fs/udf/namei.o] Error 1
```

Link: https://github.com/openwrt/openwrt/pull/16882
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-11-16 00:03:52 +01:00
Hauke Mehrtens
b389c3d66f kernel: bump 5.15 to 5.15.168
Manually adapted:
   bcm27xx/patches-5.15/950-0166-xhci-Use-more-event-ring-segment-table-entries.patch
     I replaced it with the version from main branch which applies more easily
   bcm27xx/patches-5.15/950-0600-xhci-quirks-add-link-TRB-quirk-for-VL805.patch
   bcm27xx/patches-5.15/950-0605-xhci-refactor-out-TRBS_PER_SEGMENT-define-in-runtime.patch
   bcm27xx/patches-5.15/950-0606-usb-xhci-add-VLI_TRB_CACHE_BUG-quirk.patch
   bcm27xx/patches-5.15/950-0717-usb-xhci-add-a-quirk-for-Superspeed-bulk-OUT-transfe.patch
   bcm53xx/patches-5.15/180-usb-xhci-add-support-for-performing-fake-doorbell.patch
   generic/hack-5.15/645-netfilter-connmark-introduce-set-dscpmark.patch

Added patch:
   generic/backport-5.15/777-netfilter-xtables-fix-typo-causing-some-targets-to-not-load-on-IPv6.patch
      This fixes a bug intoduced in this version.

Adapt kernel configuration for newly added option
CONFIG_PROC_MEM_ALWAYS_FORCE.

Link: https://github.com/openwrt/openwrt/pull/16882
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-11-16 00:03:52 +01:00
Álvaro Fernández Rojas
33b45c0a0e kernel: r8125: update to v9.014.01
Changelog: https://github.com/openwrt/rtl8125/compare/9.013.02...9.014.01

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry-picked from commit e29bc67f9d)
2024-11-06 11:43:07 +01:00
Álvaro Fernández Rojas
e70669e690 kernel: r8168: refresh patch
Patches weren't refreshed when r8168 was updated to v8.054.00 in a85e18b53f.

Fixes: a85e18b53f ("kernel: r8168: update to v8.054.00")
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry picked from commit 6490c88c75)
2024-11-05 14:12:10 +01:00
Álvaro Fernández Rojas
182af4caea kernel: r8126: update to v10.014.01
Changelog: https://github.com/openwrt/rtl8126/compare/10.013.00...10.014.01

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry picked from commit 562b2c22ff)
2024-11-05 14:11:40 +01:00
Álvaro Fernández Rojas
28d4b213bc kernel: r8168: update to v8.054.00
Changelog: https://github.com/openwrt/rtl8168/compare/8.053.00...8.054.00

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry picked from commit a85e18b53f)
2024-11-05 14:11:07 +01:00
Robert Marko
1a75174b9b nu801: Mark as nonshared to build in step 1
Mark the package as nonshared to build it in the target specific build
step 1 of the build bots instead of the architecture generic build step 2.

In the build step 2 it may be left out if we build it using a different
target.

Fixes: #16857
Link: https://github.com/openwrt/openwrt/pull/16859
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-11-05 10:59:04 +01:00
Rafal Boni
cb8b632f1a ipq806x: Fix default MAC addresses on MR42 by moving to nvmem-layout
Partial, single-target update extracted from https://github.com/openwrt/openwrt/commit/d264d3a6

The previous `mac-address-increment` is deprecated, and in particular on
this target means that the kernel is unable to read the MAC address,
causing the system to boot with a new random MAC address each time.

Fixes: https://github.com/openwrt/openwrt/issues/13992

Signed-off-by: Rosen Penev <rosenp@gmail.com>
[rafal.boni@gmail.com: single-target-specific backport from larger change]
Signed-off-by: Rafal Boni <rafal.boni@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16858
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-11-04 17:27:52 +01:00
Leon M. Busch-George
0d428857d5 mediatek: YunCore AX835: fix voltage regulator
Specifying GPIO_ACTIVE_HIGH on the GPIO for the voltage regulator doesn't
suffice. The regulator itself requires enable-active-high to be set.

Fixes: #16292
Signed-off-by: Leon M. Busch-George <leon@georgemail.eu>
Link: https://github.com/openwrt/openwrt/pull/16839
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-11-04 10:36:50 +01:00
Lech Perczak
4f0e281775 ath79: Really fix 5GHz on QCA9886 variant of ZTE MF286
Fix in commit 25eead21c5 ("ath79: fix 5GHz on QCA9886 variant of ZTE MF286")
was incomplete. A user of such variant popped up, and in the boot log
after installation, we discovered that QCA9886 expects different
pre-calibration data size, than the older QCA9880 variant:

ath10k_pci 0000:00:00.0: qca9888 hw2.0 target 0x01000000 chip_id 0x00000000 sub 0000:0000
ath10k_pci 0000:00:00.0: kconfig debug 0 debugfs 1 tracing 0 dfs 1 testmode 0
ath10k_pci 0000:00:00.0: firmware ver 10.4b-ct-9888-fW-13-5ae337bb1 api 5 features mfp,peer-flow-ctrl,txstatus-noack,wmi-10.x-CT,ratemask-CT,regdump-CT,txrate-CT,flush-all-CT,pingpong-CT,ch-regs-CT,nop-CT,set-special-CT,tx-rc-CT,cust-stats-CT,txrate2-CT,beacon-cb-CT,wmi-block-ack-CT,wmi-bcn-rc-CT crc32 59e741e7
ath10k_pci 0000:00:00.0: invalid calibration data length in nvmem-cell 'pre-calibration': 2116 != 12064
ath10k_pci 0000:00:00.0: Loading BDF type 0
ath10k_pci 0000:00:00.0: failed to fetch board data for bus=pci,vendor=168c,device=0056,subsystem-vendor=0000,subsystem-device=0000 from ath10k/QCA9888/hw2.0/board-2.bin
ath10k_pci 0000:00:00.0: failed to fetch board-2.bin or board.bin from ath10k/QCA9888/hw2.0
ath10k_pci 0000:00:00.0: failed to fetch board file: -12
ath10k_pci 0000:00:00.0: could not probe fw (-12)

Explicitly define a pre-calibration nvmem-cell for this variant, and use
it instead of the calibration one, which is shorter.

Fixes: 25eead21c5 ("ath79: fix 5GHz on QCA9886 variant of ZTE MF286")
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
(cherry picked from commit fc236f3b3c)
Link: https://github.com/openwrt/openwrt/pull/16810
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-10-31 19:02:30 +01:00
Rafal Boni
607091d4fe ipq806x: Fix default MAC addresses on MR52 by moving to nvmem-layout
Partial, single-target update extracted from https://github.com/openwrt/openwrt/commit/d264d3a6

The previous `mac-address-increment` is deprecated, and in particular on
this target means that the kernel is unable to read the MAC address,
causing the system to boot with a new random MAC address each time.

Fixes: https://github.com/openwrt/openwrt/issues/15238

Signed-off-by: Rosen Penev <rosenp@gmail.com>
[rafal.boni@gmail.com: single-target-specific backport from larger change]
Signed-off-by: Rafal Boni <rafal.boni@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16774
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-10-31 10:59:34 +01:00
Rafal Boni
92c2a4cf93 ipq806x: Revert "ipq806x: swap lan leds for Meraki MR52"
This reverts commit ec8f647d16, as with the
current kernel version, the change actually causes the same bug it once
may have fixed -- that is, the leds are now again reversed.

I suspect this was due to a switch to a newer kernel version between when
the patch was submitted and now reversing the order of the interfaces, so
that eth0 / the LAN interface is also the interface used for PoE, and eth1
/ the WAN interface is the non-PoE interface.

Signed-off-by: Rafal Boni <rafal.boni@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16779
(cherry picked from commit b5e1544f4d)
Signed-off-by: Rafal Boni <rafal.boni@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16822
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-10-31 10:49:16 +01:00
Rosen Penev
9bc6a18ede ramips: m4r v4: fix typo
It should be debounce-interval, as with the others.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16802
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-10-31 10:45:52 +01:00
Roger Pueyo Centelles
c46b689149 ath79: add support for MikroTik RouterBOARD 750 r2 (hEX lite)
This patch adds support for the MikroTik RouterBOARD 750 r2, marketed as
hEX lite, a small indoor router with 5x 10/100 Mbps Ethernet ports, one
with PoE in. The device was already supported by the ar71xx target.

Specifications:
 - SoC: Qualcomm Atheros QCA9533
 - Flash: 16 MB SPI NOR
 - RAM: 64 MB
 - Ethernet: 4x 10/100 Mbps LAN, 1x 10/100 Mbps WAN (PoE in)
 - LEDs: 5x Ethernet port activity (green), 1x user (green)
 - Buttons: 1x reset

 See https://mikrotik.com/product/RB750r2 for more details.

Not working:
 - Serial port (already not working in ar71xx)

Flashing:
 TFTP boot initramfs image and then perform sysupgrade. Only the
 "Internet" port will ask for an initramfs image. Follow common
 MikroTik procedure as in https://openwrt.org/toh/mikrotik/common.

(cherry picked from commit 8486c677b8)
Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
Link: https://github.com/openwrt/openwrt/pull/13477
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-10-29 21:36:11 +01:00
Rodrigo B. de Sousa Martins
088bb1e12e iptables: backport "nft: track each register individually" from 1.9
From the upstream repo:

Instead of assuming only one register is used, track all 16 regs
individually.

This avoids need for the 'PREV_PAYLOAD' hack and also avoids the need to
clear out old flags:

When we see that register 'x' will be written to, that register state is
reset automatically.

Existing dissector decodes
ip saddr 1.2.3.4 meta l4proto tcp
... as
-s 6.0.0.0 -p tcp

iptables-nft -s 1.2.3.4 -p tcp is decoded correctly because the expressions
are ordered like:

meta l4proto tcp ip saddr 1.2.3.4
                                                                                                                                                                                                                   |
... and 'meta l4proto' did clear the PAYLOAD flag.

The simpler fix is:
		ctx->flags &= ~NFT_XT_CTX_PAYLOAD;

in nft_parse_cmp(), but that breaks dissection of '1-42', because
the second compare ('cmp lte 42') will not find the
payload expression anymore.

This commit fixes #11169 and openwrt/packages#22727, and potentially anyone that uses iptables-nft legacy support.

Signed-off-by: Rodrigo B. de Sousa Martins <rodrigo.sousa.577@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16504
[Added patch header]
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 44b1993f76)
2024-10-24 00:51:01 +02:00
Robert Marko
e0e022e612 generic: 5.15: add Winbond W25N01KV support
It seems that some Xiaomi AX3000T boards changed to using Winbond W25N01KV
SPI-NAND which is not supported in OpenWrt 23.05 but only in main.

So, backport the support for Winbond W25N01KV from Linux 6.12 to 23.05
as well.

Link: https://github.com/openwrt/openwrt/pull/16669
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-10-20 18:29:15 +02:00
Itay Shoshani
676e2f7192 wireless-regdb: Update to version 2024.10.07
b66b9a1 wireless-regdb: update regulatory database based on preceding changes
5097b4a wireless-regdb: Update regulatory info for Tanzania (TZ) for 2024
29633a6 wireless-regdb: Update regulatory info for Pakistan (PK) for 2024
b44edb2 wireless-regdb: Update regulatory info for Serbia (RS) for 2024
dbfae47 Revert "wireless-regdb: Update regulatory info for Serbia (SR) for 2024"
8e3d27c wireless-regdb: Correct regulatory rules of 6GHz frequency for Türkiye (TR)
8760bc3 wireless-regdb: Update regulatory info for Honduras (HN) for 2023
3ba2c53 wireless-regdb: Update regulatory info for Israel (IL) for 2021
83c175c wireless-regdb: Update regulatory info for Kuwait (KW) for 2022
388c80c wireless-regdb: Update regulatory info for Serbia (SR) for 2024
bf55ed4 wireless-regdb: Add .b4-config
3afe172 wireless-regdb: Update .gitignore
3b34761 wireless-regdb: Correct regulatory rules for China (CN)
003c282 wireless-regdb: Update regulatory info for Philippines (PH) on 6GHz
21fcb86 wireless-regdb: Update regulatory info for Guatemala (GT) for 2020
158f105 wireless-regdb: Update regulatory info for Bahrain (BH) for 2024
218d146 wireless-regdb: Add regulatory info for Namibia (NA) for 2023
aad0c26 wireless-regdb: Update regulatory info for Togo (TG) for 2022
983f551 wireless-regdb: Update regulatory info for El Salvador (SV) on 6GHz
58575b4 wireless-regdb: Update regulatory info for Peru (PE) on 6GHz
bad3985 wireless-regdb: Update regulatory info for New Zealand (NZ) for 2022
c7d1083 wireless-regdb: Update regulatory info for Qatar (QA) on 6GHz

Signed-off-by: Itay Shoshani <itai.sho@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16678
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit a6de2d7784)
2024-10-19 17:42:47 +02:00
Rosen Penev
0f30b8d2d2 mpc85xx: p1010: fix NAND devices
Upstream commit 9ba0cae3cac07c21c583f9ff194f74043f90d29c made FSL_IFC
visible and selectable, which means that in order for MTD_NAND_FSL_IFC
to work, it needs these two extra CONFIG options.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16717
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-10-17 11:00:40 +02:00
Shiji Yang
1efcdb2446 ramips: use OKLI loader for TP-Link RE200 v1 and RE210 v1
Using OKLI image to fix the booting stuck issue.

Tested with u-boot extracted from TP-Link stock images
"RE200(EU)_V1_171206.zip" and "RE210(US_CA)_V1_171205.zip".

Fixes: https://github.com/openwrt/openwrt/issues/16296
Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/16473
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit b62e6f5beb)
2024-10-08 22:20:23 +02:00
Shiji Yang
fb44dd7314 ramips: introduce TP-Link v1 header OKLI image recipe
It can be used to workaround the booting stuck issue caused by the
u-boot LZMA decompression error.

The new kernel image structure:
+------+------------------+------------------+---------------+-----------------+
| name | tplink-v1 header | OKLI lzma-loader | uImage header | lzma kernel+dtb |
+------+------------------+------------------+---------------+-----------------+
| size |      0x200       |       0xe00      |     0x40      |     dynamic     |
+------+------------------+------------------+---------------+-----------------+

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/16473
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 08eecec355)
2024-10-08 22:20:20 +02:00
Mikhail Zhilkin
1ec1aa9cc7 ramips: add support for netis N6
This commit adds support for netis N6 WiFi 6 router.

Specification
-------------
- SoC       : MediaTek MT7621AT, MIPS, 880 MHz
- RAM       : 256 MiB
- Flash     : NAND 128 MiB (ESMT PSU1GA30DT)
- WLAN      : MT7905DAN + MT7975DN
  - 2.4 GHz : b/g/n/ax, 574 Mbps, MIMO 2x2
  - 5 GHz   : a/n/ac/ax, 1201 Mbps, MIMO 2x2
- Ethernet  : 10/100/1000 Mbps x5 (1x WAN, 4x LAN)
- USB       : 1x 3.0
- UART      : 3.3V, 115200n8
- Buttons   : 1x Reset
              1x WPS
- LEDs      : 1x Power (green)
              1x System (green)
              1x WAN (green)
              1x WiFi 2.4 GHz (green), controlled by phy
              1x WiFi 5 GHz (green), controlled by phy
              1x WPS (green)
              1x USB (green)
              5x ethernet leds (green), controlled by switch
- Power     : 12 VDC, 1.5 A

Installation
------------
1. Update the router using stock firmware web interface and OpenWrt
   factory.bin image.

Recovery and return to stock
----------------------------
1. Assign your PC a static IP 192.168.1.2 and connect to the router using
   the ethernet cable;
2. Power off the router;
3. Press Reset button, power on the router and wait until ethernet led
   start blinking;
4. Release the button;
5. Open http://192.168.1.1/ (N6 System Recovery Mode) in your browser;
6. Upload OpenWrt factory.bin (or stock firmware *.bin) image and proceed
   with upgrade.

MAC addresses
-------------
+---------+-------------------+
|         | MAC example       |
+---------+-------------------+
| LAN     | dc:xx:xx:49:xx:04 |
| WAN     | dc:xx:xx:49:xx:05 |
| WLAN 2g | dc:xx:xx:19:xx:06 |
| WLAN 5g | dc:xx:xx:79:xx:06 |
+---------+-------------------+
The WLAN MAC prototype was found in 'Factory', 0x4
The LAN MAC was found in 'Factory', 0x7ef20
The WAN MAC was found in 'Factory', 0x7ef26

Known issue
-----------
2.4 GHz WLAN doesn't start with mt76 driver.

Probable reason:
   Original Netis N6 EEPROM contains wrong MT_EE_WIFI_CONF value (0xd2).
   Other routers with the same WLAN hardware (e.g., Routerich AX1800)
   have MT_EE_WIFI_CONF = 0x92.

Workaround (already included in this commit):
   Extract EEPROM to a file at the first time boot and change
   MT_EE_WIFI_CONF (offset 0x190) value from 0xd2 to 0x92. See
   /etc/hotplug.d/firmware/11-mt76-caldata for details.

Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16322
(cherry picked from commit f368e2d5ec)
[ Fix merging onflicts in mt7621.mk, 10_fix_wifi_mac, platform.sh ]
[ Change &ethphy4 -> &mdio in dts file ]
Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16436
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-10-08 22:16:44 +02:00
Lech Perczak
4d89918a98 ipq40xx: fix MAC address on Meraki MR33 and MR74 after nvmem-layout
...conversion.
Commit 20736013e9 ("kernel: backport nvmem v6.6 fixes and v6.7 changes")
has caused dthe device to no longer correctly read MAC address from its
onboard 24c64 EEPROM, because "at24" driver doesn't support legacy
nvmem-cell bindings [1] - and there was an explicit config option added
to mandate that behaviour in the following patch:

820-v6.7-0002-nvmem-add-explicit-config-option-to-read-old-syntax-.patch

But some of the devices, MR33 and MR74 included, weren't converted with
that as well.
Convert the definition to use proper fixed-layout binding to fix it.

The offending change was introduced between v23.05.0 and v23.05.1, and
found by bisection:
git bisect start
# status: waiting for both good and bad commits
# good: [bd4f415efa] OpenWrt v23.05.0: adjust config defaults
git bisect good bd4f415efa
# status: waiting for bad commit, 1 good commit known
# bad: [a58a86693f] OpenWrt v23.05.1: adjust config defaults
git bisect bad a58a86693f
# good: [3d0a78add2] qualcommax: only build initramfs if CONFIG_TARGET_ROOTFS_INITRAMFS is set
git bisect good 3d0a78add2
# bad: [21e5db97c4] build: add CycloneDX SBOM JSON support
git bisect bad 21e5db97c4
# good: [89184b15cf] mediatek: add build for MT7981 RFB
git bisect good 89184b15cf
# bad: [41f27bbb6d] bcm53xx: add the latest fix version of brcm_nvram
git bisect bad 41f27bbb6d
# good: [b649b0bf71] kernel: nvmem: fix "fixed-layout" & support "mac-base"
git bisect good b649b0bf71
# bad: [20736013e9] kernel: backport nvmem v6.6 fixes and v6.7 changes
git bisect bad 20736013e9
# good: [066971615f] kernel: backport v6.6 nvmem changes
git bisect good 066971615f
# first bad commit: [20736013e9] kernel: backport nvmem v6.6 fixes and v6.7 changes

Link: [1] https://github.com/openwrt/openwrt/issues/15393#issuecomment-2212300849
Fixes: 20736013e9 ("kernel: backport nvmem v6.6 fixes and v6.7 changes")
Fixes: https://github.com/openwrt/openwrt/issues/15393
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
(cherry picked from commit ccbffad1ad0ce444bc2497098a1d3d3a086a5f44)
[replace mac-address-increment with #nvmem-cell-cells]
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16624
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-10-07 10:36:12 +02:00
Jakob Haufe
fa0a7e00e8 octeon: ubnt-edgerouter: fix sysupgrade config backup/restore
er is missing from platform_copy_config() and octeon_move_config(), so
config is lost on every sysupgrade.

(cherry-picked from commit 77037b09f3)
Signed-off-by: Jakob Haufe <sur5r@sur5r.net>
Link: https://github.com/openwrt/openwrt/pull/16518
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-09-28 18:33:21 +02:00
Robert Marko
87477c756e tools: bzip2: use static lib and tools
Currently, bzip2 is built with a dynamically linked library on which all
of the bzip2 tools depend on.

However, when trying to use the staging dir bzip2 during building on
Fedora 40 the following error appers:
staging_dir/host/bin/bzip2: error while loading shared libraries: libbz2.so.1.0: cannot open shared object file: No such file or directory

Looking into it, the binary is dynamically linked:
$ ldd staging_dir/host/bin/bzip2
linux-vdso.so.1 (0x00007f5ebd9ff000)
libbz2.so.1.0 => not found
libc.so.6 => /lib64/libc.so.6 (0x00007f5ebd7f5000)
/lib64/ld-linux-x86-64.so.2 (0x00007f5ebda01000)

libbz2.so.1.0 is installed into staging_dir/lib but that directory is not
evaluated for the required libraries and Fedora only ships:
/usr/lib64/libbz2.so.1
/usr/lib64/libbz2.so.1.0.8

Thus it cannot find the libbz2 that bzip2 is linked against and thus
trying to use bzip2 will fail and stop compilation as it is used for
bzip2 compressed tarballs.

So, to avoid OpenWrt compiled bzip2 to even attempt to load a required
library from the host we can just static compile libbz2 and bzip2.

Link: https://github.com/openwrt/openwrt/pull/16520
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-09-28 12:05:48 +02:00
David Bauer
5332351821 ipq40xx: fix AP-303H PSE GPIO pin
The GPIO chip is at a different start index compared to OpenWrt master.

Signed-off-by: David Bauer <mail@david-bauer.net>
2024-09-27 19:10:40 +02:00
Chukun Pan
6e561fe0a1 kernel: r8126: add CONFLICT to rss variant
The rss variant should conflict with the default.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
Link: https://github.com/openwrt/openwrt/pull/16460
(cherry picked from b83c7448d3)
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2024-09-24 09:15:48 +02:00
Chukun Pan
1d9f6d389e kernel: r8125: add CONFLICT to rss variant
The rss variant should conflict with the default.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
Link: https://github.com/openwrt/openwrt/pull/16460
(cherry picked from d39078c785)
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2024-09-24 09:15:06 +02:00
Hauke Mehrtens
dced292d68 OpenWrt v23.05.5: revert to branch defaults
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-09-24 00:53:40 +02:00
151 changed files with 3337 additions and 517 deletions

587
build_openwrt.sh Normal file
View File

@@ -0,0 +1,587 @@
#!/usr/bin/env bash
#====================================================
# OpenWrt 构建管理脚本
# 功能:提供交互式菜单,可选择执行特定操作
# 更新2024-02-26
#====================================================
#---------------基础配置---------------#
# 日志目录设置
LOGS_ROOT="openwrt_logs"
SESSION_DIR="${LOGS_ROOT}/$(date +%Y%m%d_%H%M%S)"
LOG_FILE="${SESSION_DIR}/build.log"
#---------------清理配置---------------#
# 需要移除的目录列表
declare -a REMOVE_DIRS=(
)
# 需要移除的包列表
declare -a REMOVE_PACKAGES=(
"feeds/luci/applications/luci-app-mosdns"
"feeds/packages/net/alist"
"feeds/packages/net/adguardhome"
"feeds/packages/net/smartdns"
)
#---------------自定义包配置---------------#
# 定义自定义包配置,格式:[包名]=[目标目录]=[仓库URL]=[分支]=[是否使用--depth 1]
declare -A CUSTOM_PACKAGES=(
["partexp"]="package/luci-app-partexp=https://github.com/sirpdboy/luci-app-partexp=main=false"
["openclash"]="package/openclash=https://github.com/vernesong/OpenClash=dev=true"
["zerotier"]="package/luci-app-zerotier=https://nanako.site/gitea/Nanako/luci-app-zerotier.git=main=false"
["5gsupport"]="package/openwrt-app-actions=https://github.com/Siriling/openwrt-app-actions.git=main=true"
["design"]="package/luci-theme-design=https://github.com/SAENE/luci-theme-design.git=js=false"
["mt76"]="package/firmware/mt76=https://github.com/openwrt/mt76.git=master=false"
)
#---------------日志系统---------------#
# 保存原始的标准输出和错误输出
exec {STDOUT_ORIG}>&1
exec {STDERR_ORIG}>&2
# 初始化日志系统
init_logger() {
# 创建日志目录结构
mkdir -p "$SESSION_DIR" || {
echo "无法创建日志目录: $SESSION_DIR"
exit 1
}
# 设置全局变量标记是否记录日志
LOGGING_ENABLED=true
echo "日志保存在: $LOG_FILE"
if [ "$LOGGING_ENABLED" = true ]; then
# 标准输出重定向
exec > >(while read -r line; do
printf "[%(%Y-%m-%d %H:%M:%S)T] %s\n" -1 "$line" | tee -a "$LOG_FILE"
done)
# 标准错误重定向
exec 2> >(while read -r line; do
printf "[%(%Y-%m-%d %H:%M:%S)T] %s\n" -1 "$line" | tee -a "$LOG_FILE"
done >&2)
fi
}
# 创建新的编译日志文件
create_build_log() {
local build_type=$1
local timestamp=$(date +%Y%m%d_%H%M%S)
BUILD_LOG_FILE="${SESSION_DIR}/${build_type}_${timestamp}.log"
echo "创建新的编译日志: $BUILD_LOG_FILE"
return 0
}
# 重定向输出到指定的编译日志文件
redirect_to_build_log() {
local log_file=$1
# 保存当前的输出重定向状态
LOGGING_TO_BUILD_LOG=true
# 重定向输出到编译日志文件
exec > >(while read -r line; do
printf "[%(%Y-%m-%d %H:%M:%S)T] %s\n" -1 "$line" >> "$log_file"
done)
# 重定向错误输出到编译日志文件
exec 2> >(while read -r line; do
printf "[%(%Y-%m-%d %H:%M:%S)T] %s\n" -1 "$line" >> "$log_file"
done >&2)
}
# 恢复输出到主日志
restore_main_logging() {
LOGGING_TO_BUILD_LOG=false
# 恢复到主日志
if [ "$LOGGING_ENABLED" = true ]; then
# 标准输出重定向
exec > >(while read -r line; do
printf "[%(%Y-%m-%d %H:%M:%S)T] %s\n" -1 "$line" | tee -a "$LOG_FILE"
done)
# 标准错误重定向
exec 2> >(while read -r line; do
printf "[%(%Y-%m-%d %H:%M:%S)T] %s\n" -1 "$line" | tee -a "$LOG_FILE"
done >&2)
fi
}
# 禁用日志输出
disable_logging() {
LOGGING_ENABLED=false
exec >&$STDOUT_ORIG
exec 2>&$STDERR_ORIG
}
# 启用日志输出
enable_logging() {
LOGGING_ENABLED=true
# 标准输出重定向
exec > >(while read -r line; do
printf "[%(%Y-%m-%d %H:%M:%S)T] %s\n" -1 "$line" | tee -a "$LOG_FILE"
done)
# 标准错误重定向
exec 2> >(while read -r line; do
printf "[%(%Y-%m-%d %H:%M:%S)T] %s\n" -1 "$line" | tee -a "$LOG_FILE"
done >&2)
}
# 设置终端颜色
setup_colors() {
if [[ -t 2 ]]; then
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
BLUE='\033[0;34m'
NC='\033[0m'
else
RED='' GREEN='' YELLOW='' BLUE='' NC=''
fi
}
# 记录日志函数 - 使用此函数来明确日志级别
log() {
local level=$1
local message=$2
local timestamp=$(date "+%Y-%m-%d %H:%M:%S")
local color="" level_str=""
case $level in
"INFO") color="$GREEN"; level_str="INFO" ;;
"WARN") color="$YELLOW"; level_str="WARN" ;;
"ERROR") color="$RED"; level_str="ERROR" ;;
"DEBUG") color="$BLUE"; level_str="DEBUG" ;;
esac
printf "[%s] ${color}[%s]${NC}: %s\n" "$timestamp" "$level_str" "$message"
}
# 同时记录到主日志和编译日志的函数
log_to_both() {
local level=$1
local message=$2
local build_log=$3
# 记录到主日志
log "$level" "$message"
# 记录到编译日志
local timestamp=$(date "+%Y-%m-%d %H:%M:%S")
echo "[$timestamp] [$level]: $message" >> "$build_log"
}
#---------------自定义包管理函数---------------#
# 更新单个自定义包
update_single_package() {
local pkg_name=$1
local config=$2
# 解析配置
local target_dir=$(echo "$config" | cut -d= -f1)
local repo_url=$(echo "$config" | cut -d= -f2)
local branch=$(echo "$config" | cut -d= -f3)
local use_depth=$(echo "$config" | cut -d= -f4)
log "INFO" "更新 $pkg_name..."
# 检查目标目录
if [ -d "$target_dir" ]; then
log "INFO" "移除现有 $target_dir 目录"
rm -rf "$target_dir" || {
log "ERROR" "无法删除 $target_dir 目录"
return 1
}
fi
# 准备克隆命令
local clone_cmd="git clone --progress"
# 添加分支参数 (如果指定)
if [ -n "$branch" ] && [ "$branch" != "master" ]; then
clone_cmd="$clone_cmd -b $branch"
fi
# 添加 depth 参数 (如果需要)
if [ "$use_depth" = "true" ]; then
clone_cmd="$clone_cmd --depth 1"
fi
# 完成克隆命令
clone_cmd="$clone_cmd $repo_url $target_dir"
# 执行克隆
log "INFO" "执行: $clone_cmd"
eval "$clone_cmd" || {
log "ERROR" "克隆 $pkg_name 失败"
return 1
}
log "INFO" "$pkg_name 更新完成"
return 0
}
# 更新自定义包的主函数
update_custom_package() {
local failed_packages=()
local success_count=0
local total_packages=${#CUSTOM_PACKAGES[@]}
log "INFO" "开始更新 $total_packages 个自定义包..."
for pkg_name in "${!CUSTOM_PACKAGES[@]}"; do
update_single_package "$pkg_name" "${CUSTOM_PACKAGES[$pkg_name]}" || {
failed_packages+=("$pkg_name")
continue
}
((success_count++))
done
# 显示更新结果
if [ ${#failed_packages[@]} -eq 0 ]; then
log "INFO" "所有自定义包更新成功 ($success_count/$total_packages)"
return 0
else
log "WARN" "部分包更新失败 (成功: $success_count/$total_packages)"
log "ERROR" "更新失败的包: ${failed_packages[*]}"
return 1
fi
}
# 更新特定自定义包
update_specific_package() {
local pkg_name=$1
if [ -z "$pkg_name" ]; then
log "ERROR" "未指定包名"
return 1
fi
if [ -z "${CUSTOM_PACKAGES[$pkg_name]}" ]; then
log "ERROR" "未找到包配置:$pkg_name"
log "INFO" "可用的包: ${!CUSTOM_PACKAGES[*]}"
return 1
fi
update_single_package "$pkg_name" "${CUSTOM_PACKAGES[$pkg_name]}"
}
#---------------基础功能函数---------------#
# 清理工作区
clean_workspace() {
log "INFO" "开始清理工作区..."
log "INFO" "执行./scripts/feeds clean..."
./scripts/feeds clean || log "WARN" "feeds clean 失败"
log "INFO" "执行rm -rf ./tmp ./staging_dir ./build_dir ./bin ./dl..."
rm -rf ./tmp ./staging_dir ./build_dir ./bin ./dl || log "WARN" "删除临时目录失败"
log "INFO" "工作区清理完成"
}
# 清理编译临时文件
clean_build_temp() {
log "INFO" "开始清理编译临时文件..."
log "INFO" "删除临时编译目录和缓存..."
rm -rf ./tmp ./staging_dir ./build_dir || log "WARN" "删除临时编译目录失败"
log "INFO" "编译临时文件清理完成"
}
# 更新源码
update_source() {
log "INFO" "开始更新源码..."
git pull || { log "ERROR" "源码更新失败"; return 1; }
log "INFO" "源码更新完成"
}
# 更新feeds
update_feeds() {
log "INFO" "开始更新feeds..."
./scripts/feeds update -a && ./scripts/feeds install -a || {
log "ERROR" "Feeds更新失败"
return 1
}
log "INFO" "Feeds更新完成"
return 0
}
# 执行编译命令并仅记录到指定日志文件
run_build_command() {
local cmd=$1
local log_file=$2
local msg=$3
log_to_both "INFO" "$msg" "$log_file"
# 重定向输出到编译日志
redirect_to_build_log "$log_file"
# 执行编译命令
local result=0
eval "$cmd" || result=1
# 恢复输出到主日志
restore_main_logging
return $result
}
# 编译固件
build_firmware() {
# 创建新的编译日志
create_build_log "firmware"
local current_log="$BUILD_LOG_FILE"
log "INFO" "开始编译固件..."
log "INFO" "编译详细日志位置: $current_log"
# 下载依赖
log "INFO" "下载依赖包..."
run_build_command "make download -j$(nproc) V=s" "$current_log" "正在下载依赖包..." || {
log "ERROR" "依赖下载失败,详见日志: $current_log"
return 1
}
# 使用多线程编译
local cpu_cores=$(nproc)
log "INFO" "使用 $cpu_cores 线程开始编译..."
if run_build_command "make -j$cpu_cores V=s" "$current_log" "多线程编译进行中..."; then
log "INFO" "多线程编译成功完成"
return 0
else
log "WARN" "多线程编译失败,清理临时文件后切换为单线程编译..."
# 清理编译临时文件
clean_build_temp
# 创建一个新日志用于单线程编译
create_build_log "firmware_singlethread"
current_log="$BUILD_LOG_FILE"
log "INFO" "单线程编译详细日志位置: $current_log"
# 重新下载依赖
log "INFO" "重新下载依赖包..."
run_build_command "make download -j1 V=s" "$current_log" "单线程模式重新下载依赖..." || {
log "ERROR" "单线程依赖下载也失败,详见日志: $current_log"
return 1
}
if run_build_command "make -j1 V=s" "$current_log" "单线程编译进行中..."; then
log "INFO" "单线程编译成功完成"
return 0
else
log "ERROR" "编译失败,即使在单线程模式下。详见日志: $current_log"
return 1
fi
fi
}
# 清理旧包
clean_packages() {
log "INFO" "开始清理旧包..."
local removed_count=0
local failed_count=0
# 清理目录
for dir in "${REMOVE_DIRS[@]}"; do
if [ -d "$dir" ]; then
rm -rf "$dir" && {
log "INFO" "已删除: $dir"
((removed_count++))
} || {
log "ERROR" "删除失败: $dir"
((failed_count++))
}
fi
done
# 清理包
for pkg in "${REMOVE_PACKAGES[@]}"; do
if [ -d "$pkg" ]; then
rm -rf "$pkg" && {
log "INFO" "已移除: $pkg"
((removed_count++))
} || {
log "ERROR" "删除失败: $pkg"
((failed_count++))
}
fi
done
if [ $failed_count -eq 0 ]; then
log "INFO" "包清理完成,共移除 $removed_count 个包/目录"
return 0
else
log "WARN" "包清理部分完成,成功: $removed_count, 失败: $failed_count"
return 1
fi
}
# 更新所有组件
update_all_components() {
log "INFO" "开始更新所有组件..."
local failed=false
# 更新源码
log "INFO" "执行源码更新..."
update_source || failed=true
# 清理旧包
log "INFO" "执行清理旧包..."
clean_packages || log "WARN" "清理旧包部分失败,继续执行..."
# 更新自定义包
log "INFO" "执行自定义包更新..."
update_custom_package || failed=true
# 更新feeds
log "INFO" "执行feeds更新..."
update_feeds || failed=true
if [ "$failed" = true ]; then
log "WARN" "部分组件更新失败,请查看日志了解详情"
return 1
else
log "INFO" "所有组件更新完成"
return 0
fi
}
# 菜单配置
menuconfig() {
log "INFO" "开始菜单配置..."
disable_logging
make menuconfig
enable_logging
log "INFO" "菜单配置完成"
}
#---------------组合功能函数---------------#
# 完整构建流程
full_build() {
log "INFO" "启动完整构建流程..."
clean_workspace || log "WARN" "工作区清理部分失败,继续执行..."
update_source || { log "ERROR" "源码更新失败,终止构建"; return 1; }
clean_packages || log "WARN" "清理旧包部分失败,继续执行..."
update_custom_package || { log "ERROR" "自定义包更新失败,终止构建"; return 1; }
update_feeds || { log "ERROR" "feeds更新失败终止构建"; return 1; }
log "INFO" "进入菜单配置..."
menuconfig
log "INFO" "开始编译固件..."
build_firmware || {
log "ERROR" "固件编译失败"
return 1
}
log "INFO" "完整构建流程完成"
return 0
}
#---------------菜单函数---------------#
print_menu() {
echo -e "\n${BLUE}OpenWrt 构建管理菜单${NC}"
echo -e "${YELLOW}================================${NC}"
echo -e "${GREEN}1.${NC} 完整构建流程"
echo -e "${GREEN}2.${NC} 清理工作区"
echo -e "${GREEN}3.${NC} 更新所有组件"
echo -e "${GREEN}4.${NC} 清理旧包"
echo -e "${GREEN}5.${NC} 编译固件"
echo -e "${GREEN}6.${NC} 调整配置(menuconfig)"
echo -e "${GREEN}7.${NC} 更新自定义包"
echo -e "${GREEN}8.${NC} 更新特定自定义包"
echo -e "${GREEN}9.${NC} 更新源码"
echo -e "${GREEN}10.${NC} 更新feeds"
echo -e "${GREEN}0.${NC} 退出"
echo -e "${YELLOW}================================${NC}"
echo -ne "请选择操作 [0-10]: "
}
# 显示可用的自定义包
print_package_menu() {
echo -e "\n${BLUE}可用的自定义包${NC}"
echo -e "${YELLOW}================================${NC}"
local i=1
for pkg_name in "${!CUSTOM_PACKAGES[@]}"; do
echo -e "${GREEN}$i.${NC} $pkg_name"
((i++))
done
echo -e "${YELLOW}================================${NC}"
echo -ne "请选择要更新的包 [1-$((i-1))]: "
}
# 选择特定自定义包更新
select_specific_package() {
local pkg_names=("${!CUSTOM_PACKAGES[@]}")
print_package_menu
read -r choice
# 验证选择
if [[ ! "$choice" =~ ^[0-9]+$ ]] || [ "$choice" -lt 1 ] || [ "$choice" -gt ${#pkg_names[@]} ]; then
log "ERROR" "无效选择: $choice"
return 1
fi
local selected_pkg=${pkg_names[$((choice-1))]}
log "INFO" "选择更新包: $selected_pkg"
update_specific_package "$selected_pkg"
}
#---------------主函数---------------#
main() {
# 初始化日志目录和日志系统
init_logger
setup_colors
log "INFO" "OpenWrt 构建管理脚本启动 - 会话日志目录: $SESSION_DIR"
while true; do
print_menu
read -r choice
case $choice in
1) full_build ;;
2) clean_workspace ;;
3) update_all_components ;;
4) clean_packages ;;
5) build_firmware ;;
6) menuconfig ;;
7) update_custom_package ;;
8) select_specific_package ;;
9) update_source ;;
10) update_feeds ;;
0)
log "INFO" "退出脚本"
exit 0
;;
*)
log "WARN" "无效选择: $choice,请重试"
;;
esac
# 操作完成后暂停
if [[ $choice != 0 ]]; then
echo -e "\n${YELLOW}操作完成,按回车键继续...${NC}"
read -r
fi
done
}
# 执行主函数
main "$@"

View File

@@ -1,4 +1,4 @@
src-git packages https://git.openwrt.org/feed/packages.git^b5ed85f6e94aa08de1433272dc007550f4a28201
src-git luci https://git.openwrt.org/project/luci.git^63ba3cba5b7bfb803a875d4d8f01248634687fd5
src-git routing https://git.openwrt.org/feed/routing.git^e351d1e623e9ef2ab78f28cb1ce8d271d28c902d
src-git telephony https://git.openwrt.org/feed/telephony.git^98c8a5aa4624312ed758e2e2b6d4039050a1649d
src-git packages https://git.openwrt.org/feed/packages.git;openwrt-23.05
src-git luci https://git.openwrt.org/project/luci.git;openwrt-23.05
src-git routing https://git.openwrt.org/feed/routing.git;openwrt-23.05
src-git telephony https://git.openwrt.org/feed/telephony.git;openwrt-23.05

View File

@@ -33,7 +33,7 @@ define FeedSourcesAppend
echo 'src/gz %d_core %U/targets/%S/packages'; \
$(strip $(if $(CONFIG_PER_FEED_REPO), \
echo 'src/gz %d_base %U/packages/%A/base'; \
$(if $(filter %SNAPSHOT-y,$(VERSION_NUMBER)-$(CONFIG_BUILDBOT)), \
$(if $(CONFIG_BUILDBOT), \
echo 'src/gz %d_kmods %U/targets/%S/kmods/$(LINUX_VERSION)-$(LINUX_RELEASE)-$(LINUX_VERMAGIC)';) \
$(foreach feed,$(FEEDS_AVAILABLE), \
$(if $(CONFIG_FEED_$(feed)), \

View File

@@ -1,2 +1,2 @@
LINUX_VERSION-5.15 = .167
LINUX_KERNEL_HASH-5.15.167 = b1751f18ece3df08d502dd87a9ab1a317dc0f9486355bf8ee62ba6af0b35da30
LINUX_VERSION-5.15 = .173
LINUX_KERNEL_HASH-5.15.173 = 8a4b2a47ccc9b208b2b6ed9a216ea1a5eb12852c723bec1a04de9e671a1d7da8

View File

@@ -23,13 +23,13 @@ PKG_CONFIG_DEPENDS += \
sanitize = $(call tolower,$(subst _,-,$(subst $(space),-,$(1))))
VERSION_NUMBER:=$(call qstrip,$(CONFIG_VERSION_NUMBER))
VERSION_NUMBER:=$(if $(VERSION_NUMBER),$(VERSION_NUMBER),23.05.5)
VERSION_NUMBER:=$(if $(VERSION_NUMBER),$(VERSION_NUMBER),23.05-SNAPSHOT)
VERSION_CODE:=$(call qstrip,$(CONFIG_VERSION_CODE))
VERSION_CODE:=$(if $(VERSION_CODE),$(VERSION_CODE),r24106-10cc5fcd00)
VERSION_CODE:=$(if $(VERSION_CODE),$(VERSION_CODE),$(REVISION))
VERSION_REPO:=$(call qstrip,$(CONFIG_VERSION_REPO))
VERSION_REPO:=$(if $(VERSION_REPO),$(VERSION_REPO),https://downloads.openwrt.org/releases/23.05.5)
VERSION_REPO:=$(if $(VERSION_REPO),$(VERSION_REPO),https://downloads.openwrt.org/releases/23.05-SNAPSHOT)
VERSION_DIST:=$(call qstrip,$(CONFIG_VERSION_DIST))
VERSION_DIST:=$(if $(VERSION_DIST),$(VERSION_DIST),OpenWrt)

View File

@@ -190,7 +190,7 @@ if VERSIONOPT
config VERSION_REPO
string
prompt "Release repository"
default "https://downloads.openwrt.org/releases/23.05.5"
default "https://downloads.openwrt.org/releases/23.05-SNAPSHOT"
help
This is the repository address embedded in the image, it defaults
to the trunk snapshot repo; the url may contain the following placeholders:
@@ -266,7 +266,7 @@ if VERSIONOPT
config VERSION_CODE_FILENAMES
bool
prompt "Revision code in filenames"
default n
default y
help
Enable this to include the revision identifier or the configured
version code into the firmware image, SDK- and Image Builder archive

View File

@@ -119,7 +119,8 @@ domywifi,dw33d)
glinet,gl-ar150)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x8000" "0x10000"
;;
huawei,ap5030dn)
huawei,ap5030dn|\
huawei,ap6010dn)
ubootenv_add_uci_config "/dev/mtd3" "0x0" "0x20000" "0x20000"
;;
netgear,wndr3700|\
@@ -160,6 +161,7 @@ ruckus,zf7372)
ubootenv_add_uci_config "/dev/mtd2" "0x0" "0x40000" "0x10000"
;;
sophos,ap15|\
sophos,ap15c|\
sophos,ap55|\
sophos,ap55c|\
sophos,ap100|\

View File

@@ -77,6 +77,7 @@ jcg,q20|\
linksys,e7350|\
netgear,eax12|\
netgear,wax202|\
netis,n6|\
zyxel,wsm20)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
;;

View File

@@ -1,14 +1,14 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=wireless-regdb
PKG_VERSION:=2024.07.04
PKG_VERSION:=2024.10.07
PKG_RELEASE:=1
PKG_LICENSE:=ISC
PKG_LICENSE_FILES:=LICENSE
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@KERNEL/software/network/wireless-regdb/
PKG_HASH:=9832a14e1be24abff7be30dee3c9a1afb5fdfcf475a0d91aafef039f8d85f5eb
PKG_HASH:=f76f2bd79a653e9f9dd50548d99d03a4a4eb157da056dfd5892f403ec28fb3d5
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>

View File

@@ -203,7 +203,7 @@ mac80211_hostapd_setup_base() {
dsss_cck_40:1
ht_cap_mask=0
for cap in $(iw phy "$phy" info | grep 'Capabilities:' | cut -d: -f2); do
for cap in $(iw phy "$phy" info | grep -E '^\s*Capabilities:' | cut -d: -f2); do
ht_cap_mask="$(($ht_cap_mask | $cap))"
done

View File

@@ -0,0 +1,169 @@
From e0f83d268974dab0361d11904dfc9acec53f96a6 Mon Sep 17 00:00:00 2001
From: Eric Dumazet <edumazet@google.com>
Date: Fri, 11 Oct 2024 17:12:17 +0000
Subject: [PATCH] genetlink: hold RCU in genlmsg_mcast()
[ Upstream commit 56440d7ec28d60f8da3bfa09062b3368ff9b16db ]
While running net selftests with CONFIG_PROVE_RCU_LIST=y I saw
one lockdep splat [1].
genlmsg_mcast() uses for_each_net_rcu(), and must therefore hold RCU.
Instead of letting all callers guard genlmsg_multicast_allns()
with a rcu_read_lock()/rcu_read_unlock() pair, do it in genlmsg_mcast().
This also means the @flags parameter is useless, we need to always use
GFP_ATOMIC.
[1]
[10882.424136] =============================
[10882.424166] WARNING: suspicious RCU usage
[10882.424309] 6.12.0-rc2-virtme #1156 Not tainted
[10882.424400] -----------------------------
[10882.424423] net/netlink/genetlink.c:1940 RCU-list traversed in non-reader section!!
[10882.424469]
other info that might help us debug this:
[10882.424500]
rcu_scheduler_active = 2, debug_locks = 1
[10882.424744] 2 locks held by ip/15677:
[10882.424791] #0: ffffffffb6b491b0 (cb_lock){++++}-{3:3}, at: genl_rcv (net/netlink/genetlink.c:1219)
[10882.426334] #1: ffffffffb6b49248 (genl_mutex){+.+.}-{3:3}, at: genl_rcv_msg (net/netlink/genetlink.c:61 net/netlink/genetlink.c:57 net/netlink/genetlink.c:1209)
[10882.426465]
stack backtrace:
[10882.426805] CPU: 14 UID: 0 PID: 15677 Comm: ip Not tainted 6.12.0-rc2-virtme #1156
[10882.426919] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[10882.427046] Call Trace:
[10882.427131] <TASK>
[10882.427244] dump_stack_lvl (lib/dump_stack.c:123)
[10882.427335] lockdep_rcu_suspicious (kernel/locking/lockdep.c:6822)
[10882.427387] genlmsg_multicast_allns (net/netlink/genetlink.c:1940 (discriminator 7) net/netlink/genetlink.c:1977 (discriminator 7))
[10882.427436] l2tp_tunnel_notify.constprop.0 (net/l2tp/l2tp_netlink.c:119) l2tp_netlink
[10882.427683] l2tp_nl_cmd_tunnel_create (net/l2tp/l2tp_netlink.c:253) l2tp_netlink
[10882.427748] genl_family_rcv_msg_doit (net/netlink/genetlink.c:1115)
[10882.427834] genl_rcv_msg (net/netlink/genetlink.c:1195 net/netlink/genetlink.c:1210)
[10882.427877] ? __pfx_l2tp_nl_cmd_tunnel_create (net/l2tp/l2tp_netlink.c:186) l2tp_netlink
[10882.427927] ? __pfx_genl_rcv_msg (net/netlink/genetlink.c:1201)
[10882.427959] netlink_rcv_skb (net/netlink/af_netlink.c:2551)
[10882.428069] genl_rcv (net/netlink/genetlink.c:1220)
[10882.428095] netlink_unicast (net/netlink/af_netlink.c:1332 net/netlink/af_netlink.c:1357)
[10882.428140] netlink_sendmsg (net/netlink/af_netlink.c:1901)
[10882.428210] ____sys_sendmsg (net/socket.c:729 (discriminator 1) net/socket.c:744 (discriminator 1) net/socket.c:2607 (discriminator 1))
Fixes: 33f72e6f0c67 ("l2tp : multicast notification to the registered listeners")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: James Chapman <jchapman@katalix.com>
Cc: Tom Parkin <tparkin@katalix.com>
Cc: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20241011171217.3166614-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/target/target_core_user.c | 2 +-
include/net/genetlink.h | 3 +--
net/l2tp/l2tp_netlink.c | 4 ++--
net/netlink/genetlink.c | 28 ++++++++++++++--------------
net/wireless/nl80211.c | 8 ++------
5 files changed, 20 insertions(+), 25 deletions(-)
--- a/backport-include/net/genetlink.h
+++ b/backport-include/net/genetlink.h
@@ -150,7 +150,7 @@ int genlmsg_multicast(const struct genl_
#define genlmsg_multicast_allns LINUX_BACKPORT(genlmsg_multicast_allns)
int backport_genlmsg_multicast_allns(const struct genl_family *family,
struct sk_buff *skb, u32 portid,
- unsigned int group, gfp_t flags);
+ unsigned int group);
#define genl_family_attrbuf LINUX_BACKPORT(genl_family_attrbuf)
static inline struct nlattr **genl_family_attrbuf(struct genl_family *family)
--- a/compat/backport-genetlink.c
+++ b/compat/backport-genetlink.c
@@ -198,23 +198,23 @@ int genlmsg_multicast(const struct genl_
}
EXPORT_SYMBOL_GPL(genlmsg_multicast);
-static int genlmsg_mcast(struct sk_buff *skb, u32 portid, unsigned long group,
- gfp_t flags)
+static int genlmsg_mcast(struct sk_buff *skb, u32 portid, unsigned long group)
{
struct sk_buff *tmp;
struct net *net, *prev = NULL;
bool delivered = false;
int err;
+ rcu_read_lock();
for_each_net_rcu(net) {
if (prev) {
- tmp = skb_clone(skb, flags);
+ tmp = skb_clone(skb, GFP_ATOMIC);
if (!tmp) {
err = -ENOMEM;
goto error;
}
err = nlmsg_multicast(prev->genl_sock, tmp,
- portid, group, flags);
+ portid, group, GFP_ATOMIC);
if (!err)
delivered = true;
else if (err != -ESRCH)
@@ -223,25 +223,29 @@ static int genlmsg_mcast(struct sk_buff
prev = net;
}
+ err = nlmsg_multicast(prev->genl_sock, skb, portid, group, GFP_ATOMIC);
+
+ rcu_read_unlock();
- err = nlmsg_multicast(prev->genl_sock, skb, portid, group, flags);
if (!err)
delivered = true;
else if (err != -ESRCH)
return err;
return delivered ? 0 : -ESRCH;
error:
+ rcu_read_unlock();
+
kfree_skb(skb);
return err;
}
int backport_genlmsg_multicast_allns(const struct genl_family *family,
struct sk_buff *skb, u32 portid,
- unsigned int group, gfp_t flags)
+ unsigned int group)
{
group = __backport_genl_group(family, group);
if (group == INVALID_GROUP)
return -EINVAL;
- return genlmsg_mcast(skb, portid, group, flags);
+ return genlmsg_mcast(skb, portid, group);
}
EXPORT_SYMBOL_GPL(backport_genlmsg_multicast_allns);
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -17627,10 +17627,8 @@ void nl80211_common_reg_change_event(enu
genlmsg_end(msg, hdr);
- rcu_read_lock();
genlmsg_multicast_allns(&nl80211_fam, msg, 0,
- NL80211_MCGRP_REGULATORY, GFP_ATOMIC);
- rcu_read_unlock();
+ NL80211_MCGRP_REGULATORY);
return;
@@ -18248,10 +18246,8 @@ void nl80211_send_beacon_hint_event(stru
genlmsg_end(msg, hdr);
- rcu_read_lock();
genlmsg_multicast_allns(&nl80211_fam, msg, 0,
- NL80211_MCGRP_REGULATORY, GFP_ATOMIC);
- rcu_read_unlock();
+ NL80211_MCGRP_REGULATORY);
return;

View File

@@ -97,7 +97,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
void cfg80211_autodisconnect_wk(struct work_struct *work);
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -18024,7 +18024,8 @@ void nl80211_send_roamed(struct cfg80211
@@ -18022,7 +18022,8 @@ void nl80211_send_roamed(struct cfg80211
}
void nl80211_send_port_authorized(struct cfg80211_registered_device *rdev,
@@ -107,7 +107,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
{
struct sk_buff *msg;
void *hdr;
@@ -18044,6 +18045,11 @@ void nl80211_send_port_authorized(struct
@@ -18042,6 +18043,11 @@ void nl80211_send_port_authorized(struct
nla_put(msg, NL80211_ATTR_MAC, ETH_ALEN, bssid))
goto nla_put_failure;

View File

@@ -132,7 +132,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
/* use driver's channel switch callback */
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -19085,7 +19085,7 @@ static void nl80211_ch_switch_notify(str
@@ -19081,7 +19081,7 @@ static void nl80211_ch_switch_notify(str
struct cfg80211_chan_def *chandef,
gfp_t gfp,
enum nl80211_commands notif,
@@ -141,7 +141,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
{
struct wireless_dev *wdev = netdev->ieee80211_ptr;
struct sk_buff *msg;
@@ -19119,6 +19119,9 @@ static void nl80211_ch_switch_notify(str
@@ -19115,6 +19115,9 @@ static void nl80211_ch_switch_notify(str
goto nla_put_failure;
}
@@ -151,7 +151,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
genlmsg_end(msg, hdr);
genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0,
@@ -19131,7 +19134,7 @@ static void nl80211_ch_switch_notify(str
@@ -19127,7 +19130,7 @@ static void nl80211_ch_switch_notify(str
void cfg80211_ch_switch_notify(struct net_device *dev,
struct cfg80211_chan_def *chandef,
@@ -160,7 +160,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
{
struct wireless_dev *wdev = dev->ieee80211_ptr;
struct wiphy *wiphy = wdev->wiphy;
@@ -19140,7 +19143,7 @@ void cfg80211_ch_switch_notify(struct ne
@@ -19136,7 +19139,7 @@ void cfg80211_ch_switch_notify(struct ne
ASSERT_WDEV_LOCK(wdev);
WARN_INVALID_LINK_ID(wdev, link_id);
@@ -169,7 +169,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
switch (wdev->iftype) {
case NL80211_IFTYPE_STATION:
@@ -19168,14 +19171,15 @@ void cfg80211_ch_switch_notify(struct ne
@@ -19164,14 +19167,15 @@ void cfg80211_ch_switch_notify(struct ne
cfg80211_sched_dfs_chan_update(rdev);
nl80211_ch_switch_notify(rdev, dev, link_id, chandef, GFP_KERNEL,
@@ -187,7 +187,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
{
struct wireless_dev *wdev = dev->ieee80211_ptr;
struct wiphy *wiphy = wdev->wiphy;
@@ -19184,11 +19188,13 @@ void cfg80211_ch_switch_started_notify(s
@@ -19180,11 +19184,13 @@ void cfg80211_ch_switch_started_notify(s
ASSERT_WDEV_LOCK(wdev);
WARN_INVALID_LINK_ID(wdev, link_id);

View File

@@ -1,12 +1,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=r8125
PKG_VERSION:=9.013.02
PKG_RELEASE:=4
PKG_VERSION:=9.015.00
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=https://github.com/openwrt/rtl8125/releases/download/$(PKG_VERSION)
PKG_HASH:=d36410ee99c956f250d9cd08340d8c36567d190f420a8ee128ff6e51225aac0c
PKG_HASH:=7d6906336c3ad960c3e7c0299ad655659d7110bdc933c5b568b7f2536cb8ffc3
PKG_BUILD_PARALLEL:=1
PKG_LICENSE:=GPLv2
@@ -27,6 +27,7 @@ endef
define KernelPackage/r8125-rss
$(call KernelPackage/r8125)
CONFLICTS:=kmod-r8125
TITLE+= (RSS)
VARIANT:=rss
endef

View File

@@ -1,26 +0,0 @@
From cd20cf48c0ec2a01fd9f512e25218a6ac8131794 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= <noltari@gmail.com>
Date: Sat, 17 Aug 2024 22:07:23 +0200
Subject: [PATCH] r8125_rss: silence rxnfc log
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This log is noisy and useless, just ignore it.
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
---
src/r8125_rss.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/src/r8125_rss.c
+++ b/src/r8125_rss.c
@@ -91,7 +91,7 @@ int rtl8125_get_rxnfc(struct net_device
struct rtl8125_private *tp = netdev_priv(dev);
int ret = -EOPNOTSUPP;
- netif_info(tp, drv, tp->dev, "rss get rxnfc\n");
+ netif_dbg(tp, drv, tp->dev, "rss get rxnfc\n");
if (!(dev->features & NETIF_F_RXHASH))
return ret;

View File

@@ -18,11 +18,12 @@ Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
--- a/src/r8125.h
+++ b/src/r8125.h
@@ -1563,6 +1563,8 @@ enum RTL8125_register_content {
@@ -1687,6 +1687,9 @@ enum RTL8125_register_content {
LinkStatus = 0x02,
FullDup = 0x01,
+#define RTL8125_FULL_DUPLEX_MASK (_2500bpsF | _1000bpsF | FullDup)
+#define RTL8125_SPEED_1000_MASK (_1000bpsF | _1000bpsL | _2500bpsL)
+
/* DBG_reg */
Fix_Nak_1 = (1 << 4),
@@ -37,11 +38,11 @@ Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/delay.h>
@@ -5112,6 +5113,38 @@ rtl8125_link_down_patch(struct net_devic
@@ -5023,6 +5024,38 @@ rtl8125_link_down_patch(struct net_devic
#endif
}
+static unsigned int rtl8125_phy_duplex(u16 status)
+static unsigned int rtl8125_phy_duplex(u32 status)
+{
+ unsigned int duplex = DUPLEX_UNKNOWN;
+
@@ -55,14 +56,14 @@ Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
+ return duplex;
+}
+
+static int rtl8125_phy_speed(u16 status)
+static int rtl8125_phy_speed(u32 status)
+{
+ int speed = SPEED_UNKNOWN;
+
+ if (status & LinkStatus) {
+ if (status & _2500bpsF)
+ speed = SPEED_2500;
+ else if (status & _1000bpsF)
+ else if (status & RTL8125_SPEED_1000_MASK)
+ speed = SPEED_1000;
+ else if (status & _100bps)
+ speed = SPEED_100;
@@ -74,16 +75,16 @@ Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
+}
+
static void
_rtl8125_check_link_status(struct net_device *dev)
_rtl8125_check_link_status(struct net_device *dev, unsigned int link_state)
{
@@ -5120,11 +5153,18 @@ _rtl8125_check_link_status(struct net_de
if (tp->link_ok(dev)) {
@@ -5035,11 +5068,18 @@ _rtl8125_check_link_status(struct net_de
if (link_state == R8125_LINK_STATE_ON) {
rtl8125_link_on_patch(dev);
- if (netif_msg_ifup(tp))
- printk(KERN_INFO PFX "%s: link up\n", dev->name);
+ if (netif_msg_ifup(tp)) {
+ const u16 phy_status = RTL_R16(tp, PHYstatus);
+ const u32 phy_status = RTL_R32(tp, PHYstatus);
+ const unsigned int phy_duplex = rtl8125_phy_duplex(phy_status);
+ const int phy_speed = rtl8125_phy_speed(phy_status);
+ printk(KERN_INFO PFX "%s: Link is Up - %s/%s\n",

View File

@@ -1,12 +1,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=r8126
PKG_VERSION:=10.013.00
PKG_RELEASE:=4
PKG_VERSION:=10.015.00
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=https://github.com/openwrt/rtl8126/releases/download/$(PKG_VERSION)
PKG_HASH:=b41bda6ff3bbb7d9bc5b81c5c21355f031587d3a3a5862abcd4d766e942272e7
PKG_HASH:=fac513aa925264a95b053e7532fcda56022d29db288f6625fafee2759a8a6124
PKG_BUILD_PARALLEL:=1
PKG_LICENSE:=GPLv2
@@ -27,6 +27,7 @@ endef
define KernelPackage/r8126-rss
$(call KernelPackage/r8126)
CONFLICTS:=kmod-r8126
TITLE+= (RSS)
VARIANT:=rss
endef

View File

@@ -1,21 +0,0 @@
From 9649df50a239d1379cc8d9febd4854a0c7ca0731 Mon Sep 17 00:00:00 2001
From: Mieczyslaw Nalewaj <namiltd@poczta.onet.pl>
Date: Sat, 10 Aug 2024 17:42:44 +0200
Subject: [PATCH] r8126.h: use BIT_ULL
Fixes compilation on 32 bit systems.
---
src/r8126.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/src/r8126.h
+++ b/src/r8126.h
@@ -678,7 +678,7 @@ This is free software, and you are welco
#ifndef ADVERTISED_2500baseX_Full
#define ADVERTISED_2500baseX_Full 0x8000
#endif
-#define RTK_ADVERTISED_5000baseX_Full BIT(48)
+#define RTK_ADVERTISED_5000baseX_Full BIT_ULL(48)
#define RTK_ADVERTISE_2500FULL 0x80
#define RTK_ADVERTISE_5000FULL 0x100

View File

@@ -1,27 +0,0 @@
From cd20cf48c0ec2a01fd9f512e25218a6ac8131794 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= <noltari@gmail.com>
Date: Sat, 17 Aug 2024 22:07:23 +0200
Subject: [PATCH] r8126_rss: silence rxnfc log
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This log is noisy and useless, just ignore it.
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
---
src/r8126_rss.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/src/r8126_rss.c
+++ b/src/r8126_rss.c
@@ -91,7 +91,7 @@ int rtl8126_get_rxnfc(struct net_device
struct rtl8126_private *tp = netdev_priv(dev);
int ret = -EOPNOTSUPP;
- netif_info(tp, drv, tp->dev, "rss get rxnfc\n");
+ netif_dbg(tp, drv, tp->dev, "rss get rxnfc\n");
if (!(dev->features & NETIF_F_RXHASH))
return ret;

View File

@@ -18,11 +18,13 @@ Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
--- a/src/r8126.h
+++ b/src/r8126.h
@@ -1561,6 +1561,8 @@ enum RTL8126_register_content {
@@ -1756,6 +1756,10 @@ enum RTL8126_register_content {
LinkStatus = 0x02,
FullDup = 0x01,
+#define RTL8126_FULL_DUPLEX_MASK (_5000bpsF | _2500bpsF | _1000bpsF | FullDup)
+#define RTL8126_SPEED_1000_MASK (_1000bpsF | _1000bpsL | _2500bpsL)
+#define RTL8126_SPEED_2500_MASK (_2500bpsF | _5000bpsL)
+
/* DBG_reg */
Fix_Nak_1 = (1 << 4),
@@ -37,11 +39,11 @@ Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/delay.h>
@@ -4740,6 +4741,40 @@ rtl8126_link_down_patch(struct net_devic
@@ -4661,6 +4662,40 @@ rtl8126_link_down_patch(struct net_devic
#endif
}
+static unsigned int rtl8126_phy_duplex(u16 status)
+static unsigned int rtl8126_phy_duplex(u32 status)
+{
+ unsigned int duplex = DUPLEX_UNKNOWN;
+
@@ -55,16 +57,16 @@ Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
+ return duplex;
+}
+
+static int rtl8126_phy_speed(u16 status)
+static int rtl8126_phy_speed(u32 status)
+{
+ int speed = SPEED_UNKNOWN;
+
+ if (status & LinkStatus) {
+ if (status & _5000bpsF)
+ speed = SPEED_5000;
+ else if (status & _2500bpsF)
+ else if (status & RTL8126_SPEED_2500_MASK)
+ speed = SPEED_2500;
+ else if (status & _1000bpsF)
+ else if (status & RTL8126_SPEED_1000_MASK)
+ speed = SPEED_1000;
+ else if (status & _100bps)
+ speed = SPEED_100;
@@ -76,16 +78,16 @@ Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
+}
+
static void
_rtl8126_check_link_status(struct net_device *dev)
_rtl8126_check_link_status(struct net_device *dev, unsigned int link_state)
{
@@ -4748,11 +4783,18 @@ _rtl8126_check_link_status(struct net_de
if (tp->link_ok(dev)) {
@@ -4673,11 +4708,18 @@ _rtl8126_check_link_status(struct net_de
if (link_state == R8126_LINK_STATE_ON) {
rtl8126_link_on_patch(dev);
- if (netif_msg_ifup(tp))
- printk(KERN_INFO PFX "%s: link up\n", dev->name);
+ if (netif_msg_ifup(tp)) {
+ const u16 phy_status = RTL_R16(tp, PHYstatus);
+ const u32 phy_status = RTL_R32(tp, PHYstatus);
+ const unsigned int phy_duplex = rtl8126_phy_duplex(phy_status);
+ const int phy_speed = rtl8126_phy_speed(phy_status);
+ printk(KERN_INFO PFX "%s: Link is Up - %s/%s\n",

View File

@@ -1,12 +1,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=r8168
PKG_VERSION:=8.053.00
PKG_RELEASE:=2
PKG_VERSION:=8.055.00
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=https://github.com/openwrt/rtl8168/releases/download/$(PKG_VERSION)
PKG_HASH:=52f1e6200672b598a04d4ac21ac92a8a9e128b38208c7b03a464bfa93bbfcc8f
PKG_HASH:=61deb2a9cb7d6b08748ad51734b108da95d629712b64b204e2e6bd3f16d0a48f
PKG_BUILD_PARALLEL:=1
PKG_LICENSE:=GPLv2

View File

@@ -13,7 +13,7 @@ Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
--- a/src/r8168_n.c
+++ b/src/r8168_n.c
@@ -1655,9 +1655,9 @@ static int proc_dump_rx_desc_2(struct se
@@ -1668,9 +1668,9 @@ static int proc_dump_rx_desc_2(struct se
j, k);
for (i=0; i<(tp->RxDescLength/4); i++) {
if (!(i % 4))

View File

@@ -18,7 +18,7 @@ Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
--- a/src/r8168.h
+++ b/src/r8168.h
@@ -1385,6 +1385,8 @@ enum RTL8168_register_content {
@@ -1480,6 +1480,8 @@ enum RTL8168_register_content {
LinkStatus = 0x02,
FullDup = 0x01,
@@ -37,7 +37,7 @@ Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/delay.h>
@@ -5373,6 +5374,36 @@ rtl8168_link_down_patch(struct net_devic
@@ -5396,6 +5397,38 @@ rtl8168_link_down_patch(struct net_devic
#endif
}
@@ -66,6 +66,8 @@ Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
+ speed = SPEED_100;
+ else if (status & _10bps)
+ speed = SPEED_10;
+ else if (eee_giga_lite)
+ speed = SPEED_1000;
+ }
+
+ return speed;
@@ -74,7 +76,7 @@ Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
static void
rtl8168_check_link_status(struct net_device *dev)
{
@@ -5392,11 +5423,18 @@ rtl8168_check_link_status(struct net_dev
@@ -5415,11 +5448,18 @@ rtl8168_check_link_status(struct net_dev
if (link_status_on) {
rtl8168_link_on_patch(dev);

View File

@@ -10,7 +10,7 @@ include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=iptables
PKG_VERSION:=1.8.8
PKG_RELEASE:=2
PKG_RELEASE:=3
PKG_SOURCE_URL:=https://netfilter.org/projects/iptables/files
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2

View File

@@ -3,6 +3,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=nu801
PKG_FLAGS:=nonshared
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git

View File

@@ -47,7 +47,13 @@ for device_id, profile in output.get("profiles", {}).items():
if output:
default_packages, output["arch_packages"] = run(
(
default_packages,
output["arch_packages"],
linux_version,
linux_release,
linux_vermagic,
) = run(
[
"make",
"--no-print-directory",
@@ -55,16 +61,23 @@ if output:
"target/linux/",
"val.DEFAULT_PACKAGES",
"val.ARCH_PACKAGES",
"val.LINUX_VERSION",
"val.LINUX_RELEASE",
"val.LINUX_VERMAGIC",
"V=s",
],
stdout=PIPE,
stderr=PIPE,
check=True,
env=environ.copy().update({"TOPDIR": Path().cwd()}),
universal_newlines=True,
).stdout.splitlines()
output["default_packages"] = sorted(default_packages.split())
output["linux_kernel"] = {
"version": linux_version,
"release": linux_release,
"vermagic": linux_vermagic,
}
output_path.write_text(json.dumps(output, sort_keys=True, separators=(",", ":")))
else:
print("JSON info file script could not find any JSON files for target")

View File

@@ -0,0 +1,243 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "ar9344.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
/ {
model = "Huawei AP6010DN";
compatible = "huawei,ap6010dn", "qca,ar9344";
chosen {
bootargs = "console=ttyS0,9600n8";
};
aliases {
led-boot = &led_function_green;
led-failsafe = &led_function_red;
led-running = &led_function_green;
led-upgrade = &led_function_red;
label-mac-device = &eth0;
};
leds {
compatible = "gpio-leds";
led_function_green: led-status-green {
function = LED_FUNCTION_STATUS;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
};
led_function_red: led-status-red {
function = LED_FUNCTION_STATUS;
color = <LED_COLOR_ID_RED>;
gpios = <&gpio 14 GPIO_ACTIVE_HIGH>;
};
};
keys {
compatible = "gpio-keys";
restart {
label = "reset";
linux,code = <KEY_RESTART>;
gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
debounce-interval = <60>;
};
};
watchdog {
pinctrl-names = "default";
pinctrl-0 = <&wdt_gpio15>;
compatible = "linux,wdt-gpio";
gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
hw_algo = "toggle";
hw_margin_ms = <100>;
always-running;
};
virtual_flash {
compatible = "mtd-concat";
devices = <&fwconcat0 &fwconcat1>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "firmware";
reg = <0x0 0x1e00000>;
compatible = "openwrt,uimage", "denx,uimage";
};
};
};
};
&spi {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <25000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot-a";
reg = <0x0 0x80000>;
read-only;
};
partition@80000 {
label = "BootupA";
reg = <0x80000 0x20000>;
};
partition@a0000 {
label = "BootupB";
reg = <0xa0000 0x20000>;
};
partition@c0000 {
label = "u-boot-env";
reg = <0xc0000 0x20000>;
read-only;
};
partition@e0000 {
label = "BoardData";
reg = <0xe0000 0x20000>;
read-only;
};
// In the vendor layout, there are the "SysImageA" (12 MiB)
// and the "ConfigA" (3 MiB) partitions here.
fwconcat0: partition@100000 {
label = "fwconcat0";
reg = <0x100000 0xf00000>;
};
partition@1000000 {
label = "u-boot-b";
reg = <0x1000000 0x80000>;
read-only;
};
partition@1080000 {
label = "ResultA";
reg = <0x1080000 0x20000>;
read-only;
};
partition@10a0000 {
label = "ResultB";
reg = <0x10a0000 0x20000>;
read-only;
};
// In the vendor layout, there are the "SysImageB" (12 MiB)
// and the "ConfigB" (3 MiB) partitions here.
fwconcat1: partition@10c0000 {
label = "fwconcat1";
reg = <0x10c0000 0xf00000>;
};
art: partition@1fc0000 {
label = "art";
reg = <0x1fc0000 0x40000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
macaddr_art_2005b: macaddr@2005b {
compatible = "mac-base";
reg = <0x2005b 0x6>;
#nvmem-cell-cells = <1>;
};
cal_art_1000: cal@1000 {
reg = <0x1000 0x440>;
};
cal_art_5000: cal@5000 {
reg = <0x5000 0x844>;
};
};
};
};
};
};
&wmac {
status = "okay";
nvmem-cells = <&macaddr_art_2005b 1>, <&cal_art_1000>;
nvmem-cell-names = "mac-address", "calibration";
};
&pcie {
status = "okay";
ath9k: wifi@0,0 {
compatible = "pci168c,0033";
reg = <0x0000 0 0 0 0>;
gpio-controller;
#gpio-cells = <2>;
nvmem-cells = <&macaddr_art_2005b 2>, <&cal_art_5000>;
nvmem-cell-names = "mac-address", "calibration";
};
};
&ref {
clock-frequency = <40000000>;
};
&eth0 {
status = "okay";
nvmem-cells = <&macaddr_art_2005b 0>;
nvmem-cell-names = "mac-address";
pll-data = <0x06000000 0x04000101 0x0c001313>;
phy-mode = "rgmii-id";
phy-handle = <&phy>;
gmac-config {
device = <&gmac>;
rgmii-gmac0 = <1>;
rxdv-delay = <3>;
rxd-delay = <3>;
};
};
&mdio0 {
status = "okay";
phy: ethernet-phy@18 {
reg = <0x4>;
};
};
&pinmux {
wdt_gpio15: pinmux_wdt_gpio15 {
pinctrl-single,bits = <0xc 0x0 0xFF000000>;
};
};
&wdt {
status = "disabled";
};

View File

@@ -75,9 +75,3 @@
};
};
};
&wmac {
status = "okay";
qca,no-eeprom;
};

View File

@@ -0,0 +1,78 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "qca9533_mikrotik_routerboard-16m.dtsi"
/ {
compatible = "mikrotik,routerboard-750-r2", "qca,qca9533";
model = "MikroTik RouterBOARD 750 r2 (hEX lite)";
aliases {
led-boot = &led_usr;
led-failsafe = &led_usr;
led-upgrade = &led_usr;
led-running = &led_usr;
};
leds {
compatible = "gpio-leds";
pinctrl-names = "default";
led_usr: usr {
label = "green:usr";
gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
};
led1 {
label = "green:port1";
gpios = <&ssr 0 GPIO_ACTIVE_LOW>;
};
led2 {
label = "green:port2";
gpios = <&ssr 1 GPIO_ACTIVE_LOW>;
};
led3 {
label = "green:port3";
gpios = <&ssr 2 GPIO_ACTIVE_LOW>;
};
led4 {
label = "green:port4";
gpios = <&ssr 3 GPIO_ACTIVE_LOW>;
};
led5 {
label = "green:port5";
gpios = <&ssr 4 GPIO_ACTIVE_LOW>;
};
};
};
&pinmux {
pmx_spi_cs1: pinmux_spi_cs1 {
pinctrl-single,bits = <0x8 0x0a000000 0xff000000>;
};
};
&spi {
pinctrl-names = "default";
pinctrl-0 = <&pmx_spi_cs1>;
cs-gpios = <0>, <&gpio 11 GPIO_ACTIVE_LOW>;
ssr: ssr@1 {
compatible = "fairchild,74hc595";
gpio-controller;
#gpio-cells = <2>;
registers-number = <1>;
reg = <1>;
spi-max-frequency = <10000000>;
};
};
&eth0 {
status = "okay";
phy-handle = <&swphy4>;
};

View File

@@ -83,6 +83,12 @@
};
};
&wmac {
status = "okay";
qca,no-eeprom;
};
&eth0 {
status = "okay";

View File

@@ -66,6 +66,12 @@
};
};
&wmac {
status = "okay";
qca,no-eeprom;
};
&eth0 {
status = "okay";

View File

@@ -93,6 +93,12 @@
};
};
&wmac {
status = "okay";
qca,no-eeprom;
};
&eth0 {
status = "okay";

View File

@@ -42,6 +42,12 @@
};
};
&wmac {
status = "okay";
qca,no-eeprom;
};
&eth0 {
status = "okay";

View File

@@ -36,6 +36,12 @@
};
};
&wmac {
status = "okay";
qca,no-eeprom;
};
&eth0 {
status = "okay";

View File

@@ -50,6 +50,12 @@
};
};
&wmac {
status = "okay";
qca,no-eeprom;
};
&eth0 {
status = "okay";

View File

@@ -0,0 +1,159 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "qca955x.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
/ {
compatible = "sophos,ap15c", "qca,qca9557";
model = "Sophos AP15C";
aliases {
led-boot = &led_status_green;
led-failsafe = &led_status_yellow;
led-running = &led_status_green;
led-upgrade = &led_status_yellow;
label-mac-device = &eth0;
};
chosen {
bootargs = "console=ttyS0,115200n8";
};
keys {
compatible = "gpio-keys";
reset {
label = "reset";
linux,code = <KEY_RESTART>;
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
debounce-interval = <60>;
};
};
leds {
compatible = "gpio-leds";
led_status_green: status_green {
function = LED_FUNCTION_STATUS;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
default-state = "on";
};
led_status_yellow: status_yellow {
function = LED_FUNCTION_STATUS;
color = <LED_COLOR_ID_YELLOW>;
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
};
};
};
&spi {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <25000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x000000 0x040000>;
read-only;
};
partition@40000 {
label = "u-boot-env";
reg = <0x040000 0x010000>;
};
partition@50000 {
label = "art";
reg = <0x050000 0x010000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
cal_art_1000: calibration@1000 {
reg = <0x1000 0x440>;
};
};
};
partition@60000 {
label = "config";
reg = <0x060000 0x010000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
macaddr_config_201a: macaddr@201a {
reg = <0x201a 0x6>;
};
};
};
partition@70000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x070000 0xf90000>;
};
};
};
};
&mdio0 {
status = "okay";
phy-mask = <0x10>;
phy4: ethernet-phy@4 {
reg = <4>;
eee-broken-100tx;
eee-broken-1000t;
};
};
&eth0 {
status = "okay";
pll-data = <0xa6000000 0xa0000101 0xa0001313>;
nvmem-cells = <&macaddr_config_201a>;
nvmem-cell-names = "mac-address";
phy-mode = "rgmii-id";
phy-handle = <&phy4>;
gmac_config: gmac-config {
device = <&gmac>;
rgmii-enabled = <1>;
rxdv-delay = <3>;
rxd-delay = <3>;
txen-delay = <3>;
txd-delay = <3>;
};
};
&wmac {
status = "okay";
nvmem-cells = <&cal_art_1000>;
nvmem-cell-names = "calibration";
};

View File

@@ -66,13 +66,20 @@
#address-cells = <1>;
#size-cells = <1>;
/* ath9k */
cal_caldata_1000: cal@1000 {
reg = <0x1000 0x440>;
};
/* ath10k wave1 in plain MF286 */
cal_caldata_5000: cal@5000 {
reg = <0x5000 0x844>;
};
/* ath10k wave2 in early MF286A */
precal_caldata_5000: precal@5000 {
reg = <0x5000 0x2f20>;
};
};
partition@280000 {
@@ -119,7 +126,7 @@
};
&wifi_ath10k {
nvmem-cells = <&macaddr_mac_0>, <&cal_caldata_5000>, <&cal_caldata_5000>;
nvmem-cells = <&macaddr_mac_0>, <&cal_caldata_5000>, <&precal_caldata_5000>;
nvmem-cell-names = "mac-address", "calibration", "pre-calibration";
mac-address-increment = <1>;
};

View File

@@ -50,6 +50,7 @@ ath79_setup_interfaces()
glinet,gl-ar300m-lite|\
glinet,gl-usb150|\
hak5,wifi-pineapple-nano|\
huawei,ap6010dn|\
meraki,mr16|\
netgear,ex7300|\
netgear,ex7300-v2|\
@@ -72,6 +73,7 @@ ath79_setup_interfaces()
ruckus,zf7351|\
siemens,ws-ap3610|\
sophos,ap15|\
sophos,ap15c|\
sophos,ap55|\
sophos,ap55c|\
sophos,ap100|\
@@ -710,7 +712,8 @@ ath79_setup_macs()
hak5,packet-squirrel)
label_mac=$(mtd_get_mac_binary u-boot 0x1fc00)
;;
huawei,ap5030dn)
huawei,ap5030dn|\
huawei,ap6010dn)
label_mac=$(mtd_get_mac_binary art 0x2005b)
;;
iodata,etg3-r)

View File

@@ -66,7 +66,8 @@ platform_do_upgrade() {
ROOTFS_FILE="root.squashfs"
platform_do_upgrade_failsafe_datachk "$1"
;;
huawei,ap5030dn)
huawei,ap5030dn|\
huawei,ap6010dn)
# Store beginning address of the "firmware" partition
# as KernelA address and KernelB address, each to BootupA & BootupB
# This is the address from which the bootloader will try to load the kernel.

View File

@@ -1643,6 +1643,21 @@ define Device/huawei_ap5030dn
endef
TARGET_DEVICES += huawei_ap5030dn
define Device/huawei_ap6010dn
SOC := ar9344
DEVICE_VENDOR := Huawei
DEVICE_MODEL := AP6010DN
LOADER_TYPE := bin
LOADER_FLASH_OFFS := 0x111DC0
KERNEL_SIZE := 15360k
IMAGE_SIZE := 30720k
COMPILE := loader-$(1).bin
COMPILE/loader-$(1).bin := loader-okli-compile | pad-to 64k | uImage none
KERNEL := kernel-bin | append-dtb | lzma | uImage lzma -M 0x4f4b4c49 | loader-okli $(1) 8128
KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | loader-kernel | uImage none
endef
TARGET_DEVICES += huawei_ap6010dn
define Device/iodata_etg3-r
SOC := ar9342
DEVICE_VENDOR := I-O DATA
@@ -2731,6 +2746,14 @@ define Device/sophos_ap15
endef
TARGET_DEVICES += sophos_ap15
define Device/sophos_ap15c
SOC := qca9557
DEVICE_VENDOR := Sophos
DEVICE_MODEL := AP15C
IMAGE_SIZE := 15936k
endef
TARGET_DEVICES += sophos_ap15c
define Device/sophos_ap55
SOC := qca9558
DEVICE_VENDOR := Sophos

View File

@@ -670,6 +670,7 @@
#define AR934X_GPIO_FUNC_SPI_CS_0_EN BIT(13)
#define AR934X_GPIO_OUT_GPIO 0x00
#define AR934X_GPIO_OUTSEL_CLK_OBS4 0x14
#define QCA955X_GPIO_OUTSEL_CLK_OBS5 0x54

View File

@@ -182,34 +182,40 @@ static inline void mr18_init(void)
static inline void mr18_init(void) { }
#endif
#ifdef CONFIG_BOARD_HUAWEI_AP5030DN
static inline void ap5030dn_init(void)
#if defined(CONFIG_BOARD_HUAWEI_AP5030DN) || defined(CONFIG_BOARD_HUAWEI_AP6010DN)
static inline void huawei_ap_init(void)
{
const unsigned int ap5030dn_watchdog_gpio = 15;
const unsigned int watchdog_gpio = 15;
unsigned int gpiobase, reg;
gpiobase = KSEG1ADDR(AR71XX_GPIO_BASE);
printf("Huawei AP5030DN\n");
printf("Huawei AP\n");
reg = READREG(gpiobase + AR71XX_GPIO_REG_OE);
WRITEREG(gpiobase + AR71XX_GPIO_REG_OE,
reg & ~(1 << ap5030dn_watchdog_gpio));
reg & ~(1 << watchdog_gpio));
/* Set GPIO15 MUX to output CLK_OBS5 (= CPU_CLK/4)
* to keep the watchdog happy until wdt-gpio takes over
* or CLK_OBS4 (= AHB_CLK/2) to keep the watchdog happy
* until wdt-gpio takes over
*/
reg = READREG(gpiobase + AR934X_GPIO_REG_OUT_FUNC3);
#if defined(CONFIG_BOARD_HUAWEI_AP5030DN)
WRITEREG(gpiobase + AR934X_GPIO_REG_OUT_FUNC3,
reg | (QCA955X_GPIO_OUTSEL_CLK_OBS5 << 24));
#elif defined(CONFIG_BOARD_HUAWEI_AP6010DN)
WRITEREG(gpiobase + AR934X_GPIO_REG_OUT_FUNC3,
reg | (AR934X_GPIO_OUTSEL_CLK_OBS4 << 24));
#endif
}
#else
static inline void ap5030dn_init(void) { }
static inline void huawei_ap_init(void) {}
#endif
void board_init(void)
{
tlwr1043nd_init();
mr18_init();
ap5030dn_init();
huawei_ap_init();
}

View File

@@ -9,6 +9,15 @@ define Device/mikrotik_routerboard-493g
endef
TARGET_DEVICES += mikrotik_routerboard-493g
define Device/mikrotik_routerboard-750-r2
$(Device/mikrotik_nor)
SOC := qca9533
DEVICE_MODEL := RouterBOARD 750 r2 (hEX lite)
IMAGE_SIZE := 16256k
SUPPORTED_DEVICES += rb-750-r2
endef
TARGET_DEVICES += mikrotik_routerboard-750-r2
define Device/mikrotik_routerboard-911-lite
$(Device/mikrotik_nor)
SOC := ar9344

View File

@@ -16,6 +16,7 @@ mikrotik,routerboard-lhg-5nd)
ucidef_set_led_rssi "rssimediumhigh" "rssimediumhigh" "green:rssimediumhigh" "wlan0" "60" "100"
ucidef_set_led_rssi "rssihigh" "rssihigh" "green:rssihigh" "wlan0" "80" "100"
;;
mikrotik,routerboard-750-r2|\
mikrotik,routerboard-951ui-2hnd|\
mikrotik,routerboard-951ui-2nd|\
mikrotik,routerboard-952ui-5ac2nd)

View File

@@ -14,6 +14,11 @@ ath79_setup_interfaces()
ucidef_add_switch "switch1" \
"0@eth1" "1:lan:4" "2:lan:1" "3:lan:2" "4:lan:3"
;;
mikrotik,routerboard-750-r2)
ucidef_set_interface_wan "eth1"
ucidef_add_switch "switch0" \
"0@eth0" "1:lan:4" "2:lan:1" "3:lan:3" "4:lan:2"
;;
mikrotik,routerboard-911-lite|\
mikrotik,routerboard-912uag-2hpnd|\
mikrotik,routerboard-lhg-2nd|\

View File

@@ -751,7 +751,7 @@ SVN-Revision: 35130
EXPORT_SYMBOL(xfrm_parse_spi);
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -4201,14 +4201,16 @@ static bool tcp_parse_aligned_timestamp(
@@ -4228,14 +4228,16 @@ static bool tcp_parse_aligned_timestamp(
{
const __be32 *ptr = (const __be32 *)(th + 1);

View File

@@ -13,7 +13,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
--- a/drivers/spi/spidev.c
+++ b/drivers/spi/spidev.c
@@ -698,7 +698,7 @@ MODULE_DEVICE_TABLE(spi, spidev_spi_ids)
@@ -699,7 +699,7 @@ MODULE_DEVICE_TABLE(spi, spidev_spi_ids)
*/
static int spidev_of_check(struct device *dev)
{

View File

@@ -10,7 +10,7 @@ Avoids the 0x40000 cycles of warmup again if firmware has already used it
--- a/drivers/char/hw_random/bcm2835-rng.c
+++ b/drivers/char/hw_random/bcm2835-rng.c
@@ -106,8 +106,10 @@ static int bcm2835_rng_init(struct hwrng
@@ -108,8 +108,10 @@ static int bcm2835_rng_init(struct hwrng
}
/* set warm-up count & enable */

View File

@@ -125,10 +125,10 @@ board_bcm2835: Remove coherent dma pool increase - API has gone
- ret = devm_request_irq(dev, irq_of_parse_and_map(dev->of_node, 0),
+ ret = devm_request_irq(dev, platform_get_irq(pdev, 0),
bcm2835_mbox_irq, 0, dev_name(dev), mbox);
bcm2835_mbox_irq, IRQF_NO_SUSPEND, dev_name(dev),
mbox);
if (ret) {
dev_err(dev, "Failed to register a mailbox IRQ handler: %d\n",
@@ -194,7 +197,18 @@ static struct platform_driver bcm2835_mb
@@ -195,7 +198,18 @@ static struct platform_driver bcm2835_mb
},
.probe = bcm2835_mbox_probe,
};

View File

@@ -15,7 +15,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -1633,6 +1633,109 @@ command_cleanup:
@@ -1642,6 +1642,109 @@ command_cleanup:
}
/*
@@ -125,7 +125,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
* non-error returns are a promise to giveback() the urb later
* we drop ownership so next owner (or urb unlink) can get it
*/
@@ -5474,6 +5577,7 @@ static const struct hc_driver xhci_hc_dr
@@ -5488,6 +5591,7 @@ static const struct hc_driver xhci_hc_dr
.endpoint_reset = xhci_endpoint_reset,
.check_bandwidth = xhci_check_bandwidth,
.reset_bandwidth = xhci_reset_bandwidth,

View File

@@ -33,7 +33,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
#define USB_VENDOR_ID_BELKIN 0x050d
#define USB_DEVICE_ID_FLIP_KVM 0x3201
@@ -1332,6 +1335,9 @@
@@ -1338,6 +1341,9 @@
#define USB_VENDOR_ID_XAT 0x2505
#define USB_DEVICE_ID_XAT_CSR 0x0220

View File

@@ -1,7 +1,7 @@
From 271d837c58918de2cac5715798ebf71df43b39f7 Mon Sep 17 00:00:00 2001
From: Jonathan Bell <jonathan@raspberrypi.org>
Date: Tue, 13 Aug 2019 15:53:29 +0100
Subject: [PATCH] xhci: Use more event ring segment table entries
From d631e7354399aa2fb6079b72f515acd6d080c203 Mon Sep 17 00:00:00 2001
From: Jonathan Bell <jonathan@raspberrypi.com>
Date: Thu, 13 Jul 2023 14:43:21 +0100
Subject: [PATCH 0481/1085] xhci: Use more event ring segment table entries
Users have reported log spam created by "Event Ring Full" xHC event
TRBs. These are caused by interrupt latency in conjunction with a very
@@ -14,46 +14,54 @@ Controllers have a hardware-defined limit as to the number of ERST
entries they can process, so make the actual number in use
min(ERST_MAX_SEGS, hw_max).
Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
---
drivers/usb/host/xhci-mem.c | 8 +++++---
drivers/usb/host/xhci.h | 4 ++--
2 files changed, 7 insertions(+), 5 deletions(-)
drivers/usb/host/xhci-mem.c | 9 +++++++--
drivers/usb/host/xhci.h | 5 +++--
2 files changed, 10 insertions(+), 4 deletions(-)
--- a/drivers/usb/host/xhci-mem.c
+++ b/drivers/usb/host/xhci-mem.c
@@ -2544,9 +2544,11 @@ int xhci_mem_init(struct xhci_hcd *xhci,
* Event ring setup: Allocate a normal ring, but also setup
* the event ring segment table (ERST). Section 4.9.3.
*/
+ val2 = 1 << HCS_ERST_MAX(xhci->hcs_params2);
+ val2 = min_t(unsigned int, ERST_MAX_SEGS, val2);
xhci_dbg_trace(xhci, trace_xhci_dbg_init, "// Allocating event ring");
- xhci->event_ring = xhci_ring_alloc(xhci, ERST_NUM_SEGS, 1, TYPE_EVENT,
- 0, flags);
+ xhci->event_ring = xhci_ring_alloc(xhci, val2, 1, TYPE_EVENT,
+ 0, flags);
if (!xhci->event_ring)
goto fail;
if (xhci_check_trb_in_td_math(xhci) < 0)
@@ -2559,7 +2561,7 @@ int xhci_mem_init(struct xhci_hcd *xhci,
@@ -2276,6 +2276,7 @@ xhci_alloc_interrupter(struct xhci_hcd *
{
struct device *dev = xhci_to_hcd(xhci)->self.sysdev;
struct xhci_interrupter *ir;
+ unsigned int nr_event_segs;
u64 erst_base;
u32 erst_size;
int ret;
@@ -2296,7 +2297,11 @@ xhci_alloc_interrupter(struct xhci_hcd *
return NULL;
ir->ir_set = &xhci->run_regs->ir_set[intr_num];
- ir->event_ring = xhci_ring_alloc(xhci, ERST_NUM_SEGS, 1, TYPE_EVENT,
+ nr_event_segs = min_t(unsigned int,
+ 1 << HCS_ERST_MAX(xhci->hcs_params2),
+ ERST_MAX_SEGS);
+
+ ir->event_ring = xhci_ring_alloc(xhci, nr_event_segs, 1, TYPE_EVENT,
0, flags);
if (!ir->event_ring) {
xhci_warn(xhci, "Failed to allocate interrupter %d event ring\n", intr_num);
@@ -2312,7 +2317,7 @@ xhci_alloc_interrupter(struct xhci_hcd *
/* set ERST count with the number of entries in the segment table */
val = readl(&xhci->ir_set->erst_size);
val &= ERST_SIZE_MASK;
- val |= ERST_NUM_SEGS;
+ val |= val2;
xhci_dbg_trace(xhci, trace_xhci_dbg_init,
"// Write ERST size = %i to ir_set 0 (some bits preserved)",
val);
erst_size = readl(&ir->ir_set->erst_size);
erst_size &= ERST_SIZE_MASK;
- erst_size |= ERST_NUM_SEGS;
+ erst_size |= ir->event_ring->num_segs;
writel(erst_size, &ir->ir_set->erst_size);
erst_base = xhci_read_64(xhci, &ir->ir_set->erst_base);
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
@@ -1675,8 +1675,8 @@ struct urb_priv {
@@ -1423,8 +1423,9 @@ struct urb_priv {
* Each segment table entry is 4*32bits long. 1K seems like an ok size:
* (1K bytes * 8bytes/bit) / (4*32 bits) = 64 segment entries in the table,
* meaning 64 ring segments.
- * Initial allocated size of the ERST, in number of entries */
-#define ERST_NUM_SEGS 1
+ * Maximum number of segments in the ERST */
+ */
+/* Maximum number of segments in the ERST */
+#define ERST_MAX_SEGS 8
/* Poll every 60 seconds */
#define POLL_TIMEOUT 60

View File

@@ -17,7 +17,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -52,6 +52,8 @@
@@ -53,6 +53,8 @@
#define extra_checks 0
#endif
@@ -26,7 +26,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
/* Device and char device-related information */
static DEFINE_IDA(gpio_ida);
static dev_t gpio_devt;
@@ -2408,8 +2410,8 @@ int gpiod_direction_output(struct gpio_d
@@ -2409,8 +2411,8 @@ int gpiod_direction_output(struct gpio_d
value = !!value;
/* GPIOs used for enabled IRQs shall not be set as output */
@@ -37,7 +37,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
gpiod_err(desc,
"%s: tried to set a GPIO tied to an IRQ as output\n",
__func__);
@@ -3226,8 +3228,8 @@ int gpiochip_lock_as_irq(struct gpio_chi
@@ -3227,8 +3229,8 @@ int gpiochip_lock_as_irq(struct gpio_chi
}
/* To be valid for IRQ the line needs to be input or open drain */

View File

@@ -191,7 +191,7 @@ Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
/* Validate controls. */
static int validate_ctrls(struct v4l2_ext_controls *cs,
struct v4l2_ctrl_helper *helpers,
@@ -872,6 +922,9 @@ int __v4l2_ctrl_s_ctrl_compound(struct v
@@ -877,6 +927,9 @@ int __v4l2_ctrl_s_ctrl_compound(struct v
/* It's a driver bug if this happens. */
if (WARN_ON(ctrl->type != type))
return -EINVAL;

View File

@@ -16,7 +16,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
--- a/sound/usb/quirks.c
+++ b/sound/usb/quirks.c
@@ -1808,6 +1808,8 @@ static const struct usb_audio_quirk_flag
@@ -1810,6 +1810,8 @@ static const struct usb_audio_quirk_flag
QUIRK_FLAG_IGNORE_CTL_ERROR),
DEVICE_FLG(0x0951, 0x16ad, /* Kingston HyperX */
QUIRK_FLAG_CTL_MSG_DELAY_1M),

View File

@@ -19,7 +19,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
--- a/sound/usb/card.c
+++ b/sound/usb/card.c
@@ -856,8 +856,14 @@ static int usb_audio_probe(struct usb_in
@@ -862,8 +862,14 @@ static int usb_audio_probe(struct usb_in
if (ignore_ctl_error)
chip->quirk_flags |= QUIRK_FLAG_IGNORE_CTL_ERROR;

View File

@@ -22,4 +22,4 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
+ { .name = "spidev" },
{ .name = "bh2228fv" },
{ .name = "dh2228fv" },
{ .name = "ltc2488" },
{ .name = "jg10309-01" },

View File

@@ -22,7 +22,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
--- a/drivers/usb/host/xhci-pci.c
+++ b/drivers/usb/host/xhci-pci.c
@@ -301,8 +301,10 @@ static void xhci_pci_quirks(struct devic
@@ -305,8 +305,10 @@ static void xhci_pci_quirks(struct devic
pdev->device == 0x3432)
xhci->quirks |= XHCI_BROKEN_STREAMS;
@@ -54,11 +54,11 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
addr = xhci_trb_virt_to_dma(new_seg, new_deq);
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
@@ -1909,6 +1909,7 @@ struct xhci_hcd {
#define XHCI_RESET_TO_DEFAULT BIT_ULL(44)
#define XHCI_ZHAOXIN_TRB_FETCH BIT_ULL(45)
@@ -1664,6 +1664,7 @@ struct xhci_hcd {
#define XHCI_ZHAOXIN_HOST BIT_ULL(46)
+#define XHCI_AVOID_DQ_ON_LINK BIT_ULL(47)
#define XHCI_WRITE_64_HI_LO BIT_ULL(47)
#define XHCI_CDNS_SCTX_QUIRK BIT_ULL(48)
+#define XHCI_AVOID_DQ_ON_LINK BIT_ULL(49)
unsigned int num_active_eps;
unsigned int limit_active_eps;

View File

@@ -205,16 +205,16 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
xhci_err(xhci, "Tried to move enqueue past ring segment\n");
return;
}
@@ -3246,7 +3249,7 @@ irqreturn_t xhci_irq(struct usb_hcd *hcd
@@ -3266,7 +3269,7 @@ irqreturn_t xhci_irq(struct usb_hcd *hcd
* that clears the EHB.
*/
while (xhci_handle_event(xhci) > 0) {
while (xhci_handle_event(xhci, ir) > 0) {
- if (event_loop++ < TRBS_PER_SEGMENT / 2)
+ if (event_loop++ < xhci->event_ring->trbs_per_seg / 2)
+ if (event_loop++ < ir->event_ring->trbs_per_seg / 2)
continue;
xhci_update_erst_dequeue(xhci, event_ring_deq);
event_ring_deq = xhci->event_ring->dequeue;
@@ -3388,7 +3391,8 @@ static int prepare_ring(struct xhci_hcd
xhci_update_erst_dequeue(xhci, ir, event_ring_deq);
event_ring_deq = ir->event_ring->dequeue;
@@ -3408,7 +3411,8 @@ static int prepare_ring(struct xhci_hcd
}
}
@@ -226,7 +226,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
}
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -889,8 +889,8 @@ static void xhci_clear_command_ring(stru
@@ -898,8 +898,8 @@ static void xhci_clear_command_ring(stru
seg = ring->deq_seg;
do {
memset(seg->trbs, 0,
@@ -237,7 +237,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
cpu_to_le32(~TRB_CYCLE);
seg = seg->next;
} while (seg != ring->deq_seg);
@@ -901,7 +901,7 @@ static void xhci_clear_command_ring(stru
@@ -910,7 +910,7 @@ static void xhci_clear_command_ring(stru
ring->enq_seg = ring->deq_seg;
ring->enqueue = ring->dequeue;
@@ -248,7 +248,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
* when the cycle bit is set to 1.
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
@@ -1637,6 +1637,7 @@ struct xhci_ring {
@@ -1385,6 +1385,7 @@ struct xhci_ring {
unsigned int num_trbs_free;
unsigned int num_trbs_free_temp;
unsigned int bounce_buf_len;

View File

@@ -53,7 +53,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
cycle_state, type, max_packet, flags);
--- a/drivers/usb/host/xhci-pci.c
+++ b/drivers/usb/host/xhci-pci.c
@@ -304,6 +304,7 @@ static void xhci_pci_quirks(struct devic
@@ -308,6 +308,7 @@ static void xhci_pci_quirks(struct devic
if (pdev->vendor == PCI_VENDOR_ID_VIA && pdev->device == 0x3483) {
xhci->quirks |= XHCI_LPM_SUPPORT;
xhci->quirks |= XHCI_AVOID_DQ_ON_LINK;
@@ -63,11 +63,11 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA &&
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
@@ -1911,6 +1911,7 @@ struct xhci_hcd {
#define XHCI_ZHAOXIN_TRB_FETCH BIT_ULL(45)
#define XHCI_ZHAOXIN_HOST BIT_ULL(46)
#define XHCI_AVOID_DQ_ON_LINK BIT_ULL(47)
+#define XHCI_VLI_TRB_CACHE_BUG BIT_ULL(48)
@@ -1666,6 +1666,7 @@ struct xhci_hcd {
#define XHCI_WRITE_64_HI_LO BIT_ULL(47)
#define XHCI_CDNS_SCTX_QUIRK BIT_ULL(48)
#define XHCI_AVOID_DQ_ON_LINK BIT_ULL(49)
+#define XHCI_VLI_TRB_CACHE_BUG BIT_ULL(50)
unsigned int num_active_eps;
unsigned int limit_active_eps;

View File

@@ -26,7 +26,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
--- a/drivers/usb/host/xhci-pci.c
+++ b/drivers/usb/host/xhci-pci.c
@@ -305,6 +305,7 @@ static void xhci_pci_quirks(struct devic
@@ -309,6 +309,7 @@ static void xhci_pci_quirks(struct devic
xhci->quirks |= XHCI_LPM_SUPPORT;
xhci->quirks |= XHCI_AVOID_DQ_ON_LINK;
xhci->quirks |= XHCI_VLI_TRB_CACHE_BUG;
@@ -36,7 +36,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA &&
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -3701,14 +3701,15 @@ int xhci_queue_bulk_tx(struct xhci_hcd *
@@ -3721,14 +3721,15 @@ int xhci_queue_bulk_tx(struct xhci_hcd *
unsigned int num_trbs;
unsigned int start_cycle, num_sgs = 0;
unsigned int enqd_len, block_len, trb_buff_len, full_len;
@@ -54,7 +54,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
full_len = urb->transfer_buffer_length;
/* If we have scatter/gather list, we use it. */
if (urb->num_sgs && !(urb->transfer_flags & URB_DMA_MAP_SINGLE)) {
@@ -3745,6 +3746,17 @@ int xhci_queue_bulk_tx(struct xhci_hcd *
@@ -3765,6 +3766,17 @@ int xhci_queue_bulk_tx(struct xhci_hcd *
start_cycle = ring->cycle_state;
send_addr = addr;
@@ -72,7 +72,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
/* Queue the TRBs, even if they are zero-length */
for (enqd_len = 0; first_trb || enqd_len < full_len;
enqd_len += trb_buff_len) {
@@ -3757,6 +3769,11 @@ int xhci_queue_bulk_tx(struct xhci_hcd *
@@ -3777,6 +3789,11 @@ int xhci_queue_bulk_tx(struct xhci_hcd *
if (enqd_len + trb_buff_len > full_len)
trb_buff_len = full_len - enqd_len;
@@ -86,11 +86,11 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
first_trb = false;
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
@@ -1912,6 +1912,7 @@ struct xhci_hcd {
#define XHCI_ZHAOXIN_HOST BIT_ULL(46)
#define XHCI_AVOID_DQ_ON_LINK BIT_ULL(47)
#define XHCI_VLI_TRB_CACHE_BUG BIT_ULL(48)
+#define XHCI_VLI_SS_BULK_OUT_BUG BIT_ULL(49)
@@ -1667,6 +1667,7 @@ struct xhci_hcd {
#define XHCI_CDNS_SCTX_QUIRK BIT_ULL(48)
#define XHCI_AVOID_DQ_ON_LINK BIT_ULL(49)
#define XHCI_VLI_TRB_CACHE_BUG BIT_ULL(50)
+#define XHCI_VLI_SS_BULK_OUT_BUG BIT_ULL(51)
unsigned int num_active_eps;
unsigned int limit_active_eps;

View File

@@ -13,7 +13,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -3701,7 +3701,7 @@ int xhci_queue_bulk_tx(struct xhci_hcd *
@@ -3721,7 +3721,7 @@ int xhci_queue_bulk_tx(struct xhci_hcd *
unsigned int num_trbs;
unsigned int start_cycle, num_sgs = 0;
unsigned int enqd_len, block_len, trb_buff_len, full_len;
@@ -22,7 +22,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
u32 field, length_field, remainder, maxpacket;
u64 addr, send_addr;
@@ -3747,14 +3747,9 @@ int xhci_queue_bulk_tx(struct xhci_hcd *
@@ -3767,14 +3767,9 @@ int xhci_queue_bulk_tx(struct xhci_hcd *
send_addr = addr;
if (xhci->quirks & XHCI_VLI_SS_BULK_OUT_BUG &&
@@ -40,7 +40,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
}
/* Queue the TRBs, even if they are zero-length */
@@ -3769,7 +3764,7 @@ int xhci_queue_bulk_tx(struct xhci_hcd *
@@ -3789,7 +3784,7 @@ int xhci_queue_bulk_tx(struct xhci_hcd *
if (enqd_len + trb_buff_len > full_len)
trb_buff_len = full_len - enqd_len;

View File

@@ -48,7 +48,7 @@ Signed-off-by: David Plowman <david.plowman@raspberrypi.com>
static bool _init_on_alloc_enabled_early __read_mostly
= IS_ENABLED(CONFIG_INIT_ON_ALLOC_DEFAULT_ON);
static int __init early_init_on_alloc(char *buf)
@@ -2980,12 +3001,13 @@ __rmqueue(struct zone *zone, unsigned in
@@ -2983,12 +3004,13 @@ __rmqueue(struct zone *zone, unsigned in
if (IS_ENABLED(CONFIG_CMA)) {
/*
* Balance movable allocations between regular and CMA areas by
@@ -64,4 +64,4 @@ Signed-off-by: David Plowman <david.plowman@raspberrypi.com>
+ * _alloc_in_cma_threshold) {
page = __rmqueue_cma_fallback(zone, order);
if (page)
goto out;
return page;

View File

@@ -22,7 +22,7 @@ Reviewed-by: Vadim Pasternak <vadimp@nvidia.com>
--- a/drivers/hwmon/Kconfig
+++ b/drivers/hwmon/Kconfig
@@ -1685,6 +1685,19 @@ config SENSORS_EMC2103
@@ -1687,6 +1687,19 @@ config SENSORS_EMC2103
This driver can also be built as a module. If so, the module
will be called emc2103.

View File

@@ -90,7 +90,7 @@ it on BCM4708 family.
/*
* Reset a halted HC.
*
@@ -634,6 +677,16 @@ static int xhci_run_finished(struct xhci
@@ -635,6 +678,16 @@ static int xhci_run_finished(struct xhci
spin_unlock_irqrestore(&xhci->lock, flags);
return -ENODEV;
}
@@ -109,11 +109,11 @@ it on BCM4708 family.
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
@@ -1909,6 +1909,7 @@ struct xhci_hcd {
#define XHCI_RESET_TO_DEFAULT BIT_ULL(44)
#define XHCI_ZHAOXIN_TRB_FETCH BIT_ULL(45)
@@ -1663,6 +1663,7 @@ struct xhci_hcd {
#define XHCI_ZHAOXIN_HOST BIT_ULL(46)
+#define XHCI_FAKE_DOORBELL BIT_ULL(47)
#define XHCI_WRITE_64_HI_LO BIT_ULL(47)
#define XHCI_CDNS_SCTX_QUIRK BIT_ULL(48)
+#define XHCI_FAKE_DOORBELL BIT_ULL(49)
unsigned int num_active_eps;
unsigned int limit_active_eps;

View File

@@ -116,7 +116,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
}
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -1815,7 +1815,8 @@ int gpiochip_add_pingroup_range(struct g
@@ -1816,7 +1816,8 @@ int gpiochip_add_pingroup_range(struct g
list_add_tail(&pin_range->node, &gdev->pin_ranges);
@@ -126,7 +126,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
}
EXPORT_SYMBOL_GPL(gpiochip_add_pingroup_range);
@@ -1872,7 +1873,7 @@ int gpiochip_add_pin_range(struct gpio_c
@@ -1873,7 +1874,7 @@ int gpiochip_add_pin_range(struct gpio_c
list_add_tail(&pin_range->node, &gdev->pin_ranges);

View File

@@ -69,6 +69,8 @@
status = "okay";
led-controller@1 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "sercomm,msp430-leds";
reg = <1>;
spi-max-frequency = <500000>;

View File

@@ -244,7 +244,7 @@
pinctrl_nand: nand-pins {
function = "nand";
group = "nand_grp";
pins = "nand_grp";
};
pinctrl_gpio35_alt: gpio35_alt-pins {
@@ -254,37 +254,37 @@
pinctrl_dectpd: dectpd-pins {
function = "dectpd";
group = "dectpd_grp";
pins = "dectpd_grp";
};
pinctrl_vdsl_phy_override_0: vdsl_phy_override_0-pins {
function = "vdsl_phy_override_0";
group = "vdsl_phy_override_0_grp";
pins = "vdsl_phy_override_0_grp";
};
pinctrl_vdsl_phy_override_1: vdsl_phy_override_1-pins {
function = "vdsl_phy_override_1";
group = "vdsl_phy_override_1_grp";
pins = "vdsl_phy_override_1_grp";
};
pinctrl_vdsl_phy_override_2: vdsl_phy_override_2-pins {
function = "vdsl_phy_override_2";
group = "vdsl_phy_override_2_grp";
pins = "vdsl_phy_override_2_grp";
};
pinctrl_vdsl_phy_override_3: vdsl_phy_override_3-pins {
function = "vdsl_phy_override_3";
group = "vdsl_phy_override_3_grp";
pins = "vdsl_phy_override_3_grp";
};
pinctrl_dsl_gpio8: dsl_gpio8-pins {
function = "dsl_gpio8";
group = "dsl_gpio8";
pins = "dsl_gpio8";
};
pinctrl_dsl_gpio9: dsl_gpio9-pins {
function = "dsl_gpio9";
group = "dsl_gpio9";
pins = "dsl_gpio9";
};
};
};

View File

@@ -319,7 +319,7 @@
pinctrl_nand: nand-pins {
function = "nand";
group = "nand_grp";
pins = "nand_grp";
};
};
};

View File

@@ -332,7 +332,7 @@
pinctrl_uart1: uart1-pins {
function = "uart1";
group = "uart1_grp";
pins = "uart1_grp";
};
};
};

View File

@@ -414,7 +414,7 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
#ifndef arch_wants_old_prefaulted_pte
static inline bool arch_wants_old_prefaulted_pte(void)
{
@@ -2791,7 +2779,7 @@ static inline int cow_user_page(struct p
@@ -2819,7 +2807,7 @@ static inline int cow_user_page(struct p
* On architectures with software "accessed" bits, we would
* take a double page fault, so mark it accessed here.
*/

View File

@@ -612,7 +612,7 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mem_cgroup_id_remove(memcg);
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -4804,6 +4804,27 @@ static inline void mm_account_fault(stru
@@ -4832,6 +4832,27 @@ static inline void mm_account_fault(stru
perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MIN, 1, regs, address);
}
@@ -640,7 +640,7 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
/*
* By the time we get here, we already hold the mm semaphore
*
@@ -4835,11 +4856,15 @@ vm_fault_t handle_mm_fault(struct vm_are
@@ -4863,11 +4884,15 @@ vm_fault_t handle_mm_fault(struct vm_are
if (flags & FAULT_FLAG_USER)
mem_cgroup_enter_user_fault();

View File

@@ -149,7 +149,7 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -1014,6 +1014,7 @@ static int exec_mmap(struct mm_struct *m
@@ -1012,6 +1012,7 @@ static int exec_mmap(struct mm_struct *m
active_mm = tsk->active_mm;
tsk->active_mm = mm;
tsk->mm = mm;
@@ -157,7 +157,7 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
/*
* This prevents preemption while active_mm is being loaded and
* it and mm are being updated, which could cause problems for
@@ -1029,6 +1030,7 @@ static int exec_mmap(struct mm_struct *m
@@ -1027,6 +1028,7 @@ static int exec_mmap(struct mm_struct *m
tsk->mm->vmacache_seqnum = 0;
vmacache_flush(tsk);
task_unlock(tsk);
@@ -382,7 +382,7 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
}
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -1091,6 +1091,7 @@ static struct mm_struct *mm_init(struct
@@ -1092,6 +1092,7 @@ static struct mm_struct *mm_init(struct
goto fail_nocontext;
mm->user_ns = get_user_ns(user_ns);
@@ -390,7 +390,7 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
return mm;
fail_nocontext:
@@ -1133,6 +1134,7 @@ static inline void __mmput(struct mm_str
@@ -1134,6 +1135,7 @@ static inline void __mmput(struct mm_str
}
if (mm->binfmt)
module_put(mm->binfmt->module);
@@ -398,7 +398,7 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mmdrop(mm);
}
@@ -2625,6 +2627,13 @@ pid_t kernel_clone(struct kernel_clone_a
@@ -2624,6 +2626,13 @@ pid_t kernel_clone(struct kernel_clone_a
get_task_struct(p);
}

View File

@@ -31,7 +31,7 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -1014,7 +1014,6 @@ static int exec_mmap(struct mm_struct *m
@@ -1012,7 +1012,6 @@ static int exec_mmap(struct mm_struct *m
active_mm = tsk->active_mm;
tsk->active_mm = mm;
tsk->mm = mm;
@@ -39,7 +39,7 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
/*
* This prevents preemption while active_mm is being loaded and
* it and mm are being updated, which could cause problems for
@@ -1029,6 +1028,7 @@ static int exec_mmap(struct mm_struct *m
@@ -1027,6 +1026,7 @@ static int exec_mmap(struct mm_struct *m
local_irq_enable();
tsk->mm->vmacache_seqnum = 0;
vmacache_flush(tsk);

View File

@@ -82,7 +82,7 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
#include <linux/sched/mm.h>
#include <linux/sched/coredump.h>
#include <linux/sched/numa_balancing.h>
@@ -1353,8 +1354,7 @@ again:
@@ -1364,8 +1365,7 @@ again:
force_flush = 1;
set_page_dirty(page);
}
@@ -92,7 +92,7 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mark_page_accessed(page);
}
rss[mm_counter(page)]--;
@@ -4807,8 +4807,8 @@ static inline void mm_account_fault(stru
@@ -4835,8 +4835,8 @@ static inline void mm_account_fault(stru
#ifdef CONFIG_LRU_GEN
static void lru_gen_enter_fault(struct vm_area_struct *vma)
{

View File

@@ -354,7 +354,7 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
static void mem_cgroup_css_free(struct cgroup_subsys_state *css)
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -7663,6 +7663,7 @@ static void __init free_area_init_node(i
@@ -7704,6 +7704,7 @@ static void __init free_area_init_node(i
pgdat_set_deferred_range(pgdat);
free_area_init_core(pgdat);

View File

@@ -289,7 +289,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/dsa/b53/b53_common.c
+++ b/drivers/net/dsa/b53/b53_common.c
@@ -1349,10 +1349,8 @@ void b53_phylink_validate(struct dsa_swi
@@ -1353,10 +1353,8 @@ void b53_phylink_validate(struct dsa_swi
phylink_set(mask, 100baseT_Full);
}
@@ -877,7 +877,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
ethtool_link_ksettings_add_link_mode(ks, supported, FEC_RS);
--- a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
+++ b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
@@ -1566,7 +1566,7 @@ static void axienet_validate(struct phyl
@@ -1661,7 +1661,7 @@ static void axienet_validate(struct phyl
netdev_warn(ndev, "Cannot use PHY mode %s, supported: %s\n",
phy_modes(state->interface),
phy_modes(lp->phy_mode));
@@ -886,7 +886,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
return;
}
}
@@ -1599,10 +1599,8 @@ static void axienet_validate(struct phyl
@@ -1694,10 +1694,8 @@ static void axienet_validate(struct phyl
break;
}

View File

@@ -22,7 +22,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
--- a/drivers/net/dsa/b53/b53_common.c
+++ b/drivers/net/dsa/b53/b53_common.c
@@ -2303,7 +2303,7 @@ static const struct b53_chip_data b53_sw
@@ -2312,7 +2312,7 @@ static const struct b53_chip_data b53_sw
.chip_id = BCM5325_DEVICE_ID,
.dev_name = "BCM5325",
.vlans = 16,
@@ -31,7 +31,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
.arl_bins = 2,
.arl_buckets = 1024,
.imp_port = 5,
@@ -2314,7 +2314,7 @@ static const struct b53_chip_data b53_sw
@@ -2323,7 +2323,7 @@ static const struct b53_chip_data b53_sw
.chip_id = BCM5365_DEVICE_ID,
.dev_name = "BCM5365",
.vlans = 256,
@@ -40,7 +40,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
.arl_bins = 2,
.arl_buckets = 1024,
.imp_port = 5,
@@ -2325,7 +2325,7 @@ static const struct b53_chip_data b53_sw
@@ -2334,7 +2334,7 @@ static const struct b53_chip_data b53_sw
.chip_id = BCM5389_DEVICE_ID,
.dev_name = "BCM5389",
.vlans = 4096,
@@ -49,7 +49,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
.arl_bins = 4,
.arl_buckets = 1024,
.imp_port = 8,
@@ -2339,7 +2339,7 @@ static const struct b53_chip_data b53_sw
@@ -2348,7 +2348,7 @@ static const struct b53_chip_data b53_sw
.chip_id = BCM5395_DEVICE_ID,
.dev_name = "BCM5395",
.vlans = 4096,
@@ -58,7 +58,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
.arl_bins = 4,
.arl_buckets = 1024,
.imp_port = 8,
@@ -2353,7 +2353,7 @@ static const struct b53_chip_data b53_sw
@@ -2362,7 +2362,7 @@ static const struct b53_chip_data b53_sw
.chip_id = BCM5397_DEVICE_ID,
.dev_name = "BCM5397",
.vlans = 4096,
@@ -67,7 +67,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
.arl_bins = 4,
.arl_buckets = 1024,
.imp_port = 8,
@@ -2367,7 +2367,7 @@ static const struct b53_chip_data b53_sw
@@ -2376,7 +2376,7 @@ static const struct b53_chip_data b53_sw
.chip_id = BCM5398_DEVICE_ID,
.dev_name = "BCM5398",
.vlans = 4096,
@@ -76,7 +76,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
.arl_bins = 4,
.arl_buckets = 1024,
.imp_port = 8,
@@ -2381,7 +2381,7 @@ static const struct b53_chip_data b53_sw
@@ -2390,7 +2390,7 @@ static const struct b53_chip_data b53_sw
.chip_id = BCM53115_DEVICE_ID,
.dev_name = "BCM53115",
.vlans = 4096,
@@ -85,7 +85,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
.arl_bins = 4,
.arl_buckets = 1024,
.vta_regs = B53_VTA_REGS,
@@ -2395,7 +2395,7 @@ static const struct b53_chip_data b53_sw
@@ -2404,7 +2404,7 @@ static const struct b53_chip_data b53_sw
.chip_id = BCM53125_DEVICE_ID,
.dev_name = "BCM53125",
.vlans = 4096,
@@ -94,7 +94,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
.arl_bins = 4,
.arl_buckets = 1024,
.imp_port = 8,
@@ -2437,7 +2437,7 @@ static const struct b53_chip_data b53_sw
@@ -2446,7 +2446,7 @@ static const struct b53_chip_data b53_sw
.chip_id = BCM53010_DEVICE_ID,
.dev_name = "BCM53010",
.vlans = 4096,
@@ -103,7 +103,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
.arl_bins = 4,
.arl_buckets = 1024,
.imp_port = 8,
@@ -2479,7 +2479,7 @@ static const struct b53_chip_data b53_sw
@@ -2488,7 +2488,7 @@ static const struct b53_chip_data b53_sw
.chip_id = BCM53018_DEVICE_ID,
.dev_name = "BCM53018",
.vlans = 4096,
@@ -112,7 +112,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
.arl_bins = 4,
.arl_buckets = 1024,
.imp_port = 8,
@@ -2493,7 +2493,7 @@ static const struct b53_chip_data b53_sw
@@ -2502,7 +2502,7 @@ static const struct b53_chip_data b53_sw
.chip_id = BCM53019_DEVICE_ID,
.dev_name = "BCM53019",
.vlans = 4096,
@@ -121,7 +121,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
.arl_bins = 4,
.arl_buckets = 1024,
.imp_port = 8,
@@ -2635,7 +2635,6 @@ static int b53_switch_init(struct b53_de
@@ -2644,7 +2644,6 @@ static int b53_switch_init(struct b53_de
dev->cpu_port = 5;
}

View File

@@ -27,7 +27,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
--- 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
@@ -1295,12 +1295,6 @@ static void b53_adjust_link(struct dsa_s
return;
}
}

View File

@@ -21,7 +21,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
--- 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
@@ -1226,7 +1226,7 @@ static void b53_adjust_link(struct dsa_s
return;
/* Enable flow control on BCM5301x's CPU port */

View File

@@ -19,7 +19,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
--- a/drivers/net/dsa/b53/b53_common.c
+++ b/drivers/net/dsa/b53/b53_common.c
@@ -2301,7 +2301,6 @@ static const struct b53_chip_data b53_sw
@@ -2310,7 +2310,6 @@ static const struct b53_chip_data b53_sw
.arl_bins = 2,
.arl_buckets = 1024,
.imp_port = 5,
@@ -27,7 +27,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
.duplex_reg = B53_DUPLEX_STAT_FE,
},
{
@@ -2312,7 +2311,6 @@ static const struct b53_chip_data b53_sw
@@ -2321,7 +2320,6 @@ static const struct b53_chip_data b53_sw
.arl_bins = 2,
.arl_buckets = 1024,
.imp_port = 5,
@@ -35,7 +35,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
.duplex_reg = B53_DUPLEX_STAT_FE,
},
{
@@ -2323,7 +2321,6 @@ static const struct b53_chip_data b53_sw
@@ -2332,7 +2330,6 @@ static const struct b53_chip_data b53_sw
.arl_bins = 4,
.arl_buckets = 1024,
.imp_port = 8,
@@ -43,7 +43,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
.vta_regs = B53_VTA_REGS,
.duplex_reg = B53_DUPLEX_STAT_GE,
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
@@ -2337,7 +2334,6 @@ static const struct b53_chip_data b53_sw
@@ -2346,7 +2343,6 @@ static const struct b53_chip_data b53_sw
.arl_bins = 4,
.arl_buckets = 1024,
.imp_port = 8,
@@ -51,7 +51,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
.vta_regs = B53_VTA_REGS,
.duplex_reg = B53_DUPLEX_STAT_GE,
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
@@ -2351,7 +2347,6 @@ static const struct b53_chip_data b53_sw
@@ -2360,7 +2356,6 @@ static const struct b53_chip_data b53_sw
.arl_bins = 4,
.arl_buckets = 1024,
.imp_port = 8,
@@ -59,7 +59,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
.vta_regs = B53_VTA_REGS_9798,
.duplex_reg = B53_DUPLEX_STAT_GE,
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
@@ -2365,7 +2360,6 @@ static const struct b53_chip_data b53_sw
@@ -2374,7 +2369,6 @@ static const struct b53_chip_data b53_sw
.arl_bins = 4,
.arl_buckets = 1024,
.imp_port = 8,
@@ -67,7 +67,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
.vta_regs = B53_VTA_REGS_9798,
.duplex_reg = B53_DUPLEX_STAT_GE,
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
@@ -2380,7 +2374,6 @@ static const struct b53_chip_data b53_sw
@@ -2389,7 +2383,6 @@ static const struct b53_chip_data b53_sw
.arl_buckets = 1024,
.vta_regs = B53_VTA_REGS,
.imp_port = 8,
@@ -75,7 +75,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
.duplex_reg = B53_DUPLEX_STAT_GE,
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
.jumbo_size_reg = B53_JUMBO_MAX_SIZE,
@@ -2393,7 +2386,6 @@ static const struct b53_chip_data b53_sw
@@ -2402,7 +2395,6 @@ static const struct b53_chip_data b53_sw
.arl_bins = 4,
.arl_buckets = 1024,
.imp_port = 8,
@@ -83,7 +83,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
.vta_regs = B53_VTA_REGS,
.duplex_reg = B53_DUPLEX_STAT_GE,
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
@@ -2407,7 +2399,6 @@ static const struct b53_chip_data b53_sw
@@ -2416,7 +2408,6 @@ static const struct b53_chip_data b53_sw
.arl_bins = 4,
.arl_buckets = 1024,
.imp_port = 8,
@@ -91,7 +91,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
.vta_regs = B53_VTA_REGS,
.duplex_reg = B53_DUPLEX_STAT_GE,
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
@@ -2421,7 +2412,6 @@ static const struct b53_chip_data b53_sw
@@ -2430,7 +2421,6 @@ static const struct b53_chip_data b53_sw
.arl_bins = 4,
.arl_buckets = 1024,
.imp_port = 8,
@@ -99,7 +99,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
.vta_regs = B53_VTA_REGS_63XX,
.duplex_reg = B53_DUPLEX_STAT_63XX,
.jumbo_pm_reg = B53_JUMBO_PORT_MASK_63XX,
@@ -2435,7 +2425,6 @@ static const struct b53_chip_data b53_sw
@@ -2444,7 +2434,6 @@ static const struct b53_chip_data b53_sw
.arl_bins = 4,
.arl_buckets = 1024,
.imp_port = 8,
@@ -107,7 +107,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
.vta_regs = B53_VTA_REGS,
.duplex_reg = B53_DUPLEX_STAT_GE,
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
@@ -2449,7 +2438,6 @@ static const struct b53_chip_data b53_sw
@@ -2458,7 +2447,6 @@ static const struct b53_chip_data b53_sw
.arl_bins = 4,
.arl_buckets = 1024,
.imp_port = 8,
@@ -115,7 +115,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
.vta_regs = B53_VTA_REGS,
.duplex_reg = B53_DUPLEX_STAT_GE,
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
@@ -2463,7 +2451,6 @@ static const struct b53_chip_data b53_sw
@@ -2472,7 +2460,6 @@ static const struct b53_chip_data b53_sw
.arl_bins = 4,
.arl_buckets = 1024,
.imp_port = 8,
@@ -123,7 +123,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
.vta_regs = B53_VTA_REGS,
.duplex_reg = B53_DUPLEX_STAT_GE,
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
@@ -2477,7 +2464,6 @@ static const struct b53_chip_data b53_sw
@@ -2486,7 +2473,6 @@ static const struct b53_chip_data b53_sw
.arl_bins = 4,
.arl_buckets = 1024,
.imp_port = 8,
@@ -131,7 +131,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
.vta_regs = B53_VTA_REGS,
.duplex_reg = B53_DUPLEX_STAT_GE,
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
@@ -2491,7 +2477,6 @@ static const struct b53_chip_data b53_sw
@@ -2500,7 +2486,6 @@ static const struct b53_chip_data b53_sw
.arl_bins = 4,
.arl_buckets = 1024,
.imp_port = 8,
@@ -139,7 +139,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
.vta_regs = B53_VTA_REGS,
.duplex_reg = B53_DUPLEX_STAT_GE,
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
@@ -2505,7 +2490,6 @@ static const struct b53_chip_data b53_sw
@@ -2514,7 +2499,6 @@ static const struct b53_chip_data b53_sw
.arl_bins = 4,
.arl_buckets = 1024,
.imp_port = 8,
@@ -147,7 +147,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
.vta_regs = B53_VTA_REGS,
.duplex_reg = B53_DUPLEX_STAT_GE,
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
@@ -2519,7 +2503,6 @@ static const struct b53_chip_data b53_sw
@@ -2528,7 +2512,6 @@ static const struct b53_chip_data b53_sw
.arl_bins = 4,
.arl_buckets = 1024,
.imp_port = 8,
@@ -155,7 +155,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
.vta_regs = B53_VTA_REGS,
.duplex_reg = B53_DUPLEX_STAT_GE,
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
@@ -2548,7 +2531,6 @@ static const struct b53_chip_data b53_sw
@@ -2557,7 +2540,6 @@ static const struct b53_chip_data b53_sw
.arl_bins = 4,
.arl_buckets = 1024,
.imp_port = 8,
@@ -163,7 +163,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
.vta_regs = B53_VTA_REGS,
.duplex_reg = B53_DUPLEX_STAT_GE,
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
@@ -2562,7 +2544,6 @@ static const struct b53_chip_data b53_sw
@@ -2571,7 +2553,6 @@ static const struct b53_chip_data b53_sw
.arl_bins = 4,
.arl_buckets = 256,
.imp_port = 8,
@@ -171,7 +171,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
.vta_regs = B53_VTA_REGS,
.duplex_reg = B53_DUPLEX_STAT_GE,
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
@@ -2588,7 +2569,6 @@ static int b53_switch_init(struct b53_de
@@ -2597,7 +2578,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;
@@ -179,7 +179,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
dev->num_vlans = chip->vlans;
dev->num_arl_bins = chip->arl_bins;
dev->num_arl_buckets = chip->arl_buckets;
@@ -2620,13 +2600,6 @@ static int b53_switch_init(struct b53_de
@@ -2629,13 +2609,6 @@ static int b53_switch_init(struct b53_de
break;
#endif
}

View File

@@ -62,7 +62,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
stmmac_init_tx_chan(priv, priv->ioaddr, priv->plat->dma_cfg,
tx_q->dma_tx_phy, chan);
stmmac_start_tx_dma(priv, chan);
@@ -3785,6 +3776,8 @@ static int stmmac_open(struct net_device
@@ -3786,6 +3777,8 @@ static int stmmac_open(struct net_device
}
}
@@ -71,7 +71,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
ret = stmmac_hw_setup(dev, true);
if (ret < 0) {
netdev_err(priv->dev, "%s: Hw setup failed\n", __func__);
@@ -6414,6 +6407,7 @@ void stmmac_enable_rx_queue(struct stmma
@@ -6412,6 +6405,7 @@ void stmmac_enable_rx_queue(struct stmma
return;
}
@@ -79,7 +79,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
stmmac_clear_rx_descriptors(priv, queue);
stmmac_init_rx_chan(priv, priv->ioaddr, priv->plat->dma_cfg,
@@ -6475,6 +6469,7 @@ void stmmac_enable_tx_queue(struct stmma
@@ -6473,6 +6467,7 @@ void stmmac_enable_tx_queue(struct stmma
return;
}
@@ -87,7 +87,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
stmmac_clear_tx_descriptors(priv, queue);
stmmac_init_tx_chan(priv, priv->ioaddr, priv->plat->dma_cfg,
@@ -7402,6 +7397,25 @@ int stmmac_suspend(struct device *dev)
@@ -7400,6 +7395,25 @@ int stmmac_suspend(struct device *dev)
}
EXPORT_SYMBOL_GPL(stmmac_suspend);
@@ -113,7 +113,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
/**
* stmmac_reset_queues_param - reset queue parameters
* @priv: device pointer
@@ -7412,22 +7426,11 @@ static void stmmac_reset_queues_param(st
@@ -7410,22 +7424,11 @@ static void stmmac_reset_queues_param(st
u32 tx_cnt = priv->plat->tx_queues_to_use;
u32 queue;

View File

@@ -17,7 +17,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -3839,8 +3839,6 @@ static int stmmac_release(struct net_dev
@@ -3840,8 +3840,6 @@ static int stmmac_release(struct net_dev
struct stmmac_priv *priv = netdev_priv(dev);
u32 chan;
@@ -26,7 +26,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
if (device_may_wakeup(priv->device))
phylink_speed_down(priv->phylink, false);
/* Stop and disconnect the PHY */
@@ -3852,6 +3850,8 @@ static int stmmac_release(struct net_dev
@@ -3853,6 +3851,8 @@ static int stmmac_release(struct net_dev
for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++)
hrtimer_cancel(&priv->tx_queue[chan].txtimer);

View File

@@ -737,7 +737,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
if (unlikely(ret < 0)) {
netdev_err(priv->dev,
"%s: alloc tx-%d MSI %d (error: %d)\n",
@@ -3732,21 +3732,21 @@ static int stmmac_open(struct net_device
@@ -3733,21 +3733,21 @@ static int stmmac_open(struct net_device
bfsize = 0;
if (bfsize < BUF_SIZE_16KiB)
@@ -766,7 +766,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
int tbs_en = priv->plat->tx_queues_cfg[chan].tbs_en;
/* Setup per-TXQ tbs flag before TX descriptor alloc */
@@ -3804,7 +3804,7 @@ irq_error:
@@ -3805,7 +3805,7 @@ irq_error:
phylink_stop(priv->phylink);
for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++)
@@ -775,7 +775,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
stmmac_hw_teardown(dev);
init_error:
@@ -3848,7 +3848,7 @@ static int stmmac_release(struct net_dev
@@ -3849,7 +3849,7 @@ static int stmmac_release(struct net_dev
stmmac_disable_all_queues(priv);
for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++)
@@ -784,7 +784,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
netif_tx_disable(dev);
@@ -3912,7 +3912,7 @@ static bool stmmac_vlan_insert(struct st
@@ -3913,7 +3913,7 @@ static bool stmmac_vlan_insert(struct st
return false;
stmmac_set_tx_owner(priv, p);
@@ -793,7 +793,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
return true;
}
@@ -3930,7 +3930,7 @@ static bool stmmac_vlan_insert(struct st
@@ -3931,7 +3931,7 @@ static bool stmmac_vlan_insert(struct st
static void stmmac_tso_allocator(struct stmmac_priv *priv, dma_addr_t des,
int total_len, bool last_segment, u32 queue)
{
@@ -802,7 +802,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
struct dma_desc *desc;
u32 buff_size;
int tmp_len;
@@ -3941,7 +3941,7 @@ static void stmmac_tso_allocator(struct
@@ -3942,7 +3942,7 @@ static void stmmac_tso_allocator(struct
dma_addr_t curr_addr;
tx_q->cur_tx = STMMAC_GET_ENTRY(tx_q->cur_tx,
@@ -811,7 +811,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
WARN_ON(tx_q->tx_skbuff[tx_q->cur_tx]);
if (tx_q->tbs & STMMAC_TBS_AVAIL)
@@ -3969,7 +3969,7 @@ static void stmmac_tso_allocator(struct
@@ -3970,7 +3970,7 @@ static void stmmac_tso_allocator(struct
static void stmmac_flush_tx_descriptors(struct stmmac_priv *priv, int queue)
{
@@ -820,7 +820,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
int desc_size;
if (likely(priv->extend_desc))
@@ -4031,7 +4031,7 @@ static netdev_tx_t stmmac_tso_xmit(struc
@@ -4032,7 +4032,7 @@ static netdev_tx_t stmmac_tso_xmit(struc
dma_addr_t des;
int i;
@@ -829,7 +829,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
first_tx = tx_q->cur_tx;
/* Compute header lengths */
@@ -4071,7 +4071,7 @@ static netdev_tx_t stmmac_tso_xmit(struc
@@ -4072,7 +4072,7 @@ static netdev_tx_t stmmac_tso_xmit(struc
stmmac_set_mss(priv, mss_desc, mss);
tx_q->mss = mss;
tx_q->cur_tx = STMMAC_GET_ENTRY(tx_q->cur_tx,
@@ -838,7 +838,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
WARN_ON(tx_q->tx_skbuff[tx_q->cur_tx]);
}
@@ -4183,7 +4183,7 @@ static netdev_tx_t stmmac_tso_xmit(struc
@@ -4196,7 +4196,7 @@ static netdev_tx_t stmmac_tso_xmit(struc
* ndo_start_xmit will fill this descriptor the next time it's
* called and stmmac_tx_clean may clean up to this descriptor.
*/
@@ -847,7 +847,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
if (unlikely(stmmac_tx_avail(priv, queue) <= (MAX_SKB_FRAGS + 1))) {
netif_dbg(priv, hw, priv->dev, "%s: stop transmitted packets\n",
@@ -4271,7 +4271,7 @@ static netdev_tx_t stmmac_xmit(struct sk
@@ -4284,7 +4284,7 @@ static netdev_tx_t stmmac_xmit(struct sk
int entry, first_tx;
dma_addr_t des;
@@ -856,7 +856,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
first_tx = tx_q->cur_tx;
if (priv->tx_path_in_lpi_mode && priv->eee_sw_timer_en)
@@ -4334,7 +4334,7 @@ static netdev_tx_t stmmac_xmit(struct sk
@@ -4347,7 +4347,7 @@ static netdev_tx_t stmmac_xmit(struct sk
int len = skb_frag_size(frag);
bool last_segment = (i == (nfrags - 1));
@@ -865,7 +865,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
WARN_ON(tx_q->tx_skbuff[entry]);
if (likely(priv->extend_desc))
@@ -4405,7 +4405,7 @@ static netdev_tx_t stmmac_xmit(struct sk
@@ -4418,7 +4418,7 @@ static netdev_tx_t stmmac_xmit(struct sk
* ndo_start_xmit will fill this descriptor the next time it's
* called and stmmac_tx_clean may clean up to this descriptor.
*/
@@ -874,7 +874,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tx_q->cur_tx = entry;
if (netif_msg_pktdata(priv)) {
@@ -4517,7 +4517,7 @@ static void stmmac_rx_vlan(struct net_de
@@ -4530,7 +4530,7 @@ static void stmmac_rx_vlan(struct net_de
*/
static inline void stmmac_rx_refill(struct stmmac_priv *priv, u32 queue)
{
@@ -883,7 +883,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
int dirty = stmmac_rx_dirty(priv, queue);
unsigned int entry = rx_q->dirty_rx;
@@ -4567,7 +4567,7 @@ static inline void stmmac_rx_refill(stru
@@ -4580,7 +4580,7 @@ static inline void stmmac_rx_refill(stru
dma_wmb();
stmmac_set_rx_owner(priv, p, use_rx_wd);
@@ -892,7 +892,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
}
rx_q->dirty_rx = entry;
rx_q->rx_tail_addr = rx_q->dma_rx_phy +
@@ -4595,12 +4595,12 @@ static unsigned int stmmac_rx_buf1_len(s
@@ -4608,12 +4608,12 @@ static unsigned int stmmac_rx_buf1_len(s
/* First descriptor, not last descriptor and not split header */
if (status & rx_not_ls)
@@ -907,7 +907,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
}
static unsigned int stmmac_rx_buf2_len(struct stmmac_priv *priv,
@@ -4616,7 +4616,7 @@ static unsigned int stmmac_rx_buf2_len(s
@@ -4629,7 +4629,7 @@ static unsigned int stmmac_rx_buf2_len(s
/* Not last descriptor */
if (status & rx_not_ls)
@@ -916,7 +916,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
plen = stmmac_get_rx_frame_len(priv, p, coe);
@@ -4627,7 +4627,7 @@ static unsigned int stmmac_rx_buf2_len(s
@@ -4640,7 +4640,7 @@ static unsigned int stmmac_rx_buf2_len(s
static int stmmac_xdp_xmit_xdpf(struct stmmac_priv *priv, int queue,
struct xdp_frame *xdpf, bool dma_map)
{
@@ -925,7 +925,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
unsigned int entry = tx_q->cur_tx;
struct dma_desc *tx_desc;
dma_addr_t dma_addr;
@@ -4690,7 +4690,7 @@ static int stmmac_xdp_xmit_xdpf(struct s
@@ -4703,7 +4703,7 @@ static int stmmac_xdp_xmit_xdpf(struct s
stmmac_enable_dma_transmission(priv, priv->ioaddr);
@@ -934,7 +934,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tx_q->cur_tx = entry;
return STMMAC_XDP_TX;
@@ -4864,7 +4864,7 @@ static void stmmac_dispatch_skb_zc(struc
@@ -4877,7 +4877,7 @@ static void stmmac_dispatch_skb_zc(struc
static bool stmmac_rx_refill_zc(struct stmmac_priv *priv, u32 queue, u32 budget)
{
@@ -943,7 +943,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
unsigned int entry = rx_q->dirty_rx;
struct dma_desc *rx_desc = NULL;
bool ret = true;
@@ -4907,7 +4907,7 @@ static bool stmmac_rx_refill_zc(struct s
@@ -4920,7 +4920,7 @@ static bool stmmac_rx_refill_zc(struct s
dma_wmb();
stmmac_set_rx_owner(priv, rx_desc, use_rx_wd);
@@ -952,7 +952,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
}
if (rx_desc) {
@@ -4922,7 +4922,7 @@ static bool stmmac_rx_refill_zc(struct s
@@ -4935,7 +4935,7 @@ static bool stmmac_rx_refill_zc(struct s
static int stmmac_rx_zc(struct stmmac_priv *priv, int limit, u32 queue)
{
@@ -961,7 +961,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
unsigned int count = 0, error = 0, len = 0;
int dirty = stmmac_rx_dirty(priv, queue);
unsigned int next_entry = rx_q->cur_rx;
@@ -4944,7 +4944,7 @@ static int stmmac_rx_zc(struct stmmac_pr
@@ -4957,7 +4957,7 @@ static int stmmac_rx_zc(struct stmmac_pr
desc_size = sizeof(struct dma_desc);
}
@@ -970,7 +970,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
rx_q->dma_rx_phy, desc_size);
}
while (count < limit) {
@@ -4991,7 +4991,7 @@ read_again:
@@ -5004,7 +5004,7 @@ read_again:
/* Prefetch the next RX descriptor */
rx_q->cur_rx = STMMAC_GET_ENTRY(rx_q->cur_rx,
@@ -979,7 +979,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
next_entry = rx_q->cur_rx;
if (priv->extend_desc)
@@ -5112,7 +5112,7 @@ read_again:
@@ -5117,7 +5117,7 @@ read_again:
*/
static int stmmac_rx(struct stmmac_priv *priv, int limit, u32 queue)
{
@@ -988,7 +988,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
struct stmmac_channel *ch = &priv->channel[queue];
unsigned int count = 0, error = 0, len = 0;
int status = 0, coe = priv->hw->rx_csum;
@@ -5125,7 +5125,7 @@ static int stmmac_rx(struct stmmac_priv
@@ -5130,7 +5130,7 @@ static int stmmac_rx(struct stmmac_priv
int buf_sz;
dma_dir = page_pool_get_dma_dir(rx_q->page_pool);
@@ -997,7 +997,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
if (netif_msg_rx_status(priv)) {
void *rx_head;
@@ -5139,7 +5139,7 @@ static int stmmac_rx(struct stmmac_priv
@@ -5144,7 +5144,7 @@ static int stmmac_rx(struct stmmac_priv
desc_size = sizeof(struct dma_desc);
}
@@ -1006,7 +1006,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
rx_q->dma_rx_phy, desc_size);
}
while (count < limit) {
@@ -5183,7 +5183,7 @@ read_again:
@@ -5188,7 +5188,7 @@ read_again:
break;
rx_q->cur_rx = STMMAC_GET_ENTRY(rx_q->cur_rx,
@@ -1015,7 +1015,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
next_entry = rx_q->cur_rx;
if (priv->extend_desc)
@@ -5317,7 +5317,7 @@ read_again:
@@ -5315,7 +5315,7 @@ read_again:
buf1_len, dma_dir);
skb_add_rx_frag(skb, skb_shinfo(skb)->nr_frags,
buf->page, buf->page_offset, buf1_len,
@@ -1024,7 +1024,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
/* Data payload appended into SKB */
page_pool_release_page(rx_q->page_pool, buf->page);
@@ -5329,7 +5329,7 @@ read_again:
@@ -5327,7 +5327,7 @@ read_again:
buf2_len, dma_dir);
skb_add_rx_frag(skb, skb_shinfo(skb)->nr_frags,
buf->sec_page, 0, buf2_len,
@@ -1033,7 +1033,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
/* Data payload appended into SKB */
page_pool_release_page(rx_q->page_pool, buf->sec_page);
@@ -5762,11 +5762,13 @@ static irqreturn_t stmmac_safety_interru
@@ -5760,11 +5760,13 @@ static irqreturn_t stmmac_safety_interru
static irqreturn_t stmmac_msi_intr_tx(int irq, void *data)
{
struct stmmac_tx_queue *tx_q = (struct stmmac_tx_queue *)data;
@@ -1048,7 +1048,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
/* Check if adapter is up */
if (test_bit(STMMAC_DOWN, &priv->state))
@@ -5801,10 +5803,12 @@ static irqreturn_t stmmac_msi_intr_tx(in
@@ -5799,10 +5801,12 @@ static irqreturn_t stmmac_msi_intr_tx(in
static irqreturn_t stmmac_msi_intr_rx(int irq, void *data)
{
struct stmmac_rx_queue *rx_q = (struct stmmac_rx_queue *)data;
@@ -1062,7 +1062,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
/* Check if adapter is up */
if (test_bit(STMMAC_DOWN, &priv->state))
@@ -5830,10 +5834,10 @@ static void stmmac_poll_controller(struc
@@ -5828,10 +5832,10 @@ static void stmmac_poll_controller(struc
if (priv->plat->multi_msi_en) {
for (i = 0; i < priv->plat->rx_queues_to_use; i++)
@@ -1075,7 +1075,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
} else {
disable_irq(dev->irq);
stmmac_interrupt(dev->irq, dev);
@@ -6014,34 +6018,34 @@ static int stmmac_rings_status_show(stru
@@ -6012,34 +6016,34 @@ static int stmmac_rings_status_show(stru
return 0;
for (queue = 0; queue < rx_count; queue++) {
@@ -1116,7 +1116,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
}
}
@@ -6388,7 +6392,7 @@ void stmmac_disable_rx_queue(struct stmm
@@ -6386,7 +6390,7 @@ void stmmac_disable_rx_queue(struct stmm
void stmmac_enable_rx_queue(struct stmmac_priv *priv, u32 queue)
{
@@ -1125,7 +1125,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
struct stmmac_channel *ch = &priv->channel[queue];
unsigned long flags;
u32 buf_size;
@@ -6425,7 +6429,7 @@ void stmmac_enable_rx_queue(struct stmma
@@ -6423,7 +6427,7 @@ void stmmac_enable_rx_queue(struct stmma
rx_q->queue_index);
} else {
stmmac_set_dma_bfsize(priv, priv->ioaddr,
@@ -1134,7 +1134,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
rx_q->queue_index);
}
@@ -6451,7 +6455,7 @@ void stmmac_disable_tx_queue(struct stmm
@@ -6449,7 +6453,7 @@ void stmmac_disable_tx_queue(struct stmm
void stmmac_enable_tx_queue(struct stmmac_priv *priv, u32 queue)
{
@@ -1143,7 +1143,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
struct stmmac_channel *ch = &priv->channel[queue];
unsigned long flags;
int ret;
@@ -6501,7 +6505,7 @@ void stmmac_xdp_release(struct net_devic
@@ -6499,7 +6503,7 @@ void stmmac_xdp_release(struct net_devic
stmmac_disable_all_queues(priv);
for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++)
@@ -1152,7 +1152,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
/* Free the IRQ lines */
stmmac_free_irq(dev, REQ_IRQ_ERR_ALL, 0);
@@ -6560,7 +6564,7 @@ int stmmac_xdp_open(struct net_device *d
@@ -6558,7 +6562,7 @@ int stmmac_xdp_open(struct net_device *d
/* DMA RX Channel Configuration */
for (chan = 0; chan < rx_cnt; chan++) {
@@ -1161,7 +1161,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
stmmac_init_rx_chan(priv, priv->ioaddr, priv->plat->dma_cfg,
rx_q->dma_rx_phy, chan);
@@ -6578,7 +6582,7 @@ int stmmac_xdp_open(struct net_device *d
@@ -6576,7 +6580,7 @@ int stmmac_xdp_open(struct net_device *d
rx_q->queue_index);
} else {
stmmac_set_dma_bfsize(priv, priv->ioaddr,
@@ -1170,7 +1170,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
rx_q->queue_index);
}
@@ -6587,7 +6591,7 @@ int stmmac_xdp_open(struct net_device *d
@@ -6585,7 +6589,7 @@ int stmmac_xdp_open(struct net_device *d
/* DMA TX Channel Configuration */
for (chan = 0; chan < tx_cnt; chan++) {
@@ -1179,7 +1179,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
stmmac_init_tx_chan(priv, priv->ioaddr, priv->plat->dma_cfg,
tx_q->dma_tx_phy, chan);
@@ -6620,7 +6624,7 @@ int stmmac_xdp_open(struct net_device *d
@@ -6618,7 +6622,7 @@ int stmmac_xdp_open(struct net_device *d
irq_error:
for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++)
@@ -1188,7 +1188,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
stmmac_hw_teardown(dev);
init_error:
@@ -6647,8 +6651,8 @@ int stmmac_xsk_wakeup(struct net_device
@@ -6645,8 +6649,8 @@ int stmmac_xsk_wakeup(struct net_device
queue >= priv->plat->tx_queues_to_use)
return -EINVAL;
@@ -1199,7 +1199,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
ch = &priv->channel[queue];
if (!rx_q->xsk_pool && !tx_q->xsk_pool)
@@ -6908,8 +6912,8 @@ int stmmac_reinit_ringparam(struct net_d
@@ -6906,8 +6910,8 @@ int stmmac_reinit_ringparam(struct net_d
if (netif_running(dev))
stmmac_release(dev);
@@ -1210,7 +1210,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
if (netif_running(dev))
ret = stmmac_open(dev);
@@ -7347,7 +7351,7 @@ int stmmac_suspend(struct device *dev)
@@ -7345,7 +7349,7 @@ int stmmac_suspend(struct device *dev)
stmmac_disable_all_queues(priv);
for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++)
@@ -1219,7 +1219,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
if (priv->eee_enabled) {
priv->tx_path_in_lpi_mode = false;
@@ -7399,7 +7403,7 @@ EXPORT_SYMBOL_GPL(stmmac_suspend);
@@ -7397,7 +7401,7 @@ EXPORT_SYMBOL_GPL(stmmac_suspend);
static void stmmac_reset_rx_queue(struct stmmac_priv *priv, u32 queue)
{
@@ -1228,7 +1228,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
rx_q->cur_rx = 0;
rx_q->dirty_rx = 0;
@@ -7407,7 +7411,7 @@ static void stmmac_reset_rx_queue(struct
@@ -7405,7 +7409,7 @@ static void stmmac_reset_rx_queue(struct
static void stmmac_reset_tx_queue(struct stmmac_priv *priv, u32 queue)
{
@@ -1270,7 +1270,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
if (i >= priv->plat->tx_queues_to_use)
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c
@@ -972,13 +972,13 @@ static int tc_setup_etf(struct stmmac_pr
@@ -973,13 +973,13 @@ static int tc_setup_etf(struct stmmac_pr
return -EOPNOTSUPP;
if (qopt->queue >= priv->plat->tx_queues_to_use)
return -EINVAL;

View File

@@ -860,7 +860,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
stmmac_reset_tx_queue(priv, chan);
stmmac_init_tx_chan(priv, priv->ioaddr, priv->plat->dma_cfg,
tx_q->dma_tx_phy, chan);
@@ -3688,19 +3751,93 @@ static int stmmac_request_irq(struct net
@@ -3689,19 +3752,93 @@ static int stmmac_request_irq(struct net
}
/**
@@ -957,7 +957,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
u32 chan;
int ret;
@@ -3727,45 +3864,10 @@ static int stmmac_open(struct net_device
@@ -3728,45 +3865,10 @@ static int stmmac_open(struct net_device
memset(&priv->xstats, 0, sizeof(struct stmmac_extra_stats));
priv->xstats.threshold = tc;
@@ -1005,7 +1005,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
if (priv->plat->serdes_powerup) {
ret = priv->plat->serdes_powerup(dev, priv->plat->bsp_priv);
@@ -3808,14 +3910,28 @@ irq_error:
@@ -3809,14 +3911,28 @@ irq_error:
stmmac_hw_teardown(dev);
init_error:
@@ -1036,7 +1036,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
static void stmmac_fpe_stop_wq(struct stmmac_priv *priv)
{
set_bit(__FPE_REMOVING, &priv->fpe_task_state);
@@ -3864,7 +3980,7 @@ static int stmmac_release(struct net_dev
@@ -3865,7 +3981,7 @@ static int stmmac_release(struct net_dev
stmmac_stop_all_dma(priv);
/* Release and free the Rx/Tx resources */
@@ -1045,7 +1045,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
/* Disable the MAC Rx/Tx */
stmmac_mac_set(priv, priv->ioaddr, false);
@@ -6387,7 +6503,7 @@ void stmmac_disable_rx_queue(struct stmm
@@ -6385,7 +6501,7 @@ void stmmac_disable_rx_queue(struct stmm
spin_unlock_irqrestore(&ch->lock, flags);
stmmac_stop_rx_dma(priv, queue);
@@ -1054,7 +1054,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
}
void stmmac_enable_rx_queue(struct stmmac_priv *priv, u32 queue)
@@ -6398,21 +6514,21 @@ void stmmac_enable_rx_queue(struct stmma
@@ -6396,21 +6512,21 @@ void stmmac_enable_rx_queue(struct stmma
u32 buf_size;
int ret;
@@ -1080,7 +1080,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
stmmac_init_rx_chan(priv, priv->ioaddr, priv->plat->dma_cfg,
rx_q->dma_rx_phy, rx_q->queue_index);
@@ -6450,7 +6566,7 @@ void stmmac_disable_tx_queue(struct stmm
@@ -6448,7 +6564,7 @@ void stmmac_disable_tx_queue(struct stmm
spin_unlock_irqrestore(&ch->lock, flags);
stmmac_stop_tx_dma(priv, queue);
@@ -1089,7 +1089,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
}
void stmmac_enable_tx_queue(struct stmmac_priv *priv, u32 queue)
@@ -6460,21 +6576,21 @@ void stmmac_enable_tx_queue(struct stmma
@@ -6458,21 +6574,21 @@ void stmmac_enable_tx_queue(struct stmma
unsigned long flags;
int ret;
@@ -1115,7 +1115,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
stmmac_init_tx_chan(priv, priv->ioaddr, priv->plat->dma_cfg,
tx_q->dma_tx_phy, tx_q->queue_index);
@@ -6514,7 +6630,7 @@ void stmmac_xdp_release(struct net_devic
@@ -6512,7 +6628,7 @@ void stmmac_xdp_release(struct net_devic
stmmac_stop_all_dma(priv);
/* Release and free the Rx/Tx resources */
@@ -1124,7 +1124,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
/* Disable the MAC Rx/Tx */
stmmac_mac_set(priv, priv->ioaddr, false);
@@ -6539,14 +6655,14 @@ int stmmac_xdp_open(struct net_device *d
@@ -6537,14 +6653,14 @@ int stmmac_xdp_open(struct net_device *d
u32 chan;
int ret;
@@ -1141,7 +1141,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
if (ret < 0) {
netdev_err(dev, "%s: DMA descriptors initialization failed\n",
__func__);
@@ -6628,7 +6744,7 @@ irq_error:
@@ -6626,7 +6742,7 @@ irq_error:
stmmac_hw_teardown(dev);
init_error:
@@ -1150,7 +1150,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
dma_desc_error:
return ret;
}
@@ -7494,7 +7610,7 @@ int stmmac_resume(struct device *dev)
@@ -7492,7 +7608,7 @@ int stmmac_resume(struct device *dev)
stmmac_reset_queues_param(priv);
stmmac_free_tx_skbufs(priv);

View File

@@ -19,7 +19,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -5629,18 +5629,15 @@ static int stmmac_change_mtu(struct net_
@@ -5627,18 +5627,15 @@ static int stmmac_change_mtu(struct net_
{
struct stmmac_priv *priv = netdev_priv(dev);
int txfifosz = priv->plat->tx_fifo_size;
@@ -40,7 +40,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
if (stmmac_xdp_is_enabled(priv) && new_mtu > ETH_DATA_LEN) {
netdev_dbg(priv->dev, "Jumbo frames not supported for XDP\n");
return -EINVAL;
@@ -5652,8 +5649,29 @@ static int stmmac_change_mtu(struct net_
@@ -5650,8 +5647,29 @@ static int stmmac_change_mtu(struct net_
if ((txfifosz < new_mtu) || (new_mtu > BUF_SIZE_16KiB))
return -EINVAL;

View File

@@ -18,7 +18,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/usb/ipheth.c
+++ b/drivers/net/usb/ipheth.c
@@ -510,8 +510,8 @@ err_register_netdev:
@@ -511,8 +511,8 @@ err_register_netdev:
ipheth_free_urbs(dev);
err_alloc_urbs:
err_get_macaddr:

View File

@@ -19,7 +19,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/usb/ipheth.c
+++ b/drivers/net/usb/ipheth.c
@@ -373,12 +373,10 @@ static netdev_tx_t ipheth_tx(struct sk_b
@@ -374,12 +374,10 @@ static netdev_tx_t ipheth_tx(struct sk_b
}
memcpy(dev->tx_buf, skb->data, skb->len);

View File

@@ -256,7 +256,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
ipheth_rx_submit(dev, GFP_ATOMIC);
}
@@ -310,6 +411,27 @@ static int ipheth_get_macaddr(struct iph
@@ -311,6 +412,27 @@ static int ipheth_get_macaddr(struct iph
return retval;
}
@@ -284,7 +284,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
static int ipheth_rx_submit(struct ipheth_device *dev, gfp_t mem_flags)
{
struct usb_device *udev = dev->udev;
@@ -317,7 +439,7 @@ static int ipheth_rx_submit(struct iphet
@@ -318,7 +440,7 @@ static int ipheth_rx_submit(struct iphet
usb_fill_bulk_urb(dev->rx_urb, udev,
usb_rcvbulkpipe(udev, dev->bulk_in),
@@ -293,7 +293,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
ipheth_rcvbulk_callback,
dev);
dev->rx_urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
@@ -365,7 +487,7 @@ static netdev_tx_t ipheth_tx(struct sk_b
@@ -366,7 +488,7 @@ static netdev_tx_t ipheth_tx(struct sk_b
int retval;
/* Paranoid */
@@ -302,7 +302,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
WARN(1, "%s: skb too large: %d bytes\n", __func__, skb->len);
dev->net->stats.tx_dropped++;
dev_kfree_skb_any(skb);
@@ -448,6 +570,8 @@ static int ipheth_probe(struct usb_inter
@@ -449,6 +571,8 @@ static int ipheth_probe(struct usb_inter
dev->net = netdev;
dev->intf = intf;
dev->confirmed_pairing = false;
@@ -311,7 +311,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
/* Set up endpoints */
hintf = usb_altnum_to_altsetting(intf, IPHETH_ALT_INTFNUM);
if (hintf == NULL) {
@@ -479,6 +603,12 @@ static int ipheth_probe(struct usb_inter
@@ -480,6 +604,12 @@ static int ipheth_probe(struct usb_inter
if (retval)
goto err_get_macaddr;

View File

@@ -17,7 +17,7 @@ Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -2293,6 +2293,23 @@ struct btmtk_section_map {
@@ -2301,6 +2301,23 @@ struct btmtk_section_map {
};
} __packed;
@@ -41,7 +41,7 @@ Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
static void btusb_mtk_wmt_recv(struct urb *urb)
{
struct hci_dev *hdev = urb->context;
@@ -3947,6 +3964,7 @@ static int btusb_probe(struct usb_interf
@@ -3955,6 +3972,7 @@ static int btusb_probe(struct usb_interf
hdev->shutdown = btusb_mtk_shutdown;
hdev->manufacturer = 70;
hdev->cmd_timeout = btusb_mtk_cmd_timeout;

View File

@@ -18,7 +18,7 @@ Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -2298,7 +2298,7 @@ static int btusb_set_bdaddr_mtk(struct h
@@ -2306,7 +2306,7 @@ static int btusb_set_bdaddr_mtk(struct h
struct sk_buff *skb;
long ret;

View File

@@ -44,7 +44,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
--- a/drivers/acpi/bus.c
+++ b/drivers/acpi/bus.c
@@ -785,9 +785,10 @@ static bool acpi_of_modalias(struct acpi
@@ -793,9 +793,10 @@ static bool acpi_of_modalias(struct acpi
* @modalias: Pointer to buffer that modalias value will be copied into
* @len: Length of modalias buffer
*

View File

@@ -0,0 +1,30 @@
From b0fa00fe38f673c986633c11087274deeb7ce7b0 Mon Sep 17 00:00:00 2001
From: Sander Vanheule <sander@svanheule.net>
Date: Tue, 7 Jan 2025 21:16:20 +0100
Subject: [PATCH] gpio: regmap: Use generic request/free ops
Set the gpiochip request and free ops to the generic implementations.
This way a user can provide a gpio-ranges property defined for a pinmux,
easing muxing of gpio functions. Provided that the pin controller
implementents the pinmux op .gpio_request_enable(), pins will
automatically be muxed to their GPIO function when requested.
Signed-off-by: Sander Vanheule <sander@svanheule.net>
Acked-by: Michael Walle <mwalle@kernel.org>
Link: https://lore.kernel.org/r/20250107201621.12467-1-sander@svanheule.net
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
drivers/gpio/gpio-regmap.c | 2 ++
1 file changed, 2 insertions(+)
--- a/drivers/gpio/gpio-regmap.c
+++ b/drivers/gpio/gpio-regmap.c
@@ -263,6 +263,8 @@ struct gpio_regmap *gpio_regmap_register
*/
chip->can_sleep = true;
+ chip->request = gpiochip_generic_request;
+ chip->free = gpiochip_generic_free;
chip->get = gpio_regmap_get;
if (gpio->reg_set_base && gpio->reg_clr_base)
chip->set = gpio_regmap_set_with_clear;

View File

@@ -48,7 +48,7 @@ Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
*
--- a/include/linux/usb/usbnet.h
+++ b/include/linux/usb/usbnet.h
@@ -214,6 +214,7 @@ extern int usbnet_ether_cdc_bind(struct
@@ -229,6 +229,7 @@ extern int usbnet_ether_cdc_bind(struct
extern int usbnet_cdc_bind(struct usbnet *, struct usb_interface *);
extern void usbnet_cdc_unbind(struct usbnet *, struct usb_interface *);
extern void usbnet_cdc_status(struct usbnet *, struct urb *);

View File

@@ -0,0 +1,65 @@
From e2a9fcb36e851adb5b25c4acea53a290fd48a636 Mon Sep 17 00:00:00 2001
From: Robert Marko <robimarko@gmail.com>
Date: Mon, 5 Aug 2024 19:51:02 +0200
Subject: [PATCH] mtd: spinand: winbond: add support for W25N01KV
Add support for Winbond W25N01KV 1Gbit SPI-NAND.
It has 4-bit on-die ECC.
Signed-off-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20240805175125.6658-1-robimarko@gmail.com
---
drivers/mtd/nand/spi/winbond.c | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
--- a/drivers/mtd/nand/spi/winbond.c
+++ b/drivers/mtd/nand/spi/winbond.c
@@ -74,6 +74,18 @@ static int w25m02gv_select_target(struct
return spi_mem_exec_op(spinand->spimem, &op);
}
+static int w25n01kv_ooblayout_ecc(struct mtd_info *mtd, int section,
+ struct mtd_oob_region *region)
+{
+ if (section > 3)
+ return -ERANGE;
+
+ region->offset = 64 + (8 * section);
+ region->length = 7;
+
+ return 0;
+}
+
static int w25n02kv_ooblayout_ecc(struct mtd_info *mtd, int section,
struct mtd_oob_region *region)
{
@@ -98,6 +110,11 @@ static int w25n02kv_ooblayout_free(struc
return 0;
}
+static const struct mtd_ooblayout_ops w25n01kv_ooblayout = {
+ .ecc = w25n01kv_ooblayout_ecc,
+ .free = w25n02kv_ooblayout_free,
+};
+
static const struct mtd_ooblayout_ops w25n02kv_ooblayout = {
.ecc = w25n02kv_ooblayout_ecc,
.free = w25n02kv_ooblayout_free,
@@ -160,6 +177,15 @@ static const struct spinand_info winbond
&update_cache_variants),
0,
SPINAND_ECCINFO(&w25m02gv_ooblayout, NULL)),
+ SPINAND_INFO("W25N01KV",
+ SPINAND_ID(SPINAND_READID_METHOD_OPCODE_DUMMY, 0xae, 0x21),
+ NAND_MEMORG(1, 2048, 96, 64, 1024, 20, 1, 1, 1),
+ NAND_ECCREQ(4, 512),
+ SPINAND_INFO_OP_VARIANTS(&read_cache_variants,
+ &write_cache_variants,
+ &update_cache_variants),
+ 0,
+ SPINAND_ECCINFO(&w25n01kv_ooblayout, w25n02kv_ecc_get_status)),
SPINAND_INFO("W25N02KV",
SPINAND_ID(SPINAND_READID_METHOD_OPCODE_DUMMY, 0xaa, 0x22),
NAND_MEMORG(1, 2048, 128, 64, 2048, 40, 1, 1, 1),

View File

@@ -4829,6 +4829,9 @@ CONFIG_PRINT_STACK_DEPTH=64
# CONFIG_PROC_CHILDREN is not set
CONFIG_PROC_FS=y
# CONFIG_PROC_KCORE is not set
CONFIG_PROC_MEM_ALWAYS_FORCE=y
# CONFIG_PROC_MEM_FORCE_PTRACE is not set
# CONFIG_PROC_MEM_NO_FORCE is not set
# CONFIG_PROC_PAGE_MONITOR is not set
# CONFIG_PROC_STRIPPED is not set
CONFIG_PROC_SYSCTL=y

View File

@@ -19,7 +19,7 @@ Subject: [PATCH] kernel: add block fit partition parser
--- a/block/blk.h
+++ b/block/blk.h
@@ -354,6 +354,8 @@ void blk_free_ext_minor(unsigned int min
@@ -346,6 +346,8 @@ void blk_free_ext_minor(unsigned int min
#define ADDPART_FLAG_NONE 0
#define ADDPART_FLAG_RAID 1
#define ADDPART_FLAG_WHOLEDISK 2
@@ -105,7 +105,7 @@ Subject: [PATCH] kernel: add block fit partition parser
/* everything is up and running, commence */
err = xa_insert(&disk->part_tbl, partno, bdev, GFP_KERNEL);
if (err)
@@ -600,6 +612,11 @@ static bool blk_add_partition(struct gen
@@ -602,6 +614,11 @@ static bool blk_add_partition(struct gen
(state->parts[p].flags & ADDPART_FLAG_RAID))
md_autodetect_dev(part->bd_dev);

View File

@@ -195,20 +195,37 @@ Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
return connmark_tg_shift(skb, info);
}
@@ -167,6 +194,16 @@ static struct xt_target connmark_tg_reg[
.targetsize = sizeof(struct xt_connmark_tginfo2),
@@ -168,6 +195,16 @@ static struct xt_target connmark_tg_reg[
.destroy = connmark_tg_destroy,
.me = THIS_MODULE,
+ },
},
+ {
+ .name = "CONNMARK",
+ .revision = 3,
+ .family = NFPROTO_UNSPEC,
+ .family = NFPROTO_IPV4,
+ .checkentry = connmark_tg_check,
+ .target = connmark_tg_v3,
+ .targetsize = sizeof(struct xt_connmark_tginfo3),
+ .destroy = connmark_tg_destroy,
+ .me = THIS_MODULE,
}
+ },
#if IS_ENABLED(CONFIG_IP6_NF_IPTABLES)
{
.name = "CONNMARK",
@@ -189,6 +226,16 @@ static struct xt_target connmark_tg_reg[
.destroy = connmark_tg_destroy,
.me = THIS_MODULE,
},
+ {
+ .name = "CONNMARK",
+ .revision = 3,
+ .family = NFPROTO_IPV6,
+ .checkentry = connmark_tg_check,
+ .target = connmark_tg_v3,
+ .targetsize = sizeof(struct xt_connmark_tginfo3),
+ .destroy = connmark_tg_destroy,
+ .me = THIS_MODULE,
+ },
#endif
};

View File

@@ -71,7 +71,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
*/
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -2872,6 +2872,10 @@ static inline int pskb_trim(struct sk_bu
@@ -2867,6 +2867,10 @@ static inline int pskb_trim(struct sk_bu
return (len < skb->len) ? __pskb_trim(skb, len) : 0;
}
@@ -82,7 +82,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
/**
* pskb_trim_unique - remove end from a paged unique (not cloned) buffer
* @skb: buffer to alter
@@ -3022,16 +3026,6 @@ static inline struct sk_buff *dev_alloc_
@@ -3017,16 +3021,6 @@ static inline struct sk_buff *dev_alloc_
}

Some files were not shown because too many files have changed in this diff Show More