Subject: pciide cd-r trouble
To: None <current-users@netbsd.org>
From: Sebastian Sala <ssala@cc.hut.fi>
List: current-users
Date: 10/04/2000 11:39:13
I've had cd burning problems since the stable NetBSD 1.4. My cd-r is a 
hp-7100 cdrw, connected to the secondary ide as the slave.

The only thing working is cdrecord, which is only able to burn a cd
with an image. After that for example, cdrdao is able to burn an audio
or 1:1 copy 65% of the time. Otherwise, if the recorder hasn't been
"initialized" with cdrecord, cdrdao won't work at all. Erasing a rw-disk
won't work at all anywhere.

After a boot the first cd to record gives cdrecord some difficulties,
and idles for some minutes before starting the actual burning. After the
first burnt cd, the following ones start to burn without the delay. This
all changes again, when the machine is rebooted.

The writer worked perfectly in 1.4, no delays, no problems. Since then 
I've tried numerous current-kernels, which all gave the same symptoms.
I even tried removing my cd-rom (the master in the secondary ide) and
made the burner the maste; still the exact same things happened.

Here is how the cdrecord and kernel act on the first burn:

Cdrecord 1.9 (i386-unknown-netbsd1.5.) Copyright (C) 1995-2000 Jörg Schilling
TOC Type: 1 = CD-ROM
scsidev: '/dev/rcd1d'
devname: '/dev/rcd1d'
scsibus: -2 target: -2 lun: -2
Using libscg version 'schily-0.1'
atapi: 1
Device type    : Removable CD-ROM
Version        : 0
Response Format: 1
Vendor_info    : 'HP      '
Identifikation : 'CD-Writer+ 7200 '
Revision       : '3.01'
Device seems to be: Generic mmc CD-RW.
Using generic SCSI-3/mmc CD-R driver (mmc_cdr).
Driver flags   : SWABAUDIO
Drive buf size : 786432 = 768 KB
Current Secsize: 2048
Trying to clear drive status.
CDB:  55 10 00 00 00 00 00 00 3C 00
resid: 60
cmd finished after 39.999s timeout 40s
/usr/pkg/bin/cdrecord: Input/output error. mode select g1: scsi sendcmd: cmd timeout after 39.999 (40) s
/usr/pkg/bin/cdrecord: Warning: using default CD write parameter data.
Mode Select Data 00 21 00 00 05 32 01 C4 08 00 00 00 00 00 00 00 00 00 00 96 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0
0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
CDB:  51 00 00 00 00 00 00 00 02 00
resid: 2
cmd finished after 240.015s timeout 240s
/usr/pkg/bin/cdrecord: Input/output error. read disk info: scsi sendcmd: cmd timeout after 240.015 (240) s
/usr/pkg/bin/cdrecord: Cannot get disk type.
CDB:  1E 00 00 00 00 00
cmd finished after 40.009s timeout 40s
/usr/pkg/bin/cdrecord: Input/output error. prevent/allow medium removal: scsi sendcmd: cmd timeout after 40.009 (40) s
CDB:  1B 00 00 00 02 00
cmd finished after 40.009s timeout 40s
/usr/pkg/bin/cdrecord: Input/output error. start/stop unit: scsi sendcmd: cmd timeout after 40.009 (40) s



wd0: no disk label
pciide0:1:1: lost interrupt
        type: atapi tc_bcount: 60 tc_skip: 0
pciide0:1:1: bus-master DMA error: missing interrupt, status=0x60
pciide0:1:1: device timeout, c_bcount=60, c_skip=0
cd1: transfer error, downgrading to PIO mode 3
cd0(pciide0:1:0): using PIO mode 4, DMA mode 2 (using DMA data transfers)
cd1(pciide0:1:1): using PIO mode 3
pciide0:1:1: lost interrupt
        type: atapi tc_bcount: 2 tc_skip: 0
pciide0:1:1: reset failed
pciide0:1:1: lost interrupt
        type: atapi tc_bcount: 0 tc_skip: 0
pciide0:1:1: piomode timed out
pciide0:1:1: reset failed
pciide0:1:1: lost interrupt
        type: atapi tc_bcount: 16 tc_skip: 0
pciide0:1:1: piomode timed out
pciide0:1:1: reset failed
pciide0:1:1: lost interrupt
        type: atapi tc_bcount: 0 tc_skip: 0
pciide0:1:1: piomode timed out
pciide0:1:1: reset failed
pciide0:1:1: lost interrupt
        type: atapi tc_bcount: 0 tc_skip: 0
pciide0:1:1: piomode timed out
pciide0:1:1: reset failed
pciide0:1:1: lost interrupt
        type: atapi tc_bcount: 0 tc_skip: 0
pciide0:1:1: piomode timed out
pciide0:1:1: reset failed

This is what the kernel and cdrecord say when burning the next cd:

Cdrecord 1.9 (i386-unknown-netbsd1.5.) Copyright (C) 1995-2000 Jörg Schilling
TOC Type: 1 = CD-ROM
scsidev: '/dev/rcd1d'
devname: '/dev/rcd1d'
scsibus: -2 target: -2 lun: -2
Using libscg version 'schily-0.1'
atapi: 1
Device type    : Removable CD-ROM
Version        : 0
Response Format: 1
Vendor_info    : 'HP      '
Identifikation : 'CD-Writer+ 7200 '
Revision       : '3.01'
Device seems to be: Generic mmc CD-RW.
Using generic SCSI-3/mmc CD-R driver (mmc_cdr).
Driver flags   : SWABAUDIO
Drive buf size : 786432 = 768 KB
FIFO size      : 4194304 = 4096 KB
Track 01: data  585 MB         padsize:  30 KB
Lout start:     673 MB (66:42/18) = 300018 sectors
Current Secsize: 2048
  ATIP start of lead in:  -11529 (97:28/21)
  ATIP start of lead out: 334351 (74:20/01)
Disk type:    Long strategy type (Cyanine, AZO or similar)
Manuf. index: 13
Manufacturer: Multi Media Masters & Machinary SA
Blocks total: 334351 Blocks current: 334351 Blocks remaining: 34333
Starting to write CD/DVD at speed 2 in write mode for single session.
Performing OPC...
 
Track 01:   0 of 585 MB written.
Track 01: writing  30 KB of pad data.
Track 01: Total bytes read/written: 614402048/614432768 (300016 sectors).
Writing  time: 2011.279s
/usr/pkg/bin/cdrecord: fifo had 10001 puts and 10001 gets.
/usr/pkg/bin/cdrecord: fifo was 0 times empty and 9922 times full, min fill was 92%.





pciide0:1:1: lost interrupt
        type: atapi tc_bcount: 60 tc_skip: 0
pciide0:1:1: bus-master DMA error: missing interrupt, status=0x60
pciide0:1:1: device timeout, c_bcount=60, c_skip=0
cd1: transfer error, downgrading to PIO mode 3
cd0(pciide0:1:0): using PIO mode 4, DMA mode 2 (using DMA data transfers)
cd1(pciide0:1:1): using PIO mode 3
pciide0:1:1: lost interrupt
        type: atapi tc_bcount: 28 tc_skip: 0
wd0: no disk label



And then the dmesg output after a clean boot:

NetBSD 1.5_ALPHA2 (QUAZ) #0: Fri Sep  1 19:53:58 EEST 2000
    root@quaz:/usr/src/sys/arch/i386/compile/QUAZ
