Commit f2aea90d authored by David S. Miller's avatar David S. Miller
Browse files

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: default avatarDavid S. Miller <davem@davemloft.net>
parents 42edc1fc 5c8bb71d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;
+4 −3
Original line number Diff line number Diff line
@@ -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);