From owner-freebsd-bugs Sat Oct 12 08:50:05 1996 Return-Path: owner-bugs Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id IAA06395 for bugs-outgoing; Sat, 12 Oct 1996 08:50:05 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id IAA06389; Sat, 12 Oct 1996 08:50:02 -0700 (PDT) Resent-Date: Sat, 12 Oct 1996 08:50:02 -0700 (PDT) Resent-Message-Id: <199610121550.IAA06389@freefall.freebsd.org> Resent-From: gnats (GNATS Management) Resent-To: freebsd-bugs Resent-Reply-To: FreeBSD-gnats@freefall.FreeBSD.org, simokawa@sat.t.u-tokyo.ac.jp Received: from uno.sat.t.u-tokyo.ac.jp (uno.sat.t.u-tokyo.ac.jp [133.11.70.160]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id IAA06176 for ; Sat, 12 Oct 1996 08:45:31 -0700 (PDT) Received: by uno.sat.t.u-tokyo.ac.jp (8.7.3+2.6Wbeta5/8.7.3) id AAA05137; Sun, 13 Oct 1996 00:45:11 +0900 (JST) Message-Id: <199610121545.AAA05137@uno.sat.t.u-tokyo.ac.jp> Date: Sun, 13 Oct 1996 00:45:11 +0900 (JST) From: Hidetoshi Shimokawa Reply-To: simokawa@sat.t.u-tokyo.ac.jp To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: kern/1779: recent ncr.c change doesn't work with ncr875 Sender: owner-bugs@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >Number: 1779 >Category: kern >Synopsis: recent ncr.c change doesn't work with ncr875 >Confidential: yes >Severity: serious >Priority: high >Responsible: freebsd-bugs >State: open >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Oct 12 08:50:01 PDT 1996 >Last-Modified: >Originator: Hidetoshi Shimokawa >Organization: Univ. of Tokyo >Release: FreeBSD 2.2-CURRENT i386 >Environment: With Tekram DC-390U >Description: kernel panics with trap 12 during probe of ncr875. It is because ncr_getlock is called before np->reg hasn't been initialized. >How-To-Repeat: Build current kernel and reboot. >Fix: - Apply the following patch or - Define NCR_IOMAPPED (I have not checked yet) *** ncr.c.orig Sat Oct 12 18:49:13 1996 --- ncr.c Sun Oct 13 00:30:31 1996 *************** *** 3286,3291 **** --- 3286,3299 ---- if (!pci_map_mem (config_id, 0x14, &np->vaddr, &np->paddr)) return; + /* + ** Make the controller's registers available. + ** Now the INB INW INL OUTB OUTW OUTL macros + ** can be used safely. + */ + + np->reg = (struct ncr_reg*) np->vaddr; + #ifdef NCR_IOMAPPED /* ** Try to map the controller chip into iospace. *************** *** 3340,3353 **** np->jump_tcb.l_cmd = SCR_JUMP; np->jump_tcb.l_paddr = NCB_SCRIPT_PHYS (np, abort); - - /* - ** Make the controller's registers available. - ** Now the INB INW INL OUTB OUTW OUTL macros - ** can be used safely. - */ - - np->reg = (struct ncr_reg*) np->vaddr; /* ** Get SCSI addr of host adapter (set by bios?). --- 3348,3353 ---- >Audit-Trail: >Unformatted: