generic: 6.1: sync mt7530 DSA driver with upstream
[openwrt/staging/stintel.git] / target / linux / generic / backport-6.1 / 790-17-v6.5-net-dsa-mt7530-update-PCS-driver-to-use-neg_mode.patch
1 From fb6858e2c3b931433ea4d25871c272ee4c01bd99 Mon Sep 17 00:00:00 2001
2 From: "Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>
3 Date: Fri, 16 Jun 2023 13:07:29 +0100
4 Subject: [PATCH 17/48] net: dsa: mt7530: update PCS driver to use neg_mode
5
6 Update mt7530's embedded PCS driver to use neg_mode, even though it
7 makes no use of it or the "mode" argument. This makes the driver
8 consistent with converted drivers.
9
10 Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
11 Link: https://lore.kernel.org/r/E1qA8Ej-00EaGR-Fk@rmk-PC.armlinux.org.uk
12 Signed-off-by: Jakub Kicinski <kuba@kernel.org>
13 ---
14 drivers/net/dsa/mt7530.c | 3 ++-
15 1 file changed, 2 insertions(+), 1 deletion(-)
16
17 --- a/drivers/net/dsa/mt7530.c
18 +++ b/drivers/net/dsa/mt7530.c
19 @@ -3036,7 +3036,7 @@ static void mt7530_pcs_get_state(struct
20 state->pause |= MLO_PAUSE_TX;
21 }
22
23 -static int mt753x_pcs_config(struct phylink_pcs *pcs, unsigned int mode,
24 +static int mt753x_pcs_config(struct phylink_pcs *pcs, unsigned int neg_mode,
25 phy_interface_t interface,
26 const unsigned long *advertising,
27 bool permit_pause_to_mac)
28 @@ -3064,6 +3064,7 @@ mt753x_setup(struct dsa_switch *ds)
29 /* Initialise the PCS devices */
30 for (i = 0; i < priv->ds->num_ports; i++) {
31 priv->pcs[i].pcs.ops = priv->info->pcs_ops;
32 + priv->pcs[i].pcs.neg_mode = true;
33 priv->pcs[i].priv = priv;
34 priv->pcs[i].port = i;
35 }