mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-22 06:41:39 +00:00
net: dsa: use dedicated CPU port
Each port in DSA has its own dedicated CPU port currently available in its parent switch's ds->ports[port].cpu_dp. Use it instead of getting the unique tree CPU port, which will be deprecated soon. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
6e617de84e
commit
0abfd494de
5 changed files with 9 additions and 9 deletions
|
@ -506,7 +506,7 @@ qca8k_setup(struct dsa_switch *ds)
|
|||
pr_warn("regmap initialization failed");
|
||||
|
||||
/* Initialize CPU port pad mode (xMII type, delays...) */
|
||||
phy_mode = of_get_phy_mode(ds->dst->cpu_dp->dn);
|
||||
phy_mode = of_get_phy_mode(ds->ports[QCA8K_CPU_PORT].dn);
|
||||
if (phy_mode < 0) {
|
||||
pr_err("Can't find phy-mode for master device\n");
|
||||
return phy_mode;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue