Merge Official Source

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
Tianling Shen 2024-01-20 13:01:37 +08:00
commit 3db6161c85
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
66 changed files with 643 additions and 118 deletions

View File

@ -293,6 +293,8 @@ menu "Global build settings"
bool "Regular"
config PKG_CC_STACKPROTECTOR_STRONG
bool "Strong"
config PKG_CC_STACKPROTECTOR_ALL
bool "All"
endchoice
choice

View File

@ -36,6 +36,11 @@ ifdef CONFIG_PKG_CC_STACKPROTECTOR_STRONG
TARGET_CFLAGS += -fstack-protector-strong
endif
endif
ifdef CONFIG_PKG_CC_STACKPROTECTOR_ALL
ifeq ($(strip $(PKG_SSP)),1)
TARGET_CFLAGS += -fstack-protector-all
endif
endif
ifdef CONFIG_PKG_FORTIFY_SOURCE_1
ifeq ($(strip $(PKG_FORTIFY_SOURCE)),1)
TARGET_CFLAGS += -D_FORTIFY_SOURCE=1

View File

@ -1,2 +1,2 @@
LINUX_VERSION-5.15 = .146
LINUX_KERNEL_HASH-5.15.146 = 5a807a5fa2a80ada957d8079681dfb5cc196ec26f43244d1c8a4fd7af592d192
LINUX_VERSION-5.15 = .147
LINUX_KERNEL_HASH-5.15.147 = 56c1e65625d201db431efda7a3816e7b424071e7cb0245b2ba594d15b1fdfcd4

View File

@ -1,2 +1,2 @@
LINUX_VERSION-6.1 = .71
LINUX_KERNEL_HASH-6.1.71 = 2df774dd53f9ffd4e57ebf804cf597709295df6a304fe261d25220a134b7f041
LINUX_VERSION-6.1 = .73
LINUX_KERNEL_HASH-6.1.73 = 6cad48706bf1cde342613dca2a2cd6dd4f79f88f9e4d356263564e4b2a5d7e87

View File

@ -103,6 +103,11 @@ livinet,zr-3020|\
livinet,zr-3020-ubootmod)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000" "1"
;;
jdcloud,re-cp-03)
local envdev=$(find_mmc_part "ubootenv" "mmcblk0")
ubootenv_add_uci_config "$envdev" "0x0" "0x40000" "0x40000" "1"
ubootenv_add_uci_config "$envdev" "0x40000" "0x40000" "0x40000" "1"
;;
mercusys,mr90x-v1|\
routerich,ax3000)
local envdev=/dev/mtd$(find_mtd_index "u-boot-env")

View File

@ -115,7 +115,7 @@
+CONFIG_LMB_MAX_REGIONS=64
--- /dev/null
+++ b/arch/arm/dts/mt7986a-jdcloud_re-cp-03.dts
@@ -0,0 +1,145 @@
@@ -0,0 +1,148 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+/dts-v1/;
@ -161,16 +161,19 @@
+ led-0 {
+ label = "blue:status";
+ gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
+ default-state = "off";
+ };
+
+ red_led: led-1 {
+ led-1 {
+ label = "red:status";
+ gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
+ default-state = "on";
+ };
+
+ green_led: led-2 {
+ led-2 {
+ label = "green:status";
+ gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
+ default-state = "off";
+ };
+ };
+

View File

@ -8,9 +8,9 @@ PKG_LICENSE_FILES:=
PKG_SOURCE_URL:=https://github.com/openwrt/mt76
PKG_SOURCE_PROTO:=git
PKG_SOURCE_DATE:=2023-12-18
PKG_SOURCE_VERSION:=bebd9cffc2aeb2cecb40aadbb8c6eab3bdf7971b
PKG_MIRROR_HASH:=580261755bc3f251b8bc5f7f610274693c067432187570694d2f2ccab0edb62b
PKG_SOURCE_DATE:=2024-01-18
PKG_SOURCE_VERSION:=f77188160441d5f77f08dd517632ae3f60c653b0
PKG_MIRROR_HASH:=133a5e44624fe1933c893ee0b8ac75a847753f3490c26518c2ed9798f9ef53e0
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
PKG_USE_NINJA:=0

View File

@ -0,0 +1,25 @@
From 7a733993211ad46cf3032038c1e7e6bdc2322336 Mon Sep 17 00:00:00 2001
From: Michael-CY Lee <michael-cy.lee@mediatek.com>
Date: Tue, 5 Sep 2023 09:43:25 +0800
Subject: [PATCH] ACS: Fix typo in bw_40 frequency array
The range for the 5 GHz channel 118 was encoded with an incorrect
channel number.
Fixes: ed8e13decc71 (ACS: Extract bw40/80/160 freqs out of acs_usable_bwXXX_chan())
Signed-off-by: Michael Lee <michael-cy.lee@mediatek.com>
---
src/ap/acs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/src/ap/acs.c
+++ b/src/ap/acs.c
@@ -256,7 +256,7 @@ struct bw_item {
static const struct bw_item bw_40[] = {
{ 5180, 5200, 38 }, { 5220, 5240, 46 }, { 5260, 5280, 54 },
{ 5300, 5320, 62 }, { 5500, 5520, 102 }, { 5540, 5560, 110 },
- { 5580, 5600, 110 }, { 5620, 5640, 126}, { 5660, 5680, 134 },
+ { 5580, 5600, 118 }, { 5620, 5640, 126 }, { 5660, 5680, 134 },
{ 5700, 5720, 142 }, { 5745, 5765, 151 }, { 5785, 5805, 159 },
{ 5825, 5845, 167 }, { 5865, 5885, 175 },
{ 5955, 5975, 3 }, { 5995, 6015, 11 }, { 6035, 6055, 19 },

View File

@ -5,9 +5,9 @@ PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(PROJECT_GIT)/project/ubox.git
PKG_SOURCE_DATE:=2023-11-30
PKG_SOURCE_VERSION:=c08709cceb554cba02c935d1442f6a042fe6b2a8
PKG_MIRROR_HASH:=719ae701546df7c5972352d778a980cbc9f48623dda86443398698837124818b
PKG_SOURCE_DATE:=2024-01-15
PKG_SOURCE_VERSION:=c006dccecb6f1cf694c9fb9efc6727cbd2ab9ae4
PKG_MIRROR_HASH:=7919d8d6f06fa50342eec805902d17c61d1224d9d35c392d3c5c36fc782a5c75
CMAKE_INSTALL:=1
PKG_LICENSE:=GPL-2.0

View File

@ -0,0 +1,64 @@
# SPDX-License-Identifier: GPL-2.0-only
include $(TOPDIR)/rules.mk
PKG_NAME:=bcm27xx-utils
PKG_VERSION:=2024-01-18
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/raspberrypi/utils.git
PKG_SOURCE_VERSION:=e65f5ec102e74218cda7da9fdc8b1caa0fd1127d
PKG_MIRROR_HASH:=14f4aa1a8115240d702251bc399b53cbfa0928813f70a73ca27b22da94b696d2
PKG_FLAGS:=nonshared
PKG_BUILD_FLAGS:=no-lto
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENCE
CMAKE_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
define Package/bcm27xx-utils
SECTION:=utils
CATEGORY:=Utilities
DEPENDS:=@TARGET_bcm27xx +libfdt
TITLE:=BCM27xx scripts and simple applications
PROVIDES:=bcm27xx-userland
endef
define Package/bcm27xx-utils/description
BCM27xx scripts and simple applications.
Replaces bcm27xx-userland scripts and applications.
endef
define Package/bcm27xx-utils/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dtmerge $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dtoverlay $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dtparam $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/eepdump $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/eepflash.sh $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/eepmake $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/otpset $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/overlaycheck $(1)/usr/bin
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/bin/overlaycheck_exclusions.txt $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ovmerge $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/pinctrl $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/raspinfo $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vcgencmd $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vclog $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vcmailbox $(1)/usr/bin
endef
$(eval $(call BuildPackage,bcm27xx-utils))

View File

@ -0,0 +1,255 @@
From 0db3fb3119eda8c2360454c2a01f84602a879c38 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= <noltari@gmail.com>
Date: Tue, 16 Jan 2024 15:32:12 +0100
Subject: [PATCH] raspinfo: adapt to OpenWrt
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
---
raspinfo/raspinfo | 186 ++++------------------------------------------
1 file changed, 13 insertions(+), 173 deletions(-)
--- a/raspinfo/raspinfo
+++ b/raspinfo/raspinfo
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
# Some of the regex's used in sed
# Catch basic IP6 address "s/\([0-9a-fA-F]\{1,4\}:\)\{7,7\}[0-9a-fA-F]\{1,4\}/y.y.y.y.y.y.y.y/g"
@@ -6,147 +6,6 @@
# IP4 d.d.d.d decimal "s/\([0-9]\{1,3\}\.\)\{3,3\}[0-9]\{1,3\}/x.x.x.x/g"
# mac address "s/\([0-9a-fA-F]\{2,2\}\:\)\{5,5\}[0-9a-fA-F]\{2,2\}/m.m.m.m/g"
-
-display_info_drm() {
- # If running X then can use xrandr, otherwise
- # dump the /sys/class entries for the displays
- if command -v xrandr > /dev/null &&
- DISPLAY=${DISPLAY:-:0} xrandr --listmonitors &>/dev/null;
- then
- echo "Running (F)KMS and X"
- echo
-
- DISPLAY=${DISPLAY:-:0} xrandr --verbose
- else
- echo "Running (F)KMS, console"
- echo
-
- for card in /sys/class/drm/card[0-9]-*;
- do
- echo $card
-
- # if kmsprint isn't installed print basic mode info
- if ! command -v kmsprint > /dev/null; then
- if [ -f $card/modes ];
- then
- cat $card/modes
- else
- echo "No modes found"
- fi
- fi
-
- if [ -f $card/edid ];
- then
- base64 $card/edid
- else
- echo "No EDID found"
- fi
- echo
- done
- fi
-
- # kmsprint is more useful, but not always installed
- echo
- if command -v kmsprint > /dev/null; then
- kmsprint
- echo
- kmsprint -m
- else
- echo "kmsprint is not installed. Install with: sudo apt install kms++-utils"
- fi
-
- echo
-
- # dump the /sys/class entries for the displays
- cardfound=0
- for card in `seq 0 9`;
- do
- if sudo test -f "/sys/kernel/debug/dri/${card}/state";
- then
- for hdmi in 0 1;
- do
- if sudo test -f "/sys/kernel/debug/dri/${card}/hdmi${hdmi}_regs";
- then
- echo "HDMI${hdmi}: $(sudo cat /sys/kernel/debug/dri/$card/hdmi${hdmi}_regs | grep HOTPLUG)"
- fi
- done
- echo
- echo "/sys/kernel/debug/dri/$card/state:"
- sudo cat "/sys/kernel/debug/dri/$card/state"
- echo
- cardfound=1
- fi
- done
- if [ "$cardfound" == "0" ];
- then
- echo "kms state not found"
- fi
- echo
-
-}
-
-display_info_legacy() {
- # Legacy mode
- echo "Running Legacy framebuffer"
- echo
-
- for card in `seq 0 9`;
- do
- F="/dev/fb${card}"
- if test -e $F;
- then
- echo Framebuffer: $F
- fbset -s -fb $F
- fi
- done
-
- disps=`tvservice -l | awk '/Display Number/{print substr($3,1,1)}'`
-
- tmp=$(mktemp)
-
- for display in $disps
- do
- echo
- echo "Display: " $display
-
- tvservice -v $display -s
- tvservice -v $display -n
- tvservice -v $display -m CEA
- tvservice -v $display -m DMT
-
- echo
- tvservice -v $display -d $tmp > /dev/null
- base64 $tmp
- done
-
- rm $tmp
-}
-
-display_info() {
- # Check if we are running a KMS/DRM system
-
- if [ -d "/dev/dri" ];
- then
- display_info_drm
- else
- display_info_legacy
- fi
-}
-
-audio_info() {
- aplay -l
- echo
- aplay -L
- echo
- systemctl --user status pipewire.socket pipewire.service pulseaudio.service pulseaudio.socket
- echo
- if command -v pactl > /dev/null; then
- pactl info
- else
- echo pactl not installed
- fi
-}
-
OUT=raspinfo.txt
rm -f $OUT
@@ -163,8 +22,6 @@ echo
cat /etc/os-release | head -4
echo
-cat /etc/rpi-issue
-echo
uname -a
cat /proc/cpuinfo | tail -3
@@ -190,17 +47,6 @@ echo
cat /proc/swaps
echo
-echo "Package version information"
-echo "---------------------------"
-
-apt-cache policy raspberrypi-ui-mods | head -2
-apt-cache policy raspberrypi-sys-mods | head -2
-apt-cache policy openbox | head -2
-apt-cache policy lxpanel | head -2
-apt-cache policy pcmanfm | head -2
-apt-cache policy rpd-plym-splash | head -2
-
-echo
echo "Networking Information"
echo "----------------------"
echo
@@ -212,21 +58,11 @@ echo "USB Information"
echo "---------------"
echo
-lsusb -t
-
-echo
-echo "Display Information"
-echo "-------------------"
-echo
-
-display_info
-
-echo
-echo "Audio Information"
-echo "-------------------"
-echo
-
-audio_info
+if command -v lsusb > /dev/null; then
+ lsusb -t
+else
+ echo usbutils not installed
+fi
echo
echo "config.txt"
@@ -250,7 +86,7 @@ echo "-----------------"
echo
if command -v pinctrl > /dev/null; then
- sudo pinctrl 2>&1
+ pinctrl 2>&1
elif command -v raspi-gpio > /dev/null; then
raspi-gpio get 2>&1
else
@@ -263,9 +99,9 @@ echo "------------------"
echo
if command -v vcdbg > /dev/null; then
- sudo vcdbg log msg 2>&1
+ vcdbg log msg 2>&1
elif command -v vclog > /dev/null; then
- sudo vclog --msg 2>&1
+ vclog --msg 2>&1
else
echo "vcdbg not found"
fi
@@ -284,5 +120,9 @@ echo
echo "EEPROM"
echo "------"
echo
-sudo rpi-eeprom-update
+if command -v rpi-eeprom-update > /dev/null; then
+ rpi-eeprom-update
+else
+ echo bcm27xx-eeprom not installed
+fi
fi

View File

@ -22,7 +22,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
--- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
+++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
@@ -3611,7 +3611,7 @@ static int dpaa2_eth_setup_dpni(struct f
@@ -3614,7 +3614,7 @@ static int dpaa2_eth_setup_dpni(struct f
dev_err(dev, "DPNI version %u.%u not supported, need >= %u.%u\n",
priv->dpni_ver_major, priv->dpni_ver_minor,
DPNI_VER_MAJOR, DPNI_VER_MINOR);

View File

@ -21,7 +21,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
--- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
+++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
@@ -2080,10 +2080,8 @@ static int dpaa2_eth_open(struct net_dev
@@ -2083,10 +2083,8 @@ static int dpaa2_eth_open(struct net_dev
goto enable_err;
}
@ -33,7 +33,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
return 0;
@@ -2157,7 +2155,6 @@ static int dpaa2_eth_stop(struct net_dev
@@ -2160,7 +2158,6 @@ static int dpaa2_eth_stop(struct net_dev
int retries = 10;
if (dpaa2_eth_is_type_phy(priv)) {

View File

@ -49,7 +49,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
--- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
+++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
@@ -4441,9 +4441,8 @@ static int dpaa2_eth_connect_mac(struct
@@ -4444,9 +4444,8 @@ static int dpaa2_eth_connect_mac(struct
err = dpaa2_mac_open(mac);
if (err)
goto err_free_mac;
@ -60,7 +60,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
err = dpaa2_mac_connect(mac);
if (err && err != -EPROBE_DEFER)
netdev_err(priv->net_dev, "Error connecting to the MAC endpoint: %pe",
@@ -4452,11 +4451,12 @@ static int dpaa2_eth_connect_mac(struct
@@ -4455,11 +4454,12 @@ static int dpaa2_eth_connect_mac(struct
goto err_close_mac;
}
@ -74,7 +74,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
err_free_mac:
kfree(mac);
return err;
@@ -4464,15 +4464,18 @@ err_free_mac:
@@ -4467,15 +4467,18 @@ err_free_mac:
static void dpaa2_eth_disconnect_mac(struct dpaa2_eth_priv *priv)
{

View File

@ -33,7 +33,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
--- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
+++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
@@ -4708,6 +4708,10 @@ static int dpaa2_eth_probe(struct fsl_mc
@@ -4711,6 +4711,10 @@ static int dpaa2_eth_probe(struct fsl_mc
}
#endif
@ -44,7 +44,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
err = dpaa2_eth_setup_irqs(dpni_dev);
if (err) {
netdev_warn(net_dev, "Failed to set link interrupt, fall back to polling\n");
@@ -4720,10 +4724,6 @@ static int dpaa2_eth_probe(struct fsl_mc
@@ -4723,10 +4727,6 @@ static int dpaa2_eth_probe(struct fsl_mc
priv->do_link_poll = true;
}
@ -55,7 +55,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
err = dpaa2_eth_dl_alloc(priv);
if (err)
goto err_dl_register;
@@ -4759,13 +4759,13 @@ err_dl_port_add:
@@ -4762,13 +4762,13 @@ err_dl_port_add:
err_dl_trap_register:
dpaa2_eth_dl_free(priv);
err_dl_register:
@ -71,7 +71,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
dpaa2_eth_free_rings(priv);
err_alloc_rings:
err_csum:
@@ -4813,9 +4813,6 @@ static int dpaa2_eth_remove(struct fsl_m
@@ -4816,9 +4816,6 @@ static int dpaa2_eth_remove(struct fsl_m
#endif
unregister_netdev(net_dev);
@ -81,7 +81,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
dpaa2_eth_dl_port_del(priv);
dpaa2_eth_dl_traps_unregister(priv);
@@ -4826,6 +4823,9 @@ static int dpaa2_eth_remove(struct fsl_m
@@ -4829,6 +4826,9 @@ static int dpaa2_eth_remove(struct fsl_m
else
fsl_mc_free_irqs(ls_dev);

View File

@ -41,7 +41,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
--- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
+++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
@@ -2018,8 +2018,11 @@ static int dpaa2_eth_link_state_update(s
@@ -2021,8 +2021,11 @@ static int dpaa2_eth_link_state_update(s
/* When we manage the MAC/PHY using phylink there is no need
* to manually update the netif_carrier.
@ -54,7 +54,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
goto out;
/* Chech link state; speed / duplex changes are not treated yet */
@@ -2058,6 +2061,8 @@ static int dpaa2_eth_open(struct net_dev
@@ -2061,6 +2064,8 @@ static int dpaa2_eth_open(struct net_dev
priv->dpbp_dev->obj_desc.id, priv->bpid);
}
@ -63,7 +63,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
if (!dpaa2_eth_is_type_phy(priv)) {
/* We'll only start the txqs when the link is actually ready;
* make sure we don't race against the link up notification,
@@ -2076,6 +2081,7 @@ static int dpaa2_eth_open(struct net_dev
@@ -2079,6 +2084,7 @@ static int dpaa2_eth_open(struct net_dev
err = dpni_enable(priv->mc_io, 0, priv->mc_token);
if (err < 0) {
@ -71,7 +71,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
netdev_err(net_dev, "dpni_enable() failed\n");
goto enable_err;
}
@@ -2083,6 +2089,8 @@ static int dpaa2_eth_open(struct net_dev
@@ -2086,6 +2092,8 @@ static int dpaa2_eth_open(struct net_dev
if (dpaa2_eth_is_type_phy(priv))
dpaa2_mac_start(priv->mac);
@ -80,7 +80,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
return 0;
enable_err:
@@ -2154,6 +2162,8 @@ static int dpaa2_eth_stop(struct net_dev
@@ -2157,6 +2165,8 @@ static int dpaa2_eth_stop(struct net_dev
int dpni_enabled = 0;
int retries = 10;
@ -89,7 +89,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
if (dpaa2_eth_is_type_phy(priv)) {
dpaa2_mac_stop(priv->mac);
} else {
@@ -2161,6 +2171,8 @@ static int dpaa2_eth_stop(struct net_dev
@@ -2164,6 +2174,8 @@ static int dpaa2_eth_stop(struct net_dev
netif_carrier_off(net_dev);
}
@ -98,7 +98,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
/* On dpni_disable(), the MC firmware will:
* - stop MAC Rx and wait for all Rx frames to be enqueued to software
* - cut off WRIOP dequeues from egress FQs and wait until transmission
@@ -2486,12 +2498,20 @@ static int dpaa2_eth_ts_ioctl(struct net
@@ -2489,12 +2501,20 @@ static int dpaa2_eth_ts_ioctl(struct net
static int dpaa2_eth_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
{
struct dpaa2_eth_priv *priv = netdev_priv(dev);
@ -121,7 +121,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
return -EOPNOTSUPP;
}
@@ -4451,7 +4471,9 @@ static int dpaa2_eth_connect_mac(struct
@@ -4454,7 +4474,9 @@ static int dpaa2_eth_connect_mac(struct
goto err_close_mac;
}
@ -131,7 +131,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
return 0;
@@ -4464,9 +4486,12 @@ err_free_mac:
@@ -4467,9 +4489,12 @@ err_free_mac:
static void dpaa2_eth_disconnect_mac(struct dpaa2_eth_priv *priv)
{
@ -145,7 +145,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
if (!mac)
return;
@@ -4485,6 +4510,7 @@ static irqreturn_t dpni_irq0_handler_thr
@@ -4488,6 +4513,7 @@ static irqreturn_t dpni_irq0_handler_thr
struct fsl_mc_device *dpni_dev = to_fsl_mc_device(dev);
struct net_device *net_dev = dev_get_drvdata(dev);
struct dpaa2_eth_priv *priv = netdev_priv(net_dev);
@ -153,7 +153,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
int err;
err = dpni_get_irq_status(dpni_dev->mc_io, 0, dpni_dev->mc_handle,
@@ -4502,7 +4528,12 @@ static irqreturn_t dpni_irq0_handler_thr
@@ -4505,7 +4531,12 @@ static irqreturn_t dpni_irq0_handler_thr
dpaa2_eth_update_tx_fqids(priv);
rtnl_lock();
@ -167,7 +167,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
dpaa2_eth_disconnect_mac(priv);
else
dpaa2_eth_connect_mac(priv);
@@ -4603,6 +4634,8 @@ static int dpaa2_eth_probe(struct fsl_mc
@@ -4606,6 +4637,8 @@ static int dpaa2_eth_probe(struct fsl_mc
priv = netdev_priv(net_dev);
priv->net_dev = net_dev;
@ -305,7 +305,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
if (pause->autoneg)
return -EOPNOTSUPP;
@@ -309,8 +341,12 @@ static void dpaa2_eth_get_ethtool_stats(
@@ -307,8 +339,12 @@ static void dpaa2_eth_get_ethtool_stats(
}
*(data + i++) = buf_cnt;

View File

@ -34,7 +34,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
--- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
+++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
@@ -4527,7 +4527,6 @@ static irqreturn_t dpni_irq0_handler_thr
@@ -4530,7 +4530,6 @@ static irqreturn_t dpni_irq0_handler_thr
dpaa2_eth_set_mac_addr(netdev_priv(net_dev));
dpaa2_eth_update_tx_fqids(priv);
@ -42,7 +42,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
/* We can avoid locking because the "endpoint changed" IRQ
* handler is the only one who changes priv->mac at runtime,
* so we are not racing with anyone.
@@ -4537,7 +4536,6 @@ static irqreturn_t dpni_irq0_handler_thr
@@ -4540,7 +4539,6 @@ static irqreturn_t dpni_irq0_handler_thr
dpaa2_eth_disconnect_mac(priv);
else
dpaa2_eth_connect_mac(priv);
@ -50,7 +50,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
}
return IRQ_HANDLED;
@@ -4856,9 +4854,7 @@ static int dpaa2_eth_remove(struct fsl_m
@@ -4859,9 +4857,7 @@ static int dpaa2_eth_remove(struct fsl_m
else
fsl_mc_free_irqs(ls_dev);

View File

@ -336,7 +336,7 @@ SVN-Revision: 35130
#endif /* _LINUX_TYPES_H */
--- a/net/ipv4/af_inet.c
+++ b/net/ipv4/af_inet.c
@@ -1494,8 +1494,8 @@ struct sk_buff *inet_gro_receive(struct
@@ -1512,8 +1512,8 @@ struct sk_buff *inet_gro_receive(struct
if (unlikely(ip_fast_csum((u8 *)iph, 5)))
goto out;

View File

@ -4,7 +4,7 @@
################################################################################
# For overclocking and various other settings, see:
# https://www.raspberrypi.org/documentation/configuration/config-txt/README.md
# https://www.raspberrypi.com/documentation/computers/config_txt.html
################################################################################
# OpenWrt config

View File

@ -5,7 +5,7 @@
# Restore PL011 (ttyAMA0) to GPIOs 14 & 15, instead of Mini UART (ttyS0).
# Mini UART is disabled by default unless "enable_uart=1" is specified,
# which changes the core frequency to a fixed value and impacts performance.
# See https://www.raspberrypi.org/documentation/configuration/uart.md
# See https://www.raspberrypi.com/documentation/computers/configuration.html#mini-uart-and-cpu-core-frequency
[pi0w]
dtoverlay=disable-bt
[pi3]

View File

@ -266,7 +266,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
static inline int mmc_blk_part_switch(struct mmc_card *card,
unsigned int part_type);
static void mmc_blk_rw_rq_prep(struct mmc_queue_req *mqrq,
@@ -2998,6 +3005,8 @@ static int mmc_blk_probe(struct mmc_card
@@ -3000,6 +3007,8 @@ static int mmc_blk_probe(struct mmc_card
{
struct mmc_blk_data *md;
int ret = 0;
@ -275,7 +275,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
/*
* Check that the card supports the command class(es) we need.
@@ -3005,7 +3014,16 @@ static int mmc_blk_probe(struct mmc_card
@@ -3007,7 +3016,16 @@ static int mmc_blk_probe(struct mmc_card
if (!(card->csd.cmdclass & CCC_BLOCK_READ))
return -ENODEV;
@ -293,7 +293,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
card->complete_wq = alloc_workqueue("mmc_complete",
WQ_MEM_RECLAIM | WQ_HIGHPRI, 0);
@@ -3020,6 +3038,17 @@ static int mmc_blk_probe(struct mmc_card
@@ -3022,6 +3040,17 @@ static int mmc_blk_probe(struct mmc_card
goto out_free;
}

View File

@ -18,7 +18,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
--- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c
+++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
@@ -2657,7 +2657,7 @@ static void bcmgenet_init_tx_ring(struct
@@ -2659,7 +2659,7 @@ static void bcmgenet_init_tx_ring(struct
bcmgenet_tdma_ring_writel(priv, index, 0, TDMA_PROD_INDEX);
bcmgenet_tdma_ring_writel(priv, index, 0, TDMA_CONS_INDEX);
@ -27,7 +27,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
/* Disable rate control for now */
bcmgenet_tdma_ring_writel(priv, index, flow_period_val,
TDMA_FLOW_PERIOD);
@@ -4138,9 +4138,12 @@ static int bcmgenet_probe(struct platfor
@@ -4140,9 +4140,12 @@ static int bcmgenet_probe(struct platfor
netif_set_real_num_rx_queues(priv->dev, priv->hw_params->rx_queues + 1);
/* Set default coalescing parameters */

View File

@ -37,7 +37,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
static inline void bcmgenet_writel(u32 value, void __iomem *offset)
{
@@ -2488,6 +2491,11 @@ static void reset_umac(struct bcmgenet_p
@@ -2490,6 +2493,11 @@ static void reset_umac(struct bcmgenet_p
bcmgenet_rbuf_ctrl_set(priv, 0);
udelay(10);

View File

@ -343,7 +343,7 @@ Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
+...
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -19279,6 +19279,14 @@ T: git git://linuxtv.org/media_tree.git
@@ -19281,6 +19281,14 @@ T: git git://linuxtv.org/media_tree.git
F: Documentation/devicetree/bindings/media/i2c/sony,imx412.yaml
F: drivers/media/i2c/imx412.c

View File

@ -177,7 +177,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
+...
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -19287,6 +19287,14 @@ T: git git://linuxtv.org/media_tree.git
@@ -19289,6 +19289,14 @@ T: git git://linuxtv.org/media_tree.git
F: Documentation/devicetree/bindings/media/i2c/imx477.yaml
F: drivers/media/i2c/imx477.c

View File

@ -132,7 +132,7 @@ Signed-off-by: David Plowman <david.plowman@raspberrypi.com>
+...
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -19284,6 +19284,7 @@ M: Raspberry Pi Kernel Maintenance <kern
@@ -19286,6 +19286,7 @@ M: Raspberry Pi Kernel Maintenance <kern
L: linux-media@vger.kernel.org
S: Maintained
T: git git://linuxtv.org/media_tree.git

View File

@ -24,7 +24,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
--- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c
+++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
@@ -3304,7 +3304,7 @@ static void bcmgenet_get_hw_addr(struct
@@ -3306,7 +3306,7 @@ static void bcmgenet_get_hw_addr(struct
}
/* Returns a reusable dma control register value */
@ -33,7 +33,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
{
unsigned int i;
u32 reg;
@@ -3329,6 +3329,14 @@ static u32 bcmgenet_dma_disable(struct b
@@ -3331,6 +3331,14 @@ static u32 bcmgenet_dma_disable(struct b
udelay(10);
bcmgenet_umac_writel(priv, 0, UMAC_TX_FLUSH);
@ -48,7 +48,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
return dma_ctrl;
}
@@ -3392,8 +3400,8 @@ static int bcmgenet_open(struct net_devi
@@ -3394,8 +3402,8 @@ static int bcmgenet_open(struct net_devi
bcmgenet_set_hw_addr(priv, dev->dev_addr);
@ -59,7 +59,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
/* Reinitialize TDMA and RDMA and SW housekeeping */
ret = bcmgenet_init_dma(priv);
@@ -4267,7 +4275,7 @@ static int bcmgenet_resume(struct device
@@ -4269,7 +4277,7 @@ static int bcmgenet_resume(struct device
bcmgenet_hfb_create_rxnfc_filter(priv, rule);
/* Disable RX/TX DMA and flush TX queues */

View File

@ -23,7 +23,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
--- a/drivers/mmc/core/block.c
+++ b/drivers/mmc/core/block.c
@@ -1928,7 +1928,7 @@ static void mmc_blk_mq_rw_recovery(struc
@@ -1930,7 +1930,7 @@ static void mmc_blk_mq_rw_recovery(struc
return;
}

View File

@ -26,7 +26,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
static inline void bcmgenet_writel(u32 value, void __iomem *offset)
{
@@ -3438,6 +3441,17 @@ static int bcmgenet_open(struct net_devi
@@ -3440,6 +3443,17 @@ static int bcmgenet_open(struct net_devi
bcmgenet_phy_pause_set(dev, priv->rx_pause, priv->tx_pause);

View File

@ -138,7 +138,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
+...
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -19328,6 +19328,14 @@ T: git git://linuxtv.org/media_tree.git
@@ -19330,6 +19330,14 @@ T: git git://linuxtv.org/media_tree.git
F: Documentation/devicetree/bindings/media/i2c/imx519.yaml
F: drivers/media/i2c/imx519.c

View File

@ -128,7 +128,7 @@ Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
+...
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -19270,6 +19270,14 @@ T: git git://linuxtv.org/media_tree.git
@@ -19272,6 +19272,14 @@ T: git git://linuxtv.org/media_tree.git
F: Documentation/devicetree/bindings/media/i2c/imx290.txt
F: drivers/media/i2c/imx290.c

View File

@ -23,7 +23,7 @@ Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -19277,6 +19277,7 @@ L: linux-media@vger.kernel.org
@@ -19279,6 +19279,7 @@ L: linux-media@vger.kernel.org
S: Maintained
T: git git://linuxtv.org/media_tree.git
F: Documentation/devicetree/bindings/media/i2c/sony,imx296.yaml

View File

@ -219,7 +219,7 @@ Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
+...
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -19267,7 +19267,7 @@ M: Manivannan Sadhasivam <manivannan.sad
@@ -19269,7 +19269,7 @@ M: Manivannan Sadhasivam <manivannan.sad
L: linux-media@vger.kernel.org
S: Maintained
T: git git://linuxtv.org/media_tree.git

View File

@ -271,7 +271,7 @@ Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
+...
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -19342,7 +19342,7 @@ M: Raspberry Pi Kernel Maintenance <kern
@@ -19344,7 +19344,7 @@ M: Raspberry Pi Kernel Maintenance <kern
L: linux-media@vger.kernel.org
S: Maintained
T: git git://linuxtv.org/media_tree.git

View File

@ -183,7 +183,7 @@
#address-cells = <1>;
#size-cells = <1>;
cferom: partition@0 {
partition@0 {
label = "cferom";
reg = <0x0000000 0x0020000>;
read-only;

View File

@ -166,7 +166,7 @@
#address-cells = <1>;
#size-cells = <1>;
cferom: partition@0 {
partition@0 {
label = "cferom";
reg = <0x0000000 0x0020000>;
read-only;

View File

@ -191,7 +191,7 @@
#address-cells = <1>;
#size-cells = <1>;
cferom: partition@0 {
partition@0 {
label = "cferom";
reg = <0x0000000 0x0020000>;
read-only;

View File

@ -181,7 +181,7 @@
#address-cells = <1>;
#size-cells = <1>;
cferom: partition@0 {
partition@0 {
label = "cferom";
reg = <0x0000000 0x0020000>;
read-only;

View File

@ -187,7 +187,7 @@
#address-cells = <1>;
#size-cells = <1>;
cferom: partition@0 {
partition@0 {
label = "cferom";
reg = <0x0000000 0x0020000>;
read-only;

View File

@ -160,7 +160,7 @@
#address-cells = <1>;
#size-cells = <1>;
cferom: partition@0 {
partition@0 {
label = "cferom";
reg = <0x0000000 0x0020000>;
read-only;

View File

@ -212,7 +212,7 @@
#address-cells = <1>;
#size-cells = <1>;
cferom: partition@0 {
partition@0 {
label = "cferom";
reg = <0x0000000 0x0004000>;
read-only;

View File

@ -18,7 +18,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/usb/ax88179_178a.c
+++ b/drivers/net/usb/ax88179_178a.c
@@ -1363,11 +1363,12 @@ static int ax88179_bind(struct usbnet *d
@@ -1333,11 +1333,12 @@ static int ax88179_bind(struct usbnet *d
dev->mii.phy_id = 0x03;
dev->mii.supports_gmii = 1;
@ -33,9 +33,9 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
+
+ netif_set_gso_max_size(dev->net, 16384);
/* Enable checksum offload */
*tmp = AX_RXCOE_IP | AX_RXCOE_TCP | AX_RXCOE_UDP |
@@ -1573,17 +1574,19 @@ ax88179_tx_fixup(struct usbnet *dev, str
ax88179_reset(dev);
@@ -1507,17 +1508,19 @@ ax88179_tx_fixup(struct usbnet *dev, str
{
u32 tx_hdr1, tx_hdr2;
int frame_size = dev->maxpacket;
@ -57,7 +57,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
if ((skb_header_cloned(skb) || headroom < 0) &&
pskb_expand_head(skb, headroom < 0 ? 8 : 0, 0, GFP_ATOMIC)) {
dev_kfree_skb_any(skb);
@@ -1594,6 +1597,8 @@ ax88179_tx_fixup(struct usbnet *dev, str
@@ -1528,6 +1531,8 @@ ax88179_tx_fixup(struct usbnet *dev, str
put_unaligned_le32(tx_hdr1, ptr);
put_unaligned_le32(tx_hdr2, ptr + 4);

View File

@ -32,7 +32,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -12926,6 +12926,14 @@ L: netdev@vger.kernel.org
@@ -12928,6 +12928,14 @@ L: netdev@vger.kernel.org
S: Maintained
F: drivers/net/ethernet/mediatek/

View File

@ -25,7 +25,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -13060,6 +13060,7 @@ M: Landen Chao <Landen.Chao@mediatek.com
@@ -13062,6 +13062,7 @@ M: Landen Chao <Landen.Chao@mediatek.com
M: DENG Qingfang <dqfext@gmail.com>
L: netdev@vger.kernel.org
S: Maintained

View File

@ -28,7 +28,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -13058,9 +13058,11 @@ MEDIATEK SWITCH DRIVER
@@ -13060,9 +13060,11 @@ MEDIATEK SWITCH DRIVER
M: Sean Wang <sean.wang@mediatek.com>
M: Landen Chao <Landen.Chao@mediatek.com>
M: DENG Qingfang <dqfext@gmail.com>

View File

@ -21,7 +21,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -13962,6 +13962,7 @@ F: include/uapi/linux/meye.h
@@ -13964,6 +13964,7 @@ F: include/uapi/linux/meye.h
MOTORCOMM PHY DRIVER
M: Peter Geis <pgwipeout@gmail.com>

View File

@ -77,7 +77,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
INDIRECT_CALLABLE_DECLARE(struct dst_entry *ip6_dst_check(struct dst_entry *,
u32));
INDIRECT_CALLABLE_DECLARE(struct dst_entry *ipv4_dst_check(struct dst_entry *,
@@ -1987,9 +2001,11 @@ static void __sk_free(struct sock *sk)
@@ -1994,9 +2008,11 @@ static void __sk_free(struct sock *sk)
if (likely(sk->sk_net_refcnt))
sock_inuse_add(sock_net(sk), -1);

View File

@ -330,7 +330,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -3881,6 +3881,8 @@ static __net_initdata struct pernet_oper
@@ -3889,6 +3889,8 @@ static __net_initdata struct pernet_oper
static int __init proto_init(void)
{

View File

@ -654,7 +654,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
+};
+
+static int nf_flow_rule_route_inet(struct net *net,
+ const struct flow_offload *flow,
+ struct flow_offload *flow,
+ enum flow_offload_tuple_dir dir,
+ struct nf_flow_rule *flow_rule)
+{
@ -755,7 +755,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
void (*iter)(struct nf_flowtable *flowtable,
struct flow_offload *flow, void *data),
void *data)
@@ -436,6 +434,7 @@ static void nf_flow_offload_gc_step(stru
@@ -443,6 +441,7 @@ static void nf_flow_offload_gc_step(stru
nf_flow_offload_stats(flow_table, flow);
}
}
@ -785,7 +785,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
+#endif /* _XT_FLOWOFFLOAD_H */
--- a/include/net/netfilter/nf_flow_table.h
+++ b/include/net/netfilter/nf_flow_table.h
@@ -280,6 +280,11 @@ void nf_flow_table_free(struct nf_flowta
@@ -293,6 +293,11 @@ void nf_flow_table_free(struct nf_flowta
void flow_offload_teardown(struct flow_offload *flow);

View File

@ -79,7 +79,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
INDIRECT_CALLABLE_DECLARE(struct dst_entry *ip6_dst_check(struct dst_entry *,
u32));
INDIRECT_CALLABLE_DECLARE(struct dst_entry *ipv4_dst_check(struct dst_entry *,
@@ -2180,9 +2194,11 @@ static void __sk_free(struct sock *sk)
@@ -2187,9 +2201,11 @@ static void __sk_free(struct sock *sk)
if (likely(sk->sk_net_refcnt))
sock_inuse_add(sock_net(sk), -1);

View File

@ -330,7 +330,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -4105,6 +4105,8 @@ static __net_initdata struct pernet_oper
@@ -4113,6 +4113,8 @@ static __net_initdata struct pernet_oper
static int __init proto_init(void)
{

View File

@ -0,0 +1,32 @@
From cb1d41b99e4afa062f904339666fae2578559718 Mon Sep 17 00:00:00 2001
From: Namjae Jeon <linkinjeon@kernel.org>
Date: Mon, 15 Jan 2024 10:24:54 +0900
Subject: [PATCH] ksmbd: only v2 leases handle the directory
When smb2 leases is disable, ksmbd can send oplock break notification
and cause wait oplock break ack timeout. It may appear like hang when
accessing a directory. This patch make only v2 leases handle the
directory.
Cc: stable@vger.kernel.org
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
---
fs/ksmbd/oplock.c | 6 ++++++
1 file changed, 6 insertions(+)
--- a/fs/ksmbd/oplock.c
+++ b/fs/ksmbd/oplock.c
@@ -1191,6 +1191,12 @@ int smb_grant_oplock(struct ksmbd_work *
bool prev_op_has_lease;
__le32 prev_op_state = 0;
+ /* Only v2 leases handle the directory */
+ if (S_ISDIR(file_inode(fp->filp)->i_mode)) {
+ if (!lctx || lctx->version != 2)
+ return 0;
+ }
+
opinfo = alloc_opinfo(work, pid, tid);
if (!opinfo)
return -ENOMEM;

View File

@ -157,7 +157,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
case RTN_THROW:
case RTN_UNREACHABLE:
default:
@@ -4560,6 +4579,17 @@ static int ip6_pkt_prohibit_out(struct n
@@ -4557,6 +4576,17 @@ static int ip6_pkt_prohibit_out(struct n
return ip6_pkt_drop(skb, ICMPV6_ADM_PROHIBITED, IPSTATS_MIB_OUTNOROUTES);
}
@ -175,7 +175,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
/*
* Allocate a dst for local (unicast / anycast) address.
*/
@@ -5047,7 +5077,8 @@ static int rtm_to_fib6_config(struct sk_
@@ -5044,7 +5074,8 @@ static int rtm_to_fib6_config(struct sk_
if (rtm->rtm_type == RTN_UNREACHABLE ||
rtm->rtm_type == RTN_BLACKHOLE ||
rtm->rtm_type == RTN_PROHIBIT ||
@ -185,7 +185,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
cfg->fc_flags |= RTF_REJECT;
if (rtm->rtm_type == RTN_LOCAL)
@@ -6301,6 +6332,8 @@ static int ip6_route_dev_notify(struct n
@@ -6298,6 +6329,8 @@ static int ip6_route_dev_notify(struct n
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
net->ipv6.ip6_prohibit_entry->dst.dev = dev;
net->ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(dev);
@ -194,7 +194,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
net->ipv6.ip6_blk_hole_entry->dst.dev = dev;
net->ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(dev);
#endif
@@ -6312,6 +6345,7 @@ static int ip6_route_dev_notify(struct n
@@ -6309,6 +6342,7 @@ static int ip6_route_dev_notify(struct n
in6_dev_put_clear(&net->ipv6.ip6_null_entry->rt6i_idev);
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
in6_dev_put_clear(&net->ipv6.ip6_prohibit_entry->rt6i_idev);
@ -202,7 +202,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
in6_dev_put_clear(&net->ipv6.ip6_blk_hole_entry->rt6i_idev);
#endif
}
@@ -6503,6 +6537,8 @@ static int __net_init ip6_route_net_init
@@ -6500,6 +6534,8 @@ static int __net_init ip6_route_net_init
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
net->ipv6.fib6_has_custom_rules = false;
@ -211,7 +211,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
net->ipv6.ip6_prohibit_entry = kmemdup(&ip6_prohibit_entry_template,
sizeof(*net->ipv6.ip6_prohibit_entry),
GFP_KERNEL);
@@ -6513,11 +6549,21 @@ static int __net_init ip6_route_net_init
@@ -6510,11 +6546,21 @@ static int __net_init ip6_route_net_init
ip6_template_metrics, true);
INIT_LIST_HEAD(&net->ipv6.ip6_prohibit_entry->rt6i_uncached);
@ -234,7 +234,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
net->ipv6.ip6_blk_hole_entry->dst.ops = &net->ipv6.ip6_dst_ops;
dst_init_metrics(&net->ipv6.ip6_blk_hole_entry->dst,
ip6_template_metrics, true);
@@ -6544,6 +6590,8 @@ out:
@@ -6541,6 +6587,8 @@ out:
return ret;
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
@ -243,7 +243,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
out_ip6_prohibit_entry:
kfree(net->ipv6.ip6_prohibit_entry);
out_ip6_null_entry:
@@ -6563,6 +6611,7 @@ static void __net_exit ip6_route_net_exi
@@ -6560,6 +6608,7 @@ static void __net_exit ip6_route_net_exi
kfree(net->ipv6.ip6_null_entry);
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
kfree(net->ipv6.ip6_prohibit_entry);
@ -251,7 +251,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
kfree(net->ipv6.ip6_blk_hole_entry);
#endif
dst_entries_destroy(&net->ipv6.ip6_dst_ops);
@@ -6646,6 +6695,9 @@ void __init ip6_route_init_special_entri
@@ -6643,6 +6692,9 @@ void __init ip6_route_init_special_entri
init_net.ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev);
init_net.ipv6.ip6_blk_hole_entry->dst.dev = init_net.loopback_dev;
init_net.ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev);

View File

@ -18,7 +18,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/net/netfilter/nf_tables_api.c
+++ b/net/netfilter/nf_tables_api.c
@@ -7709,7 +7709,7 @@ static int nft_register_flowtable_net_ho
@@ -7736,7 +7736,7 @@ static int nft_register_flowtable_net_ho
err = flowtable->data.type->setup(&flowtable->data,
hook->ops.dev,
FLOW_BLOCK_BIND);

View File

@ -0,0 +1,32 @@
From 86b7307af26834415e1ba8597319a8b64846346f Mon Sep 17 00:00:00 2001
From: Namjae Jeon <linkinjeon@kernel.org>
Date: Mon, 15 Jan 2024 10:24:54 +0900
Subject: [PATCH] ksmbd: only v2 leases handle the directory
When smb2 leases is disable, ksmbd can send oplock break notification
and cause wait oplock break ack timeout. It may appear like hang when
accessing a directory. This patch make only v2 leases handle the
directory.
Cc: stable@vger.kernel.org
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
---
fs/smb/server/oplock.c | 6 ++++++
1 file changed, 6 insertions(+)
--- a/fs/smb/server/oplock.c
+++ b/fs/smb/server/oplock.c
@@ -1191,6 +1191,12 @@ int smb_grant_oplock(struct ksmbd_work *
bool prev_op_has_lease;
__le32 prev_op_state = 0;
+ /* Only v2 leases handle the directory */
+ if (S_ISDIR(file_inode(fp->filp)->i_mode)) {
+ if (!lctx || lctx->version != 2)
+ return 0;
+ }
+
opinfo = alloc_opinfo(work, pid, tid);
if (!opinfo)
return -ENOMEM;

View File

@ -157,7 +157,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
case RTN_THROW:
case RTN_UNREACHABLE:
default:
@@ -4543,6 +4562,17 @@ static int ip6_pkt_prohibit_out(struct n
@@ -4540,6 +4559,17 @@ static int ip6_pkt_prohibit_out(struct n
return ip6_pkt_drop(skb, ICMPV6_ADM_PROHIBITED, IPSTATS_MIB_OUTNOROUTES);
}
@ -175,7 +175,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
/*
* Allocate a dst for local (unicast / anycast) address.
*/
@@ -5036,7 +5066,8 @@ static int rtm_to_fib6_config(struct sk_
@@ -5033,7 +5063,8 @@ static int rtm_to_fib6_config(struct sk_
if (rtm->rtm_type == RTN_UNREACHABLE ||
rtm->rtm_type == RTN_BLACKHOLE ||
rtm->rtm_type == RTN_PROHIBIT ||
@ -185,7 +185,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
cfg->fc_flags |= RTF_REJECT;
if (rtm->rtm_type == RTN_LOCAL)
@@ -6290,6 +6321,8 @@ static int ip6_route_dev_notify(struct n
@@ -6287,6 +6318,8 @@ static int ip6_route_dev_notify(struct n
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
net->ipv6.ip6_prohibit_entry->dst.dev = dev;
net->ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(dev);
@ -194,7 +194,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
net->ipv6.ip6_blk_hole_entry->dst.dev = dev;
net->ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(dev);
#endif
@@ -6301,6 +6334,7 @@ static int ip6_route_dev_notify(struct n
@@ -6298,6 +6331,7 @@ static int ip6_route_dev_notify(struct n
in6_dev_put_clear(&net->ipv6.ip6_null_entry->rt6i_idev);
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
in6_dev_put_clear(&net->ipv6.ip6_prohibit_entry->rt6i_idev);
@ -202,7 +202,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
in6_dev_put_clear(&net->ipv6.ip6_blk_hole_entry->rt6i_idev);
#endif
}
@@ -6492,6 +6526,8 @@ static int __net_init ip6_route_net_init
@@ -6489,6 +6523,8 @@ static int __net_init ip6_route_net_init
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
net->ipv6.fib6_has_custom_rules = false;
@ -211,7 +211,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
net->ipv6.ip6_prohibit_entry = kmemdup(&ip6_prohibit_entry_template,
sizeof(*net->ipv6.ip6_prohibit_entry),
GFP_KERNEL);
@@ -6502,11 +6538,21 @@ static int __net_init ip6_route_net_init
@@ -6499,11 +6535,21 @@ static int __net_init ip6_route_net_init
ip6_template_metrics, true);
INIT_LIST_HEAD(&net->ipv6.ip6_prohibit_entry->rt6i_uncached);
@ -234,7 +234,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
net->ipv6.ip6_blk_hole_entry->dst.ops = &net->ipv6.ip6_dst_ops;
dst_init_metrics(&net->ipv6.ip6_blk_hole_entry->dst,
ip6_template_metrics, true);
@@ -6533,6 +6579,8 @@ out:
@@ -6530,6 +6576,8 @@ out:
return ret;
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
@ -243,7 +243,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
out_ip6_prohibit_entry:
kfree(net->ipv6.ip6_prohibit_entry);
out_ip6_null_entry:
@@ -6552,6 +6600,7 @@ static void __net_exit ip6_route_net_exi
@@ -6549,6 +6597,7 @@ static void __net_exit ip6_route_net_exi
kfree(net->ipv6.ip6_null_entry);
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
kfree(net->ipv6.ip6_prohibit_entry);
@ -251,7 +251,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
kfree(net->ipv6.ip6_blk_hole_entry);
#endif
dst_entries_destroy(&net->ipv6.ip6_dst_ops);
@@ -6635,6 +6684,9 @@ void __init ip6_route_init_special_entri
@@ -6632,6 +6681,9 @@ void __init ip6_route_init_special_entri
init_net.ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev);
init_net.ipv6.ip6_blk_hole_entry->dst.dev = init_net.loopback_dev;
init_net.ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev);

View File

@ -10,7 +10,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
--- a/net/netfilter/nf_flow_table_core.c
+++ b/net/netfilter/nf_flow_table_core.c
@@ -659,6 +659,23 @@ static struct pernet_operations nf_flow_
@@ -666,6 +666,23 @@ static struct pernet_operations nf_flow_
.exit_batch = nf_flow_table_pernet_exit,
};
@ -34,7 +34,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
static int __init nf_flow_table_module_init(void)
{
int ret;
@@ -671,8 +688,14 @@ static int __init nf_flow_table_module_i
@@ -678,8 +695,14 @@ static int __init nf_flow_table_module_i
if (ret)
goto out_offload;
@ -49,7 +49,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
out_offload:
unregister_pernet_subsys(&nf_flow_table_net_ops);
return ret;
@@ -680,6 +703,7 @@ out_offload:
@@ -687,6 +710,7 @@ out_offload:
static void __exit nf_flow_table_module_exit(void)
{

View File

@ -32,7 +32,7 @@ Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -17064,6 +17064,13 @@ L: netdev@vger.kernel.org
@@ -17066,6 +17066,13 @@ L: netdev@vger.kernel.org
S: Maintained
F: drivers/net/ethernet/qualcomm/emac/

View File

@ -64,7 +64,7 @@ Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -17070,6 +17070,7 @@ L: netdev@vger.kernel.org
@@ -17072,6 +17072,7 @@ L: netdev@vger.kernel.org
S: Maintained
F: Documentation/devicetree/bindings/net/qcom,ipq4019-ess-edma.yaml
F: drivers/net/ethernet/qualcomm/ipqess/

View File

@ -26,7 +26,7 @@
stdout-path = "serial0:115200n8";
};
memory {
memory@40000000 {
reg = <0 0x40000000 0 0x40000000>;
};
@ -50,17 +50,20 @@
compatible = "gpio-leds";
led-0 {
label = "blue:status";
color = <LED_COLOR_ID_BLUE>;
function = LED_FUNCTION_STATUS;
gpios = <&pio 7 GPIO_ACTIVE_HIGH>;
};
red_led: led-1 {
label = "red:status";
color = <LED_COLOR_ID_RED>;
function = LED_FUNCTION_STATUS;
gpios = <&pio 11 GPIO_ACTIVE_HIGH>;
};
green_led: led-2 {
label = "green:status";
color = <LED_COLOR_ID_GREEN>;
function = LED_FUNCTION_STATUS;
gpios = <&pio 12 GPIO_ACTIVE_LOW>;
};
};

View File

@ -0,0 +1,49 @@
From: Felix Fietkau <nbd@nbd.name>
Date: Thu, 18 Jan 2024 12:51:32 +0100
Subject: [PATCH] net: ethernet: mtk_eth_soc: fix WED + wifi reset
The WLAN + WED reset sequence relies on being able to receive interrupts from
the card, in order to synchronize individual steps with the firmware.
When WED is stopped, leave interrupts running and rely on the driver turning
off unwanted ones.
WED DMA also needs to be disabled before resetting.
Fixes: f78cd9c783e0 ("net: ethernet: mtk_wed: update mtk_wed_stop")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
--- a/drivers/net/ethernet/mediatek/mtk_wed.c
+++ b/drivers/net/ethernet/mediatek/mtk_wed.c
@@ -1071,13 +1071,13 @@ mtk_wed_dma_disable(struct mtk_wed_devic
static void
mtk_wed_stop(struct mtk_wed_device *dev)
{
+ mtk_wed_dma_disable(dev);
mtk_wed_set_ext_int(dev, false);
wed_w32(dev, MTK_WED_WPDMA_INT_TRIGGER, 0);
wed_w32(dev, MTK_WED_WDMA_INT_TRIGGER, 0);
wdma_w32(dev, MTK_WDMA_INT_MASK, 0);
wdma_w32(dev, MTK_WDMA_INT_GRP2, 0);
- wed_w32(dev, MTK_WED_WPDMA_INT_MASK, 0);
if (!mtk_wed_get_rx_capa(dev))
return;
@@ -1090,7 +1090,6 @@ static void
mtk_wed_deinit(struct mtk_wed_device *dev)
{
mtk_wed_stop(dev);
- mtk_wed_dma_disable(dev);
wed_clr(dev, MTK_WED_CTRL,
MTK_WED_CTRL_WDMA_INT_AGENT_EN |
@@ -2621,9 +2620,6 @@ mtk_wed_irq_get(struct mtk_wed_device *d
static void
mtk_wed_irq_set_mask(struct mtk_wed_device *dev, u32 mask)
{
- if (!dev->running)
- return;
-
mtk_wed_set_ext_int(dev, !!mask);
wed_w32(dev, MTK_WED_INT_MASK, mask);
}

View File

@ -24,7 +24,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -12934,6 +12934,15 @@ S: Maintained
@@ -12936,6 +12936,15 @@ S: Maintained
F: drivers/net/pcs/pcs-mtk-lynxi.c
F: include/linux/pcs/pcs-mtk-lynxi.h

View File

@ -0,0 +1,49 @@
From: Felix Fietkau <nbd@nbd.name>
Date: Thu, 18 Jan 2024 12:51:32 +0100
Subject: [PATCH] net: ethernet: mtk_eth_soc: fix WED + wifi reset
The WLAN + WED reset sequence relies on being able to receive interrupts from
the card, in order to synchronize individual steps with the firmware.
When WED is stopped, leave interrupts running and rely on the driver turning
off unwanted ones.
WED DMA also needs to be disabled before resetting.
Fixes: f78cd9c783e0 ("net: ethernet: mtk_wed: update mtk_wed_stop")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
--- a/drivers/net/ethernet/mediatek/mtk_wed.c
+++ b/drivers/net/ethernet/mediatek/mtk_wed.c
@@ -1071,13 +1071,13 @@ mtk_wed_dma_disable(struct mtk_wed_devic
static void
mtk_wed_stop(struct mtk_wed_device *dev)
{
+ mtk_wed_dma_disable(dev);
mtk_wed_set_ext_int(dev, false);
wed_w32(dev, MTK_WED_WPDMA_INT_TRIGGER, 0);
wed_w32(dev, MTK_WED_WDMA_INT_TRIGGER, 0);
wdma_w32(dev, MTK_WDMA_INT_MASK, 0);
wdma_w32(dev, MTK_WDMA_INT_GRP2, 0);
- wed_w32(dev, MTK_WED_WPDMA_INT_MASK, 0);
if (!mtk_wed_get_rx_capa(dev))
return;
@@ -1090,7 +1090,6 @@ static void
mtk_wed_deinit(struct mtk_wed_device *dev)
{
mtk_wed_stop(dev);
- mtk_wed_dma_disable(dev);
wed_clr(dev, MTK_WED_CTRL,
MTK_WED_CTRL_WDMA_INT_AGENT_EN |
@@ -2621,9 +2620,6 @@ mtk_wed_irq_get(struct mtk_wed_device *d
static void
mtk_wed_irq_set_mask(struct mtk_wed_device *dev, u32 mask)
{
- if (!dev->running)
- return;
-
mtk_wed_set_ext_int(dev, !!mask);
wed_w32(dev, MTK_WED_INT_MASK, mask);
}

View File

@ -21,7 +21,7 @@ endef
define Build/boot-script
# Make an U-boot image and copy it to the boot partition
mkimage -A arm -O linux -T script -C lzma -a 0 -e 0 -d $(if $(1),$(1),mmc).bootscript $@.boot/boot.scr
mkimage -A arm -O linux -T script -C lzma -a 0 -e 0 -d $(if $(1),$(1),default).bootscript $@.boot/boot.scr
endef
define Build/pine64-img

View File

@ -1,4 +1,4 @@
part uuid mmc ${devnum}:2 uuid
part uuid ${devtype} ${devnum}:2 uuid
if test $stdout = 'serial@fe660000' ;
then serial_addr=',0xfe660000';
@ -12,6 +12,6 @@ fi;
setenv bootargs "coherent_pool=2M console=ttyS2,1500000 console=tty1 earlycon=uart8250,mmio32${serial_addr} swiotlb=1 root=PARTUUID=${uuid} rw rootwait";
load mmc ${devnum}:1 ${kernel_addr_r} kernel.img
load ${devtype} ${devnum}:1 ${kernel_addr_r} kernel.img
bootm ${kernel_addr_r}

View File

@ -64,6 +64,7 @@ GLIBC_CONFIGURE:= \
--$(if $(CONFIG_SOFT_FLOAT),without,with)-fp \
$(if $(CONFIG_PKG_CC_STACKPROTECTOR_REGULAR),--enable-stack-protector=yes) \
$(if $(CONFIG_PKG_CC_STACKPROTECTOR_STRONG),--enable-stack-protector=strong) \
$(if $(CONFIG_PKG_CC_STACKPROTECTOR_ALL),--enable-stack-protector=all) \
$(if $(CONFIG_PKG_RELRO_FULL),--enable-bind-now) \
--enable-kernel=5.15.0