[rdkb][common][bsp][Refactor and sync kernel from openwrt]
[Description]
Refactor and sync kernel from openwrt
1. update kernel version to 5.4.230
fdb637d [kernel][common][eth][Add heartbeat check for Aquantia firwmare download]
[Release-log]
Change-Id: I048c460140ba124d680f019c8d35447fe61d432e
diff --git a/recipes-kernel/linux/linux-mediatek-5.4/generic/backport-5.4/413-v6.0-mtd-next-mtd-core-introduce-of-support-for-dynamic-partitions.patch b/recipes-kernel/linux/linux-mediatek-5.4/generic/backport-5.4/413-v6.0-mtd-next-mtd-core-introduce-of-support-for-dynamic-partitions.patch
index 475f72f..9f0c53b 100644
--- a/recipes-kernel/linux/linux-mediatek-5.4/generic/backport-5.4/413-v6.0-mtd-next-mtd-core-introduce-of-support-for-dynamic-partitions.patch
+++ b/recipes-kernel/linux/linux-mediatek-5.4/generic/backport-5.4/413-v6.0-mtd-next-mtd-core-introduce-of-support-for-dynamic-partitions.patch
@@ -103,4 +103,4 @@
+ mtd_check_of_node(mtd);
of_node_get(mtd_get_of_node(mtd));
error = device_register(&mtd->dev);
- if (error)
+ if (error) {
diff --git a/recipes-kernel/linux/linux-mediatek-5.4/generic/backport-5.4/414-v6.1-mtd-allow-getting-MTD-device-associated-with-a-speci.patch b/recipes-kernel/linux/linux-mediatek-5.4/generic/backport-5.4/414-v6.1-mtd-allow-getting-MTD-device-associated-with-a-speci.patch
index f65fc6c..6c92182 100644
--- a/recipes-kernel/linux/linux-mediatek-5.4/generic/backport-5.4/414-v6.1-mtd-allow-getting-MTD-device-associated-with-a-speci.patch
+++ b/recipes-kernel/linux/linux-mediatek-5.4/generic/backport-5.4/414-v6.1-mtd-allow-getting-MTD-device-associated-with-a-speci.patch
@@ -25,7 +25,7 @@
--- a/drivers/mtd/mtdcore.c
+++ b/drivers/mtd/mtdcore.c
-@@ -1067,6 +1067,34 @@ int __get_mtd_device(struct mtd_info *mt
+@@ -1069,6 +1069,34 @@ int __get_mtd_device(struct mtd_info *mt
EXPORT_SYMBOL_GPL(__get_mtd_device);
/**
diff --git a/recipes-kernel/linux/linux-mediatek-5.4/generic/backport-5.4/601-v5.12-net-implement-threaded-able-napi-poll-loop-support.patch b/recipes-kernel/linux/linux-mediatek-5.4/generic/backport-5.4/601-v5.12-net-implement-threaded-able-napi-poll-loop-support.patch
index e613b17..1ece7cf 100644
--- a/recipes-kernel/linux/linux-mediatek-5.4/generic/backport-5.4/601-v5.12-net-implement-threaded-able-napi-poll-loop-support.patch
+++ b/recipes-kernel/linux/linux-mediatek-5.4/generic/backport-5.4/601-v5.12-net-implement-threaded-able-napi-poll-loop-support.patch
@@ -30,7 +30,7 @@
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
-@@ -340,6 +340,7 @@ struct napi_struct {
+@@ -347,6 +347,7 @@ struct napi_struct {
struct list_head dev_list;
struct hlist_node napi_hash_node;
unsigned int napi_id;
@@ -38,7 +38,7 @@
};
enum {
-@@ -350,6 +351,7 @@ enum {
+@@ -357,6 +358,7 @@ enum {
NAPI_STATE_HASHED, /* In NAPI hash (busy polling possible) */
NAPI_STATE_NO_BUSY_POLL,/* Do not add in napi_hash, no busy polling */
NAPI_STATE_IN_BUSY_POLL,/* sk_busy_loop() owns this NAPI */
@@ -46,7 +46,7 @@
};
enum {
-@@ -360,6 +362,7 @@ enum {
+@@ -367,6 +369,7 @@ enum {
NAPIF_STATE_HASHED = BIT(NAPI_STATE_HASHED),
NAPIF_STATE_NO_BUSY_POLL = BIT(NAPI_STATE_NO_BUSY_POLL),
NAPIF_STATE_IN_BUSY_POLL = BIT(NAPI_STATE_IN_BUSY_POLL),
@@ -54,7 +54,7 @@
};
enum gro_result {
-@@ -504,20 +507,7 @@ bool napi_hash_del(struct napi_struct *n
+@@ -511,20 +514,7 @@ bool napi_hash_del(struct napi_struct *n
*/
void napi_disable(struct napi_struct *n);
@@ -76,7 +76,7 @@
/**
* napi_synchronize - wait until NAPI is not running
-@@ -1783,6 +1773,8 @@ enum netdev_ml_priv_type {
+@@ -1790,6 +1780,8 @@ enum netdev_ml_priv_type {
*
* @wol_enabled: Wake-on-LAN is enabled
*
@@ -85,7 +85,7 @@
* FIXME: cleanup struct net_device such that network protocol info
* moves out.
*/
-@@ -2075,6 +2067,7 @@ struct net_device {
+@@ -2082,6 +2074,7 @@ struct net_device {
struct lock_class_key addr_list_lock_key;
bool proto_down;
unsigned wol_enabled:1;
diff --git a/recipes-kernel/linux/linux-mediatek-5.4/generic/backport-5.4/602-v5.12-net-add-sysfs-attribute-to-control-napi-threaded-mod.patch b/recipes-kernel/linux/linux-mediatek-5.4/generic/backport-5.4/602-v5.12-net-add-sysfs-attribute-to-control-napi-threaded-mod.patch
index 2911400..93a8559 100644
--- a/recipes-kernel/linux/linux-mediatek-5.4/generic/backport-5.4/602-v5.12-net-add-sysfs-attribute-to-control-napi-threaded-mod.patch
+++ b/recipes-kernel/linux/linux-mediatek-5.4/generic/backport-5.4/602-v5.12-net-add-sysfs-attribute-to-control-napi-threaded-mod.patch
@@ -46,7 +46,7 @@
+ == ==================================
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
-@@ -498,6 +498,8 @@ static inline bool napi_complete(struct
+@@ -505,6 +505,8 @@ static inline bool napi_complete(struct
*/
bool napi_hash_del(struct napi_struct *napi);
diff --git a/recipes-kernel/linux/linux-mediatek-5.4/generic/backport-5.4/603-v5.12-net-fix-race-between-napi-kthread-mode-and-busy-poll.patch b/recipes-kernel/linux/linux-mediatek-5.4/generic/backport-5.4/603-v5.12-net-fix-race-between-napi-kthread-mode-and-busy-poll.patch
index 8f93cdd..30a795d 100644
--- a/recipes-kernel/linux/linux-mediatek-5.4/generic/backport-5.4/603-v5.12-net-fix-race-between-napi-kthread-mode-and-busy-poll.patch
+++ b/recipes-kernel/linux/linux-mediatek-5.4/generic/backport-5.4/603-v5.12-net-fix-race-between-napi-kthread-mode-and-busy-poll.patch
@@ -27,7 +27,7 @@
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
-@@ -352,6 +352,7 @@ enum {
+@@ -359,6 +359,7 @@ enum {
NAPI_STATE_NO_BUSY_POLL,/* Do not add in napi_hash, no busy polling */
NAPI_STATE_IN_BUSY_POLL,/* sk_busy_loop() owns this NAPI */
NAPI_STATE_THREADED, /* The poll is performed inside its own thread*/
@@ -35,7 +35,7 @@
};
enum {
-@@ -363,6 +364,7 @@ enum {
+@@ -370,6 +371,7 @@ enum {
NAPIF_STATE_NO_BUSY_POLL = BIT(NAPI_STATE_NO_BUSY_POLL),
NAPIF_STATE_IN_BUSY_POLL = BIT(NAPI_STATE_IN_BUSY_POLL),
NAPIF_STATE_THREADED = BIT(NAPI_STATE_THREADED),
diff --git a/recipes-kernel/linux/linux-mediatek-5.4/generic/backport-5.4/702-Revert-net-dsa-b53-Fix-valid-setting-for-MDB-entries.patch b/recipes-kernel/linux/linux-mediatek-5.4/generic/backport-5.4/702-Revert-net-dsa-b53-Fix-valid-setting-for-MDB-entries.patch
deleted file mode 100644
index d9602fa..0000000
--- a/recipes-kernel/linux/linux-mediatek-5.4/generic/backport-5.4/702-Revert-net-dsa-b53-Fix-valid-setting-for-MDB-entries.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
-Date: Wed, 7 Dec 2022 07:57:58 +0100
-Subject: [PATCH] Revert "net: dsa: b53: Fix valid setting for MDB entries"
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-This reverts commit 1fae6eb0fc91d3ecb539e03f9e4dcd1c53ada553.
-
-Upstream commit was a fix for an overlook of setting "ent.is_valid"
-twice after 5d65b64a3d97 ("net: dsa: b53: Add support for MDB").
-
-Since MDB support was not backported to stable kernels (it's not a bug
-fix) there is nothing to fix there. Backporting this commit resulted in
-"env.is_valid" not being set at all.
-
-Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
----
- drivers/net/dsa/b53/b53_common.c | 1 +
- 1 file changed, 1 insertion(+)
-
---- a/drivers/net/dsa/b53/b53_common.c
-+++ b/drivers/net/dsa/b53/b53_common.c
-@@ -1551,6 +1551,7 @@ static int b53_arl_op(struct b53_device
-
- memset(&ent, 0, sizeof(ent));
- ent.port = port;
-+ ent.is_valid = is_valid;
- ent.vid = vid;
- ent.is_static = true;
- memcpy(ent.mac, addr, ETH_ALEN);
diff --git a/recipes-kernel/linux/linux-mediatek-5.4/generic/backport-5.4/737-v5.5-net-phy-add-core-phylib-sfp-support.patch b/recipes-kernel/linux/linux-mediatek-5.4/generic/backport-5.4/737-v5.5-net-phy-add-core-phylib-sfp-support.patch
index 0797131..036a44b 100644
--- a/recipes-kernel/linux/linux-mediatek-5.4/generic/backport-5.4/737-v5.5-net-phy-add-core-phylib-sfp-support.patch
+++ b/recipes-kernel/linux/linux-mediatek-5.4/generic/backport-5.4/737-v5.5-net-phy-add-core-phylib-sfp-support.patch
@@ -130,7 +130,7 @@
/* Some Ethernet drivers try to connect to a PHY device before
* calling register_netdevice() -> netdev_register_kobject() and
* does the dev->dev.kobj initialization. Here we only check for
-@@ -2291,6 +2354,9 @@ static int phy_remove(struct device *dev
+@@ -2292,6 +2355,9 @@ static int phy_remove(struct device *dev
phydev->state = PHY_DOWN;
mutex_unlock(&phydev->lock);
diff --git a/recipes-kernel/linux/linux-mediatek-5.4/generic/backport-5.4/750-v5.5-net-phy-add-support-for-clause-37-auto-negotiation.patch b/recipes-kernel/linux/linux-mediatek-5.4/generic/backport-5.4/750-v5.5-net-phy-add-support-for-clause-37-auto-negotiation.patch
index 69c56ec..9c57aaf 100644
--- a/recipes-kernel/linux/linux-mediatek-5.4/generic/backport-5.4/750-v5.5-net-phy-add-support-for-clause-37-auto-negotiation.patch
+++ b/recipes-kernel/linux/linux-mediatek-5.4/generic/backport-5.4/750-v5.5-net-phy-add-support-for-clause-37-auto-negotiation.patch
@@ -20,7 +20,7 @@
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
-@@ -1682,6 +1682,40 @@ static int genphy_config_advert(struct p
+@@ -1683,6 +1683,40 @@ static int genphy_config_advert(struct p
}
/**
@@ -61,7 +61,7 @@
* genphy_config_eee_advert - disable unwanted eee mode advertisement
* @phydev: target phy_device struct
*
-@@ -1790,6 +1824,54 @@ int __genphy_config_aneg(struct phy_devi
+@@ -1791,6 +1825,54 @@ int __genphy_config_aneg(struct phy_devi
EXPORT_SYMBOL(__genphy_config_aneg);
/**
@@ -116,7 +116,7 @@
* genphy_aneg_done - return auto-negotiation status
* @phydev: target phy_device struct
*
-@@ -1962,6 +2044,63 @@ int genphy_read_status(struct phy_device
+@@ -1963,6 +2045,63 @@ int genphy_read_status(struct phy_device
EXPORT_SYMBOL(genphy_read_status);
/**
diff --git a/recipes-kernel/linux/linux-mediatek-5.4/generic/backport-5.4/backport-5.4.inc b/recipes-kernel/linux/linux-mediatek-5.4/generic/backport-5.4/backport-5.4.inc
index 7d37891..49c01ad 100644
--- a/recipes-kernel/linux/linux-mediatek-5.4/generic/backport-5.4/backport-5.4.inc
+++ b/recipes-kernel/linux/linux-mediatek-5.4/generic/backport-5.4/backport-5.4.inc
@@ -199,7 +199,6 @@
file://610-v5.9-net-bridge-clear-bridge-s-private-skb-space-on-xmit.patch \
file://700-v5.5-net-core-allow-fast-GRO-for-skbs-with-Ethernet-heade.patch \
file://701-v5.7-net-dsa-Implement-flow-dissection-for-tag_brcm.c.patch \
- file://702-Revert-net-dsa-b53-Fix-valid-setting-for-MDB-entries.patch \
file://703-v5.5-0001-net-dsa-b53-Add-support-for-MDB.patch \
file://703-v5.5-0002-net-dsa-bcm_sf2-Wire-up-MDB-operations.patch \
file://703-v5.5-0003-net-dsa-bcm_sf2-Add-support-for-optional-reset-contr.patch \
diff --git a/recipes-kernel/linux/linux-mediatek-5.4/generic/defconfig b/recipes-kernel/linux/linux-mediatek-5.4/generic/defconfig
index 04e835b..ec37e51 100644
--- a/recipes-kernel/linux/linux-mediatek-5.4/generic/defconfig
+++ b/recipes-kernel/linux/linux-mediatek-5.4/generic/defconfig
@@ -653,9 +653,9 @@
# CONFIG_BPFILTER is not set
CONFIG_BPF_JIT=y
# CONFIG_BPF_JIT_ALWAYS_ON is not set
-# CONFIG_BPF_UNPRIV_DEFAULT_OFF is not set
# CONFIG_BPF_STREAM_PARSER is not set
CONFIG_BPF_SYSCALL=y
+# CONFIG_BPF_UNPRIV_DEFAULT_OFF is not set
# CONFIG_BPQETHER is not set
CONFIG_BQL=y
CONFIG_BRANCH_PROFILE_NONE=y
@@ -964,14 +964,14 @@
CONFIG_CRYPTO_AES=y
# CONFIG_CRYPTO_AES_586 is not set
# CONFIG_CRYPTO_AES_ARM is not set
-# CONFIG_CRYPTO_AES_ARM_BS is not set
-# CONFIG_CRYPTO_AES_ARM_CE is not set
# CONFIG_CRYPTO_AES_ARM64 is not set
# CONFIG_CRYPTO_AES_ARM64_BS is not set
# CONFIG_CRYPTO_AES_ARM64_CE is not set
# CONFIG_CRYPTO_AES_ARM64_CE_BLK is not set
# CONFIG_CRYPTO_AES_ARM64_CE_CCM is not set
# CONFIG_CRYPTO_AES_ARM64_NEON_BLK is not set
+# CONFIG_CRYPTO_AES_ARM_BS is not set
+# CONFIG_CRYPTO_AES_ARM_CE is not set
# CONFIG_CRYPTO_AES_NI_INTEL is not set
# CONFIG_CRYPTO_AES_TI is not set
CONFIG_CRYPTO_ALGAPI=y
@@ -1001,8 +1001,8 @@
# CONFIG_CRYPTO_CRC32C_INTEL is not set
# CONFIG_CRYPTO_CRC32_ARM_CE is not set
# CONFIG_CRYPTO_CRCT10DIF is not set
-# CONFIG_CRYPTO_CRCT10DIF_ARM_CE is not set
# CONFIG_CRYPTO_CRCT10DIF_ARM64_CE is not set
+# CONFIG_CRYPTO_CRCT10DIF_ARM_CE is not set
# CONFIG_CRYPTO_CRYPTD is not set
# CONFIG_CRYPTO_CTR is not set
# CONFIG_CRYPTO_CTS is not set
@@ -1060,8 +1060,8 @@
# CONFIG_CRYPTO_GCM is not set
# CONFIG_CRYPTO_GF128MUL is not set
# CONFIG_CRYPTO_GHASH is not set
-# CONFIG_CRYPTO_GHASH_ARM_CE is not set
# CONFIG_CRYPTO_GHASH_ARM64_CE is not set
+# CONFIG_CRYPTO_GHASH_ARM_CE is not set
# CONFIG_CRYPTO_GHASH_CLMUL_NI_INTEL is not set
# CONFIG_CRYPTO_HASH is not set
# CONFIG_CRYPTO_HMAC is not set
@@ -1116,14 +1116,14 @@
# CONFIG_CRYPTO_SERPENT is not set
# CONFIG_CRYPTO_SHA1 is not set
# CONFIG_CRYPTO_SHA1_ARM is not set
+# CONFIG_CRYPTO_SHA1_ARM64_CE is not set
# CONFIG_CRYPTO_SHA1_ARM_CE is not set
# CONFIG_CRYPTO_SHA1_ARM_NEON is not set
-# CONFIG_CRYPTO_SHA1_ARM64_CE is not set
# CONFIG_CRYPTO_SHA256 is not set
# CONFIG_CRYPTO_SHA256_ARM is not set
# CONFIG_CRYPTO_SHA256_ARM64 is not set
-# CONFIG_CRYPTO_SHA2_ARM_CE is not set
# CONFIG_CRYPTO_SHA2_ARM64_CE is not set
+# CONFIG_CRYPTO_SHA2_ARM_CE is not set
# CONFIG_CRYPTO_SHA3 is not set
# CONFIG_CRYPTO_SHA3_ARM64 is not set
# CONFIG_CRYPTO_SHA512 is not set
@@ -2255,6 +2255,7 @@
# CONFIG_INET_ESP is not set
# CONFIG_INET_IPCOMP is not set
# CONFIG_INET_LRO is not set
+CONFIG_INET_TABLE_PERTURB_ORDER=16
# CONFIG_INET_TCP_DIAG is not set
# CONFIG_INET_TUNNEL is not set
# CONFIG_INET_UDP_DIAG is not set
@@ -3715,8 +3716,8 @@
# CONFIG_NF_CONNTRACK_TIMESTAMP is not set
# CONFIG_NF_CONNTRACK_ZONES is not set
# CONFIG_NF_CT_NETLINK is not set
-# CONFIG_NF_CT_NETLINK_TIMEOUT is not set
# CONFIG_NF_CT_NETLINK_HELPER is not set
+# CONFIG_NF_CT_NETLINK_TIMEOUT is not set
# CONFIG_NF_CT_PROTO_DCCP is not set
# CONFIG_NF_CT_PROTO_GRE is not set
# CONFIG_NF_CT_PROTO_SCTP is not set
@@ -5870,9 +5871,9 @@
# CONFIG_UBIFS_FS_AUTHENTICATION is not set
# CONFIG_UBIFS_FS_ENCRYPTION is not set
# CONFIG_UBIFS_FS_SECURITY is not set
+CONFIG_UBIFS_FS_XATTR=y
# CONFIG_UBIFS_FS_ZLIB is not set
# CONFIG_UBIFS_FS_ZSTD is not set
-CONFIG_UBIFS_FS_XATTR=y
# CONFIG_UBSAN is not set
CONFIG_UBSAN_ALIGNMENT=y
# CONFIG_UCB1400_CORE is not set
diff --git a/recipes-kernel/linux/linux-mediatek-5.4/generic/hack-5.4/252-init-Kconfig-make-ASN1-explicitly-selectable-unhide-.patch b/recipes-kernel/linux/linux-mediatek-5.4/generic/hack-5.4/252-init-Kconfig-make-ASN1-explicitly-selectable-unhide-.patch
new file mode 100644
index 0000000..62bf7f7
--- /dev/null
+++ b/recipes-kernel/linux/linux-mediatek-5.4/generic/hack-5.4/252-init-Kconfig-make-ASN1-explicitly-selectable-unhide-.patch
@@ -0,0 +1,30 @@
+From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
+Date: Mon, 23 Jan 2023 12:24:12 +0100
+Subject: [PATCH] init/Kconfig: make ASN1 explicitly selectable (unhide it)
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Kernel developers assumed ASN1 symbol may be needed only by in-kernel
+code and they made it hidden. It is actually used by ksmbd version being
+developed in GitHub (there is also upstream one since Linux 5.15).
+
+To allow building ksmbd from GitHub cleanly allow selecting its
+dependency (CONFIG_ASN1) explicitly by unhiding it.
+
+Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
+---
+ init/Kconfig | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/init/Kconfig
++++ b/init/Kconfig
+@@ -2249,7 +2249,7 @@ config PADATA
+ bool
+
+ config ASN1
+- tristate
++ tristate "ASN.1 grammar compiler"
+ help
+ Build a simple ASN.1 grammar compiler that produces a bytecode output
+ that can be interpreted by the ASN.1 stream decoder and used to
diff --git a/recipes-kernel/linux/linux-mediatek-5.4/generic/hack-5.4/400-unlock_mx25l6406e_with_4bit_block_protect.patch b/recipes-kernel/linux/linux-mediatek-5.4/generic/hack-5.4/400-unlock_mx25l6406e_with_4bit_block_protect.patch
index 8112fa7..7d1f545 100644
--- a/recipes-kernel/linux/linux-mediatek-5.4/generic/hack-5.4/400-unlock_mx25l6406e_with_4bit_block_protect.patch
+++ b/recipes-kernel/linux/linux-mediatek-5.4/generic/hack-5.4/400-unlock_mx25l6406e_with_4bit_block_protect.patch
@@ -20,7 +20,7 @@
/* Part specific fixup hooks. */
const struct spi_nor_fixups *fixups;
-@@ -1985,6 +1989,9 @@ static int spi_nor_clear_sr_bp(struct sp
+@@ -1987,6 +1991,9 @@ static int spi_nor_clear_sr_bp(struct sp
int ret;
u8 mask = SR_BP2 | SR_BP1 | SR_BP0;
@@ -30,7 +30,7 @@
ret = read_sr(nor);
if (ret < 0) {
dev_err(nor->dev, "error while reading status register\n");
-@@ -2338,7 +2345,7 @@ static const struct flash_info spi_nor_i
+@@ -2340,7 +2347,7 @@ static const struct flash_info spi_nor_i
{ "mx25l1606e", INFO(0xc22015, 0, 64 * 1024, 32, SECT_4K) },
{ "mx25l3205d", INFO(0xc22016, 0, 64 * 1024, 64, SECT_4K) },
{ "mx25l3255e", INFO(0xc29e16, 0, 64 * 1024, 64, SECT_4K) },
@@ -39,7 +39,7 @@
{ "mx25u2033e", INFO(0xc22532, 0, 64 * 1024, 4, SECT_4K) },
{ "mx25u3235f", INFO(0xc22536, 0, 64 * 1024, 64,
SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
-@@ -5026,6 +5033,9 @@ int spi_nor_scan(struct spi_nor *nor, co
+@@ -5028,6 +5035,9 @@ int spi_nor_scan(struct spi_nor *nor, co
if (info->flags & USE_CLSR)
nor->flags |= SNOR_F_USE_CLSR;
diff --git a/recipes-kernel/linux/linux-mediatek-5.4/generic/hack-5.4/661-use_fq_codel_by_default.patch b/recipes-kernel/linux/linux-mediatek-5.4/generic/hack-5.4/661-use_fq_codel_by_default.patch
index b77633d..64d7684 100644
--- a/recipes-kernel/linux/linux-mediatek-5.4/generic/hack-5.4/661-use_fq_codel_by_default.patch
+++ b/recipes-kernel/linux/linux-mediatek-5.4/generic/hack-5.4/661-use_fq_codel_by_default.patch
@@ -44,7 +44,7 @@
device, it has to decide which ones to send first, which ones to
--- a/net/sched/sch_api.c
+++ b/net/sched/sch_api.c
-@@ -2278,7 +2278,7 @@ static int __init pktsched_init(void)
+@@ -2283,7 +2283,7 @@ static int __init pktsched_init(void)
return err;
}
diff --git a/recipes-kernel/linux/linux-mediatek-5.4/generic/hack-5.4/721-phy_packets.patch b/recipes-kernel/linux/linux-mediatek-5.4/generic/hack-5.4/721-phy_packets.patch
index f9fa50b..9dfeaa2 100644
--- a/recipes-kernel/linux/linux-mediatek-5.4/generic/hack-5.4/721-phy_packets.patch
+++ b/recipes-kernel/linux/linux-mediatek-5.4/generic/hack-5.4/721-phy_packets.patch
@@ -15,7 +15,7 @@
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
-@@ -1540,6 +1540,7 @@ enum netdev_priv_flags {
+@@ -1547,6 +1547,7 @@ enum netdev_priv_flags {
IFF_FAILOVER_SLAVE = 1<<28,
IFF_L3MDEV_RX_HANDLER = 1<<29,
IFF_LIVE_RENAME_OK = 1<<30,
@@ -23,7 +23,7 @@
};
#define IFF_802_1Q_VLAN IFF_802_1Q_VLAN
-@@ -1572,6 +1573,7 @@ enum netdev_priv_flags {
+@@ -1579,6 +1580,7 @@ enum netdev_priv_flags {
#define IFF_FAILOVER_SLAVE IFF_FAILOVER_SLAVE
#define IFF_L3MDEV_RX_HANDLER IFF_L3MDEV_RX_HANDLER
#define IFF_LIVE_RENAME_OK IFF_LIVE_RENAME_OK
@@ -31,7 +31,7 @@
/* Specifies the type of the struct net_device::ml_priv pointer */
enum netdev_ml_priv_type {
-@@ -1882,6 +1884,11 @@ struct net_device {
+@@ -1889,6 +1891,11 @@ struct net_device {
const struct tlsdev_ops *tlsdev_ops;
#endif
@@ -43,7 +43,7 @@
const struct header_ops *header_ops;
unsigned int flags;
-@@ -1964,6 +1971,10 @@ struct net_device {
+@@ -1971,6 +1978,10 @@ struct net_device {
struct mpls_dev __rcu *mpls_ptr;
#endif
diff --git a/recipes-kernel/linux/linux-mediatek-5.4/generic/hack-5.4/901-debloat_sock_diag.patch b/recipes-kernel/linux/linux-mediatek-5.4/generic/hack-5.4/901-debloat_sock_diag.patch
index 0abb672..a52be65 100644
--- a/recipes-kernel/linux/linux-mediatek-5.4/generic/hack-5.4/901-debloat_sock_diag.patch
+++ b/recipes-kernel/linux/linux-mediatek-5.4/generic/hack-5.4/901-debloat_sock_diag.patch
@@ -105,7 +105,7 @@
{
--- a/net/ipv4/Kconfig
+++ b/net/ipv4/Kconfig
-@@ -400,6 +400,7 @@ config INET_TUNNEL
+@@ -410,6 +410,7 @@ config INET_TUNNEL
config INET_DIAG
tristate "INET: socket monitoring interface"
diff --git a/recipes-kernel/linux/linux-mediatek-5.4/generic/hack-5.4/hack-5.4.inc b/recipes-kernel/linux/linux-mediatek-5.4/generic/hack-5.4/hack-5.4.inc
index 69ae86d..8597603 100644
--- a/recipes-kernel/linux/linux-mediatek-5.4/generic/hack-5.4/hack-5.4.inc
+++ b/recipes-kernel/linux/linux-mediatek-5.4/generic/hack-5.4/hack-5.4.inc
@@ -11,6 +11,7 @@
file://249-udp-tunnel-selection.patch \
file://250-netfilter_depends.patch \
file://251-sound_kconfig.patch \
+ file://252-init-Kconfig-make-ASN1-explicitly-selectable-unhide-.patch \
file://259-regmap_dynamic.patch \
file://260-crypto_test_dependencies.patch \
file://260-lib-arc4-unhide.patch \
diff --git a/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/130-add-linux-spidev-compatible-si3210.patch b/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/130-add-linux-spidev-compatible-si3210.patch
index eedb2bb..321cbe2 100644
--- a/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/130-add-linux-spidev-compatible-si3210.patch
+++ b/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/130-add-linux-spidev-compatible-si3210.patch
@@ -8,7 +8,7 @@
--- a/drivers/spi/spidev.c
+++ b/drivers/spi/spidev.c
-@@ -678,6 +678,7 @@ static const struct of_device_id spidev_
+@@ -689,6 +689,7 @@ static const struct of_device_id spidev_
{ .compatible = "lwn,bk4" },
{ .compatible = "dh,dhcom-board" },
{ .compatible = "menlo,m53cpld" },
diff --git a/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/450-mtd-spi-nor-allow-NOR-driver-to-write-fewer-bytes-th.patch b/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/450-mtd-spi-nor-allow-NOR-driver-to-write-fewer-bytes-th.patch
index fe2d7a6..087ee97 100644
--- a/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/450-mtd-spi-nor-allow-NOR-driver-to-write-fewer-bytes-th.patch
+++ b/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/450-mtd-spi-nor-allow-NOR-driver-to-write-fewer-bytes-th.patch
@@ -11,7 +11,7 @@
--- a/drivers/mtd/spi-nor/spi-nor.c
+++ b/drivers/mtd/spi-nor/spi-nor.c
-@@ -2706,7 +2706,7 @@ static int spi_nor_write(struct mtd_info
+@@ -2708,7 +2708,7 @@ static int spi_nor_write(struct mtd_info
write_enable(nor);
ret = spi_nor_write_data(nor, addr, page_remain, buf + i);
diff --git a/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/465-m25p80-mx-disable-software-protection.patch b/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/465-m25p80-mx-disable-software-protection.patch
index 24d2d45..a71175f 100644
--- a/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/465-m25p80-mx-disable-software-protection.patch
+++ b/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/465-m25p80-mx-disable-software-protection.patch
@@ -8,7 +8,7 @@
--- a/drivers/mtd/spi-nor/spi-nor.c
+++ b/drivers/mtd/spi-nor/spi-nor.c
-@@ -4884,6 +4884,7 @@ int spi_nor_scan(struct spi_nor *nor, co
+@@ -4886,6 +4886,7 @@ int spi_nor_scan(struct spi_nor *nor, co
*/
if (JEDEC_MFR(nor->info) == SNOR_MFR_ATMEL ||
JEDEC_MFR(nor->info) == SNOR_MFR_INTEL ||
diff --git a/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/466-Revert-mtd-spi-nor-fix-Spansion-regressions-aliased-.patch b/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/466-Revert-mtd-spi-nor-fix-Spansion-regressions-aliased-.patch
index 70f1e9f..93be276 100644
--- a/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/466-Revert-mtd-spi-nor-fix-Spansion-regressions-aliased-.patch
+++ b/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/466-Revert-mtd-spi-nor-fix-Spansion-regressions-aliased-.patch
@@ -17,7 +17,7 @@
--- a/drivers/mtd/spi-nor/spi-nor.c
+++ b/drivers/mtd/spi-nor/spi-nor.c
-@@ -4398,6 +4398,7 @@ static void st_micron_set_default_init(s
+@@ -4400,6 +4400,7 @@ static void st_micron_set_default_init(s
static void winbond_set_default_init(struct spi_nor *nor)
{
@@ -25,7 +25,7 @@
nor->params.set_4byte = winbond_set_4byte;
}
-@@ -4886,6 +4887,7 @@ int spi_nor_scan(struct spi_nor *nor, co
+@@ -4888,6 +4889,7 @@ int spi_nor_scan(struct spi_nor *nor, co
JEDEC_MFR(nor->info) == SNOR_MFR_INTEL ||
JEDEC_MFR(nor->info) == SNOR_MFR_MACRONIX ||
JEDEC_MFR(nor->info) == SNOR_MFR_SST ||
diff --git a/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/470-mtd-spi-nor-support-limiting-4K-sectors-support-base.patch b/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/470-mtd-spi-nor-support-limiting-4K-sectors-support-base.patch
index d3e587f..e9207bd 100644
--- a/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/470-mtd-spi-nor-support-limiting-4K-sectors-support-base.patch
+++ b/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/470-mtd-spi-nor-support-limiting-4K-sectors-support-base.patch
@@ -39,7 +39,7 @@
depends on OF && (ARM || ARM64 || COMPILE_TEST)
--- a/drivers/mtd/spi-nor/spi-nor.c
+++ b/drivers/mtd/spi-nor/spi-nor.c
-@@ -4464,6 +4464,7 @@ static void spi_nor_info_init_params(str
+@@ -4466,6 +4466,7 @@ static void spi_nor_info_init_params(str
struct spi_nor_erase_map *map = ¶ms->erase_map;
const struct flash_info *info = nor->info;
struct device_node *np = spi_nor_get_flash_node(nor);
@@ -47,7 +47,7 @@
u8 i, erase_mask;
/* Initialize legacy flash parameters and settings. */
-@@ -4527,6 +4528,21 @@ static void spi_nor_info_init_params(str
+@@ -4529,6 +4530,21 @@ static void spi_nor_info_init_params(str
*/
erase_mask = 0;
i = 0;
@@ -69,7 +69,7 @@
if (info->flags & SECT_4K_PMC) {
erase_mask |= BIT(i);
spi_nor_set_erase_type(&map->erase_type[i], 4096u,
-@@ -4538,6 +4554,7 @@ static void spi_nor_info_init_params(str
+@@ -4540,6 +4556,7 @@ static void spi_nor_info_init_params(str
SPINOR_OP_BE_4K);
i++;
}
diff --git a/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/476-mtd-spi-nor-add-eon-en25q128.patch b/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/476-mtd-spi-nor-add-eon-en25q128.patch
index b62dae5..25ff973 100644
--- a/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/476-mtd-spi-nor-add-eon-en25q128.patch
+++ b/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/476-mtd-spi-nor-add-eon-en25q128.patch
@@ -8,7 +8,7 @@
--- a/drivers/mtd/spi-nor/spi-nor.c
+++ b/drivers/mtd/spi-nor/spi-nor.c
-@@ -2179,6 +2179,7 @@ static const struct flash_info spi_nor_i
+@@ -2181,6 +2181,7 @@ static const struct flash_info spi_nor_i
{ "en25q32b", INFO(0x1c3016, 0, 64 * 1024, 64, 0) },
{ "en25p64", INFO(0x1c2017, 0, 64 * 1024, 128, 0) },
{ "en25q64", INFO(0x1c3017, 0, 64 * 1024, 128, SECT_4K) },
diff --git a/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/477-mtd-spi-nor-add-eon-en25qx128a.patch b/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/477-mtd-spi-nor-add-eon-en25qx128a.patch
index ec4052e..d6108c5 100644
--- a/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/477-mtd-spi-nor-add-eon-en25qx128a.patch
+++ b/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/477-mtd-spi-nor-add-eon-en25qx128a.patch
@@ -11,7 +11,7 @@
--- a/drivers/mtd/spi-nor/spi-nor.c
+++ b/drivers/mtd/spi-nor/spi-nor.c
-@@ -2180,6 +2180,7 @@ static const struct flash_info spi_nor_i
+@@ -2182,6 +2182,7 @@ static const struct flash_info spi_nor_i
{ "en25p64", INFO(0x1c2017, 0, 64 * 1024, 128, 0) },
{ "en25q64", INFO(0x1c3017, 0, 64 * 1024, 128, SECT_4K) },
{ "en25q128", INFO(0x1c3018, 0, 64 * 1024, 256, SECT_4K) },
diff --git a/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/479-mtd-spi-nor-add-xtx-xt25f128b.patch b/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/479-mtd-spi-nor-add-xtx-xt25f128b.patch
index 1cce9a9..0d3a920 100644
--- a/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/479-mtd-spi-nor-add-xtx-xt25f128b.patch
+++ b/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/479-mtd-spi-nor-add-xtx-xt25f128b.patch
@@ -30,7 +30,7 @@
--- a/drivers/mtd/spi-nor/spi-nor.c
+++ b/drivers/mtd/spi-nor/spi-nor.c
-@@ -2507,6 +2507,9 @@ static const struct flash_info spi_nor_i
+@@ -2509,6 +2509,9 @@ static const struct flash_info spi_nor_i
/* XMC (Wuhan Xinxin Semiconductor Manufacturing Corp.) */
{ "XM25QH64A", INFO(0x207017, 0, 64 * 1024, 128, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
{ "XM25QH128A", INFO(0x207018, 0, 64 * 1024, 256, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
diff --git a/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/480-mtd-set-rootfs-to-be-root-dev.patch b/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/480-mtd-set-rootfs-to-be-root-dev.patch
index 53894df..21b98e0 100644
--- a/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/480-mtd-set-rootfs-to-be-root-dev.patch
+++ b/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/480-mtd-set-rootfs-to-be-root-dev.patch
@@ -20,7 +20,7 @@
#include <linux/nvmem-provider.h>
#include <linux/mtd/mtd.h>
-@@ -754,6 +755,15 @@ int add_mtd_device(struct mtd_info *mtd)
+@@ -756,6 +757,15 @@ int add_mtd_device(struct mtd_info *mtd)
of this try_ nonsense, and no bitching about it
either. :) */
__module_get(THIS_MODULE);
diff --git a/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/481-mtd-spi-nor-rework-broken-flash-reset-support.patch b/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/481-mtd-spi-nor-rework-broken-flash-reset-support.patch
index 75112d2..064019d 100644
--- a/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/481-mtd-spi-nor-rework-broken-flash-reset-support.patch
+++ b/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/481-mtd-spi-nor-rework-broken-flash-reset-support.patch
@@ -42,7 +42,7 @@
static int macronix_set_4byte(struct spi_nor *nor, bool enable)
{
if (nor->spimem) {
-@@ -1261,6 +1277,10 @@ static int spi_nor_erase(struct mtd_info
+@@ -1263,6 +1279,10 @@ static int spi_nor_erase(struct mtd_info
if (ret)
return ret;
@@ -53,7 +53,7 @@
/* whole-chip erase? */
if (len == mtd->size && !(nor->flags & SNOR_F_NO_OP_CHIP_ERASE)) {
unsigned long timeout;
-@@ -1317,6 +1337,7 @@ static int spi_nor_erase(struct mtd_info
+@@ -1319,6 +1339,7 @@ static int spi_nor_erase(struct mtd_info
write_disable(nor);
erase_err:
@@ -61,7 +61,7 @@
spi_nor_unlock_and_unprep(nor, SPI_NOR_OPS_ERASE);
return ret;
-@@ -1623,7 +1644,9 @@ static int spi_nor_lock(struct mtd_info
+@@ -1625,7 +1646,9 @@ static int spi_nor_lock(struct mtd_info
if (ret)
return ret;
@@ -71,7 +71,7 @@
spi_nor_unlock_and_unprep(nor, SPI_NOR_OPS_UNLOCK);
return ret;
-@@ -1638,7 +1661,9 @@ static int spi_nor_unlock(struct mtd_inf
+@@ -1640,7 +1663,9 @@ static int spi_nor_unlock(struct mtd_inf
if (ret)
return ret;
@@ -81,7 +81,7 @@
spi_nor_unlock_and_unprep(nor, SPI_NOR_OPS_LOCK);
return ret;
-@@ -1653,7 +1678,9 @@ static int spi_nor_is_locked(struct mtd_
+@@ -1655,7 +1680,9 @@ static int spi_nor_is_locked(struct mtd_
if (ret)
return ret;
@@ -91,7 +91,7 @@
spi_nor_unlock_and_unprep(nor, SPI_NOR_OPS_LOCK);
return ret;
-@@ -2560,6 +2587,10 @@ static int spi_nor_read(struct mtd_info
+@@ -2562,6 +2589,10 @@ static int spi_nor_read(struct mtd_info
if (ret)
return ret;
@@ -102,7 +102,7 @@
while (len) {
loff_t addr = from;
-@@ -2583,6 +2614,7 @@ static int spi_nor_read(struct mtd_info
+@@ -2585,6 +2616,7 @@ static int spi_nor_read(struct mtd_info
ret = 0;
read_err:
@@ -110,7 +110,7 @@
spi_nor_unlock_and_unprep(nor, SPI_NOR_OPS_READ);
return ret;
}
-@@ -2600,6 +2632,10 @@ static int sst_write(struct mtd_info *mt
+@@ -2602,6 +2634,10 @@ static int sst_write(struct mtd_info *mt
if (ret)
return ret;
@@ -121,7 +121,7 @@
write_enable(nor);
nor->sst_write_second = false;
-@@ -2662,6 +2698,7 @@ static int sst_write(struct mtd_info *mt
+@@ -2664,6 +2700,7 @@ static int sst_write(struct mtd_info *mt
}
sst_write_err:
*retlen += actual;
@@ -129,7 +129,7 @@
spi_nor_unlock_and_unprep(nor, SPI_NOR_OPS_WRITE);
return ret;
}
-@@ -2684,6 +2721,10 @@ static int spi_nor_write(struct mtd_info
+@@ -2686,6 +2723,10 @@ static int spi_nor_write(struct mtd_info
if (ret)
return ret;
@@ -140,7 +140,7 @@
for (i = 0; i < len; ) {
ssize_t written;
loff_t addr = to + i;
-@@ -2723,6 +2764,7 @@ static int spi_nor_write(struct mtd_info
+@@ -2725,6 +2766,7 @@ static int spi_nor_write(struct mtd_info
}
write_err:
@@ -148,7 +148,7 @@
spi_nor_unlock_and_unprep(nor, SPI_NOR_OPS_WRITE);
return ret;
}
-@@ -4727,9 +4769,13 @@ static int spi_nor_init(struct spi_nor *
+@@ -4729,9 +4771,13 @@ static int spi_nor_init(struct spi_nor *
* reboots (e.g., crashes). Warn the user (or hopefully, system
* designer) that this is bad.
*/
diff --git a/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/482-mtd-spi-nor-add-support-for-Gigadevice-GD25D05.patch b/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/482-mtd-spi-nor-add-support-for-Gigadevice-GD25D05.patch
index 6685562..158e7f6 100644
--- a/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/482-mtd-spi-nor-add-support-for-Gigadevice-GD25D05.patch
+++ b/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/482-mtd-spi-nor-add-support-for-Gigadevice-GD25D05.patch
@@ -10,7 +10,7 @@
--- a/drivers/mtd/spi-nor/spi-nor.c
+++ b/drivers/mtd/spi-nor/spi-nor.c
-@@ -2233,6 +2233,11 @@ static const struct flash_info spi_nor_i
+@@ -2235,6 +2235,11 @@ static const struct flash_info spi_nor_i
/* GigaDevice */
{
diff --git a/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/482-mtd-spi-nor-fix-4-byte-opcode-support-for-w25q256.patch b/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/482-mtd-spi-nor-fix-4-byte-opcode-support-for-w25q256.patch
index a9a1d47..82bd7c4 100644
--- a/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/482-mtd-spi-nor-fix-4-byte-opcode-support-for-w25q256.patch
+++ b/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/482-mtd-spi-nor-fix-4-byte-opcode-support-for-w25q256.patch
@@ -15,7 +15,7 @@
--- a/drivers/mtd/spi-nor/spi-nor.c
+++ b/drivers/mtd/spi-nor/spi-nor.c
-@@ -2172,6 +2172,32 @@ static struct spi_nor_fixups gd25q256_fi
+@@ -2174,6 +2174,32 @@ static struct spi_nor_fixups gd25q256_fi
.default_init = gd25q256_default_init,
};
@@ -48,7 +48,7 @@
/* NOTE: double check command sets and memory organization when you add
* more nor chips. This current list focusses on newer chips, which
* have been converging on command sets which including JEDEC ID.
-@@ -2516,7 +2542,8 @@ static const struct flash_info spi_nor_i
+@@ -2518,7 +2544,8 @@ static const struct flash_info spi_nor_i
{ "w25q80", INFO(0xef5014, 0, 64 * 1024, 16, SECT_4K) },
{ "w25q80bl", INFO(0xef4014, 0, 64 * 1024, 16, SECT_4K) },
{ "w25q128", INFO(0xef4018, 0, 64 * 1024, 256, SECT_4K) },
diff --git a/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/495-mtd-core-add-get_mtd_device_by_node.patch b/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/495-mtd-core-add-get_mtd_device_by_node.patch
index 1b726c3..3ff4563 100644
--- a/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/495-mtd-core-add-get_mtd_device_by_node.patch
+++ b/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/495-mtd-core-add-get_mtd_device_by_node.patch
@@ -17,7 +17,7 @@
--- a/drivers/mtd/mtdcore.c
+++ b/drivers/mtd/mtdcore.c
-@@ -1136,6 +1136,44 @@ out_unlock:
+@@ -1138,6 +1138,44 @@ out_unlock:
}
EXPORT_SYMBOL_GPL(get_mtd_device_nm);
diff --git a/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/630-packet_socket_type.patch b/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/630-packet_socket_type.patch
index 54c087b..38323ab 100644
--- a/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/630-packet_socket_type.patch
+++ b/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/630-packet_socket_type.patch
@@ -55,7 +55,7 @@
goto out;
if (!net_eq(dev_net(dev), sock_net(sk)))
-@@ -2058,12 +2060,12 @@ static int packet_rcv(struct sk_buff *sk
+@@ -2068,12 +2070,12 @@ static int packet_rcv(struct sk_buff *sk
unsigned int snaplen, res;
bool is_drop_n_account = false;
@@ -71,7 +71,7 @@
if (!net_eq(dev_net(dev), sock_net(sk)))
goto drop;
-@@ -2189,12 +2191,12 @@ static int tpacket_rcv(struct sk_buff *s
+@@ -2199,12 +2201,12 @@ static int tpacket_rcv(struct sk_buff *s
BUILD_BUG_ON(TPACKET_ALIGN(sizeof(*h.h2)) != 32);
BUILD_BUG_ON(TPACKET_ALIGN(sizeof(*h.h3)) != 48);
@@ -87,7 +87,7 @@
if (!net_eq(dev_net(dev), sock_net(sk)))
goto drop;
-@@ -3301,6 +3303,7 @@ static int packet_create(struct net *net
+@@ -3310,6 +3312,7 @@ static int packet_create(struct net *net
mutex_init(&po->pg_vec_lock);
po->rollover = NULL;
po->prot_hook.func = packet_rcv;
@@ -95,7 +95,7 @@
if (sock->type == SOCK_PACKET)
po->prot_hook.func = packet_rcv_spkt;
-@@ -3944,6 +3947,16 @@ packet_setsockopt(struct socket *sock, i
+@@ -3952,6 +3955,16 @@ packet_setsockopt(struct socket *sock, i
po->xmit = val ? packet_direct_xmit : dev_queue_xmit;
return 0;
}
@@ -112,7 +112,7 @@
default:
return -ENOPROTOOPT;
}
-@@ -4000,6 +4013,13 @@ static int packet_getsockopt(struct sock
+@@ -4008,6 +4021,13 @@ static int packet_getsockopt(struct sock
case PACKET_VNET_HDR:
val = po->has_vnet_hdr;
break;
diff --git a/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/680-NET-skip-GRO-for-foreign-MAC-addresses.patch b/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/680-NET-skip-GRO-for-foreign-MAC-addresses.patch
index 3162efd..614ac76 100644
--- a/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/680-NET-skip-GRO-for-foreign-MAC-addresses.patch
+++ b/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/680-NET-skip-GRO-for-foreign-MAC-addresses.patch
@@ -11,7 +11,7 @@
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
-@@ -1927,6 +1927,8 @@ struct net_device {
+@@ -1934,6 +1934,8 @@ struct net_device {
struct netdev_hw_addr_list mc;
struct netdev_hw_addr_list dev_addrs;
diff --git a/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/703-phy-add-detach-callback-to-struct-phy_driver.patch b/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/703-phy-add-detach-callback-to-struct-phy_driver.patch
index b74b04c..6af22ca 100644
--- a/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/703-phy-add-detach-callback-to-struct-phy_driver.patch
+++ b/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/703-phy-add-detach-callback-to-struct-phy_driver.patch
@@ -11,7 +11,7 @@
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
-@@ -1465,6 +1465,9 @@ void phy_detach(struct phy_device *phyde
+@@ -1466,6 +1466,9 @@ void phy_detach(struct phy_device *phyde
struct module *ndev_owner = NULL;
struct mii_bus *bus;
diff --git a/recipes-kernel/linux/linux-mediatek-5.4/mediatek/nf_hnat/640-netfilter-nf_flow_table-add-hardware-offload-support.patch b/recipes-kernel/linux/linux-mediatek-5.4/mediatek/nf_hnat/640-netfilter-nf_flow_table-add-hardware-offload-support.patch
index 4d6a4ac..5767b41 100644
--- a/recipes-kernel/linux/linux-mediatek-5.4/mediatek/nf_hnat/640-netfilter-nf_flow_table-add-hardware-offload-support.patch
+++ b/recipes-kernel/linux/linux-mediatek-5.4/mediatek/nf_hnat/640-netfilter-nf_flow_table-add-hardware-offload-support.patch
@@ -23,7 +23,7 @@
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
-@@ -922,6 +922,13 @@ struct devlink;
+@@ -929,6 +929,13 @@ struct devlink;
struct tlsdev_ops;
@@ -37,7 +37,7 @@
/*
* This structure defines the management hooks for network devices.
* The following hooks can be defined; unless noted otherwise, they are
-@@ -1154,6 +1161,10 @@ struct tlsdev_ops;
+@@ -1161,6 +1168,10 @@ struct tlsdev_ops;
* int (*ndo_bridge_dellink)(struct net_device *dev, struct nlmsghdr *nlh,
* u16 flags);
*
@@ -48,7 +48,7 @@
* int (*ndo_change_carrier)(struct net_device *dev, bool new_carrier);
* Called to change device carrier. Soft-devices (like dummy, team, etc)
* which do not represent real hardware may define this to allow their
-@@ -1401,6 +1412,8 @@ struct net_device_ops {
+@@ -1408,6 +1419,8 @@ struct net_device_ops {
int (*ndo_bridge_dellink)(struct net_device *dev,
struct nlmsghdr *nlh,
u16 flags);
diff --git a/recipes-kernel/linux/linux-mediatek-5.4/mediatek/nf_hnat/641-netfilter-nf_flow_table-support-hw-offload-through-v.patch b/recipes-kernel/linux/linux-mediatek-5.4/mediatek/nf_hnat/641-netfilter-nf_flow_table-support-hw-offload-through-v.patch
index ae9f7f0..7cb79f7 100644
--- a/recipes-kernel/linux/linux-mediatek-5.4/mediatek/nf_hnat/641-netfilter-nf_flow_table-support-hw-offload-through-v.patch
+++ b/recipes-kernel/linux/linux-mediatek-5.4/mediatek/nf_hnat/641-netfilter-nf_flow_table-support-hw-offload-through-v.patch
@@ -15,7 +15,7 @@
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
-@@ -923,6 +923,7 @@ struct tlsdev_ops;
+@@ -930,6 +930,7 @@ struct tlsdev_ops;
struct flow_offload;
@@ -23,7 +23,7 @@
enum flow_offload_type {
FLOW_OFFLOAD_ADD = 0,
-@@ -1161,8 +1162,15 @@ enum flow_offload_type {
+@@ -1168,8 +1169,15 @@ enum flow_offload_type {
* int (*ndo_bridge_dellink)(struct net_device *dev, struct nlmsghdr *nlh,
* u16 flags);
*
@@ -40,7 +40,7 @@
* Adds/deletes flow entry to/from net device flowtable.
*
* int (*ndo_change_carrier)(struct net_device *dev, bool new_carrier);
-@@ -1412,8 +1420,11 @@ struct net_device_ops {
+@@ -1419,8 +1427,11 @@ struct net_device_ops {
int (*ndo_bridge_dellink)(struct net_device *dev,
struct nlmsghdr *nlh,
u16 flags);
diff --git a/recipes-kernel/linux/linux-mediatek-5.4/mediatek/patches-5.4/1020-spi-nor-w25q512jv.patch b/recipes-kernel/linux/linux-mediatek-5.4/mediatek/patches-5.4/1020-spi-nor-w25q512jv.patch
index 5beed1e..f65a0c7 100644
--- a/recipes-kernel/linux/linux-mediatek-5.4/mediatek/patches-5.4/1020-spi-nor-w25q512jv.patch
+++ b/recipes-kernel/linux/linux-mediatek-5.4/mediatek/patches-5.4/1020-spi-nor-w25q512jv.patch
@@ -13,7 +13,7 @@
--- a/drivers/mtd/spi-nor/spi-nor.c
+++ b/drivers/mtd/spi-nor/spi-nor.c
-@@ -2553,6 +2553,9 @@ static const struct flash_info spi_nor_i
+@@ -2555,6 +2555,9 @@ static const struct flash_info spi_nor_i
.fixups = &w25q256_fixups },
{ "w25q256jvm", INFO(0xef7019, 0, 64 * 1024, 512,
SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
diff --git a/recipes-kernel/linux/linux-mediatek-5.4/mediatek/patches-5.4/751-net-phy-aquantia-add-firmware-download.patch b/recipes-kernel/linux/linux-mediatek-5.4/mediatek/patches-5.4/751-net-phy-aquantia-add-firmware-download.patch
index a132dfe..f568322 100644
--- a/recipes-kernel/linux/linux-mediatek-5.4/mediatek/patches-5.4/751-net-phy-aquantia-add-firmware-download.patch
+++ b/recipes-kernel/linux/linux-mediatek-5.4/mediatek/patches-5.4/751-net-phy-aquantia-add-firmware-download.patch
@@ -77,7 +77,7 @@
index 5a16caa..912bbe6 100644
--- a/drivers/net/phy/aquantia.h
+++ b/drivers/net/phy/aquantia.h
-@@ -9,8 +9,64 @@
+@@ -9,8 +9,65 @@
#include <linux/device.h>
#include <linux/phy.h>
@@ -121,6 +121,7 @@
+ u64 sgmii_stats[AQR107_SGMII_STAT_SZ];
+#ifdef CONFIG_AQUANTIA_PHY_FW_DOWNLOAD
+ struct phy_device *phydevs[1];
++ struct task_struct *heartbeat;
+ bool fw_initialized;
+ int fw_dl_mode;
+#endif
@@ -147,7 +148,7 @@
index 0000000..7aeec86
--- /dev/null
+++ b/drivers/net/phy/aquantia_firmware.c
-@@ -0,0 +1,1032 @@
+@@ -0,0 +1,1095 @@
+// SPDX-License-Identifier: GPL-2.0
+/* FW download driver for Aquantia PHY
+ */
@@ -216,6 +217,8 @@
+#define VEND1_RSVD_PROV2_DAISYCHAIN_HOPCOUNT GENMASK(5, 0)
+#define VEND1_RSVD_PROV2_DAISYCHAIN_HOPCOUNT_OVERRIDE BIT(6)
+
++#define VEND1_GLOBAL_RSVD_STAT2 0xc886
++
+/*! The byte address, in processor memory, of the start of the IRAM segment. */
+#define AQ_IRAM_BASE_ADDRESS 0x40000000
+
@@ -294,6 +297,8 @@
+static int gangload = 0;
+static DEFINE_SPINLOCK(gangload_lock);
+
++static int aqr_firmware_download_single(struct phy_device *phydev);
++
+void AQ_API_EnableMDIO_BootLoadMode
+(
+ /*! The target PHY port.*/
@@ -1023,6 +1028,52 @@
+ NULL, NULL, 0);
+}
+
++static int aqr_firmware_check_heartbeat(struct phy_device *phydev)
++{
++ int prev, cur, ret;
++
++ ret = phy_read_mmd(phydev, MDIO_MMD_VEND1, VEND1_GLOBAL_RSVD_STAT2);
++ if (ret < 0)
++ return ret;
++
++ prev = ret;
++
++ msleep(1500);
++
++ ret = phy_read_mmd(phydev, MDIO_MMD_VEND1, VEND1_GLOBAL_RSVD_STAT2);
++ if (ret < 0)
++ return ret;
++
++ cur = ret;
++
++ if (prev == cur)
++ return 1;
++
++ return 0;
++}
++
++static int aqr_firmware_heartbeat_thread(void *data)
++{
++ struct phy_device *phydev = data;
++ struct aqr107_priv *priv = phydev->priv;
++ int ret = 0;
++
++ for (;;) {
++ if (kthread_should_stop())
++ break;
++
++ if (aqr_firmware_check_heartbeat(phydev) == 1) {
++ priv->fw_initialized = false;
++ aqr_firmware_download_single(phydev);
++ }
++
++ set_current_state(TASK_INTERRUPTIBLE);
++ schedule_timeout(HZ);
++ }
++
++ return ret;
++}
++
+static void aqr_firmware_download_cb(const struct firmware *fw, void *context)
+{
+ struct phy_device **phydevs = context;
@@ -1073,6 +1124,19 @@
+ phydevs[i]->state = PHY_UP;
+ phy_queue_state_machine(phydevs[i], 0);
+ }
++
++ /* create a thread for monitor heartbeats status */
++ if (!priv->heartbeat) {
++ priv->heartbeat = kthread_create(aqr_firmware_heartbeat_thread,
++ phydevs[i],
++ "aqr_firmware_heartbeat_thread");
++ if (IS_ERR(priv->heartbeat)) {
++ dev_err(dev,
++ "%s Failed to create thread for aqr_firmware_heartbeat_thread\n",
++ __func__);
++ }
++ wake_up_process(priv->heartbeat);
++ }
+ }
+ }
+
@@ -1081,7 +1145,7 @@
+ spin_unlock(&gangload_lock);
+}
+
-+int aqr_firmware_download_single(struct phy_device *phydev)
++static int aqr_firmware_download_single(struct phy_device *phydev)
+{
+ struct aqr107_priv *priv = phydev->priv;
+ struct device *dev = &phydev->mdio.dev;
@@ -1184,6 +1248,14 @@
index ac8dd8e..421cdd3 100644
--- a/drivers/net/phy/aquantia_main.c
+++ b/drivers/net/phy/aquantia_main.c
+@@ -8,6 +8,7 @@
+ */
+
+ #include <linux/kernel.h>
++#include <linux/kthread.h>
+ #include <linux/module.h>
+ #include <linux/delay.h>
+ #include <linux/bitfield.h>
@@ -73,18 +73,6 @@
#define MDIO_AN_RX_VEND_STAT3 0xe832
#define MDIO_AN_RX_VEND_STAT3_AFR BIT(0)
@@ -1268,3 +1340,27 @@
/* ensure that a latched downshift event is cleared */
aqr107_read_downshift_event(phydev);
+@@ -605,6 +609,15 @@ static int aqr107_resume(struct phy_device *phydev)
+ MDIO_CTRL1_LPOWER);
+ }
+
++static void aqr107_remove(struct phy_device *phydev)
++{
++#ifdef CONFIG_AQUANTIA_PHY_FW_DOWNLOAD
++ struct aqr107_priv *priv = phydev->priv;
++
++ kthread_stop(priv->heartbeat);
++#endif
++}
++
+ static int aqr107_probe(struct phy_device *phydev)
+ {
+ phydev->priv = devm_kzalloc(&phydev->mdio.dev,
+@@ -711,6 +737,7 @@ static struct phy_driver aqr_driver[] = {
+ .get_strings = aqr107_get_strings,
+ .get_stats = aqr107_get_stats,
+ .link_change_notify = aqr107_link_change_notify,
++ .remove = aqr107_remove,
+ },
+ };
+
diff --git a/recipes-kernel/linux/linux-mediatek_5.4.bb b/recipes-kernel/linux/linux-mediatek_5.4.bb
index de4c09d..8304174 100644
--- a/recipes-kernel/linux/linux-mediatek_5.4.bb
+++ b/recipes-kernel/linux/linux-mediatek_5.4.bb
@@ -8,8 +8,8 @@
KBRANCH ?= "linux-5.4.y"
-LINUX_VERSION ?= "5.4.225"
-SRCREV_machine ?= "4d2a309b5c28a2edc0900542d22fec3a5a22243b"
+LINUX_VERSION ?= "5.4.230"
+SRCREV_machine ?= "90245959a5b936ee013266e5d1e6a508ed69274e"
KMETA = "kernel-meta"
SRCREV_meta ?= "feeb59687bc0f054af837a5061f8d413ec7c93e9"