Module Name:    src
Committed By:   cliff
Date:           Thu Apr 14 05:22:47 UTC 2011

Modified Files:
        src/sys/arch/mips/rmi: rmixl_pcix.c

Log Message:
- in rmixl_pcix_intr_string() convert irq to vector when calling
rmixl_intr_string()
- in rmixl_pcix_intr_establish(), initialize dispatch data 'counts' pointer
- in rmixl_pcix_pip_add_1(), zero out pip_new after allocated.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/mips/rmi/rmixl_pcix.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/mips/rmi/rmixl_pcix.c
diff -u src/sys/arch/mips/rmi/rmixl_pcix.c:1.4 src/sys/arch/mips/rmi/rmixl_pcix.c:1.5
--- src/sys/arch/mips/rmi/rmixl_pcix.c:1.4	Wed Apr 13 21:06:30 2011
+++ src/sys/arch/mips/rmi/rmixl_pcix.c	Thu Apr 14 05:22:47 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: rmixl_pcix.c,v 1.4 2011/04/13 21:06:30 cliff Exp $	*/
+/*	$NetBSD: rmixl_pcix.c,v 1.5 2011/04/14 05:22:47 cliff Exp $	*/
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -40,7 +40,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rmixl_pcix.c,v 1.4 2011/04/13 21:06:30 cliff Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rmixl_pcix.c,v 1.5 2011/04/14 05:22:47 cliff Exp $");
 
 #include "opt_pci.h"
 #include "pci.h"
@@ -797,7 +797,7 @@
 		panic("%s: cpu %#x not supported\n",
 			__func__, mips_options.mips_cpu_id);
 
-	return rmixl_intr_string(irq);
+	return rmixl_intr_string(RMIXL_IRT_VECTOR(irq));
 }
 
 const struct evcnt *
@@ -925,6 +925,7 @@
 	dip->irq = irq;
 	dip->func = func;
 	dip->arg = arg;
+	dip->counts = RMIXL_PCIX_EVCNT(sc, bitno, 0);
 #if NEVER
 	snprintf(dip->count_name, sizeof(dip->count_name),
 		"pin %d", bitno + 1);
@@ -990,6 +991,8 @@
 		return NULL;
 	}
 
+	memset(pip_new, 0, size);
+
 	if (pip_old == NULL) {
 		/* initialize the interrupt struct */
 		pip_new->sc = sc;

Reply via email to