NetBSD Problem Report #53522

From www@NetBSD.org  Mon Aug 13 18:52:29 2018
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 610887A16B
	for <gnats-bugs@gnats.NetBSD.org>; Mon, 13 Aug 2018 18:52:29 +0000 (UTC)
Message-Id: <20180813185227.11A587A218@mollari.NetBSD.org>
Date: Mon, 13 Aug 2018 18:52:27 +0000 (UTC)
From: nullnilaki@gmail.com
Reply-To: nullnilaki@gmail.com
To: gnats-bugs@NetBSD.org
Subject: wdsc WD33C93 SCSI chip driver is not configured on SGI HPC1.5 (Indigo R3000 Indigo R4000) machine
X-Send-Pr-Version: www-1.0

>Number:         53522
>Category:       port-sgimips
>Synopsis:       wdsc WD33C93 SCSI chip driver is not configured on SGI HPC1.5 (Indigo R3000 Indigo R4000) machine
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    tsutsui
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Aug 13 18:55:01 +0000 2018
>Closed-Date:    Fri Sep 14 19:43:43 +0000 2018
>Last-Modified:  Fri Sep 14 19:43:43 +0000 2018
>Originator:     Naruaki Etomi
>Release:        NetBSD/sgimips 8.99.21
>Organization:
Japan
>Environment:
NetBSD  8.99.21 NetBSD 8.99.21 (GENERIC32_IP12) #1: Sun Aug 12 14:48:19 UTC 2018  naruaki@xserve:/usr/obj.sgimips/sys/arch/sgimips/compile/GENERIC32_IP12 sgimips

>Description:
HPC1_SCSI0_DEVREGS is 0x0000011f
https://nxr.netbsd.org/xref/src/sys/arch/sgimips/hpc/hpcreg.h#438

Actually, however, HPC1_SCSI0_DEVREGS is 0x00000122!
http://bxr.su/OpenBSD/sys/arch/sgi/hpc/hpcreg.h#440

[   1.0000000] arcemu: unknown console "", using serial
[   1.0000000] Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
[   1.0000000]     2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017,
[   1.0000000]     2018 The NetBSD Foundation, Inc.  All rights reserved.
[   1.0000000] Copyright (c) 1982, 1986, 1989, 1991, 1993
[   1.0000000]     The Regents of the University of California.  All rights reserved.

[   1.0000000] NetBSD 8.99.21 (GENERIC32_IP12) #2: Mon Aug 13 17:13:50 UTC 2018
[   1.0000000] 	naruaki@xserve:/usr/obj.sgimips_ok/sys/arch/sgimips/compile/GENERIC32_IP12
[   1.0000000] total memory = 32768 KB
[   1.0000000] (0 reserved for ARCS)
[   1.0000000] avail memory = 28988 KB
[   1.0000000] WARNING: module error: sequencer: can't find builtin dependency `midi'
[   1.0000000] mainbus0 (root): SGI-IP12 [SGI, IP12], 1 processor
[   1.0000000] cpu0 at mainbus0: MIPS R3000A CPU (0x230) Rev. 3.0 with MIPS R3010 FPC Rev. 4.0
[   1.0000000] cpu0: 32KB/4B direct-mapped Instruction cache, 64 TLB entries
[   1.0000000] cpu0: 32KB/4B direct-mapped write-through Data cache
[   1.0000000] int0 at mainbus0 addr 0x1fb801c0
[   1.0000050] pic0 at mainbus0 addr 0x1fa00000
[   1.0000050] pic0: Revision B: dblk (0x2), iblk (0x8)
[   1.0000050] pic0: Indigo R3000, board revision 1
[   1.0000050] pic0: cache disabled, store partial, bus drive
[   1.0000050] gio0 at pic0
[   1.0000050] light0 at gio0: SGI LG2 (board revision 2)
[   1.0000050] wsdisplay0 at light0 kbdmux 1
[   1.0000050] hpc0 at gio0: SGI HPC1.5 (onboard)
[   1.0000050] zsc0 at hpc0 offset 0xd10arcemu: unknown console "", using serial

[   1.0000050] zstty0 at zsc0 channel 1 (console i/o)
[   1.0000050] zstty1 at zsc0 channel 0
[   1.0000050] zsc1 at hpc0 offset 0xd00arcemu: unknown console "", using serial

[   1.0000050] zsms0 at zsc1 channel 1: baud rate 4800
[   1.0000050] wsmouse0 at zsms0 mux 0
[   1.0000050] zskbd0 at zsc1 channel 0: baud rate 600
[   1.0000050] wskbd0 at zskbd0 mux 1
[   1.0000050] sq0 at hpc0 offset 0x100: SGI Seeq 8003
[   1.0000050] sq0: Ethernet address 08:00:69:06:59:03
[   1.0000050] wdsc at hpc0 offset 0x11f not configured

>How-To-Repeat:

>Fix:
---------------------------------------------------------------------------------------------

diff -Naru src.orig/sys/arch/sgimips/hpc/wdsc.c src/sys/arch/sgimips/hpc/wdsc.c
--- src.orig/sys/arch/sgimips/hpc/wdsc.c	2015-02-19 03:03:08.000000000 +0000
+++ src/sys/arch/sgimips/hpc/wdsc.c	2018-08-12 03:27:37.923488926 +0000
@@ -105,6 +105,9 @@
 		    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;

---------------------------------------------------------------------------------------------

>> boot -f dksc(0,4,8)irisboot
55696+0+1832 entry: 0x80368000

NetBSD/sgimips 8.99.21 Yet another Bootstrap, Revision 1.0 (Mon Aug 13 17:45:38 UTC 2018)

3001008+88272 [188544+180745]=0x34cbd0
[   1.0000000] arcemu: unknown console "", using serial
[   1.0000000] Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
[   1.0000000]     2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017,
[   1.0000000]     2018 The NetBSD Foundation, Inc.  All rights reserved.
[   1.0000000] Copyright (c) 1982, 1986, 1989, 1991, 1993
[   1.0000000]     The Regents of the University of California.  All rights reserved.

[   1.0000000] NetBSD 8.99.21 (GENERIC32_IP12) #1: Sun Aug 12 14:48:19 UTC 2018
[   1.0000000] 	naruaki@xserve:/usr/obj.sgimips/sys/arch/sgimips/compile/GENERIC32_IP12
[   1.0000000] total memory = 32768 KB
[   1.0000000] (0 reserved for ARCS)
[   1.0000000] avail memory = 28988 KB
[   1.0000000] WARNING: module error: sequencer: can't find builtin dependency `midi'
[   1.0000000] mainbus0 (root): SGI-IP12 [SGI, IP12], 1 processor
[   1.0000000] cpu0 at mainbus0: MIPS R3000A CPU (0x230) Rev. 3.0 with MIPS R3010 FPC Rev. 4.0
[   1.0000000] cpu0: 32KB/4B direct-mapped Instruction cache, 64 TLB entries
[   1.0000000] cpu0: 32KB/4B direct-mapped write-through Data cache
[   1.0000000] int0 at mainbus0 addr 0x1fb801c0
[   1.0000050] pic0 at mainbus0 addr 0x1fa00000
[   1.0000050] pic0: Revision B: dblk (0x2), iblk (0x8)
[   1.0000050] pic0: Indigo R3000, board revision 1
[   1.0000050] pic0: cache disabled, store partial, bus drive
[   1.0000050] gio0 at pic0
[   1.0000050] light0 at gio0: SGI LG2 (board revision 2)
[   1.0000050] wsdisplay0 at light0 kbdmux 1
[   1.0000050] hpc0 at gio0: SGI HPC1.5 (onboard)
[   1.0000050] zsc0 at hpc0 offset 0xd10arcemu: unknown console "", using serial

[   1.0000050] zstty0 at zsc0 channel 1 (console i/o)
[   1.0000050] zstty1 at zsc0 channel 0
[   1.0000050] zsc1 at hpc0 offset 0xd00arcemu: unknown console "", using serial

