From martin@email.aon.at  Sun Feb 18 10:43:53 2007
Return-Path: <martin@email.aon.at>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 285A016A400
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 18 Feb 2007 10:43:53 +0000 (UTC)
	(envelope-from martin@email.aon.at)
Received: from email.aon.at (nat-warsl417-02.aon.at [195.3.96.120])
	by mx1.freebsd.org (Postfix) with ESMTP id 84E6113C46B
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 18 Feb 2007 10:43:52 +0000 (UTC)
	(envelope-from martin@email.aon.at)
Received: (qmail 15780 invoked from network); 18 Feb 2007 10:17:10 -0000
Received: from unknown (HELO email.aon.at) ([172.18.5.230])
          (envelope-sender <martin@email.aon.at>)
          by fallback01.highway.telekom.at (qmail-ldap-1.03) with SMTP
          for <FreeBSD-gnats-submit@freebsd.org>; 18 Feb 2007 10:17:10 -0000
Received: (qmail 3810 invoked from network); 18 Feb 2007 10:17:05 -0000
Received: from m1458p030.adsl.highway.telekom.at (HELO gandalf.xyzzy) ([80.121.54.62])
          (envelope-sender <martin@email.aon.at>)
          by smarthub77.highway.telekom.at (qmail-ldap-1.03) with SMTP
          for <FreeBSD-gnats-submit@freebsd.org>; 18 Feb 2007 10:17:05 -0000
Received: from gandalf.xyzzy (localhost.xyzzy [127.0.0.1])
	by gandalf.xyzzy (8.13.8/8.13.8) with ESMTP id l1IAH5cR003935
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 18 Feb 2007 11:17:05 +0100 (CET)
	(envelope-from martin@gandalf.xyzzy)
Received: (from martin@localhost)
	by gandalf.xyzzy (8.13.8/8.13.8/Submit) id l1IAH4w1003934;
	Sun, 18 Feb 2007 11:17:04 +0100 (CET)
	(envelope-from martin)
Message-Id: <200702181017.l1IAH4w1003934@gandalf.xyzzy>
Date: Sun, 18 Feb 2007 11:17:04 +0100 (CET)
From: Martin Birgmeier <martin@email.aon.at>
Reply-To: Martin Birgmeier <martin@email.aon.at>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [burncd] [atapi] [ata] [patch] patch for burncd blank & fixate
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         109270
>Category:       kern
>Synopsis:       [ata] [patch] for burncd(8) blank & fixate
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    sos
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Feb 18 10:50:05 GMT 2007
>Closed-Date:    Sun Dec 09 11:49:01 UTC 2007
>Last-Modified:  Sat Jan  5 14:00:03 UTC 2008
>Originator:     Martin Birgmeier <martin@gandalf.xyzzy>
>Release:        FreeBSD 6.2-RELEASE i386
>Organization:
MBi at home
>Environment:
System: FreeBSD gandalf.xyzzy 6.2-RELEASE FreeBSD 6.2-RELEASE #1: Fri Feb 16 22:33:38 CET 2007 root@gandalf.xyzzy:/d/14.1/OBJ/FreeBSD/RELENG_6_2_0_RELEASE/src/sys/XYZZY i386

>Description:
	burncd blank & burncd ... fixate hang at the blanking/fixate stage

>How-To-Repeat:
	see description

>Fix:
	The problem seems to stem from an incorrect reading of the MMC
	ATAPI specification - the patch in atapi-cd.c shows what is wrong.
	For me this gets it working for the first time since ages
	(RELENG_5 probably). In RELENG_4 this was working (the code was
	not in there).

	The ata.h patch is just a miscellaneous fix, the constants affected
	are not used anywhere in the current code.

	I assume that this patch closes kern/79255, kern/95344, bin/98082,
	bin/98502, and probably bin/63319. It also closes kern/104270,
	which contains a too simple-minded patch.

	Sorry, the e-mail address is invalid - too much spam. Respond by
	adding to the PR.

*** sys/dev/ata/atapi-cd.c.ORIG	Sat Sep  2 19:01:32 2006
--- sys/dev/ata/atapi-cd.c	Fri Feb 16 21:34:12 2007
***************
*** 1234,1240 ****
      request->flags = ATA_R_ATAPI | ATA_R_READ;
      request->timeout = 30;
      ata_queue_request(request);
!     if (!request->error && request->u.atapi.sense.error & ATA_SENSE_VALID)
  	*finished = ((request->u.atapi.sense.specific2 |
  		     (request->u.atapi.sense.specific1 << 8)) * 100) / 65535;
      else
--- 1234,1240 ----
      request->flags = ATA_R_ATAPI | ATA_R_READ;
      request->timeout = 30;
      ata_queue_request(request);
!     if (!request->error && request->u.atapi.sense.specific & ATA_SENSE_SPEC_VALID)
  	*finished = ((request->u.atapi.sense.specific2 |
  		     (request->u.atapi.sense.specific1 << 8)) * 100) / 65535;
      else

*** sys/sys/ata.h.ORIG	Tue Apr  4 18:07:41 2006
--- sys/sys/ata.h	Fri Feb 16 21:33:33 2007
***************
*** 373,381 ****
  #define ATA_SENSE_VOLUME_OVERFLOW	0x0d    /* volume overflow */
  #define ATA_SENSE_MISCOMPARE		0x0e    /* data dont match the medium */
  #define ATA_SENSE_RESERVED		0x0f
! #define	ATA_SENSE_ILI			0x20;
! #define	ATA_SENSE_EOM			0x40;
! #define	ATA_SENSE_FILEMARK		0x80;
  
      u_int32_t   cmd_info;		/* cmd information */
      u_int8_t	sense_length;		/* additional sense len (n-7) */
--- 373,381 ----
  #define ATA_SENSE_VOLUME_OVERFLOW	0x0d    /* volume overflow */
  #define ATA_SENSE_MISCOMPARE		0x0e    /* data dont match the medium */
  #define ATA_SENSE_RESERVED		0x0f
! #define	ATA_SENSE_ILI			0x20
! #define	ATA_SENSE_EOM			0x40
! #define	ATA_SENSE_FILEMARK		0x80
  
      u_int32_t   cmd_info;		/* cmd information */
      u_int8_t	sense_length;		/* additional sense len (n-7) */
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->sos 
Responsible-Changed-By: remko 
Responsible-Changed-When: Mon Feb 19 06:48:28 UTC 2007 
Responsible-Changed-Why:  
Soren has work in progress for this, assign the PR ticket to him for 
reference (it will close a lot of open PR's) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=109270 
State-Changed-From-To: open->feedback 
State-Changed-By: remko 
State-Changed-When: Sun Dec 9 11:44:16 UTC 2007 
State-Changed-Why:  
Hello, Soren recently added a couple of fixes for this in all of our 
RELENG_{6,6_3,7} branches, can you have a look whether that had fixed 
the problemf or you as well (I guess so) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=109270 
State-Changed-From-To: feedback->closed 
State-Changed-By: remko 
State-Changed-When: Sun Dec 9 11:49:00 UTC 2007 
State-Changed-Why:  
Yeah the game of the undeliverable messages, I know you can read this 
(as you stated in the ticket), so I will do it differently; close the 
PR, let me know in case this had not been fixed by the recent work of 
soren in this region. Thanks. 

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

From: Martin Birgmeier <martin@email.aon.at>
To: bug-followup@FreeBSD.org, remko@FreeBSD.org
Cc:  
Subject: Re: kern/109270: [burncd] [atapi] [ata] [patch] patch for burncd blank & fixate
Date: Sat, 5 Jan 2008 14:57:32 +0100 (CET)

 Hi,
 
 Yes, the patch (actually the same as mine) has been included in the
 source tree and is working fine.
 
 Regards,
 
 Martin
>Unformatted:
