mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-04 08:08:54 +00:00
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>
This commit is contained in:
commit
6b9bab550c
1 changed files with 3 additions and 11 deletions
|
@ -703,7 +703,6 @@ static int bcm_sf2_sw_suspend(struct dsa_switch *ds)
|
||||||
static int bcm_sf2_sw_resume(struct dsa_switch *ds)
|
static int bcm_sf2_sw_resume(struct dsa_switch *ds)
|
||||||
{
|
{
|
||||||
struct bcm_sf2_priv *priv = bcm_sf2_to_priv(ds);
|
struct bcm_sf2_priv *priv = bcm_sf2_to_priv(ds);
|
||||||
unsigned int port;
|
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
ret = bcm_sf2_sw_rst(priv);
|
ret = bcm_sf2_sw_rst(priv);
|
||||||
|
@ -715,14 +714,7 @@ static int bcm_sf2_sw_resume(struct dsa_switch *ds)
|
||||||
if (priv->hw_params.num_gphy == 1)
|
if (priv->hw_params.num_gphy == 1)
|
||||||
bcm_sf2_gphy_enable_set(ds, true);
|
bcm_sf2_gphy_enable_set(ds, true);
|
||||||
|
|
||||||
for (port = 0; port < DSA_MAX_PORTS; port++) {
|
ds->ops->setup(ds);
|
||||||
if (dsa_is_user_port(ds, port))
|
|
||||||
bcm_sf2_port_setup(ds, port, NULL);
|
|
||||||
else if (dsa_is_cpu_port(ds, port))
|
|
||||||
bcm_sf2_imp_setup(ds, port);
|
|
||||||
}
|
|
||||||
|
|
||||||
bcm_sf2_enable_acb(ds);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1173,10 +1165,10 @@ static int bcm_sf2_sw_remove(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct bcm_sf2_priv *priv = platform_get_drvdata(pdev);
|
struct bcm_sf2_priv *priv = platform_get_drvdata(pdev);
|
||||||
|
|
||||||
/* Disable all ports and interrupts */
|
|
||||||
priv->wol_ports_mask = 0;
|
priv->wol_ports_mask = 0;
|
||||||
bcm_sf2_sw_suspend(priv->dev->ds);
|
|
||||||
dsa_unregister_switch(priv->dev->ds);
|
dsa_unregister_switch(priv->dev->ds);
|
||||||
|
/* Disable all ports and interrupts */
|
||||||
|
bcm_sf2_sw_suspend(priv->dev->ds);
|
||||||
bcm_sf2_mdio_unregister(priv);
|
bcm_sf2_mdio_unregister(priv);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in a new issue