]> Git Repo - linux.git/blobdiff - net/dsa/dsa2.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
[linux.git] / net / dsa / dsa2.c
index b80dbd02e154d3ab7049045df0468835daea9f62..12145c8529025775127539af4c129ac3a7f9ec03 100644 (file)
@@ -855,6 +855,14 @@ disconnect:
        return err;
 }
 
+static void dsa_switch_teardown_tag_protocol(struct dsa_switch *ds)
+{
+       const struct dsa_device_ops *tag_ops = ds->dst->tag_ops;
+
+       if (tag_ops->disconnect)
+               tag_ops->disconnect(ds);
+}
+
 static int dsa_switch_setup(struct dsa_switch *ds)
 {
        struct dsa_devlink_priv *dl_priv;
@@ -944,6 +952,8 @@ static void dsa_switch_teardown(struct dsa_switch *ds)
                ds->slave_mii_bus = NULL;
        }
 
+       dsa_switch_teardown_tag_protocol(ds);
+
        if (ds->ops->teardown)
                ds->ops->teardown(ds);
 
This page took 0.033456 seconds and 4 git commands to generate.