aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2018-10-11 18:20:00 -0400
committerDavid S. Miller <davem@davemloft.net>2018-10-11 18:20:00 -0400
commit6b9bab550cac108d86c731c207e3e74ea10eb638 (patch)
tree03791696cc800c5e8f1461b45f72d17893639e61
parent052858663db31bd1ead76744df5d39d8bb703c77 (diff)
parent54baca096386d862d19c10f58f34bf787c6b3cbe (diff)
Merge branch 'net-dsa-bcm_sf2-Couple-of-fixes'
Florian Fainelli says: ==================== net: dsa: bcm_sf2: Couple of fixes Here are two fixes for the bcm_sf2 driver that were found during testing unbind and analysing another issue during system suspend/resume. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/dsa/bcm_sf2.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/drivers/net/dsa/bcm_sf2.c b/drivers/net/dsa/bcm_sf2.c
index e0066adcd2f3..fc8b48adf38b 100644
--- a/drivers/net/dsa/bcm_sf2.c
+++ b/drivers/net/dsa/bcm_sf2.c
@@ -703,7 +703,6 @@ static int bcm_sf2_sw_suspend(struct dsa_switch *ds)
703static int bcm_sf2_sw_resume(struct dsa_switch *ds) 703static int bcm_sf2_sw_resume(struct dsa_switch *ds)
704{ 704{
705 struct bcm_sf2_priv *priv = bcm_sf2_to_priv(ds); 705 struct bcm_sf2_priv *priv = bcm_sf2_to_priv(ds);
706 unsigned int port;
707 int ret; 706 int ret;
708 707
709 ret = bcm_sf2_sw_rst(priv); 708 ret = bcm_sf2_sw_rst(priv);
@@ -715,14 +714,7 @@ static int bcm_sf2_sw_resume(struct dsa_switch *ds)
715 if (priv->hw_params.num_gphy == 1) 714 if (priv->hw_params.num_gphy == 1)
716 bcm_sf2_gphy_enable_set(ds, true); 715 bcm_sf2_gphy_enable_set(ds, true);
717 716
718 for (port = 0; port < DSA_MAX_PORTS; port++) { 717 ds->ops->setup(ds);
719 if (dsa_is_user_port(ds, port))
720 bcm_sf2_port_setup(ds, port, NULL);
721 else if (dsa_is_cpu_port(ds, port))
722 bcm_sf2_imp_setup(ds, port);
723 }
724
725 bcm_sf2_enable_acb(ds);
726 718
727 return 0; 719 return 0;
728} 720}
@@ -1173,10 +1165,10 @@ static int bcm_sf2_sw_remove(struct platform_device *pdev)
1173{ 1165{
1174 struct bcm_sf2_priv *priv = platform_get_drvdata(pdev); 1166 struct bcm_sf2_priv *priv = platform_get_drvdata(pdev);
1175 1167
1176 /* Disable all ports and interrupts */
1177 priv->wol_ports_mask = 0; 1168 priv->wol_ports_mask = 0;
1178 bcm_sf2_sw_suspend(priv->dev->ds);
1179 dsa_unregister_switch(priv->dev->ds); 1169 dsa_unregister_switch(priv->dev->ds);
1170 /* Disable all ports and interrupts */
1171 bcm_sf2_sw_suspend(priv->dev->ds);
1180 bcm_sf2_mdio_unregister(priv); 1172 bcm_sf2_mdio_unregister(priv);
1181 1173
1182 return 0; 1174 return 0;