summaryrefslogtreecommitdiff
path: root/drivers/net/sundance.c
diff options
context:
space:
mode:
authorPhilippe De Muyter <phdm@macqel.be>2006-08-03 20:42:15 +0400
committerJeff Garzik <jeff@garzik.org>2006-08-09 08:02:46 +0400
commite714d99cacac976deac3239c89f2c9e3125649b6 (patch)
treed9e9ee67785867bc0773ec64b294558181778259 /drivers/net/sundance.c
parentd15064aa94f44a17bfc052f5b748f5e240735551 (diff)
downloadlinux-e714d99cacac976deac3239c89f2c9e3125649b6.tar.xz
[PATCH] sundance: small cleanup
This patch uses the sundance_reset function everywhere a reset is done, and adds a link to the archives of the original mailing list. Signed-off-by: Philippe De Muyter <phdm@macqel.be> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/sundance.c')
-rw-r--r--drivers/net/sundance.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/net/sundance.c b/drivers/net/sundance.c
index ac17377b3e9f..8f33f5d34af2 100644
--- a/drivers/net/sundance.c
+++ b/drivers/net/sundance.c
@@ -17,6 +17,8 @@
Support and updates available at
http://www.scyld.com/network/sundance.html
[link no longer provides useful info -jgarzik]
+ Archives of the mailing list are still available at
+ http://www.beowulf.org/pipermail/netdrivers/
*/
@@ -646,7 +648,7 @@ static int __devinit sundance_probe1 (struct pci_dev *pdev,
/* Reset the chip to erase previous misconfiguration. */
if (netif_msg_hw(np))
printk("ASIC Control is %x.\n", ioread32(ioaddr + ASICCtrl));
- iowrite16(0x00ff, ioaddr + ASICCtrl + 2);
+ sundance_reset(dev, 0x00ff << 16);
if (netif_msg_hw(np))
printk("ASIC Control is now %x.\n", ioread32(ioaddr + ASICCtrl));
@@ -1075,13 +1077,8 @@ reset_tx (struct net_device *dev)
/* Reset tx logic, TxListPtr will be cleaned */
iowrite16 (TxDisable, ioaddr + MACCtrl1);
- iowrite16 (TxReset | DMAReset | FIFOReset | NetworkReset,
- ioaddr + ASICCtrl + 2);
- for (i=50; i > 0; i--) {
- if ((ioread16(ioaddr + ASICCtrl + 2) & ResetBusy) == 0)
- break;
- mdelay(1);
- }
+ sundance_reset(dev, (NetworkReset|FIFOReset|DMAReset|TxReset) << 16);
+
/* free all tx skbuff */
for (i = 0; i < TX_RING_SIZE; i++) {
skb = np->tx_skbuff[i];