Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Oct 2006 23:41:44 +0800 (KRAST)
From:      Eugene Grosbein <eugen@grosbein.pp.ru>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        sos@FreeBSD.org
Subject:   kern/104270: [patch] [atapicd] burncd failure due to acd_get_progress() misbehavour (regression)
Message-ID:  <200610101541.k9AFfiEO001684@grosbein.pp.ru>
Resent-Message-ID: <200610101550.k9AFoKPH041827@freefall.freebsd.org>

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

>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@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:



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