From: "Dale Farnsworth" <dale@farnsworth.org>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] mv643xx_eth: add mv643xx_eth_shutdown function
Date: Tue, 20 Mar 2007 16:38:04 -0700 [thread overview]
Message-ID: <20070320233801.GA24374@xyzzy.farnsworth.org> (raw)
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,
},
next reply other threads:[~2007-03-20 23:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-20 23:38 Dale Farnsworth [this message]
2007-03-23 5:50 ` [PATCH] mv643xx_eth: add mv643xx_eth_shutdown function Jeff Garzik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070320233801.GA24374@xyzzy.farnsworth.org \
--to=dale@farnsworth.org \
--cc=jgarzik@pobox.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).