Skip to content

Commit f2aea90

Browse files
committed
Merge branch 'ocelot-phylink-fixes'
Vladimir Oltean says: ==================== Ocelot phylink fixes This series addresses a regression reported by Horatiu which introduced by the ocelot conversion to phylink: there are broken device trees in the wild, and the driver fails to probe the entire switch when a port fails to probe, which it previously did not do. Continue probing even when some ports fail to initialize properly. ==================== Signed-off-by: David S. Miller <[email protected]>
2 parents 42edc1f + 5c8bb71 commit f2aea90

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

drivers/net/ethernet/mscc/ocelot_net.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ int ocelot_port_devlink_init(struct ocelot *ocelot, int port,
164164
struct devlink *dl = ocelot->devlink;
165165
struct devlink_port_attrs attrs = {};
166166

167+
memset(dlp, 0, sizeof(*dlp));
167168
memcpy(attrs.switch_id.id, &ocelot->base_mac, id_len);
168169
attrs.switch_id.id_len = id_len;
169170
attrs.phys.port_number = port;

drivers/net/ethernet/mscc/ocelot_vsc7514.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -978,14 +978,15 @@ static int mscc_ocelot_init_ports(struct platform_device *pdev,
978978
of_node_put(portnp);
979979
goto out_teardown;
980980
}
981-
devlink_ports_registered |= BIT(port);
982981

983982
err = ocelot_probe_port(ocelot, port, target, portnp);
984983
if (err) {
985-
of_node_put(portnp);
986-
goto out_teardown;
984+
ocelot_port_devlink_teardown(ocelot, port);
985+
continue;
987986
}
988987

988+
devlink_ports_registered |= BIT(port);
989+
989990
ocelot_port = ocelot->ports[port];
990991
priv = container_of(ocelot_port, struct ocelot_port_private,
991992
port);

0 commit comments

Comments
 (0)