Module Name:    src
Committed By:   macallan
Date:           Fri Oct 16 17:59:46 UTC 2020

Modified Files:
        src/sys/arch/hppa/dev: dino.c

Log Message:
config space accesses to device 15 function 7 cause a machine check exception
on my C200, so weed them out.
Now we can scan the PCI buses without crashing.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/hppa/dev/dino.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/hppa/dev/dino.c
diff -u src/sys/arch/hppa/dev/dino.c:1.6 src/sys/arch/hppa/dev/dino.c:1.7
--- src/sys/arch/hppa/dev/dino.c:1.6	Sun Jun 14 01:40:04 2020
+++ src/sys/arch/hppa/dev/dino.c	Fri Oct 16 17:59:46 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: dino.c,v 1.6 2020/06/14 01:40:04 chs Exp $ */
+/*	$NetBSD: dino.c,v 1.7 2020/10/16 17:59:46 macallan Exp $ */
 
 /*	$OpenBSD: dino.c,v 1.5 2004/02/13 20:39:31 mickey Exp $	*/
 
@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dino.c,v 1.6 2020/06/14 01:40:04 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dino.c,v 1.7 2020/10/16 17:59:46 macallan Exp $");
 
 /* #include "cardbus.h" */
 
@@ -345,10 +345,17 @@ dino_conf_read(void *v, pcitag_t tag, in
 	if ((unsigned int)reg >= PCI_CONF_SIZE)
 		return (pcireg_t) -1;
 
+	/*
+	 * XXX
+	 * accessing dev 1f / func 7 on the 2nd Dino causes a machine check
+	 * exception on my C200
+	 */
+	if ((tag & 0xff00) == 0xff00) return -1;
+
 	/* fix arbitration errata by disabling all pci devs on config read */
 	pamr = r->pamr;
 	r->pamr = 0;
-
+	
 	r->pci_addr = tag | reg;
 	data = r->pci_conf_data;
 
@@ -368,6 +375,13 @@ dino_conf_write(void *v, pcitag_t tag, i
 	if ((unsigned int)reg >= PCI_CONF_SIZE)
 		return;
 
+	/*
+	 * XXX
+	 * accessing dev 1f / func 7 on the 2nd Dino causes a machine check
+	 * exception on my C200
+	 */
+	if ((tag & 0xff00) == 0xff00) return;
+
 	/* fix arbitration errata by disabling all pci devs on config read */
 	pamr = r->pamr;
 	r->pamr = 0;

Reply via email to