From sime@logos.hr  Sun Oct  5 04:08:19 2003
Return-Path: <sime@logos.hr>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 6E4F616A4BF
	for <FreeBSD-gnats-submit@freebsd.org>; Sun,  5 Oct 2003 04:08:19 -0700 (PDT)
Received: from data.home.hr (zg04-149.dialin.iskon.hr [213.191.137.150])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 7D0324400B
	for <FreeBSD-gnats-submit@freebsd.org>; Sun,  5 Oct 2003 04:08:16 -0700 (PDT)
	(envelope-from sime@logos.hr)
Received: by data.home.hr (Postfix, from userid 34062)
	id 5DB721B162; Sun,  5 Oct 2003 13:08:14 +0200 (CEST)
Message-Id: <20031005110814.5DB721B162@data.home.hr>
Date: Sun,  5 Oct 2003 13:08:14 +0200 (CEST)
From: Simun Mikecin <sime@logos.hr>
Reply-To: Simun Mikecin <sime@logos.hr>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: ATAng: Can't write CD media on 5.1-CURRENT with ATAPI writer
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         57606
>Category:       kern
>Synopsis:       ATAng: Can't write CD media on 5.1-CURRENT with ATAPI writer
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    sos
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Oct 05 04:10:24 PDT 2003
>Closed-Date:    Mon Aug 16 12:19:56 GMT 2004
>Last-Modified:  Mon Aug 16 12:19:56 GMT 2004
>Originator:     Simun Mikecin
>Release:        FreeBSD 5.1-CURRENT i386
>Organization:
>Environment:
System: FreeBSD data.home.hr 5.1-CURRENT FreeBSD 5.1-CURRENT #1: Sat Oct 4 11:10:39 CEST 2003 root@data.home.hr:/usr/obj/usr/src.20031002/sys/DATA i386
	Using 5.1-CURRENT kernel as of Oct 2 2003.
	Kernel compiled with:
	  device ata
	  device atadisk
	  device atapicd
	  device atapicam
	ATAPI DVD writer detection in dmesg:
	  atapci0: <Intel ICH5 UDMA100 controller> port 0xf000-0xf00f,0-0x3,0-0x7,0-0x3,0-0x7 irq 2 at device 31.1 on pci0
	  ad0: 176700MB <IC35L180AVV207-1> [359010/16/63] at ata0-master UDMA100
	  acd0: DVDROM <Pioneer DVD-ROM ATAPIModel DVD-120S> at ata0-slave UDMA66
	  acd1: DVDR <PIONEER DVD-RW DVR-106D> at ata1-master UDMA33
	  (probe0:ata1:0:0:0): Recovered Sense
	  (probe0:ata1:0:0:0): INQUIRY. CDB: 12 1 80 0 ff 0
	  (probe0:ata1:0:0:0): CAM Status: SCSI Status Error
	  (probe0:ata1:0:0:0): SCSI Status: Check Condition
	  (probe0:ata1:0:0:0): ILLEGAL REQUEST asc:24,0
	  (probe0:ata1:0:0:0): Invalid field in CDB: Command byte 1 bit 0 is invalid
	  (probe0:ata1:0:0:0): Recovered Sense
	  (probe0:ata1:0:0:0): INQUIRY. CDB: 12 1 80 0 ff 0
	  (probe0:ata1:0:0:0): CAM Status: SCSI Status Error
	  (probe0:ata1:0:0:0): SCSI Status: Check Condition
	  (probe0:ata1:0:0:0): ILLEGAL REQUEST asc:24,0
	  (probe0:ata1:0:0:0): Invalid field in CDB: Command byte 1 bit 0 is invalid
	  GEOM: create disk cd1 dp=0xc6c22e00
	  (cd1:ata1:0:0:0): Recovered Sense
	  (cd1:ata1:0:0:0): READ CD RECORDED CAPACITY. CDB: 25 0 0 0 0 0 0 0 0 0
	  (cd1:ata1:0:0:0): CAM Status: SCSI Status Error
	  (cd1:ata1:0:0:0): SCSI Status: Check Condition
	  (cd1:ata1:0:0:0): NOT READY asc:3a,0
	  (cd1:ata1:0:0:0): Medium not present
	  cd1 at ata1 bus 0 target 0 lun 0
	  cd1: <PIONEER DVD-RW  DVR-106D 1.06> Removable CD-ROM SCSI-0 device
	  cd1: 33.000MB/s transfers
	  cd1: Attempt to query device size failed: NOT READY, Medium not present
	  (cd1:ata1:0:0:0): Recovered Sense
	  (cd1:ata1:0:0:0): PREVENT ALLOW MEDIUM REMOVAL. CDB: 1e 0 0 0 1 0
	  (cd1:ata1:0:0:0): CAM Status: SCSI Status Error
	  (cd1:ata1:0:0:0): SCSI Status: Check Condition
	  (cd1:ata1:0:0:0): NOT READY asc:3a,0
	  (cd1:ata1:0:0:0): Medium not present
	  (cd1:ata1:0:0:0): Recovered Sense
	  (cd1:ata1:0:0:0): READ CD RECORDED CAPACITY. CDB: 25 0 0 0 0 0 0 0 0 0
	  (cd1:ata1:0:0:0): CAM Status: SCSI Status Error
	  (cd1:ata1:0:0:0): SCSI Status: Check Condition
	  (cd1:ata1:0:0:0): NOT READY asc:3a,0
	  (cd1:ata1:0:0:0): Medium not present
	  (cd1:ata1:0:0:0): Recovered Sense
	  (cd1:ata1:0:0:0): PREVENT ALLOW MEDIUM REMOVAL. CDB: 1e 0 0 0 1 0
	  (cd1:ata1:0:0:0): CAM Status: SCSI Status Error
	  (cd1:ata1:0:0:0): SCSI Status: Check Condition
	  (cd1:ata1:0:0:0): NOT READY asc:3a,0
	  (cd1:ata1:0:0:0): Medium not present
	  (cd1:ata1:0:0:0): Recovered Sense
	  (cd1:ata1:0:0:0): READ CD RECORDED CAPACITY. CDB: 25 0 0 0 0 0 0 0 0 0
	  (cd1:ata1:0:0:0): CAM Status: SCSI Status Error
	  (cd1:ata1:0:0:0): SCSI Status: Check Condition
	  (cd1:ata1:0:0:0): NOT READY asc:3a,0
	  (cd1:ata1:0:0:0): Medium not present
>Description:
	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 Jrg 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%.
>How-To-Repeat:
	Try burning a CD media using burncd or cdrecord.
>Fix:
	None that I know of.
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->thomas 
Responsible-Changed-By: bland 
Responsible-Changed-When: Tue Nov 25 06:36:15 PST 2003 
Responsible-Changed-Why:  
Looks like this one is for you. I also can confirm this problem 
for same dirive with same diagnostics on three days old -CURRENT 

http://www.freebsd.org/cgi/query-pr.cgi?pr=57606 

From: Thomas Quinot <thomas@FreeBSD.ORG>
To: Simun Mikecin <sime@logos.hr>
Cc: bug-followup@FreeBSD.org
Subject: Re: kern/57606: ATAng: Can't write CD media on 5.1-CURRENT with ATAPI writer
Date: Wed, 11 Feb 2004 11:22:42 +0100

 * 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

From: Simun Mikecin <sime@logos.hr>
To: Thomas Quinot <thomas@FreeBSD.ORG>,
	freebsd-gnats-submit@FreeBSD.org
Cc: bug-followup@FreeBSD.org
Subject: Re: kern/57606: ATAng: Can't write CD media on 5.1-CURRENT with ATAPI writer
Date: Wed, 11 Feb 2004 21:26:18 +0100

 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).

From: Simun Mikecin <sime@logos.hr>
To: Thomas Quinot <thomas@FreeBSD.ORG>,
	freebsd-gnats-submit@FreeBSD.org
Cc: bug-followup@FreeBSD.org
Subject: Re: kern/57606: ATAng: Can't write CD media on 5.1-CURRENT with ATAPI writer
Date: Wed, 11 Feb 2004 21:26:18 +0100

 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).
Responsible-Changed-From-To: thomas->sos 
Responsible-Changed-By: thomas 
Responsible-Changed-When: Wed Feb 11 16:47:21 PST 2004 
Responsible-Changed-Why:  
Submitter report that he now observes the problem only with acd, 
not ATAPI/CAM cd. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=57606 
State-Changed-From-To: open->closed 
State-Changed-By: sos 
State-Changed-When: Mon Aug 16 12:19:11 GMT 2004 
State-Changed-Why:  
If this is still a problem on -current/5.3 get back to me. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=57606 
>Unformatted:
