Subject: kern/14780: Western Digital WD400EB not recognized correctly on DEC PWS 500au
To: None <gnats-bugs@gnats.netbsd.org>
From: None <reinoud@netbsd.org>
List: netbsd-bugs
Date: 11/30/2001 03:19:48
>Number:         14780
>Category:       kern
>Synopsis:       Western Digital WD400EB not recognized correctly on DEC PWS 500au (ATA/ATAPI lossage?)
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Nov 29 18:21:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Reinoud Zandijk
>Release:        Wed Oct 31 02:50:46 CET 2001 <NetBSD-current source date>
>Organization:
NetBSD developer
	
>Environment:
NetBSD 1.5Y (config.starbuck) #0: Wed Oct 31 02:50:46 CET 2001
Digital Personal WorkStation 500au, 500MHz, s/n 

>Description:
The Western Digital WD400EB disk (40 Gb) is reported by the AlphaBIOS as
`WDC, WD400EB-00CPF0, 06.0, 38166 Mb' (Atapi#0, SCSI bus 0, SCSI id 0) and
operates OK; i can create partitions and format them with the AlphaBIOS, so
the hardware is working .... Western Digital's conception of Gb in the
specs is 10^9 so thats consistent too.

NetBSD, as well as the SRM however (the unix/OSF part of the ``bios'' like
a OFW)  does detect it but doesn't recognize it but only reports a broken
identifier string just like NetBSD does and even Red Hat 7.1 Linux. This
string and the description it gives are allways the same... i.e. its not
noise. The OSF-pal is version 20116.

Have looked at the blocks the disc returned but there might be either
problems with the DMA or so but PIO mode 4 alone (forced with flags)  
doesn't work either...

Accessing the wd0 with `atactl wd0 identify' gives the following results :

Nov 30 03:07:22 starbuck /netbsd: stray isa irq 14
Nov 30 03:07:32 starbuck /netbsd: pciide0:0:0: lost interrupt
Nov 30 03:07:32 starbuck /netbsd:       type: ata tc_bcount: 512 tc_skip: 0
Nov 30 03:07:32 starbuck /netbsd: pciide0:0:0: geometry timed out
Nov 30 03:07:32 starbuck /netbsd: wd0c: device timeout reading fsbn 0 (wd0 bn 0; cn 0 tn 0 sn 0), retrying
..... repeated a few times until it stops logging stray isa irq 14's and 
gives :

starbuck# atactl wd0 identify
Model: oÿo?, Rev: o , Serial #: 
Device type: ATAPI, fixed
Device capabilities:

so i am a bit puzzled but might confirm my ATAPI `sd' type disc hunch ....  
even though several ppl. on ICB have corrected me over and over again that
that was sooo unlikely .... that it wasn't so.

Dunno what to do to fix it... i've had several debug patches and i still 
can't really put my finger on it ...


The uncut dmesg is as follows :
-----------------

[ using 603656 bytes of netbsd ELF symbol table ]
consinit: not using prom console
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001
    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 1.5Z (ALPHA-$Revision: 1.157 $) #0: Fri Nov 30 02:59:53 CET 2001
    
imago@starbuck:/usr/sources/cvs.netbsd.org/syssrc/sys/arch/alpha/compile/ALPHA
Digital Personal WorkStation 500au, 500MHz, s/n 
8192 byte page size, 1 processor.
total memory = 128 MB
(1896 KB reserved for PROM, 126 MB used by NetBSD)
avail memory = 109 MB
using 820 buffers containing 6560 KB of memory
mainbus0 (root)
cpu0 at mainbus0: ID 0 (primary), 21164A-0
cpu0: VAX FP support, IEEE FP support, Primary Eligible
cpu0: Architecture extensions: 1<BWX>
cia0 at mainbus0: DECchip 2117x Core Logic Chipset (Pyxis), pass 1
cia0: extended capabilities: 1<BWEN>
cia0: using BWX for PCI config access
pci0 at cia0 bus 0
pci0: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
de0 at pci0 dev 3 function 0
de0: interrupting at dec 550 irq 0
de0: DEC 21143 [10-100Mb/s] pass 3.0
de0: address 00:00:f8:76:43:f5
de0: enabling 10baseT port
sio0 at pci0 dev 7 function 0: Contaq Microsystems 82C693 PCI-ISA Bridge (rev. 0x00)
pciide0 at pci0 dev 7 function 1: Cypress 82C693 IDE Controller (rev. 0x00)
pciide0: bus-master DMA support present
pciide0: primary channel wired to compatibility mode
wd0 at pciide0 channel 0 drive 0: <\^P\M^?\^P?>
wd0: drive supports 254-sector PIO transfers, chs addressing
wd0: 16383 PB, 4096 cyl, 4159 head, 21569 sec, 512 bytes/sect x -1933578240 sectors
wd0: 32-bit data port
pciide0: primary channel interrupting at isa irq 14
wd0(pciide0:0:0): using PIO mode 0
pciide1 at pci0 dev 7 function 2: Cypress 82C693 IDE Controller (rev. 0x00)
pciide1: hardware does not support DMA
pciide1: primary channel wired to compatibility mode
atapibus0 at pciide1 channel 0: 2 targets
cd0 at atapibus0 drive 0: <TOSHIBA CD-ROM XM-6302B, , 1012> type 5 cdrom removable
cd0: 32-bit data port
cd0: drive supports PIO mode 4, DMA mode 2
cd1 at atapibus0 drive 1: <DVD-ROM DDU1621, , VER S1.> type 5 cdrom removable
cd1: 32-bit data port
cd1: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 2 (Ultra/33)
pciide1: secondary channel interrupting at isa irq 15
cd0(pciide1:0:0): using PIO mode 4
cd1(pciide1:0:1): using PIO mode 4
ohci0 at pci0 dev 7 function 3: Contaq Microsystems 82C693 PCI-ISA Bridge (rev. 0x00)
ohci0: interrupting at isa irq 10
ohci0: OHCI version 1.0, legacy support
usb0 at ohci0: USB revision 1.0
uhub0 at usb0
uhub0: Contaq Microsys OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
ppb0 at pci0 dev 20 function 0: Digital Equipment DECchip 21152 PCI-PCI Bridge (rev. 0x02)
pci1 at ppb0 bus 1
pci1: i/o space, memory space enabled, rd/line, wr/inv ok
isp0 at pci1 dev 4 function 0
isp0: interrupting at dec 550 irq 3
isp0: NVRAM CHAN 0 FTHRSH 2 IID 7 RESETD 5 RETRYC 0 RETRYD 0 ASD 0x9
isp0: NVRAM RAAN 0x1 DLAN 0x1 DDMAB 0x1 CDMAB 0x1 SELTIME 250 MQD 256
isp0: NVRAM CHAN 0 TGT 0 FLAGS 0xfd00 0x8/0x19
isp0: NVRAM CHAN 0 TGT 1 FLAGS 0xfd00 0x8/0x19
isp0: NVRAM CHAN 0 TGT 2 FLAGS 0xfd00 0x8/0x19
isp0: NVRAM CHAN 0 TGT 3 FLAGS 0xfd00 0x8/0x19
isp0: NVRAM CHAN 0 TGT 4 FLAGS 0xfd00 0x8/0x19
isp0: NVRAM CHAN 0 TGT 5 FLAGS 0xfd00 0x8/0x19
isp0: NVRAM CHAN 0 TGT 6 FLAGS 0xfd00 0x8/0x19
isp0: NVRAM CHAN 0 TGT 7 FLAGS 0xfd00 0x8/0x19
isp0: NVRAM CHAN 0 TGT 8 FLAGS 0xfd00 0x8/0x19
isp0: NVRAM CHAN 0 TGT 9 FLAGS 0xfd00 0x8/0x19
isp0: NVRAM CHAN 0 TGT 10 FLAGS 0xfd00 0x8/0x19
isp0: NVRAM CHAN 0 TGT 11 FLAGS 0xfd00 0x8/0x19
isp0: NVRAM CHAN 0 TGT 12 FLAGS 0xfd00 0x8/0x19
isp0: NVRAM CHAN 0 TGT 13 FLAGS 0xfd00 0x8/0x19
isp0: NVRAM CHAN 0 TGT 14 FLAGS 0xfd00 0x8/0x19
isp0: NVRAM CHAN 0 TGT 15 FLAGS 0xfd00 0x8/0x19
isp0: Initial Settings bus0 tgt0 flags 0xc5c0 off 0x0 per 0x0
isp0: Initial Settings bus0 tgt1 flags 0xc5c0 off 0x0 per 0x0
isp0: Initial Settings bus0 tgt2 flags 0xc5c0 off 0x0 per 0x0
isp0: Initial Settings bus0 tgt3 flags 0xc5c0 off 0x0 per 0x0
isp0: Initial Settings bus0 tgt4 flags 0xc5c0 off 0x0 per 0x0
isp0: Initial Settings bus0 tgt5 flags 0xc5c0 off 0x0 per 0x0
isp0: Initial Settings bus0 tgt6 flags 0xc5c0 off 0x0 per 0x0
isp0: Initial Settings bus0 tgt7 flags 0xc5c0 off 0x0 per 0x0
isp0: Initial Settings bus0 tgt8 flags 0xc5c0 off 0x0 per 0x0
isp0: Initial Settings bus0 tgt9 flags 0xc5c0 off 0x0 per 0x0
isp0: Initial Settings bus0 tgt10 flags 0xc5c0 off 0x0 per 0x0
isp0: Initial Settings bus0 tgt11 flags 0xc5c0 off 0x0 per 0x0
isp0: Initial Settings bus0 tgt12 flags 0xc5c0 off 0x0 per 0x0
isp0: Initial Settings bus0 tgt13 flags 0xc5c0 off 0x0 per 0x0
isp0: Initial Settings bus0 tgt14 flags 0xc5c0 off 0x0 per 0x0
isp0: Initial Settings bus0 tgt15 flags 0xc5c0 off 0x0 per 0x0
scsibus0 at isp0: 16 targets, 8 luns per target
rtk0 at pci1 dev 8 function 0: RealTek 8139 10/100BaseTX
rtk0: interrupting at dec 550 irq 12
rtk0: Ethernet address 00:10:a7:0a:de:e7
ukphy0 at rtk0 phy 7: Generic IEEE 802.3u media interface
ukphy0: OUI 0x000000, model 0x0000, rev. 0
ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
vga0 at pci1 dev 10 function 0: Texas Instruments TVP4020 Permedia 2 (rev. 0x01)
wsdisplay0 at vga0: console (80x25, vt100 emulation)
isa0 at sio0
com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo
com1 at isa0 port 0x2f8-0x2ff irq 3: ns16550a, working fifo
pckbc0 at isa0 port 0x60-0x64
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pms0 at pckbc0 (aux slot)
pckbc0: using irq 12 for aux slot
wsmouse0 at pms0
lpt0 at isa0 port 0x3bc-0x3bf irq 7
sb0 at isa0 port 0x220-0x237 irq 5 drq 1: dsp v3.01
audio0 at sb0: half duplex, mmap, independent
midi at sb0 not configured
opl at sb0 not configured
pcppi0 at isa0 port 0x61
midi0 at pcppi0: PC speaker
spkr0 at pcppi0
isabeep0 at pcppi0
fdc0 at isa0 port 0x3f0-0x3f7 irq 6 drq 2
mcclock0 at isa0 port 0x70-0x71: mc146818 or compatible
scsibus0: waiting 2 seconds for devices to settle...
sd0 at scsibus0 target 0 lun 0: <COMPAQ, HD00441730, 3207> SCSI2 0/direct fixed
sd0: 4094 MB, 6962 cyl, 6 head, 200 sec, 512 bytes/sect x 8386000 sectors
isp0: bus 0 set tgt 0 flags 0xfd00 off 0x8 period 0x19
sd0: sync (100.0ns offset 8), 16-bit (20.000MB/s) transfers, tagged queueing
IPsec: Initialized Security Association Processing.
root on sd0a dumps on sd0b
mountroot: trying coda...
mountroot: trying nfs...
mountroot: trying ext2fs...
mountroot: trying ntfs...
mountroot: trying msdos...
mountroot: trying cd9660...
mountroot: trying lfs...
mountroot: trying ffs...
readclock: 1/11/30/2/1/40=>1007085700 (1007085637)
root file system type: ffs
init: copying out path `/sbin/init' 11
wsdisplay0: screen 1 added (80x25, vt100 emulation)
wsdisplay0: screen 2 added (80x25, vt100 emulation)
wsdisplay0: screen 3 added (80x25, vt100 emulation)
wsdisplay0: screen 4 added (80x25, vt100 emulation)
--------------------

	
>How-To-Repeat:
Put the harddisc in a DEC PWS 500au machine and boot the ALPHA kernel; it 
won't recognize the harddisc correctly and accessing it gives trouble. 
Going into the AlphaBIOS when typing in `nt' or `arc' shows the detected 
harddisc correctly.

	
>Fix:
Might be an ATAPI harddisc ? only *new* BIOS'ses can detect and work with
it i was told ... see also the www.wdc.com website for details.

	
>Release-Note:
>Audit-Trail:
>Unformatted:
 <synopsis of the problem (one line)>