diff options
author | David S. Miller <davem@davemloft.net> | 2020-09-18 13:52:34 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-09-18 13:52:34 -0700 |
commit | 2b33b202dc3e30a15d7c0147f26fc6bb23f85493 (patch) | |
tree | b0fc2f9e06094d458c05a7017ea47408350fa271 /drivers/net/dsa/ocelot/felix.c | |
parent | 5f6857e808a8bd078296575b417c4b9d160b9779 (diff) | |
parent | e5fb512d81d021b7c7a0c2547c3dafb9de759285 (diff) |
Merge branch 'Bugfixes-in-Microsemi-Ocelot-switch-driver'
Vladimir Oltean says:
====================
Bugfixes in Microsemi Ocelot switch driver
This is a series of 8 assorted patches for "net", on the drivers for the
VSC7514 MIPS switch (Ocelot-1), the VSC9953 PowerPC (Seville), and a few
more that are common to all supported devices since they are in the
common library portion.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/ocelot/felix.c')
-rw-r--r-- | drivers/net/dsa/ocelot/felix.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/net/dsa/ocelot/felix.c b/drivers/net/dsa/ocelot/felix.c index 04bfa6e465ff..01427cd08448 100644 --- a/drivers/net/dsa/ocelot/felix.c +++ b/drivers/net/dsa/ocelot/felix.c @@ -585,7 +585,10 @@ static int felix_setup(struct dsa_switch *ds) if (err) return err; - ocelot_init(ocelot); + err = ocelot_init(ocelot); + if (err) + return err; + if (ocelot->ptp) { err = ocelot_init_timestamp(ocelot, &ocelot_ptp_clock_info); if (err) { @@ -640,10 +643,13 @@ static void felix_teardown(struct dsa_switch *ds) { struct ocelot *ocelot = ds->priv; struct felix *felix = ocelot_to_felix(ocelot); + int port; if (felix->info->mdio_bus_free) felix->info->mdio_bus_free(ocelot); + for (port = 0; port < ocelot->num_phys_ports; port++) + ocelot_deinit_port(ocelot, port); ocelot_deinit_timestamp(ocelot); /* stop workqueue thread */ ocelot_deinit(ocelot); |