lkml.org 
[lkml]   [2022]   [Dec]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH net-next v5 5/6] dsa: lan9303: Determine CPU port based on dsa_switch ptr
Date
In preparing to move the adjust_link logic into the phylink_mac_link_up
api, change the macro used to check for the cpu port.

Signed-off-by: Jerry Ray <jerry.ray@microchip.com>
---
drivers/net/dsa/lan9303-core.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/net/dsa/lan9303-core.c b/drivers/net/dsa/lan9303-core.c
index 694249aa1f19..1d22e4b74308 100644
--- a/drivers/net/dsa/lan9303-core.c
+++ b/drivers/net/dsa/lan9303-core.c
@@ -1064,7 +1064,11 @@ static void lan9303_adjust_link(struct dsa_switch *ds, int port,
struct lan9303 *chip = ds->priv;
int ctl;

- if (!phy_is_pseudo_fixed_link(phydev))
+ /* On this device, we are only interested in doing something here if
+ * this is the CPU port. All other ports are 10/100 phys using MDIO
+ * to control there link settings.
+ */
+ if (!dsa_is_cpu_port(ds, port))
return;

ctl = lan9303_phy_read(ds, port, MII_BMCR);
--
2.17.1
\
 
 \ /
  Last update: 2022-12-09 23:48    [W:0.078 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site