[PATCH 15/23] Fix network driver resume API when the interface is down
Brad Figg
brad.figg at canonical.com
Thu Aug 27 23:20:55 UTC 2009
From: Shadi Ammouri <shadi at marvell.com>
Perform port minimal initializations even if the port is down.
Signed-off-by: Shadi Ammouri <shadi at marvell.com>
Signed-off-by: Saeed Bishara <saeed at marvell.com>
Signed-off-by: Brad Figg <brad.figg at canonical.com>
---
drivers/net/mv643xx_eth.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c
index f390ee7..282a3a7 100644
--- a/drivers/net/mv643xx_eth.c
+++ b/drivers/net/mv643xx_eth.c
@@ -3128,6 +3128,18 @@ static int mv643xx_eth_resume(struct platform_device *pdev)
wrlp(mp, INT_MASK_EXT, INT_EXT_LINK_PHY | INT_EXT_TX);
wrlp(mp, INT_MASK, mp->interrupt_mask);
netif_device_attach(mp->dev);
+ } else {
+ init_pscr(mp, pd->speed, pd->duplex);
+ mib_counters_clear(mp);
+
+ if (mp->shared->win_protect)
+ wrl(mp, WINDOW_PROTECT(mp->port_num),
+ mp->shared->win_protect);
+
+ wrlp(mp, SDMA_CONFIG, PORT_SDMA_CONFIG_DEFAULT_VALUE);
+
+ set_rx_coal(mp, 250);
+ set_tx_coal(mp, 0);
}
return 0;
}
--
1.6.0.4
More information about the kernel-team
mailing list