Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 299572
b: refs/heads/master
c: c5a9993
h: refs/heads/master
v: v3
  • Loading branch information
Stephen Boyd authored and David S. Miller committed Apr 21, 2012
1 parent 98d481b commit 6330d8c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3adadc08cc1e2cbcc15a640d639297ef5fcb17f5
refs/heads/master: c5a99937a9cf74a623384023201a7d98b51e7e3b
11 changes: 6 additions & 5 deletions trunk/drivers/net/ethernet/micrel/ks8851.c
Original file line number Diff line number Diff line change
Expand Up @@ -889,16 +889,17 @@ static int ks8851_net_stop(struct net_device *dev)
netif_stop_queue(dev);

mutex_lock(&ks->lock);
/* turn off the IRQs and ack any outstanding */
ks8851_wrreg16(ks, KS_IER, 0x0000);
ks8851_wrreg16(ks, KS_ISR, 0xffff);
mutex_unlock(&ks->lock);

/* stop any outstanding work */
flush_work(&ks->irq_work);
flush_work(&ks->tx_work);
flush_work(&ks->rxctrl_work);

/* turn off the IRQs and ack any outstanding */
ks8851_wrreg16(ks, KS_IER, 0x0000);
ks8851_wrreg16(ks, KS_ISR, 0xffff);

mutex_lock(&ks->lock);
/* shutdown RX process */
ks8851_wrreg16(ks, KS_RXCR1, 0x0000);

Expand All @@ -907,6 +908,7 @@ static int ks8851_net_stop(struct net_device *dev)

/* set powermode to soft power down to save power */
ks8851_set_powermode(ks, PMECR_PM_SOFTDOWN);
mutex_unlock(&ks->lock);

/* ensure any queued tx buffers are dumped */
while (!skb_queue_empty(&ks->txq)) {
Expand All @@ -918,7 +920,6 @@ static int ks8851_net_stop(struct net_device *dev)
dev_kfree_skb(txb);
}

mutex_unlock(&ks->lock);
return 0;
}

Expand Down

0 comments on commit 6330d8c

Please sign in to comment.