Module Name:    src
Committed By:   tsutsui
Date:           Sun Sep  2 16:18:50 UTC 2018

Modified Files:
        src/sys/arch/sgimips/hpc: wdsc.c

Log Message:
Fix wdsc(4) probe failure on HPC1.5 machines (Indigo R3k/R4k, IP6/IP10/IP12).

The alignment adjustment code was removed in rev 1.36 for common
mips bus_space changes, but the code was not bus_space related
but used for uint32_t register acccess during probe.

Reported and tested by Naruaki Etomi in PR port-sgimips/53522.
Should be pulled up to netbsd-8.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/sgimips/hpc/wdsc.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/sgimips/hpc/wdsc.c
diff -u src/sys/arch/sgimips/hpc/wdsc.c:1.34 src/sys/arch/sgimips/hpc/wdsc.c:1.35
--- src/sys/arch/sgimips/hpc/wdsc.c:1.34	Wed Feb 18 16:47:58 2015
+++ src/sys/arch/sgimips/hpc/wdsc.c	Sun Sep  2 16:18:50 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: wdsc.c,v 1.34 2015/02/18 16:47:58 macallan Exp $	*/
+/*	$NetBSD: wdsc.c,v 1.35 2018/09/02 16:18:50 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 2001 Wayne Knowles
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wdsc.c,v 1.34 2015/02/18 16:47:58 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wdsc.c,v 1.35 2018/09/02 16:18:50 tsutsui Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -105,6 +105,9 @@ wdsc_match(device_t parent, cfdata_t cf,
 		    haa->hpc_regs->scsi0_ctl);
 		asr = MIPS_PHYS_TO_KSEG1(haa->ha_sh + haa->ha_devoff);
 
+		/* XXX: hpc1 offset due to SGIMIPS_BUS_SPACE_HPC brain damage */
+		asr = (asr + 3) & ~0x3;
+
 		if (platform.badaddr((void *)reset, sizeof(reset)))
 			return 0;
 

Reply via email to