From nobody@FreeBSD.org  Tue Apr 18 02:52:45 2006
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 1789216A402
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 18 Apr 2006 02:52:45 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id D984A43D45
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 18 Apr 2006 02:52:44 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id k3I2qiOA056781
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 18 Apr 2006 02:52:44 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id k3I2qiAD056779;
	Tue, 18 Apr 2006 02:52:44 GMT
	(envelope-from nobody)
Message-Id: <200604180252.k3I2qiAD056779@www.freebsd.org>
Date: Tue, 18 Apr 2006 02:52:44 GMT
From: Arturo Borquez <artboreb@yahoo.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: burncd fixating CD's
X-Send-Pr-Version: www-2.3

>Number:         95979
>Category:       bin
>Synopsis:       [patch] burncd(8) fails to fixate CDs
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    obrien
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Apr 18 03:00:39 GMT 2006
>Closed-Date:    Tue Mar 01 18:07:47 UTC 2011
>Last-Modified:  Tue Mar  1 18:10:11 UTC 2011
>Originator:     Arturo Borquez
>Release:        6.1-RC1
>Organization:
ABE Ingenieria (Chile)
>Environment:
FreeBSD arturito.vtr.net 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006     root@opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP  i386

>Description:
burncd fails to fixate when burning a CDROM example ...

[root@arturito /home/arturo/oss]# burncd -f /dev/acd1 -s max data 6.1-RC1-i386-disc1.iso fixate
next writeable LBA 0
writing from file 6.1-RC1-i386-disc1.iso size 516396 KB
written this track 516396 KB (100%) total 516396 KB
fixating CD, please wait..
burncd: ioctl(CDRIOCFIXATE): Input/output error

the CD can be fixated anyway with

[root@arturito /home/arturo/oss]# burncd -f /dev/acd1 fixate
fixating CD, please wait..
[root@arturito /home/arturo/oss]# 

This doesn't occurs in the same machine with 6.0

data written onto the CD is OK 
>How-To-Repeat:
burning any CD with the parameter 'fixate'
>Fix:

>Release-Note:
>Audit-Trail:

From: Matthias Apitz <m.apitz@oclcpica.org>
To: bug-followup@FreeBSD.org, artboreb@yahoo.com
Cc:  
Subject: Re: bin/95979: burncd(8) fails to fixate CDs
Date: Tue, 29 May 2007 14:32:59 +0200

 This is as well in FreeBSD 6.2-RELEASE with burncd.c (CVS: rev. 1.45):
 
 # burncd -f /dev/acd0 -s max data cdimage.raw fixate
 next writeable LBA 0
 writing from file cdimage.raw size 517992 KB
 written this track 517992 KB (100%) total 517992 KB
 fixating CD, please wait..
 burncd: ioctl(CDRIOCFIXATE): Input/output error
 #
 
 and also a second 'fixate' fails with:
 
 # burncd -f /dev/acd0  fixate
 fixating CD, please wait..
 burncd: ioctl(CDRIOCFIXATE): Input/output error
 #
 
 A re-read of the burned CD fails as well (even if the CD is
 mountable):
 
 # dd if=/dev/acd0 of=cdimage.iso bs=2048
 dd: /dev/acd0: Input/output error
 258996+0 records in
 258996+0 records out
 530423808 bytes transferred in 280.964918 secs (1887865 bytes/sec)
 
 but the re-read file is binary identical to the ISO image burned:
 
 # diff cdimage.raw cdimage.iso
 # ls -l cdimage.*
 -rw-r--r--  1 root  wheel  530423808 29 may 11:19 cdimage.iso
 -rw-r--r--  1 root  wheel  530423808 28 may 08:57 cdimage.raw
 
 	matthias
 -- 
 Matthias Apitz
 Manager Technical Support - OCLC PICA GmbH
 Gruenwalder Weg 28g - 82041 Oberhaching - Germany
 t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211
 e <m.apitz@oclcpica.org> - w http://www.oclcpica.org/ http://guru.UnixArea.de/
 b http://gurucubano.blogspot.com/

