Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 41506
b: refs/heads/master
c: acd70c2
h: refs/heads/master
v: v3
  • Loading branch information
Jesse Huang authored and Jeff Garzik committed Dec 2, 2006
1 parent 4635342 commit 795483f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6b655529c3d817ed1b69cf2dd29e2c3ce5148a2b
refs/heads/master: acd70c2bfddb52aee27a4864c160bea7f0d117e1
8 changes: 8 additions & 0 deletions trunk/drivers/net/sundance.c
Original file line number Diff line number Diff line change
Expand Up @@ -788,6 +788,7 @@ static int netdev_open(struct net_device *dev)
{
struct netdev_private *np = netdev_priv(dev);
void __iomem *ioaddr = np->base;
unsigned long flags;
int i;

/* Do we need to reset the chip??? */
Expand Down Expand Up @@ -832,6 +833,10 @@ static int netdev_open(struct net_device *dev)
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))
Expand Down Expand Up @@ -1651,6 +1656,9 @@ static int netdev_close(struct net_device *dev)
/* 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);

Expand Down

0 comments on commit 795483f

Please sign in to comment.