Bug 57606

Summary: ATAng: Can't write CD media on 5.1-CURRENT with ATAPI writer
Product: Base System Reporter: Simun Mikecin <sime>
Component: kernAssignee: Søren Schmidt <sos>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 5.1-CURRENT   
Hardware: Any   
OS: Any   

Description Simun Mikecin 2003-10-05 12:10:24 UTC
	Writing CD media using Pioneer DVD burner (acd1) doesn't work. Tried
	both with burncd and cdrecord.
	But burning DVD+RW media using growisofs from sysutils/dvd+rwtools
	does work (growisfs can't write CDs). Also, blanking CD-RW media
	does work.
	Before ATAng commit I was getting the same error when trying to burn
	CD-R with burncd. But I was able to write CDs using cdrecord and
	atapicam with no problems.

	This is what I get when I try to use burncd:
	  # burncd -f /dev/acd1 -s 10 image.iso fixate
	  next writeable LBA 0
	  writing from file sol-8-u5-ia-v2.iso size 188800 KB
	  written this track 832 KB (0%) total 832 KB
	  only wrote -1 of 32768 bytes: Device busy

	  fixating CD, please wait..

	This is what I get when I try to use cdrecord:
	  # cdrecord -v dev=2,0,0 speed=10 image.iso
	  Cdrecord 2.00.3 (i386-unknown-freebsd5.1) Copyright (C) 1995-2002 Jörg Schilling
	  TOC Type: 1 = CD-ROM
	  scsidev: '2,0,0'
	  scsibus: 2 target: 0 lun: 0
	  Using libscg version 'schily-0.7'
	  atapi: 0
	  Device type    : Removable CD-ROM
	  Version        : 0
	  Response Format: 2
	  Capabilities   :
	  Vendor_info    : 'PIONEER '
	  Identifikation : 'DVD-RW  DVR-106D'
	  Revision       : '1.06'
	  Device seems to be: Generic mmc2 DVD-R/DVD-RW.
	  cdrecord: This version of cdrecord does not include DVD-R/DVD-RW support code.
	  cdrecord: If you need DVD-R/DVD-RW support, ask the Author for cdrecord-ProDVD.
	  Using generic SCSI-3/mmc CD-R driver (mmc_cdr).
	  Driver flags   : MMC-3 SWABAUDIO BURNFREE
	  Supported modes: TAO PACKET SAO SAO/R96P SAO/R96R RAW/R16 RAW/R96P RAW/R96R
	  Drive buf size : 1267712 = 1238 KB
	  FIFO size      : 4194304 = 4096 KB
	  Track 01: data   184 MB
	  Total size:      211 MB (20:58.69) = 94402 sectors
	  Lout start:      212 MB (21:00/52) = 94402 sectors
	  Current Secsize: 2048
	  ATIP info from disk:
	    Indicated writing power: 2
	    Reference speed: 6
	    Is not unrestricted
	    Is erasable
	    Disk sub type: High speed Rewritable (CAV) media (1)
	    ATIP start of lead in:  -12900 (97:10/00)
	    ATIP start of lead out: 359849 (79:59/74)
	    1T speed low:  4 1T speed high: 10
	    2T speed low:  4 2T speed high:  0 (reserved val  6)
	    power mult factor: 1 5
	    recommended erase/write power: 5
	    A1 values: 24 1A D8
	    A2 values: 26 B2 48
	  Disk type:    unknown dye (reserved id code)
	  Manuf. index: -1
	  Manufacturer: unknown (not in table)
	  Manufacturer is unknown because of the orange forum embargo.
	  As the orange forum likes to get money for recent information,
	  it may be that this media does not use illegal manufacturer coding.
	  Blocks total: 359849 Blocks current: 359849 Blocks remaining: 265447
	  Starting to write CD/DVD at speed 10 in real TAO mode for single session.
	  Last chance to quit, starting real write    0 seconds. Operation starts.
	  Waiting for reader process to fill input buffer ... input buffer ready.
	  BURN-Free is ON.
	  Turning BURN-Free off
	  Performing OPC...
	  Starting new track at sector: 0
	  Track 01:    0 of  184 MB written.cdrecord: Input/output error. write_g1: scsi sendcmd: retryable error
	  CDB:  2A 00 00 00 01 B2 00 00 1F 00
	  status: 0x2 (CHECK CONDITION)
	  Sense Bytes: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
	  Sense Key: 0xFFFFFFFF [], Segment 0
	  Sense Code: 0x00 Qual 0x00 (no additional sense information) Fru 0x0
	  Sense flags: Blk 0 (not valid)
	  cmd finished after 0.001s timeout 40s

	  write track data: error after 888832 bytes
	  Sense Bytes: 70 00 02 00 00 00 00 0E 00 00 00 00 04 08 00 00 00 00
	  Writing  time:    7.775s
	  Average write speed 245.2x.
	  Fixating...
	  Fixating time:   33.410s
	  cdrecord: fifo had 78 puts and 15 gets.
	  cdrecord: fifo was 0 times empty and 3 times full, min fill was 93%.

Fix: 

None that I know of.
How-To-Repeat: 	Try burning a CD media using burncd or cdrecord.
Comment 1 Alexander Nedotsukov freebsd_committer freebsd_triage 2003-11-25 14:36:15 UTC
Responsible Changed
From-To: freebsd-bugs->thomas

Looks like this one is for you. I also can confirm this problem 
for same dirive with same diagnostics on three days old -CURRENT
Comment 2 Thomas Quinot freebsd_committer freebsd_triage 2004-02-11 10:22:42 UTC
* Simun Mikecin, 2003-10-05 :

> 	  Starting new track at sector: 0
> 	  Track 01:    0 of  184 MB written.cdrecord: Input/output error. write_g1: scsi sendcmd: retryable error
> 	  CDB:  2A 00 00 00 01 B2 00 00 1F 00
> 	  status: 0x2 (CHECK CONDITION)
> 	  Sense Bytes: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 	  Sense Key: 0xFFFFFFFF [], Segment 0
> 	  Sense Code: 0x00 Qual 0x00 (no additional sense information) Fru 0x0
> 	  Sense flags: Blk 0 (not valid)
> 	  cmd finished after 0.001s timeout 40s
> 
> 	  write track data: error after 888832 bytes
> 	  Sense Bytes: 70 00 02 00 00 00 00 0E 00 00 00 00 04 08 00 00 00 00
> 	  Writing  time:    7.775s
> 	  Average write speed 245.2x.
> 	  Fixating...
> 	  Fixating time:   33.410s
> 	  cdrecord: fifo had 78 puts and 15 gets.
> 	  cdrecord: fifo was 0 times empty and 3 times full, min fill was 93%.
> >How-To-Repeat:
> 	Try burning a CD media using burncd or cdrecord.

First of all please note that burncd does not use ATAPI/CAM, so if the
same problem show up with both burncd and cdrecord, this would point to
a generic ATA/ATAPI issue rather than n ATAPI/CAM specific problem.

Could you please let me know whether -CURRENT as of today (after revision
1.33 of sys/dev/ata/atapi-cam.c) still exhibits the desccribed behaviour?

Thanks,
Thomas.

-- 
    Thomas.Quinot@Cuivre.FR.EU.ORG
Comment 3 Simun Mikecin 2004-02-11 20:26:18 UTC
On Wed, 11 Feb 2004 11:22:42 +0100, Thomas Quinot <thomas@FreeBSD.ORG> 
wrote:
> Could you please let me know whether -CURRENT as of today (after revision
> 1.33 of sys/dev/ata/atapi-cam.c) still exhibits the desccribed behaviour?

Just tried revision 1.33 with cdrecord and it works.
Since that still doesn't solve the problem with burncd, I think this PR 
should now be handed over to ATAng maintainer (sos@freebsd.org).
Comment 4 Simun Mikecin 2004-02-11 20:26:18 UTC
On Wed, 11 Feb 2004 11:22:42 +0100, Thomas Quinot <thomas@FreeBSD.ORG> 
wrote:
> Could you please let me know whether -CURRENT as of today (after revision
> 1.33 of sys/dev/ata/atapi-cam.c) still exhibits the desccribed behaviour?

Just tried revision 1.33 with cdrecord and it works.
Since that still doesn't solve the problem with burncd, I think this PR 
should now be handed over to ATAng maintainer (sos@freebsd.org).
Comment 5 Thomas Quinot freebsd_committer freebsd_triage 2004-02-12 00:47:21 UTC
Responsible Changed
From-To: thomas->sos

Submitter report that he now observes the problem only with acd, 
not ATAPI/CAM cd.
Comment 6 Søren Schmidt freebsd_committer freebsd_triage 2004-08-16 13:19:11 UTC
State Changed
From-To: open->closed

If this is still a problem on -current/5.3 get back to me.