Subject: Re: ATAPI tape drive not recognized!
To: Manuel Bouyer <bouyer@antioche.eu.org>
From: Paul Goyette <paul@whooppee.com>
List: netbsd-help
Date: 06/09/2002 10:18:46
Yeah, I already did that last night.

It seems that even though the BIOS can figure out the drive's IDENT, our
driver cannot.  It issues the ATAPI_IDENTIFY (0xa1) command, and then it
just times out after 10 seconds with status=0x50 (WDCS_DRDY | WDCS_DSC),
error=0x0, mask=0x08, and bits=0x08.  On the retry, the status comes
back with 0xd0 (WDCS_BSY | WDCS_DRDY | WDCS_DSC) and error = 0xd0.
wdc_c.flags=0x131 on both attempts.

So, it seems that the drive just never raises WDCS_DRQ (=0x08).

I even tried hacking it so that it would try the "write register" stuff
(normally enabled only for "old" drives?), but that failed, too.  Here's
the dmesg for that attempt.

NetBSD 1.6A (PC1) #11: Sat Jun  8 18:58:01 PDT 2002
    paul@pc1.whooppee.com:/usr/obj/.i386/sys/arch/i386/compile/PC1
cpu0: AMD Athlon Model 4 (Thunderbird) (686-class), 1394.54 MHz
cpu0: I-cache 64 KB 64b/line 2-way, D-cache 64 KB 64b/line 2-way
cpu0: L2 cache 256 KB 64b/line 16-way
cpu0: features 183fbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR>
cpu0: features 183fbff<PGE,MCA,CMOV,FGPAT,PSE36,MMX>
cpu0: features 183fbff<FXSR>
total memory = 255 MB
avail memory = 234 MB
using 3296 buffers containing 13184 KB of memory
BIOS32 rev. 0 found at 0xfb150
mainbus0 (root)
pci0 at mainbus0 bus 0: configuration mode 1
pci0: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
pchb0 at pci0 dev 0 function 0
pchb0: VIA Technologies VT8363 KT133 System Controller (rev. 0x03)
agp0 at pchb0: aperture at 0xd0000000, size 0x10000000
ppb0 at pci0 dev 1 function 0: VIA Technologies VT8363 KT133 PCI to AGP Bridge (rev. 0x00)
pci1 at ppb0 bus 1
pci1: i/o space, memory space enabled
vga0 at pci1 dev 0 function 0: Nvidia Corporation & SGS Thomson Microelectric Riva 128 (rev. 0x10)
wsdisplay0 at vga0 kbdmux 1: console (80x25, vt100 emulation)
wsmux1: connecting to wsdisplay0
pcib0 at pci0 dev 7 function 0
pcib0: VIA Technologies VT82C686A (Apollo KX133) PCI-ISA Bridge (rev. 0x40)
pciide0 at pci0 dev 7 function 1: VIA Technologies VT82C686A (Apollo KX133) ATA100 controller
pciide0: bus-master DMA support present
pciide0: primary channel configured to compatibility mode
pciide0:0: before reset, st0=0x50, st1=0x1
pciide0:0:0: after reset, sc=0x1 sn=0x1 cl=0x14 ch=0xeb
pciide0:0:1: after reset, sc=0x1 sn=0x1 cl=0x14 ch=0xeb
pciide0:0: wdcwait_reset() end, st0=0x10, st1=0x1
pciide0:0: after reset, ret_value=0x3
pciide0:0:0: after reset, sc=0x1 sn=0x1 cl=0x14 ch=0xeb
pciide0:0:1: after reset, sc=0x1 sn=0x1 cl=0x14 ch=0xeb
wdc_ata_get_parms
wdc_exec_command pciide0:0:0
wdc_exec_xfer 0xc0795000 channel 0 drive 0
wdcstart from wdc_exec_xfer, flags 0x0
wdcstart: xfer 0xc0795000 channel 0 drive 0
__wdccommand_start pciide0:0:0
wdcwait pciide0:0
wdccommand pciide0:0:0: command=0xa1 cylin=0 head=0 sector=0 count=0 precomp=0
__wdccommand_intr pciide0:0:0
wdcwait pciide0:0
wdcwait: timeout (time=100001), status 50 error 0 (mask 0x8 bits 0x8)
__wdccommand_done pciide0:0:0
wdc_ata_get_parms: wdc_c.flags=0x131
wdc_ata_get_parms
wdc_exec_command pciide0:0:0
wdc_exec_xfer 0xc0795000 channel 0 drive 0
wdcstart from wdc_exec_xfer, flags 0x0
wdcstart: xfer 0xc0795000 channel 0 drive 0
__wdccommand_start pciide0:0:0
wdcwait pciide0:0
wdccommand pciide0:0:0: command=0xa1 cylin=0 head=0 sector=0 count=0 precomp=0
__wdccommand_intr pciide0:0:0
wdcwait pciide0:0
wdcwait: timeout (time=100001), status d0 error d0 (mask 0x8 bits 0x8)
__wdccommand_done pciide0:0:0
wdc_ata_get_parms: wdc_c.flags=0x131
pciide0:0:0: IDENTIFY failed (1)
pciide0:0:0: register writability failed
wdcwait pciide0:0
wdcwait: timeout (time=100001), status d0 error d0 (mask 0x40 bits 0x40)
pciide0:0:0: not ready
wdc_ata_get_parms
wdc_exec_command pciide0:0:1
wdc_exec_xfer 0xc0795000 channel 0 drive 1
wdcstart from wdc_exec_xfer, flags 0x0
wdcstart: xfer 0xc0795000 channel 0 drive 1
__wdccommand_start pciide0:0:1
wdcwait pciide0:0
wdcwait: timeout (time=100001), status d0 error d0 (mask 0x8 bits 0x0)
__wdccommand_done pciide0:0:1
wdc_ata_get_parms: wdc_c.flags=0x131
wdc_ata_get_parms
wdc_exec_command pciide0:0:1
wdc_exec_xfer 0xc0795000 channel 0 drive 1
wdcstart from wdc_exec_xfer, flags 0x0
wdcstart: xfer 0xc0795000 channel 0 drive 1
__wdccommand_start pciide0:0:1
wdcwait pciide0:0
wdcwait: timeout (time=100001), status d0 error d0 (mask 0x8 bits 0x0)
__wdccommand_done pciide0:0:1
wdc_ata_get_parms: wdc_c.flags=0x131
pciide0:0:1: IDENTIFY failed (1)
pciide0:0:1: register writability failed
wdcwait pciide0:0
wdcwait: timeout (time=100001), status d0 error d0 (mask 0x40 bits 0x40)
pciide0:0:1: not ready
wdcattach: ch_drive_flags 0x0 0x0
pciide0: disabling primary channel (no drives)
pciide0: secondary channel configured to compatibility mode
pciide0:1: before reset, st0=0xff, st1=0xff
pciide0: disabling secondary channel (no drives)
VIA Technologies VT83C572 USB Controller (USB serial bus, revision 0x1a) at pci0 dev 7 function 2 not configured
<snip>

On Sun, 9 Jun 2002, Manuel Bouyer wrote:

> Can you set wdcdebug_mask and wdcdebug_atapi_mask to 0x10 (either with
> gdb on /netbsd, or by rebuilding a kernel) and send me the resulting boot
> messages ?

----------------------------------------------------------------------
|   Paul Goyette   | PGP DSS Key fingerprint: |  E-mail addresses:   |
| Network Engineer | 9DC5 05CF 1AE7 DC42 CCC6 |  paul@whooppee.com   |
|  & World Cruiser | 6858 051E 7AD2 A6B2 4954 | pgoyette@juniper.net |
----------------------------------------------------------------------