From hmo@sep.hamburg.com  Tue Jan 16 03:24:49 2001
Return-Path: <hmo@sep.hamburg.com>
Received: from sep.hamburg.com (sep.hamburg.com [194.64.112.14])
	by hub.freebsd.org (Postfix) with ESMTP id 0792737B699
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 16 Jan 2001 03:24:48 -0800 (PST)
Received: (from hmo@localhost)
	by sep.hamburg.com (8.11.1/8.11.1/hmo03sep00) id f0GBKXS46352;
	Tue, 16 Jan 2001 12:20:33 +0100 (CET)
	(envelope-from hmo)
Message-Id: <200101161120.f0GBKXS46352@sep.hamburg.com>
Date: Tue, 16 Jan 2001 12:20:33 +0100 (CET)
From: send-pr@oldach.net
Reply-To: send-pr@oldach.net
To: FreeBSD-gnats-submit@freebsd.org
Cc: send-pr@oldach.net
Subject: ahc broken in STABLE
X-Send-Pr-Version: 3.2

>Number:         24379
>Category:       kern
>Synopsis:       ahc broken in STABLE
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    gibbs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jan 16 03:30:05 PST 2001
>Closed-Date:    Wed Jan 31 10:58:26 PST 2001
>Last-Modified:  Wed Jan 31 11:01:24 PST 2001
>Originator:     Helge Oldach
>Release:        FreeBSD 4.2-STABLE i386
>Organization:
>Environment:

The ahc/aic driver changes that were MFC'd to -STABLE between 20th
December 2000 and yesterday (15th January 2001) break a HP NetServer
4/66 LC (EISA box) with AIC-7770 twin channel controller.

>Description:

dmesg of a working 4.2-STABLE of 20th December 2000:

    Copyright (c) 1992-2000 The FreeBSD Project.
    Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
            The Regents of the University of California. All rights reserved.
    FreeBSD 4.2-STABLE #0: Wed Dec 20 14:55:40 CET 2000
        toor@com:/usr/obj/usr/src/sys/GENERIC
    Timecounter "i8254"  frequency 1193182 Hz
    CPU: i486 DX2 (486-class CPU)
      Origin = "GenuineIntel"  Id = 0x435  Stepping = 5
      Features=0x3<FPU,VME>
    real memory  = 41943040 (40960K bytes)
    config> eisa 12
    config> di adv0
    config> di aha0
    config> di aic0
    config> di ata1
    config> di bt0
    config> di cs0
    config> di ed0
    config> di fe0
    config> di ie0
    config> di lnc0
    config> di pcic0
    config> di sn0
    config> q
    avail memory = 36581376 (35724K bytes)
    Preloaded elf kernel "kernel" at 0xc0438000.
    Preloaded userconfig_script "/boot/kernel.conf" at 0xc043809c.
    md0: Malloc disk
    npx0: <math processor> on motherboard
    npx0: INT 16 interface
    eisa0: <EISA bus> on motherboard
    mainboard0: <HWPc081 (System Board)> on eisa0 slot 0
    ep0: <3Com 3C579-BNC EISA Network Adapter> at 0x1000-0x100f, 0x1c80-0x1c89
    ep0: irq 5 (level) on eisa0 slot 1
    ep0: Ethernet address 00:20:af:73:f3:48
    ahc0: <Adaptec aic7770 SCSI adapter> at 0xbc00-0xbcff, irq 15 (level)
    ahc0: on eisa0 slot 11
    aic7770: Twin Channel, A SCSI Id=7, B SCSI Id=7, primary A, 4/255 SCBs
    isa0: <ISA bus> on motherboard
    fdc0: <NEC 72065B or clone> at port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on isa0
    fdc0: FIFO enabled, 8 bytes threshold
    fd0: <1440-KB 3.5" drive> on fdc0 drive 0
    atkbdc0: <Keyboard controller (i8042)> at port 0x60,0x64 on isa0
    atkbd0: <AT Keyboard> flags 0x1 irq 1 on atkbdc0
    kbd0 at atkbd0
    psm0: <PS/2 Mouse> irq 12 on atkbdc0
    psm0: model Generic PS/2 mouse, device ID 0
    vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
    sc0: <System console> at flags 0x100 on isa0
    sc0: VGA <16 virtual consoles, flags=0x300>
    sio0 at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0
    sio0: type 16550A
    sio1 at port 0x2f8-0x2ff irq 3 on isa0
    sio1: type 16550A
    ppc0: <Parallel port> at port 0x378-0x37f irq 7 on isa0
    ppc0: Generic chipset (NIBBLE-only) in COMPATIBLE mode
    plip0: <PLIP network interface> on ppbus0
    lpt0: <Printer> on ppbus0
    lpt0: Interrupt-driven port
    ppi0: <Parallel I/O> on ppbus0
    Waiting 15 seconds for SCSI devices to settle
    da0 at ahc0 bus 0 target 0 lun 0
    da0: <MICROP 3243-19 1128RQAV RQAV> Fixed Direct Access SCSI-2 device
    da0: 10.000MB/s transfers (10.000MHz, offset 15), Tagged Queueing Enabled
    da0: 4095MB (8388315 512 byte sectors: 255H 63S/T 522C)
    Mounting root from ufs:/dev/da0s1a

dmesg of a broken kernel as of today:

    Copyright (c) 1992-2001 The FreeBSD Project.
    Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
            The Regents of the University of California. All rights reserved.
    FreeBSD 4.2-STABLE #0: Tue Jan 16 08:13:04 CET 2001
        toor@com:/usr/obj/usr/src/sys/GENERIC
    Timecounter "i8254"  frequency 1193182 Hz
    CPU: i486 DX2 (486-class CPU)
      Origin = "GenuineIntel"  Id = 0x435  Stepping = 5
      Features=0x3<FPU,VME>
    real memory  = 41943040 (40960K bytes)
    config> eisa 12
    config> di adv0
    config> di aha0
    config> di aic0
    config> di ata1
    config> di bt0
    config> di cs0
    config> di ed0
    config> di fe0
    config> di ie0
    config> di lnc0
    config> di pcic0
    config> di sn0
    config> q
    avail memory = 36581376 (35724K bytes)
    Preloaded elf kernel "kernel.broken" at 0xc043e000.
    Preloaded userconfig_script "/boot/kernel.conf" at 0xc043e0a4.
    md0: Malloc disk
    npx0: <math processor> on motherboard
    npx0: INT 16 interface
    eisa0: <EISA bus> on motherboard
    mainboard0: <HWPc081 (System Board)> on eisa0 slot 0
    ep0: <3Com 3C579-BNC EISA Network Adapter> at 0x1000-0x100f, 0x1c80-0x1c89
    ep0: irq 5 (level) on eisa0 slot 1
    ep0: Ethernet address 00:20:af:73:f3:48
    ahc0: <Adaptec aic7770 SCSI adapter> at 0xbc00-0xbcff, irq 15 (level)
    ahc0: on eisa0 slot 11


    Fatal trap 12: page fault while in kernel mode
    fault virtual address   = 0x40
    fault code              = supervisor read, page not present
    instruction pointer     = 0x8:0xc01af866
    stack pointer           = 0x10:0xc045fea0
    frame pointer           = 0x10:0xc045fea0
    code segment            = base 0x0, limit 0xfffff, type 0x1b
                            = DPL 0, pres 1, def32 1, gran 1
    processor eflags        = interrupt enabled, resume, IOPL = 0
    current process         = 0 (swapper)
    interrupt mask          = net tty bio cam
    trap number             = 12
    panic: page fault
    Uptime: 0s
    Automatic reboot in 15 seconds - press a key on the console to abort

>How-To-Repeat:

	

>Fix:

	


>Release-Note:
>Audit-Trail:

From: "Matthew N. Dodd" <winter@jurai.net>
To: send-pr@oldach.net
Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: kern/24379: ahc broken in STABLE
Date: Tue, 16 Jan 2001 14:01:45 -0500 (EST)

 On Tue, 16 Jan 2001 send-pr@oldach.net wrote:
 >     ahc0: <Adaptec aic7770 SCSI adapter> at 0xbc00-0xbcff, irq 15 (level)
 >     ahc0: on eisa0 slot 11
 > 
 > 
 >     Fatal trap 12: page fault while in kernel mode
 >     fault virtual address   = 0x40
 >     fault code              = supervisor read, page not present
 >     instruction pointer     = 0x8:0xc01af866
 >     stack pointer           = 0x10:0xc045fea0
 >     frame pointer           = 0x10:0xc045fea0
 >     code segment            = base 0x0, limit 0xfffff, type 0x1b
 >                             = DPL 0, pres 1, def32 1, gran 1
 >     processor eflags        = interrupt enabled, resume, IOPL = 0
 >     current process         = 0 (swapper)
 >     interrupt mask          = net tty bio cam
 >     trap number             = 12
 >     panic: page fault
 >     Uptime: 0s
 >     Automatic reboot in 15 seconds - press a key on the console to abort
 
 'rid' is not being initialized to '0' in
 ahc_eisa.c:aic7770_map_registers() before being used in the first
 bus_alloc_resource() call.  (IIRC and have not already fixed this
 problem.)
 
 -- 
 | Matthew N. Dodd  | '78 Datsun 280Z | '75 Volvo 164E | FreeBSD/NetBSD  |
 | winter@jurai.net |       2 x '84 Volvo 245DL        | ix86,sparc,pmax |
 | http://www.jurai.net/~winter | This Space For Rent  | ISO8802.5 4ever |
 
 

From: helge@oldach.net (Helge Oldach)
To: winter@jurai.net (Matthew N. Dodd)
Cc: send-pr@oldach.net, FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: kern/24379: ahc broken in STABLE
Date: Wed, 17 Jan 2001 09:24:54 +0100 (CET)

 Matthew N. Dodd:
 > 'rid' is not being initialized to '0' in
 > ahc_eisa.c:aic7770_map_registers() before being used in the first
 > bus_alloc_resource() call.  (IIRC and have not already fixed this
 > problem.)
 
 The same is also in aic7770_probe. I have fixed both, but still get the
 same trap at the same virtual address. I suspect that it happens a bit
 earlier, e.g. during device probe.
 
Responsible-Changed-From-To: freebsd-bugs->gibbs 
Responsible-Changed-By: dwmalone 
Responsible-Changed-When: Wed Jan 17 01:57:15 PST 2001 
Responsible-Changed-Why:  
The ahc driver is Justin's. 
. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=24379 
State-Changed-From-To: open->closed 
State-Changed-By: ken 
State-Changed-When: Wed Jan 31 10:58:26 PST 2001 
State-Changed-Why:  
Submitter says (on the freebsd-bugs list) that Justin's checkin to 
RELENG_4 on 1/27/2001 fixed his problem. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=24379 
>Unformatted:
