Discussion:
ATAPI tape drive not recognized!
Paul Goyette
2002-06-08 19:37:05 UTC
Permalink
Hi!

Does anyone have any idea why my BIOS can see my new Seagate TR5 tape
drive, but NetBSD doesn't? It just sits there for about 30 seconds when
it should be "probing" the drive, and then comes back and says no drive
present.

The BIOS on the machine sees the tape drive just fine, and if I remove
the tape drive, the NetBSD probe returns immediately rather than waiting
for ~30 seconds.

The tape drive is the only IDE device on the system, so I've got it
attached to the "primary" IDE controller and I've set the Maste/Slave
junper to master. I've tried multiple IDE cables, and I've also tried
the "secondary" IDE controller, with no change in results. I've also
tried using a GENERIC kernel as well as my custom kernel, with no
change.

Do I have to play some games in the config with config flags or
something?

Here's the relevant section of dmesg:

pciide0 at pci0 dev 7 function 1: VIA Technologies VT82C686A (Apollo
KX133) ATA1
00 controller
pciide0: bus-master DMA support present
pciide0: primary channel configured to compatibility mode
pciide0: disabling primary channel (no drives)
pciide0: secondary channel configured to compatibility mode
pciide0: disabling secondary channel (no drives)

Please include my address in any responses, as I'm not normally on this
list.

Thanks!

----------------------------------------------------------------------
| Paul Goyette | PGP DSS Key fingerprint: | E-mail addresses: |
| Network Engineer | 9DC5 05CF 1AE7 DC42 CCC6 | ***@whooppee.com |
| & World Cruiser | 6858 051E 7AD2 A6B2 4954 | ***@juniper.net |
----------------------------------------------------------------------
David Laight
2002-06-08 21:06:47 UTC
Permalink
Post by Paul Goyette
Hi!
Does anyone have any idea why my BIOS can see my new Seagate TR5 tape
drive, but NetBSD doesn't? It just sits there for about 30 seconds when
it should be "probing" the drive, and then comes back and says no drive
present.
The BIOS on the machine sees the tape drive just fine, and if I remove
the tape drive, the NetBSD probe returns immediately rather than waiting
for ~30 seconds.
Ok the 30 second timeout is (presumably) the device driver waiting
for the IDE master (your tape drive) to report the status of the
IDE slave device.

Precisely why netbsd doesn't like the way your drive behaves
would take some investigation.

You might true making it a slave on an IDE channel that has a
master device - a disk is most likely to be best.


David
--
David Laight: ***@l8s.co.uk
Manuel Bouyer
2002-06-09 16:47:36 UTC
Permalink
Post by Paul Goyette
Hi!
Does anyone have any idea why my BIOS can see my new Seagate TR5 tape
drive, but NetBSD doesn't? It just sits there for about 30 seconds when
it should be "probing" the drive, and then comes back and says no drive
present.
The BIOS on the machine sees the tape drive just fine, and if I remove
the tape drive, the NetBSD probe returns immediately rather than waiting
for ~30 seconds.
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 ?
--
Manuel Bouyer <***@antioche.eu.org>
--
Paul Goyette
2002-06-09 17:18:46 UTC
Permalink
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
***@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>
Post by Manuel Bouyer
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 | ***@whooppee.com |
| & World Cruiser | 6858 051E 7AD2 A6B2 4954 | ***@juniper.net |
----------------------------------------------------------------------
Manuel Bouyer
2002-06-09 17:24:51 UTC
Permalink
Post by Paul Goyette
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.
maybe you could try to bump the timeout ?
Also do you have a tape in the drive ? I seem to remember an issue like
that ...
--
Manuel Bouyer <***@antioche.eu.org>
--
Loading...