public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Fix for Donald Becker's DP83815 network driver (v1.07)
@ 2001-04-17 15:58 Steve Hill
  2001-04-17 16:16 ` Roberto Nibali
  0 siblings, 1 reply; 25+ messages in thread
From: Steve Hill @ 2001-04-17 15:58 UTC (permalink / raw)
  To: linux-kernel, becker; +Cc: maurizio.quadrio, harry

[-- Attachment #1: Type: TEXT/PLAIN, Size: 459 bytes --]


The attached patch fixes the following problems with the DP83815 driver
(natsemi.c):

1. When compiled into the kernel, the cards would be registered multiple
times.
2. Autonegotiation code was buggy, causing the card to stop working after
autonegotiation.

-- 

- Steve Hill
System Administrator         Email: steve@navaho.co.uk
Navaho Technologies Ltd.       Tel: +44-870-7034015

        ... Alcohol and calculus don't mix - Don't drink and derive! ...


[-- Attachment #2: Type: TEXT/PLAIN, Size: 1434 bytes --]

diff -urN linux.natsemi/drivers/net/natsemi.c linux/drivers/net/natsemi.c
--- linux.natsemi/drivers/net/natsemi.c	Tue Apr 17 13:12:26 2001
+++ linux/drivers/net/natsemi.c	Tue Apr 17 13:20:04 2001
@@ -19,6 +19,16 @@
 	http://www.scyld.com/network/netsemi.html
 */
 
+/*
+	11 April 2001     Steve Hill <steve@navaho.co.uk>
+	Bugfix: When compiled into the kernel instead of as a module the driver
+	incorrectly registered multiple network cards.
+	
+	17 April 2001     Steve Hill <steve@navaho.co.uk>
+	Bugfix: Autonegotiation code was using writew() instead of writel() - this
+	resulted in the card failing after autonegotiation.
+*/
+	
 /* These identify the driver base version and may not be removed. */
 static const char version1[] =
 "natsemi.c:v1.07 1/9/2001  Written by Donald Becker <becker@scyld.com>\n";
@@ -363,8 +373,12 @@
 #ifndef MODULE
 int natsemi_probe(struct net_device *dev)
 {
+	static int done = 0;
+
+	if (done) return -ENODEV;
 	if (pci_drv_register(&natsemi_drv_id, dev) < 0)
 		return -ENODEV;
+	done = 1;
 	printk(KERN_INFO "%s" KERN_INFO "%s", version1, version2);
 	return 0;
 }
@@ -637,8 +651,8 @@
 			np->rx_config &= ~0x10000000;
 			np->tx_config &= ~0xC0000000;
 		}
-		writew(np->tx_config, ioaddr + TxConfig);
-		writew(np->rx_config, ioaddr + RxConfig);
+		writel(np->tx_config, ioaddr + TxConfig);
+		writel(np->rx_config, ioaddr + RxConfig);
 	}
 }
 

^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2001-04-20 19:27 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-04-17 15:58 Fix for Donald Becker's DP83815 network driver (v1.07) Steve Hill
2001-04-17 16:16 ` Roberto Nibali
2001-04-17 16:30   ` Steve Hill
2001-04-17 17:12     ` Roberto Nibali
2001-04-18 10:25     ` Ion Badulescu
2001-04-18 11:32       ` Steve Hill
2001-04-18 15:14         ` Tim Hockin
2001-04-18 20:33         ` Ion Badulescu
2001-04-18 20:40           ` Steve Hill
2001-04-19 10:54           ` Roberto Nibali
2001-04-19 13:06           ` Roberto Nibali
2001-04-20  5:48             ` Ion Badulescu
2001-04-20  6:30               ` Jeff Garzik
2001-04-20  7:09                 ` Ion Badulescu
2001-04-20  7:31                   ` Jeff Garzik
2001-04-20  9:49                     ` Ion Badulescu
2001-04-20  9:57                       ` Jeff Garzik
2001-04-20 10:05                         ` Ion Badulescu
2001-04-20 16:10                           ` Roberto Nibali
2001-04-20 16:19                             ` Jeff Garzik
2001-04-20 16:50                               ` Roberto Nibali
2001-04-20 19:27                                 ` Ion Badulescu
2001-04-20  9:03               ` Roberto Nibali
2001-04-20  9:42                 ` Ion Badulescu
2001-04-20 10:12                   ` Roberto Nibali

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox