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 <davem@davemloft.net>
This commit is contained in:
commit
f2aea90d0b
@ -164,6 +164,7 @@ int ocelot_port_devlink_init(struct ocelot *ocelot, int port,
|
||||
struct devlink *dl = ocelot->devlink;
|
||||
struct devlink_port_attrs attrs = {};
|
||||
|
||||
memset(dlp, 0, sizeof(*dlp));
|
||||
memcpy(attrs.switch_id.id, &ocelot->base_mac, id_len);
|
||||
attrs.switch_id.id_len = id_len;
|
||||
attrs.phys.port_number = port;
|
||||
|
@ -978,14 +978,15 @@ static int mscc_ocelot_init_ports(struct platform_device *pdev,
|
||||
of_node_put(portnp);
|
||||
goto out_teardown;
|
||||
}
|
||||
devlink_ports_registered |= BIT(port);
|
||||
|
||||
err = ocelot_probe_port(ocelot, port, target, portnp);
|
||||
if (err) {
|
||||
of_node_put(portnp);
|
||||
goto out_teardown;
|
||||
ocelot_port_devlink_teardown(ocelot, port);
|
||||
continue;
|
||||
}
|
||||
|
||||
devlink_ports_registered |= BIT(port);
|
||||
|
||||
ocelot_port = ocelot->ports[port];
|
||||
priv = container_of(ocelot_port, struct ocelot_port_private,
|
||||
port);
|
||||
|
Loading…
Reference in New Issue
Block a user