From nobody@FreeBSD.org  Tue Mar 27 08:14:25 2001
Return-Path: <nobody@FreeBSD.org>
Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21])
	by hub.freebsd.org (Postfix) with ESMTP id 70BBD37B71B
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 27 Mar 2001 08:14:25 -0800 (PST)
	(envelope-from nobody@FreeBSD.org)
Received: (from nobody@localhost)
	by freefall.freebsd.org (8.11.1/8.11.1) id f2RGEPA96921;
	Tue, 27 Mar 2001 08:14:25 -0800 (PST)
	(envelope-from nobody)
Message-Id: <200103271614.f2RGEPA96921@freefall.freebsd.org>
Date: Tue, 27 Mar 2001 08:14:25 -0800 (PST)
From: kar@mglorysb.com
To: freebsd-gnats-submit@FreeBSD.org
Subject: burncd exists before fixating - 4.3 RC #0
X-Send-Pr-Version: www-1.0

>Number:         26151
>Category:       bin
>Synopsis:       burncd exists before fixating - 4.3 RC #0
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    sos
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Mar 27 08:20:00 PST 2001
>Closed-Date:    Mon Apr 16 14:20:10 PDT 2001
>Last-Modified:  Mon Apr 16 14:20:58 PDT 2001
>Originator:     K Karthik
>Release:        4.3 RC0
>Organization:
Multimedia Glory Sdn Bhd
>Environment:
FreeBSD svr.mgsb.domain 4.3-RC FreeBSD 4.3-RC #0: Fri Mar 23 18:53:41 GMT 2001
>Description:
burncd exists before fixating. I was using the following command

1. burncd -f /dev/acd1c blank (for blanking the CDRW)

2. burncd -f /dev/acd1c data cd.iso fixate 

For the command 2, the data was written to disk succesfully when it starts fixating (msg displayed) but the burncd exists. I get PREVENT_ALLOW in bold text in the console. BUT the CDRW fixates and indicates it is busy. After about 2-5 minutes, the lights go off and when i mount the CD, CD is OK. 

I think burncd successfully fixates but the burncd exits before the fixate process completes. 

This problem does not appear in FreeBSD 4.2-RELEASE that i was using until I cvsup-ped the STABLE source.
>How-To-Repeat:
1.  burncd -f /dev/acd1c blank (successfull)

2.  burncd -f /dev/acd1c data cd.iso fixate 

command 2 exists before fixating.

>Fix:

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->sos 
Responsible-Changed-By: kris 
Responsible-Changed-When: Tue Mar 27 10:54:48 PST 2001 
Responsible-Changed-Why:  
sos wrote burncd 

http://www.freebsd.org/cgi/query-pr.cgi?pr=26151 
State-Changed-From-To: open->analyzed 
State-Changed-By: sos 
State-Changed-When: Mon Apr 2 12:30:19 PDT 2001 
State-Changed-Why:  

Please try this patch and tell me if that works: 
--- atapi-cd.c  2001/02/25 21:35:20     1.48.2.10 
+++ atapi-cd.c  2001/04/02 19:36:45 
@@ -1364,11 +1364,15 @@ 
static int 
acd_close_disk(struct acd_softc *cdp, int multisession) 
{ 
-    int8_t ccb[16] = { ATAPI_CLOSE_TRACK, 0x01, 0x02, 0, 0, 0, 0, 0,  
-                      0, 0, 0, 0, 0, 0, 0, 0 }; 
+    int8_t ccb1[16] = { ATAPI_CLOSE_TRACK, 0x01, 0x02, 0, 0, 0, 0, 0,  
+                       0, 0, 0, 0, 0, 0, 0, 0 }; 
+    int8_t ccb2[16] = { ATAPI_READ_CAPACITY, 0, 0, 0, 0, 0, 0, 0,  
+                       0, 0, 0, 0, 0, 0, 0, 0 }; 
+    struct write_param param; 
int timeout = 5*60*2; 
int error; 
-    struct write_param param; 
+    char tmp[8]; 
+     

if ((error = acd_mode_sense(cdp, ATAPI_CDROM_WRITE_PARAMETERS_PAGE, 
(caddr_t)&param, sizeof(param)))) 
@@ -1382,12 +1386,15 @@ 
if ((error = acd_mode_select(cdp, (caddr_t)&param, sizeof(param)))) 
return error; 

-    error = atapi_queue_cmd(cdp->atp, ccb, NULL, 0, 0, 30, NULL, NULL); 
+    error = atapi_queue_cmd(cdp->atp, ccb1, NULL, 0, 0, 30, NULL, NULL); 
if (error) 
return error; 
while (timeout-- > 0) { 
-        if ((error = atapi_test_ready(cdp->atp)) != EBUSY) 
-            return error; 
+        if ((error = atapi_test_ready(cdp->atp)) != EBUSY) { 
+           if (atapi_queue_cmd(cdp->atp, ccb2, tmp, sizeof(tmp), 
+                               ATPR_F_READ, 30, NULL, NULL) != EBUSY) 
+               return error; 
+       } 
tsleep(&error, PRIBIO, "acdcld", hz/2); 
} 
return EIO; 


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

From: K Karthik <kar@mglorysb.com>
To: freebsd-gnats-submit@FreeBSD.org, kar@mglorysb.com
Cc:  
Subject: Re: bin/26151: burncd exists before fixating - 4.3 RC #0
Date: Tue, 3 Apr 2001 11:42:40 +0000

 I have applied the patch but the problem still persists. burncd exits before 
 fixating is complete.
 
 I get a new message in bold. 
 
 The following messages appear in bold:
 
 1. acd1: READ_TOC - ILLEGAL REQUEST asc=24 ascq=00 error=04 (old)
 2. acd1: READ_CAPACITY - ILLEGAL REQUEST asc=24 ascq=00 error=04 (new)
 3. acd1: PREVENT_ALLOW - ILLEGAL REQUEST asc=24 ascq=00 error=04 (old)
 
 I am using Sony CD-RW (CRX100E).
 
 Thanks
 Karthik
 
 
 --- atapi-cd.c  2001/02/25 21:35:20     1.48.2.10 
 +++ atapi-cd.c  2001/04/02 19:36:45 
 @@ -1364,11 +1364,15 @@ 
 static int 
 acd_close_disk(struct acd_softc *cdp, int multisession) 
 { 
 -    int8_t ccb[16] = { ATAPI_CLOSE_TRACK, 0x01, 0x02, 0, 0, 0, 0, 0,  
 -                      0, 0, 0, 0, 0, 0, 0, 0 }; 
 +    int8_t ccb1[16] = { ATAPI_CLOSE_TRACK, 0x01, 0x02, 0, 0, 0, 0, 0,  
 +                       0, 0, 0, 0, 0, 0, 0, 0 }; 
 +    int8_t ccb2[16] = { ATAPI_READ_CAPACITY, 0, 0, 0, 0, 0, 0, 0,  
 +                       0, 0, 0, 0, 0, 0, 0, 0 }; 
 +    struct write_param param; 
 int timeout = 5*60*2; 
 int error; 
 -    struct write_param param; 
 +    char tmp[8]; 
 +     
 
 if ((error = acd_mode_sense(cdp, ATAPI_CDROM_WRITE_PARAMETERS_PAGE, 
 (caddr_t)&param, sizeof(param)))) 
 @@ -1382,12 +1386,15 @@ 
 if ((error = acd_mode_select(cdp, (caddr_t)&param, sizeof(param)))) 
 return error; 
 
 -    error = atapi_queue_cmd(cdp->atp, ccb, NULL, 0, 0, 30, NULL, NULL); 
 +    error = atapi_queue_cmd(cdp->atp, ccb1, NULL, 0, 0, 30, NULL, NULL); 
 if (error) 
 return error; 
 while (timeout-- > 0) { 
 -        if ((error = atapi_test_ready(cdp->atp)) != EBUSY) 
 -            return error; 
 +        if ((error = atapi_test_ready(cdp->atp)) != EBUSY) { 
 +           if (atapi_queue_cmd(cdp->atp, ccb2, tmp, sizeof(tmp), 
 +                               ATPR_F_READ, 30, NULL, NULL) != EBUSY) 
 +               return error; 
 +       } 
 tsleep(&error, PRIBIO, "acdcld", hz/2); 
 } 
 return EIO; 
 
 

From: K Karthik <kar@mglorysb.com>
To: freebsd-gnats-submit@FreeBSD.org, kar@mglorysb.com
Cc:  
Subject: Re: bin/26151: burncd exists before fixating - 4.3 RC #0
Date: Tue, 3 Apr 2001 18:05:23 +0000

 Messages:
 
 1. acd1: READ_TOC - ILLEGAL REQUEST asc=24 ascq=00 error=04 (old)
 2. acd1: READ_CAPACITY - ILLEGAL REQUEST asc=24 ascq=00 error=04 (new)
 3. acd1: PREVENT_ALLOW - ILLEGAL REQUEST asc=24 ascq=00 error=04 (old)
 
 Occurence:
 
 a. message 1 appeared after burncd exits when I use this command:
     burncd -f /dev/acd1c blank 
 
 b. message 2 and 3 appeared after burncd exits when I use this command:
      burncd -f /dev/acd1c data cd.iso fixate
   
    After the data is written to disk, "fixating CD , please wait.." message 
 appears, then burncd exits. After it exits  (I get # prompt), then the 
 message 2 and 3 appears.
 
 Thanks
 Karthik
 
 
 
 ----------  Forwarded Message  ----------
 Subject: Re: bin/26151: burncd exists before fixating - 4.3 RC #0
 Date: Tue, 3 Apr 2001 11:42:40 +0000
 From: K Karthik <kar@mglorysb.com>
 To: freebsd-gnats-submit@FreeBSD.org, kar@mglorysb.com
 
 
 I have applied the patch but the problem still persists. burncd exits before
 fixating is complete.
 
 I get a new message in bold.
 
 The following messages appear in bold:
 
 1. acd1: READ_TOC - ILLEGAL REQUEST asc=24 ascq=00 error=04 (old)
 2. acd1: READ_CAPACITY - ILLEGAL REQUEST asc=24 ascq=00 error=04 (new)
 3. acd1: PREVENT_ALLOW - ILLEGAL REQUEST asc=24 ascq=00 error=04 (old)
 
 I am using Sony CD-RW (CRX100E).
 
 Thanks
 Karthik
 
 
 --- atapi-cd.c  2001/02/25 21:35:20     1.48.2.10
 +++ atapi-cd.c  2001/04/02 19:36:45
 @@ -1364,11 +1364,15 @@
 static int
 acd_close_disk(struct acd_softc *cdp, int multisession)
 {
 -    int8_t ccb[16] = { ATAPI_CLOSE_TRACK, 0x01, 0x02, 0, 0, 0, 0, 0,
 -                      0, 0, 0, 0, 0, 0, 0, 0 };
 +    int8_t ccb1[16] = { ATAPI_CLOSE_TRACK, 0x01, 0x02, 0, 0, 0, 0, 0,
 +                       0, 0, 0, 0, 0, 0, 0, 0 };
 +    int8_t ccb2[16] = { ATAPI_READ_CAPACITY, 0, 0, 0, 0, 0, 0, 0,
 +                       0, 0, 0, 0, 0, 0, 0, 0 };
 +    struct write_param param;
 int timeout = 5*60*2;
 int error;
 -    struct write_param param;
 +    char tmp[8];
 +
 
 if ((error = acd_mode_sense(cdp, ATAPI_CDROM_WRITE_PARAMETERS_PAGE,
 (caddr_t)&param, sizeof(param))))
 @@ -1382,12 +1386,15 @@
 if ((error = acd_mode_select(cdp, (caddr_t)&param, sizeof(param))))
 return error;
 
 -    error = atapi_queue_cmd(cdp->atp, ccb, NULL, 0, 0, 30, NULL, NULL);
 +    error = atapi_queue_cmd(cdp->atp, ccb1, NULL, 0, 0, 30, NULL, NULL);
 if (error)
 return error;
 while (timeout-- > 0) {
 -        if ((error = atapi_test_ready(cdp->atp)) != EBUSY)
 -            return error;
 +        if ((error = atapi_test_ready(cdp->atp)) != EBUSY) {
 +           if (atapi_queue_cmd(cdp->atp, ccb2, tmp, sizeof(tmp),
 +                               ATPR_F_READ, 30, NULL, NULL) != EBUSY)
 +               return error;
 +       }
 tsleep(&error, PRIBIO, "acdcld", hz/2);
 }
 return EIO;
 
 -------------------------------------------------------

From: K Karthik <kar@mglorysb.com>
To: freebsd-gnats-submit@FreeBSD.org, kar@mglorysb.com
Cc:  
Subject: Re: bin/26151: burncd exists before fixating - 4.3 RC #0
Date: Tue, 3 Apr 2001 20:53:26 +0000

 The patch works well. Now I don't get READ_CAPACITY and PREVENT_ALLOW 
 messages, but burncd waits for too long even after the fixating process is 
 completed.  This I found out as the CD-RECORDER light goes off completely 
 (not blinking) but the burncd still waits. 
 
 Using CTRL+C while waiting does not terminate the burncd.
 
 Here is the duration of the process:
     Total wait after the message "fixating ..." displayed: 5 minutes (approx)
     Time taken for actual fixation: 2 minutes (approx.)
     Extra wait: rest.
 
 
 BTW, can you suppress the message "READ_TOC", if that does not take too much 
 time. 
 
 Thanks
 Karthik
 
 
 
 ----------  Forwarded Message  ----------
 Subject: Re: bin/26151: burncd exists before fixating - 4.3 RC #0
 Date: Tue, 3 Apr 2001 18:05:23 +0000
 From: K Karthik <kar@mglorysb.com>
 To: freebsd-gnats-submit@FreeBSD.org, kar@mglorysb.com
 
 
 Messages:
 
 1. acd1: READ_TOC - ILLEGAL REQUEST asc=24 ascq=00 error=04 (old)
 2. acd1: READ_CAPACITY - ILLEGAL REQUEST asc=24 ascq=00 error=04 (new)
 3. acd1: PREVENT_ALLOW - ILLEGAL REQUEST asc=24 ascq=00 error=04 (old)
 
 Occurence:
 
 a. message 1 appeared after burncd exits when I use this command:
     burncd -f /dev/acd1c blank
 
 b. message 2 and 3 appeared after burncd exits when I use this command:
      burncd -f /dev/acd1c data cd.iso fixate
 
    After the data is written to disk, "fixating CD , please wait.." message
 appears, then burncd exits. After it exits  (I get # prompt), then the
 message 2 and 3 appears.
 
 Thanks
 Karthik
 
 
 
 ----------  Forwarded Message  ----------
 Subject: Re: bin/26151: burncd exists before fixating - 4.3 RC #0
 Date: Tue, 3 Apr 2001 11:42:40 +0000
 From: K Karthik <kar@mglorysb.com>
 To: freebsd-gnats-submit@FreeBSD.org, kar@mglorysb.com
 
 
 I have applied the patch but the problem still persists. burncd exits before
 fixating is complete.
 
 I get a new message in bold.
 
 The following messages appear in bold:
 
 1. acd1: READ_TOC - ILLEGAL REQUEST asc=24 ascq=00 error=04 (old)
 2. acd1: READ_CAPACITY - ILLEGAL REQUEST asc=24 ascq=00 error=04 (new)
 3. acd1: PREVENT_ALLOW - ILLEGAL REQUEST asc=24 ascq=00 error=04 (old)
 
 I am using Sony CD-RW (CRX100E).
 
 Thanks
 Karthik
 
 
 --- atapi-cd.c  2001/02/25 21:35:20     1.48.2.10
 +++ atapi-cd.c  2001/04/02 19:36:45
 @@ -1364,11 +1364,15 @@
 static int
 acd_close_disk(struct acd_softc *cdp, int multisession)
 {
 -    int8_t ccb[16] = { ATAPI_CLOSE_TRACK, 0x01, 0x02, 0, 0, 0, 0, 0,
 -                      0, 0, 0, 0, 0, 0, 0, 0 };
 +    int8_t ccb1[16] = { ATAPI_CLOSE_TRACK, 0x01, 0x02, 0, 0, 0, 0, 0,
 +                       0, 0, 0, 0, 0, 0, 0, 0 };
 +    int8_t ccb2[16] = { ATAPI_READ_CAPACITY, 0, 0, 0, 0, 0, 0, 0,
 +                       0, 0, 0, 0, 0, 0, 0, 0 };
 +    struct write_param param;
 int timeout = 5*60*2;
 int error;
 -    struct write_param param;
 +    char tmp[8];
 +
 
 if ((error = acd_mode_sense(cdp, ATAPI_CDROM_WRITE_PARAMETERS_PAGE,
 (caddr_t)&param, sizeof(param))))
 @@ -1382,12 +1386,15 @@
 if ((error = acd_mode_select(cdp, (caddr_t)&param, sizeof(param))))
 return error;
 
 -    error = atapi_queue_cmd(cdp->atp, ccb, NULL, 0, 0, 30, NULL, NULL);
 +    error = atapi_queue_cmd(cdp->atp, ccb1, NULL, 0, 0, 30, NULL, NULL);
 if (error)
 return error;
 while (timeout-- > 0) {
 -        if ((error = atapi_test_ready(cdp->atp)) != EBUSY)
 -            return error;
 +        if ((error = atapi_test_ready(cdp->atp)) != EBUSY) {
 +           if (atapi_queue_cmd(cdp->atp, ccb2, tmp, sizeof(tmp),
 +                               ATPR_F_READ, 30, NULL, NULL) != EBUSY)
 +               return error;
 +       }
 tsleep(&error, PRIBIO, "acdcld", hz/2);
 }
 return EIO;
 
 -------------------------------------------------------
 
 -------------------------------------------------------

From: K Karthik <kar@mglorysb.com>
To: freebsd-gnats-submit@FreeBSD.org, kar@mglorysb.com
Cc:  
Subject: Re: bin/26151: burncd exists before fixating - 4.3 RC #0
Date: Tue, 3 Apr 2001 20:59:02 +0000

 Sorry, I missed one thing in my previous mail (below).
 
 I get a message "fixate returning early 0". Hope this is a debug message and 
 will taken out later.
 
 Thanks
 Karthik
 
 ----------  Forwarded Message  ----------
 Subject: Re: bin/26151: burncd exists before fixating - 4.3 RC #0
 Date: Tue, 3 Apr 2001 20:53:26 +0000
 From: K Karthik <kar@mglorysb.com>
 To: freebsd-gnats-submit@FreeBSD.org, kar@mglorysb.com
 
 
 The patch works well. Now I don't get READ_CAPACITY and PREVENT_ALLOW
 messages, but burncd waits for too long even after the fixating process is
 completed.  This I found out as the CD-RECORDER light goes off completely
 (not blinking) but the burncd still waits.
 
 Using CTRL+C while waiting does not terminate the burncd.
 
 Here is the duration of the process:
     Total wait after the message "fixating ..." displayed: 5 minutes (approx)
     Time taken for actual fixation: 2 minutes (approx.)
     Extra wait: rest.
 
 
 BTW, can you suppress the message "READ_TOC", if that does not take too much
 time.
 
 Thanks
 Karthik
 
 
 
 ----------  Forwarded Message  ----------
 Subject: Re: bin/26151: burncd exists before fixating - 4.3 RC #0
 Date: Tue, 3 Apr 2001 18:05:23 +0000
 From: K Karthik <kar@mglorysb.com>
 To: freebsd-gnats-submit@FreeBSD.org, kar@mglorysb.com
 
 
 Messages:
 
 1. acd1: READ_TOC - ILLEGAL REQUEST asc=24 ascq=00 error=04 (old)
 2. acd1: READ_CAPACITY - ILLEGAL REQUEST asc=24 ascq=00 error=04 (new)
 3. acd1: PREVENT_ALLOW - ILLEGAL REQUEST asc=24 ascq=00 error=04 (old)
 
 Occurence:
 
 a. message 1 appeared after burncd exits when I use this command:
     burncd -f /dev/acd1c blank
 
 b. message 2 and 3 appeared after burncd exits when I use this command:
      burncd -f /dev/acd1c data cd.iso fixate
 
    After the data is written to disk, "fixating CD , please wait.." message
 appears, then burncd exits. After it exits  (I get # prompt), then the
 message 2 and 3 appears.
 
 Thanks
 Karthik
 
 
 
 ----------  Forwarded Message  ----------
 Subject: Re: bin/26151: burncd exists before fixating - 4.3 RC #0
 Date: Tue, 3 Apr 2001 11:42:40 +0000
 From: K Karthik <kar@mglorysb.com>
 To: freebsd-gnats-submit@FreeBSD.org, kar@mglorysb.com
 
 
 I have applied the patch but the problem still persists. burncd exits before
 fixating is complete.
 
 I get a new message in bold.
 
 The following messages appear in bold:
 
 1. acd1: READ_TOC - ILLEGAL REQUEST asc=24 ascq=00 error=04 (old)
 2. acd1: READ_CAPACITY - ILLEGAL REQUEST asc=24 ascq=00 error=04 (new)
 3. acd1: PREVENT_ALLOW - ILLEGAL REQUEST asc=24 ascq=00 error=04 (old)
 
 I am using Sony CD-RW (CRX100E).
 
 Thanks
 Karthik
 
 
 --- atapi-cd.c  2001/02/25 21:35:20     1.48.2.10
 +++ atapi-cd.c  2001/04/02 19:36:45
 @@ -1364,11 +1364,15 @@
 static int
 acd_close_disk(struct acd_softc *cdp, int multisession)
 {
 -    int8_t ccb[16] = { ATAPI_CLOSE_TRACK, 0x01, 0x02, 0, 0, 0, 0, 0,
 -                      0, 0, 0, 0, 0, 0, 0, 0 };
 +    int8_t ccb1[16] = { ATAPI_CLOSE_TRACK, 0x01, 0x02, 0, 0, 0, 0, 0,
 +                       0, 0, 0, 0, 0, 0, 0, 0 };
 +    int8_t ccb2[16] = { ATAPI_READ_CAPACITY, 0, 0, 0, 0, 0, 0, 0,
 +                       0, 0, 0, 0, 0, 0, 0, 0 };
 +    struct write_param param;
 int timeout = 5*60*2;
 int error;
 -    struct write_param param;
 +    char tmp[8];
 +
 
 if ((error = acd_mode_sense(cdp, ATAPI_CDROM_WRITE_PARAMETERS_PAGE,
 (caddr_t)&param, sizeof(param))))
 @@ -1382,12 +1386,15 @@
 if ((error = acd_mode_select(cdp, (caddr_t)&param, sizeof(param))))
 return error;
 
 -    error = atapi_queue_cmd(cdp->atp, ccb, NULL, 0, 0, 30, NULL, NULL);
 +    error = atapi_queue_cmd(cdp->atp, ccb1, NULL, 0, 0, 30, NULL, NULL);
 if (error)
 return error;
 while (timeout-- > 0) {
 -        if ((error = atapi_test_ready(cdp->atp)) != EBUSY)
 -            return error;
 +        if ((error = atapi_test_ready(cdp->atp)) != EBUSY) {
 +           if (atapi_queue_cmd(cdp->atp, ccb2, tmp, sizeof(tmp),
 +                               ATPR_F_READ, 30, NULL, NULL) != EBUSY)
 +               return error;
 +       }
 tsleep(&error, PRIBIO, "acdcld", hz/2);
 }
 return EIO;
 
 -------------------------------------------------------
 
 -------------------------------------------------------
 
 -------------------------------------------------------

From: K Karthik <kar@mglorysb.com>
To: freebsd-gnats-submit@FreeBSD.org, kar@mglorysb.com
Cc:  
Subject: Re: bin/26151: burncd exists before fixating - 4.3 RC #0
Date: Wed, 4 Apr 2001 13:12:13 +0000

 I managed to add the printf statements within my knowledge limits in C.
 
 I got the speed, here is the text printed out for blanking
 
 1> max_rs: 35344  cur_rs: 33541  max_ws: 49666 cur_ws 24833
 2> max_rs: 4234  cur_rs: 1411  max_ws 706  cur_ws: 353
 
 The text printed out before writing:
 
 1> max_rs: 35344  cur_rs: 49666  max_ws: 49666 cur_ws 24833
 2> max_rs: 4234  cur_rs: 706  max_ws 706  cur_ws: 353
 
 
 max_rs = max_read_speed
 cur_rs = cur_read_speed
 max_ws = max_write_speed
 cur_ws = cur_write_speed
 
 The above speed values are from cdp->cap.xxxxx
 
 I have used "%d" in printf. and the speeds are from function acd_set_speed.
 The statements are added just below the for loop and after ntohs()
  conversion.
 
 1> the values before ntohs() conversion.
 2> the values after ntohs() conversion
 
 Hope this helps you.
 
 Thanks
 Karthik
 
 ----------  Forwarded Message  ----------
 Subject: Re: bin/26151: burncd exists before fixating - 4.3 RC #0
 Date: Tue, 3 Apr 2001 20:59:02 +0000
 From: K Karthik <kar@mglorysb.com>
 To: freebsd-gnats-submit@FreeBSD.org, kar@mglorysb.com
 
 
 Sorry, I missed one thing in my previous mail (below).
 
 I get a message "fixate returning early 0". Hope this is a debug message and
 will taken out later.
 
 Thanks
 Karthik
 
 ----------  Forwarded Message  ----------
 Subject: Re: bin/26151: burncd exists before fixating - 4.3 RC #0
 Date: Tue, 3 Apr 2001 20:53:26 +0000
 From: K Karthik <kar@mglorysb.com>
 To: freebsd-gnats-submit@FreeBSD.org, kar@mglorysb.com
 
 
 The patch works well. Now I don't get READ_CAPACITY and PREVENT_ALLOW
 messages, but burncd waits for too long even after the fixating process is
 completed.  This I found out as the CD-RECORDER light goes off completely
 (not blinking) but the burncd still waits.
 
 Using CTRL+C while waiting does not terminate the burncd.
 
 Here is the duration of the process:
     Total wait after the message "fixating ..." displayed: 5 minutes (approx)
     Time taken for actual fixation: 2 minutes (approx.)
     Extra wait: rest.
 
 
 BTW, can you suppress the message "READ_TOC", if that does not take too much
 time.
 
 Thanks
 Karthik
 
 
 
 ----------  Forwarded Message  ----------
 Subject: Re: bin/26151: burncd exists before fixating - 4.3 RC #0
 Date: Tue, 3 Apr 2001 18:05:23 +0000
 From: K Karthik <kar@mglorysb.com>
 To: freebsd-gnats-submit@FreeBSD.org, kar@mglorysb.com
 
 
 Messages:
 
 1. acd1: READ_TOC - ILLEGAL REQUEST asc=24 ascq=00 error=04 (old)
 2. acd1: READ_CAPACITY - ILLEGAL REQUEST asc=24 ascq=00 error=04 (new)
 3. acd1: PREVENT_ALLOW - ILLEGAL REQUEST asc=24 ascq=00 error=04 (old)
 
 Occurence:
 
 a. message 1 appeared after burncd exits when I use this command:
     burncd -f /dev/acd1c blank
 
 b. message 2 and 3 appeared after burncd exits when I use this command:
      burncd -f /dev/acd1c data cd.iso fixate
 
    After the data is written to disk, "fixating CD , please wait.." message
 appears, then burncd exits. After it exits  (I get # prompt), then the
 message 2 and 3 appears.
 
 Thanks
 Karthik
 
 
 
 ----------  Forwarded Message  ----------
 Subject: Re: bin/26151: burncd exists before fixating - 4.3 RC #0
 Date: Tue, 3 Apr 2001 11:42:40 +0000
 From: K Karthik <kar@mglorysb.com>
 To: freebsd-gnats-submit@FreeBSD.org, kar@mglorysb.com
 
 
 I have applied the patch but the problem still persists. burncd exits before
 fixating is complete.
 
 I get a new message in bold.
 
 The following messages appear in bold:
 
 1. acd1: READ_TOC - ILLEGAL REQUEST asc=24 ascq=00 error=04 (old)
 2. acd1: READ_CAPACITY - ILLEGAL REQUEST asc=24 ascq=00 error=04 (new)
 3. acd1: PREVENT_ALLOW - ILLEGAL REQUEST asc=24 ascq=00 error=04 (old)
 
 I am using Sony CD-RW (CRX100E).
 
 Thanks
 Karthik
 
 
 --- atapi-cd.c  2001/02/25 21:35:20     1.48.2.10
 +++ atapi-cd.c  2001/04/02 19:36:45
 @@ -1364,11 +1364,15 @@
 static int
 acd_close_disk(struct acd_softc *cdp, int multisession)
 {
 -    int8_t ccb[16] = { ATAPI_CLOSE_TRACK, 0x01, 0x02, 0, 0, 0, 0, 0,
 -                      0, 0, 0, 0, 0, 0, 0, 0 };
 +    int8_t ccb1[16] = { ATAPI_CLOSE_TRACK, 0x01, 0x02, 0, 0, 0, 0, 0,
 +                       0, 0, 0, 0, 0, 0, 0, 0 };
 +    int8_t ccb2[16] = { ATAPI_READ_CAPACITY, 0, 0, 0, 0, 0, 0, 0,
 +                       0, 0, 0, 0, 0, 0, 0, 0 };
 +    struct write_param param;
 int timeout = 5*60*2;
 int error;
 -    struct write_param param;
 +    char tmp[8];
 +
 
 if ((error = acd_mode_sense(cdp, ATAPI_CDROM_WRITE_PARAMETERS_PAGE,
 (caddr_t)&param, sizeof(param))))
 @@ -1382,12 +1386,15 @@
 if ((error = acd_mode_select(cdp, (caddr_t)&param, sizeof(param))))
 return error;
 
 -    error = atapi_queue_cmd(cdp->atp, ccb, NULL, 0, 0, 30, NULL, NULL);
 +    error = atapi_queue_cmd(cdp->atp, ccb1, NULL, 0, 0, 30, NULL, NULL);
 if (error)
 return error;
 while (timeout-- > 0) {
 -        if ((error = atapi_test_ready(cdp->atp)) != EBUSY)
 -            return error;
 +        if ((error = atapi_test_ready(cdp->atp)) != EBUSY) {
 +           if (atapi_queue_cmd(cdp->atp, ccb2, tmp, sizeof(tmp),
 +                               ATPR_F_READ, 30, NULL, NULL) != EBUSY)
 +               return error;
 +       }
 tsleep(&error, PRIBIO, "acdcld", hz/2);
 }
 return EIO;
 
 -------------------------------------------------------
 
 -------------------------------------------------------
 
 -------------------------------------------------------
 
 -------------------------------------------------------
 
 -------------------------------------------------------
State-Changed-From-To: analyzed->closed 
State-Changed-By: sos 
State-Changed-When: Mon Apr 16 14:20:10 PDT 2001 
State-Changed-Why:  

This is fixed in -current, a MFC will bring it to 4.x but 
probably after 4.3 release. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=26151 
>Unformatted:
