linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mv643xx_eth: add mv643xx_eth_shutdown function
@ 2007-03-20 23:38 Dale Farnsworth
  2007-03-23  5:50 ` Jeff Garzik
  0 siblings, 1 reply; 2+ messages in thread
From: Dale Farnsworth @ 2007-03-20 23:38 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: netdev, linux-kernel

From: Dale Farnsworth <dale@farnsworth.org>

mv643xx_eth_shutdown is needed for kexec.

Signed-off-by: Dale Farnsworth <dale@farnsworth.org>

---
 drivers/net/mv643xx_eth.c |   14 ++++++++++++++
 1 file changed, 14 insertions(+)

Index: linux-2.6-powerpc-df/drivers/net/mv643xx_eth.c
===================================================================
--- linux-2.6-powerpc-df.orig/drivers/net/mv643xx_eth.c
+++ linux-2.6-powerpc-df/drivers/net/mv643xx_eth.c
@@ -1516,9 +1516,23 @@ static int mv643xx_eth_shared_remove(str
 	return 0;
 }
 
+static void mv643xx_eth_shutdown(struct platform_device *pdev)
+{
+	struct net_device *dev = platform_get_drvdata(pdev);
+	struct mv643xx_private *mp = netdev_priv(dev);
+	unsigned int port_num = mp->port_num;
+
+	/* Mask all interrupts on ethernet port */
+	mv_write(MV643XX_ETH_INTERRUPT_MASK_REG(port_num), 0);
+	mv_read (MV643XX_ETH_INTERRUPT_MASK_REG(port_num));
+
+	eth_port_reset(port_num);
+}
+
 static struct platform_driver mv643xx_eth_driver = {
 	.probe = mv643xx_eth_probe,
 	.remove = mv643xx_eth_remove,
+	.shutdown = mv643xx_eth_shutdown,
 	.driver = {
 		.name = MV643XX_ETH_NAME,
 	},

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] mv643xx_eth: add mv643xx_eth_shutdown function
  2007-03-20 23:38 [PATCH] mv643xx_eth: add mv643xx_eth_shutdown function Dale Farnsworth
@ 2007-03-23  5:50 ` Jeff Garzik
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2007-03-23  5:50 UTC (permalink / raw)
  To: Dale Farnsworth; +Cc: netdev, linux-kernel

Dale Farnsworth wrote:
> From: Dale Farnsworth <dale@farnsworth.org>
> 
> mv643xx_eth_shutdown is needed for kexec.
> 
> Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
> 
> ---
>  drivers/net/mv643xx_eth.c |   14 ++++++++++++++
>  1 file changed, 14 insertions(+)

applied



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-03-23  5:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-20 23:38 [PATCH] mv643xx_eth: add mv643xx_eth_shutdown function Dale Farnsworth
2007-03-23  5:50 ` Jeff Garzik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).