Test macros for finding reason of stall problem with Pioneer DVD-216D on DVD-R

This commit is contained in:
Thomas Schmitt 2009-10-30 13:45:26 +00:00
parent 8c8731d9d4
commit d4a3d303a6
5 changed files with 43 additions and 16 deletions

View File

@ -1 +1 @@
#define Cdrskin_timestamP "2009.10.27.101031"
#define Cdrskin_timestamP "2009.10.30.134640"

View File

@ -2749,4 +2749,26 @@ BURN_END_DECLS
#endif
/* Temporary facility for exploring Problems with Pioneer DVR-216D which
does not end writing of DVD-R.
This code does not hamper normal operations but causes some extra
messages to stderr and lots of text lines in File
/tmp/libburn_sg_command_log
Move the next line outside this remark and remove all blanks up to "define".
# define Libburn_pioneer_dvr_216d_tesT 1
*/
/* Temporary facility to disable asynchronous execution of the final buffer
flush command SYNCHRONIZE CACHE. This is suspected to cycle endlessly
on Pioneer DVR-216D.
On the other hand, synchronous execution of the command blocks a P-ATA
controller for both eventually connected devices.
Move the next line outside this remark and remove all blanks up to "define".
# Libburn_pioneer_dvr_sync_not_immeD 1
*/
#endif /*LIBBURN_H*/

View File

@ -2823,7 +2823,9 @@ void mmc_sync_cache(struct burn_drive *d)
*/
c.retry = 1;
#ifndef Libburn_pioneer_dvr_sync_not_immeD
c.opcode[1] |= 2; /* ts A70918 : Immed */
#endif
c.page = NULL;
c.dir = NO_TRANSFER;
@ -2852,7 +2854,12 @@ void mmc_sync_cache(struct burn_drive *d)
d->cancel = 1;
return;
}
#ifdef Libburn_pioneer_dvr_216d_tesT
if (spc_wait_unit_attention(d, 300, "SYNCHRONIZE CACHE", 0) <= 0)
#else
if (spc_wait_unit_attention(d, 3600, "SYNCHRONIZE CACHE", 0) <= 0)
#endif
d->cancel = 1;
else
d->needs_sync_cache = 0;

View File

@ -1655,6 +1655,12 @@ int sg_release(struct burn_drive *d)
#define Libburn_log_sg_command_stderR 1
*/
#ifdef Libburn_pioneer_dvr_216d_tesT
#define Libburn_log_sg_commandS 1
#define Libburn_fflush_log_sg_commandS 1
#endif
#ifdef Libburn_log_sg_commandS
/** Logs command (before execution) */

View File

@ -113,11 +113,13 @@ int spc_wait_unit_attention(struct burn_drive *d, int max_sec, char *cmd_text,
for(i = !(flag & 1); i < max_sec * 10; i++) {
ret = spc_test_unit_ready_r(d, &key, &asc, &ascq);
/* <<<
fprintf(stderr,
#ifdef Libburn_pioneer_dvr_216d_tesT
if ((i % 100) == 1)
fprintf(stderr,
"libburn_EXPERIMENTAL: i= %d ret= %d key= %X asc= %2.2X ascq= %2.2X\n",
i, ret, (unsigned) key, (unsigned) asc, (unsigned) ascq);
*/
i, ret, (unsigned) key,
(unsigned) asc, (unsigned) ascq);
#endif /* Libburn_pioneer_dvr_216d_tesT */
if (ret > 0) /* ready */
break;
@ -140,24 +142,14 @@ int spc_wait_unit_attention(struct burn_drive *d, int max_sec, char *cmd_text,
/* media change notice = try again */
goto slumber;
#ifdef NIX
sprintf(msg,
"Asynchromous SCSI error on %s: key=%X asc=%2.2Xh ascq=%2.2Xh",
cmd_text, (unsigned) key, (unsigned) asc,
(unsigned) ascq);
#else
/* ts A90213 */
sprintf(msg,
"Asynchromous SCSI error on %s: ", cmd_text);
"Asynchronous SCSI error on %s: ", cmd_text);
sense[2] = key;
sense[12] = asc;
sense[13] = ascq;
resp = scsi_error_msg(d, sense, 14, msg + strlen(msg),
&key, &asc, &ascq);
#endif /* ! NIX */
libdax_msgs_submit(libdax_messenger, d->global_index,
0x0002014d,
LIBDAX_MSGS_SEV_SORRY, LIBDAX_MSGS_PRIO_HIGH,