|
@@ -433,16 +433,17 @@ static int dsa_dst_apply(struct dsa_switch_tree *dst)
|
|
return err;
|
|
return err;
|
|
}
|
|
}
|
|
|
|
|
|
- err = dsa_cpu_port_ethtool_setup(dst->cpu_dp);
|
|
|
|
- if (err)
|
|
|
|
- return err;
|
|
|
|
-
|
|
|
|
/* If we use a tagging format that doesn't have an ethertype
|
|
/* If we use a tagging format that doesn't have an ethertype
|
|
* field, make sure that all packets from this point on get
|
|
* field, make sure that all packets from this point on get
|
|
* sent to the tag format's receive function.
|
|
* sent to the tag format's receive function.
|
|
*/
|
|
*/
|
|
wmb();
|
|
wmb();
|
|
dst->cpu_dp->netdev->dsa_ptr = dst;
|
|
dst->cpu_dp->netdev->dsa_ptr = dst;
|
|
|
|
+
|
|
|
|
+ err = dsa_cpu_port_ethtool_setup(dst->cpu_dp);
|
|
|
|
+ if (err)
|
|
|
|
+ return err;
|
|
|
|
+
|
|
dst->applied = true;
|
|
dst->applied = true;
|
|
|
|
|
|
return 0;
|
|
return 0;
|
|
@@ -456,6 +457,8 @@ static void dsa_dst_unapply(struct dsa_switch_tree *dst)
|
|
if (!dst->applied)
|
|
if (!dst->applied)
|
|
return;
|
|
return;
|
|
|
|
|
|
|
|
+ dsa_cpu_port_ethtool_restore(dst->cpu_dp);
|
|
|
|
+
|
|
dst->cpu_dp->netdev->dsa_ptr = NULL;
|
|
dst->cpu_dp->netdev->dsa_ptr = NULL;
|
|
|
|
|
|
/* If we used a tagging format that doesn't have an ethertype
|
|
/* If we used a tagging format that doesn't have an ethertype
|
|
@@ -472,7 +475,6 @@ static void dsa_dst_unapply(struct dsa_switch_tree *dst)
|
|
dsa_ds_unapply(dst, ds);
|
|
dsa_ds_unapply(dst, ds);
|
|
}
|
|
}
|
|
|
|
|
|
- dsa_cpu_port_ethtool_restore(dst->cpu_dp);
|
|
|
|
dst->cpu_dp = NULL;
|
|
dst->cpu_dp = NULL;
|
|
|
|
|
|
pr_info("DSA: tree %d unapplied\n", dst->tree);
|
|
pr_info("DSA: tree %d unapplied\n", dst->tree);
|