kern/104270: [patch] [atapicd] burncd failure due to acd_get_progress() misbehavour (regression)

Eugene Grosbein eugen at grosbein.pp.ru
Tue Oct 10 08:51:05 PDT 2006


>Number:         104270
>Category:       kern
>Synopsis:       [patch] [atapicd] burncd failure due to acd_get_progress() misbehavour (regression)
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Oct 10 15:50:20 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Eugene Grosbein
>Release:        FreeBSD 6.2-PRERELEASE i386
>Organization:
Svyaz Service JSC
>Environment:
System: FreeBSD grosbein.pp.ru 6.2-PRERELEASE FreeBSD 6.2-PRERELEASE #0: Tue Oct 10 22:01:23 KRAST 2006 eu at grosbein.pp.ru:/mnt/home/obj/usr/local/src/sys/DADV i386
	acd0: DVDR <NEC DVD RW ND-3500AG/2.18>

>Description:
	I've dual boot machine with FreeBSD 4.11-STABLE and 6.2-PRERELEASE,
	later is built using today's sources.

	burncd blank for CD-RW works fine with 4.11, it shows progress status
	and finishes after 100%.

	In 6.2, it does not show percents and sleeps forever.

	It uses CDRIOCGETPROGRESS ioctl to get progress status from
	the kernel. This ioctl is processed with acd_get_progress()
	function that throws away progress status obtained
	from the drive unless request->u.atapi.sense.error contains
	highest bit set (0x80). For my drive, it equals to 0x70
	during blanking process and becomes zero after finishing
	so atapicd's logic failt to return correct data to userland.

>How-To-Repeat:
	Take NEC DVD RW ND-3500AG/2.18 and try to blank CD-RW with burncd.

>Fix:

	Preliminary patch that makes burncd work for me:

--- atapi-cd.c.orig	Fri Sep 29 21:05:26 2006
+++ atapi-cd.c	Tue Oct 10 23:27:23 2006
@@ -1234,7 +1234,7 @@
     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)
+    if (!request->error && request->u.atapi.sense.error)
 	*finished = ((request->u.atapi.sense.specific2 |
 		     (request->u.atapi.sense.specific1 << 8)) * 100) / 65535;
     else



	I've failed to find the reason for checking highest bit
	of u.atapi.sense.error, this check fails for me so I've removed it.

Eugene Grosbein
>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list