Module Name:    src
Committed By:   nisimura
Date:           Mon Feb 14 09:00:04 UTC 2011

Modified Files:
        src/sys/arch/sandpoint/pci: pci_machdep.c

Log Message:
add EPIC definition for Netronics NH230/NH231 and the brothers.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/sandpoint/pci/pci_machdep.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/sandpoint/pci/pci_machdep.c
diff -u src/sys/arch/sandpoint/pci/pci_machdep.c:1.22 src/sys/arch/sandpoint/pci/pci_machdep.c:1.23
--- src/sys/arch/sandpoint/pci/pci_machdep.c:1.22	Thu Feb 10 13:54:45 2011
+++ src/sys/arch/sandpoint/pci/pci_machdep.c	Mon Feb 14 09:00:04 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: pci_machdep.c,v 1.22 2011/02/10 13:54:45 nisimura Exp $	*/
+/*	$NetBSD: pci_machdep.c,v 1.23 2011/02/14 09:00:04 nisimura Exp $	*/
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All rights reserved.
@@ -43,7 +43,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.22 2011/02/10 13:54:45 nisimura Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.23 2011/02/14 09:00:04 nisimura Exp $");
 
 #include "opt_pci.h"
 
@@ -96,6 +96,7 @@
 #define BRD_SYNOLOGY		102
 #define BRD_STORCENTER		103
 #define BRD_DLINKDSM		104
+#define BRD_NH230NAS		105
 #define BRD_UNKNOWN		-1
 
 #define	PCI_CONFIG_ENABLE	0x80000000UL
@@ -158,6 +159,11 @@
 		brdtype = BRD_DLINKDSM;
 		return;
 	}
+	if (PCI_VENDOR(dev16) == PCI_VENDOR_ITE
+	    || PCI_VENDOR(dev16) == PCI_VENDOR_CMDTECH) {
+		brdtype = BRD_NH230NAS;
+		return;
+	}
 
 	brdtype = BRD_UNKNOWN;
 }
@@ -348,6 +354,12 @@
 		/* map line 13,14,15,16 to EPIC IRQ0,1,3,4 */
 		*ihp = (line < 15) ? line - 13 : line - 12;
 		break;
+	case BRD_NH230NAS:
+		/* map line 13,14,15,16 to EPIC IRQ0,3,1,2 */
+		*ihp =  (line == 16) ? 2 :
+			(line == 15) ? 1 :
+			(line == 14) ? 3 : 0;
+		break;
 	case BRD_STORCENTER:
 	default:
 		/* map line 12-15 to EPIC IRQ0-3 */

Reply via email to