Subject: Re: hangs while trying to record a CD
To: Manuel Bouyer <bouyer@antioche.lip6.fr>
From: Nathan J. Williams <nathanw@wasabisystems.com>
List: port-i386
Date: 05/15/2002 12:41:36
Manuel Bouyer <bouyer@antioche.lip6.fr> writes:

> > wdc_atapi_intr: warning: reading only 1 of 2 bytes
> > wdc_atapi_intr: warning: reading only 1 of 2 bytes
> > 
> > Perhaps the first two messages are irrelevant, and the DMA version of
> > whatever is triggering the latter two was the problem?
> 
> This, however, can be a problem. The DMA engine may be confused by the drive
> trying to transfer more than it think should be transfered.
> A byte count of 1 (or not multiple of 2 in general) is strange for a ATAPI
> device, too. 
> Would be interesting to know what the command is. This patch should show it,
> can you try it ?

Here's what I came up with (from a slightly different command,
cdrecord -v blank=all):

cd0(pciide0:1:0):  sense debug information:
        code 0x70 valid 0x0
        seg 0x0 key 0x6 ili 0x0 eom 0x0 fmark 0x0

info: 0x0 0x0 0x0 0x0 followed by 10 extra bytes
        extra: 0x0 0x0 0x0 0x0 0x29 0x0 0x0 0x0 0x0 0x0 
cd0(pciide0:1:0):  sense debug information:
        code 0x70 valid 0x0
        seg 0x0 key 0x5 ili 0x0 eom 0x0 fmark 0x0

info: 0x0 0x0 0x0 0x0 followed by 10 extra bytes
        extra: 0x0 0x0 0x0 0x0 0x64 0x0 0x0 0x0 0x0 0x0 
cd0(pciide0:1:0): illegal request, data = 00 00 00 00 64 00 00 00 00 00
cd0: dos partition I/O error
wdc_atapi_intr: warning: reading only 1 of 2 bytes
xs(0xc166b000): xs_control(0x00009018)xs_status(0x00000000)periph(0xc1546700)retr(0x0)timo(0x9c40)cmd(0xc166b088)len(0xc)data(0xe2df2c80)len(0x103)res(0x103)err(0x0)bp(0xc1639d08)cd0(pciide0:1:0):  command: 0x5a,0x0,0x3f,0x0,0x0,0x0,0x0,0x1,0x3,0x0,0x0,0x0-[259 bytes]
------------------------------
000: 01 22 20 00 00 00 00 00 01 0a 00 30 00 00 00 00 
016: 00 00 00 00 05 32 41 04 08 00 00 00 00 00 00 00 
032: 00 00 00 96 00 00 00 00 00 00 00 00 00 00 00 00 
048: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
------------------------------
wdc_atapi_intr: warning: reading only 1 of 2 bytes
xs(0xc166b000): xs_control(0x00009018)xs_status(0x00000000)periph(0xc1546700)retr(0x0)timo(0x9c40)cmd(0xc166b088)len(0xc)data(0xe2df2c80)len(0x103)res(0x103)err(0x0)bp(0xc15af808)cd0(pciide0:1:0):  command: 0x5a,0x0,0xbf,0x0,0x0,0x0,0x0,0x1,0x3,0x0,0x0,0x0-[259 bytes]
------------------------------
000: 01 22 20 00 00 00 00 00 01 0a 00 30 00 00 00 00 
016: 00 00 00 00 05 32 41 04 08 00 00 00 00 00 00 00 
032: 00 00 00 96 00 00 00 00 00 00 00 00 00 00 00 00 
048: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
------------------------------


The cdrecord output is:

5 marvin-the-martian:nathanw>cdrecord -v dev=/dev/rcd0d blank=all test.img
Cdrecord 1.10 (i386-unknown-netbsd1.5ZC) Copyright (C) 1995-2001 Jvrg Schilling
TOC Type: 1 = CD-ROM
cdrecord: Permission denied. WARNING: Cannot set priority using setpriority().
cdrecord: WARNING: This causes a high risk for buffer underruns.
scsidev: '/dev/rcd0d'
devname: '/dev/rcd0d'
scsibus: -2 target: -2 lun: -2
Using libscg version 'schily-0.5'
cdrecord: Warning: using inofficial libscg transport code version (frueauf-scsi-bsd.c-1.40nb1 '@(#)scsi-bsd.c   1.40 01/03/18 Copyright 1997 J. Schilling').
atapi: 1
Device type    : Removable CD-ROM
Version        : 0
Response Format: 2
Capabilities   : 
Vendor_info    : 'LITE-ON '
Identifikation : 'LTR-32123S      '
Revision       : 'XS0R'
Device seems to be: Generic mmc CD-RW.
Using generic SCSI-3/mmc CD-R driver (mmc_cdr).
Driver flags   : SWABAUDIO
Drive buf size : 1966272 = 1920 KB
FIFO size      : 4194304 = 4096 KB
Track 01: data   33 MB        
Total size:      38 MB (03:47.44) = 17058 sectors
Lout start:      38 MB (03:49/33) = 17058 sectors
Current Secsize: 2048
ATIP info from disk:
  Indicated writing power: 5
  Reference speed: 2
  Is not unrestricted
  Is erasable
  ATIP start of lead in:  -12900 (97:10/00)
  ATIP start of lead out: 108975 (24:15/00)
  speed low: 0 speed high: 4
  power mult factor: 4 5
  recommended erase/write power: 3
  A2 values: 5C C6 26
Disk type:    unknown
Manuf. index: -1
Manufacturer: unknown (not in table)
Blocks total: 108975 Blocks current: 108975 Blocks remaining: 91917
cdrecord: Permission denied. WARNING: Cannot set priority using setpriority().
cdrecord: WARNING: This causes a high risk for buffer underruns.
Starting to write CD/DVD at speed 2 in write mode for single session.
Last chance to quit, starting real write in 0 seconds. Operation starts.
Waiting for reader process to fill input buffer ... input buffer ready.
Blanking entire disk
cdrecord: faio_wait_on_buffer for writer timed out.
cdrecord: fifo had 68 puts and 0 gets.
cdrecord: fifo was 0 times empty and 0 times full, min fill was 100%.

        - Nathan