]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
net: macb: update PCS driver to use neg_mode
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Fri, 16 Jun 2023 12:07:34 +0000 (13:07 +0100)
committerJakub Kicinski <kuba@kernel.org>
Fri, 23 Jun 2023 02:41:02 +0000 (19:41 -0700)
Update macb's embedded PCS drivers to use neg_mode, even though it
makes no use of it or the "mode" argument. This makes the driver
consistent with converted drivers.

Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Link: https://lore.kernel.org/r/E1qA8Eo-00EaGX-KJ@rmk-PC.armlinux.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/cadence/macb_main.c

index 2e35e200fdcb2dc5cedf839aa69a2296b73f5ffb..f6a0f12a6d520f7c20eae01b6c39cc64faf22553 100644 (file)
@@ -563,7 +563,7 @@ static void macb_set_tx_clk(struct macb *bp, int speed)
                netdev_err(bp->dev, "adjusting tx_clk failed.\n");
 }
 
-static void macb_usx_pcs_link_up(struct phylink_pcs *pcs, unsigned int mode,
+static void macb_usx_pcs_link_up(struct phylink_pcs *pcs, unsigned int neg_mode,
                                 phy_interface_t interface, int speed,
                                 int duplex)
 {
@@ -596,7 +596,7 @@ static void macb_usx_pcs_get_state(struct phylink_pcs *pcs,
 }
 
 static int macb_usx_pcs_config(struct phylink_pcs *pcs,
-                              unsigned int mode,
+                              unsigned int neg_mode,
                               phy_interface_t interface,
                               const unsigned long *advertising,
                               bool permit_pause_to_mac)
@@ -621,7 +621,7 @@ static void macb_pcs_an_restart(struct phylink_pcs *pcs)
 }
 
 static int macb_pcs_config(struct phylink_pcs *pcs,
-                          unsigned int mode,
+                          unsigned int neg_mode,
                           phy_interface_t interface,
                           const unsigned long *advertising,
                           bool permit_pause_to_mac)
@@ -862,7 +862,9 @@ static int macb_mii_probe(struct net_device *dev)
        struct macb *bp = netdev_priv(dev);
 
        bp->phylink_sgmii_pcs.ops = &macb_phylink_pcs_ops;
+       bp->phylink_sgmii_pcs.neg_mode = true;
        bp->phylink_usx_pcs.ops = &macb_phylink_usx_pcs_ops;
+       bp->phylink_usx_pcs.neg_mode = true;
 
        bp->phylink_config.dev = &dev->dev;
        bp->phylink_config.type = PHYLINK_NETDEV;