mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-05 22:25:16 +00:00
net: systemport: Utilize bcm_sysport_set_features() during resume/open
During driver resume and open, the HW may have lost its context/state, utilize bcm_sysport_set_features() to make sure we do restore the correct set of features that were previously configured. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
10b476c57b
commit
297357d1a1
1 changed files with 7 additions and 7 deletions
|
@ -1972,6 +1972,11 @@ static int bcm_sysport_open(struct net_device *dev)
|
||||||
else
|
else
|
||||||
gib_set_pad_extension(priv);
|
gib_set_pad_extension(priv);
|
||||||
|
|
||||||
|
/* Apply features again in case we changed them while interface was
|
||||||
|
* down
|
||||||
|
*/
|
||||||
|
bcm_sysport_set_features(dev, dev->features);
|
||||||
|
|
||||||
/* Set MAC address */
|
/* Set MAC address */
|
||||||
umac_set_hw_addr(priv, dev->dev_addr);
|
umac_set_hw_addr(priv, dev->dev_addr);
|
||||||
|
|
||||||
|
@ -2708,7 +2713,6 @@ static int __maybe_unused bcm_sysport_resume(struct device *d)
|
||||||
struct net_device *dev = dev_get_drvdata(d);
|
struct net_device *dev = dev_get_drvdata(d);
|
||||||
struct bcm_sysport_priv *priv = netdev_priv(dev);
|
struct bcm_sysport_priv *priv = netdev_priv(dev);
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
u32 reg;
|
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (!netif_running(dev))
|
if (!netif_running(dev))
|
||||||
|
@ -2752,12 +2756,8 @@ static int __maybe_unused bcm_sysport_resume(struct device *d)
|
||||||
goto out_free_rx_ring;
|
goto out_free_rx_ring;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Enable rxhck */
|
/* Restore enabled features */
|
||||||
if (priv->rx_chk_en) {
|
bcm_sysport_set_features(dev, dev->features);
|
||||||
reg = rxchk_readl(priv, RXCHK_CONTROL);
|
|
||||||
reg |= RXCHK_EN;
|
|
||||||
rxchk_writel(priv, reg, RXCHK_CONTROL);
|
|
||||||
}
|
|
||||||
|
|
||||||
rbuf_init(priv);
|
rbuf_init(priv);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue