| Summary: | burncd exists before fixating - 4.3 RC #0 | ||
|---|---|---|---|
| Product: | Base System | Reporter: | kar <kar> |
| Component: | bin | Assignee: | Søren Schmidt <sos> |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | ||
| Priority: | Normal | ||
| Version: | Unspecified | ||
| Hardware: | Any | ||
| OS: | Any | ||
|
Description
kar
2001-03-27 17:20:00 UTC
Responsible Changed From-To: freebsd-bugs->sos sos wrote burncd State Changed
From-To: open->analyzed
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)¶m, sizeof(param))))
@@ -1382,12 +1386,15 @@
if ((error = acd_mode_select(cdp, (caddr_t)¶m, 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;
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)¶m, sizeof(param))))
@@ -1382,12 +1386,15 @@
if ((error = acd_mode_select(cdp, (caddr_t)¶m, 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;
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)¶m, sizeof(param))))
@@ -1382,12 +1386,15 @@
if ((error = acd_mode_select(cdp, (caddr_t)¶m, 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;
-------------------------------------------------------
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)¶m, sizeof(param))))
@@ -1382,12 +1386,15 @@
if ((error = acd_mode_select(cdp, (caddr_t)¶m, 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;
-------------------------------------------------------
-------------------------------------------------------
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)¶m, sizeof(param)))) @@ -1382,12 +1386,15 @@ if ((error = acd_mode_select(cdp, (caddr_t)¶m, 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; ------------------------------------------------------- ------------------------------------------------------- ------------------------------------------------------- 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)¶m, sizeof(param)))) @@ -1382,12 +1386,15 @@ if ((error = acd_mode_select(cdp, (caddr_t)¶m, 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 This is fixed in -current, a MFC will bring it to 4.x but probably after 4.3 release. |