kernel: bump to 5.4.302

- update the 5.4 kernel baseline from 5.4.284 to 5.4.302
- rebase the affected generic patches, including the MikroTik build bits and codel backport, to the 5.4.302 source context
- rebase the affected MediaTek TRNG and PWM patches to the new source context
- adjust 993-usb-serial-option-add-u9300.patch so the LONGSUNG U9300 modem patch still applies after the qmi_wwan changes
This commit is contained in:
yangxu52
2026-03-30 23:26:21 +08:00
committed by zerowrt-bot
parent ba554197ed
commit 81a41bfe22
8 changed files with 42 additions and 37 deletions

View File

@@ -1,2 +1,2 @@
LINUX_VERSION-5.4 = .284 LINUX_VERSION-5.4 = .302
LINUX_KERNEL_HASH-5.4.284 = 77221ab9aebeac746915c755ec3b7d320f85cd219c63d9c501820fbca1e3b32b LINUX_KERNEL_HASH-5.4.302 = ae6a3207f12aa4d6cfb0fa793ec9da4a6fcdfdcb57d869d63d6b77e3a8c1423d

View File

@@ -1,9 +1,9 @@
--- a/drivers/net/usb/qmi_wwan.c --- a/drivers/net/usb/qmi_wwan.c
+++ b/drivers/net/usb/qmi_wwan.c +++ b/drivers/net/usb/qmi_wwan.c
@@ -1369,6 +1369,7 @@ static const struct usb_device_id produc @@ -1392,6 +1392,7 @@
{QMI_FIXED_INTF(0x03f0, 0x9d1d, 1)}, /* HP lt4120 Snapdragon X5 LTE */
{QMI_FIXED_INTF(0x22de, 0x9061, 3)}, /* WeTelecom WPD-600N */ {QMI_FIXED_INTF(0x22de, 0x9061, 3)}, /* WeTelecom WPD-600N */
{QMI_QUIRK_SET_DTR(0x1e0e, 0x9001, 5)}, /* SIMCom 7100E, 7230E, 7600E ++ */ {QMI_QUIRK_SET_DTR(0x1e0e, 0x9001, 5)}, /* SIMCom 7100E, 7230E, 7600E ++ */
{QMI_QUIRK_SET_DTR(0x1e0e, 0x9071, 3)}, /* SIMCom 8230C ++ */
+ {QMI_FIXED_INTF(0x1c9e, 0x9b3c, 4)}, /* LONGSUNG_U9300 */ + {QMI_FIXED_INTF(0x1c9e, 0x9b3c, 4)}, /* LONGSUNG_U9300 */
{QMI_QUIRK_SET_DTR(0x2c7c, 0x0121, 4)}, /* Quectel EC21 Mini PCIe */ {QMI_QUIRK_SET_DTR(0x2c7c, 0x0121, 4)}, /* Quectel EC21 Mini PCIe */
{QMI_QUIRK_SET_DTR(0x2c7c, 0x0191, 4)}, /* Quectel EG91 */ {QMI_QUIRK_SET_DTR(0x2c7c, 0x0191, 4)}, /* Quectel EG91 */

View File

@@ -16,16 +16,21 @@ Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
--- a/drivers/platform/Kconfig --- a/drivers/platform/Kconfig
+++ b/drivers/platform/Kconfig +++ b/drivers/platform/Kconfig
@@ -13,3 +13,5 @@ source "drivers/platform/chrome/Kconfig" @@ -13,6 +13,8 @@ source "drivers/platform/chrome/Kconfig"
source "drivers/platform/mellanox/Kconfig" source "drivers/platform/mellanox/Kconfig"
source "drivers/platform/olpc/Kconfig" source "drivers/platform/olpc/Kconfig"
+ +
+source "drivers/platform/mikrotik/Kconfig" +source "drivers/platform/mikrotik/Kconfig"
source "drivers/platform/surface/Kconfig"
--- a/drivers/platform/Makefile --- a/drivers/platform/Makefile
+++ b/drivers/platform/Makefile +++ b/drivers/platform/Makefile
@@ -9,3 +9,4 @@ obj-$(CONFIG_MIPS) += mips/ @@ -9,5 +9,6 @@ obj-$(CONFIG_MIPS) += mips/
obj-$(CONFIG_OLPC_EC) += olpc/ obj-$(CONFIG_OLPC_EC) += olpc/
obj-$(CONFIG_GOLDFISH) += goldfish/ obj-$(CONFIG_GOLDFISH) += goldfish/
obj-$(CONFIG_CHROME_PLATFORMS) += chrome/ obj-$(CONFIG_CHROME_PLATFORMS) += chrome/
+obj-$(CONFIG_MIKROTIK) += mikrotik/ +obj-$(CONFIG_MIKROTIK) += mikrotik/
obj-$(CONFIG_SURFACE_PLATFORMS) += surface/

