Wed Jul 14 17:53:50 2021 UTC ()
Pull up following revision(s) (requested by tsutsui in ticket #1689):

	sys/arch/hppa/dev/sti_sgc.c: revision 1.3

Fix silent freeze on probing sti(4) framebuffer on 712/60.  PR/52162

Ok'ed by skrll@.
Should be pulled up to netbsd-9 and netbsd-8.


(martin)
diff -r1.1 -r1.1.28.1 src/sys/arch/hppa/dev/sti_sgc.c

cvs diff -r1.1 -r1.1.28.1 src/sys/arch/hppa/dev/sti_sgc.c (expand / switch to context diff)
--- src/sys/arch/hppa/dev/sti_sgc.c 2014/02/24 07:23:43 1.1
+++ src/sys/arch/hppa/dev/sti_sgc.c 2021/07/14 17:53:50 1.1.28.1
@@ -1,4 +1,4 @@
-/*	$NetBSD: sti_sgc.c,v 1.1 2014/02/24 07:23:43 skrll Exp $	*/
+/*	$NetBSD: sti_sgc.c,v 1.1.28.1 2021/07/14 17:53:50 martin Exp $	*/
 
 /*	$OpenBSD: sti_sgc.c,v 1.38 2009/02/06 22:51:04 miod Exp $	*/
 
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sti_sgc.c,v 1.1 2014/02/24 07:23:43 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sti_sgc.c,v 1.1.28.1 2021/07/14 17:53:50 martin Exp $");
 
 #include "opt_cputype.h"
 
@@ -73,6 +73,16 @@
 #define	STI_ROMSIZE	(sizeof(struct sti_dd) * 4)
 #define	STI_ID_FDDI	0x280b31af	/* Medusa FDDI ROM id */
 
+/*
+ * hpa addresses to check on-board variants
+ * XXX should check via device_register(9)?
+ * 
+ * 0xf4000000: HPA1991AC19 on 715/33, 715/50
+ * 0xf8000000: HPA1439A on 735/99, HPA208LCxxx on 715/80, 715/100, 712
+ */
+#define	STI_ONBOARD_HPA0	0xf4000000
+#define	STI_ONBOARD_HPA1	0xf8000000
+
 /* gecko optional graphics */
 #define	STI_GOPT1_REV	0x17
 #define	STI_GOPT2_REV	0x70
@@ -118,7 +128,9 @@
 	rom = PAGE0->pd_resv2[1];
 	hppa_pagezero_unmap(pagezero_cookie);
 
-	if (ca->ca_type.iodc_sv_model == HPPA_FIO_GSGC) {
+	if (ca->ca_type.iodc_sv_model == HPPA_FIO_GSGC &&
+	    ca->ca_hpa != STI_ONBOARD_HPA0 &&
+	    ca->ca_hpa != STI_ONBOARD_HPA1) {
 		int i;
 		for (i = sizeof(sti_sgc_opt); i--; )
 			if (sti_sgc_opt[i] == ca->ca_type.iodc_revision)