Module Name:    src
Committed By:   riz
Date:           Thu Jun  6 02:52:28 UTC 2013

Modified Files:
        src/sys/arch/amiga/dev [netbsd-6]: if_ne_zbus.c

Log Message:
Pull up following revision(s) (requested by rkujawa in ticket #892):
        sys/arch/amiga/dev/if_ne_zbus.c: revision 1.15
Workaround for the fake X-Surf autoconfig entry, created by the Deneb =
firmware v11.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.14.8.1 src/sys/arch/amiga/dev/if_ne_zbus.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/amiga/dev/if_ne_zbus.c
diff -u src/sys/arch/amiga/dev/if_ne_zbus.c:1.14 src/sys/arch/amiga/dev/if_ne_zbus.c:1.14.8.1
--- src/sys/arch/amiga/dev/if_ne_zbus.c:1.14	Tue Jul 19 15:55:27 2011
+++ src/sys/arch/amiga/dev/if_ne_zbus.c	Thu Jun  6 02:52:28 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_ne_zbus.c,v 1.14 2011/07/19 15:55:27 dyoung Exp $ */
+/*	$NetBSD: if_ne_zbus.c,v 1.14.8.1 2013/06/06 02:52:28 riz Exp $ */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ne_zbus.c,v 1.14 2011/07/19 15:55:27 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ne_zbus.c,v 1.14.8.1 2013/06/06 02:52:28 riz Exp $");
 
 /*
  * Thanks to Village Tronic for giving me a card.
@@ -86,6 +86,13 @@ CFATTACH_DECL_NEW(ne_zbus, sizeof(struct
 #define	NE_ARIADNE_II_ASICBASE	0x0310	/* 0x0620 */
 #define	NE_ARIADNE_II_ASICSIZE	0x10
 
+/*
+ * E3B Deneb firmware v11 creates fake X-Surf autoconfig entry.
+ * Do not attach ne driver to this fake card, otherwise kernel panic
+ * may occur.
+ */
+#define DENEB_XSURF_SERNO	0xC0FFEE01	/* Serial of the fake card */
+
 int
 ne_zbus_match(device_t parent, cfdata_t cf, void *aux)
 {
@@ -96,8 +103,10 @@ ne_zbus_match(device_t parent, cfdata_t 
 		return (1);
 
 	/* X-surf ethernet card */
-	if (zap->manid == 4626 && zap->prodid == 23)
-		return (1);
+	if (zap->manid == 4626 && zap->prodid == 23) {
+		if (zap->serno != DENEB_XSURF_SERNO)
+			return (1);
+	}
 
 	return (0);
 }

Reply via email to