-LINUX_VERSION-5.15 = .118
-LINUX_KERNEL_HASH-5.15.118 = 4e6bf4dadb04d5d11d1d4cc37c0eabcf33bc333b7dd3dc2143c3099a823eb5b3
+LINUX_VERSION-5.15 = .119
+LINUX_KERNEL_HASH-5.15.119 = 7aa5a0fd3520947e5599e811d28acdc30e36446c016c7dcee3793e6d1cbecfcf
| TCPOLEN_TIMESTAMP))
--- a/net/xfrm/xfrm_input.c
+++ b/net/xfrm/xfrm_input.c
-@@ -166,8 +166,8 @@ int xfrm_parse_spi(struct sk_buff *skb,
+@@ -167,8 +167,8 @@ int xfrm_parse_spi(struct sk_buff *skb,
if (!pskb_may_pull(skb, hlen))
return -EINVAL;
--- a/kernel/cgroup/cgroup.c
+++ b/kernel/cgroup/cgroup.c
-@@ -5875,6 +5875,9 @@ int __init cgroup_init_early(void)
+@@ -5889,6 +5889,9 @@ int __init cgroup_init_early(void)
return 0;
}
/**
* cgroup_init - cgroup initialization
*
-@@ -5913,6 +5916,12 @@ int __init cgroup_init(void)
+@@ -5927,6 +5930,12 @@ int __init cgroup_init(void)
mutex_unlock(&cgroup_mutex);
for_each_subsys(ss, ssid) {
if (ss->early_init) {
struct cgroup_subsys_state *css =
-@@ -6502,6 +6511,10 @@ static int __init cgroup_disable(char *s
+@@ -6516,6 +6525,10 @@ static int __init cgroup_disable(char *s
strcmp(token, ss->legacy_name))
continue;
static_branch_disable(cgroup_subsys_enabled_key[i]);
pr_info("Disabling %s control group subsystem\n",
ss->name);
-@@ -6520,6 +6533,31 @@ static int __init cgroup_disable(char *s
+@@ -6534,6 +6547,31 @@ static int __init cgroup_disable(char *s
}
__setup("cgroup_disable=", cgroup_disable);
/* Device and char device-related information */
static DEFINE_IDA(gpio_ida);
static dev_t gpio_devt;
-@@ -2395,8 +2397,8 @@ int gpiod_direction_output(struct gpio_d
+@@ -2408,8 +2410,8 @@ int gpiod_direction_output(struct gpio_d
value = !!value;
/* GPIOs used for enabled IRQs shall not be set as output */
gpiod_err(desc,
"%s: tried to set a GPIO tied to an IRQ as output\n",
__func__);
-@@ -3213,8 +3215,8 @@ int gpiochip_lock_as_irq(struct gpio_chi
+@@ -3226,8 +3228,8 @@ int gpiochip_lock_as_irq(struct gpio_chi
}
/* To be valid for IRQ the line needs to be input or open drain */
}
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
-@@ -1802,7 +1802,8 @@ int gpiochip_add_pingroup_range(struct g
+@@ -1815,7 +1815,8 @@ int gpiochip_add_pingroup_range(struct g
list_add_tail(&pin_range->node, &gdev->pin_ranges);
}
EXPORT_SYMBOL_GPL(gpiochip_add_pingroup_range);
-@@ -1859,7 +1860,7 @@ int gpiochip_add_pin_range(struct gpio_c
+@@ -1872,7 +1873,7 @@ int gpiochip_add_pin_range(struct gpio_c
list_add_tail(&pin_range->node, &gdev->pin_ranges);
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
-@@ -1190,27 +1190,31 @@ static int
+@@ -1198,27 +1198,31 @@ static int
mt7530_port_bridge_join(struct dsa_switch *ds, int port,
struct net_device *bridge)
{
}
/* Add the all other ports to this port matrix. */
-@@ -1315,24 +1319,28 @@ static void
+@@ -1323,24 +1327,28 @@ static void
mt7530_port_bridge_leave(struct dsa_switch *ds, int port,
struct net_device *bridge)
{
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
-@@ -2444,6 +2444,32 @@ mt7531_setup(struct dsa_switch *ds)
+@@ -2454,6 +2454,32 @@ mt7531_setup(struct dsa_switch *ds)
return 0;
}
static bool
mt7530_phy_mode_supported(struct dsa_switch *ds, int port,
const struct phylink_link_state *state)
-@@ -2480,6 +2506,37 @@ static bool mt7531_is_rgmii_port(struct
+@@ -2490,6 +2516,37 @@ static bool mt7531_is_rgmii_port(struct
return (port == 5) && (priv->p5_intf_sel != P5_INTF_SEL_GMAC5_SGMII);
}
static bool
mt7531_phy_mode_supported(struct dsa_switch *ds, int port,
const struct phylink_link_state *state)
-@@ -2956,6 +3013,18 @@ mt7531_cpu_port_config(struct dsa_switch
+@@ -2966,6 +3023,18 @@ mt7531_cpu_port_config(struct dsa_switch
return 0;
}
static void
mt7530_mac_port_validate(struct dsa_switch *ds, int port,
unsigned long *supported)
-@@ -3191,6 +3260,7 @@ static const struct dsa_switch_ops mt753
+@@ -3201,6 +3270,7 @@ static const struct dsa_switch_ops mt753
.port_vlan_del = mt7530_port_vlan_del,
.port_mirror_add = mt753x_port_mirror_add,
.port_mirror_del = mt753x_port_mirror_del,
.phylink_validate = mt753x_phylink_validate,
.phylink_mac_link_state = mt753x_phylink_mac_link_state,
.phylink_mac_config = mt753x_phylink_mac_config,
-@@ -3208,6 +3278,7 @@ static const struct mt753x_info mt753x_t
+@@ -3218,6 +3288,7 @@ static const struct mt753x_info mt753x_t
.phy_read = mt7530_phy_read,
.phy_write = mt7530_phy_write,
.pad_setup = mt7530_pad_clk_setup,
.phy_mode_supported = mt7530_phy_mode_supported,
.mac_port_validate = mt7530_mac_port_validate,
.mac_port_get_state = mt7530_phylink_mac_link_state,
-@@ -3219,6 +3290,7 @@ static const struct mt753x_info mt753x_t
+@@ -3229,6 +3300,7 @@ static const struct mt753x_info mt753x_t
.phy_read = mt7530_phy_read,
.phy_write = mt7530_phy_write,
.pad_setup = mt7530_pad_clk_setup,
.phy_mode_supported = mt7530_phy_mode_supported,
.mac_port_validate = mt7530_mac_port_validate,
.mac_port_get_state = mt7530_phylink_mac_link_state,
-@@ -3231,6 +3303,7 @@ static const struct mt753x_info mt753x_t
+@@ -3241,6 +3313,7 @@ static const struct mt753x_info mt753x_t
.phy_write = mt7531_ind_phy_write,
.pad_setup = mt7531_pad_setup,
.cpu_port_config = mt7531_cpu_port_config,
.phy_mode_supported = mt7531_phy_mode_supported,
.mac_port_validate = mt7531_mac_port_validate,
.mac_port_get_state = mt7531_phylink_mac_link_state,
-@@ -3293,6 +3366,7 @@ mt7530_probe(struct mdio_device *mdiodev
+@@ -3303,6 +3376,7 @@ mt7530_probe(struct mdio_device *mdiodev
*/
if (!priv->info->sw_setup || !priv->info->pad_setup ||
!priv->info->phy_read || !priv->info->phy_write ||
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
-@@ -2470,37 +2470,6 @@ static void mt7530_mac_port_get_caps(str
+@@ -2480,37 +2480,6 @@ static void mt7530_mac_port_get_caps(str
}
}
static bool mt7531_is_rgmii_port(struct mt7530_priv *priv, u32 port)
{
return (port == 5) && (priv->p5_intf_sel != P5_INTF_SEL_GMAC5_SGMII);
-@@ -2537,44 +2506,6 @@ static void mt7531_mac_port_get_caps(str
+@@ -2547,44 +2516,6 @@ static void mt7531_mac_port_get_caps(str
}
}
static int
mt753x_pad_setup(struct dsa_switch *ds, const struct phylink_link_state *state)
{
-@@ -2829,9 +2760,6 @@ mt753x_phylink_mac_config(struct dsa_swi
+@@ -2839,9 +2770,6 @@ mt753x_phylink_mac_config(struct dsa_swi
struct mt7530_priv *priv = ds->priv;
u32 mcr_cur, mcr_new;
switch (port) {
case 0 ... 4: /* Internal phy */
if (state->interface != PHY_INTERFACE_MODE_GMII)
-@@ -3047,12 +2975,6 @@ mt753x_phylink_validate(struct dsa_switc
+@@ -3057,12 +2985,6 @@ mt753x_phylink_validate(struct dsa_switc
__ETHTOOL_DECLARE_LINK_MODE_MASK(mask) = { 0, };
struct mt7530_priv *priv = ds->priv;
phylink_set_port_modes(mask);
if (state->interface != PHY_INTERFACE_MODE_TRGMII &&
-@@ -3279,7 +3201,6 @@ static const struct mt753x_info mt753x_t
+@@ -3289,7 +3211,6 @@ static const struct mt753x_info mt753x_t
.phy_write = mt7530_phy_write,
.pad_setup = mt7530_pad_clk_setup,
.mac_port_get_caps = mt7530_mac_port_get_caps,
.mac_port_validate = mt7530_mac_port_validate,
.mac_port_get_state = mt7530_phylink_mac_link_state,
.mac_port_config = mt7530_mac_config,
-@@ -3291,7 +3212,6 @@ static const struct mt753x_info mt753x_t
+@@ -3301,7 +3222,6 @@ static const struct mt753x_info mt753x_t
.phy_write = mt7530_phy_write,
.pad_setup = mt7530_pad_clk_setup,
.mac_port_get_caps = mt7530_mac_port_get_caps,
.mac_port_validate = mt7530_mac_port_validate,
.mac_port_get_state = mt7530_phylink_mac_link_state,
.mac_port_config = mt7530_mac_config,
-@@ -3304,7 +3224,6 @@ static const struct mt753x_info mt753x_t
+@@ -3314,7 +3234,6 @@ static const struct mt753x_info mt753x_t
.pad_setup = mt7531_pad_setup,
.cpu_port_config = mt7531_cpu_port_config,
.mac_port_get_caps = mt7531_mac_port_get_caps,
.mac_port_validate = mt7531_mac_port_validate,
.mac_port_get_state = mt7531_phylink_mac_link_state,
.mac_port_config = mt7531_mac_config,
-@@ -3367,7 +3286,6 @@ mt7530_probe(struct mdio_device *mdiodev
+@@ -3377,7 +3296,6 @@ mt7530_probe(struct mdio_device *mdiodev
if (!priv->info->sw_setup || !priv->info->pad_setup ||
!priv->info->phy_read || !priv->info->phy_write ||
!priv->info->mac_port_get_caps ||
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
-@@ -2999,11 +2999,6 @@ mt753x_phylink_validate(struct dsa_switc
+@@ -3009,11 +3009,6 @@ mt753x_phylink_validate(struct dsa_switc
linkmode_and(supported, supported, mask);
linkmode_and(state->advertising, state->advertising, mask);
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
-@@ -2577,12 +2577,13 @@ static int mt7531_rgmii_setup(struct mt7
+@@ -2587,12 +2587,13 @@ static int mt7531_rgmii_setup(struct mt7
}
static void mt7531_sgmii_validate(struct mt7530_priv *priv, int port,
phylink_set(supported, 2500baseX_Full);
phylink_set(supported, 2500baseT_Full);
}
-@@ -2955,16 +2956,18 @@ static void mt753x_phylink_get_caps(stru
+@@ -2965,16 +2966,18 @@ static void mt753x_phylink_get_caps(stru
static void
mt7530_mac_port_validate(struct dsa_switch *ds, int port,
}
static void
-@@ -2987,12 +2990,13 @@ mt753x_phylink_validate(struct dsa_switc
+@@ -2997,12 +3000,13 @@ mt753x_phylink_validate(struct dsa_switc
}
/* This switch only supports 1G full-duplex. */
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
-@@ -2576,19 +2576,6 @@ static int mt7531_rgmii_setup(struct mt7
+@@ -2586,19 +2586,6 @@ static int mt7531_rgmii_setup(struct mt7
return 0;
}
static void
mt7531_sgmii_link_up_force(struct dsa_switch *ds, int port,
unsigned int mode, phy_interface_t interface,
-@@ -2955,51 +2942,21 @@ static void mt753x_phylink_get_caps(stru
+@@ -2965,51 +2952,21 @@ static void mt753x_phylink_get_caps(stru
}
static void
linkmode_and(supported, supported, mask);
linkmode_and(state->advertising, state->advertising, mask);
-@@ -3200,7 +3157,6 @@ static const struct mt753x_info mt753x_t
+@@ -3210,7 +3167,6 @@ static const struct mt753x_info mt753x_t
.phy_write = mt7530_phy_write,
.pad_setup = mt7530_pad_clk_setup,
.mac_port_get_caps = mt7530_mac_port_get_caps,
.mac_port_get_state = mt7530_phylink_mac_link_state,
.mac_port_config = mt7530_mac_config,
},
-@@ -3211,7 +3167,6 @@ static const struct mt753x_info mt753x_t
+@@ -3221,7 +3177,6 @@ static const struct mt753x_info mt753x_t
.phy_write = mt7530_phy_write,
.pad_setup = mt7530_pad_clk_setup,
.mac_port_get_caps = mt7530_mac_port_get_caps,
.mac_port_get_state = mt7530_phylink_mac_link_state,
.mac_port_config = mt7530_mac_config,
},
-@@ -3223,7 +3178,6 @@ static const struct mt753x_info mt753x_t
+@@ -3233,7 +3188,6 @@ static const struct mt753x_info mt753x_t
.pad_setup = mt7531_pad_setup,
.cpu_port_config = mt7531_cpu_port_config,
.mac_port_get_caps = mt7531_mac_port_get_caps,
.mac_port_get_state = mt7531_phylink_mac_link_state,
.mac_port_config = mt7531_mac_config,
.mac_pcs_an_restart = mt7531_sgmii_restart_an,
-@@ -3285,7 +3239,6 @@ mt7530_probe(struct mdio_device *mdiodev
+@@ -3295,7 +3249,6 @@ mt7530_probe(struct mdio_device *mdiodev
if (!priv->info->sw_setup || !priv->info->pad_setup ||
!priv->info->phy_read || !priv->info->phy_write ||
!priv->info->mac_port_get_caps ||
/* String, offset, and register size in bytes if different from 4 bytes */
static const struct mt7530_mib_desc mt7530_mib[] = {
MIB_DESC(1, 0x00, "TxDrop"),
-@@ -2576,12 +2581,11 @@ static int mt7531_rgmii_setup(struct mt7
+@@ -2586,12 +2591,11 @@ static int mt7531_rgmii_setup(struct mt7
return 0;
}
unsigned int val;
/* For adjusting speed and duplex of SGMII force mode. */
-@@ -2607,6 +2611,9 @@ mt7531_sgmii_link_up_force(struct dsa_sw
+@@ -2617,6 +2621,9 @@ mt7531_sgmii_link_up_force(struct dsa_sw
/* MT7531 SGMII 1G force mode can only work in full duplex mode,
* no matter MT7531_SGMII_FORCE_HALF_DUPLEX is set or not.
*/
if ((speed == SPEED_10 || speed == SPEED_100) &&
duplex != DUPLEX_FULL)
-@@ -2682,9 +2689,10 @@ static int mt7531_sgmii_setup_mode_an(st
+@@ -2692,9 +2699,10 @@ static int mt7531_sgmii_setup_mode_an(st
return 0;
}
u32 val;
/* Only restart AN when AN is enabled */
-@@ -2741,6 +2749,24 @@ mt753x_mac_config(struct dsa_switch *ds,
+@@ -2751,6 +2759,24 @@ mt753x_mac_config(struct dsa_switch *ds,
return priv->info->mac_port_config(ds, port, mode, state->interface);
}
static void
mt753x_phylink_mac_config(struct dsa_switch *ds, int port, unsigned int mode,
const struct phylink_link_state *state)
-@@ -2802,17 +2828,6 @@ unsupported:
+@@ -2812,17 +2838,6 @@ unsupported:
mt7530_write(priv, MT7530_PMCR_P(port), mcr_new);
}
static void mt753x_phylink_mac_link_down(struct dsa_switch *ds, int port,
unsigned int mode,
phy_interface_t interface)
-@@ -2822,16 +2837,13 @@ static void mt753x_phylink_mac_link_down
+@@ -2832,16 +2847,13 @@ static void mt753x_phylink_mac_link_down
mt7530_clear(priv, MT7530_PMCR_P(port), PMCR_LINK_SETTINGS_MASK);
}
}
static void mt753x_phylink_mac_link_up(struct dsa_switch *ds, int port,
-@@ -2844,8 +2856,6 @@ static void mt753x_phylink_mac_link_up(s
+@@ -2854,8 +2866,6 @@ static void mt753x_phylink_mac_link_up(s
struct mt7530_priv *priv = ds->priv;
u32 mcr;
mcr = PMCR_RX_EN | PMCR_TX_EN | PMCR_FORCE_LNK;
/* MT753x MAC works in 1G full duplex mode for all up-clocked
-@@ -2923,6 +2933,8 @@ mt7531_cpu_port_config(struct dsa_switch
+@@ -2933,6 +2943,8 @@ mt7531_cpu_port_config(struct dsa_switch
return ret;
mt7530_write(priv, MT7530_PMCR_P(port),
PMCR_CPU_PORT_SETTING(priv->id));
mt753x_phylink_mac_link_up(ds, port, MLO_AN_FIXED, interface, NULL,
speed, DUPLEX_FULL, true, true);
-@@ -2962,16 +2974,13 @@ mt753x_phylink_validate(struct dsa_switc
+@@ -2972,16 +2984,13 @@ mt753x_phylink_validate(struct dsa_switc
linkmode_and(state->advertising, state->advertising, mask);
}
pmsr = mt7530_read(priv, MT7530_PMSR_P(port));
state->link = (pmsr & PMSR_LINK);
-@@ -2998,8 +3007,6 @@ mt7530_phylink_mac_link_state(struct dsa
+@@ -3008,8 +3017,6 @@ mt7530_phylink_mac_link_state(struct dsa
state->pause |= MLO_PAUSE_RX;
if (pmsr & PMSR_TX_FC)
state->pause |= MLO_PAUSE_TX;
}
static int
-@@ -3041,32 +3048,49 @@ mt7531_sgmii_pcs_get_state_an(struct mt7
+@@ -3051,32 +3058,49 @@ mt7531_sgmii_pcs_get_state_an(struct mt7
return 0;
}
if (ret)
return ret;
-@@ -3079,6 +3103,13 @@ mt753x_setup(struct dsa_switch *ds)
+@@ -3089,6 +3113,13 @@ mt753x_setup(struct dsa_switch *ds)
if (ret && priv->irq)
mt7530_free_irq_common(priv);
return ret;
}
-@@ -3140,9 +3171,8 @@ static const struct dsa_switch_ops mt753
+@@ -3150,9 +3181,8 @@ static const struct dsa_switch_ops mt753
.port_mirror_del = mt753x_port_mirror_del,
.phylink_get_caps = mt753x_phylink_get_caps,
.phylink_validate = mt753x_phylink_validate,
.phylink_mac_link_down = mt753x_phylink_mac_link_down,
.phylink_mac_link_up = mt753x_phylink_mac_link_up,
.get_mac_eee = mt753x_get_mac_eee,
-@@ -3152,36 +3182,34 @@ static const struct dsa_switch_ops mt753
+@@ -3162,36 +3192,34 @@ static const struct dsa_switch_ops mt753
static const struct mt753x_info mt753x_table[] = {
[ID_MT7621] = {
.id = ID_MT7621,
},
};
-@@ -3239,7 +3267,7 @@ mt7530_probe(struct mdio_device *mdiodev
+@@ -3249,7 +3277,7 @@ mt7530_probe(struct mdio_device *mdiodev
if (!priv->info->sw_setup || !priv->info->pad_setup ||
!priv->info->phy_read || !priv->info->phy_write ||
!priv->info->mac_port_get_caps ||
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
-@@ -2953,25 +2953,16 @@ static void mt753x_phylink_get_caps(stru
+@@ -2963,25 +2963,16 @@ static void mt753x_phylink_get_caps(stru
priv->info->mac_port_get_caps(ds, port, config);
}
}
static void mt7530_pcs_get_state(struct phylink_pcs *pcs,
-@@ -3073,12 +3064,14 @@ static void mt7530_pcs_an_restart(struct
+@@ -3083,12 +3074,14 @@ static void mt7530_pcs_an_restart(struct
}
static const struct phylink_pcs_ops mt7530_pcs_ops = {
.pcs_get_state = mt7531_pcs_get_state,
.pcs_config = mt753x_pcs_config,
.pcs_an_restart = mt7531_pcs_an_restart,
-@@ -3170,7 +3163,6 @@ static const struct dsa_switch_ops mt753
+@@ -3180,7 +3173,6 @@ static const struct dsa_switch_ops mt753
.port_mirror_add = mt753x_port_mirror_add,
.port_mirror_del = mt753x_port_mirror_del,
.phylink_get_caps = mt753x_phylink_get_caps,
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
-@@ -2950,6 +2950,12 @@ static void mt753x_phylink_get_caps(stru
+@@ -2960,6 +2960,12 @@ static void mt753x_phylink_get_caps(stru
config->mac_capabilities = MAC_ASYM_PAUSE | MAC_SYM_PAUSE |
MAC_10 | MAC_100 | MAC_1000FD;
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
-@@ -3088,9 +3088,16 @@ static int
+@@ -3098,9 +3098,16 @@ static int
mt753x_setup(struct dsa_switch *ds)
{
struct mt7530_priv *priv = ds->priv;
if (ret)
return ret;
-@@ -3102,13 +3109,6 @@ mt753x_setup(struct dsa_switch *ds)
+@@ -3112,13 +3119,6 @@ mt753x_setup(struct dsa_switch *ds)
if (ret && priv->irq)
mt7530_free_irq_common(priv);
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
-@@ -1536,11 +1536,11 @@ static void
+@@ -1544,11 +1544,11 @@ static void
mt7530_hw_vlan_add(struct mt7530_priv *priv,
struct mt7530_hw_vlan_entry *entry)
{
/* Validate the entry with independent learning, create egress tag per
* VLAN and joining the port as one of the port members.
-@@ -1551,22 +1551,20 @@ mt7530_hw_vlan_add(struct mt7530_priv *p
+@@ -1559,22 +1559,20 @@ mt7530_hw_vlan_add(struct mt7530_priv *p
/* Decide whether adding tag or not for those outgoing packets from the
* port inside the VLAN.
}
static void
-@@ -1585,11 +1583,7 @@ mt7530_hw_vlan_del(struct mt7530_priv *p
+@@ -1593,11 +1591,7 @@ mt7530_hw_vlan_del(struct mt7530_priv *p
return;
}
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
-@@ -1040,6 +1040,7 @@ static int
+@@ -1048,6 +1048,7 @@ static int
mt7530_port_enable(struct dsa_switch *ds, int port,
struct phy_device *phy)
{
struct mt7530_priv *priv = ds->priv;
mutex_lock(&priv->reg_mutex);
-@@ -1048,7 +1049,11 @@ mt7530_port_enable(struct dsa_switch *ds
+@@ -1056,7 +1057,11 @@ mt7530_port_enable(struct dsa_switch *ds
* restore the port matrix if the port is the member of a certain
* bridge.
*/
priv->ports[port].enable = true;
mt7530_rmw(priv, MT7530_PCR_P(port), PCR_MATRIX_MASK,
priv->ports[port].pm);
-@@ -1196,7 +1201,8 @@ mt7530_port_bridge_join(struct dsa_switc
+@@ -1204,7 +1209,8 @@ mt7530_port_bridge_join(struct dsa_switc
struct net_device *bridge)
{
struct dsa_port *dp = dsa_to_port(ds, port), *other_dp;
struct mt7530_priv *priv = ds->priv;
mutex_lock(&priv->reg_mutex);
-@@ -1273,9 +1279,12 @@ mt7530_port_set_vlan_unaware(struct dsa_
+@@ -1281,9 +1287,12 @@ mt7530_port_set_vlan_unaware(struct dsa_
* the CPU port get out of VLAN filtering mode.
*/
if (all_user_ports_removed) {
| PVC_EG_TAG(MT7530_VLAN_EG_CONSISTENT));
}
}
-@@ -1325,6 +1334,7 @@ mt7530_port_bridge_leave(struct dsa_swit
+@@ -1333,6 +1342,7 @@ mt7530_port_bridge_leave(struct dsa_swit
struct net_device *bridge)
{
struct dsa_port *dp = dsa_to_port(ds, port), *other_dp;
struct mt7530_priv *priv = ds->priv;
mutex_lock(&priv->reg_mutex);
-@@ -1353,8 +1363,8 @@ mt7530_port_bridge_leave(struct dsa_swit
+@@ -1361,8 +1371,8 @@ mt7530_port_bridge_leave(struct dsa_swit
*/
if (priv->ports[port].enable)
mt7530_rmw(priv, MT7530_PCR_P(port), PCR_MATRIX_MASK,
/* When a port is removed from the bridge, the port would be set up
* back to the default as is at initial boot which is a VLAN-unaware
-@@ -1517,6 +1527,9 @@ static int
+@@ -1525,6 +1535,9 @@ static int
mt7530_port_vlan_filtering(struct dsa_switch *ds, int port, bool vlan_filtering,
struct netlink_ext_ack *extack)
{
if (vlan_filtering) {
/* The port is being kept as VLAN-unaware port when bridge is
* set up with vlan_filtering not being set, Otherwise, the
-@@ -1524,7 +1537,7 @@ mt7530_port_vlan_filtering(struct dsa_sw
+@@ -1532,7 +1545,7 @@ mt7530_port_vlan_filtering(struct dsa_sw
* for becoming a VLAN-aware port.
*/
mt7530_port_set_vlan_aware(ds, port);
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
-@@ -2736,9 +2736,6 @@ mt7531_mac_config(struct dsa_switch *ds,
+@@ -2746,9 +2746,6 @@ mt7531_mac_config(struct dsa_switch *ds,
case PHY_INTERFACE_MODE_NA:
case PHY_INTERFACE_MODE_1000BASEX:
case PHY_INTERFACE_MODE_2500BASEX:
return mt7531_sgmii_setup_mode_force(priv, port, interface);
default:
return -EINVAL;
-@@ -2814,13 +2811,6 @@ unsupported:
+@@ -2824,13 +2821,6 @@ unsupported:
return;
}
mcr_cur = mt7530_read(priv, MT7530_PMCR_P(port));
mcr_new = mcr_cur;
mcr_new &= ~PMCR_LINK_SETTINGS_MASK;
-@@ -2957,6 +2947,9 @@ static void mt753x_phylink_get_caps(stru
+@@ -2967,6 +2957,9 @@ static void mt753x_phylink_get_caps(stru
config->mac_capabilities = MAC_ASYM_PAUSE | MAC_SYM_PAUSE |
MAC_10 | MAC_100 | MAC_1000FD;
/* This driver does not make use of the speed, duplex, pause or the
* advertisement in its mac_config, so it is safe to mark this driver
* as non-legacy.
-@@ -3022,6 +3015,7 @@ mt7531_sgmii_pcs_get_state_an(struct mt7
+@@ -3032,6 +3025,7 @@ mt7531_sgmii_pcs_get_state_an(struct mt7
status = mt7530_read(priv, MT7531_PCS_CONTROL_1(port));
state->link = !!(status & MT7531_SGMII_LINK_STATUS);
if (state->interface == PHY_INTERFACE_MODE_SGMII &&
(status & MT7531_SGMII_AN_ENABLE)) {
val = mt7530_read(priv, MT7531_PCS_SPEED_ABILITY(port));
-@@ -3052,16 +3046,44 @@ mt7531_sgmii_pcs_get_state_an(struct mt7
+@@ -3062,16 +3056,44 @@ mt7531_sgmii_pcs_get_state_an(struct mt7
return 0;
}
}
static int mt753x_pcs_config(struct phylink_pcs *pcs, unsigned int mode,
-@@ -3102,6 +3124,8 @@ mt753x_setup(struct dsa_switch *ds)
+@@ -3112,6 +3134,8 @@ mt753x_setup(struct dsa_switch *ds)
priv->pcs[i].pcs.ops = priv->info->pcs_ops;
priv->pcs[i].priv = priv;
priv->pcs[i].port = i;
#include <linux/phylink.h>
#include <linux/regmap.h>
#include <linux/regulator/consumer.h>
-@@ -2588,128 +2589,11 @@ static int mt7531_rgmii_setup(struct mt7
+@@ -2598,128 +2599,11 @@ static int mt7531_rgmii_setup(struct mt7
return 0;
}
static int
mt7531_mac_config(struct dsa_switch *ds, int port, unsigned int mode,
phy_interface_t interface)
-@@ -2732,11 +2616,11 @@ mt7531_mac_config(struct dsa_switch *ds,
+@@ -2742,11 +2626,11 @@ mt7531_mac_config(struct dsa_switch *ds,
phydev = dp->slave->phydev;
return mt7531_rgmii_setup(priv, port, interface, phydev);
case PHY_INTERFACE_MODE_SGMII:
default:
return -EINVAL;
}
-@@ -2761,11 +2645,11 @@ mt753x_phylink_mac_select_pcs(struct dsa
+@@ -2771,11 +2655,11 @@ mt753x_phylink_mac_select_pcs(struct dsa
switch (interface) {
case PHY_INTERFACE_MODE_TRGMII:
default:
return NULL;
}
-@@ -3006,86 +2890,6 @@ static void mt7530_pcs_get_state(struct
+@@ -3016,86 +2900,6 @@ static void mt7530_pcs_get_state(struct
state->pause |= MLO_PAUSE_TX;
}
static int mt753x_pcs_config(struct phylink_pcs *pcs, unsigned int mode,
phy_interface_t interface,
const unsigned long *advertising,
-@@ -3105,18 +2909,57 @@ static const struct phylink_pcs_ops mt75
+@@ -3115,18 +2919,57 @@ static const struct phylink_pcs_ops mt75
.pcs_an_restart = mt7530_pcs_an_restart,
};
int i, ret;
/* Initialise the PCS devices */
-@@ -3124,8 +2967,6 @@ mt753x_setup(struct dsa_switch *ds)
+@@ -3134,8 +2977,6 @@ mt753x_setup(struct dsa_switch *ds)
priv->pcs[i].pcs.ops = priv->info->pcs_ops;
priv->pcs[i].priv = priv;
priv->pcs[i].port = i;
}
ret = priv->info->sw_setup(ds);
-@@ -3140,6 +2981,16 @@ mt753x_setup(struct dsa_switch *ds)
+@@ -3150,6 +2991,16 @@ mt753x_setup(struct dsa_switch *ds)
if (ret && priv->irq)
mt7530_free_irq_common(priv);
return ret;
}
-@@ -3231,7 +3082,7 @@ static const struct mt753x_info mt753x_t
+@@ -3241,7 +3092,7 @@ static const struct mt753x_info mt753x_t
},
[ID_MT7531] = {
.id = ID_MT7531,
.sw_setup = mt7531_setup,
.phy_read = mt7531_ind_phy_read,
.phy_write = mt7531_ind_phy_write,
-@@ -3339,7 +3190,7 @@ static void
+@@ -3349,7 +3200,7 @@ static void
mt7530_remove(struct mdio_device *mdiodev)
{
struct mt7530_priv *priv = dev_get_drvdata(&mdiodev->dev);
if (!priv)
return;
-@@ -3358,6 +3209,10 @@ mt7530_remove(struct mdio_device *mdiode
+@@ -3368,6 +3219,10 @@ mt7530_remove(struct mdio_device *mdiode
mt7530_free_irq(priv);
dsa_unregister_switch(priv->ds);
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
-@@ -2941,26 +2941,56 @@ static const struct regmap_bus mt7531_re
+@@ -2951,26 +2951,56 @@ static const struct regmap_bus mt7531_re
.reg_update_bits = mt7530_regmap_update_bits,
};
int i, ret;
/* Initialise the PCS devices */
-@@ -2982,15 +3012,11 @@ mt753x_setup(struct dsa_switch *ds)
+@@ -2992,15 +3022,11 @@ mt753x_setup(struct dsa_switch *ds)
if (ret && priv->irq)
mt7530_free_irq_common(priv);
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
-@@ -2914,7 +2914,7 @@ static int mt7530_regmap_read(void *cont
+@@ -2924,7 +2924,7 @@ static int mt7530_regmap_read(void *cont
{
struct mt7530_priv *priv = context;
return 0;
};
-@@ -2922,23 +2922,25 @@ static int mt7530_regmap_write(void *con
+@@ -2932,23 +2932,25 @@ static int mt7530_regmap_write(void *con
{
struct mt7530_priv *priv = context;
};
static int
-@@ -2964,6 +2966,9 @@ mt7531_create_sgmii(struct mt7530_priv *
+@@ -2974,6 +2976,9 @@ mt7531_create_sgmii(struct mt7530_priv *
mt7531_pcs_config[i]->reg_stride = 4;
mt7531_pcs_config[i]->reg_base = MT7531_SGMII_REG_BASE(5 + i);
mt7531_pcs_config[i]->max_register = 0x17c;
}
static void
-@@ -2910,22 +2931,6 @@ static const struct phylink_pcs_ops mt75
+@@ -2920,22 +2941,6 @@ static const struct phylink_pcs_ops mt75
.pcs_an_restart = mt7530_pcs_an_restart,
};
static void
mt7530_mdio_regmap_lock(void *mdio_lock)
{
-@@ -2938,7 +2943,7 @@ mt7530_mdio_regmap_unlock(void *mdio_loc
+@@ -2948,7 +2953,7 @@ mt7530_mdio_regmap_unlock(void *mdio_loc
mutex_unlock(mdio_lock);
}
.reg_write = mt7530_regmap_write,
.reg_read = mt7530_regmap_read,
};
-@@ -2971,7 +2976,7 @@ mt7531_create_sgmii(struct mt7530_priv *
+@@ -2981,7 +2986,7 @@ mt7531_create_sgmii(struct mt7530_priv *
mt7531_pcs_config[i]->lock_arg = &priv->bus->mdio_lock;
regmap = devm_regmap_init(priv->dev,
mt7531_pcs_config[i]);
if (IS_ERR(regmap)) {
ret = PTR_ERR(regmap);
-@@ -3136,6 +3141,7 @@ MODULE_DEVICE_TABLE(of, mt7530_of_match)
+@@ -3146,6 +3151,7 @@ MODULE_DEVICE_TABLE(of, mt7530_of_match)
static int
mt7530_probe(struct mdio_device *mdiodev)
{
struct mt7530_priv *priv;
struct device_node *dn;
-@@ -3215,6 +3221,21 @@ mt7530_probe(struct mdio_device *mdiodev
+@@ -3225,6 +3231,21 @@ mt7530_probe(struct mdio_device *mdiodev
mutex_init(&priv->reg_mutex);
dev_set_drvdata(&mdiodev->dev, priv);
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
-@@ -3022,12 +3022,6 @@ mt753x_setup(struct dsa_switch *ds)
+@@ -3032,12 +3032,6 @@ mt753x_setup(struct dsa_switch *ds)
if (ret && priv->irq)
mt7530_free_irq_common(priv);
return ret;
}
-@@ -3144,6 +3138,7 @@ mt7530_probe(struct mdio_device *mdiodev
+@@ -3154,6 +3148,7 @@ mt7530_probe(struct mdio_device *mdiodev
static struct regmap_config *regmap_config;
struct mt7530_priv *priv;
struct device_node *dn;
dn = mdiodev->dev.of_node;
-@@ -3236,6 +3231,12 @@ mt7530_probe(struct mdio_device *mdiodev
+@@ -3246,6 +3241,12 @@ mt7530_probe(struct mdio_device *mdiodev
if (IS_ERR(priv->regmap))
return PTR_ERR(priv->regmap);
return ret;
}
-@@ -1109,7 +1109,6 @@ static int
+@@ -1117,7 +1117,6 @@ static int
mt7530_port_change_mtu(struct dsa_switch *ds, int port, int new_mtu)
{
struct mt7530_priv *priv = ds->priv;
int length;
u32 val;
-@@ -1120,7 +1119,7 @@ mt7530_port_change_mtu(struct dsa_switch
+@@ -1128,7 +1127,7 @@ mt7530_port_change_mtu(struct dsa_switch
if (!dsa_is_cpu_port(ds, port))
return 0;
val = mt7530_mii_read(priv, MT7530_GMACCR);
val &= ~MAX_RX_PKT_LEN_MASK;
-@@ -1141,7 +1140,7 @@ mt7530_port_change_mtu(struct dsa_switch
+@@ -1149,7 +1148,7 @@ mt7530_port_change_mtu(struct dsa_switch
mt7530_mii_write(priv, MT7530_GMACCR, val);
return 0;
}
-@@ -1937,10 +1936,10 @@ mt7530_irq_thread_fn(int irq, void *dev_
+@@ -1945,10 +1944,10 @@ mt7530_irq_thread_fn(int irq, void *dev_
u32 val;
int p;
for (p = 0; p < MT7530_NUM_PHYS; p++) {
if (BIT(p) & val) {
-@@ -1976,7 +1975,7 @@ mt7530_irq_bus_lock(struct irq_data *d)
+@@ -1984,7 +1983,7 @@ mt7530_irq_bus_lock(struct irq_data *d)
{
struct mt7530_priv *priv = irq_data_get_irq_chip_data(d);
}
static void
-@@ -1985,7 +1984,7 @@ mt7530_irq_bus_sync_unlock(struct irq_da
+@@ -1993,7 +1992,7 @@ mt7530_irq_bus_sync_unlock(struct irq_da
struct mt7530_priv *priv = irq_data_get_irq_chip_data(d);
mt7530_mii_write(priv, MT7530_SYS_INT_EN, priv->irq_enable);
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
-@@ -3150,44 +3150,21 @@ static const struct of_device_id mt7530_
+@@ -3160,44 +3160,21 @@ static const struct of_device_id mt7530_
MODULE_DEVICE_TABLE(of, mt7530_of_match);
static int
if (!priv->info)
return -EINVAL;
-@@ -3201,23 +3178,53 @@ mt7530_probe(struct mdio_device *mdiodev
+@@ -3211,23 +3188,53 @@ mt7530_probe(struct mdio_device *mdiodev
return -EINVAL;
priv->id = priv->info->id;
priv->reset = devm_gpiod_get_optional(&mdiodev->dev, "reset",
GPIOD_OUT_LOW);
if (IS_ERR(priv->reset)) {
-@@ -3226,12 +3233,15 @@ mt7530_probe(struct mdio_device *mdiodev
+@@ -3236,12 +3243,15 @@ mt7530_probe(struct mdio_device *mdiodev
}
}
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
-@@ -3268,6 +3268,17 @@ mt7530_probe(struct mdio_device *mdiodev
+@@ -3278,6 +3278,17 @@ mt7530_probe(struct mdio_device *mdiodev
}
static void
mt7530_remove(struct mdio_device *mdiodev)
{
struct mt7530_priv *priv = dev_get_drvdata(&mdiodev->dev);
-@@ -3286,16 +3297,11 @@ mt7530_remove(struct mdio_device *mdiode
+@@ -3296,16 +3307,11 @@ mt7530_remove(struct mdio_device *mdiode
dev_err(priv->dev, "Failed to disable io pwr: %d\n",
ret);
static u32
mt7530_mii_read(struct mt7530_priv *priv, u32 reg)
{
-@@ -2948,72 +2899,6 @@ static const struct phylink_pcs_ops mt75
+@@ -2958,72 +2909,6 @@ static const struct phylink_pcs_ops mt75
.pcs_an_restart = mt7530_pcs_an_restart,
};
static int
mt753x_setup(struct dsa_switch *ds)
{
-@@ -3072,7 +2957,7 @@ static int mt753x_set_mac_eee(struct dsa
+@@ -3082,7 +2967,7 @@ static int mt753x_set_mac_eee(struct dsa
return 0;
}
.get_tag_protocol = mtk_get_tag_protocol,
.setup = mt753x_setup,
.get_strings = mt7530_get_strings,
-@@ -3106,8 +2991,9 @@ static const struct dsa_switch_ops mt753
+@@ -3116,8 +3001,9 @@ static const struct dsa_switch_ops mt753
.get_mac_eee = mt753x_get_mac_eee,
.set_mac_eee = mt753x_set_mac_eee,
};
[ID_MT7621] = {
.id = ID_MT7621,
.pcs_ops = &mt7530_pcs_ops,
-@@ -3140,16 +3026,9 @@ static const struct mt753x_info mt753x_t
+@@ -3150,16 +3036,9 @@ static const struct mt753x_info mt753x_t
.mac_port_config = mt7531_mac_config,
},
};
mt7530_probe_common(struct mt7530_priv *priv)
{
struct device *dev = priv->dev;
-@@ -3186,88 +3065,9 @@ mt7530_probe_common(struct mt7530_priv *
+@@ -3196,88 +3075,9 @@ mt7530_probe_common(struct mt7530_priv *
return 0;
}
mt7530_remove_common(struct mt7530_priv *priv)
{
if (priv->irq)
-@@ -3278,57 +3078,6 @@ mt7530_remove_common(struct mt7530_priv
+@@ -3288,57 +3088,6 @@ mt7530_remove_common(struct mt7530_priv
mutex_destroy(&priv->reg_mutex);
}
+MODULE_LICENSE("GPL");
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
-@@ -1984,6 +1984,47 @@ static const struct irq_domain_ops mt753
+@@ -1992,6 +1992,47 @@ static const struct irq_domain_ops mt753
};
static void
mt7530_setup_mdio_irq(struct mt7530_priv *priv)
{
struct dsa_switch *ds = priv->ds;
-@@ -2017,8 +2058,15 @@ mt7530_setup_irq(struct mt7530_priv *pri
+@@ -2025,8 +2066,15 @@ mt7530_setup_irq(struct mt7530_priv *pri
return priv->irq ? : -EINVAL;
}
if (!priv->irq_domain) {
dev_err(dev, "failed to create IRQ domain\n");
return -ENOMEM;
-@@ -2511,6 +2559,25 @@ static void mt7531_mac_port_get_caps(str
+@@ -2521,6 +2569,25 @@ static void mt7531_mac_port_get_caps(str
}
}
static int
mt753x_pad_setup(struct dsa_switch *ds, const struct phylink_link_state *state)
{
-@@ -2587,6 +2654,17 @@ static bool mt753x_is_mac_port(u32 port)
+@@ -2597,6 +2664,17 @@ static bool mt753x_is_mac_port(u32 port)
}
static int
mt7531_mac_config(struct dsa_switch *ds, int port, unsigned int mode,
phy_interface_t interface)
{
-@@ -2656,7 +2734,8 @@ mt753x_phylink_mac_config(struct dsa_swi
+@@ -2666,7 +2744,8 @@ mt753x_phylink_mac_config(struct dsa_swi
switch (port) {
case 0 ... 4: /* Internal phy */
goto unsupported;
break;
case 5: /* 2nd cpu port with phy of port 0 or 4 / external phy */
-@@ -2734,7 +2813,8 @@ static void mt753x_phylink_mac_link_up(s
+@@ -2744,7 +2823,8 @@ static void mt753x_phylink_mac_link_up(s
/* MT753x MAC works in 1G full duplex mode for all up-clocked
* variants.
*/
(phy_interface_mode_is_8023z(interface))) {
speed = SPEED_1000;
duplex = DUPLEX_FULL;
-@@ -2814,6 +2894,21 @@ mt7531_cpu_port_config(struct dsa_switch
+@@ -2824,6 +2904,21 @@ mt7531_cpu_port_config(struct dsa_switch
return 0;
}
static void mt753x_phylink_get_caps(struct dsa_switch *ds, int port,
struct phylink_config *config)
{
-@@ -2959,6 +3054,27 @@ static int mt753x_set_mac_eee(struct dsa
+@@ -2969,6 +3064,27 @@ static int mt753x_set_mac_eee(struct dsa
return 0;
}
const struct dsa_switch_ops mt7530_switch_ops = {
.get_tag_protocol = mtk_get_tag_protocol,
.setup = mt753x_setup,
-@@ -3027,6 +3143,17 @@ const struct mt753x_info mt753x_table[]
+@@ -3037,6 +3153,17 @@ const struct mt753x_info mt753x_table[]
.mac_port_get_caps = mt7531_mac_port_get_caps,
.mac_port_config = mt7531_mac_config,
},
}
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
-@@ -3021,6 +3021,12 @@ mt753x_setup(struct dsa_switch *ds)
+@@ -3031,6 +3031,12 @@ mt753x_setup(struct dsa_switch *ds)
if (ret && priv->irq)
mt7530_free_irq_common(priv);
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
-@@ -2412,7 +2412,7 @@ mt7531_setup(struct dsa_switch *ds)
+@@ -2422,7 +2422,7 @@ mt7531_setup(struct dsa_switch *ds)
struct mt7530_priv *priv = ds->priv;
struct mt7530_dummy_poll p;
u32 val, id;
/* Reset whole chip through gpio pin or memory-mapped registers for
* different type of hardware
-@@ -2444,6 +2444,10 @@ mt7531_setup(struct dsa_switch *ds)
+@@ -2454,6 +2454,10 @@ mt7531_setup(struct dsa_switch *ds)
return -ENODEV;
}
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
-@@ -2121,10 +2121,13 @@ mt7530_setup_mdio(struct mt7530_priv *pr
+@@ -2129,10 +2129,13 @@ mt7530_setup_mdio(struct mt7530_priv *pr
{
struct dsa_switch *ds = priv->ds;
struct device *dev = priv->dev;
bus = devm_mdiobus_alloc(dev);
if (!bus)
return -ENOMEM;
-@@ -2141,7 +2144,9 @@ mt7530_setup_mdio(struct mt7530_priv *pr
+@@ -2149,7 +2152,9 @@ mt7530_setup_mdio(struct mt7530_priv *pr
if (priv->irq)
mt7530_setup_mdio_irq(priv);