* [PATCH] sundance: small cleanup
@ 2006-08-03 16:42 Philippe De Muyter
2006-08-09 4:02 ` Jeff Garzik
0 siblings, 1 reply; 2+ messages in thread
From: Philippe De Muyter @ 2006-08-03 16:42 UTC (permalink / raw)
To: netdev
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>
diff -r 9062402c439c drivers/net/sundance.c
--- a/drivers/net/sundance.c Thu Aug 3 12:35:26 2006 +0700
+++ b/drivers/net/sundance.c Thu Aug 3 18:17:31 2006 +0200
@@ -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 (st
/* 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];
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] sundance: small cleanup
2006-08-03 16:42 [PATCH] sundance: small cleanup Philippe De Muyter
@ 2006-08-09 4:02 ` Jeff Garzik
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2006-08-09 4:02 UTC (permalink / raw)
To: Philippe De Muyter; +Cc: netdev
applied
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-08-09 4:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-03 16:42 [PATCH] sundance: small cleanup Philippe De Muyter
2006-08-09 4:02 ` Jeff Garzik
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).