From: Jaakko Heinonen <jh@saunalahti.fi>
To: artboreb@yahoo.com, m.apitz@oclcpica.org
Cc: bug-followup@FreeBSD.org
Subject: Re: bin/95979: burncd(8) fails to fixate CDs
Date: Thu, 24 Apr 2008 11:15:35 +0300

 --ZGiS0Q5IWpPtfppv
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 
 
 Hi,
 
 I am getting this too on 7.0-RELEASE with some iso images and with -s
 max option. I have reproduced the problem with three CD-RW drives:
 
 HL-DT-ST GCE-8481B/1.00 (LG)
 HL-DT-ST GCE-8520B/1.02 (LG)
 SAMSUNG CD-R/RW SW-216B BS05 20010727/BS05
 
 The attached patch fixes the problem with all these drives. The patch
 increases the expected fixate time in ata(4). It seems that the current
 value is not enough for some drives with some burning speed and if the
 fixation is not completed in the expected time the driver returns an I/O
 error. The current default is 300 seconds for single speed write and the
 patch increases it to 420 seconds. (The time is divided by burning
 speed.) AFAIK cdrecord and wodim use also 420 seconds.
 
 Could you try the patch and report if it works for you?
 
 -- 
 Jaakko
 
 --ZGiS0Q5IWpPtfppv
 Content-Type: text/x-diff; charset=us-ascii
 Content-Disposition: attachment; filename="atapi-cd-fixate-timeout.diff"
 
 Index: atapi-cd.c
 ===================================================================
 RCS file: /home/ncvs/src/sys/dev/ata/atapi-cd.c,v
 retrieving revision 1.199
 diff -p -u -r1.199 atapi-cd.c
 --- atapi-cd.c	17 Apr 2008 12:29:35 -0000	1.199
 +++ atapi-cd.c	21 Apr 2008 15:52:32 -0000
 @@ -1064,7 +1064,7 @@ acd_fixate(device_t dev, int multisessio
      struct acd_softc *cdp = device_get_ivars(dev);
      int8_t ccb[16] = { ATAPI_CLOSE_TRACK, 0x01, 0x02, 0, 0, 0, 0, 0, 
  		       0, 0, 0, 0, 0, 0, 0, 0 };
 -    int timeout = 5*60*2;
 +    int timeout = 7*60*2;
      int error, dummy;
      struct write_param param;
  
 
 --ZGiS0Q5IWpPtfppv--
State-Changed-From-To: open->feedback 
State-Changed-By: gavin 
State-Changed-When: Sat Apr 26 11:35:10 UTC 2008 
State-Changed-Why:  
Submitter has been asked for feedback 

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

From: Alexander Best <alexbestms@math.uni-muenster.de>
To: <bug-followup@FreeBSD.org>
Cc:  
Subject: Re: bin/95979: [patch] burncd(8) fails to fixate CDs
Date: Tue, 16 Dec 2008 00:05:59 +0100 (CET)

 i'm experiencing the very same problems. for me the patch doesn't work. it
 seems the timeout value isn't high enough. i tried burncd using -s1 and
 fixation succeeded without any problems. however using dd to do a
 disc-to-disc-copy from cd to hd still produces the following warning:
 
     dd: /dev/acd0: Input/output error
 
 more details can be found in this thread:
 http://lists.freebsd.org/pipermail/freebsd-current/2008-December/001251.html
 
 cheers.
 alex

From: Jaakko Heinonen <jh@saunalahti.fi>
To: artboreb@yahoo.com, m.apitz@oclcpica.org, bug-followup@FreeBSD.org
Cc: Alexander Best <alexbestms@math.uni-muenster.de>
Subject: Re: bin/95979: burncd(8) fails to fixate CDs
Date: Sat, 20 Dec 2008 13:45:11 +0200

 On 2008-04-24, Jaakko Heinonen wrote:
 > The current default is 300 seconds for single speed write and the
 > patch increases it to 420 seconds. (The time is divided by burning
 > speed.) AFAIK cdrecord and wodim use also 420 seconds.
 
 Alexander Best reported that event 420 seconds is enough for his drive.
 I investigated the issue more and noticed that acd_test_ready() can
 really never return EBUSY which is expected in acd_fixate(). This causes
 acd_fixate() always to use method which just sleeps the expected
 fixation time. As we have seen this method is not very accurate.
 
 In sys/dev/ata/ata-queue.c (r186322) there's this piece of code:
 
    397          if ((request->u.atapi.sense.key & ATA_SENSE_KEY_MASK ?
    398               request->u.atapi.sense.key & ATA_SENSE_KEY_MASK : 
    399               request->error))
    400              request->result = EIO;
 
 The problem is that this code overwrites the old request->result value
 which might have been EBUSY. This is the reason for acd_test_ready() not
 reporting correctly the drive state. Here's a patch which changes it to
 set request->result only if it's not already set.
 
 --- patch begins here ---
 Index: sys/dev/ata/ata-queue.c
 ===================================================================
 --- sys/dev/ata/ata-queue.c	(revision 186213)
 +++ sys/dev/ata/ata-queue.c	(working copy)
 @@ -434,7 +434,8 @@ ata_completed(void *context, int dummy)
  		printf("\n");
  	}
  
 -	if ((request->u.atapi.sense.key & ATA_SENSE_KEY_MASK ?
 +	if (!request->result &&
 +	     (request->u.atapi.sense.key & ATA_SENSE_KEY_MASK ?
  	     request->u.atapi.sense.key & ATA_SENSE_KEY_MASK : 
  	     request->error))
  	    request->result = EIO;
 --- patch ends here ---
 
 This alone has been confirmed to fix the error with several drives:
 
 TSSTcorpCD/DVDW SH-S182D/SB02
 SAMSUNG CD-R/RW SW-216B BS05 20010727/BS05
 HL-DT-ST GCE-8481B/1.00 (LG)
 HL-DT-ST DVDRAM GSA-H10N/JL10 (LG) (Tested by: Alexander Best)
 
 I still think that it makes sense to also increase the timeout value.
 Here is a combined patch which also increases the timeout to 480
 seconds:
 
 --- patch begins here ---
 Index: sys/dev/ata/atapi-cd.c
 ===================================================================
 --- sys/dev/ata/atapi-cd.c	(revision 186354)
 +++ sys/dev/ata/atapi-cd.c	(working copy)
 @@ -1067,7 +1067,7 @@ acd_fixate(device_t dev, int multisessio
      struct acd_softc *cdp = device_get_ivars(dev);
      int8_t ccb[16] = { ATAPI_CLOSE_TRACK, 0x01, 0x02, 0, 0, 0, 0, 0, 
  		       0, 0, 0, 0, 0, 0, 0, 0 };
 -    int timeout = 5*60*2;
 +    int timeout = 8*60*2;
      int error, dummy;
      struct write_param param;
  
 Index: sys/dev/ata/ata-queue.c
 ===================================================================
 --- sys/dev/ata/ata-queue.c	(revision 186354)
 +++ sys/dev/ata/ata-queue.c	(working copy)
 @@ -434,7 +434,8 @@ ata_completed(void *context, int dummy)
  		printf("\n");
  	}
  
 -	if ((request->u.atapi.sense.key & ATA_SENSE_KEY_MASK ?
 +	if (!request->result &&
 +	     (request->u.atapi.sense.key & ATA_SENSE_KEY_MASK ?
  	     request->u.atapi.sense.key & ATA_SENSE_KEY_MASK : 
  	     request->error))
  	    request->result = EIO;
 --- patch ends here ---
 
 -- 
 Jaakko
State-Changed-From-To: feedback->open 
State-Changed-By: brd 
State-Changed-When: Sat Dec 20 15:48:17 UTC 2008 
State-Changed-Why:  
Reopen, since a updated patch has been submitted. 

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

From: Alexander Best <alexbestms@math.uni-muenster.de>
To: <bug-followup@FreeBSD.org>
Cc: <artboreb@yahoo.com>
Subject: Re: bin/95979: [patch] burncd(8) fails to fixate CDs
Date: Wed, 07 Jan 2009 01:27:58 +0100 (CET)

   This is a MIME encoded multipart message.
 
 --+permail-200901070027586981cf3e0000668c-a_best01+
 Content-Type: text/plain; charset=us-ascii
 Content-Transfer-Encoding: 7bit
 
 I've been testing Jaakko's patch for a few weeks now. It completely solved the
 issues described in the PR for me.
 
 Could somebody please commit the changes he made to ata-queue.c and atapi-cd.c
 to HEAD?
 
 cheers
 Alex
 
 --+permail-200901070027586981cf3e0000668c-a_best01+
 Content-Type: message/rfc822; charset=us-ascii
 Content-Description: Re: bin/95979: [patch] burncd(8) fails to fixate CDs
  (fwd)
 
 Date: Sun, 04 Jan 2009 20:19:04 +0100 (CET)
 From: Alexander Best <alexbestms@math.uni-muenster.de>
 Sender: <a_best01@uni-muenster.de>
 Organization: Westfaelische Wilhelms-Universitaet Muenster
 Subject: Re: bin/95979: [patch] burncd(8) fails to fixate CDs
 To: <freebsd-bugs@FreeBSD.org>
 Message-ID: <permail-2009010419190480e26a0b00007194-a_best01@message-id.uni-muenster.de>
 MIME-Version: 1.0
 Content-Type: text/plain; charset=us-ascii
 Content-Transfer-Encoding: 7bit
 
 I've been testing Jaakko's patch for a few weeks now. It completely solved the
 issues described in the PR for me.
 
 Could somebody please commit the changes he made to ata-queue.c and atapi-cd.c
 to HEAD?
 
 cheers
 Alex
 
 
 --+permail-200901070027586981cf3e0000668c-a_best01+--

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/95979: commit references a PR
Date: Mon, 12 Jan 2009 17:19:08 +0000 (UTC)

 Author: obrien
 Date: Mon Jan 12 17:18:58 2009
 New Revision: 187105
 URL: http://svn.freebsd.org/changeset/base/187105
 
 Log:
   Fix issue where ata_atapicmd() can never really return EBUSY which is
   expected in acd_fixate().
   
   This should fix various problems folks are having with 'burncd' reporting
   "burncd: ioctl(CDRIOCFIXATE): Input/output error" during the fixate phase
   when "fixate" is issued together with the "data" command.
   
   PR:		95979
   Submitted by:	Jaakko Heinonen <jh@saunalahti.fi>
 
 Modified:
   head/sys/dev/ata/ata-queue.c
 
 Modified: head/sys/dev/ata/ata-queue.c
 ==============================================================================
 --- head/sys/dev/ata/ata-queue.c	Mon Jan 12 17:15:09 2009	(r187104)
 +++ head/sys/dev/ata/ata-queue.c	Mon Jan 12 17:18:58 2009	(r187105)
 @@ -434,7 +434,8 @@ ata_completed(void *context, int dummy)
  		printf("\n");
  	}
  
 -	if ((request->u.atapi.sense.key & ATA_SENSE_KEY_MASK ?
 +	if (!request->result &&
 +	     (request->u.atapi.sense.key & ATA_SENSE_KEY_MASK ?
  	     request->u.atapi.sense.key & ATA_SENSE_KEY_MASK : 
  	     request->error))
  	    request->result = EIO;
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: open->feedback 
State-Changed-By: obrien 
State-Changed-When: Tue Jan 13 18:02:29 UTC 2009 
State-Changed-Why:  
fix committed 


Responsible-Changed-From-To: freebsd-bugs->obrien 
Responsible-Changed-By: obrien 
Responsible-Changed-When: Tue Jan 13 18:02:29 UTC 2009 
Responsible-Changed-Why:  
I did the commit 

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

From: Alexander Best <alexbestms@math.uni-muenster.de>
To: <bug-followup@FreeBSD.org>
Cc:  
Subject: Re: bin/95979: [patch] burncd(8) fails to fixate CDs
Date: Sun, 18 Jan 2009 15:04:59 +0100 (CET)

 it would be nice if somebody could have a look at the cdecord src in order to
 verify the timeout delay during fixation. otherwise the timeout-change to
 atapi-cd.c won't get comitted to HEAD.
 
 alex

From: Alexander Best <alexbestms@math.uni-muenster.de>
To: <bug-followup@FreeBSD.org>
Cc:  
Subject: Re: bin/95979: [patch] burncd(8) fails to fixate CDs
Date: Fri, 27 Mar 2009 13:00:04 +0100 (CET)

 this PR can be closed. although it's been proposed to increase the timeout
 value, nobody seems to be having problem with it's current setting.
 
 cheers.

From: Alexander Best <alexbestms@math.uni-muenster.de>
To: <bug-followup@FreeBSD.org>
Cc: Jaakko Heinonen <jh@saunalahti.fi>
Subject: Re: bin/95979: [patch] burncd(8) fails to fixate CDs
Date: Sat, 07 Nov 2009 00:06:57 +0100 (CET)

   This is a MIME encoded multipart message.
 
 --+permail-20091106230657f0889e8400003c75-a_best01+
 Content-Type: text/plain; charset=us-ascii
 Content-Transfer-Encoding: 7bit
 
 these changes (commit r187105) still need to be backported to 7-stable and
 6-stable.
 
 i've attached patches against 6-stable and 7-stable.
 
 alex
 
 --+permail-20091106230657f0889e8400003c75-a_best01+
 Content-Type: text/plain
 Content-Transfer-Encoding: Base64
 Content-Disposition: attachment; filename="ataqueue.c.patch.6stable.txt"
 
 LS0tIGF0YS1xdWV1ZS5jLm9yaWcJMjAwOS0xMS0wNyAwMDowMDowMy4wMDAwMDAwMDAgKzAxMDAK
 KysrIGF0YS1xdWV1ZS5jCTIwMDktMTEtMDcgMDA6MDA6MzguMDAwMDAwMDAwICswMTAwCkBAIC00
 MzQsNyArNDM0LDggQEAKIAkJcHJpbnRmKCJcbiIpOwogCX0KIAotCWlmICgocmVxdWVzdC0+dS5h
 dGFwaS5zZW5zZS5rZXkgJiBBVEFfU0VOU0VfS0VZX01BU0sgPworCWlmICghcmVxdWVzdC0+cmVz
 dWx0ICYmCisJICAgICAocmVxdWVzdC0+dS5hdGFwaS5zZW5zZS5rZXkgJiBBVEFfU0VOU0VfS0VZ
 X01BU0sgPwogCSAgICAgcmVxdWVzdC0+dS5hdGFwaS5zZW5zZS5rZXkgJiBBVEFfU0VOU0VfS0VZ
 X01BU0sgOiAKIAkgICAgIHJlcXVlc3QtPmVycm9yKSkKIAkgICAgcmVxdWVzdC0+cmVzdWx0ID0g
 RUlPOwo=
 
 --+permail-20091106230657f0889e8400003c75-a_best01+
 Content-Type: text/plain
 Content-Transfer-Encoding: Base64
 Content-Disposition: attachment; filename="ataqueue.c.patch.7stable.txt"
 
 LS0tIGF0YS1xdWV1ZS5jLm9yaWcJMjAwOS0xMS0wNiAyMzo1NDozMC4wMDAwMDAwMDAgKzAxMDAK
 KysrIGF0YS1xdWV1ZS5jCTIwMDktMTEtMDYgMjM6NTg6MzQuMDAwMDAwMDAwICswMTAwCkBAIC00
 MzYsNyArNDM2LDggQEAKIAkJcHJpbnRmKCJcbiIpOwogCX0KIAotCWlmICgocmVxdWVzdC0+dS5h
 dGFwaS5zZW5zZS5rZXkgJiBBVEFfU0VOU0VfS0VZX01BU0sgPworCWlmICghcmVxdWVzdC0+cmVz
 dWx0ICYmCisJICAgICAocmVxdWVzdC0+dS5hdGFwaS5zZW5zZS5rZXkgJiBBVEFfU0VOU0VfS0VZ
 X01BU0sgPwogCSAgICAgcmVxdWVzdC0+dS5hdGFwaS5zZW5zZS5rZXkgJiBBVEFfU0VOU0VfS0VZ
 X01BU0sgOiAKIAkgICAgIHJlcXVlc3QtPmVycm9yKSkKIAkgICAgcmVxdWVzdC0+cmVzdWx0ID0g
 RUlPOwo=
 
 --+permail-20091106230657f0889e8400003c75-a_best01+--
State-Changed-From-To: feedback->patched 
State-Changed-By: linimon 
State-Changed-When: Sat Nov 7 02:44:46 UTC 2009 
State-Changed-Why:  
Note that a fix has been committed but needs MFC to 6 and 7. 

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

From: Joseph Olatt <joji@eskimo.com>
To: bug-followup@FreeBSD.org, artboreb@yahoo.com
Cc:  
Subject: Re: bin/95979: [patch] burncd(8) fails to fixate CDs
Date: Tue, 10 Aug 2010 18:39:39 -0700

 Hi,
 
 I had opened the following bug report:
 
 http://www.freebsd.org/cgi/query-pr.cgi?pr=149203
 
 That was closed by jh and I was asked to incorporate the timeout
 change from this bug report and provide feedback.
 
 I changed the timeout value in sys/dev/ata/atapi-cd.c as follows:
 
 -    int timeout = 5*60*2;
 +    int timeout = 8*60*2;
 
 
 Then I recompiled the kernel, installed it and tried to fixate the CD
 that I was not able to fixate. I'm still getting the same error.
 
 The output is:
 
 serenity> time burncd -f /dev/acd0 fixate
 fixating CD, please wait..
 burncd: ioctl(CDRIOCFIXATE): Device busy
 0.000u 0.000s 0:20.09 0.0%      0+0k 0+0io 0pf+0w
 
 

From: Jaakko Heinonen <jh@FreeBSD.org>
To: Joseph Olatt <joji@eskimo.com>
Cc: bug-followup@FreeBSD.org
Subject: Re: bin/95979: [patch] burncd(8) fails to fixate CDs
Date: Wed, 11 Aug 2010 16:28:55 +0300

 Thanks for the information.
 
 On 2010-08-10, Joseph Olatt wrote:
 > Then I recompiled the kernel, installed it and tried to fixate the CD
 > that I was not able to fixate. I'm still getting the same error.
 
 Are you sure that the fixation didn't complete despite of the error
 message? In the original report you reported that you get "Input/output
 error" but now the error is "Device busy"?
 
 > serenity> time burncd -f /dev/acd0 fixate
 > fixating CD, please wait..
 > burncd: ioctl(CDRIOCFIXATE): Device busy
 > 0.000u 0.000s 0:20.09 0.0%      0+0k 0+0io 0pf+0w
 
 Could you revert the timeout change and try this patch instead?
 
 %%%
 Index: sys/dev/ata/atapi-cd.c
 ===================================================================
 --- sys/dev/ata/atapi-cd.c	(revision 211170)
 +++ sys/dev/ata/atapi-cd.c	(working copy)
 @@ -1095,7 +1095,7 @@ acd_fixate(device_t dev, int multisessio
      }
  
      while (timeout-- > 0) {
 -	if ((error = acd_get_progress(dev, &dummy)))
 +	if ((error = acd_get_progress(dev, &dummy)) != EBUSY)
  	    return error;
  	if ((error = acd_test_ready(dev)) != EBUSY)
  	    return error;
 %%%
 
 -- 
 Jaakko

From: Joseph Olatt <joji@eskimo.com>
To: Jaakko Heinonen <jh@FreeBSD.org>
Cc: bug-followup@FreeBSD.org
Subject: Re: bin/95979: [patch] burncd(8) fails to fixate CDs
Date: Mon, 16 Aug 2010 09:46:48 -0700

 On Wed, Aug 11, 2010 at 04:28:55PM +0300, Jaakko Heinonen wrote:
 > 
 > Thanks for the information.
 > 
 > On 2010-08-10, Joseph Olatt wrote:
 > > Then I recompiled the kernel, installed it and tried to fixate the CD
 > > that I was not able to fixate. I'm still getting the same error.
 > 
 > Are you sure that the fixation didn't complete despite of the error
 > message? In the original report you reported that you get "Input/output
 > error" but now the error is "Device busy"?
 
 
 Your suspicion was correct. The disk was getting fixated despite the
 error. I could not apply your patch as it was throwing an error
 (included below). But I manually incorporated the change in your 
 patch, rebuilt and installed the new kernel and I was able to burn 
 a CD and fixate it using burncd without any errors.
 
 The change I incorporated is:
 
   serenity> diff atapi-cd.c atapi-cd.c.orig
   1098,1099c1098
   <       /*if ((error = acd_get_progress(dev, &dummy)))*/
   <         if ((error = acd_get_progress(dev, &dummy)) != EBUSY)
   ---
   >       if ((error = acd_get_progress(dev, &dummy)))
                                                                                                                  
 
 
 
 The error I got when I tried to apply your patch was:
 
   serenity# patch < /tmp/jh.patch 
   Hmm...  Looks like a unified diff to me...
   The text leading up to this was:
   --------------------------
   |%%%
   |Index: sys/dev/ata/atapi-cd.c
   |===================================================================
   |--- sys/dev/ata/atapi-cd.c      (revision 211170)
   |+++ sys/dev/ata/atapi-cd.c      (working copy)
   --------------------------
   Patching file sys/dev/ata/atapi-cd.c using Plan A...
   Hunk #1 failed at 1095.
   1 out of 1 hunks failed--saving rejects to sys/dev/ata/atapi-cd.c.rej
   Hmm...  Ignoring the trailing garbage.
   done
 
 
 
 For the benefit of the history of the mailing list, my drive is:
 acd0: DVDR <hp DVD-RAM GH40L/RB0E> at ata5-master UDMA100 SATA 1.5Gb/s
 
 OS version:
 FreeBSD serenity 8.1-STABLE FreeBSD 8.1-STABLE #3: Mon Aug 16 10:57:23
 CDT 2010     root@serenity:/usr/obj/usr/src/sys/SERENITY  i386
 
 
 Thanks for your support. And, sorry for the delay in making these
 changes.
 
 
 regards,
 joseph
 
 
 <snip>

From: Alexander Best <arundel@freebsd.org>
To: Jaakko Heinonen <jh@freebsd.org>
Cc: bug-followup@freebsd.org
Subject: Re: bin/95979: [patch] burncd(8) fails to fixate CDs
Date: Tue, 15 Feb 2011 01:42:26 +0000

 hi jaakko,
 
 any chance you could MFC r187105 to stable/7, so we can close this PR?
 
 cheers.
 alex
 
 -- 
 a13x
State-Changed-From-To: patched->closed 
State-Changed-By: jh 
State-Changed-When: Tue Mar 1 18:07:47 UTC 2011 
State-Changed-Why:  
Fixed in head, stable/8 and stable/7. 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/95979: commit references a PR
Date: Tue,  1 Mar 2011 18:06:10 +0000 (UTC)

 Author: jh
 Date: Tue Mar  1 18:05:57 2011
 New Revision: 219142
 URL: http://svn.freebsd.org/changeset/base/219142
 
 Log:
   MFC r187105 by obrien:
   
   Fix issue where ata_atapicmd() can never really return EBUSY which is
   expected in acd_fixate().
   
   This should fix various problems folks are having with 'burncd' reporting
   "burncd: ioctl(CDRIOCFIXATE): Input/output error" during the fixate phase
   when "fixate" is issued together with the "data" command.
   
   PR:		95979
 
 Modified:
   stable/7/sys/dev/ata/ata-queue.c
 Directory Properties:
   stable/7/sys/   (props changed)
   stable/7/sys/cddl/contrib/opensolaris/   (props changed)
   stable/7/sys/contrib/dev/acpica/   (props changed)
   stable/7/sys/contrib/pf/   (props changed)
 
 Modified: stable/7/sys/dev/ata/ata-queue.c
 ==============================================================================
 --- stable/7/sys/dev/ata/ata-queue.c	Tue Mar  1 17:39:27 2011	(r219141)
 +++ stable/7/sys/dev/ata/ata-queue.c	Tue Mar  1 18:05:57 2011	(r219142)
 @@ -443,7 +443,8 @@ ata_completed(void *context, int dummy)
  		printf("\n");
  	}
  
 -	if ((request->u.atapi.sense.key & ATA_SENSE_KEY_MASK ?
 +	if (!request->result &&
 +	     (request->u.atapi.sense.key & ATA_SENSE_KEY_MASK ?
  	     request->u.atapi.sense.key & ATA_SENSE_KEY_MASK : 
  	     request->error))
  	    request->result = EIO;
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
>Unformatted:
