Merge branch 'openwrt:master' into master

This commit is contained in:
Hayzam Sherif 2023-09-24 04:21:37 +05:30 committed by GitHub
commit 08a02bb711
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
113 changed files with 352 additions and 685 deletions

View file

@ -1,2 +1,2 @@
LINUX_VERSION-6.1 = .52 LINUX_VERSION-6.1 = .54
LINUX_KERNEL_HASH-6.1.52 = 567737990dbc9265966a0786392821a9fa559fd346494fd1eff050dbeb383a52 LINUX_KERNEL_HASH-6.1.54 = a3181e46d407cd6ab15f412402e8220684ff9659b0262b7a3de7384405ce4e27

View file

@ -0,0 +1,39 @@
From: Shiji Yang <yangshiji66@outlook.com>
Date: Sat, 23 Sep 2023 07:51:39 +0800
Subject: [PATCH] wifi: rt2x00: fix MT7620 low RSSI issue
On Mediatek vendor driver[1], MT7620 (RT6352) uses different RSSI
base value '-2' compared to the other RT2x00 chips. This patch
introduces the SoC specific base value to fix the low RSSI value
reports on MT7620.
[1] Found on MT76x2E_MT7620_LinuxAP_V3.0.4.0_P3 ConvertToRssi().
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
---
drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
@@ -875,6 +875,7 @@ static int rt2800_agc_to_rssi(struct rt2
s8 rssi0 = rt2x00_get_field32(rxwi_w2, RXWI_W2_RSSI0);
s8 rssi1 = rt2x00_get_field32(rxwi_w2, RXWI_W2_RSSI1);
s8 rssi2 = rt2x00_get_field32(rxwi_w2, RXWI_W2_RSSI2);
+ s8 base_val = rt2x00_rt(rt2x00dev, RT6352) ? -2 : -12;
u16 eeprom;
u8 offset0;
u8 offset1;
@@ -899,9 +900,9 @@ static int rt2800_agc_to_rssi(struct rt2
* If the value in the descriptor is 0, it is considered invalid
* and the default (extremely low) rssi value is assumed
*/
- rssi0 = (rssi0) ? (-12 - offset0 - rt2x00dev->lna_gain - rssi0) : -128;
- rssi1 = (rssi1) ? (-12 - offset1 - rt2x00dev->lna_gain - rssi1) : -128;
- rssi2 = (rssi2) ? (-12 - offset2 - rt2x00dev->lna_gain - rssi2) : -128;
+ rssi0 = (rssi0) ? (base_val - offset0 - rt2x00dev->lna_gain - rssi0) : -128;
+ rssi1 = (rssi1) ? (base_val - offset1 - rt2x00dev->lna_gain - rssi1) : -128;
+ rssi2 = (rssi2) ? (base_val - offset2 - rt2x00dev->lna_gain - rssi2) : -128;
/*
* mac80211 only accepts a single RSSI value. Calculating the

View file

@ -107,14 +107,14 @@
hostapd_ubus_free_bss(hapd); hostapd_ubus_free_bss(hapd);
accounting_deinit(hapd); accounting_deinit(hapd);
hostapd_deinit_wpa(hapd); hostapd_deinit_wpa(hapd);
@@ -570,6 +573,7 @@ static void sta_track_deinit(struct host @@ -600,6 +603,7 @@ void hostapd_cleanup_iface_partial(struc
void hostapd_cleanup_iface_partial(struct hostapd_iface *iface) static void hostapd_cleanup_iface(struct hostapd_iface *iface)
{ {
wpa_printf(MSG_DEBUG, "%s(%p)", __func__, iface); wpa_printf(MSG_DEBUG, "%s(%p)", __func__, iface);
+ hostapd_ucode_free_iface(iface); + hostapd_ucode_free_iface(iface);
eloop_cancel_timeout(channel_list_update_timeout, iface, NULL); eloop_cancel_timeout(hostapd_interface_setup_failure_handler, iface,
#ifdef NEED_AP_MLME NULL);
hostapd_stop_setup_timers(iface);
@@ -1189,6 +1193,7 @@ static int hostapd_start_beacon(struct h @@ -1189,6 +1193,7 @@ static int hostapd_start_beacon(struct h
hapd->driver->set_operstate(hapd->drv_priv, 1); hapd->driver->set_operstate(hapd->drv_priv, 1);

View file

@ -136,6 +136,7 @@ static uc_value_t *
uc_wpas_add_iface(uc_vm_t *vm, size_t nargs) uc_wpas_add_iface(uc_vm_t *vm, size_t nargs)
{ {
uc_value_t *info = uc_fn_arg(0); uc_value_t *info = uc_fn_arg(0);
uc_value_t *driver = ucv_object_get(info, "driver", NULL);
uc_value_t *ifname = ucv_object_get(info, "iface", NULL); uc_value_t *ifname = ucv_object_get(info, "iface", NULL);
uc_value_t *bridge = ucv_object_get(info, "bridge", NULL); uc_value_t *bridge = ucv_object_get(info, "bridge", NULL);
uc_value_t *config = ucv_object_get(info, "config", NULL); uc_value_t *config = ucv_object_get(info, "config", NULL);
@ -154,6 +155,22 @@ uc_wpas_add_iface(uc_vm_t *vm, size_t nargs)
.ctrl_interface = ucv_string_get(ctrl), .ctrl_interface = ucv_string_get(ctrl),
}; };
if (driver) {
const char *drvname;
if (ucv_type(driver) != UC_STRING)
goto out;
iface.driver = NULL;
drvname = ucv_string_get(driver);
for (int i = 0; wpa_drivers[i]; i++) {
if (!strcmp(drvname, wpa_drivers[i]->name))
iface.driver = wpa_drivers[i]->name;
}
if (!iface.driver)
goto out;
}
if (!iface.ifname || !iface.confname) if (!iface.ifname || !iface.confname)
goto out; goto out;

View file

@ -18,7 +18,7 @@ Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
--- a/arch/powerpc/boot/Makefile --- a/arch/powerpc/boot/Makefile
+++ b/arch/powerpc/boot/Makefile +++ b/arch/powerpc/boot/Makefile
@@ -272,7 +272,7 @@ compressor-$(CONFIG_KERNEL_LZO) := lzo @@ -274,7 +274,7 @@ compressor-$(CONFIG_KERNEL_LZO) := lzo
# args (to if_changed): 1 = (this rule), 2 = platform, 3 = dts 4=dtb 5=initrd # args (to if_changed): 1 = (this rule), 2 = platform, 3 = dts 4=dtb 5=initrd
quiet_cmd_wrap = WRAP $@ quiet_cmd_wrap = WRAP $@

View file

@ -15,7 +15,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
--- a/arch/mips/Kconfig --- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig +++ b/arch/mips/Kconfig
@@ -258,6 +258,8 @@ config ATH79 @@ -257,6 +257,8 @@ config ATH79
select SYS_SUPPORTS_BIG_ENDIAN select SYS_SUPPORTS_BIG_ENDIAN
select SYS_SUPPORTS_MIPS16 select SYS_SUPPORTS_MIPS16
select SYS_SUPPORTS_ZBOOT_UART_PROM select SYS_SUPPORTS_ZBOOT_UART_PROM

View file

@ -10,7 +10,7 @@ Signed-off-by: Abhimanyu Vishwakarma <Abhimanyu.Vishwakarma@imgtec.com>
--- a/drivers/mtd/spi-nor/core.c --- a/drivers/mtd/spi-nor/core.c
+++ b/drivers/mtd/spi-nor/core.c +++ b/drivers/mtd/spi-nor/core.c
@@ -2941,12 +2941,19 @@ static void spi_nor_set_mtd_info(struct @@ -2942,12 +2942,19 @@ static void spi_nor_set_mtd_info(struct
{ {
struct mtd_info *mtd = &nor->mtd; struct mtd_info *mtd = &nor->mtd;
struct device *dev = nor->dev; struct device *dev = nor->dev;

View file

@ -654,7 +654,7 @@ SVN-Revision: 35130
return false; return false;
return true; return true;
@@ -800,13 +804,13 @@ static inline void ipv6_addr_set_v4mappe @@ -805,13 +809,13 @@ static inline void ipv6_addr_set_v4mappe
*/ */
static inline int __ipv6_addr_diff32(const void *token1, const void *token2, int addrlen) static inline int __ipv6_addr_diff32(const void *token1, const void *token2, int addrlen)
{ {
@ -670,7 +670,7 @@ SVN-Revision: 35130
if (xb) if (xb)
return i * 32 + 31 - __fls(ntohl(xb)); return i * 32 + 31 - __fls(ntohl(xb));
} }
@@ -1000,17 +1004,18 @@ static inline u32 ip6_multipath_hash_fie @@ -1005,17 +1009,18 @@ static inline u32 ip6_multipath_hash_fie
static inline void ip6_flow_hdr(struct ipv6hdr *hdr, unsigned int tclass, static inline void ip6_flow_hdr(struct ipv6hdr *hdr, unsigned int tclass,
__be32 flowlabel) __be32 flowlabel)
{ {
@ -750,7 +750,7 @@ SVN-Revision: 35130
EXPORT_SYMBOL(xfrm_parse_spi); EXPORT_SYMBOL(xfrm_parse_spi);
--- a/net/ipv4/tcp_input.c --- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c
@@ -4166,14 +4166,16 @@ static bool tcp_parse_aligned_timestamp( @@ -4165,14 +4165,16 @@ static bool tcp_parse_aligned_timestamp(
{ {
const __be32 *ptr = (const __be32 *)(th + 1); const __be32 *ptr = (const __be32 *)(th + 1);

View file

@ -1185,7 +1185,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
} }
--- a/drivers/usb/core/hub.c --- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c
@@ -5580,7 +5580,7 @@ static void port_event(struct usb_hub *h @@ -5636,7 +5636,7 @@ static void port_event(struct usb_hub *h
port_dev->over_current_count++; port_dev->over_current_count++;
port_over_current_notify(port_dev); port_over_current_notify(port_dev);
@ -1196,7 +1196,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
USB_PORT_FEAT_C_OVER_CURRENT); USB_PORT_FEAT_C_OVER_CURRENT);
--- a/drivers/usb/core/message.c --- a/drivers/usb/core/message.c
+++ b/drivers/usb/core/message.c +++ b/drivers/usb/core/message.c
@@ -2140,6 +2140,85 @@ free_interfaces: @@ -2135,6 +2135,85 @@ free_interfaces:
if (cp->string == NULL && if (cp->string == NULL &&
!(dev->quirks & USB_QUIRK_CONFIG_INTF_STRINGS)) !(dev->quirks & USB_QUIRK_CONFIG_INTF_STRINGS))
cp->string = usb_cache_string(dev, cp->desc.iConfiguration); cp->string = usb_cache_string(dev, cp->desc.iConfiguration);

View file

@ -199,7 +199,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
select DMA_ENGINE select DMA_ENGINE
select DMA_VIRTUAL_CHANNELS select DMA_VIRTUAL_CHANNELS
@@ -703,6 +703,10 @@ config UNIPHIER_XDMAC @@ -705,6 +705,10 @@ config UNIPHIER_XDMAC
UniPhier platform. This DMA controller can transfer data from UniPhier platform. This DMA controller can transfer data from
memory to memory, memory to peripheral and peripheral to memory. memory to memory, memory to peripheral and peripheral to memory.

View file

@ -14974,7 +14974,7 @@ Signed-off-by: Ashish Vara <ashishhvara@gmail.com>
config SND_SOC_RT5631 config SND_SOC_RT5631
tristate "Realtek ALC5631/RT5631 CODEC" tristate "Realtek ALC5631/RT5631 CODEC"
depends on I2C depends on I2C
@@ -1622,6 +1637,9 @@ config SND_SOC_TFA9879 @@ -1623,6 +1638,9 @@ config SND_SOC_TFA9879
tristate "NXP Semiconductors TFA9879 amplifier" tristate "NXP Semiconductors TFA9879 amplifier"
depends on I2C depends on I2C
@ -14984,7 +14984,7 @@ Signed-off-by: Ashish Vara <ashishhvara@gmail.com>
config SND_SOC_TFA989X config SND_SOC_TFA989X
tristate "NXP/Goodix TFA989X (TFA1) amplifiers" tristate "NXP/Goodix TFA989X (TFA1) amplifiers"
depends on I2C depends on I2C
@@ -2168,4 +2186,8 @@ config SND_SOC_LPASS_TX_MACRO @@ -2169,4 +2187,8 @@ config SND_SOC_LPASS_TX_MACRO
select SND_SOC_LPASS_MACRO_COMMON select SND_SOC_LPASS_MACRO_COMMON
tristate "Qualcomm TX Macro in LPASS(Low Power Audio SubSystem)" tristate "Qualcomm TX Macro in LPASS(Low Power Audio SubSystem)"
@ -17615,7 +17615,7 @@ Signed-off-by: Ashish Vara <ashishhvara@gmail.com>
* For devices with more than one control interface, we assume the * For devices with more than one control interface, we assume the
--- a/sound/usb/quirks.c --- a/sound/usb/quirks.c
+++ b/sound/usb/quirks.c +++ b/sound/usb/quirks.c
@@ -2156,6 +2156,8 @@ static const struct usb_audio_quirk_flag @@ -2171,6 +2171,8 @@ static const struct usb_audio_quirk_flag
QUIRK_FLAG_FIXED_RATE), QUIRK_FLAG_FIXED_RATE),
DEVICE_FLG(0x0ecb, 0x2069, /* JBL Quantum810 Wireless */ DEVICE_FLG(0x0ecb, 0x2069, /* JBL Quantum810 Wireless */
QUIRK_FLAG_FIXED_RATE), QUIRK_FLAG_FIXED_RATE),

View file

@ -12,7 +12,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
--- a/drivers/tty/serial/sc16is7xx.c --- a/drivers/tty/serial/sc16is7xx.c
+++ b/drivers/tty/serial/sc16is7xx.c +++ b/drivers/tty/serial/sc16is7xx.c
@@ -772,6 +772,8 @@ static bool sc16is7xx_port_irq(struct sc @@ -770,6 +770,8 @@ static bool sc16is7xx_port_irq(struct sc
rxlen = sc16is7xx_port_read(port, SC16IS7XX_RXLVL_REG); rxlen = sc16is7xx_port_read(port, SC16IS7XX_RXLVL_REG);
if (rxlen) if (rxlen)
sc16is7xx_handle_rx(port, rxlen, iir); sc16is7xx_handle_rx(port, rxlen, iir);

View file

@ -130,9 +130,9 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
static void iproc_rng200_cleanup(struct hwrng *rng) static void iproc_rng200_cleanup(struct hwrng *rng)
{ {
struct iproc_rng200_dev *priv = to_rng_priv(rng); struct iproc_rng200_dev *priv = to_rng_priv(rng);
@@ -182,11 +248,17 @@ static int iproc_rng200_probe(struct pla @@ -184,11 +250,17 @@ static int iproc_rng200_probe(struct pla
return PTR_ERR(priv->base);
} dev_set_drvdata(dev, priv);
- priv->rng.name = "iproc-rng200"; - priv->rng.name = "iproc-rng200";
- priv->rng.read = iproc_rng200_read; - priv->rng.read = iproc_rng200_read;

View file

@ -27,7 +27,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
--- a/drivers/usb/core/hcd.c --- a/drivers/usb/core/hcd.c
+++ b/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.c
@@ -1973,6 +1973,16 @@ reset: @@ -1977,6 +1977,16 @@ reset:
return ret; return ret;
} }
@ -46,7 +46,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
* have been called previously. Use for set_configuration, set_interface, * have been called previously. Use for set_configuration, set_interface,
--- a/drivers/usb/core/message.c --- a/drivers/usb/core/message.c
+++ b/drivers/usb/core/message.c +++ b/drivers/usb/core/message.c
@@ -1268,6 +1268,21 @@ static void remove_intf_ep_devs(struct u @@ -1263,6 +1263,21 @@ static void remove_intf_ep_devs(struct u
intf->ep_devs_created = 0; intf->ep_devs_created = 0;
} }

View file

@ -360,7 +360,7 @@ Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
M: Alex Dubov <oakad@yahoo.com> M: Alex Dubov <oakad@yahoo.com>
--- a/drivers/media/i2c/Kconfig --- a/drivers/media/i2c/Kconfig
+++ b/drivers/media/i2c/Kconfig +++ b/drivers/media/i2c/Kconfig
@@ -1023,6 +1023,17 @@ config VIDEO_UDA1342 @@ -1030,6 +1030,17 @@ config VIDEO_UDA1342
To compile this driver as a module, choose M here: the To compile this driver as a module, choose M here: the
module will be called uda1342. module will be called uda1342.

View file

@ -194,7 +194,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
M: Alex Dubov <oakad@yahoo.com> M: Alex Dubov <oakad@yahoo.com>
--- a/drivers/media/i2c/Kconfig --- a/drivers/media/i2c/Kconfig
+++ b/drivers/media/i2c/Kconfig +++ b/drivers/media/i2c/Kconfig
@@ -228,6 +228,17 @@ config VIDEO_IMX412 @@ -235,6 +235,17 @@ config VIDEO_IMX412
To compile this driver as a module, choose M here: the To compile this driver as a module, choose M here: the
module will be called imx412. module will be called imx412.

View file

@ -21,7 +21,7 @@ Signed-off-by: Markus Proeller <markus.proeller@pieye.org>
--- a/drivers/media/i2c/Kconfig --- a/drivers/media/i2c/Kconfig
+++ b/drivers/media/i2c/Kconfig +++ b/drivers/media/i2c/Kconfig
@@ -1366,6 +1366,18 @@ config VIDEO_TW9910 @@ -1373,6 +1373,18 @@ config VIDEO_TW9910
To compile this driver as a module, choose M here: the To compile this driver as a module, choose M here: the
module will be called tw9910. module will be called tw9910.

View file

@ -105,7 +105,7 @@ Signed-off-by: David Plowman <david.plowman@raspberrypi.com>
--- a/drivers/media/i2c/Kconfig --- a/drivers/media/i2c/Kconfig
+++ b/drivers/media/i2c/Kconfig +++ b/drivers/media/i2c/Kconfig
@@ -1336,6 +1336,17 @@ config VIDEO_TW2804 @@ -1343,6 +1343,17 @@ config VIDEO_TW2804
To compile this driver as a module, choose M here: the To compile this driver as a module, choose M here: the
module will be called tw2804. module will be called tw2804.

View file

@ -15,7 +15,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
--- a/drivers/gpu/drm/panel/panel-simple.c --- a/drivers/gpu/drm/panel/panel-simple.c
+++ b/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c
@@ -3190,6 +3190,31 @@ static const struct panel_desc qishenglo @@ -3192,6 +3192,31 @@ static const struct panel_desc qishenglo
.connector_type = DRM_MODE_CONNECTOR_DPI, .connector_type = DRM_MODE_CONNECTOR_DPI,
}; };
@ -47,7 +47,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
static const struct display_timing rocktech_rk070er9427_timing = { static const struct display_timing rocktech_rk070er9427_timing = {
.pixelclock = { 26400000, 33300000, 46800000 }, .pixelclock = { 26400000, 33300000, 46800000 },
.hactive = { 800, 800, 800 }, .hactive = { 800, 800, 800 },
@@ -4221,6 +4246,9 @@ static const struct of_device_id platfor @@ -4223,6 +4248,9 @@ static const struct of_device_id platfor
.compatible = "qishenglong,gopher2b-lcd", .compatible = "qishenglong,gopher2b-lcd",
.data = &qishenglong_gopher2b_lcd, .data = &qishenglong_gopher2b_lcd,
}, { }, {

View file

@ -13,7 +13,7 @@ Acked-by: Maxime Ripard <maxime@cerno.tech>
--- a/drivers/gpu/drm/panel/panel-simple.c --- a/drivers/gpu/drm/panel/panel-simple.c
+++ b/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c
@@ -1944,6 +1944,32 @@ static const struct panel_desc friendlya @@ -1946,6 +1946,32 @@ static const struct panel_desc friendlya
}, },
}; };
@ -46,7 +46,7 @@ Acked-by: Maxime Ripard <maxime@cerno.tech>
static const struct drm_display_mode giantplus_gpg482739qs5_mode = { static const struct drm_display_mode giantplus_gpg482739qs5_mode = {
.clock = 9000, .clock = 9000,
.hdisplay = 480, .hdisplay = 480,
@@ -4105,6 +4131,9 @@ static const struct of_device_id platfor @@ -4107,6 +4133,9 @@ static const struct of_device_id platfor
.compatible = "friendlyarm,hd702e", .compatible = "friendlyarm,hd702e",
.data = &friendlyarm_hd702e, .data = &friendlyarm_hd702e,
}, { }, {

View file

@ -16,7 +16,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
--- a/drivers/media/i2c/Kconfig --- a/drivers/media/i2c/Kconfig
+++ b/drivers/media/i2c/Kconfig +++ b/drivers/media/i2c/Kconfig
@@ -395,6 +395,17 @@ config VIDEO_OV13B10 @@ -402,6 +402,17 @@ config VIDEO_OV13B10
This is a Video4Linux2 sensor driver for the OmniVision This is a Video4Linux2 sensor driver for the OmniVision
OV13B10 camera. OV13B10 camera.

View file

@ -17,7 +17,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
--- a/drivers/media/i2c/Kconfig --- a/drivers/media/i2c/Kconfig
+++ b/drivers/media/i2c/Kconfig +++ b/drivers/media/i2c/Kconfig
@@ -810,6 +810,13 @@ endmenu @@ -817,6 +817,13 @@ endif
menu "Lens drivers" menu "Lens drivers"
visible if MEDIA_CAMERA_SUPPORT visible if MEDIA_CAMERA_SUPPORT

View file

@ -25,7 +25,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
--- a/drivers/media/i2c/Kconfig --- a/drivers/media/i2c/Kconfig
+++ b/drivers/media/i2c/Kconfig +++ b/drivers/media/i2c/Kconfig
@@ -47,6 +47,17 @@ config VIDEO_AR0521 @@ -54,6 +54,17 @@ config VIDEO_AR0521
To compile this driver as a module, choose M here: the To compile this driver as a module, choose M here: the
module will be called ar0521. module will be called ar0521.

View file

@ -12,7 +12,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
--- a/drivers/media/i2c/Kconfig --- a/drivers/media/i2c/Kconfig
+++ b/drivers/media/i2c/Kconfig +++ b/drivers/media/i2c/Kconfig
@@ -409,7 +409,6 @@ config VIDEO_OV13B10 @@ -416,7 +416,6 @@ config VIDEO_OV13B10
config VIDEO_OV2311 config VIDEO_OV2311
tristate "OmniVision OV2311 sensor support" tristate "OmniVision OV2311 sensor support"
depends on I2C && VIDEO_DEV depends on I2C && VIDEO_DEV

View file

@ -12,7 +12,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
--- a/drivers/media/i2c/Kconfig --- a/drivers/media/i2c/Kconfig
+++ b/drivers/media/i2c/Kconfig +++ b/drivers/media/i2c/Kconfig
@@ -1367,7 +1367,6 @@ config VIDEO_TW2804 @@ -1374,7 +1374,6 @@ config VIDEO_TW2804
config VIDEO_OV9281 config VIDEO_OV9281
tristate "OmniVision OV9281 sensor support" tristate "OmniVision OV9281 sensor support"
depends on I2C && VIDEO_DEV depends on I2C && VIDEO_DEV

View file

@ -12,7 +12,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
--- a/drivers/media/i2c/Kconfig --- a/drivers/media/i2c/Kconfig
+++ b/drivers/media/i2c/Kconfig +++ b/drivers/media/i2c/Kconfig
@@ -1406,8 +1406,8 @@ config VIDEO_TW9910 @@ -1413,8 +1413,8 @@ config VIDEO_TW9910
config VIDEO_IRS1125 config VIDEO_IRS1125
tristate "Infineon IRS1125 sensor support" tristate "Infineon IRS1125 sensor support"

View file

@ -26,7 +26,7 @@ Signed-off-by: Lee Jackson <info@arducam.com>
--- a/drivers/media/i2c/Kconfig --- a/drivers/media/i2c/Kconfig
+++ b/drivers/media/i2c/Kconfig +++ b/drivers/media/i2c/Kconfig
@@ -47,6 +47,17 @@ config VIDEO_AR0521 @@ -54,6 +54,17 @@ config VIDEO_AR0521
To compile this driver as a module, choose M here: the To compile this driver as a module, choose M here: the
module will be called ar0521. module will be called ar0521.

View file

@ -126,7 +126,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
- MEDIA_BUS_FMT_RGB666_1X24_CPADHI - MEDIA_BUS_FMT_RGB666_1X24_CPADHI
--- a/drivers/gpu/drm/panel/panel-simple.c --- a/drivers/gpu/drm/panel/panel-simple.c
+++ b/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c
@@ -2136,6 +2136,38 @@ static const struct panel_desc innolux_a @@ -2138,6 +2138,38 @@ static const struct panel_desc innolux_a
.bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE, .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE,
}; };
@ -165,7 +165,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
static const struct drm_display_mode innolux_at070tn92_mode = { static const struct drm_display_mode innolux_at070tn92_mode = {
.clock = 33333, .clock = 33333,
.hdisplay = 800, .hdisplay = 800,
@@ -4141,6 +4173,9 @@ static const struct of_device_id platfor @@ -4143,6 +4175,9 @@ static const struct of_device_id platfor
.compatible = "innolux,at043tn24", .compatible = "innolux,at043tn24",
.data = &innolux_at043tn24, .data = &innolux_at043tn24,
}, { }, {

View file

@ -26,7 +26,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
--- a/drivers/media/i2c/Kconfig --- a/drivers/media/i2c/Kconfig
+++ b/drivers/media/i2c/Kconfig +++ b/drivers/media/i2c/Kconfig
@@ -261,6 +261,19 @@ config VIDEO_IMX519 @@ -268,6 +268,19 @@ config VIDEO_IMX519
To compile this driver as a module, choose M here: the To compile this driver as a module, choose M here: the
module will be called IMX519. module will be called IMX519.

View file

@ -33,7 +33,7 @@ Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
M: Bingbu Cao <bingbu.cao@intel.com> M: Bingbu Cao <bingbu.cao@intel.com>
--- a/drivers/media/i2c/Kconfig --- a/drivers/media/i2c/Kconfig
+++ b/drivers/media/i2c/Kconfig +++ b/drivers/media/i2c/Kconfig
@@ -184,6 +184,19 @@ config VIDEO_IMX290 @@ -191,6 +191,19 @@ config VIDEO_IMX290
To compile this driver as a module, choose M here: the To compile this driver as a module, choose M here: the
module will be called imx290. module will be called imx290.

View file

@ -15,7 +15,7 @@ Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
--- a/drivers/char/hw_random/iproc-rng200.c --- a/drivers/char/hw_random/iproc-rng200.c
+++ b/drivers/char/hw_random/iproc-rng200.c +++ b/drivers/char/hw_random/iproc-rng200.c
@@ -250,6 +250,7 @@ static int iproc_rng200_probe(struct pla @@ -252,6 +252,7 @@ static int iproc_rng200_probe(struct pla
priv->rng.name = pdev->name; priv->rng.name = pdev->name;
priv->rng.cleanup = iproc_rng200_cleanup; priv->rng.cleanup = iproc_rng200_cleanup;

View file

@ -1,32 +0,0 @@
From 05d2c3d552b8c92fc397377d9d1112fc58e2cd59 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
Date: Fri, 7 Jul 2023 13:40:02 +0200
Subject: [PATCH] ARM: dts: BCM53573: Drop nonexistent #usb-cells
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Such property simply doesn't exist (is not documented or used anywhere).
This fixes:
arch/arm/boot/dts/broadcom/bcm47189-luxul-xap-1440.dtb: usb@d000: Unevaluated properties are not allowed ('#usb-cells' was unexpected)
From schema: Documentation/devicetree/bindings/usb/generic-ohci.yaml
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Link: https://lore.kernel.org/r/20230707114004.2740-2-zajec5@gmail.com
Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
---
arch/arm/boot/dts/broadcom/bcm53573.dtsi | 2 --
1 file changed, 2 deletions(-)
--- a/arch/arm/boot/dts/bcm53573.dtsi
+++ b/arch/arm/boot/dts/bcm53573.dtsi
@@ -156,8 +156,6 @@
};
ohci: usb@d000 {
- #usb-cells = <0>;
-
compatible = "generic-ohci";
reg = <0xd000 0x1000>;
interrupt-parent = <&gic>;

View file

@ -1,37 +0,0 @@
From 3392ef368d9b04622fe758b1079b512664b6110a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
Date: Fri, 7 Jul 2023 13:40:03 +0200
Subject: [PATCH] ARM: dts: BCM53573: Add cells sizes to PCIe node
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This fixes:
arch/arm/boot/dts/broadcom/bcm47189-luxul-xap-1440.dtb: pcie@2000: '#address-cells' is a required property
From schema: /lib/python3.10/site-packages/dtschema/schemas/pci/pci-bus.yaml
arch/arm/boot/dts/broadcom/bcm47189-luxul-xap-1440.dtb: pcie@2000: '#size-cells' is a required property
From schema: /lib/python3.10/site-packages/dtschema/schemas/pci/pci-bus.yaml
Two properties that need to be added later are "device_type" and
"ranges". Adding "device_type" on its own causes a new warning and the
value of "ranges" needs to be determined yet.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Link: https://lore.kernel.org/r/20230707114004.2740-3-zajec5@gmail.com
Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
---
arch/arm/boot/dts/broadcom/bcm53573.dtsi | 3 +++
1 file changed, 3 insertions(+)
--- a/arch/arm/boot/dts/bcm53573.dtsi
+++ b/arch/arm/boot/dts/bcm53573.dtsi
@@ -127,6 +127,9 @@
pcie0: pcie@2000 {
reg = <0x00002000 0x1000>;
+
+ #address-cells = <3>;
+ #size-cells = <2>;
};
usb2: usb2@4000 {

View file

@ -1,44 +0,0 @@
From 2c0fd6b3d0778ceab40205315ccef74568490f17 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
Date: Fri, 7 Jul 2023 13:40:04 +0200
Subject: [PATCH] ARM: dts: BCM53573: Use updated "spi-gpio" binding properties
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Switch away from deprecated properties.
This fixes:
arch/arm/boot/dts/broadcom/bcm947189acdbmr.dtb: spi: gpio-sck: False schema does not allow [[3, 21, 0]]
From schema: Documentation/devicetree/bindings/spi/spi-gpio.yaml
arch/arm/boot/dts/broadcom/bcm947189acdbmr.dtb: spi: gpio-miso: False schema does not allow [[3, 22, 0]]
From schema: Documentation/devicetree/bindings/spi/spi-gpio.yaml
arch/arm/boot/dts/broadcom/bcm947189acdbmr.dtb: spi: gpio-mosi: False schema does not allow [[3, 23, 0]]
From schema: Documentation/devicetree/bindings/spi/spi-gpio.yaml
arch/arm/boot/dts/broadcom/bcm947189acdbmr.dtb: spi: 'sck-gpios' is a required property
From schema: Documentation/devicetree/bindings/spi/spi-gpio.yaml
arch/arm/boot/dts/broadcom/bcm947189acdbmr.dtb: spi: Unevaluated properties are not allowed ('gpio-miso', 'gpio-mosi', 'gpio-sck' were unexpected)
From schema: Documentation/devicetree/bindings/spi/spi-gpio.yaml
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Link: https://lore.kernel.org/r/20230707114004.2740-4-zajec5@gmail.com
Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
---
arch/arm/boot/dts/broadcom/bcm947189acdbmr.dts | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--- a/arch/arm/boot/dts/bcm947189acdbmr.dts
+++ b/arch/arm/boot/dts/bcm947189acdbmr.dts
@@ -60,9 +60,9 @@
spi {
compatible = "spi-gpio";
num-chipselects = <1>;
- gpio-sck = <&chipcommon 21 0>;
- gpio-miso = <&chipcommon 22 0>;
- gpio-mosi = <&chipcommon 23 0>;
+ sck-gpios = <&chipcommon 21 0>;
+ miso-gpios = <&chipcommon 22 0>;
+ mosi-gpios = <&chipcommon 23 0>;
cs-gpios = <&chipcommon 24 0>;
#address-cells = <1>;
#size-cells = <0>;

View file

@ -37,7 +37,7 @@ Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
--- a/arch/arm/boot/dts/bcm47189-luxul-xap-1440.dts --- a/arch/arm/boot/dts/bcm47189-luxul-xap-1440.dts
+++ b/arch/arm/boot/dts/bcm47189-luxul-xap-1440.dts +++ b/arch/arm/boot/dts/bcm47189-luxul-xap-1440.dts
@@ -45,3 +45,16 @@ @@ -58,3 +58,16 @@
}; };
}; };
}; };
@ -56,7 +56,7 @@ Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
+}; +};
--- a/arch/arm/boot/dts/bcm47189-luxul-xap-810.dts --- a/arch/arm/boot/dts/bcm47189-luxul-xap-810.dts
+++ b/arch/arm/boot/dts/bcm47189-luxul-xap-810.dts +++ b/arch/arm/boot/dts/bcm47189-luxul-xap-810.dts
@@ -81,3 +81,16 @@ @@ -94,3 +94,16 @@
}; };
}; };
}; };

View file

@ -1,31 +0,0 @@
From 7141209db9c335ab261a17933809a3e660ebdc12 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
Date: Sun, 23 Jul 2023 21:54:14 +0200
Subject: [PATCH] ARM: dts: BCM53573: Fix Tenda AC9 switch CPU port
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Primary Ethernet interface is connected to the port 8 (not 5).
Fixes: 64612828628c ("ARM: dts: BCM53573: Add Tenda AC9 switch ports")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Link: https://lore.kernel.org/r/20230723195416.7831-1-zajec5@gmail.com
Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
---
arch/arm/boot/dts/broadcom/bcm47189-tenda-ac9.dts | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/arch/arm/boot/dts/bcm47189-tenda-ac9.dts
+++ b/arch/arm/boot/dts/bcm47189-tenda-ac9.dts
@@ -135,8 +135,8 @@
label = "lan4";
};
- port@5 {
- reg = <5>;
+ port@8 {
+ reg = <8>;
label = "cpu";
ethernet = <&gmac0>;
};

View file

@ -19,7 +19,7 @@ Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
--- a/arch/arm/boot/dts/bcm47189-luxul-xap-1440.dts --- a/arch/arm/boot/dts/bcm47189-luxul-xap-1440.dts
+++ b/arch/arm/boot/dts/bcm47189-luxul-xap-1440.dts +++ b/arch/arm/boot/dts/bcm47189-luxul-xap-1440.dts
@@ -60,3 +60,7 @@ @@ -73,3 +73,7 @@
}; };
}; };
}; };
@ -29,7 +29,7 @@ Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
+}; +};
--- a/arch/arm/boot/dts/bcm47189-luxul-xap-810.dts --- a/arch/arm/boot/dts/bcm47189-luxul-xap-810.dts
+++ b/arch/arm/boot/dts/bcm47189-luxul-xap-810.dts +++ b/arch/arm/boot/dts/bcm47189-luxul-xap-810.dts
@@ -96,3 +96,7 @@ @@ -109,3 +109,7 @@
}; };
}; };
}; };

View file

@ -61,7 +61,7 @@ Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
#include <linux/clockchips.h> #include <linux/clockchips.h>
#include <linux/clocksource.h> #include <linux/clocksource.h>
#include <linux/clocksource_ids.h> #include <linux/clocksource_ids.h>
@@ -1021,6 +1022,16 @@ static void __init arch_timer_of_configu @@ -1028,6 +1029,16 @@ static void __init arch_timer_of_configu
if (of_property_read_u32(np, "clock-frequency", &arch_timer_rate)) if (of_property_read_u32(np, "clock-frequency", &arch_timer_rate))
arch_timer_rate = rate; arch_timer_rate = rate;

View file

@ -13,7 +13,7 @@ Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
--- a/arch/mips/Kconfig --- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig +++ b/arch/mips/Kconfig
@@ -275,19 +275,13 @@ config BMIPS_GENERIC @@ -274,19 +274,13 @@ config BMIPS_GENERIC
select SYNC_R4K select SYNC_R4K
select COMMON_CLK select COMMON_CLK
select BCM6345_L1_IRQ select BCM6345_L1_IRQ
@ -33,7 +33,7 @@ Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
select SWAP_IO_SPACE select SWAP_IO_SPACE
select USB_EHCI_BIG_ENDIAN_DESC if CPU_BIG_ENDIAN select USB_EHCI_BIG_ENDIAN_DESC if CPU_BIG_ENDIAN
select USB_EHCI_BIG_ENDIAN_MMIO if CPU_BIG_ENDIAN select USB_EHCI_BIG_ENDIAN_MMIO if CPU_BIG_ENDIAN
@@ -297,6 +291,7 @@ config BMIPS_GENERIC @@ -296,6 +290,7 @@ config BMIPS_GENERIC
select HAVE_PCI select HAVE_PCI
select PCI_DRIVERS_GENERIC select PCI_DRIVERS_GENERIC
select FW_CFE select FW_CFE

View file

@ -14,7 +14,7 @@ Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
--- a/arch/mips/Kconfig --- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig +++ b/arch/mips/Kconfig
@@ -289,7 +289,6 @@ config BMIPS_GENERIC @@ -288,7 +288,6 @@ config BMIPS_GENERIC
select USB_OHCI_BIG_ENDIAN_MMIO if CPU_BIG_ENDIAN select USB_OHCI_BIG_ENDIAN_MMIO if CPU_BIG_ENDIAN
select HARDIRQS_SW_RESEND select HARDIRQS_SW_RESEND
select HAVE_PCI select HAVE_PCI

View file

@ -256,9 +256,9 @@ Signed-off-by: T.J. Mercier <tjmercier@google.com>
- struct lru_gen_struct *lrugen = &lruvec->lrugen; - struct lru_gen_struct *lrugen = &lruvec->lrugen;
+ struct lru_gen_folio *lrugen = &lruvec->lrugen; + struct lru_gen_folio *lrugen = &lruvec->lrugen;
restart:
spin_lock_irq(&lruvec->lru_lock); spin_lock_irq(&lruvec->lru_lock);
@@ -4389,7 +4389,7 @@ static bool try_to_inc_max_seq(struct lr
@@ -4387,7 +4387,7 @@ static bool try_to_inc_max_seq(struct lr
bool success; bool success;
struct lru_gen_mm_walk *walk; struct lru_gen_mm_walk *walk;
struct mm_struct *mm = NULL; struct mm_struct *mm = NULL;
@ -267,7 +267,7 @@ Signed-off-by: T.J. Mercier <tjmercier@google.com>
VM_WARN_ON_ONCE(max_seq > READ_ONCE(lrugen->max_seq)); VM_WARN_ON_ONCE(max_seq > READ_ONCE(lrugen->max_seq));
@@ -4452,7 +4452,7 @@ static bool should_run_aging(struct lruv @@ -4454,7 +4454,7 @@ static bool should_run_aging(struct lruv
unsigned long old = 0; unsigned long old = 0;
unsigned long young = 0; unsigned long young = 0;
unsigned long total = 0; unsigned long total = 0;
@ -276,7 +276,7 @@ Signed-off-by: T.J. Mercier <tjmercier@google.com>
struct mem_cgroup *memcg = lruvec_memcg(lruvec); struct mem_cgroup *memcg = lruvec_memcg(lruvec);
for (type = !can_swap; type < ANON_AND_FILE; type++) { for (type = !can_swap; type < ANON_AND_FILE; type++) {
@@ -4737,7 +4737,7 @@ static bool sort_folio(struct lruvec *lr @@ -4740,7 +4740,7 @@ static bool sort_folio(struct lruvec *lr
int delta = folio_nr_pages(folio); int delta = folio_nr_pages(folio);
int refs = folio_lru_refs(folio); int refs = folio_lru_refs(folio);
int tier = lru_tier_from_refs(refs); int tier = lru_tier_from_refs(refs);
@ -285,7 +285,7 @@ Signed-off-by: T.J. Mercier <tjmercier@google.com>
VM_WARN_ON_ONCE_FOLIO(gen >= MAX_NR_GENS, folio); VM_WARN_ON_ONCE_FOLIO(gen >= MAX_NR_GENS, folio);
@@ -4837,7 +4837,7 @@ static int scan_folios(struct lruvec *lr @@ -4848,7 +4848,7 @@ static int scan_folios(struct lruvec *lr
int scanned = 0; int scanned = 0;
int isolated = 0; int isolated = 0;
int remaining = MAX_LRU_BATCH; int remaining = MAX_LRU_BATCH;
@ -294,7 +294,7 @@ Signed-off-by: T.J. Mercier <tjmercier@google.com>
struct mem_cgroup *memcg = lruvec_memcg(lruvec); struct mem_cgroup *memcg = lruvec_memcg(lruvec);
VM_WARN_ON_ONCE(!list_empty(list)); VM_WARN_ON_ONCE(!list_empty(list));
@@ -5237,7 +5237,7 @@ done: @@ -5249,7 +5249,7 @@ done:
static bool __maybe_unused state_is_valid(struct lruvec *lruvec) static bool __maybe_unused state_is_valid(struct lruvec *lruvec)
{ {
@ -303,7 +303,7 @@ Signed-off-by: T.J. Mercier <tjmercier@google.com>
if (lrugen->enabled) { if (lrugen->enabled) {
enum lru_list lru; enum lru_list lru;
@@ -5519,7 +5519,7 @@ static void lru_gen_seq_show_full(struct @@ -5531,7 +5531,7 @@ static void lru_gen_seq_show_full(struct
int i; int i;
int type, tier; int type, tier;
int hist = lru_hist_from_seq(seq); int hist = lru_hist_from_seq(seq);
@ -312,7 +312,7 @@ Signed-off-by: T.J. Mercier <tjmercier@google.com>
for (tier = 0; tier < MAX_NR_TIERS; tier++) { for (tier = 0; tier < MAX_NR_TIERS; tier++) {
seq_printf(m, " %10d", tier); seq_printf(m, " %10d", tier);
@@ -5569,7 +5569,7 @@ static int lru_gen_seq_show(struct seq_f @@ -5581,7 +5581,7 @@ static int lru_gen_seq_show(struct seq_f
unsigned long seq; unsigned long seq;
bool full = !debugfs_real_fops(m->file)->write; bool full = !debugfs_real_fops(m->file)->write;
struct lruvec *lruvec = v; struct lruvec *lruvec = v;
@ -321,7 +321,7 @@ Signed-off-by: T.J. Mercier <tjmercier@google.com>
int nid = lruvec_pgdat(lruvec)->node_id; int nid = lruvec_pgdat(lruvec)->node_id;
struct mem_cgroup *memcg = lruvec_memcg(lruvec); struct mem_cgroup *memcg = lruvec_memcg(lruvec);
DEFINE_MAX_SEQ(lruvec); DEFINE_MAX_SEQ(lruvec);
@@ -5823,7 +5823,7 @@ void lru_gen_init_lruvec(struct lruvec * @@ -5835,7 +5835,7 @@ void lru_gen_init_lruvec(struct lruvec *
{ {
int i; int i;
int gen, type, zone; int gen, type, zone;

View file

@ -1,197 +0,0 @@
From 656287d55d9cfc72a4bcd4d9bd098570f12ce409 Mon Sep 17 00:00:00 2001
From: Yu Zhao <yuzhao@google.com>
Date: Wed, 21 Dec 2022 21:19:00 -0700
Subject: [PATCH 02/19] UPSTREAM: mm: multi-gen LRU: rename lrugen->lists[] to
lrugen->folios[]
lru_gen_folio will be chained into per-node lists by the coming
lrugen->list.
Link: https://lkml.kernel.org/r/20221222041905.2431096-3-yuzhao@google.com
Signed-off-by: Yu Zhao <yuzhao@google.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Michael Larabel <Michael@MichaelLarabel.com>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Roman Gushchin <roman.gushchin@linux.dev>
Cc: Suren Baghdasaryan <surenb@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Bug: 274865848
(cherry picked from commit 6df1b2212950aae2b2188c6645ea18e2a9e3fdd5)
Change-Id: I09f53e0fb2cd6b8b3adbb8a80b15dc5efbeae857
Signed-off-by: T.J. Mercier <tjmercier@google.com>
---
Documentation/mm/multigen_lru.rst | 8 ++++----
include/linux/mm_inline.h | 4 ++--
include/linux/mmzone.h | 8 ++++----
mm/vmscan.c | 20 ++++++++++----------
4 files changed, 20 insertions(+), 20 deletions(-)
--- a/Documentation/mm/multigen_lru.rst
+++ b/Documentation/mm/multigen_lru.rst
@@ -89,15 +89,15 @@ variables are monotonically increasing.
Generation numbers are truncated into ``order_base_2(MAX_NR_GENS+1)``
bits in order to fit into the gen counter in ``folio->flags``. Each
-truncated generation number is an index to ``lrugen->lists[]``. The
+truncated generation number is an index to ``lrugen->folios[]``. The
sliding window technique is used to track at least ``MIN_NR_GENS`` and
at most ``MAX_NR_GENS`` generations. The gen counter stores a value
within ``[1, MAX_NR_GENS]`` while a page is on one of
-``lrugen->lists[]``; otherwise it stores zero.
+``lrugen->folios[]``; otherwise it stores zero.
Each generation is divided into multiple tiers. A page accessed ``N``
times through file descriptors is in tier ``order_base_2(N)``. Unlike
-generations, tiers do not have dedicated ``lrugen->lists[]``. In
+generations, tiers do not have dedicated ``lrugen->folios[]``. In
contrast to moving across generations, which requires the LRU lock,
moving across tiers only involves atomic operations on
``folio->flags`` and therefore has a negligible cost. A feedback loop
@@ -127,7 +127,7 @@ page mapped by this PTE to ``(max_seq%MA
Eviction
--------
The eviction consumes old generations. Given an ``lruvec``, it
-increments ``min_seq`` when ``lrugen->lists[]`` indexed by
+increments ``min_seq`` when ``lrugen->folios[]`` indexed by
``min_seq%MAX_NR_GENS`` becomes empty. To select a type and a tier to
evict from, it first compares ``min_seq[]`` to select the older type.
If both types are equally old, it selects the one whose first tier has
--- a/include/linux/mm_inline.h
+++ b/include/linux/mm_inline.h
@@ -256,9 +256,9 @@ static inline bool lru_gen_add_folio(str
lru_gen_update_size(lruvec, folio, -1, gen);
/* for folio_rotate_reclaimable() */
if (reclaiming)
- list_add_tail(&folio->lru, &lrugen->lists[gen][type][zone]);
+ list_add_tail(&folio->lru, &lrugen->folios[gen][type][zone]);
else
- list_add(&folio->lru, &lrugen->lists[gen][type][zone]);
+ list_add(&folio->lru, &lrugen->folios[gen][type][zone]);
return true;
}
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -312,7 +312,7 @@ enum lruvec_flags {
* They form a sliding window of a variable size [MIN_NR_GENS, MAX_NR_GENS]. An
* offset within MAX_NR_GENS, i.e., gen, indexes the LRU list of the
* corresponding generation. The gen counter in folio->flags stores gen+1 while
- * a page is on one of lrugen->lists[]. Otherwise it stores 0.
+ * a page is on one of lrugen->folios[]. Otherwise it stores 0.
*
* A page is added to the youngest generation on faulting. The aging needs to
* check the accessed bit at least twice before handing this page over to the
@@ -324,8 +324,8 @@ enum lruvec_flags {
* rest of generations, if they exist, are considered inactive. See
* lru_gen_is_active().
*
- * PG_active is always cleared while a page is on one of lrugen->lists[] so that
- * the aging needs not to worry about it. And it's set again when a page
+ * PG_active is always cleared while a page is on one of lrugen->folios[] so
+ * that the aging needs not to worry about it. And it's set again when a page
* considered active is isolated for non-reclaiming purposes, e.g., migration.
* See lru_gen_add_folio() and lru_gen_del_folio().
*
@@ -412,7 +412,7 @@ struct lru_gen_folio {
/* the birth time of each generation in jiffies */
unsigned long timestamps[MAX_NR_GENS];
/* the multi-gen LRU lists, lazily sorted on eviction */
- struct list_head lists[MAX_NR_GENS][ANON_AND_FILE][MAX_NR_ZONES];
+ struct list_head folios[MAX_NR_GENS][ANON_AND_FILE][MAX_NR_ZONES];
/* the multi-gen LRU sizes, eventually consistent */
long nr_pages[MAX_NR_GENS][ANON_AND_FILE][MAX_NR_ZONES];
/* the exponential moving average of refaulted */
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -4258,7 +4258,7 @@ static bool inc_min_seq(struct lruvec *l
/* prevent cold/hot inversion if force_scan is true */
for (zone = 0; zone < MAX_NR_ZONES; zone++) {
- struct list_head *head = &lrugen->lists[old_gen][type][zone];
+ struct list_head *head = &lrugen->folios[old_gen][type][zone];
while (!list_empty(head)) {
struct folio *folio = lru_to_folio(head);
@@ -4269,7 +4269,7 @@ static bool inc_min_seq(struct lruvec *l
VM_WARN_ON_ONCE_FOLIO(folio_zonenum(folio) != zone, folio);
new_gen = folio_inc_gen(lruvec, folio, false);
- list_move_tail(&folio->lru, &lrugen->lists[new_gen][type][zone]);
+ list_move_tail(&folio->lru, &lrugen->folios[new_gen][type][zone]);
if (!--remaining)
return false;
@@ -4297,7 +4297,7 @@ static bool try_to_inc_min_seq(struct lr
gen = lru_gen_from_seq(min_seq[type]);
for (zone = 0; zone < MAX_NR_ZONES; zone++) {
- if (!list_empty(&lrugen->lists[gen][type][zone]))
+ if (!list_empty(&lrugen->folios[gen][type][zone]))
goto next;
}
@@ -4762,7 +4762,7 @@ static bool sort_folio(struct lruvec *lr
/* promoted */
if (gen != lru_gen_from_seq(lrugen->min_seq[type])) {
- list_move(&folio->lru, &lrugen->lists[gen][type][zone]);
+ list_move(&folio->lru, &lrugen->folios[gen][type][zone]);
return true;
}
@@ -4771,7 +4771,7 @@ static bool sort_folio(struct lruvec *lr
int hist = lru_hist_from_seq(lrugen->min_seq[type]);
gen = folio_inc_gen(lruvec, folio, false);
- list_move_tail(&folio->lru, &lrugen->lists[gen][type][zone]);
+ list_move_tail(&folio->lru, &lrugen->folios[gen][type][zone]);
WRITE_ONCE(lrugen->protected[hist][type][tier - 1],
lrugen->protected[hist][type][tier - 1] + delta);
@@ -4783,7 +4783,7 @@ static bool sort_folio(struct lruvec *lr
if (folio_test_locked(folio) || folio_test_writeback(folio) ||
(type == LRU_GEN_FILE && folio_test_dirty(folio))) {
gen = folio_inc_gen(lruvec, folio, true);
- list_move(&folio->lru, &lrugen->lists[gen][type][zone]);
+ list_move(&folio->lru, &lrugen->folios[gen][type][zone]);
return true;
}
@@ -4850,7 +4850,7 @@ static int scan_folios(struct lruvec *lr
for (zone = sc->reclaim_idx; zone >= 0; zone--) {
LIST_HEAD(moved);
int skipped = 0;
- struct list_head *head = &lrugen->lists[gen][type][zone];
+ struct list_head *head = &lrugen->folios[gen][type][zone];
while (!list_empty(head)) {
struct folio *folio = lru_to_folio(head);
@@ -5250,7 +5250,7 @@ static bool __maybe_unused state_is_vali
int gen, type, zone;
for_each_gen_type_zone(gen, type, zone) {
- if (!list_empty(&lrugen->lists[gen][type][zone]))
+ if (!list_empty(&lrugen->folios[gen][type][zone]))
return false;
}
}
@@ -5295,7 +5295,7 @@ static bool drain_evictable(struct lruve
int remaining = MAX_LRU_BATCH;
for_each_gen_type_zone(gen, type, zone) {
- struct list_head *head = &lruvec->lrugen.lists[gen][type][zone];
+ struct list_head *head = &lruvec->lrugen.folios[gen][type][zone];
while (!list_empty(head)) {
bool success;
@@ -5832,7 +5832,7 @@ void lru_gen_init_lruvec(struct lruvec *
lrugen->timestamps[i] = jiffies;
for_each_gen_type_zone(gen, type, zone)
- INIT_LIST_HEAD(&lrugen->lists[gen][type][zone]);
+ INIT_LIST_HEAD(&lrugen->folios[gen][type][zone]);
lruvec->mm_state.seq = MIN_NR_GENS;
init_waitqueue_head(&lruvec->mm_state.wait);

View file

@ -66,7 +66,7 @@ Signed-off-by: T.J. Mercier <tjmercier@google.com>
static bool writeback_throttling_sane(struct scan_control *sc) static bool writeback_throttling_sane(struct scan_control *sc)
{ {
return true; return true;
@@ -4993,8 +5003,7 @@ static int isolate_folios(struct lruvec @@ -5005,8 +5015,7 @@ static int isolate_folios(struct lruvec
return scanned; return scanned;
} }
@ -76,7 +76,7 @@ Signed-off-by: T.J. Mercier <tjmercier@google.com>
{ {
int type; int type;
int scanned; int scanned;
@@ -5083,9 +5092,6 @@ retry: @@ -5095,9 +5104,6 @@ retry:
goto retry; goto retry;
} }
@ -86,7 +86,7 @@ Signed-off-by: T.J. Mercier <tjmercier@google.com>
return scanned; return scanned;
} }
@@ -5124,67 +5130,26 @@ done: @@ -5136,67 +5142,26 @@ done:
return min_seq[!can_swap] + MIN_NR_GENS <= max_seq ? nr_to_scan : 0; return min_seq[!can_swap] + MIN_NR_GENS <= max_seq ? nr_to_scan : 0;
} }
@ -163,7 +163,7 @@ Signed-off-by: T.J. Mercier <tjmercier@google.com>
lru_add_drain(); lru_add_drain();
@@ -5208,7 +5173,7 @@ static void lru_gen_shrink_lruvec(struct @@ -5220,7 +5185,7 @@ static void lru_gen_shrink_lruvec(struct
if (!nr_to_scan) if (!nr_to_scan)
goto done; goto done;
@ -172,7 +172,7 @@ Signed-off-by: T.J. Mercier <tjmercier@google.com>
if (!delta) if (!delta)
goto done; goto done;
@@ -5216,7 +5181,7 @@ static void lru_gen_shrink_lruvec(struct @@ -5228,7 +5193,7 @@ static void lru_gen_shrink_lruvec(struct
if (scanned >= nr_to_scan) if (scanned >= nr_to_scan)
break; break;
@ -181,7 +181,7 @@ Signed-off-by: T.J. Mercier <tjmercier@google.com>
break; break;
cond_resched(); cond_resched();
@@ -5666,7 +5631,7 @@ static int run_eviction(struct lruvec *l @@ -5678,7 +5643,7 @@ static int run_eviction(struct lruvec *l
if (sc->nr_reclaimed >= nr_to_reclaim) if (sc->nr_reclaimed >= nr_to_reclaim)
return 0; return 0;

View file

@ -52,7 +52,7 @@ Signed-off-by: T.J. Mercier <tjmercier@google.com>
unsigned long last_reclaimed; unsigned long last_reclaimed;
#endif #endif
@@ -4455,7 +4454,7 @@ done: @@ -4457,7 +4456,7 @@ done:
return true; return true;
} }
@ -61,7 +61,7 @@ Signed-off-by: T.J. Mercier <tjmercier@google.com>
struct scan_control *sc, bool can_swap, unsigned long *nr_to_scan) struct scan_control *sc, bool can_swap, unsigned long *nr_to_scan)
{ {
int gen, type, zone; int gen, type, zone;
@@ -4464,6 +4463,13 @@ static bool should_run_aging(struct lruv @@ -4466,6 +4465,13 @@ static bool should_run_aging(struct lruv
unsigned long total = 0; unsigned long total = 0;
struct lru_gen_folio *lrugen = &lruvec->lrugen; struct lru_gen_folio *lrugen = &lruvec->lrugen;
struct mem_cgroup *memcg = lruvec_memcg(lruvec); struct mem_cgroup *memcg = lruvec_memcg(lruvec);
@ -75,7 +75,7 @@ Signed-off-by: T.J. Mercier <tjmercier@google.com>
for (type = !can_swap; type < ANON_AND_FILE; type++) { for (type = !can_swap; type < ANON_AND_FILE; type++) {
unsigned long seq; unsigned long seq;
@@ -4492,8 +4498,6 @@ static bool should_run_aging(struct lruv @@ -4494,8 +4500,6 @@ static bool should_run_aging(struct lruv
* stalls when the number of generations reaches MIN_NR_GENS. Hence, the * stalls when the number of generations reaches MIN_NR_GENS. Hence, the
* ideal number of generations is MIN_NR_GENS+1. * ideal number of generations is MIN_NR_GENS+1.
*/ */
@ -84,7 +84,7 @@ Signed-off-by: T.J. Mercier <tjmercier@google.com>
if (min_seq[!can_swap] + MIN_NR_GENS < max_seq) if (min_seq[!can_swap] + MIN_NR_GENS < max_seq)
return false; return false;
@@ -4512,40 +4516,54 @@ static bool should_run_aging(struct lruv @@ -4514,40 +4518,54 @@ static bool should_run_aging(struct lruv
return false; return false;
} }
@ -160,7 +160,7 @@ Signed-off-by: T.J. Mercier <tjmercier@google.com>
} }
/* to protect the working set of the last N jiffies */ /* to protect the working set of the last N jiffies */
@@ -4554,46 +4572,32 @@ static unsigned long lru_gen_min_ttl __r @@ -4556,46 +4574,32 @@ static unsigned long lru_gen_min_ttl __r
static void lru_gen_age_node(struct pglist_data *pgdat, struct scan_control *sc) static void lru_gen_age_node(struct pglist_data *pgdat, struct scan_control *sc)
{ {
struct mem_cgroup *memcg; struct mem_cgroup *memcg;
@ -214,7 +214,7 @@ Signed-off-by: T.J. Mercier <tjmercier@google.com>
*/ */
if (mutex_trylock(&oom_lock)) { if (mutex_trylock(&oom_lock)) {
struct oom_control oc = { struct oom_control oc = {
@@ -5101,33 +5105,27 @@ retry: @@ -5113,33 +5117,27 @@ retry:
* reclaim. * reclaim.
*/ */
static unsigned long get_nr_to_scan(struct lruvec *lruvec, struct scan_control *sc, static unsigned long get_nr_to_scan(struct lruvec *lruvec, struct scan_control *sc,
@ -254,7 +254,7 @@ Signed-off-by: T.J. Mercier <tjmercier@google.com>
} }
static unsigned long get_nr_to_reclaim(struct scan_control *sc) static unsigned long get_nr_to_reclaim(struct scan_control *sc)
@@ -5146,9 +5144,7 @@ static unsigned long get_nr_to_reclaim(s @@ -5158,9 +5156,7 @@ static unsigned long get_nr_to_reclaim(s
static void lru_gen_shrink_lruvec(struct lruvec *lruvec, struct scan_control *sc) static void lru_gen_shrink_lruvec(struct lruvec *lruvec, struct scan_control *sc)
{ {
struct blk_plug plug; struct blk_plug plug;
@ -264,7 +264,7 @@ Signed-off-by: T.J. Mercier <tjmercier@google.com>
unsigned long nr_to_reclaim = get_nr_to_reclaim(sc); unsigned long nr_to_reclaim = get_nr_to_reclaim(sc);
lru_add_drain(); lru_add_drain();
@@ -5169,13 +5165,13 @@ static void lru_gen_shrink_lruvec(struct @@ -5181,13 +5177,13 @@ static void lru_gen_shrink_lruvec(struct
else else
swappiness = 0; swappiness = 0;
@ -281,7 +281,7 @@ Signed-off-by: T.J. Mercier <tjmercier@google.com>
scanned += delta; scanned += delta;
if (scanned >= nr_to_scan) if (scanned >= nr_to_scan)
@@ -5187,10 +5183,6 @@ static void lru_gen_shrink_lruvec(struct @@ -5199,10 +5195,6 @@ static void lru_gen_shrink_lruvec(struct
cond_resched(); cond_resched();
} }

View file

@ -26,7 +26,7 @@ Signed-off-by: T.J. Mercier <tjmercier@google.com>
--- a/mm/vmscan.c --- a/mm/vmscan.c
+++ b/mm/vmscan.c +++ b/mm/vmscan.c
@@ -4454,68 +4454,6 @@ done: @@ -4456,68 +4456,6 @@ done:
return true; return true;
} }
@ -95,7 +95,7 @@ Signed-off-by: T.J. Mercier <tjmercier@google.com>
static bool lruvec_is_sizable(struct lruvec *lruvec, struct scan_control *sc) static bool lruvec_is_sizable(struct lruvec *lruvec, struct scan_control *sc)
{ {
int gen, type, zone; int gen, type, zone;
@@ -5099,6 +5037,68 @@ retry: @@ -5111,6 +5049,68 @@ retry:
return scanned; return scanned;
} }

View file

@ -76,7 +76,7 @@ Signed-off-by: T.J. Mercier <tjmercier@google.com>
--- a/include/linux/memcontrol.h --- a/include/linux/memcontrol.h
+++ b/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h
@@ -790,6 +790,11 @@ static inline void obj_cgroup_put(struct @@ -795,6 +795,11 @@ static inline void obj_cgroup_put(struct
percpu_ref_put(&objcg->refcnt); percpu_ref_put(&objcg->refcnt);
} }
@ -88,7 +88,7 @@ Signed-off-by: T.J. Mercier <tjmercier@google.com>
static inline void mem_cgroup_put(struct mem_cgroup *memcg) static inline void mem_cgroup_put(struct mem_cgroup *memcg)
{ {
if (memcg) if (memcg)
@@ -1290,6 +1295,11 @@ static inline void obj_cgroup_put(struct @@ -1295,6 +1300,11 @@ static inline void obj_cgroup_put(struct
{ {
} }
@ -335,7 +335,7 @@ Signed-off-by: T.J. Mercier <tjmercier@google.com>
if (order > 0) if (order > 0)
return 0; return 0;
@@ -5383,6 +5396,7 @@ static int mem_cgroup_css_online(struct @@ -5373,6 +5386,7 @@ static int mem_cgroup_css_online(struct
if (unlikely(mem_cgroup_is_root(memcg))) if (unlikely(mem_cgroup_is_root(memcg)))
queue_delayed_work(system_unbound_wq, &stats_flush_dwork, queue_delayed_work(system_unbound_wq, &stats_flush_dwork,
2UL*HZ); 2UL*HZ);
@ -343,7 +343,7 @@ Signed-off-by: T.J. Mercier <tjmercier@google.com>
return 0; return 0;
offline_kmem: offline_kmem:
memcg_offline_kmem(memcg); memcg_offline_kmem(memcg);
@@ -5414,6 +5428,7 @@ static void mem_cgroup_css_offline(struc @@ -5404,6 +5418,7 @@ static void mem_cgroup_css_offline(struc
memcg_offline_kmem(memcg); memcg_offline_kmem(memcg);
reparent_shrinker_deferred(memcg); reparent_shrinker_deferred(memcg);
wb_memcg_offline(memcg); wb_memcg_offline(memcg);
@ -351,7 +351,7 @@ Signed-off-by: T.J. Mercier <tjmercier@google.com>
drain_all_stock(memcg); drain_all_stock(memcg);
@@ -5425,6 +5440,7 @@ static void mem_cgroup_css_released(stru @@ -5415,6 +5430,7 @@ static void mem_cgroup_css_released(stru
struct mem_cgroup *memcg = mem_cgroup_from_css(css); struct mem_cgroup *memcg = mem_cgroup_from_css(css);
invalidate_reclaim_iterators(memcg); invalidate_reclaim_iterators(memcg);
@ -402,7 +402,7 @@ Signed-off-by: T.J. Mercier <tjmercier@google.com>
static struct lruvec *get_lruvec(struct mem_cgroup *memcg, int nid) static struct lruvec *get_lruvec(struct mem_cgroup *memcg, int nid)
{ {
struct pglist_data *pgdat = NODE_DATA(nid); struct pglist_data *pgdat = NODE_DATA(nid);
@@ -4440,8 +4440,7 @@ done: @@ -4442,8 +4442,7 @@ done:
if (sc->priority <= DEF_PRIORITY - 2) if (sc->priority <= DEF_PRIORITY - 2)
wait_event_killable(lruvec->mm_state.wait, wait_event_killable(lruvec->mm_state.wait,
max_seq < READ_ONCE(lrugen->max_seq)); max_seq < READ_ONCE(lrugen->max_seq));
@ -412,7 +412,7 @@ Signed-off-by: T.J. Mercier <tjmercier@google.com>
} }
VM_WARN_ON_ONCE(max_seq != READ_ONCE(lrugen->max_seq)); VM_WARN_ON_ONCE(max_seq != READ_ONCE(lrugen->max_seq));
@@ -4514,8 +4513,6 @@ static void lru_gen_age_node(struct pgli @@ -4516,8 +4515,6 @@ static void lru_gen_age_node(struct pgli
VM_WARN_ON_ONCE(!current_is_kswapd()); VM_WARN_ON_ONCE(!current_is_kswapd());
@ -421,7 +421,7 @@ Signed-off-by: T.J. Mercier <tjmercier@google.com>
/* check the order to exclude compaction-induced reclaim */ /* check the order to exclude compaction-induced reclaim */
if (!min_ttl || sc->order || sc->priority == DEF_PRIORITY) if (!min_ttl || sc->order || sc->priority == DEF_PRIORITY)
return; return;
@@ -5104,8 +5101,7 @@ static bool should_run_aging(struct lruv @@ -5116,8 +5113,7 @@ static bool should_run_aging(struct lruv
* 1. Defer try_to_inc_max_seq() to workqueues to reduce latency for memcg * 1. Defer try_to_inc_max_seq() to workqueues to reduce latency for memcg
* reclaim. * reclaim.
*/ */
@ -431,7 +431,7 @@ Signed-off-by: T.J. Mercier <tjmercier@google.com>
{ {
unsigned long nr_to_scan; unsigned long nr_to_scan;
struct mem_cgroup *memcg = lruvec_memcg(lruvec); struct mem_cgroup *memcg = lruvec_memcg(lruvec);
@@ -5122,10 +5118,8 @@ static unsigned long get_nr_to_scan(stru @@ -5134,10 +5130,8 @@ static unsigned long get_nr_to_scan(stru
if (sc->priority == DEF_PRIORITY) if (sc->priority == DEF_PRIORITY)
return nr_to_scan; return nr_to_scan;
@ -443,7 +443,7 @@ Signed-off-by: T.J. Mercier <tjmercier@google.com>
} }
static unsigned long get_nr_to_reclaim(struct scan_control *sc) static unsigned long get_nr_to_reclaim(struct scan_control *sc)
@@ -5134,29 +5128,18 @@ static unsigned long get_nr_to_reclaim(s @@ -5146,29 +5140,18 @@ static unsigned long get_nr_to_reclaim(s
if (!global_reclaim(sc)) if (!global_reclaim(sc))
return -1; return -1;
@ -475,7 +475,7 @@ Signed-off-by: T.J. Mercier <tjmercier@google.com>
if (sc->may_swap) if (sc->may_swap)
swappiness = get_swappiness(lruvec, sc); swappiness = get_swappiness(lruvec, sc);
@@ -5166,7 +5149,7 @@ static void lru_gen_shrink_lruvec(struct @@ -5178,7 +5161,7 @@ static void lru_gen_shrink_lruvec(struct
swappiness = 0; swappiness = 0;
nr_to_scan = get_nr_to_scan(lruvec, sc, swappiness); nr_to_scan = get_nr_to_scan(lruvec, sc, swappiness);
@ -484,7 +484,7 @@ Signed-off-by: T.J. Mercier <tjmercier@google.com>
break; break;
delta = evict_folios(lruvec, sc, swappiness); delta = evict_folios(lruvec, sc, swappiness);
@@ -5183,10 +5166,251 @@ static void lru_gen_shrink_lruvec(struct @@ -5195,10 +5178,251 @@ static void lru_gen_shrink_lruvec(struct
cond_resched(); cond_resched();
} }
@ -736,7 +736,7 @@ Signed-off-by: T.J. Mercier <tjmercier@google.com>
/****************************************************************************** /******************************************************************************
* state change * state change
@@ -5644,11 +5868,11 @@ static int run_cmd(char cmd, int memcg_i @@ -5656,11 +5880,11 @@ static int run_cmd(char cmd, int memcg_i
if (!mem_cgroup_disabled()) { if (!mem_cgroup_disabled()) {
rcu_read_lock(); rcu_read_lock();
@ -751,7 +751,7 @@ Signed-off-by: T.J. Mercier <tjmercier@google.com>
rcu_read_unlock(); rcu_read_unlock();
if (!memcg) if (!memcg)
@@ -5796,6 +6020,19 @@ void lru_gen_init_lruvec(struct lruvec * @@ -5808,6 +6032,19 @@ void lru_gen_init_lruvec(struct lruvec *
} }
#ifdef CONFIG_MEMCG #ifdef CONFIG_MEMCG
@ -771,7 +771,7 @@ Signed-off-by: T.J. Mercier <tjmercier@google.com>
void lru_gen_init_memcg(struct mem_cgroup *memcg) void lru_gen_init_memcg(struct mem_cgroup *memcg)
{ {
INIT_LIST_HEAD(&memcg->mm_list.fifo); INIT_LIST_HEAD(&memcg->mm_list.fifo);
@@ -5819,7 +6056,69 @@ void lru_gen_exit_memcg(struct mem_cgrou @@ -5831,7 +6068,69 @@ void lru_gen_exit_memcg(struct mem_cgrou
} }
} }
} }
@ -842,7 +842,7 @@ Signed-off-by: T.J. Mercier <tjmercier@google.com>
static int __init init_lru_gen(void) static int __init init_lru_gen(void)
{ {
@@ -5846,6 +6145,10 @@ static void lru_gen_shrink_lruvec(struct @@ -5858,6 +6157,10 @@ static void lru_gen_shrink_lruvec(struct
{ {
} }
@ -853,7 +853,7 @@ Signed-off-by: T.J. Mercier <tjmercier@google.com>
#endif /* CONFIG_LRU_GEN */ #endif /* CONFIG_LRU_GEN */
static void shrink_lruvec(struct lruvec *lruvec, struct scan_control *sc) static void shrink_lruvec(struct lruvec *lruvec, struct scan_control *sc)
@@ -5859,7 +6162,7 @@ static void shrink_lruvec(struct lruvec @@ -5871,7 +6174,7 @@ static void shrink_lruvec(struct lruvec
bool proportional_reclaim; bool proportional_reclaim;
struct blk_plug plug; struct blk_plug plug;
@ -862,7 +862,7 @@ Signed-off-by: T.J. Mercier <tjmercier@google.com>
lru_gen_shrink_lruvec(lruvec, sc); lru_gen_shrink_lruvec(lruvec, sc);
return; return;
} }
@@ -6102,6 +6405,11 @@ static void shrink_node(pg_data_t *pgdat @@ -6114,6 +6417,11 @@ static void shrink_node(pg_data_t *pgdat
struct lruvec *target_lruvec; struct lruvec *target_lruvec;
bool reclaimable = false; bool reclaimable = false;

View file

@ -69,7 +69,7 @@ Signed-off-by: T.J. Mercier <tjmercier@google.com>
VM_WARN_ON_ONCE(current_is_kswapd()); VM_WARN_ON_ONCE(current_is_kswapd());
walk = kzalloc(sizeof(*walk), __GFP_HIGH | __GFP_NOMEMALLOC | __GFP_NOWARN); walk = kzalloc(sizeof(*walk), __GFP_HIGH | __GFP_NOMEMALLOC | __GFP_NOWARN);
@@ -4417,7 +4420,7 @@ static bool try_to_inc_max_seq(struct lr @@ -4419,7 +4422,7 @@ static bool try_to_inc_max_seq(struct lr
goto done; goto done;
} }
@ -78,7 +78,7 @@ Signed-off-by: T.J. Mercier <tjmercier@google.com>
if (!walk) { if (!walk) {
success = iterate_mm_list_nowalk(lruvec, max_seq); success = iterate_mm_list_nowalk(lruvec, max_seq);
goto done; goto done;
@@ -4486,8 +4489,6 @@ static bool lruvec_is_reclaimable(struct @@ -4488,8 +4491,6 @@ static bool lruvec_is_reclaimable(struct
struct mem_cgroup *memcg = lruvec_memcg(lruvec); struct mem_cgroup *memcg = lruvec_memcg(lruvec);
DEFINE_MIN_SEQ(lruvec); DEFINE_MIN_SEQ(lruvec);
@ -87,7 +87,7 @@ Signed-off-by: T.J. Mercier <tjmercier@google.com>
/* see the comment on lru_gen_folio */ /* see the comment on lru_gen_folio */
gen = lru_gen_from_seq(min_seq[LRU_GEN_FILE]); gen = lru_gen_from_seq(min_seq[LRU_GEN_FILE]);
birth = READ_ONCE(lruvec->lrugen.timestamps[gen]); birth = READ_ONCE(lruvec->lrugen.timestamps[gen]);
@@ -4743,12 +4744,8 @@ static bool isolate_folio(struct lruvec @@ -4753,12 +4754,8 @@ static bool isolate_folio(struct lruvec
{ {
bool success; bool success;
@ -101,7 +101,7 @@ Signed-off-by: T.J. Mercier <tjmercier@google.com>
(folio_test_dirty(folio) || (folio_test_dirty(folio) ||
(folio_test_anon(folio) && !folio_test_swapcache(folio)))) (folio_test_anon(folio) && !folio_test_swapcache(folio))))
return false; return false;
@@ -4845,9 +4842,8 @@ static int scan_folios(struct lruvec *lr @@ -4857,9 +4854,8 @@ static int scan_folios(struct lruvec *lr
__count_vm_events(PGSCAN_ANON + type, isolated); __count_vm_events(PGSCAN_ANON + type, isolated);
/* /*
@ -113,7 +113,7 @@ Signed-off-by: T.J. Mercier <tjmercier@google.com>
*/ */
return isolated || !remaining ? scanned : 0; return isolated || !remaining ? scanned : 0;
} }
@@ -5107,8 +5103,7 @@ static long get_nr_to_scan(struct lruvec @@ -5119,8 +5115,7 @@ static long get_nr_to_scan(struct lruvec
struct mem_cgroup *memcg = lruvec_memcg(lruvec); struct mem_cgroup *memcg = lruvec_memcg(lruvec);
DEFINE_MAX_SEQ(lruvec); DEFINE_MAX_SEQ(lruvec);
@ -123,7 +123,7 @@ Signed-off-by: T.J. Mercier <tjmercier@google.com>
return 0; return 0;
if (!should_run_aging(lruvec, max_seq, sc, can_swap, &nr_to_scan)) if (!should_run_aging(lruvec, max_seq, sc, can_swap, &nr_to_scan))
@@ -5136,17 +5131,14 @@ static bool try_to_shrink_lruvec(struct @@ -5148,17 +5143,14 @@ static bool try_to_shrink_lruvec(struct
long nr_to_scan; long nr_to_scan;
unsigned long scanned = 0; unsigned long scanned = 0;
unsigned long nr_to_reclaim = get_nr_to_reclaim(sc); unsigned long nr_to_reclaim = get_nr_to_reclaim(sc);
@ -146,7 +146,7 @@ Signed-off-by: T.J. Mercier <tjmercier@google.com>
nr_to_scan = get_nr_to_scan(lruvec, sc, swappiness); nr_to_scan = get_nr_to_scan(lruvec, sc, swappiness);
if (nr_to_scan <= 0) if (nr_to_scan <= 0)
@@ -5277,12 +5269,13 @@ static void lru_gen_shrink_lruvec(struct @@ -5289,12 +5281,13 @@ static void lru_gen_shrink_lruvec(struct
struct blk_plug plug; struct blk_plug plug;
VM_WARN_ON_ONCE(global_reclaim(sc)); VM_WARN_ON_ONCE(global_reclaim(sc));
@ -161,7 +161,7 @@ Signed-off-by: T.J. Mercier <tjmercier@google.com>
if (try_to_shrink_lruvec(lruvec, sc)) if (try_to_shrink_lruvec(lruvec, sc))
lru_gen_rotate_memcg(lruvec, MEMCG_LRU_YOUNG); lru_gen_rotate_memcg(lruvec, MEMCG_LRU_YOUNG);
@@ -5338,11 +5331,19 @@ static void lru_gen_shrink_node(struct p @@ -5350,11 +5343,19 @@ static void lru_gen_shrink_node(struct p
VM_WARN_ON_ONCE(!global_reclaim(sc)); VM_WARN_ON_ONCE(!global_reclaim(sc));
@ -182,7 +182,7 @@ Signed-off-by: T.J. Mercier <tjmercier@google.com>
set_initial_priority(pgdat, sc); set_initial_priority(pgdat, sc);
@@ -5360,7 +5361,7 @@ static void lru_gen_shrink_node(struct p @@ -5372,7 +5373,7 @@ static void lru_gen_shrink_node(struct p
clear_mm_walk(); clear_mm_walk();
blk_finish_plug(&plug); blk_finish_plug(&plug);
@ -191,7 +191,7 @@ Signed-off-by: T.J. Mercier <tjmercier@google.com>
/* kswapd should never fail */ /* kswapd should never fail */
pgdat->kswapd_failures = 0; pgdat->kswapd_failures = 0;
} }
@@ -5932,7 +5933,7 @@ static ssize_t lru_gen_seq_write(struct @@ -5944,7 +5945,7 @@ static ssize_t lru_gen_seq_write(struct
set_task_reclaim_state(current, &sc.reclaim_state); set_task_reclaim_state(current, &sc.reclaim_state);
flags = memalloc_noreclaim_save(); flags = memalloc_noreclaim_save();
blk_start_plug(&plug); blk_start_plug(&plug);

View file

@ -27,7 +27,7 @@ Signed-off-by: T.J. Mercier <tjmercier@google.com>
--- a/mm/vmscan.c --- a/mm/vmscan.c
+++ b/mm/vmscan.c +++ b/mm/vmscan.c
@@ -4415,7 +4415,7 @@ static bool try_to_inc_max_seq(struct lr @@ -4417,7 +4417,7 @@ static bool try_to_inc_max_seq(struct lr
* handful of PTEs. Spreading the work out over a period of time usually * handful of PTEs. Spreading the work out over a period of time usually
* is less efficient, but it avoids bursty page faults. * is less efficient, but it avoids bursty page faults.
*/ */

View file

@ -29,7 +29,7 @@ Signed-off-by: T.J. Mercier <tjmercier@google.com>
--- a/mm/vmscan.c --- a/mm/vmscan.c
+++ b/mm/vmscan.c +++ b/mm/vmscan.c
@@ -5206,18 +5206,20 @@ static int shrink_one(struct lruvec *lru @@ -5218,18 +5218,20 @@ static int shrink_one(struct lruvec *lru
static void shrink_many(struct pglist_data *pgdat, struct scan_control *sc) static void shrink_many(struct pglist_data *pgdat, struct scan_control *sc)
{ {
@ -52,7 +52,7 @@ Signed-off-by: T.J. Mercier <tjmercier@google.com>
gen = get_memcg_gen(READ_ONCE(pgdat->memcg_lru.seq)); gen = get_memcg_gen(READ_ONCE(pgdat->memcg_lru.seq));
rcu_read_lock(); rcu_read_lock();
@@ -5241,14 +5243,22 @@ restart: @@ -5253,14 +5255,22 @@ restart:
op = shrink_one(lruvec, sc); op = shrink_one(lruvec, sc);
@ -78,7 +78,7 @@ Signed-off-by: T.J. Mercier <tjmercier@google.com>
/* restart if raced with lru_gen_rotate_memcg() */ /* restart if raced with lru_gen_rotate_memcg() */
if (gen != get_nulls_value(pos)) if (gen != get_nulls_value(pos))
goto restart; goto restart;
@@ -5257,11 +5267,6 @@ restart: @@ -5269,11 +5279,6 @@ restart:
bin = get_memcg_bin(bin + 1); bin = get_memcg_bin(bin + 1);
if (bin != first_bin) if (bin != first_bin)
goto restart; goto restart;

View file

@ -54,7 +54,7 @@ Signed-off-by: T.J. Mercier <tjmercier@google.com>
The multi-gen LRU can be disassembled into the following parts: The multi-gen LRU can be disassembled into the following parts:
--- a/mm/vmscan.c --- a/mm/vmscan.c
+++ b/mm/vmscan.c +++ b/mm/vmscan.c
@@ -4459,6 +4459,10 @@ done: @@ -4461,6 +4461,10 @@ done:
return true; return true;
} }

View file

@ -44,7 +44,7 @@ Signed-off-by: T.J. Mercier <tjmercier@google.com>
The multi-gen LRU can be disassembled into the following parts: The multi-gen LRU can be disassembled into the following parts:
--- a/mm/vmscan.c --- a/mm/vmscan.c
+++ b/mm/vmscan.c +++ b/mm/vmscan.c
@@ -4553,6 +4553,10 @@ static void lru_gen_age_node(struct pgli @@ -4555,6 +4555,10 @@ static void lru_gen_age_node(struct pgli
} }
} }

View file

@ -154,7 +154,7 @@ Signed-off-by: T.J. Mercier <tjmercier@google.com>
--- a/mm/vmscan.c --- a/mm/vmscan.c
+++ b/mm/vmscan.c +++ b/mm/vmscan.c
@@ -4690,6 +4690,148 @@ void lru_gen_look_around(struct page_vma @@ -4692,6 +4692,148 @@ void lru_gen_look_around(struct page_vma
} }
/****************************************************************************** /******************************************************************************
@ -303,7 +303,7 @@ Signed-off-by: T.J. Mercier <tjmercier@google.com>
* the eviction * the eviction
******************************************************************************/ ******************************************************************************/
@@ -5386,53 +5528,6 @@ done: @@ -5398,53 +5540,6 @@ done:
pgdat->kswapd_failures = 0; pgdat->kswapd_failures = 0;
} }
@ -357,7 +357,7 @@ Signed-off-by: T.J. Mercier <tjmercier@google.com>
/****************************************************************************** /******************************************************************************
* state change * state change
******************************************************************************/ ******************************************************************************/
@@ -6078,67 +6173,6 @@ void lru_gen_exit_memcg(struct mem_cgrou @@ -6090,67 +6185,6 @@ void lru_gen_exit_memcg(struct mem_cgrou
} }
} }

View file

@ -20,7 +20,7 @@ Signed-off-by: T.J. Mercier <tjmercier@google.com>
--- a/mm/vmscan.c --- a/mm/vmscan.c
+++ b/mm/vmscan.c +++ b/mm/vmscan.c
@@ -6160,12 +6160,17 @@ void lru_gen_exit_memcg(struct mem_cgrou @@ -6172,12 +6172,17 @@ void lru_gen_exit_memcg(struct mem_cgrou
int i; int i;
int nid; int nid;

View file

@ -26,7 +26,7 @@ Signed-off-by: T.J. Mercier <tjmercier@google.com>
--- a/mm/vmscan.c --- a/mm/vmscan.c
+++ b/mm/vmscan.c +++ b/mm/vmscan.c
@@ -4571,13 +4571,12 @@ static void lru_gen_age_node(struct pgli @@ -4573,13 +4573,12 @@ static void lru_gen_age_node(struct pgli
void lru_gen_look_around(struct page_vma_mapped_walk *pvmw) void lru_gen_look_around(struct page_vma_mapped_walk *pvmw)
{ {
int i; int i;
@ -42,7 +42,7 @@ Signed-off-by: T.J. Mercier <tjmercier@google.com>
struct folio *folio = pfn_folio(pvmw->pfn); struct folio *folio = pfn_folio(pvmw->pfn);
struct mem_cgroup *memcg = folio_memcg(folio); struct mem_cgroup *memcg = folio_memcg(folio);
struct pglist_data *pgdat = folio_pgdat(folio); struct pglist_data *pgdat = folio_pgdat(folio);
@@ -4594,25 +4593,28 @@ void lru_gen_look_around(struct page_vma @@ -4596,25 +4595,28 @@ void lru_gen_look_around(struct page_vma
/* avoid taking the LRU lock under the PTL when possible */ /* avoid taking the LRU lock under the PTL when possible */
walk = current->reclaim_state ? current->reclaim_state->mm_walk : NULL; walk = current->reclaim_state ? current->reclaim_state->mm_walk : NULL;
@ -79,7 +79,7 @@ Signed-off-by: T.J. Mercier <tjmercier@google.com>
for (i = 0, addr = start; addr != end; i++, addr += PAGE_SIZE) { for (i = 0, addr = start; addr != end; i++, addr += PAGE_SIZE) {
unsigned long pfn; unsigned long pfn;
@@ -4637,56 +4639,27 @@ void lru_gen_look_around(struct page_vma @@ -4639,56 +4641,27 @@ void lru_gen_look_around(struct page_vma
!folio_test_swapcache(folio))) !folio_test_swapcache(folio)))
folio_mark_dirty(folio); folio_mark_dirty(folio);

View file

@ -226,7 +226,7 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
/* folio_update_gen() requires stable folio_memcg() */ /* folio_update_gen() requires stable folio_memcg() */
if (!mem_cgroup_trylock_pages(memcg)) if (!mem_cgroup_trylock_pages(memcg))
break; break;
@@ -4442,25 +4425,12 @@ static bool try_to_inc_max_seq(struct lr @@ -4444,25 +4427,12 @@ static bool try_to_inc_max_seq(struct lr
success = iterate_mm_list(lruvec, walk, &mm); success = iterate_mm_list(lruvec, walk, &mm);
if (mm) if (mm)
walk_mm(lruvec, mm, walk); walk_mm(lruvec, mm, walk);
@ -255,7 +255,7 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
} }
/****************************************************************************** /******************************************************************************
@@ -6105,7 +6075,6 @@ void lru_gen_init_lruvec(struct lruvec * @@ -6117,7 +6087,6 @@ void lru_gen_init_lruvec(struct lruvec *
INIT_LIST_HEAD(&lrugen->folios[gen][type][zone]); INIT_LIST_HEAD(&lrugen->folios[gen][type][zone]);
lruvec->mm_state.seq = MIN_NR_GENS; lruvec->mm_state.seq = MIN_NR_GENS;
@ -263,7 +263,7 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
} }
#ifdef CONFIG_MEMCG #ifdef CONFIG_MEMCG
@@ -6138,7 +6107,6 @@ void lru_gen_exit_memcg(struct mem_cgrou @@ -6150,7 +6119,6 @@ void lru_gen_exit_memcg(struct mem_cgrou
for_each_node(nid) { for_each_node(nid) {
struct lruvec *lruvec = get_lruvec(memcg, nid); struct lruvec *lruvec = get_lruvec(memcg, nid);

View file

@ -16,7 +16,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -4331,6 +4331,7 @@ static const struct mtk_soc_data mt7986_ @@ -4334,6 +4334,7 @@ static const struct mtk_soc_data mt7986_
.hw_features = MTK_HW_FEATURES, .hw_features = MTK_HW_FEATURES,
.required_clks = MT7986_CLKS_BITMAP, .required_clks = MT7986_CLKS_BITMAP,
.required_pctl = false, .required_pctl = false,

View file

@ -12,7 +12,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -3478,11 +3478,8 @@ static void mtk_pending_work(struct work @@ -3481,11 +3481,8 @@ static void mtk_pending_work(struct work
rtnl_lock(); rtnl_lock();
dev_dbg(eth->dev, "[%s][%d] reset\n", __func__, __LINE__); dev_dbg(eth->dev, "[%s][%d] reset\n", __func__, __LINE__);
@ -25,7 +25,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
/* stop all devices to make sure that dma is properly shut down */ /* stop all devices to make sure that dma is properly shut down */
for (i = 0; i < MTK_MAC_COUNT; i++) { for (i = 0; i < MTK_MAC_COUNT; i++) {
if (!eth->netdev[i]) if (!eth->netdev[i])
@@ -3516,7 +3513,7 @@ static void mtk_pending_work(struct work @@ -3519,7 +3516,7 @@ static void mtk_pending_work(struct work
dev_dbg(eth->dev, "[%s][%d] reset done\n", __func__, __LINE__); dev_dbg(eth->dev, "[%s][%d] reset done\n", __func__, __LINE__);

View file

@ -16,7 +16,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -3254,6 +3254,27 @@ static void mtk_set_mcr_max_rx(struct mt @@ -3257,6 +3257,27 @@ static void mtk_set_mcr_max_rx(struct mt
mtk_w32(mac->hw, mcr_new, MTK_MAC_MCR(mac->id)); mtk_w32(mac->hw, mcr_new, MTK_MAC_MCR(mac->id));
} }
@ -44,7 +44,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
static int mtk_hw_init(struct mtk_eth *eth) static int mtk_hw_init(struct mtk_eth *eth)
{ {
u32 dma_mask = ETHSYS_DMA_AG_MAP_PDMA | ETHSYS_DMA_AG_MAP_QDMA | u32 dma_mask = ETHSYS_DMA_AG_MAP_PDMA | ETHSYS_DMA_AG_MAP_QDMA |
@@ -3293,22 +3314,9 @@ static int mtk_hw_init(struct mtk_eth *e @@ -3296,22 +3317,9 @@ static int mtk_hw_init(struct mtk_eth *e
return 0; return 0;
} }

View file

@ -17,7 +17,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -3275,7 +3275,54 @@ static void mtk_hw_reset(struct mtk_eth @@ -3278,7 +3278,54 @@ static void mtk_hw_reset(struct mtk_eth
0x3ffffff); 0x3ffffff);
} }
@ -73,7 +73,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
{ {
u32 dma_mask = ETHSYS_DMA_AG_MAP_PDMA | ETHSYS_DMA_AG_MAP_QDMA | u32 dma_mask = ETHSYS_DMA_AG_MAP_PDMA | ETHSYS_DMA_AG_MAP_QDMA |
ETHSYS_DMA_AG_MAP_PPE; ETHSYS_DMA_AG_MAP_PPE;
@@ -3314,7 +3361,12 @@ static int mtk_hw_init(struct mtk_eth *e @@ -3317,7 +3364,12 @@ static int mtk_hw_init(struct mtk_eth *e
return 0; return 0;
} }
@ -87,7 +87,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
if (MTK_HAS_CAPS(eth->soc->caps, MTK_NETSYS_V2)) { if (MTK_HAS_CAPS(eth->soc->caps, MTK_NETSYS_V2)) {
/* Set FE to PDMAv2 if necessary */ /* Set FE to PDMAv2 if necessary */
@@ -3505,7 +3557,7 @@ static void mtk_pending_work(struct work @@ -3508,7 +3560,7 @@ static void mtk_pending_work(struct work
if (eth->dev->pins) if (eth->dev->pins)
pinctrl_select_state(eth->dev->pins->p, pinctrl_select_state(eth->dev->pins->p,
eth->dev->pins->default_state); eth->dev->pins->default_state);
@ -96,7 +96,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
/* restart DMA and enable IRQs */ /* restart DMA and enable IRQs */
for (i = 0; i < MTK_MAC_COUNT; i++) { for (i = 0; i < MTK_MAC_COUNT; i++) {
@@ -4107,7 +4159,7 @@ static int mtk_probe(struct platform_dev @@ -4110,7 +4162,7 @@ static int mtk_probe(struct platform_dev
eth->msg_enable = netif_msg_init(mtk_msg_level, MTK_DEFAULT_MSG_ENABLE); eth->msg_enable = netif_msg_init(mtk_msg_level, MTK_DEFAULT_MSG_ENABLE);
INIT_WORK(&eth->pending_work, mtk_pending_work); INIT_WORK(&eth->pending_work, mtk_pending_work);

View file

@ -16,7 +16,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -2842,14 +2842,29 @@ static void mtk_dma_free(struct mtk_eth @@ -2845,14 +2845,29 @@ static void mtk_dma_free(struct mtk_eth
kfree(eth->scratch_head); kfree(eth->scratch_head);
} }
@ -48,7 +48,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
schedule_work(&eth->pending_work); schedule_work(&eth->pending_work);
} }
@@ -3329,15 +3344,17 @@ static int mtk_hw_init(struct mtk_eth *e @@ -3332,15 +3347,17 @@ static int mtk_hw_init(struct mtk_eth *e
const struct mtk_reg_map *reg_map = eth->soc->reg_map; const struct mtk_reg_map *reg_map = eth->soc->reg_map;
int i, val, ret; int i, val, ret;
@ -72,7 +72,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
if (eth->ethsys) if (eth->ethsys)
regmap_update_bits(eth->ethsys, ETHSYS_DMA_AG_MAP, dma_mask, regmap_update_bits(eth->ethsys, ETHSYS_DMA_AG_MAP, dma_mask,
@@ -3466,8 +3483,10 @@ static int mtk_hw_init(struct mtk_eth *e @@ -3469,8 +3486,10 @@ static int mtk_hw_init(struct mtk_eth *e
return 0; return 0;
err_disable_pm: err_disable_pm:
@ -85,7 +85,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
return ret; return ret;
} }
@@ -3529,30 +3548,53 @@ static int mtk_do_ioctl(struct net_devic @@ -3532,30 +3551,53 @@ static int mtk_do_ioctl(struct net_devic
return -EOPNOTSUPP; return -EOPNOTSUPP;
} }
@ -148,7 +148,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
if (eth->dev->pins) if (eth->dev->pins)
pinctrl_select_state(eth->dev->pins->p, pinctrl_select_state(eth->dev->pins->p,
@@ -3563,15 +3605,19 @@ static void mtk_pending_work(struct work @@ -3566,15 +3608,19 @@ static void mtk_pending_work(struct work
for (i = 0; i < MTK_MAC_COUNT; i++) { for (i = 0; i < MTK_MAC_COUNT; i++) {
if (!test_bit(i, &restart)) if (!test_bit(i, &restart))
continue; continue;

View file

@ -49,7 +49,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
}; };
/* strings used by ethtool */ /* strings used by ethtool */
@@ -3337,6 +3343,102 @@ static void mtk_hw_warm_reset(struct mtk @@ -3340,6 +3346,102 @@ static void mtk_hw_warm_reset(struct mtk
val, rst_mask); val, rst_mask);
} }
@ -152,7 +152,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
static int mtk_hw_init(struct mtk_eth *eth, bool reset) static int mtk_hw_init(struct mtk_eth *eth, bool reset)
{ {
u32 dma_mask = ETHSYS_DMA_AG_MAP_PDMA | ETHSYS_DMA_AG_MAP_QDMA | u32 dma_mask = ETHSYS_DMA_AG_MAP_PDMA | ETHSYS_DMA_AG_MAP_QDMA |
@@ -3655,6 +3757,7 @@ static int mtk_cleanup(struct mtk_eth *e @@ -3658,6 +3760,7 @@ static int mtk_cleanup(struct mtk_eth *e
mtk_unreg_dev(eth); mtk_unreg_dev(eth);
mtk_free_dev(eth); mtk_free_dev(eth);
cancel_work_sync(&eth->pending_work); cancel_work_sync(&eth->pending_work);
@ -160,7 +160,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
return 0; return 0;
} }
@@ -4092,6 +4195,7 @@ static int mtk_probe(struct platform_dev @@ -4095,6 +4198,7 @@ static int mtk_probe(struct platform_dev
eth->rx_dim.mode = DIM_CQ_PERIOD_MODE_START_FROM_EQE; eth->rx_dim.mode = DIM_CQ_PERIOD_MODE_START_FROM_EQE;
INIT_WORK(&eth->rx_dim.work, mtk_dim_rx); INIT_WORK(&eth->rx_dim.work, mtk_dim_rx);
@ -168,7 +168,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
eth->tx_dim.mode = DIM_CQ_PERIOD_MODE_START_FROM_EQE; eth->tx_dim.mode = DIM_CQ_PERIOD_MODE_START_FROM_EQE;
INIT_WORK(&eth->tx_dim.work, mtk_dim_tx); INIT_WORK(&eth->tx_dim.work, mtk_dim_tx);
@@ -4294,6 +4398,8 @@ static int mtk_probe(struct platform_dev @@ -4297,6 +4401,8 @@ static int mtk_probe(struct platform_dev
netif_napi_add(&eth->dummy_dev, &eth->rx_napi, mtk_napi_rx); netif_napi_add(&eth->dummy_dev, &eth->rx_napi, mtk_napi_rx);
platform_set_drvdata(pdev, eth); platform_set_drvdata(pdev, eth);

View file

@ -14,7 +14,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -3686,6 +3686,11 @@ static void mtk_pending_work(struct work @@ -3689,6 +3689,11 @@ static void mtk_pending_work(struct work
set_bit(MTK_RESETTING, &eth->state); set_bit(MTK_RESETTING, &eth->state);
mtk_prepare_for_reset(eth); mtk_prepare_for_reset(eth);
@ -26,7 +26,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
/* stop all devices to make sure that dma is properly shut down */ /* stop all devices to make sure that dma is properly shut down */
for (i = 0; i < MTK_MAC_COUNT; i++) { for (i = 0; i < MTK_MAC_COUNT; i++) {
@@ -3723,6 +3728,8 @@ static void mtk_pending_work(struct work @@ -3726,6 +3731,8 @@ static void mtk_pending_work(struct work
clear_bit(MTK_RESETTING, &eth->state); clear_bit(MTK_RESETTING, &eth->state);

View file

@ -122,7 +122,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
ring->dma_pdma, ring->phys_pdma); ring->dma_pdma, ring->phys_pdma);
ring->dma_pdma = NULL; ring->dma_pdma = NULL;
} }
@@ -2830,7 +2836,7 @@ static void mtk_dma_free(struct mtk_eth @@ -2833,7 +2839,7 @@ static void mtk_dma_free(struct mtk_eth
netdev_reset_queue(eth->netdev[i]); netdev_reset_queue(eth->netdev[i]);
if (eth->scratch_ring) { if (eth->scratch_ring) {
dma_free_coherent(eth->dma_dev, dma_free_coherent(eth->dma_dev,

View file

@ -12,7 +12,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -4477,7 +4477,7 @@ static const struct mtk_soc_data mt7621_ @@ -4480,7 +4480,7 @@ static const struct mtk_soc_data mt7621_
.hw_features = MTK_HW_FEATURES, .hw_features = MTK_HW_FEATURES,
.required_clks = MT7621_CLKS_BITMAP, .required_clks = MT7621_CLKS_BITMAP,
.required_pctl = false, .required_pctl = false,
@ -21,7 +21,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
.hash_offset = 2, .hash_offset = 2,
.foe_entry_size = sizeof(struct mtk_foe_entry) - 16, .foe_entry_size = sizeof(struct mtk_foe_entry) - 16,
.txrx = { .txrx = {
@@ -4516,7 +4516,7 @@ static const struct mtk_soc_data mt7623_ @@ -4519,7 +4519,7 @@ static const struct mtk_soc_data mt7623_
.hw_features = MTK_HW_FEATURES, .hw_features = MTK_HW_FEATURES,
.required_clks = MT7623_CLKS_BITMAP, .required_clks = MT7623_CLKS_BITMAP,
.required_pctl = true, .required_pctl = true,

View file

@ -424,7 +424,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
} else { } else {
mtk_w32(eth, ring->phys_pdma, MT7628_TX_BASE_PTR0); mtk_w32(eth, ring->phys_pdma, MT7628_TX_BASE_PTR0);
mtk_w32(eth, ring_size, MT7628_TX_MAX_CNT0); mtk_w32(eth, ring_size, MT7628_TX_MAX_CNT0);
@@ -2960,7 +3076,7 @@ static int mtk_start_dma(struct mtk_eth @@ -2963,7 +3079,7 @@ static int mtk_start_dma(struct mtk_eth
if (MTK_HAS_CAPS(eth->soc->caps, MTK_NETSYS_V2)) if (MTK_HAS_CAPS(eth->soc->caps, MTK_NETSYS_V2))
val |= MTK_MUTLI_CNT | MTK_RESV_BUF | val |= MTK_MUTLI_CNT | MTK_RESV_BUF |
MTK_WCOMP_EN | MTK_DMAD_WR_WDONE | MTK_WCOMP_EN | MTK_DMAD_WR_WDONE |
@ -433,7 +433,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
else else
val |= MTK_RX_BT_32DWORDS; val |= MTK_RX_BT_32DWORDS;
mtk_w32(eth, val, reg_map->qdma.glo_cfg); mtk_w32(eth, val, reg_map->qdma.glo_cfg);
@@ -3006,6 +3122,45 @@ static void mtk_gdm_config(struct mtk_et @@ -3009,6 +3125,45 @@ static void mtk_gdm_config(struct mtk_et
mtk_w32(eth, 0, MTK_RST_GL); mtk_w32(eth, 0, MTK_RST_GL);
} }
@ -479,7 +479,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
static int mtk_open(struct net_device *dev) static int mtk_open(struct net_device *dev)
{ {
struct mtk_mac *mac = netdev_priv(dev); struct mtk_mac *mac = netdev_priv(dev);
@@ -3048,7 +3203,8 @@ static int mtk_open(struct net_device *d @@ -3051,7 +3206,8 @@ static int mtk_open(struct net_device *d
refcount_inc(&eth->dma_refcnt); refcount_inc(&eth->dma_refcnt);
phylink_start(mac->phylink); phylink_start(mac->phylink);
@ -489,7 +489,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
return 0; return 0;
} }
@@ -3757,8 +3913,12 @@ static int mtk_unreg_dev(struct mtk_eth @@ -3760,8 +3916,12 @@ static int mtk_unreg_dev(struct mtk_eth
int i; int i;
for (i = 0; i < MTK_MAC_COUNT; i++) { for (i = 0; i < MTK_MAC_COUNT; i++) {
@ -502,7 +502,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
unregister_netdev(eth->netdev[i]); unregister_netdev(eth->netdev[i]);
} }
@@ -3975,6 +4135,23 @@ static int mtk_set_rxnfc(struct net_devi @@ -3978,6 +4138,23 @@ static int mtk_set_rxnfc(struct net_devi
return ret; return ret;
} }
@ -526,7 +526,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
static const struct ethtool_ops mtk_ethtool_ops = { static const struct ethtool_ops mtk_ethtool_ops = {
.get_link_ksettings = mtk_get_link_ksettings, .get_link_ksettings = mtk_get_link_ksettings,
.set_link_ksettings = mtk_set_link_ksettings, .set_link_ksettings = mtk_set_link_ksettings,
@@ -4009,6 +4186,7 @@ static const struct net_device_ops mtk_n @@ -4012,6 +4189,7 @@ static const struct net_device_ops mtk_n
.ndo_setup_tc = mtk_eth_setup_tc, .ndo_setup_tc = mtk_eth_setup_tc,
.ndo_bpf = mtk_xdp, .ndo_bpf = mtk_xdp,
.ndo_xdp_xmit = mtk_xdp_xmit, .ndo_xdp_xmit = mtk_xdp_xmit,
@ -534,7 +534,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
}; };
static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np) static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np)
@@ -4018,6 +4196,7 @@ static int mtk_add_mac(struct mtk_eth *e @@ -4021,6 +4199,7 @@ static int mtk_add_mac(struct mtk_eth *e
struct phylink *phylink; struct phylink *phylink;
struct mtk_mac *mac; struct mtk_mac *mac;
int id, err; int id, err;
@ -542,7 +542,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (!_id) { if (!_id) {
dev_err(eth->dev, "missing mac id\n"); dev_err(eth->dev, "missing mac id\n");
@@ -4035,7 +4214,10 @@ static int mtk_add_mac(struct mtk_eth *e @@ -4038,7 +4217,10 @@ static int mtk_add_mac(struct mtk_eth *e
return -EINVAL; return -EINVAL;
} }
@ -554,7 +554,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (!eth->netdev[id]) { if (!eth->netdev[id]) {
dev_err(eth->dev, "alloc_etherdev failed\n"); dev_err(eth->dev, "alloc_etherdev failed\n");
return -ENOMEM; return -ENOMEM;
@@ -4143,6 +4325,11 @@ static int mtk_add_mac(struct mtk_eth *e @@ -4146,6 +4328,11 @@ static int mtk_add_mac(struct mtk_eth *e
else else
eth->netdev[id]->max_mtu = MTK_MAX_RX_LENGTH_2K - MTK_RX_ETH_HLEN; eth->netdev[id]->max_mtu = MTK_MAX_RX_LENGTH_2K - MTK_RX_ETH_HLEN;

View file

@ -52,7 +52,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
} }
skb_record_rx_queue(skb, 0); skb_record_rx_queue(skb, 0);
@@ -2856,15 +2863,30 @@ static netdev_features_t mtk_fix_feature @@ -2859,15 +2866,30 @@ static netdev_features_t mtk_fix_feature
static int mtk_set_features(struct net_device *dev, netdev_features_t features) static int mtk_set_features(struct net_device *dev, netdev_features_t features)
{ {
@ -88,7 +88,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
} }
/* wait for DMA to finish whatever it is doing before we start using it again */ /* wait for DMA to finish whatever it is doing before we start using it again */
@@ -3161,11 +3183,45 @@ found: @@ -3164,11 +3186,45 @@ found:
return NOTIFY_DONE; return NOTIFY_DONE;
} }
@ -135,7 +135,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
err = phylink_of_phy_connect(mac->phylink, mac->of_node, 0); err = phylink_of_phy_connect(mac->phylink, mac->of_node, 0);
if (err) { if (err) {
@@ -3686,6 +3742,10 @@ static int mtk_hw_init(struct mtk_eth *e @@ -3689,6 +3745,10 @@ static int mtk_hw_init(struct mtk_eth *e
*/ */
val = mtk_r32(eth, MTK_CDMQ_IG_CTRL); val = mtk_r32(eth, MTK_CDMQ_IG_CTRL);
mtk_w32(eth, val | MTK_CDMQ_STAG_EN, MTK_CDMQ_IG_CTRL); mtk_w32(eth, val | MTK_CDMQ_STAG_EN, MTK_CDMQ_IG_CTRL);
@ -146,7 +146,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
/* Enable RX VLan Offloading */ /* Enable RX VLan Offloading */
mtk_w32(eth, 1, MTK_CDMP_EG_CTRL); mtk_w32(eth, 1, MTK_CDMP_EG_CTRL);
@@ -3905,6 +3965,12 @@ static int mtk_free_dev(struct mtk_eth * @@ -3908,6 +3968,12 @@ static int mtk_free_dev(struct mtk_eth *
free_netdev(eth->netdev[i]); free_netdev(eth->netdev[i]);
} }

View file

@ -20,7 +20,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -3199,7 +3199,8 @@ static int mtk_open(struct net_device *d @@ -3202,7 +3202,8 @@ static int mtk_open(struct net_device *d
struct mtk_eth *eth = mac->hw; struct mtk_eth *eth = mac->hw;
int i, err; int i, err;
@ -30,7 +30,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
for (i = 0; i < ARRAY_SIZE(eth->dsa_meta); i++) { for (i = 0; i < ARRAY_SIZE(eth->dsa_meta); i++) {
struct metadata_dst *md_dst = eth->dsa_meta[i]; struct metadata_dst *md_dst = eth->dsa_meta[i];
@@ -3216,7 +3217,8 @@ static int mtk_open(struct net_device *d @@ -3219,7 +3220,8 @@ static int mtk_open(struct net_device *d
} }
} else { } else {
/* Hardware special tag parsing needs to be disabled if at least /* Hardware special tag parsing needs to be disabled if at least

View file

@ -23,7 +23,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -3134,7 +3134,7 @@ static void mtk_gdm_config(struct mtk_et @@ -3137,7 +3137,7 @@ static void mtk_gdm_config(struct mtk_et
val |= config; val |= config;
@ -32,7 +32,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
val |= MTK_GDMA_SPECIAL_TAG; val |= MTK_GDMA_SPECIAL_TAG;
mtk_w32(eth, val, MTK_GDMA_FWD_CFG(i)); mtk_w32(eth, val, MTK_GDMA_FWD_CFG(i));
@@ -3199,8 +3199,7 @@ static int mtk_open(struct net_device *d @@ -3202,8 +3202,7 @@ static int mtk_open(struct net_device *d
struct mtk_eth *eth = mac->hw; struct mtk_eth *eth = mac->hw;
int i, err; int i, err;
@ -42,7 +42,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
for (i = 0; i < ARRAY_SIZE(eth->dsa_meta); i++) { for (i = 0; i < ARRAY_SIZE(eth->dsa_meta); i++) {
struct metadata_dst *md_dst = eth->dsa_meta[i]; struct metadata_dst *md_dst = eth->dsa_meta[i];
@@ -3217,8 +3216,7 @@ static int mtk_open(struct net_device *d @@ -3220,8 +3219,7 @@ static int mtk_open(struct net_device *d
} }
} else { } else {
/* Hardware special tag parsing needs to be disabled if at least /* Hardware special tag parsing needs to be disabled if at least

View file

@ -57,7 +57,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
mtk_eth_path_name(path), __func__, updated); mtk_eth_path_name(path), __func__, updated);
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -4801,6 +4801,26 @@ static const struct mtk_soc_data mt7629_ @@ -4804,6 +4804,26 @@ static const struct mtk_soc_data mt7629_
}, },
}; };
@ -84,7 +84,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
static const struct mtk_soc_data mt7986_data = { static const struct mtk_soc_data mt7986_data = {
.reg_map = &mt7986_reg_map, .reg_map = &mt7986_reg_map,
.ana_rgc3 = 0x128, .ana_rgc3 = 0x128,
@@ -4843,6 +4863,7 @@ const struct of_device_id of_mtk_match[] @@ -4846,6 +4866,7 @@ const struct of_device_id of_mtk_match[]
{ .compatible = "mediatek,mt7622-eth", .data = &mt7622_data}, { .compatible = "mediatek,mt7622-eth", .data = &mt7622_data},
{ .compatible = "mediatek,mt7623-eth", .data = &mt7623_data}, { .compatible = "mediatek,mt7623-eth", .data = &mt7623_data},
{ .compatible = "mediatek,mt7629-eth", .data = &mt7629_data}, { .compatible = "mediatek,mt7629-eth", .data = &mt7629_data},

View file

@ -60,7 +60,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
} }
return NULL; return NULL;
@@ -4014,8 +4015,17 @@ static int mtk_unreg_dev(struct mtk_eth @@ -4017,8 +4018,17 @@ static int mtk_unreg_dev(struct mtk_eth
return 0; return 0;
} }
@ -78,7 +78,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
mtk_unreg_dev(eth); mtk_unreg_dev(eth);
mtk_free_dev(eth); mtk_free_dev(eth);
cancel_work_sync(&eth->pending_work); cancel_work_sync(&eth->pending_work);
@@ -4455,6 +4465,36 @@ void mtk_eth_set_dma_device(struct mtk_e @@ -4458,6 +4468,36 @@ void mtk_eth_set_dma_device(struct mtk_e
rtnl_unlock(); rtnl_unlock();
} }
@ -115,7 +115,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
static int mtk_probe(struct platform_device *pdev) static int mtk_probe(struct platform_device *pdev)
{ {
struct resource *res = NULL; struct resource *res = NULL;
@@ -4518,13 +4558,7 @@ static int mtk_probe(struct platform_dev @@ -4521,13 +4561,7 @@ static int mtk_probe(struct platform_dev
} }
if (MTK_HAS_CAPS(eth->soc->caps, MTK_SGMII)) { if (MTK_HAS_CAPS(eth->soc->caps, MTK_SGMII)) {
@ -130,7 +130,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
if (err) if (err)
return err; return err;
@@ -4535,14 +4569,17 @@ static int mtk_probe(struct platform_dev @@ -4538,14 +4572,17 @@ static int mtk_probe(struct platform_dev
"mediatek,pctl"); "mediatek,pctl");
if (IS_ERR(eth->pctl)) { if (IS_ERR(eth->pctl)) {
dev_err(&pdev->dev, "no pctl regmap found\n"); dev_err(&pdev->dev, "no pctl regmap found\n");
@ -151,7 +151,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
} }
if (eth->soc->offload_version) { if (eth->soc->offload_version) {
@@ -4701,6 +4738,8 @@ err_deinit_hw: @@ -4704,6 +4741,8 @@ err_deinit_hw:
mtk_hw_deinit(eth); mtk_hw_deinit(eth);
err_wed_exit: err_wed_exit:
mtk_wed_exit(); mtk_wed_exit();

View file

@ -27,7 +27,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -4689,8 +4689,8 @@ static int mtk_probe(struct platform_dev @@ -4692,8 +4692,8 @@ static int mtk_probe(struct platform_dev
for (i = 0; i < num_ppe; i++) { for (i = 0; i < num_ppe; i++) {
u32 ppe_addr = eth->soc->reg_map->ppe_base + i * 0x400; u32 ppe_addr = eth->soc->reg_map->ppe_base + i * 0x400;
@ -38,7 +38,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
if (!eth->ppe[i]) { if (!eth->ppe[i]) {
err = -ENOMEM; err = -ENOMEM;
goto err_deinit_ppe; goto err_deinit_ppe;
@@ -4814,6 +4814,7 @@ static const struct mtk_soc_data mt7622_ @@ -4817,6 +4817,7 @@ static const struct mtk_soc_data mt7622_
.required_pctl = false, .required_pctl = false,
.offload_version = 2, .offload_version = 2,
.hash_offset = 2, .hash_offset = 2,
@ -46,7 +46,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
.foe_entry_size = sizeof(struct mtk_foe_entry) - 16, .foe_entry_size = sizeof(struct mtk_foe_entry) - 16,
.txrx = { .txrx = {
.txd_size = sizeof(struct mtk_tx_dma), .txd_size = sizeof(struct mtk_tx_dma),
@@ -4851,6 +4852,7 @@ static const struct mtk_soc_data mt7629_ @@ -4854,6 +4855,7 @@ static const struct mtk_soc_data mt7629_
.hw_features = MTK_HW_FEATURES, .hw_features = MTK_HW_FEATURES,
.required_clks = MT7629_CLKS_BITMAP, .required_clks = MT7629_CLKS_BITMAP,
.required_pctl = false, .required_pctl = false,
@ -54,7 +54,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
.txrx = { .txrx = {
.txd_size = sizeof(struct mtk_tx_dma), .txd_size = sizeof(struct mtk_tx_dma),
.rxd_size = sizeof(struct mtk_rx_dma), .rxd_size = sizeof(struct mtk_rx_dma),
@@ -4871,6 +4873,7 @@ static const struct mtk_soc_data mt7981_ @@ -4874,6 +4876,7 @@ static const struct mtk_soc_data mt7981_
.offload_version = 2, .offload_version = 2,
.hash_offset = 4, .hash_offset = 4,
.foe_entry_size = sizeof(struct mtk_foe_entry), .foe_entry_size = sizeof(struct mtk_foe_entry),
@ -62,7 +62,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
.txrx = { .txrx = {
.txd_size = sizeof(struct mtk_tx_dma_v2), .txd_size = sizeof(struct mtk_tx_dma_v2),
.rxd_size = sizeof(struct mtk_rx_dma_v2), .rxd_size = sizeof(struct mtk_rx_dma_v2),
@@ -4891,6 +4894,7 @@ static const struct mtk_soc_data mt7986_ @@ -4894,6 +4897,7 @@ static const struct mtk_soc_data mt7986_
.offload_version = 2, .offload_version = 2,
.hash_offset = 4, .hash_offset = 4,
.foe_entry_size = sizeof(struct mtk_foe_entry), .foe_entry_size = sizeof(struct mtk_foe_entry),

View file

@ -70,7 +70,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
skb_record_rx_queue(skb, 0); skb_record_rx_queue(skb, 0);
napi_gro_receive(napi, skb); napi_gro_receive(napi, skb);
@@ -2887,29 +2870,11 @@ static netdev_features_t mtk_fix_feature @@ -2890,29 +2873,11 @@ static netdev_features_t mtk_fix_feature
static int mtk_set_features(struct net_device *dev, netdev_features_t features) static int mtk_set_features(struct net_device *dev, netdev_features_t features)
{ {
@ -100,7 +100,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
return 0; return 0;
} }
@@ -3223,30 +3188,6 @@ static int mtk_open(struct net_device *d @@ -3226,30 +3191,6 @@ static int mtk_open(struct net_device *d
struct mtk_eth *eth = mac->hw; struct mtk_eth *eth = mac->hw;
int i, err; int i, err;
@ -131,7 +131,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
err = phylink_of_phy_connect(mac->phylink, mac->of_node, 0); err = phylink_of_phy_connect(mac->phylink, mac->of_node, 0);
if (err) { if (err) {
netdev_err(dev, "%s: could not attach PHY: %d\n", __func__, netdev_err(dev, "%s: could not attach PHY: %d\n", __func__,
@@ -3285,6 +3226,35 @@ static int mtk_open(struct net_device *d @@ -3288,6 +3229,35 @@ static int mtk_open(struct net_device *d
phylink_start(mac->phylink); phylink_start(mac->phylink);
netif_tx_start_all_queues(dev); netif_tx_start_all_queues(dev);
@ -167,7 +167,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
return 0; return 0;
} }
@@ -3769,10 +3739,9 @@ static int mtk_hw_init(struct mtk_eth *e @@ -3772,10 +3742,9 @@ static int mtk_hw_init(struct mtk_eth *e
if (!MTK_HAS_CAPS(eth->soc->caps, MTK_NETSYS_V2)) { if (!MTK_HAS_CAPS(eth->soc->caps, MTK_NETSYS_V2)) {
val = mtk_r32(eth, MTK_CDMP_IG_CTRL); val = mtk_r32(eth, MTK_CDMP_IG_CTRL);
mtk_w32(eth, val | MTK_CDMP_STAG_EN, MTK_CDMP_IG_CTRL); mtk_w32(eth, val | MTK_CDMP_STAG_EN, MTK_CDMP_IG_CTRL);
@ -180,7 +180,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
/* set interrupt delays based on current Net DIM sample */ /* set interrupt delays based on current Net DIM sample */
mtk_dim_rx(&eth->rx_dim.work); mtk_dim_rx(&eth->rx_dim.work);
@@ -4412,7 +4381,7 @@ static int mtk_add_mac(struct mtk_eth *e @@ -4415,7 +4384,7 @@ static int mtk_add_mac(struct mtk_eth *e
eth->netdev[id]->hw_features |= NETIF_F_LRO; eth->netdev[id]->hw_features |= NETIF_F_LRO;
eth->netdev[id]->vlan_features = eth->soc->hw_features & eth->netdev[id]->vlan_features = eth->soc->hw_features &

View file

@ -17,7 +17,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -4763,7 +4763,7 @@ static const struct mtk_soc_data mt7621_ @@ -4766,7 +4766,7 @@ static const struct mtk_soc_data mt7621_
.required_pctl = false, .required_pctl = false,
.offload_version = 1, .offload_version = 1,
.hash_offset = 2, .hash_offset = 2,
@ -26,7 +26,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
.txrx = { .txrx = {
.txd_size = sizeof(struct mtk_tx_dma), .txd_size = sizeof(struct mtk_tx_dma),
.rxd_size = sizeof(struct mtk_rx_dma), .rxd_size = sizeof(struct mtk_rx_dma),
@@ -4784,7 +4784,7 @@ static const struct mtk_soc_data mt7622_ @@ -4787,7 +4787,7 @@ static const struct mtk_soc_data mt7622_
.offload_version = 2, .offload_version = 2,
.hash_offset = 2, .hash_offset = 2,
.has_accounting = true, .has_accounting = true,
@ -35,7 +35,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
.txrx = { .txrx = {
.txd_size = sizeof(struct mtk_tx_dma), .txd_size = sizeof(struct mtk_tx_dma),
.rxd_size = sizeof(struct mtk_rx_dma), .rxd_size = sizeof(struct mtk_rx_dma),
@@ -4803,7 +4803,7 @@ static const struct mtk_soc_data mt7623_ @@ -4806,7 +4806,7 @@ static const struct mtk_soc_data mt7623_
.required_pctl = true, .required_pctl = true,
.offload_version = 1, .offload_version = 1,
.hash_offset = 2, .hash_offset = 2,
@ -44,7 +44,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
.txrx = { .txrx = {
.txd_size = sizeof(struct mtk_tx_dma), .txd_size = sizeof(struct mtk_tx_dma),
.rxd_size = sizeof(struct mtk_rx_dma), .rxd_size = sizeof(struct mtk_rx_dma),
@@ -4841,8 +4841,8 @@ static const struct mtk_soc_data mt7981_ @@ -4844,8 +4844,8 @@ static const struct mtk_soc_data mt7981_
.required_pctl = false, .required_pctl = false,
.offload_version = 2, .offload_version = 2,
.hash_offset = 4, .hash_offset = 4,
@ -54,7 +54,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
.txrx = { .txrx = {
.txd_size = sizeof(struct mtk_tx_dma_v2), .txd_size = sizeof(struct mtk_tx_dma_v2),
.rxd_size = sizeof(struct mtk_rx_dma_v2), .rxd_size = sizeof(struct mtk_rx_dma_v2),
@@ -4862,8 +4862,8 @@ static const struct mtk_soc_data mt7986_ @@ -4865,8 +4865,8 @@ static const struct mtk_soc_data mt7986_
.required_pctl = false, .required_pctl = false,
.offload_version = 2, .offload_version = 2,
.hash_offset = 4, .hash_offset = 4,

View file

@ -95,7 +95,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
/* mt7623_pad_clk_setup */ /* mt7623_pad_clk_setup */
for (i = 0 ; i < NUM_TRGMII_CTRL; i++) for (i = 0 ; i < NUM_TRGMII_CTRL; i++)
@@ -4340,13 +4312,19 @@ static int mtk_add_mac(struct mtk_eth *e @@ -4343,13 +4315,19 @@ static int mtk_add_mac(struct mtk_eth *e
mac->phylink_config.mac_capabilities = MAC_ASYM_PAUSE | MAC_SYM_PAUSE | mac->phylink_config.mac_capabilities = MAC_ASYM_PAUSE | MAC_SYM_PAUSE |
MAC_10 | MAC_100 | MAC_1000 | MAC_2500FD; MAC_10 | MAC_100 | MAC_1000 | MAC_2500FD;
@ -121,7 +121,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
if (MTK_HAS_CAPS(mac->hw->soc->caps, MTK_TRGMII) && !mac->id) if (MTK_HAS_CAPS(mac->hw->soc->caps, MTK_TRGMII) && !mac->id)
__set_bit(PHY_INTERFACE_MODE_TRGMII, __set_bit(PHY_INTERFACE_MODE_TRGMII,
@@ -4804,6 +4782,7 @@ static const struct mtk_soc_data mt7623_ @@ -4807,6 +4785,7 @@ static const struct mtk_soc_data mt7623_
.offload_version = 1, .offload_version = 1,
.hash_offset = 2, .hash_offset = 2,
.foe_entry_size = MTK_FOE_ENTRY_V1_SIZE, .foe_entry_size = MTK_FOE_ENTRY_V1_SIZE,

View file

@ -70,7 +70,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
.mac_config = mtk_mac_config, .mac_config = mtk_mac_config,
.mac_finish = mtk_mac_finish, .mac_finish = mtk_mac_finish,
.mac_link_down = mtk_mac_link_down, .mac_link_down = mtk_mac_link_down,
@@ -4307,8 +4274,6 @@ static int mtk_add_mac(struct mtk_eth *e @@ -4310,8 +4277,6 @@ static int mtk_add_mac(struct mtk_eth *e
mac->phylink_config.dev = &eth->netdev[id]->dev; mac->phylink_config.dev = &eth->netdev[id]->dev;
mac->phylink_config.type = PHYLINK_NETDEV; mac->phylink_config.type = PHYLINK_NETDEV;

View file

@ -132,7 +132,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
rxd->rxd5 = 0; rxd->rxd5 = 0;
rxd->rxd6 = 0; rxd->rxd6 = 0;
rxd->rxd7 = 0; rxd->rxd7 = 0;
@@ -3023,7 +3023,7 @@ static int mtk_start_dma(struct mtk_eth @@ -3026,7 +3026,7 @@ static int mtk_start_dma(struct mtk_eth
MTK_TX_BT_32DWORDS | MTK_NDP_CO_PRO | MTK_TX_BT_32DWORDS | MTK_NDP_CO_PRO |
MTK_RX_2B_OFFSET | MTK_TX_WB_DDONE; MTK_RX_2B_OFFSET | MTK_TX_WB_DDONE;
@ -141,7 +141,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
val |= MTK_MUTLI_CNT | MTK_RESV_BUF | val |= MTK_MUTLI_CNT | MTK_RESV_BUF |
MTK_WCOMP_EN | MTK_DMAD_WR_WDONE | MTK_WCOMP_EN | MTK_DMAD_WR_WDONE |
MTK_CHK_DDONE_EN | MTK_LEAKY_BUCKET_EN; MTK_CHK_DDONE_EN | MTK_LEAKY_BUCKET_EN;
@@ -3165,7 +3165,7 @@ static int mtk_open(struct net_device *d @@ -3168,7 +3168,7 @@ static int mtk_open(struct net_device *d
phylink_start(mac->phylink); phylink_start(mac->phylink);
netif_tx_start_all_queues(dev); netif_tx_start_all_queues(dev);
@ -150,7 +150,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
return 0; return 0;
if (mtk_uses_dsa(dev) && !eth->prog) { if (mtk_uses_dsa(dev) && !eth->prog) {
@@ -3430,7 +3430,7 @@ static void mtk_hw_reset(struct mtk_eth @@ -3433,7 +3433,7 @@ static void mtk_hw_reset(struct mtk_eth
{ {
u32 val; u32 val;
@ -159,7 +159,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
regmap_write(eth->ethsys, ETHSYS_FE_RST_CHK_IDLE_EN, 0); regmap_write(eth->ethsys, ETHSYS_FE_RST_CHK_IDLE_EN, 0);
val = RSTCTRL_PPE0_V2; val = RSTCTRL_PPE0_V2;
} else { } else {
@@ -3442,7 +3442,7 @@ static void mtk_hw_reset(struct mtk_eth @@ -3445,7 +3445,7 @@ static void mtk_hw_reset(struct mtk_eth
ethsys_reset(eth, RSTCTRL_ETH | RSTCTRL_FE | val); ethsys_reset(eth, RSTCTRL_ETH | RSTCTRL_FE | val);
@ -168,7 +168,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
regmap_write(eth->ethsys, ETHSYS_FE_RST_CHK_IDLE_EN, regmap_write(eth->ethsys, ETHSYS_FE_RST_CHK_IDLE_EN,
0x3ffffff); 0x3ffffff);
} }
@@ -3468,7 +3468,7 @@ static void mtk_hw_warm_reset(struct mtk @@ -3471,7 +3471,7 @@ static void mtk_hw_warm_reset(struct mtk
return; return;
} }
@ -177,7 +177,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
rst_mask = RSTCTRL_ETH | RSTCTRL_PPE0_V2; rst_mask = RSTCTRL_ETH | RSTCTRL_PPE0_V2;
else else
rst_mask = RSTCTRL_ETH | RSTCTRL_PPE0; rst_mask = RSTCTRL_ETH | RSTCTRL_PPE0;
@@ -3638,7 +3638,7 @@ static int mtk_hw_init(struct mtk_eth *e @@ -3641,7 +3641,7 @@ static int mtk_hw_init(struct mtk_eth *e
else else
mtk_hw_reset(eth); mtk_hw_reset(eth);
@ -186,7 +186,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
/* Set FE to PDMAv2 if necessary */ /* Set FE to PDMAv2 if necessary */
val = mtk_r32(eth, MTK_FE_GLO_MISC); val = mtk_r32(eth, MTK_FE_GLO_MISC);
mtk_w32(eth, val | BIT(4), MTK_FE_GLO_MISC); mtk_w32(eth, val | BIT(4), MTK_FE_GLO_MISC);
@@ -3675,7 +3675,7 @@ static int mtk_hw_init(struct mtk_eth *e @@ -3678,7 +3678,7 @@ static int mtk_hw_init(struct mtk_eth *e
*/ */
val = mtk_r32(eth, MTK_CDMQ_IG_CTRL); val = mtk_r32(eth, MTK_CDMQ_IG_CTRL);
mtk_w32(eth, val | MTK_CDMQ_STAG_EN, MTK_CDMQ_IG_CTRL); mtk_w32(eth, val | MTK_CDMQ_STAG_EN, MTK_CDMQ_IG_CTRL);
@ -195,7 +195,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
val = mtk_r32(eth, MTK_CDMP_IG_CTRL); val = mtk_r32(eth, MTK_CDMP_IG_CTRL);
mtk_w32(eth, val | MTK_CDMP_STAG_EN, MTK_CDMP_IG_CTRL); mtk_w32(eth, val | MTK_CDMP_STAG_EN, MTK_CDMP_IG_CTRL);
@@ -3697,7 +3697,7 @@ static int mtk_hw_init(struct mtk_eth *e @@ -3700,7 +3700,7 @@ static int mtk_hw_init(struct mtk_eth *e
mtk_w32(eth, eth->soc->txrx.rx_irq_done_mask, reg_map->qdma.int_grp + 4); mtk_w32(eth, eth->soc->txrx.rx_irq_done_mask, reg_map->qdma.int_grp + 4);
mtk_w32(eth, 0x21021000, MTK_FE_INT_GRP); mtk_w32(eth, 0x21021000, MTK_FE_INT_GRP);
@ -204,7 +204,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
/* PSE should not drop port8 and port9 packets from WDMA Tx */ /* PSE should not drop port8 and port9 packets from WDMA Tx */
mtk_w32(eth, 0x00000300, PSE_DROP_CFG); mtk_w32(eth, 0x00000300, PSE_DROP_CFG);
@@ -4486,7 +4486,7 @@ static int mtk_probe(struct platform_dev @@ -4489,7 +4489,7 @@ static int mtk_probe(struct platform_dev
} }
} }
@ -213,7 +213,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
res = platform_get_resource(pdev, IORESOURCE_MEM, 0); res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res) { if (!res) {
err = -EINVAL; err = -EINVAL;
@@ -4594,9 +4594,8 @@ static int mtk_probe(struct platform_dev @@ -4597,9 +4597,8 @@ static int mtk_probe(struct platform_dev
} }
if (eth->soc->offload_version) { if (eth->soc->offload_version) {
@ -224,7 +224,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
num_ppe = min_t(u32, ARRAY_SIZE(eth->ppe), num_ppe); num_ppe = min_t(u32, ARRAY_SIZE(eth->ppe), num_ppe);
for (i = 0; i < num_ppe; i++) { for (i = 0; i < num_ppe; i++) {
u32 ppe_addr = eth->soc->reg_map->ppe_base + i * 0x400; u32 ppe_addr = eth->soc->reg_map->ppe_base + i * 0x400;
@@ -4688,6 +4687,7 @@ static const struct mtk_soc_data mt2701_ @@ -4691,6 +4690,7 @@ static const struct mtk_soc_data mt2701_
.hw_features = MTK_HW_FEATURES, .hw_features = MTK_HW_FEATURES,
.required_clks = MT7623_CLKS_BITMAP, .required_clks = MT7623_CLKS_BITMAP,
.required_pctl = true, .required_pctl = true,
@ -232,7 +232,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
.txrx = { .txrx = {
.txd_size = sizeof(struct mtk_tx_dma), .txd_size = sizeof(struct mtk_tx_dma),
.rxd_size = sizeof(struct mtk_rx_dma), .rxd_size = sizeof(struct mtk_rx_dma),
@@ -4704,6 +4704,7 @@ static const struct mtk_soc_data mt7621_ @@ -4707,6 +4707,7 @@ static const struct mtk_soc_data mt7621_
.hw_features = MTK_HW_FEATURES, .hw_features = MTK_HW_FEATURES,
.required_clks = MT7621_CLKS_BITMAP, .required_clks = MT7621_CLKS_BITMAP,
.required_pctl = false, .required_pctl = false,
@ -240,7 +240,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
.offload_version = 1, .offload_version = 1,
.hash_offset = 2, .hash_offset = 2,
.foe_entry_size = MTK_FOE_ENTRY_V1_SIZE, .foe_entry_size = MTK_FOE_ENTRY_V1_SIZE,
@@ -4724,6 +4725,7 @@ static const struct mtk_soc_data mt7622_ @@ -4727,6 +4728,7 @@ static const struct mtk_soc_data mt7622_
.hw_features = MTK_HW_FEATURES, .hw_features = MTK_HW_FEATURES,
.required_clks = MT7622_CLKS_BITMAP, .required_clks = MT7622_CLKS_BITMAP,
.required_pctl = false, .required_pctl = false,
@ -248,7 +248,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
.offload_version = 2, .offload_version = 2,
.hash_offset = 2, .hash_offset = 2,
.has_accounting = true, .has_accounting = true,
@@ -4744,6 +4746,7 @@ static const struct mtk_soc_data mt7623_ @@ -4747,6 +4749,7 @@ static const struct mtk_soc_data mt7623_
.hw_features = MTK_HW_FEATURES, .hw_features = MTK_HW_FEATURES,
.required_clks = MT7623_CLKS_BITMAP, .required_clks = MT7623_CLKS_BITMAP,
.required_pctl = true, .required_pctl = true,
@ -256,7 +256,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
.offload_version = 1, .offload_version = 1,
.hash_offset = 2, .hash_offset = 2,
.foe_entry_size = MTK_FOE_ENTRY_V1_SIZE, .foe_entry_size = MTK_FOE_ENTRY_V1_SIZE,
@@ -4766,6 +4769,7 @@ static const struct mtk_soc_data mt7629_ @@ -4769,6 +4772,7 @@ static const struct mtk_soc_data mt7629_
.required_clks = MT7629_CLKS_BITMAP, .required_clks = MT7629_CLKS_BITMAP,
.required_pctl = false, .required_pctl = false,
.has_accounting = true, .has_accounting = true,
@ -264,7 +264,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
.txrx = { .txrx = {
.txd_size = sizeof(struct mtk_tx_dma), .txd_size = sizeof(struct mtk_tx_dma),
.rxd_size = sizeof(struct mtk_rx_dma), .rxd_size = sizeof(struct mtk_rx_dma),
@@ -4783,6 +4787,7 @@ static const struct mtk_soc_data mt7981_ @@ -4786,6 +4790,7 @@ static const struct mtk_soc_data mt7981_
.hw_features = MTK_HW_FEATURES, .hw_features = MTK_HW_FEATURES,
.required_clks = MT7981_CLKS_BITMAP, .required_clks = MT7981_CLKS_BITMAP,
.required_pctl = false, .required_pctl = false,
@ -272,7 +272,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
.offload_version = 2, .offload_version = 2,
.hash_offset = 4, .hash_offset = 4,
.has_accounting = true, .has_accounting = true,
@@ -4804,6 +4809,7 @@ static const struct mtk_soc_data mt7986_ @@ -4807,6 +4812,7 @@ static const struct mtk_soc_data mt7986_
.hw_features = MTK_HW_FEATURES, .hw_features = MTK_HW_FEATURES,
.required_clks = MT7986_CLKS_BITMAP, .required_clks = MT7986_CLKS_BITMAP,
.required_pctl = false, .required_pctl = false,
@ -280,7 +280,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
.offload_version = 2, .offload_version = 2,
.hash_offset = 4, .hash_offset = 4,
.has_accounting = true, .has_accounting = true,
@@ -4824,6 +4830,7 @@ static const struct mtk_soc_data rt5350_ @@ -4827,6 +4833,7 @@ static const struct mtk_soc_data rt5350_
.hw_features = MTK_HW_FEATURES_MT7628, .hw_features = MTK_HW_FEATURES_MT7628,
.required_clks = MT7628_CLKS_BITMAP, .required_clks = MT7628_CLKS_BITMAP,
.required_pctl = false, .required_pctl = false,

View file

@ -53,7 +53,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
!eth->netdev[mac])) !eth->netdev[mac]))
goto release_desc; goto release_desc;
@@ -2897,7 +2897,7 @@ static void mtk_dma_free(struct mtk_eth @@ -2900,7 +2900,7 @@ static void mtk_dma_free(struct mtk_eth
const struct mtk_soc_data *soc = eth->soc; const struct mtk_soc_data *soc = eth->soc;
int i; int i;
@ -62,7 +62,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
if (eth->netdev[i]) if (eth->netdev[i])
netdev_reset_queue(eth->netdev[i]); netdev_reset_queue(eth->netdev[i]);
if (eth->scratch_ring) { if (eth->scratch_ring) {
@@ -3051,8 +3051,13 @@ static void mtk_gdm_config(struct mtk_et @@ -3054,8 +3054,13 @@ static void mtk_gdm_config(struct mtk_et
if (MTK_HAS_CAPS(eth->soc->caps, MTK_SOC_MT7628)) if (MTK_HAS_CAPS(eth->soc->caps, MTK_SOC_MT7628))
return; return;
@ -78,7 +78,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
/* default setup the forward port to send frame to PDMA */ /* default setup the forward port to send frame to PDMA */
val &= ~0xffff; val &= ~0xffff;
@@ -3062,7 +3067,7 @@ static void mtk_gdm_config(struct mtk_et @@ -3065,7 +3070,7 @@ static void mtk_gdm_config(struct mtk_et
val |= config; val |= config;
@ -87,7 +87,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
val |= MTK_GDMA_SPECIAL_TAG; val |= MTK_GDMA_SPECIAL_TAG;
mtk_w32(eth, val, MTK_GDMA_FWD_CFG(i)); mtk_w32(eth, val, MTK_GDMA_FWD_CFG(i));
@@ -3659,15 +3664,15 @@ static int mtk_hw_init(struct mtk_eth *e @@ -3662,15 +3667,15 @@ static int mtk_hw_init(struct mtk_eth *e
* up with the more appropriate value when mtk_mac_config call is being * up with the more appropriate value when mtk_mac_config call is being
* invoked. * invoked.
*/ */
@ -109,7 +109,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
} }
/* Indicates CDM to parse the MTK special tag from CPU /* Indicates CDM to parse the MTK special tag from CPU
@@ -3847,7 +3852,7 @@ static void mtk_pending_work(struct work @@ -3850,7 +3855,7 @@ static void mtk_pending_work(struct work
mtk_prepare_for_reset(eth); mtk_prepare_for_reset(eth);
/* stop all devices to make sure that dma is properly shut down */ /* stop all devices to make sure that dma is properly shut down */
@ -118,7 +118,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
if (!eth->netdev[i] || !netif_running(eth->netdev[i])) if (!eth->netdev[i] || !netif_running(eth->netdev[i]))
continue; continue;
@@ -3863,8 +3868,8 @@ static void mtk_pending_work(struct work @@ -3866,8 +3871,8 @@ static void mtk_pending_work(struct work
mtk_hw_init(eth, true); mtk_hw_init(eth, true);
/* restart DMA and enable IRQs */ /* restart DMA and enable IRQs */
@ -129,7 +129,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
continue; continue;
if (mtk_open(eth->netdev[i])) { if (mtk_open(eth->netdev[i])) {
@@ -3891,7 +3896,7 @@ static int mtk_free_dev(struct mtk_eth * @@ -3894,7 +3899,7 @@ static int mtk_free_dev(struct mtk_eth *
{ {
int i; int i;
@ -138,7 +138,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
if (!eth->netdev[i]) if (!eth->netdev[i])
continue; continue;
free_netdev(eth->netdev[i]); free_netdev(eth->netdev[i]);
@@ -3910,7 +3915,7 @@ static int mtk_unreg_dev(struct mtk_eth @@ -3913,7 +3918,7 @@ static int mtk_unreg_dev(struct mtk_eth
{ {
int i; int i;
@ -147,7 +147,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
struct mtk_mac *mac; struct mtk_mac *mac;
if (!eth->netdev[i]) if (!eth->netdev[i])
continue; continue;
@@ -4211,7 +4216,7 @@ static int mtk_add_mac(struct mtk_eth *e @@ -4214,7 +4219,7 @@ static int mtk_add_mac(struct mtk_eth *e
} }
id = be32_to_cpup(_id); id = be32_to_cpup(_id);
@ -156,7 +156,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
dev_err(eth->dev, "%d is not a valid mac id\n", id); dev_err(eth->dev, "%d is not a valid mac id\n", id);
return -EINVAL; return -EINVAL;
} }
@@ -4356,7 +4361,7 @@ void mtk_eth_set_dma_device(struct mtk_e @@ -4359,7 +4364,7 @@ void mtk_eth_set_dma_device(struct mtk_e
rtnl_lock(); rtnl_lock();
@ -165,7 +165,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
dev = eth->netdev[i]; dev = eth->netdev[i];
if (!dev || !(dev->flags & IFF_UP)) if (!dev || !(dev->flags & IFF_UP))
@@ -4662,7 +4667,7 @@ static int mtk_remove(struct platform_de @@ -4665,7 +4670,7 @@ static int mtk_remove(struct platform_de
int i; int i;
/* stop all devices to make sure that dma is properly shut down */ /* stop all devices to make sure that dma is properly shut down */

View file

@ -167,7 +167,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
budget--; budget--;
} }
@@ -3702,7 +3730,24 @@ static int mtk_hw_init(struct mtk_eth *e @@ -3705,7 +3733,24 @@ static int mtk_hw_init(struct mtk_eth *e
mtk_w32(eth, eth->soc->txrx.rx_irq_done_mask, reg_map->qdma.int_grp + 4); mtk_w32(eth, eth->soc->txrx.rx_irq_done_mask, reg_map->qdma.int_grp + 4);
mtk_w32(eth, 0x21021000, MTK_FE_INT_GRP); mtk_w32(eth, 0x21021000, MTK_FE_INT_GRP);
@ -193,7 +193,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
/* PSE should not drop port8 and port9 packets from WDMA Tx */ /* PSE should not drop port8 and port9 packets from WDMA Tx */
mtk_w32(eth, 0x00000300, PSE_DROP_CFG); mtk_w32(eth, 0x00000300, PSE_DROP_CFG);
@@ -4264,7 +4309,11 @@ static int mtk_add_mac(struct mtk_eth *e @@ -4267,7 +4312,11 @@ static int mtk_add_mac(struct mtk_eth *e
} }
spin_lock_init(&mac->hw_stats->stats_lock); spin_lock_init(&mac->hw_stats->stats_lock);
u64_stats_init(&mac->hw_stats->syncp); u64_stats_init(&mac->hw_stats->syncp);

View file

@ -263,7 +263,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
data |= TX_DMA_SWC_V2 | QID_BITS_V2(info->qid); data |= TX_DMA_SWC_V2 | QID_BITS_V2(info->qid);
WRITE_ONCE(desc->txd4, data); WRITE_ONCE(desc->txd4, data);
@@ -4358,6 +4487,17 @@ static int mtk_add_mac(struct mtk_eth *e @@ -4361,6 +4490,17 @@ static int mtk_add_mac(struct mtk_eth *e
mac->phylink_config.supported_interfaces); mac->phylink_config.supported_interfaces);
} }
@ -281,7 +281,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
phylink = phylink_create(&mac->phylink_config, phylink = phylink_create(&mac->phylink_config,
of_fwnode_handle(mac->of_node), of_fwnode_handle(mac->of_node),
phy_mode, &mtk_phylink_ops); phy_mode, &mtk_phylink_ops);
@@ -4878,6 +5018,24 @@ static const struct mtk_soc_data mt7986_ @@ -4881,6 +5021,24 @@ static const struct mtk_soc_data mt7986_
}, },
}; };
@ -306,7 +306,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
static const struct mtk_soc_data rt5350_data = { static const struct mtk_soc_data rt5350_data = {
.reg_map = &mt7628_reg_map, .reg_map = &mt7628_reg_map,
.caps = MT7628_CAPS, .caps = MT7628_CAPS,
@@ -4896,14 +5054,15 @@ static const struct mtk_soc_data rt5350_ @@ -4899,14 +5057,15 @@ static const struct mtk_soc_data rt5350_
}; };
const struct of_device_id of_mtk_match[] = { const struct of_device_id of_mtk_match[] = {

View file

@ -18,7 +18,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -5026,6 +5026,9 @@ static const struct mtk_soc_data mt7988_ @@ -5029,6 +5029,9 @@ static const struct mtk_soc_data mt7988_
.required_clks = MT7988_CLKS_BITMAP, .required_clks = MT7988_CLKS_BITMAP,
.required_pctl = false, .required_pctl = false,
.version = 3, .version = 3,

View file

@ -20,7 +20,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -5028,6 +5028,7 @@ static const struct mtk_soc_data mt7988_ @@ -5031,6 +5031,7 @@ static const struct mtk_soc_data mt7988_
.version = 3, .version = 3,
.offload_version = 2, .offload_version = 2,
.hash_offset = 4, .hash_offset = 4,

View file

@ -16,7 +16,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -3592,19 +3592,34 @@ static void mtk_hw_reset(struct mtk_eth @@ -3595,19 +3595,34 @@ static void mtk_hw_reset(struct mtk_eth
{ {
u32 val; u32 val;
@ -56,7 +56,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
regmap_write(eth->ethsys, ETHSYS_FE_RST_CHK_IDLE_EN, regmap_write(eth->ethsys, ETHSYS_FE_RST_CHK_IDLE_EN,
0x3ffffff); 0x3ffffff);
} }
@@ -3630,13 +3645,21 @@ static void mtk_hw_warm_reset(struct mtk @@ -3633,13 +3648,21 @@ static void mtk_hw_warm_reset(struct mtk
return; return;
} }
@ -83,7 +83,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
regmap_update_bits(eth->ethsys, ETHSYS_RSTCTRL, rst_mask, rst_mask); regmap_update_bits(eth->ethsys, ETHSYS_RSTCTRL, rst_mask, rst_mask);
@@ -3988,11 +4011,17 @@ static void mtk_prepare_for_reset(struct @@ -3991,11 +4014,17 @@ static void mtk_prepare_for_reset(struct
u32 val; u32 val;
int i; int i;
@ -106,7 +106,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
/* adjust PPE configurations to prepare for reset */ /* adjust PPE configurations to prepare for reset */
for (i = 0; i < ARRAY_SIZE(eth->ppe); i++) for (i = 0; i < ARRAY_SIZE(eth->ppe); i++)
@@ -4053,11 +4082,18 @@ static void mtk_pending_work(struct work @@ -4056,11 +4085,18 @@ static void mtk_pending_work(struct work
} }
} }

View file

@ -123,7 +123,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
dma_free_coherent(eth->dma_dev, dma_free_coherent(eth->dma_dev,
ring->dma_size * eth->soc->txrx.rxd_size, ring->dma_size * eth->soc->txrx.rxd_size,
ring->dma, ring->phys); ring->dma, ring->phys);
@@ -3057,7 +3081,7 @@ static void mtk_dma_free(struct mtk_eth @@ -3060,7 +3084,7 @@ static void mtk_dma_free(struct mtk_eth
for (i = 0; i < MTK_MAX_DEVS; i++) for (i = 0; i < MTK_MAX_DEVS; i++)
if (eth->netdev[i]) if (eth->netdev[i])
netdev_reset_queue(eth->netdev[i]); netdev_reset_queue(eth->netdev[i]);
@ -132,7 +132,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
dma_free_coherent(eth->dma_dev, dma_free_coherent(eth->dma_dev,
MTK_QDMA_RING_SIZE * soc->txrx.txd_size, MTK_QDMA_RING_SIZE * soc->txrx.txd_size,
eth->scratch_ring, eth->phy_scratch_ring); eth->scratch_ring, eth->phy_scratch_ring);
@@ -3065,13 +3089,13 @@ static void mtk_dma_free(struct mtk_eth @@ -3068,13 +3092,13 @@ static void mtk_dma_free(struct mtk_eth
eth->phy_scratch_ring = 0; eth->phy_scratch_ring = 0;
} }
mtk_tx_clean(eth); mtk_tx_clean(eth);
@ -149,7 +149,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
} }
kfree(eth->scratch_head); kfree(eth->scratch_head);
@@ -4639,7 +4663,7 @@ static int mtk_sgmii_init(struct mtk_eth @@ -4642,7 +4666,7 @@ static int mtk_sgmii_init(struct mtk_eth
static int mtk_probe(struct platform_device *pdev) static int mtk_probe(struct platform_device *pdev)
{ {
@ -158,7 +158,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
struct device_node *mac_np; struct device_node *mac_np;
struct mtk_eth *eth; struct mtk_eth *eth;
int err, i; int err, i;
@@ -4659,6 +4683,20 @@ static int mtk_probe(struct platform_dev @@ -4662,6 +4686,20 @@ static int mtk_probe(struct platform_dev
if (MTK_HAS_CAPS(eth->soc->caps, MTK_SOC_MT7628)) if (MTK_HAS_CAPS(eth->soc->caps, MTK_SOC_MT7628))
eth->ip_align = NET_IP_ALIGN; eth->ip_align = NET_IP_ALIGN;
@ -179,7 +179,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
spin_lock_init(&eth->page_lock); spin_lock_init(&eth->page_lock);
spin_lock_init(&eth->tx_irq_lock); spin_lock_init(&eth->tx_irq_lock);
spin_lock_init(&eth->rx_irq_lock); spin_lock_init(&eth->rx_irq_lock);
@@ -4722,6 +4760,18 @@ static int mtk_probe(struct platform_dev @@ -4725,6 +4763,18 @@ static int mtk_probe(struct platform_dev
err = -EINVAL; err = -EINVAL;
goto err_destroy_sgmii; goto err_destroy_sgmii;
} }

View file

@ -90,7 +90,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
ring->buf_size, DMA_FROM_DEVICE); ring->buf_size, DMA_FROM_DEVICE);
mtk_rx_put_buff(ring, ring->data[i], false); mtk_rx_put_buff(ring, ring->data[i], false);
} }
@@ -4697,6 +4715,14 @@ static int mtk_probe(struct platform_dev @@ -4700,6 +4718,14 @@ static int mtk_probe(struct platform_dev
} }
} }

View file

@ -21,7 +21,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
--- a/drivers/of/property.c --- a/drivers/of/property.c
+++ b/drivers/of/property.c +++ b/drivers/of/property.c
@@ -1202,8 +1202,8 @@ static struct device_node *parse_prop_ce @@ -1144,8 +1144,8 @@ static struct device_node *parse_prop_ce
if (strcmp(prop_name, list_name)) if (strcmp(prop_name, list_name))
return NULL; return NULL;

View file

@ -19,7 +19,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
--- a/drivers/of/property.c --- a/drivers/of/property.c
+++ b/drivers/of/property.c +++ b/drivers/of/property.c
@@ -1307,7 +1307,7 @@ DEFINE_SIMPLE_PROP(dmas, "dmas", "#dma-c @@ -1249,7 +1249,7 @@ DEFINE_SIMPLE_PROP(dmas, "dmas", "#dma-c
DEFINE_SIMPLE_PROP(power_domains, "power-domains", "#power-domain-cells") DEFINE_SIMPLE_PROP(power_domains, "power-domains", "#power-domain-cells")
DEFINE_SIMPLE_PROP(hwlocks, "hwlocks", "#hwlock-cells") DEFINE_SIMPLE_PROP(hwlocks, "hwlocks", "#hwlock-cells")
DEFINE_SIMPLE_PROP(extcon, "extcon", NULL) DEFINE_SIMPLE_PROP(extcon, "extcon", NULL)

View file

@ -7507,6 +7507,7 @@ CONFIG_VHOST_MENU=y
# CONFIG_VIDEO_CADENCE_CSI2RX is not set # CONFIG_VIDEO_CADENCE_CSI2RX is not set
# CONFIG_VIDEO_CADENCE_CSI2TX is not set # CONFIG_VIDEO_CADENCE_CSI2TX is not set
# CONFIG_VIDEO_CAFE_CCIC is not set # CONFIG_VIDEO_CAFE_CCIC is not set
# CONFIG_VIDEO_CAMERA_SENSOR is not set
# CONFIG_VIDEO_CCS is not set # CONFIG_VIDEO_CCS is not set
# CONFIG_VIDEO_COBALT is not set # CONFIG_VIDEO_COBALT is not set
# CONFIG_VIDEO_CODA is not set # CONFIG_VIDEO_CODA is not set

View file

@ -10,7 +10,7 @@ Subject: [PATCH] Kconfig: add tristate for OID and ASNI string
--- a/init/Kconfig --- a/init/Kconfig
+++ b/init/Kconfig +++ b/init/Kconfig
@@ -2003,7 +2003,7 @@ config PADATA @@ -2004,7 +2004,7 @@ config PADATA
bool bool
config ASN1 config ASN1

View file

@ -60,7 +60,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
*/ */
--- a/include/linux/skbuff.h --- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h +++ b/include/linux/skbuff.h
@@ -3032,6 +3032,10 @@ static inline int pskb_trim(struct sk_bu @@ -3040,6 +3040,10 @@ static inline int pskb_trim(struct sk_bu
return (len < skb->len) ? __pskb_trim(skb, len) : 0; return (len < skb->len) ? __pskb_trim(skb, len) : 0;
} }
@ -71,7 +71,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
/** /**
* pskb_trim_unique - remove end from a paged unique (not cloned) buffer * pskb_trim_unique - remove end from a paged unique (not cloned) buffer
* @skb: buffer to alter * @skb: buffer to alter
@@ -3181,16 +3185,6 @@ static inline struct sk_buff *dev_alloc_ @@ -3189,16 +3193,6 @@ static inline struct sk_buff *dev_alloc_
} }
@ -127,7 +127,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
#include <net/protocol.h> #include <net/protocol.h>
#include <net/dst.h> #include <net/dst.h>
@@ -707,6 +708,22 @@ skb_fail: @@ -709,6 +710,22 @@ skb_fail:
} }
EXPORT_SYMBOL(__napi_alloc_skb); EXPORT_SYMBOL(__napi_alloc_skb);

View file

@ -22,7 +22,7 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
#include <linux/crc32.h> #include <linux/crc32.h>
#include <linux/if_vlan.h> #include <linux/if_vlan.h>
#include <linux/uaccess.h> #include <linux/uaccess.h>
@@ -6893,6 +6894,22 @@ static void rtl_tally_reset(struct r8152 @@ -6896,6 +6897,22 @@ static void rtl_tally_reset(struct r8152
ocp_write_word(tp, MCU_TYPE_PLA, PLA_RSTTALLY, ocp_data); ocp_write_word(tp, MCU_TYPE_PLA, PLA_RSTTALLY, ocp_data);
} }
@ -45,7 +45,7 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
static void r8152b_init(struct r8152 *tp) static void r8152b_init(struct r8152 *tp)
{ {
u32 ocp_data; u32 ocp_data;
@@ -6934,6 +6951,8 @@ static void r8152b_init(struct r8152 *tp @@ -6937,6 +6954,8 @@ static void r8152b_init(struct r8152 *tp
ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_USB_CTRL); ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_USB_CTRL);
ocp_data &= ~(RX_AGG_DISABLE | RX_ZERO_EN); ocp_data &= ~(RX_AGG_DISABLE | RX_ZERO_EN);
ocp_write_word(tp, MCU_TYPE_USB, USB_USB_CTRL, ocp_data); ocp_write_word(tp, MCU_TYPE_USB, USB_USB_CTRL, ocp_data);
@ -54,7 +54,7 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
} }
static void r8153_init(struct r8152 *tp) static void r8153_init(struct r8152 *tp)
@@ -7074,6 +7093,8 @@ static void r8153_init(struct r8152 *tp) @@ -7077,6 +7096,8 @@ static void r8153_init(struct r8152 *tp)
tp->coalesce = COALESCE_SLOW; tp->coalesce = COALESCE_SLOW;
break; break;
} }
@ -63,7 +63,7 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
} }
static void r8153b_init(struct r8152 *tp) static void r8153b_init(struct r8152 *tp)
@@ -7156,6 +7177,8 @@ static void r8153b_init(struct r8152 *tp @@ -7159,6 +7180,8 @@ static void r8153b_init(struct r8152 *tp
rtl_tally_reset(tp); rtl_tally_reset(tp);
tp->coalesce = 15000; /* 15 us */ tp->coalesce = 15000; /* 15 us */

View file

@ -60,7 +60,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
static void sock_def_write_space_wfree(struct sock *sk); static void sock_def_write_space_wfree(struct sock *sk);
static void sock_def_write_space(struct sock *sk); static void sock_def_write_space(struct sock *sk);
@@ -582,6 +584,18 @@ discard_and_relse: @@ -584,6 +586,18 @@ discard_and_relse:
} }
EXPORT_SYMBOL(__sk_receive_skb); EXPORT_SYMBOL(__sk_receive_skb);
@ -79,7 +79,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
INDIRECT_CALLABLE_DECLARE(struct dst_entry *ip6_dst_check(struct dst_entry *, INDIRECT_CALLABLE_DECLARE(struct dst_entry *ip6_dst_check(struct dst_entry *,
u32)); u32));
INDIRECT_CALLABLE_DECLARE(struct dst_entry *ipv4_dst_check(struct dst_entry *, INDIRECT_CALLABLE_DECLARE(struct dst_entry *ipv4_dst_check(struct dst_entry *,
@@ -2175,9 +2189,11 @@ static void __sk_free(struct sock *sk) @@ -2180,9 +2194,11 @@ static void __sk_free(struct sock *sk)
if (likely(sk->sk_net_refcnt)) if (likely(sk->sk_net_refcnt))
sock_inuse_add(sock_net(sk), -1); sock_inuse_add(sock_net(sk), -1);

View file

@ -235,7 +235,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (!pe) if (!pe)
--- a/mm/vmalloc.c --- a/mm/vmalloc.c
+++ b/mm/vmalloc.c +++ b/mm/vmalloc.c
@@ -4187,6 +4187,8 @@ static const struct seq_operations vmall @@ -4205,6 +4205,8 @@ static const struct seq_operations vmall
static int __init proc_vmalloc_init(void) static int __init proc_vmalloc_init(void)
{ {
@ -330,7 +330,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/net/core/sock.c --- a/net/core/sock.c
+++ b/net/core/sock.c +++ b/net/core/sock.c
@@ -4100,6 +4100,8 @@ static __net_initdata struct pernet_oper @@ -4105,6 +4105,8 @@ static __net_initdata struct pernet_oper
static int __init proto_init(void) static int __init proto_init(void)
{ {
@ -341,7 +341,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/net/ipv4/fib_trie.c --- a/net/ipv4/fib_trie.c
+++ b/net/ipv4/fib_trie.c +++ b/net/ipv4/fib_trie.c
@@ -3031,11 +3031,13 @@ static const struct seq_operations fib_r @@ -3032,11 +3032,13 @@ static const struct seq_operations fib_r
int __net_init fib_proc_init(struct net *net) int __net_init fib_proc_init(struct net *net)
{ {
@ -357,7 +357,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
fib_triestat_seq_show, NULL)) fib_triestat_seq_show, NULL))
goto out2; goto out2;
@@ -3046,17 +3048,21 @@ int __net_init fib_proc_init(struct net @@ -3047,17 +3049,21 @@ int __net_init fib_proc_init(struct net
return 0; return 0;
out3: out3:

View file

@ -13,7 +13,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/init/Kconfig --- a/init/Kconfig
+++ b/init/Kconfig +++ b/init/Kconfig
@@ -1481,6 +1481,17 @@ config SYSCTL_ARCH_UNALIGN_ALLOW @@ -1482,6 +1482,17 @@ config SYSCTL_ARCH_UNALIGN_ALLOW
the unaligned access emulation. the unaligned access emulation.
see arch/parisc/kernel/unaligned.c for reference see arch/parisc/kernel/unaligned.c for reference

View file

@ -9,7 +9,7 @@ Acked-by: Rob Landley <rob@landley.net>
--- ---
--- a/arch/mips/Kconfig --- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig +++ b/arch/mips/Kconfig
@@ -1035,9 +1035,6 @@ config FW_ARC @@ -1034,9 +1034,6 @@ config FW_ARC
config ARCH_MAY_HAVE_PC_FDC config ARCH_MAY_HAVE_PC_FDC
bool bool
@ -19,7 +19,7 @@ Acked-by: Rob Landley <rob@landley.net>
config CEVT_BCM1480 config CEVT_BCM1480
bool bool
@@ -3092,6 +3089,18 @@ choice @@ -3091,6 +3088,18 @@ choice
bool "Extend builtin kernel arguments with bootloader arguments" bool "Extend builtin kernel arguments with bootloader arguments"
endchoice endchoice

View file

@ -193,7 +193,7 @@ Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
default y default y
--- a/drivers/mtd/spi-nor/core.c --- a/drivers/mtd/spi-nor/core.c
+++ b/drivers/mtd/spi-nor/core.c +++ b/drivers/mtd/spi-nor/core.c
@@ -1049,6 +1049,8 @@ static u8 spi_nor_convert_3to4_erase(u8 @@ -1050,6 +1050,8 @@ static u8 spi_nor_convert_3to4_erase(u8
static bool spi_nor_has_uniform_erase(const struct spi_nor *nor) static bool spi_nor_has_uniform_erase(const struct spi_nor *nor)
{ {
@ -202,7 +202,7 @@ Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
return !!nor->params->erase_map.uniform_erase_type; return !!nor->params->erase_map.uniform_erase_type;
} }
@@ -2157,6 +2159,7 @@ static int spi_nor_select_erase(struct s @@ -2158,6 +2160,7 @@ static int spi_nor_select_erase(struct s
{ {
struct spi_nor_erase_map *map = &nor->params->erase_map; struct spi_nor_erase_map *map = &nor->params->erase_map;
const struct spi_nor_erase_type *erase = NULL; const struct spi_nor_erase_type *erase = NULL;
@ -210,7 +210,7 @@ Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
struct mtd_info *mtd = &nor->mtd; struct mtd_info *mtd = &nor->mtd;
u32 wanted_size = nor->info->sector_size; u32 wanted_size = nor->info->sector_size;
int i; int i;
@@ -2189,8 +2192,9 @@ static int spi_nor_select_erase(struct s @@ -2190,8 +2193,9 @@ static int spi_nor_select_erase(struct s
*/ */
for (i = SNOR_ERASE_TYPE_MAX - 1; i >= 0; i--) { for (i = SNOR_ERASE_TYPE_MAX - 1; i >= 0; i--) {
if (map->erase_type[i].size) { if (map->erase_type[i].size) {
@ -222,7 +222,7 @@ Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
} }
} }
@@ -2198,6 +2202,9 @@ static int spi_nor_select_erase(struct s @@ -2199,6 +2203,9 @@ static int spi_nor_select_erase(struct s
return -EINVAL; return -EINVAL;
mtd->erasesize = erase->size; mtd->erasesize = erase->size;

View file

@ -61,7 +61,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
+}; +};
--- a/drivers/mtd/spi-nor/core.c --- a/drivers/mtd/spi-nor/core.c
+++ b/drivers/mtd/spi-nor/core.c +++ b/drivers/mtd/spi-nor/core.c
@@ -1635,6 +1635,7 @@ static const struct spi_nor_manufacturer @@ -1636,6 +1636,7 @@ static const struct spi_nor_manufacturer
&spi_nor_winbond, &spi_nor_winbond,
&spi_nor_xilinx, &spi_nor_xilinx,
&spi_nor_xmc, &spi_nor_xmc,

View file

@ -9,7 +9,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/include/linux/skbuff.h --- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h +++ b/include/linux/skbuff.h
@@ -2998,7 +2998,7 @@ static inline int pskb_network_may_pull( @@ -3006,7 +3006,7 @@ static inline int pskb_network_may_pull(
* NET_IP_ALIGN(2) + ethernet_header(14) + IP_header(20/40) + ports(8) * NET_IP_ALIGN(2) + ethernet_header(14) + IP_header(20/40) + ports(8)
*/ */
#ifndef NET_SKB_PAD #ifndef NET_SKB_PAD

View file

@ -66,7 +66,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
static void rt_fibinfo_free(struct rtable __rcu **rtp) static void rt_fibinfo_free(struct rtable __rcu **rtp)
--- a/net/ipv4/fib_trie.c --- a/net/ipv4/fib_trie.c
+++ b/net/ipv4/fib_trie.c +++ b/net/ipv4/fib_trie.c
@@ -2778,6 +2778,7 @@ static const char *const rtn_type_names[ @@ -2779,6 +2779,7 @@ static const char *const rtn_type_names[
[RTN_THROW] = "THROW", [RTN_THROW] = "THROW",
[RTN_NAT] = "NAT", [RTN_NAT] = "NAT",
[RTN_XRESOLVE] = "XRESOLVE", [RTN_XRESOLVE] = "XRESOLVE",
@ -138,7 +138,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
static const struct rt6_info ip6_blk_hole_entry_template = { static const struct rt6_info ip6_blk_hole_entry_template = {
.dst = { .dst = {
.__refcnt = ATOMIC_INIT(1), .__refcnt = ATOMIC_INIT(1),
@@ -1036,6 +1050,7 @@ static const int fib6_prop[RTN_MAX + 1] @@ -1039,6 +1053,7 @@ static const int fib6_prop[RTN_MAX + 1]
[RTN_BLACKHOLE] = -EINVAL, [RTN_BLACKHOLE] = -EINVAL,
[RTN_UNREACHABLE] = -EHOSTUNREACH, [RTN_UNREACHABLE] = -EHOSTUNREACH,
[RTN_PROHIBIT] = -EACCES, [RTN_PROHIBIT] = -EACCES,
@ -146,7 +146,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
[RTN_THROW] = -EAGAIN, [RTN_THROW] = -EAGAIN,
[RTN_NAT] = -EINVAL, [RTN_NAT] = -EINVAL,
[RTN_XRESOLVE] = -EINVAL, [RTN_XRESOLVE] = -EINVAL,
@@ -1071,6 +1086,10 @@ static void ip6_rt_init_dst_reject(struc @@ -1074,6 +1089,10 @@ static void ip6_rt_init_dst_reject(struc
rt->dst.output = ip6_pkt_prohibit_out; rt->dst.output = ip6_pkt_prohibit_out;
rt->dst.input = ip6_pkt_prohibit; rt->dst.input = ip6_pkt_prohibit;
break; break;
@ -157,7 +157,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
case RTN_THROW: case RTN_THROW:
case RTN_UNREACHABLE: case RTN_UNREACHABLE:
default: default:
@@ -4540,6 +4559,17 @@ static int ip6_pkt_prohibit_out(struct n @@ -4543,6 +4562,17 @@ static int ip6_pkt_prohibit_out(struct n
return ip6_pkt_drop(skb, ICMPV6_ADM_PROHIBITED, IPSTATS_MIB_OUTNOROUTES); 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. * Allocate a dst for local (unicast / anycast) address.
*/ */
@@ -5033,7 +5063,8 @@ static int rtm_to_fib6_config(struct sk_ @@ -5036,7 +5066,8 @@ static int rtm_to_fib6_config(struct sk_
if (rtm->rtm_type == RTN_UNREACHABLE || if (rtm->rtm_type == RTN_UNREACHABLE ||
rtm->rtm_type == RTN_BLACKHOLE || rtm->rtm_type == RTN_BLACKHOLE ||
rtm->rtm_type == RTN_PROHIBIT || rtm->rtm_type == RTN_PROHIBIT ||
@ -185,7 +185,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
cfg->fc_flags |= RTF_REJECT; cfg->fc_flags |= RTF_REJECT;
if (rtm->rtm_type == RTN_LOCAL) if (rtm->rtm_type == RTN_LOCAL)
@@ -6287,6 +6318,8 @@ static int ip6_route_dev_notify(struct n @@ -6290,6 +6321,8 @@ static int ip6_route_dev_notify(struct n
#ifdef CONFIG_IPV6_MULTIPLE_TABLES #ifdef CONFIG_IPV6_MULTIPLE_TABLES
net->ipv6.ip6_prohibit_entry->dst.dev = dev; net->ipv6.ip6_prohibit_entry->dst.dev = dev;
net->ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(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->dst.dev = dev;
net->ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(dev); net->ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(dev);
#endif #endif
@@ -6298,6 +6331,7 @@ static int ip6_route_dev_notify(struct n @@ -6301,6 +6334,7 @@ static int ip6_route_dev_notify(struct n
in6_dev_put_clear(&net->ipv6.ip6_null_entry->rt6i_idev); in6_dev_put_clear(&net->ipv6.ip6_null_entry->rt6i_idev);
#ifdef CONFIG_IPV6_MULTIPLE_TABLES #ifdef CONFIG_IPV6_MULTIPLE_TABLES
in6_dev_put_clear(&net->ipv6.ip6_prohibit_entry->rt6i_idev); 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); in6_dev_put_clear(&net->ipv6.ip6_blk_hole_entry->rt6i_idev);
#endif #endif
} }
@@ -6489,6 +6523,8 @@ static int __net_init ip6_route_net_init @@ -6492,6 +6526,8 @@ static int __net_init ip6_route_net_init
#ifdef CONFIG_IPV6_MULTIPLE_TABLES #ifdef CONFIG_IPV6_MULTIPLE_TABLES
net->ipv6.fib6_has_custom_rules = false; 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, net->ipv6.ip6_prohibit_entry = kmemdup(&ip6_prohibit_entry_template,
sizeof(*net->ipv6.ip6_prohibit_entry), sizeof(*net->ipv6.ip6_prohibit_entry),
GFP_KERNEL); GFP_KERNEL);
@@ -6499,11 +6535,21 @@ static int __net_init ip6_route_net_init @@ -6502,11 +6538,21 @@ static int __net_init ip6_route_net_init
ip6_template_metrics, true); ip6_template_metrics, true);
INIT_LIST_HEAD(&net->ipv6.ip6_prohibit_entry->rt6i_uncached); 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; net->ipv6.ip6_blk_hole_entry->dst.ops = &net->ipv6.ip6_dst_ops;
dst_init_metrics(&net->ipv6.ip6_blk_hole_entry->dst, dst_init_metrics(&net->ipv6.ip6_blk_hole_entry->dst,
ip6_template_metrics, true); ip6_template_metrics, true);
@@ -6530,6 +6576,8 @@ out: @@ -6533,6 +6579,8 @@ out:
return ret; return ret;
#ifdef CONFIG_IPV6_MULTIPLE_TABLES #ifdef CONFIG_IPV6_MULTIPLE_TABLES
@ -243,7 +243,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
out_ip6_prohibit_entry: out_ip6_prohibit_entry:
kfree(net->ipv6.ip6_prohibit_entry); kfree(net->ipv6.ip6_prohibit_entry);
out_ip6_null_entry: out_ip6_null_entry:
@@ -6549,6 +6597,7 @@ static void __net_exit ip6_route_net_exi @@ -6552,6 +6600,7 @@ static void __net_exit ip6_route_net_exi
kfree(net->ipv6.ip6_null_entry); kfree(net->ipv6.ip6_null_entry);
#ifdef CONFIG_IPV6_MULTIPLE_TABLES #ifdef CONFIG_IPV6_MULTIPLE_TABLES
kfree(net->ipv6.ip6_prohibit_entry); 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); kfree(net->ipv6.ip6_blk_hole_entry);
#endif #endif
dst_entries_destroy(&net->ipv6.ip6_dst_ops); dst_entries_destroy(&net->ipv6.ip6_dst_ops);
@@ -6632,6 +6681,9 @@ void __init ip6_route_init_special_entri @@ -6635,6 +6684,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_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->dst.dev = init_net.loopback_dev;
init_net.ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev); init_net.ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev);

View file

@ -22,7 +22,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
#endif #endif
--- a/include/linux/skbuff.h --- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h +++ b/include/linux/skbuff.h
@@ -964,6 +964,7 @@ struct sk_buff { @@ -972,6 +972,7 @@ struct sk_buff {
#ifdef CONFIG_IPV6_NDISC_NODETYPE #ifdef CONFIG_IPV6_NDISC_NODETYPE
__u8 ndisc_nodetype:2; __u8 ndisc_nodetype:2;
#endif #endif

View file

@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -3152,8 +3152,8 @@ static irqreturn_t mtk_handle_irq_rx(int @@ -3155,8 +3155,8 @@ static irqreturn_t mtk_handle_irq_rx(int
eth->rx_events++; eth->rx_events++;
if (likely(napi_schedule_prep(&eth->rx_napi))) { if (likely(napi_schedule_prep(&eth->rx_napi))) {
@ -20,7 +20,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
} }
return IRQ_HANDLED; return IRQ_HANDLED;
@@ -3165,8 +3165,8 @@ static irqreturn_t mtk_handle_irq_tx(int @@ -3168,8 +3168,8 @@ static irqreturn_t mtk_handle_irq_tx(int
eth->tx_events++; eth->tx_events++;
if (likely(napi_schedule_prep(&eth->tx_napi))) { if (likely(napi_schedule_prep(&eth->tx_napi))) {
@ -30,7 +30,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
} }
return IRQ_HANDLED; return IRQ_HANDLED;
@@ -4938,6 +4938,8 @@ static int mtk_probe(struct platform_dev @@ -4941,6 +4941,8 @@ static int mtk_probe(struct platform_dev
* for NAPI to work * for NAPI to work
*/ */
init_dummy_netdev(&eth->dummy_dev); init_dummy_netdev(&eth->dummy_dev);

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