Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 18 Feb 2007 11:17:04 +0100 (CET)
From:      Martin Birgmeier <martin@email.aon.at>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   kern/109270: [burncd] [atapi] [ata] [patch] patch for burncd blank & fixate
Message-ID:  <200702181017.l1IAH4w1003934@gandalf.xyzzy>
Resent-Message-ID: <200702181050.l1IAo64E015729@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         109270
>Category:       kern
>Synopsis:       [burncd] [atapi] [ata] [patch] patch for burncd blank & fixate
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Feb 18 10:50:05 GMT 2007
>Closed-Date:
>Last-Modified:
>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:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200702181017.l1IAH4w1003934>