cpu0: Intel Pentium II (Klamath) (686-class)
total memory = 97920 KB
avail memory = 88412 KB
using 1249 buffers containing 4996 KB of memory
BIOS32 rev. 0 found at 0xfb0f0
mainbus0 (root)
pci0 at mainbus0 bus 0: configuration mode 1
pci0: i/o space, memory space enabled
pchb0 at pci0 dev 0 function 0
pchb0: Intel 82443LX PCI AGP Controller (PAC) (rev. 0x03)
ppb0 at pci0 dev 1 function 0: Intel 82443LX AGP Interface (PAC) (rev. 0x03)
pci1 at ppb0 bus 1
pci1: i/o space, memory space enabled
vga0 at pci1 dev 0 function 0: Nvidia Corporation RIVA TNT2 (rev. 0x15)
wsdisplay0 at vga0: console (80x25, vt100 emulation)
wsdisplay0: screen 1-3 added (80x25, vt100 emulation)
pcib0 at pci0 dev 7 function 0
pcib0: Intel 82371AB PCI-to-ISA Bridge (PIIX4) (rev. 0x01)
pciide0 at pci0 dev 7 function 1: Intel 82371AB IDE controller (PIIX4) (rev. 0x01)
pciide0: bus-master DMA support present
pciide0: primary channel wired to compatibility mode
wd0 at pciide0 channel 0 drive 0: <ST34321A>
wd0: drive supports 32-sector pio transfers, lba addressing
wd0: 4103 MB, 8894 cyl, 15 head, 63 sec, 512 bytes/sect x 8404830 sectors
wd0: 32-bit data port
wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 2
wd1 at pciide0 channel 0 drive 1: <FUJITSU MPD3043AT>
wd1: drive supports 16-sector pio transfers, lba addressing
wd1: 4125 MB, 8940 cyl, 15 head, 63 sec, 512 bytes/sect x 8448300 sectors
wd1: 32-bit data port
wd1: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 4
pciide0: primary channel interrupting at irq 14
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 2 (using DMA data transfers)
wd1(pciide0:0:1): using PIO mode 4, Ultra-DMA mode 2 (using DMA data transfers)
pciide0: secondary channel wired to compatibility mode
atapibus0 at pciide0 channel 1
cd0 at atapibus0 drive 0: <FX320S, , q01> type 5 cdrom removable
cd0: 32-bit data port
cd0: drive supports PIO mode 4, DMA mode 2
cd1 at atapibus0 drive 1: <HP      CD-Writer+ 7200, 4VO2299071541760021, V:003.0> type 5 cdrom removable
cd1: 32-bit data port
cd1: drive supports PIO mode 3, DMA mode 1
pciide0: secondary channel interrupting at irq 15
cd0(pciide0:1:0): using PIO mode 4, DMA mode 2 (using DMA data transfers)
cd1(pciide0:1:1): using PIO mode 0, DMA mode 1 (using DMA data transfers)
Intel 82371AB USB Host Controller (PIIX4) (USB serial bus, revision 0x01) at pci0 dev 7 function 2 not configured
Intel 82371AB Power Management Controller (PIIX4) (miscellaneous bridge, revision 0x01) at pci0 dev 7 function 3 n
ot configured
isa0 at pcib0
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 0x378-0x37b irq 7
sb0 at isa0 port 0x220-0x237 irq 5 drq 1 drq2 5: dsp v4.11
audio0 at sb0: full duplex, mmap, independent
opl0 at sb0: model OPL3
midi0 at opl0: SB Yamaha OPL3
pcppi0 at isa0 port 0x61
sysbeep0 at pcppi0
npx0 at isa0 port 0xf0-0xff: using exception 16
fdc0 at isa0 port 0x3f0-0x3f7 irq 6 drq 2
fd0 at fdc0 drive 0: 1.44MB, 80 cyl, 2 head, 18 sec
apm0 at mainbus0: Power Management spec V1.2 (slowidle)
biomask ef45 netmask ef45 ttymask ffc7
wd0: no disk label
boot device: wd1
root on wd1a dumps on wd1b
root file system type: ffs
wsdisplay0: screen 4 added (80x25, vt100 emulation)
wd0: no disk label




Then a question to to previous, why does the kernel choose pio mode 0
for cd1, even though it supports pio mode 3?



Can you cc the response to me, since I'm not on the mailing list. Thanks

sebastian.sala@hut.fi


    /\                                       0 _.    /\  /\
   /  \                                    ./\| |   /\/\/  \
--/\/\/\-----------------------------------| <</ --/   /\/\/\-
 /      \         Sebastian Sala             //       /      \
                                            ^^