[   1.0000050] zsms0 at zsc1 channel 1: baud rate 4800
[   1.0000050] wsmouse0 at zsms0 mux 0
[   1.0000050] zskbd0 at zsc1 channel 0: baud rate 600
[   1.0000050] wskbd0 at zskbd0 mux 1
[   1.0000050] sq0 at hpc0 offset 0x100: SGI Seeq 8003
[   1.0000050] sq0: Ethernet address 08:00:69:06:59:03
[   1.0000050] wdsc0 at hpc0 offset 0x11f: WD33C93B (20.0 MHz clock, BURST DMA, SCSI ID 0)
[   1.0000050] wdsc0: microcode revision 0x0c, Fast SCSI
[   1.0000050] scsibus0 at wdsc0: 8 targets, 8 luns per target
[   1.0000050] dpclock0 at mainbus0 addr 0x1fb80e00
[   1.8688770] scsibus0: waiting 2 seconds for devices to settle...
[   2.4453090] WARNING: module error: sequencer: can't find builtin dependency `midi'
[   4.6952690] sd0 at scsibus0 target 4 lun 0: <IBM, DORS-32160, WA6A> disk fixed
[   4.8652930] sd0: 2015 MB, 6703 cyl, 5 head, 123 sec, 512 bytes/sect x 4127761 sectors
[   4.9552690] sd0: async, 8-bit transfers
[   5.7653090] boot device: <unknown>
[   5.8029650] root device: sd0a
[   7.8556770] dump device (default sd0b): 
[   8.8468530] file system (default generic): 
[   9.4898850] root on sd0a dumps on sd0b
[   9.6667410] root file system type: ffs
[   9.7167490] kern.module.path=/stand/sgimips/8.99.21/modules
[   9.7885490] WARNING: preposterous TOD clock time
[   9.8439730] WARNING: using filesystem time
[   9.8931810] WARNING: CHECK AND RESET THE DATE!
[   9.9967490] init path (default /sbin/init): 
[  10.8457570] init: trying /sbin/init
[  10.9525010] pid 1(init): ABI set to O32 (e_flags=0x1007)
Sun Aug 12 15:23:18 UTC 2018
Starting root file system check:
/dev/rsd0a: file system is clean; not checking
swapctl: setting dump device to /dev/sd0b
swapctl: adding /dev/sd0b as swap device at priority 0
Starting file system checks:
random_seed: /var/db/entropy-file: Not present
Setting tty flags.
Setting sysctl variables:
Starting network.
/etc/rc: WARNING: $hostname not set.
Configuring network interfaces: sq0.
Adding interface aliases:.
add net default: gateway 192.168.1.1
Waiting for DAD to complete for statically configured addresses...
Building databases: dev, utmp, utmpx.
Starting syslogd.
Mounting all file systems...
Clearing temporary files.
Checking quotas: done.
Setting securelevel: kern.securelevel: 0 -> 1
swapctl: setting dump device to /dev/sd0b
Starting virecover.
Checking for core dump...
savecore: (null): kvm_openfiles: /netbsd: No such file or directory
Aug 12 15:24:04  savecore: (null): kvm_openfiles: /netbsd: No such file or directory
Starting local daemons:.
Updating motd.
/usr/sbin/postconf: warning: valid_hostname: empty hostname
/usr/sbin/postconf: fatal: unable to use my own hostname
Aug 12 15:24:32  postfix[351]: fatal: unable to use my own hostname
/etc/rc.d/postfix exited with code 1
Starting inetd.
Starting cron.
The following components reported failures:
    /etc/rc.d/postfix
See /var/run/rc.log for more information.
Sun Aug 12 15:24:37 UTC 2018

NetBSD/sgimips (Amnesiac) (console)

login: root
Aug 12 15:24:47  login: ROOT LOGIN (root) on tty console
Last login: Wed Aug  8 01:11:19 2018 on console
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
    2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017,
    2018 The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
    The Regents of the University of California.  All rights reserved.

NetBSD 8.99.21 (GENERIC32_IP12) #1: Sun Aug 12 14:48:19 UTC 2018

Welcome to NetBSD!

This system is running a development snapshot of the NetBSD operating system,
also known as NetBSD-current.  It is very possible that it has serious bugs,
regressions, broken features or other problems.  Please bear this in mind
and use the system with care.

You are encouraged to test this version as thoroughly as possible.  Should you
encounter any problem, please report it back to the development team using the
send-pr(1) utility (requires a working MTA).  If yours is not properly set up,
use the web interface at: http://www.NetBSD.org/support/send-pr.html

Thank you for helping us test and improve NetBSD.

We recommend that you create a non-root account and use su(1) for root access.
# uname -a
NetBSD  8.99.21 NetBSD 8.99.21 (GENERIC32_IP12) #1: Sun Aug 12 14:48:19 UTC 2018  naruaki@xserve:/usr/obj.sgimips/sys/arch/sgimips/compile/GENERIC32_IP12 sgimips

Tested on Indy and Indigo R3000, Indigo R4000

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: port-sgimips-maintainer->tsutsui
Responsible-Changed-By: tsutsui@NetBSD.org
Responsible-Changed-When: Sun, 02 Sep 2018 15:41:41 +0000
Responsible-Changed-Why:
I'll handle this.


State-Changed-From-To: open->analyzed
State-Changed-By: tsutsui@NetBSD.org
State-Changed-When: Sun, 02 Sep 2018 15:41:41 +0000
State-Changed-Why:
Alignment calculation code has been removed in wdsc.c rev 1.34 for common
bus_space in arch/mips changes, but it should not be changed because
the asr address was not used for bus_space but uint32_t accesses.
It's okay to just restore them.


From: "Izumi Tsutsui" <tsutsui@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/53522 CVS commit: src/sys/arch/sgimips/hpc
Date: Sun, 2 Sep 2018 16:18:50 +0000

 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.

State-Changed-From-To: analyzed->needs-pullups
State-Changed-By: tsutsui@NetBSD.org
State-Changed-When: Sun, 02 Sep 2018 16:25:43 +0000
State-Changed-Why:


State-Changed-From-To: needs-pullups->pending-pullups
State-Changed-By: tsutsui@NetBSD.org
State-Changed-When: Sun, 09 Sep 2018 04:53:05 +0000
State-Changed-Why:
[pullup-8 #1017]


State-Changed-From-To: pending-pullups->closed
State-Changed-By: tsutsui@NetBSD.org
State-Changed-When: Fri, 14 Sep 2018 19:43:43 +0000
State-Changed-Why:
Pulled up.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.