From: Jesse Huang <jesse@icplus.com.tw>
To: linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
akpm@osdl.org, jgarzik@pobox.com, jesse@icplus.com.tw
Subject: [PATCH 3/4] IP100A: Correct initial and close hardware step. 2006-08-24
Date: Thu, 14 Sep 2006 10:45:33 -0400 [thread overview]
Message-ID: <1158245133.2184.4.camel@localhost.localdomain> (raw)
From: Jesse Huang <jesse@icplus.com.tw>
Change Logs:
- Correct initial and close hardware step.
Signed-off-by: Jesse Huang <jesse@icplus.com.tw>
---
drivers/net/sundance.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
419599b10f1253ccd7224bbd369924307e1e5bb6
diff --git a/drivers/net/sundance.c b/drivers/net/sundance.c
index dd41ee2..04ad4d8 100755
--- a/drivers/net/sundance.c
+++ b/drivers/net/sundance.c
@@ -787,6 +787,7 @@ static int netdev_open(struct net_device
{
struct netdev_private *np = netdev_priv(dev);
void __iomem *ioaddr = np->base;
+ unsigned long flags;
int i;
/* Do we need to reset the chip??? */
@@ -831,6 +832,10 @@ #endif
iowrite8(0x01, ioaddr + DebugCtrl1);
netif_start_queue(dev);
+ spin_lock_irqsave(&np->lock, flags);
+ reset_tx(dev);
+ spin_unlock_irqrestore(&np->lock, flags);
+
iowrite16 (StatsEnable | RxEnable | TxEnable, ioaddr + MACCtrl1);
if (netif_msg_ifup(np))
@@ -1656,6 +1661,9 @@ static int netdev_close(struct net_devic
/* Disable interrupts by clearing the interrupt mask. */
iowrite16(0x0000, ioaddr + IntrEnable);
+ /* Disable Rx and Tx DMA for safely release resource */
+ iowrite32(0x500, ioaddr + DMACtrl);
+
/* Stop the chip's Tx and Rx processes. */
iowrite16(TxDisable | RxDisable | StatsDisable, ioaddr + MACCtrl1);
--
1.3.GIT
next reply other threads:[~2006-09-14 2:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-14 14:45 Jesse Huang [this message]
-- strict thread matches above, loose matches on Subject: below --
2006-08-24 19:48 [PATCH 3/4] IP100A: Correct initial and close hardware step. 2006-08-24 Jesse Huang
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=1158245133.2184.4.camel@localhost.localdomain \
--to=jesse@icplus.com.tw \
--cc=akpm@osdl.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