View File

@@ -22,19 +22,11 @@ Link: https://bugzilla.kernel.org/show_bug.cgi?id=109581
--- a/net/sched/sch_codel.c --- a/net/sched/sch_codel.c
+++ b/net/sched/sch_codel.c +++ b/net/sched/sch_codel.c
@@ -95,11 +95,17 @@ static struct sk_buff *codel_qdisc_deque @@ -96,7 +96,12 @@ static struct sk_buff *codel_qdisc_deque
&q->stats, qdisc_pkt_len, codel_get_enqueue_time,
drop_func, dequeue_func); drop_func, dequeue_func);
- /* We cant call qdisc_tree_reduce_backlog() if our qlen is 0, if (q->stats.drop_count) {
- * or HTB crashes. Defer it for next round.
+ /* If our qlen is 0 qdisc_tree_reduce_backlog() will deactivate
+ * parent class, dequeue in parent qdisc will do the same if we
+ * return skb. Temporary increment qlen if we have skb.
*/
- if (q->stats.drop_count && sch->q.qlen) {
- qdisc_tree_reduce_backlog(sch, q->stats.drop_count, q->stats.drop_len); - qdisc_tree_reduce_backlog(sch, q->stats.drop_count, q->stats.drop_len);
+ if (q->stats.drop_count) {
+ if (skb) + if (skb)
+ sch->q.qlen++; + sch->q.qlen++;
+ qdisc_tree_reduce_backlog(sch, q->stats.drop_count, + qdisc_tree_reduce_backlog(sch, q->stats.drop_count,
@@ -46,10 +38,11 @@ Link: https://bugzilla.kernel.org/show_bug.cgi?id=109581
} }
--- a/net/sched/sch_fq_codel.c --- a/net/sched/sch_fq_codel.c
+++ b/net/sched/sch_fq_codel.c +++ b/net/sched/sch_fq_codel.c
@@ -305,6 +305,21 @@ begin: @@ -304,6 +304,21 @@ begin:
skb = codel_dequeue(sch, &sch->qstats.backlog, &q->cparams,
&flow->cvars, &q->cstats, qdisc_pkt_len, &flow->cvars, &q->cstats, qdisc_pkt_len,
codel_get_enqueue_time, drop_func, dequeue_func); codel_get_enqueue_time, drop_func, dequeue_func);
+
+ /* If our qlen is 0 qdisc_tree_reduce_backlog() will deactivate + /* If our qlen is 0 qdisc_tree_reduce_backlog() will deactivate
+ * parent class, dequeue in parent qdisc will do the same if we + * parent class, dequeue in parent qdisc will do the same if we
+ * return skb. Temporary increment qlen if we have skb. + * return skb. Temporary increment qlen if we have skb.
@@ -64,18 +57,15 @@ Link: https://bugzilla.kernel.org/show_bug.cgi?id=109581
+ q->cstats.drop_count = 0; + q->cstats.drop_count = 0;
+ q->cstats.drop_len = 0; + q->cstats.drop_len = 0;
+ } + }
+
if (!skb) { if (!skb) {
/* force a pass through old_flows to prevent starvation */ /* force a pass through old_flows to prevent starvation */
if ((head == &q->new_flows) && !list_empty(&q->old_flows)) @@ -315,13 +330,6 @@ begin:
@@ -315,15 +330,6 @@ begin:
} }
qdisc_bstats_update(sch, skb); qdisc_bstats_update(sch, skb);
flow->deficit -= qdisc_pkt_len(skb); flow->deficit -= qdisc_pkt_len(skb);
- /* We cant call qdisc_tree_reduce_backlog() if our qlen is 0, -
- * or HTB crashes. Defer it for next round. - if (q->cstats.drop_count) {
- */
- if (q->cstats.drop_count && sch->q.qlen) {
- qdisc_tree_reduce_backlog(sch, q->cstats.drop_count, - qdisc_tree_reduce_backlog(sch, q->cstats.drop_count,
- q->cstats.drop_len); - q->cstats.drop_len);
- q->cstats.drop_count = 0; - q->cstats.drop_count = 0;

View File

@@ -33,7 +33,7 @@ index e649be5a5..496adb0a0 100644
} }
static int mtk_rng_read(struct hwrng *rng, void *buf, size_t max, bool wait) static int mtk_rng_read(struct hwrng *rng, void *buf, size_t max, bool wait)
@@ -181,6 +181,7 @@ static UNIVERSAL_DEV_PM_OPS(mtk_rng_pm_ops, mtk_rng_runtime_suspend, @@ -186,6 +186,7 @@ static UNIVERSAL_DEV_PM_OPS(mtk_rng_pm_ops, mtk_rng_runtime_suspend,
#endif /* CONFIG_PM */ #endif /* CONFIG_PM */
static const struct of_device_id mtk_rng_match[] = { static const struct of_device_id mtk_rng_match[] = {

View File

@@ -3,7 +3,7 @@ index 7c56ee2..3a5a456 100644
--- a/drivers/pwm/pwm-mediatek.c --- a/drivers/pwm/pwm-mediatek.c
+++ b/drivers/pwm/pwm-mediatek.c +++ b/drivers/pwm/pwm-mediatek.c
@@ -33,10 +32,13 @@ @@ -33,10 +32,13 @@
#define PWM45THRES_FIXUP 0x34 #define PWM_CK_26M_SEL 0x210
#define PWM_CLK_DIV_MAX 7 #define PWM_CLK_DIV_MAX 7
+#define REG_V1 1 +#define REG_V1 1
@@ -13,9 +13,9 @@ index 7c56ee2..3a5a456 100644
unsigned int num_pwms; unsigned int num_pwms;
bool pwm45_fixup; bool pwm45_fixup;
+ int reg_ver; + int reg_ver;
bool has_ck_26m_sel;
}; };
/**
@@ -57,10 +59,14 @@ struct pwm_mediatek_chip { @@ -57,10 +59,14 @@ struct pwm_mediatek_chip {
const struct pwm_mediatek_of_data *soc; const struct pwm_mediatek_of_data *soc;
}; };
@@ -73,57 +73,64 @@ index 7c56ee2..3a5a456 100644
} }
static int pwm_mediatek_config(struct pwm_chip *chip, struct pwm_device *pwm, static int pwm_mediatek_config(struct pwm_chip *chip, struct pwm_device *pwm,
@@ -281,36 +311,49 @@ static int pwm_mediatek_remove(struct platform_device *pdev) @@ -282,41 +312,56 @@ static int pwm_mediatek_remove(struct platform_device *pdev)
static const struct pwm_mediatek_of_data mt2712_pwm_data = {
.num_pwms = 8, .num_pwms = 8,
.pwm45_fixup = false, .pwm45_fixup = false,
.has_ck_26m_sel = false,
+ .reg_ver = REG_V1, + .reg_ver = REG_V1,
}; };
static const struct pwm_mediatek_of_data mt7622_pwm_data = { static const struct pwm_mediatek_of_data mt7622_pwm_data = {
.num_pwms = 6, .num_pwms = 6,
.pwm45_fixup = false, .pwm45_fixup = false,
.has_ck_26m_sel = true,
+ .reg_ver = REG_V1, + .reg_ver = REG_V1,
}; };
static const struct pwm_mediatek_of_data mt7623_pwm_data = { static const struct pwm_mediatek_of_data mt7623_pwm_data = {
.num_pwms = 5, .num_pwms = 5,
.pwm45_fixup = true, .pwm45_fixup = true,
.has_ck_26m_sel = false,
+ .reg_ver = REG_V1, + .reg_ver = REG_V1,
}; };
static const struct pwm_mediatek_of_data mt7628_pwm_data = { static const struct pwm_mediatek_of_data mt7628_pwm_data = {
.num_pwms = 4, .num_pwms = 4,
.pwm45_fixup = true, .pwm45_fixup = true,
.has_ck_26m_sel = false,
+ .reg_ver = REG_V1, + .reg_ver = REG_V1,
}; };
static const struct pwm_mediatek_of_data mt7629_pwm_data = { static const struct pwm_mediatek_of_data mt7629_pwm_data = {
.num_pwms = 1, .num_pwms = 1,
.pwm45_fixup = false, .pwm45_fixup = false,
.has_ck_26m_sel = false,
+ .reg_ver = REG_V1, + .reg_ver = REG_V1,
+}; +};
+ +
+static const struct pwm_mediatek_of_data mt7981_pwm_data = { +static const struct pwm_mediatek_of_data mt7981_pwm_data = {
+ .num_pwms = 3, + .num_pwms = 3,
+ .pwm45_fixup = false, + .pwm45_fixup = false,
+ .has_ck_26m_sel = true,
+ .reg_ver = REG_V2, + .reg_ver = REG_V2,
}; };
static const struct pwm_mediatek_of_data mt7986_pwm_data = { static const struct pwm_mediatek_of_data mt7986_pwm_data = {
.num_pwms = 2, .num_pwms = 2,
.pwm45_fixup = false, .pwm45_fixup = false,
+ .reg_ver = REG_V1, + .has_ck_26m_sel = true,
+ .reg_ver = REG_V2,
}; };
static const struct pwm_mediatek_of_data mt8516_pwm_data = { static const struct pwm_mediatek_of_data mt8516_pwm_data = {
.num_pwms = 5, .num_pwms = 5,
.pwm45_fixup = false, .pwm45_fixup = false,
.has_ck_26m_sel = true,
+ .reg_ver = REG_V1, + .reg_ver = REG_V1,
}; };
static const struct of_device_id pwm_mediatek_of_match[] = { static const struct of_device_id pwm_mediatek_of_match[] = {
@@ -319,6 +362,7 @@ static const struct of_device_id pwm_mediatek_of_match[] = { @@ -319,6 +364,7 @@ static const struct of_device_id pwm_mediatek_of_match[] = {
{ .compatible = "mediatek,mt7623-pwm", .data = &mt7623_pwm_data }, { .compatible = "mediatek,mt7623-pwm", .data = &mt7623_pwm_data },
{ .compatible = "mediatek,mt7628-pwm", .data = &mt7628_pwm_data }, { .compatible = "mediatek,mt7628-pwm", .data = &mt7628_pwm_data },
{ .compatible = "mediatek,mt7629-pwm", .data = &mt7629_pwm_data }, { .compatible = "mediatek,mt7629-pwm", .data = &mt7629_pwm_data },

View File

@@ -2,20 +2,21 @@ diff --git a/drivers/pwm/pwm-mediatek.c b/drivers/pwm/pwm-mediatek.c
index 3a5a456..6d6206e 100644 index 3a5a456..6d6206e 100644
--- a/drivers/pwm/pwm-mediatek.c --- a/drivers/pwm/pwm-mediatek.c
+++ b/drivers/pwm/pwm-mediatek.c +++ b/drivers/pwm/pwm-mediatek.c
@@ -350,6 +350,12 @@ static const struct pwm_mediatek_of_data mt7986_pwm_data = { @@ -350,6 +350,13 @@ static const struct pwm_mediatek_of_data mt7986_pwm_data = {
.reg_ver = REG_V2, .reg_ver = REG_V2,
}; };
+static const struct pwm_mediatek_of_data mt7988_pwm_data = { +static const struct pwm_mediatek_of_data mt7988_pwm_data = {
+ .num_pwms = 8, + .num_pwms = 8,
+ .pwm45_fixup = false, + .pwm45_fixup = false,
+ .has_ck_26m_sel = true,
+ .reg_ver = REG_V2, + .reg_ver = REG_V2,
+}; +};
+ +
static const struct pwm_mediatek_of_data mt8516_pwm_data = { static const struct pwm_mediatek_of_data mt8516_pwm_data = {
.num_pwms = 5, .num_pwms = 5,
.pwm45_fixup = false, .pwm45_fixup = false,
@@ -364,6 +370,7 @@ static const struct of_device_id pwm_mediatek_of_match[] = { @@ -364,6 +371,7 @@ static const struct of_device_id pwm_mediatek_of_match[] = {
{ .compatible = "mediatek,mt7629-pwm", .data = &mt7629_pwm_data }, { .compatible = "mediatek,mt7629-pwm", .data = &mt7629_pwm_data },
{ .compatible = "mediatek,mt7981-pwm", .data = &mt7981_pwm_data }, { .compatible = "mediatek,mt7981-pwm", .data = &mt7981_pwm_data },
{ .compatible = "mediatek,mt7986-pwm", .data = &mt7986_pwm_data }, { .compatible = "mediatek,mt7986-pwm", .data = &mt7986_pwm_data },

View File

@@ -143,19 +143,21 @@ index a8bd06da7..75fca4cef 100644
ret = devm_hwrng_register(&pdev->dev, &priv->rng); ret = devm_hwrng_register(&pdev->dev, &priv->rng);
if (ret) { if (ret) {
@@ -146,11 +189,6 @@ static int mtk_rng_probe(struct platform_device *pdev) @@ -146,13 +189,6 @@ static int mtk_rng_probe(struct platform_device *pdev)
return ret; return ret;
} }
- dev_set_drvdata(&pdev->dev, priv); - dev_set_drvdata(&pdev->dev, priv);
- pm_runtime_set_autosuspend_delay(&pdev->dev, RNG_AUTOSUSPEND_TIMEOUT); - pm_runtime_set_autosuspend_delay(&pdev->dev, RNG_AUTOSUSPEND_TIMEOUT);
- pm_runtime_use_autosuspend(&pdev->dev); - pm_runtime_use_autosuspend(&pdev->dev);
- pm_runtime_enable(&pdev->dev); - ret = devm_pm_runtime_enable(&pdev->dev);
- if (ret)
- return ret;
- -
dev_info(&pdev->dev, "registered RNG driver\n"); dev_info(&pdev->dev, "registered RNG driver\n");
return 0; return 0;
@@ -185,9 +223,22 @@ static const struct dev_pm_ops mtk_rng_pm_ops = { @@ -185,9 +221,22 @@ static const struct dev_pm_ops mtk_rng_pm_ops = {
#define MTK_RNG_PM_OPS NULL #define MTK_RNG_PM_OPS NULL
#endif /* CONFIG_PM */ #endif /* CONFIG_PM */