[PATCH] pcnet32: 79C975 fiber fix

Linux Kernel Mailing List <[email protected]> Thu, 31 Mar 2005 01:39:11 +0000
Newsgroups gmane.linux.kernel.commits.2-4
Message-ID <[email protected]>
ChangeSet 1.1448.131.1, 2005/03/30 20:39:11-05:00, [email protected]

	[PATCH] pcnet32: 79C975 fiber fix
	
	From: "HARDY, Steven" <[email protected]>
	
	I have found a bug in the pcnet32 driver (drivers/net/pcnet32.c)
	affecting all ethernet cards based on the AMD79C975 chip, using the
	fiber interface.
	
	It's a one line fix, where some config registers get corrupted during
	initialisation (which stops the Fiber interface working with this chip)
	
	This bug was introduced somewhere betweeen 2.4.17 and 2.6.x (noticed
	whilst upgrading to 2.6), and it may affect other chips too.  I have
	checked all versions up to 2.6.11-bk6 and they are all broken.
	
	Signed-off-by: Andrew Morton <[email protected]>
	Signed-off-by: Don Fry <[email protected]>
	Signed-off-by: Jeff Garzik <[email protected]>



 pcnet32.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)


diff -Nru a/drivers/net/pcnet32.c b/drivers/net/pcnet32.c
--- a/drivers/net/pcnet32.c	2005-04-30 12:15:40 -07:00
+++ b/drivers/net/pcnet32.c	2005-04-30 12:15:40 -07:00
@@ -1348,7 +1348,8 @@
 	printk(KERN_INFO "%s: registered as %s\n", dev->name, lp->name);
     cards_found++;
 
-    a->write_bcr(ioaddr, 2, 0x1002);	/* enable LED writes */
+    /* enable LED writes */
+    a->write_bcr(ioaddr, 2, a->read_bcr(ioaddr, 2) | 0x1000);
 
     return 0;