Subject: kern/27421: Ultra 5 panics on boot with DIAGNOSTIC kernel
To: None <gnats-bugs@gnats.NetBSD.org>
From: Martin Husemann <martin@duskware.de>
List: netbsd-bugs
Date: 10/24/2004 16:10:11
>Number:         27421
>Category:       kern
>Synopsis:       Ultra 5 panics on boot with DIAGNOSTIC kernel
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Oct 24 14:11:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     Martin Husemann
>Release:        NetBSD 2.99.10
>Organization:
>Environment:
System: NetBSD 2.99.10 (SETTINGSUN) #0: Sun Oct 24 15:40:26 CEST 2004      martin@night-porter.duskware.de:/usr/src/sys/arch/sparc64/compile/SETTINGSUN
Architecture: sparc64
Machine: sparc64
>Description:

raidattach: Asked for 8 units                
Kernelized RAIDframe activated
panic: wdc_exec_command: polled command not done
kdb breakpoint at 11b2b20                       
Stopped in pid 3.1 (atabus0) at netbsd:cpu_Debugger+0x4:        nop
db> bt                                                             
wdc_exec_command(3, d007870, fffffffffffffffa, 1, d007b60, 1000000) at netbsd:wdc_exec_command+0x1f8
ata_get_params(283c250, 18, d007b60, 6, fffffffffffffffd, 1877e98) at netbsd:ata_get_params+0xb4
wdc_drvprobe(283c208, 0, 359, 11d7a90, 1f, 1819400) at netbsd:wdc_drvprobe+0x2b0
atabusconfig(26f9100, 0, 1808198, 1874828, 1, 1877e98) at netbsd:atabusconfig+0x14
atabus_thread(26f9100, 0, 359, 11d7a90, 0, 10c86a0) at netbsd:atabus_thread+0x48
proc_trampoline(0, 0, 0, 0, 0, 0) at netbsd:proc_trampoline+0x4

(gdb) list *(wdc_exec_command+0x1f8)
0x1069720 is in wdc_exec_command (../../../../dev/ic/wdc.c:1285).
1280            s = splbio();
1281            ata_exec_xfer(chp, xfer);
1282    #ifdef DIAGNOSTIC
1283            if ((ata_c->flags & AT_POLL) != 0 &&
1284                (ata_c->flags & AT_DONE) == 0)
1285                    panic("wdc_exec_command: polled command not done");
1286    #endif
1287            if (ata_c->flags & AT_DONE) {
1288                    ret = ATACMD_COMPLETE;
1289            } else {

>How-To-Repeat:

Boot a DIAGNOSTIC kernel on a U5 with two disks.
Relevant dmesg part of the working kernel:

cmdide0 at pci1 dev 3 function 0
cmdide0: CMD Technology PCI0646 (rev. 0x03)
cmdide0: bus-master DMA support present    
cmdide0: primary channel configured to native-PCI mode
cmdide0: using ivec 1820 for native-PCI interrupt     
atabus0 at cmdide0 channel 0                     
cmdide0: secondary channel configured to native-PCI mode
atabus1 at cmdide0 channel 1                            
...
Kernelized RAIDframe activated                            
wd0 at atabus0 drive 0: <Maxtor 32049H2>
wd0: drive supports 16-sector PIO transfers, LBA addressing
wd0: 19541 MB, 39704 cyl, 16 head, 63 sec, 512 bytes/sect x 40021632 sectors
wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 5 (Ultra/100)    
wd0(cmdide0:0:0): using PIO mode 4, DMA mode 2 (using DMA data transfers)
wd1 at atabus1 drive 0: <WDC WD205AA>                                    
wd1: drive supports 16-sector PIO transfers, LBA addressing
wd1: 19569 MB, 39761 cyl, 16 head, 63 sec, 512 bytes/sect x 40079088 sectors
wd1: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 4 (Ultra/66)     
wd1(cmdide0:1:0): using PIO mode 4, DMA mode 2 (using DMA data transfers)
raid0: RAID Level 1                                                      
raid0: Components: /dev/wd0d /dev/wd1d
raid0: Total Sectors: 38657664 (18875 MB)


This probably is related to the shared ata channel used for this controller,
and the two disks attached (but I'm not sure).

>Fix:
n/a
>Release-Note:
>Audit-Trail:
>Unformatted: