From: John Audia Date: Sat, 4 Sep 2021 23:54:35 +0000 (-0400) Subject: kernel: bump 5.4 to 5.4.144 X-Git-Tag: v22.03.0-rc1~1796 X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=51c7e1d25f6a4bc1f4906db508ab8a93a7bcaf4a;p=openwrt%2Fopenwrt.git kernel: bump 5.4 to 5.4.144 Manually rebased: backport-5.4/370-netfilter-nf_flow_table-fix-offloaded-connection-tim.patch All other patches automatically rebased. Build system: x86_64 Build-tested: ipq806x/R7800 Run-tested: ipq806x/R7800 Signed-off-by: John Audia --- diff --git a/include/kernel-version.mk b/include/kernel-version.mk index 925ba44e7b..10ceedffa5 100644 --- a/include/kernel-version.mk +++ b/include/kernel-version.mk @@ -6,10 +6,10 @@ ifdef CONFIG_TESTING_KERNEL KERNEL_PATCHVER:=$(KERNEL_TESTING_PATCHVER) endif -LINUX_VERSION-5.4 = .143 +LINUX_VERSION-5.4 = .144 LINUX_VERSION-5.10 = .64 -LINUX_KERNEL_HASH-5.4.143 = 0953650b05a5f806d76c5691583e94e141f4f691bc0ba75a60b643740f021d24 +LINUX_KERNEL_HASH-5.4.144 = bc43b98271ab3885a41c2413bed26b5a6d38795731b9c194f6e72dde45b85885 LINUX_KERNEL_HASH-5.10.64 = 3eb84bd24a2de2b4749314e34597c02401c5d6831b055ed5224adb405c35e30a remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1)))) diff --git a/target/linux/ath79/patches-5.4/910-unaligned_access_hacks.patch b/target/linux/ath79/patches-5.4/910-unaligned_access_hacks.patch index 55b198eb0c..d2200c8976 100644 --- a/target/linux/ath79/patches-5.4/910-unaligned_access_hacks.patch +++ b/target/linux/ath79/patches-5.4/910-unaligned_access_hacks.patch @@ -171,7 +171,7 @@ #define UDP_CORK 1 /* Never send partially complete segments */ --- a/net/netfilter/nf_conntrack_core.c +++ b/net/netfilter/nf_conntrack_core.c -@@ -271,8 +271,8 @@ nf_ct_get_tuple(const struct sk_buff *sk +@@ -266,8 +266,8 @@ nf_ct_get_tuple(const struct sk_buff *sk switch (l3num) { case NFPROTO_IPV4: diff --git a/target/linux/bcm27xx/patches-5.4/950-1031-net-lan78xx-Ack-pending-PHY-ints-when-resetting.patch b/target/linux/bcm27xx/patches-5.4/950-1031-net-lan78xx-Ack-pending-PHY-ints-when-resetting.patch index b2e7b7ee95..49d843d4d8 100644 --- a/target/linux/bcm27xx/patches-5.4/950-1031-net-lan78xx-Ack-pending-PHY-ints-when-resetting.patch +++ b/target/linux/bcm27xx/patches-5.4/950-1031-net-lan78xx-Ack-pending-PHY-ints-when-resetting.patch @@ -23,7 +23,7 @@ Signed-off-by: Phil Elwell @@ -1181,6 +1181,9 @@ static int lan78xx_link_reset(struct lan if (unlikely(ret < 0)) return -EIO; - + + /* Acknowledge any pending PHY interrupt, lest it be the last */ + phy_read(phydev, LAN88XX_INT_STS); + diff --git a/target/linux/generic/backport-5.4/370-netfilter-nf_flow_table-fix-offloaded-connection-tim.patch b/target/linux/generic/backport-5.4/370-netfilter-nf_flow_table-fix-offloaded-connection-tim.patch index bf89af3840..373a156429 100644 --- a/target/linux/generic/backport-5.4/370-netfilter-nf_flow_table-fix-offloaded-connection-tim.patch +++ b/target/linux/generic/backport-5.4/370-netfilter-nf_flow_table-fix-offloaded-connection-tim.patch @@ -21,7 +21,7 @@ Signed-off-by: Felix Fietkau --- a/net/netfilter/nf_conntrack_core.c +++ b/net/netfilter/nf_conntrack_core.c -@@ -1212,18 +1212,6 @@ static bool gc_worker_can_early_drop(con +@@ -1207,18 +1207,6 @@ static bool gc_worker_can_early_drop(con return false; } @@ -39,11 +39,11 @@ Signed-off-by: Felix Fietkau - static void gc_worker(struct work_struct *work) { - unsigned int min_interval = max(HZ / GC_MAX_BUCKETS_DIV, 1u); -@@ -1260,10 +1248,8 @@ static void gc_worker(struct work_struct + unsigned long end_time = jiffies + GC_SCAN_MAX_DURATION; +@@ -1250,10 +1238,8 @@ static void gc_worker(struct work_struct + tmp = nf_ct_tuplehash_to_ctrack(h); - scanned++; - if (test_bit(IPS_OFFLOAD_BIT, &tmp->status)) { - nf_ct_offload_timeout(tmp); + if (test_bit(IPS_OFFLOAD_BIT, &tmp->status)) diff --git a/target/linux/generic/backport-5.4/745-v5.7-net-dsa-mt7530-add-support-for-port-mirroring.patch b/target/linux/generic/backport-5.4/745-v5.7-net-dsa-mt7530-add-support-for-port-mirroring.patch index 14bf827806..71a06997c3 100644 --- a/target/linux/generic/backport-5.4/745-v5.7-net-dsa-mt7530-add-support-for-port-mirroring.patch +++ b/target/linux/generic/backport-5.4/745-v5.7-net-dsa-mt7530-add-support-for-port-mirroring.patch @@ -17,7 +17,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -1146,6 +1146,64 @@ mt7530_port_vlan_del(struct dsa_switch * +@@ -1143,6 +1143,64 @@ mt7530_port_vlan_del(struct dsa_switch * return 0; } @@ -82,7 +82,7 @@ Signed-off-by: David S. Miller static enum dsa_tag_protocol mtk_get_tag_protocol(struct dsa_switch *ds, int port) { -@@ -1523,6 +1581,8 @@ static const struct dsa_switch_ops mt753 +@@ -1520,6 +1578,8 @@ static const struct dsa_switch_ops mt753 .port_vlan_prepare = mt7530_port_vlan_prepare, .port_vlan_add = mt7530_port_vlan_add, .port_vlan_del = mt7530_port_vlan_del, diff --git a/target/linux/generic/backport-5.4/753-v5.8-net-dsa-mt7530-fix-VLAN-setup.patch b/target/linux/generic/backport-5.4/753-v5.8-net-dsa-mt7530-fix-VLAN-setup.patch index 98d213ee6e..0804cea9f7 100644 --- a/target/linux/generic/backport-5.4/753-v5.8-net-dsa-mt7530-fix-VLAN-setup.patch +++ b/target/linux/generic/backport-5.4/753-v5.8-net-dsa-mt7530-fix-VLAN-setup.patch @@ -15,7 +15,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -1086,12 +1086,6 @@ mt7530_port_vlan_add(struct dsa_switch * +@@ -1083,12 +1083,6 @@ mt7530_port_vlan_add(struct dsa_switch * struct mt7530_priv *priv = ds->priv; u16 vid; @@ -28,7 +28,7 @@ Signed-off-by: David S. Miller mutex_lock(&priv->reg_mutex); for (vid = vlan->vid_begin; vid <= vlan->vid_end; ++vid) { -@@ -1117,12 +1111,6 @@ mt7530_port_vlan_del(struct dsa_switch * +@@ -1114,12 +1108,6 @@ mt7530_port_vlan_del(struct dsa_switch * struct mt7530_priv *priv = ds->priv; u16 vid, pvid; @@ -41,7 +41,7 @@ Signed-off-by: David S. Miller mutex_lock(&priv->reg_mutex); pvid = priv->ports[port].pvid; -@@ -1235,6 +1223,7 @@ mt7530_setup(struct dsa_switch *ds) +@@ -1232,6 +1220,7 @@ mt7530_setup(struct dsa_switch *ds) * as two netdev instances. */ dn = ds->ports[MT7530_CPU_PORT].master->dev.of_node->parent; diff --git a/target/linux/generic/backport-5.4/800-v5.5-scsi-core-Add-sysfs-attributes-for-VPD-pages-0h-and-.patch b/target/linux/generic/backport-5.4/800-v5.5-scsi-core-Add-sysfs-attributes-for-VPD-pages-0h-and-.patch index 1e6e40df03..438588f9f4 100644 --- a/target/linux/generic/backport-5.4/800-v5.5-scsi-core-Add-sysfs-attributes-for-VPD-pages-0h-and-.patch +++ b/target/linux/generic/backport-5.4/800-v5.5-scsi-core-Add-sysfs-attributes-for-VPD-pages-0h-and-.patch @@ -68,7 +68,7 @@ Signed-off-by: Martin K. Petersen kfree(sdev->inquiry); kfree(sdev); -@@ -871,6 +880,8 @@ static struct bin_attribute dev_attr_vpd +@@ -874,6 +883,8 @@ static struct bin_attribute dev_attr_vpd sdev_vpd_pg_attr(pg83); sdev_vpd_pg_attr(pg80); @@ -77,7 +77,7 @@ Signed-off-by: Martin K. Petersen static ssize_t show_inquiry(struct file *filep, struct kobject *kobj, struct bin_attribute *bin_attr, -@@ -1203,12 +1214,18 @@ static umode_t scsi_sdev_bin_attr_is_vis +@@ -1206,12 +1217,18 @@ static umode_t scsi_sdev_bin_attr_is_vis struct scsi_device *sdev = to_scsi_device(dev); @@ -96,7 +96,7 @@ Signed-off-by: Martin K. Petersen return S_IRUGO; } -@@ -1251,8 +1268,10 @@ static struct attribute *scsi_sdev_attrs +@@ -1254,8 +1271,10 @@ static struct attribute *scsi_sdev_attrs }; static struct bin_attribute *scsi_sdev_bin_attrs[] = { diff --git a/target/linux/generic/hack-5.4/204-module_strip.patch b/target/linux/generic/hack-5.4/204-module_strip.patch index 2c3de812a3..d6e25f319b 100644 --- a/target/linux/generic/hack-5.4/204-module_strip.patch +++ b/target/linux/generic/hack-5.4/204-module_strip.patch @@ -112,7 +112,7 @@ Signed-off-by: Felix Fietkau config MODULES_TREE_LOOKUP --- a/kernel/module.c +++ b/kernel/module.c -@@ -1285,6 +1285,7 @@ static struct module_attribute *modinfo_ +@@ -1281,6 +1281,7 @@ static struct module_attribute *modinfo_ static const char vermagic[] = VERMAGIC_STRING; @@ -120,7 +120,7 @@ Signed-off-by: Felix Fietkau static int try_to_force_load(struct module *mod, const char *reason) { #ifdef CONFIG_MODULE_FORCE_LOAD -@@ -1296,6 +1297,7 @@ static int try_to_force_load(struct modu +@@ -1292,6 +1293,7 @@ static int try_to_force_load(struct modu return -ENOEXEC; #endif } @@ -128,7 +128,7 @@ Signed-off-by: Felix Fietkau #ifdef CONFIG_MODVERSIONS -@@ -3256,9 +3256,11 @@ static int setup_load_info(struct load_i +@@ -3256,9 +3258,11 @@ static int setup_load_info(struct load_i static int check_modinfo(struct module *mod, struct load_info *info, int flags) { @@ -141,7 +141,7 @@ Signed-off-by: Felix Fietkau if (flags & MODULE_INIT_IGNORE_VERMAGIC) modmagic = NULL; -@@ -3279,6 +3281,7 @@ static int check_modinfo(struct module * +@@ -3279,6 +3283,7 @@ static int check_modinfo(struct module * mod->name); add_taint_module(mod, TAINT_OOT_MODULE, LOCKDEP_STILL_OK); } diff --git a/target/linux/generic/pending-5.4/761-net-dsa-mt7530-Support-EEE-features.patch b/target/linux/generic/pending-5.4/761-net-dsa-mt7530-Support-EEE-features.patch index 02b369955b..c2dc35d134 100644 --- a/target/linux/generic/pending-5.4/761-net-dsa-mt7530-Support-EEE-features.patch +++ b/target/linux/generic/pending-5.4/761-net-dsa-mt7530-Support-EEE-features.patch @@ -9,7 +9,7 @@ Content-Transfer-Encoding: 8bit Signed-off-by: René van Dorst --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -1410,9 +1410,13 @@ static void mt7530_phylink_mac_config(st +@@ -1407,9 +1407,13 @@ static void mt7530_phylink_mac_config(st switch (state->speed) { case SPEED_1000: mcr_new |= PMCR_FORCE_SPEED_1000; @@ -23,7 +23,7 @@ Signed-off-by: René van Dorst break; } if (state->duplex == DUPLEX_FULL) { -@@ -1548,6 +1552,54 @@ mt7530_phylink_mac_link_state(struct dsa +@@ -1545,6 +1549,54 @@ mt7530_phylink_mac_link_state(struct dsa return 1; } @@ -78,7 +78,7 @@ Signed-off-by: René van Dorst static const struct dsa_switch_ops mt7530_switch_ops = { .get_tag_protocol = mtk_get_tag_protocol, .setup = mt7530_setup, -@@ -1575,6 +1627,8 @@ static const struct dsa_switch_ops mt753 +@@ -1572,6 +1624,8 @@ static const struct dsa_switch_ops mt753 .phylink_mac_config = mt7530_phylink_mac_config, .phylink_mac_link_down = mt7530_phylink_mac_link_down, .phylink_mac_link_up = mt7530_phylink_mac_link_up, diff --git a/target/linux/ipq40xx/patches-5.4/400-mmc-sdhci-sdhci-msm-use-sdhci_set_clock-instead-of-s.patch b/target/linux/ipq40xx/patches-5.4/400-mmc-sdhci-sdhci-msm-use-sdhci_set_clock-instead-of-s.patch index e56ab6d0f1..eaf7ae30bc 100644 --- a/target/linux/ipq40xx/patches-5.4/400-mmc-sdhci-sdhci-msm-use-sdhci_set_clock-instead-of-s.patch +++ b/target/linux/ipq40xx/patches-5.4/400-mmc-sdhci-sdhci-msm-use-sdhci_set_clock-instead-of-s.patch @@ -14,7 +14,7 @@ Signed-off-by: Robert Marko --- a/drivers/mmc/host/sdhci-msm.c +++ b/drivers/mmc/host/sdhci-msm.c -@@ -1746,7 +1746,7 @@ MODULE_DEVICE_TABLE(of, sdhci_msm_dt_mat +@@ -1763,7 +1763,7 @@ MODULE_DEVICE_TABLE(of, sdhci_msm_dt_mat static const struct sdhci_ops sdhci_msm_ops = { .reset = sdhci_reset, diff --git a/target/linux/layerscape/patches-5.4/820-usb-0005-usb-dwc3-add-otg-properties-update.patch b/target/linux/layerscape/patches-5.4/820-usb-0005-usb-dwc3-add-otg-properties-update.patch index 7457b6e009..fc4c853cb9 100644 --- a/target/linux/layerscape/patches-5.4/820-usb-0005-usb-dwc3-add-otg-properties-update.patch +++ b/target/linux/layerscape/patches-5.4/820-usb-0005-usb-dwc3-add-otg-properties-update.patch @@ -54,7 +54,7 @@ Signed-off-by: Peter Chen * All 3.1 IP version constants are greater than the 3.0 IP --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c -@@ -3656,6 +3656,10 @@ int dwc3_gadget_init(struct dwc3 *dwc) +@@ -3655,6 +3655,10 @@ int dwc3_gadget_init(struct dwc3 *dwc) dwc->gadget.sg_supported = true; dwc->gadget.name = "dwc3-gadget"; dwc->gadget.lpm_capable = true; diff --git a/target/linux/mediatek/patches-5.4/0601-net-dsa-propagate-resolved-link-config-via-mac_link_.patch b/target/linux/mediatek/patches-5.4/0601-net-dsa-propagate-resolved-link-config-via-mac_link_.patch index fe4f9855be..0df300b627 100644 --- a/target/linux/mediatek/patches-5.4/0601-net-dsa-propagate-resolved-link-config-via-mac_link_.patch +++ b/target/linux/mediatek/patches-5.4/0601-net-dsa-propagate-resolved-link-config-via-mac_link_.patch @@ -64,7 +64,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -1443,7 +1443,9 @@ static void mt7530_phylink_mac_link_down +@@ -1440,7 +1440,9 @@ static void mt7530_phylink_mac_link_down static void mt7530_phylink_mac_link_up(struct dsa_switch *ds, int port, unsigned int mode, phy_interface_t interface, diff --git a/target/linux/mediatek/patches-5.4/0602-net-dsa-mt7530-use-resolved-link-config-in-mac_link_.patch b/target/linux/mediatek/patches-5.4/0602-net-dsa-mt7530-use-resolved-link-config-in-mac_link_.patch index 87235e6054..23fba85252 100644 --- a/target/linux/mediatek/patches-5.4/0602-net-dsa-mt7530-use-resolved-link-config-in-mac_link_.patch +++ b/target/linux/mediatek/patches-5.4/0602-net-dsa-mt7530-use-resolved-link-config-in-mac_link_.patch @@ -51,7 +51,7 @@ Signed-off-by: David S. Miller mutex_unlock(&priv->reg_mutex); } -@@ -1398,8 +1387,7 @@ static void mt7530_phylink_mac_config(st +@@ -1395,8 +1384,7 @@ static void mt7530_phylink_mac_config(st mcr_cur = mt7530_read(priv, MT7530_PMCR_P(port)); mcr_new = mcr_cur; @@ -61,7 +61,7 @@ Signed-off-by: David S. Miller mcr_new |= PMCR_IFG_XMIT(1) | PMCR_MAC_MODE | PMCR_BACKOFF_EN | PMCR_BACKPR_EN | PMCR_FORCE_MODE; -@@ -1407,26 +1395,6 @@ static void mt7530_phylink_mac_config(st +@@ -1404,26 +1392,6 @@ static void mt7530_phylink_mac_config(st if (port == 5 && dsa_is_user_port(ds, 5)) mcr_new |= PMCR_EXT_PHY; @@ -88,7 +88,7 @@ Signed-off-by: David S. Miller if (mcr_new != mcr_cur) mt7530_write(priv, MT7530_PMCR_P(port), mcr_new); } -@@ -1437,7 +1405,7 @@ static void mt7530_phylink_mac_link_down +@@ -1434,7 +1402,7 @@ static void mt7530_phylink_mac_link_down { struct mt7530_priv *priv = ds->priv; @@ -97,7 +97,7 @@ Signed-off-by: David S. Miller } static void mt7530_phylink_mac_link_up(struct dsa_switch *ds, int port, -@@ -1448,8 +1416,31 @@ static void mt7530_phylink_mac_link_up(s +@@ -1445,8 +1413,31 @@ static void mt7530_phylink_mac_link_up(s bool tx_pause, bool rx_pause) { struct mt7530_priv *priv = ds->priv; diff --git a/target/linux/mediatek/patches-5.4/0603-net-dsa-mt7530-Extend-device-data-ready-for-adding-a.patch b/target/linux/mediatek/patches-5.4/0603-net-dsa-mt7530-Extend-device-data-ready-for-adding-a.patch index 291307791d..718ed8ea2d 100644 --- a/target/linux/mediatek/patches-5.4/0603-net-dsa-mt7530-Extend-device-data-ready-for-adding-a.patch +++ b/target/linux/mediatek/patches-5.4/0603-net-dsa-mt7530-Extend-device-data-ready-for-adding-a.patch @@ -47,7 +47,7 @@ Signed-off-by: Sean Wang return -EINVAL; } -@@ -1335,12 +1337,11 @@ mt7530_setup(struct dsa_switch *ds) +@@ -1332,12 +1334,11 @@ mt7530_setup(struct dsa_switch *ds) return 0; } @@ -63,7 +63,7 @@ Signed-off-by: Sean Wang switch (port) { case 0: /* Internal phy */ -@@ -1349,33 +1350,114 @@ static void mt7530_phylink_mac_config(st +@@ -1346,33 +1347,114 @@ static void mt7530_phylink_mac_config(st case 3: case 4: if (state->interface != PHY_INTERFACE_MODE_GMII) @@ -189,7 +189,7 @@ Signed-off-by: Sean Wang return; } -@@ -1443,61 +1525,44 @@ static void mt7530_phylink_mac_link_up(s +@@ -1440,61 +1522,44 @@ static void mt7530_phylink_mac_link_up(s mt7530_set(priv, MT7530_PMCR_P(port), mcr); } @@ -274,7 +274,7 @@ Signed-off-by: Sean Wang phylink_set(mask, Pause); phylink_set(mask, Asym_Pause); -@@ -1593,12 +1658,45 @@ static int mt7530_set_mac_eee(struct dsa +@@ -1590,12 +1655,45 @@ static int mt7530_set_mac_eee(struct dsa return 0; } @@ -323,7 +323,7 @@ Signed-off-by: Sean Wang .get_ethtool_stats = mt7530_get_ethtool_stats, .get_sset_count = mt7530_get_sset_count, .port_enable = mt7530_port_enable, -@@ -1615,18 +1713,43 @@ static const struct dsa_switch_ops mt753 +@@ -1612,18 +1710,43 @@ static const struct dsa_switch_ops mt753 .port_vlan_del = mt7530_port_vlan_del, .port_mirror_add = mt7530_port_mirror_add, .port_mirror_del = mt7530_port_mirror_del, @@ -372,7 +372,7 @@ Signed-off-by: Sean Wang { /* sentinel */ }, }; MODULE_DEVICE_TABLE(of, mt7530_of_match); -@@ -1664,8 +1787,21 @@ mt7530_probe(struct mdio_device *mdiodev +@@ -1661,8 +1784,21 @@ mt7530_probe(struct mdio_device *mdiodev /* Get the hardware identifier from the devicetree node. * We will need it for some of the clock and regulator setup. */ diff --git a/target/linux/mediatek/patches-5.4/0604-net-dsa-mt7530-Add-the-support-of-MT7531-switch.patch b/target/linux/mediatek/patches-5.4/0604-net-dsa-mt7530-Add-the-support-of-MT7531-switch.patch index 2d20bbc37c..8ede862204 100644 --- a/target/linux/mediatek/patches-5.4/0604-net-dsa-mt7530-Add-the-support-of-MT7531-switch.patch +++ b/target/linux/mediatek/patches-5.4/0604-net-dsa-mt7530-Add-the-support-of-MT7531-switch.patch @@ -394,7 +394,7 @@ Signed-off-by: Sean Wang */ mt7530_write(priv, MT7530_PCR_P(port), PCR_MATRIX(dsa_user_ports(priv->ds))); -@@ -1123,27 +1447,42 @@ mt7530_port_vlan_del(struct dsa_switch * +@@ -1120,27 +1444,42 @@ mt7530_port_vlan_del(struct dsa_switch * return 0; } @@ -444,7 +444,7 @@ Signed-off-by: Sean Wang val = mt7530_read(priv, MT7530_PCR_P(port)); if (ingress) { -@@ -1158,7 +1497,7 @@ static int mt7530_port_mirror_add(struct +@@ -1155,7 +1494,7 @@ static int mt7530_port_mirror_add(struct return 0; } @@ -453,7 +453,7 @@ Signed-off-by: Sean Wang struct dsa_mall_mirror_tc_entry *mirror) { struct mt7530_priv *priv = ds->priv; -@@ -1175,9 +1514,9 @@ static void mt7530_port_mirror_del(struc +@@ -1172,9 +1511,9 @@ static void mt7530_port_mirror_del(struc mt7530_write(priv, MT7530_PCR_P(port), val); if (!priv->mirror_rx && !priv->mirror_tx) { @@ -466,7 +466,7 @@ Signed-off-by: Sean Wang } } -@@ -1283,7 +1622,7 @@ mt7530_setup(struct dsa_switch *ds) +@@ -1280,7 +1619,7 @@ mt7530_setup(struct dsa_switch *ds) PCR_MATRIX_CLR); if (dsa_is_cpu_port(ds, i)) @@ -475,7 +475,7 @@ Signed-off-by: Sean Wang else mt7530_port_disable(ds, i); -@@ -1337,6 +1676,118 @@ mt7530_setup(struct dsa_switch *ds) +@@ -1334,6 +1673,118 @@ mt7530_setup(struct dsa_switch *ds) return 0; } @@ -594,7 +594,7 @@ Signed-off-by: Sean Wang static bool mt7530_phy_mode_supported(struct dsa_switch *ds, int port, const struct phylink_link_state *state) -@@ -1375,6 +1826,47 @@ unsupported: +@@ -1372,6 +1823,47 @@ unsupported: return false; } @@ -642,7 +642,7 @@ Signed-off-by: Sean Wang static bool mt753x_phy_mode_supported(struct dsa_switch *ds, int port, const struct phylink_link_state *state) -@@ -1407,6 +1899,227 @@ mt7530_mac_config(struct dsa_switch *ds, +@@ -1404,6 +1896,227 @@ mt7530_mac_config(struct dsa_switch *ds, return 0; } @@ -870,7 +870,7 @@ Signed-off-by: Sean Wang static int mt753x_mac_config(struct dsa_switch *ds, int port, unsigned int mode, const struct phylink_link_state *state) -@@ -1442,6 +2155,8 @@ mt753x_phylink_mac_config(struct dsa_swi +@@ -1439,6 +2152,8 @@ mt753x_phylink_mac_config(struct dsa_swi if (mt753x_mac_config(ds, port, mode, state) < 0) goto unsupported; @@ -879,7 +879,7 @@ Signed-off-by: Sean Wang break; case 6: /* 1st cpu port */ if (priv->p6_interface == state->interface) -@@ -1461,7 +2176,8 @@ unsupported: +@@ -1458,7 +2173,8 @@ unsupported: return; } @@ -889,7 +889,7 @@ Signed-off-by: Sean Wang dev_err(ds->dev, "%s: in-band negotiation unsupported\n", __func__); return; -@@ -1471,7 +2187,7 @@ unsupported: +@@ -1468,7 +2184,7 @@ unsupported: mcr_new = mcr_cur; mcr_new &= ~PMCR_LINK_SETTINGS_MASK; mcr_new |= PMCR_IFG_XMIT(1) | PMCR_MAC_MODE | PMCR_BACKOFF_EN | @@ -898,7 +898,7 @@ Signed-off-by: Sean Wang /* Are we connected to external phy */ if (port == 5 && dsa_is_user_port(ds, 5)) -@@ -1481,7 +2197,18 @@ unsupported: +@@ -1478,7 +2194,18 @@ unsupported: mt7530_write(priv, MT7530_PMCR_P(port), mcr_new); } @@ -918,7 +918,7 @@ Signed-off-by: Sean Wang unsigned int mode, phy_interface_t interface) { -@@ -1490,7 +2217,19 @@ static void mt7530_phylink_mac_link_down +@@ -1487,7 +2214,19 @@ static void mt7530_phylink_mac_link_down mt7530_clear(priv, MT7530_PMCR_P(port), PMCR_LINK_SETTINGS_MASK); } @@ -939,7 +939,7 @@ Signed-off-by: Sean Wang unsigned int mode, phy_interface_t interface, struct phy_device *phydev, -@@ -1500,18 +2239,29 @@ static void mt7530_phylink_mac_link_up(s +@@ -1497,18 +2236,29 @@ static void mt7530_phylink_mac_link_up(s struct mt7530_priv *priv = ds->priv; u32 mcr; @@ -971,7 +971,7 @@ Signed-off-by: Sean Wang break; } if (duplex == DUPLEX_FULL) { -@@ -1525,6 +2275,45 @@ static void mt7530_phylink_mac_link_up(s +@@ -1522,6 +2272,45 @@ static void mt7530_phylink_mac_link_up(s mt7530_set(priv, MT7530_PMCR_P(port), mcr); } @@ -1017,7 +1017,7 @@ Signed-off-by: Sean Wang static void mt7530_mac_port_validate(struct dsa_switch *ds, int port, unsigned long *supported) -@@ -1533,6 +2322,14 @@ mt7530_mac_port_validate(struct dsa_swit +@@ -1530,6 +2319,14 @@ mt7530_mac_port_validate(struct dsa_swit phylink_set(supported, 1000baseX_Full); } @@ -1032,7 +1032,7 @@ Signed-off-by: Sean Wang static void mt753x_phylink_validate(struct dsa_switch *ds, int port, unsigned long *supported, -@@ -1549,7 +2346,8 @@ mt753x_phylink_validate(struct dsa_switc +@@ -1546,7 +2343,8 @@ mt753x_phylink_validate(struct dsa_switc phylink_set_port_modes(mask); @@ -1042,7 +1042,7 @@ Signed-off-by: Sean Wang phylink_set(mask, 10baseT_Half); phylink_set(mask, 10baseT_Full); phylink_set(mask, 100baseT_Half); -@@ -1568,6 +2366,11 @@ mt753x_phylink_validate(struct dsa_switc +@@ -1565,6 +2363,11 @@ mt753x_phylink_validate(struct dsa_switc linkmode_and(supported, supported, mask); linkmode_and(state->advertising, state->advertising, mask); @@ -1054,7 +1054,7 @@ Signed-off-by: Sean Wang } static int -@@ -1658,6 +2461,63 @@ static int mt7530_set_mac_eee(struct dsa +@@ -1655,6 +2458,63 @@ static int mt7530_set_mac_eee(struct dsa return 0; } @@ -1118,7 +1118,7 @@ Signed-off-by: Sean Wang static int mt753x_phylink_mac_link_state(struct dsa_switch *ds, int port, struct phylink_link_state *state) -@@ -1711,13 +2571,14 @@ static const struct dsa_switch_ops mt753 +@@ -1708,13 +2568,14 @@ static const struct dsa_switch_ops mt753 .port_vlan_prepare = mt7530_port_vlan_prepare, .port_vlan_add = mt7530_port_vlan_add, .port_vlan_del = mt7530_port_vlan_del, @@ -1137,7 +1137,7 @@ Signed-off-by: Sean Wang .get_mac_eee = mt7530_get_mac_eee, .set_mac_eee = mt7530_set_mac_eee, }; -@@ -1745,11 +2606,26 @@ static const struct mt753x_info mt753x_t +@@ -1742,11 +2603,26 @@ static const struct mt753x_info mt753x_t .mac_port_get_state = mt7530_phylink_mac_link_state, .mac_port_config = mt7530_mac_config, },