Workaround for Pioneer DVR-216D refusal to eject
This commit is contained in:
parent
0f37170759
commit
9160b1dcbb
@ -1 +1 @@
|
|||||||
#define Cdrskin_timestamP "2009.11.12.175514"
|
#define Cdrskin_timestamP "2009.11.12.175735"
|
||||||
|
@ -245,8 +245,14 @@ int mmc_function_spy(struct burn_drive *d, char * text)
|
|||||||
d->cancel = 1;
|
d->cancel = 1;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* >>> should one rather have a positve list ? */
|
||||||
|
|
||||||
if (d->is_stopped && strcmp(text, "stop_unit") != 0 &&
|
if (d->is_stopped && strcmp(text, "stop_unit") != 0 &&
|
||||||
|
strcmp(text, "eject") != 0 &&
|
||||||
strcmp(text, "start_unit") != 0 &&
|
strcmp(text, "start_unit") != 0 &&
|
||||||
|
strcmp(text, "load") != 0 &&
|
||||||
|
strncmp(text, "enumerate", 9) != 0 &&
|
||||||
strncmp(text, "sg_", 3) != 0) {
|
strncmp(text, "sg_", 3) != 0) {
|
||||||
d->start_unit(d);
|
d->start_unit(d);
|
||||||
d->is_stopped = 0;
|
d->is_stopped = 0;
|
||||||
|
@ -31,11 +31,6 @@ void sbc_load(struct burn_drive *d)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
scsi_init_command(&c, SBC_LOAD, sizeof(SBC_LOAD));
|
scsi_init_command(&c, SBC_LOAD, sizeof(SBC_LOAD));
|
||||||
/*
|
|
||||||
memcpy(c.opcode, SBC_LOAD, sizeof(SBC_LOAD));
|
|
||||||
c.oplen = sizeof(SBC_LOAD);
|
|
||||||
c.page = NULL;
|
|
||||||
*/
|
|
||||||
c.retry = 1;
|
c.retry = 1;
|
||||||
|
|
||||||
/* ts A70921 : Had to revoke Immed because of LG GSA-4082B */
|
/* ts A70921 : Had to revoke Immed because of LG GSA-4082B */
|
||||||
@ -59,14 +54,7 @@ void sbc_eject(struct burn_drive *d)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
scsi_init_command(&c, SBC_UNLOAD, sizeof(SBC_UNLOAD));
|
scsi_init_command(&c, SBC_UNLOAD, sizeof(SBC_UNLOAD));
|
||||||
/*
|
|
||||||
memcpy(c.opcode, SBC_UNLOAD, sizeof(SBC_UNLOAD));
|
|
||||||
c.oplen = sizeof(SBC_UNLOAD);
|
|
||||||
c.page = NULL;
|
|
||||||
*/
|
|
||||||
|
|
||||||
c.opcode[1] |= 1; /* ts A70918 : Immed */
|
c.opcode[1] |= 1; /* ts A70918 : Immed */
|
||||||
|
|
||||||
c.page = NULL;
|
c.page = NULL;
|
||||||
c.dir = NO_TRANSFER;
|
c.dir = NO_TRANSFER;
|
||||||
d->issue_command(d, &c);
|
d->issue_command(d, &c);
|
||||||
@ -76,8 +64,11 @@ void sbc_eject(struct burn_drive *d)
|
|||||||
spc_wait_unit_attention(d, 1800, "STOP UNIT (+ EJECT)", 0);
|
spc_wait_unit_attention(d, 1800, "STOP UNIT (+ EJECT)", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ts A61118 : is it necessary to tell the drive to get ready for use ? */
|
|
||||||
int sbc_start_unit(struct burn_drive *d)
|
/* ts A91112 : Now with flag */
|
||||||
|
/* @param flag bit0= asynchronous waiting
|
||||||
|
*/
|
||||||
|
int sbc_start_unit_flag(struct burn_drive *d, int flag)
|
||||||
{
|
{
|
||||||
struct command c;
|
struct command c;
|
||||||
int ret;
|
int ret;
|
||||||
@ -87,17 +78,37 @@ int sbc_start_unit(struct burn_drive *d)
|
|||||||
|
|
||||||
scsi_init_command(&c, SBC_START_UNIT, sizeof(SBC_START_UNIT));
|
scsi_init_command(&c, SBC_START_UNIT, sizeof(SBC_START_UNIT));
|
||||||
c.retry = 1;
|
c.retry = 1;
|
||||||
c.opcode[1] |= 1; /* ts A70918 : Immed */
|
c.opcode[1] |= (flag & 1); /* ts A70918 : Immed */
|
||||||
c.dir = NO_TRANSFER;
|
c.dir = NO_TRANSFER;
|
||||||
d->issue_command(d, &c);
|
d->issue_command(d, &c);
|
||||||
if (c.error)
|
if (c.error)
|
||||||
return 0;
|
return 0;
|
||||||
/* ts A70918 : now asynchronous */
|
if (!(flag & 1))
|
||||||
d->is_stopped = 0;
|
return 1;
|
||||||
|
/* ts A70918 : asynchronous */
|
||||||
ret = spc_wait_unit_attention(d, 1800, "START UNIT", 0);
|
ret = spc_wait_unit_attention(d, 1800, "START UNIT", 0);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int sbc_start_unit(struct burn_drive *d)
|
||||||
|
{
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
d->is_stopped = 0; /* no endless starting attempts */
|
||||||
|
|
||||||
|
/* Asynchronous, not to block controller by waiting */
|
||||||
|
ret = sbc_start_unit_flag(d, 1);
|
||||||
|
if (ret <= 0)
|
||||||
|
return ret;
|
||||||
|
/* Synchronous to catch Pioneer DVD-216D which is ready too early.
|
||||||
|
A pending START UNIT can prevent ejecting of the tray.
|
||||||
|
*/
|
||||||
|
ret = sbc_start_unit_flag(d, 0);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* ts A90824 : Trying to reduce drive noise */
|
/* ts A90824 : Trying to reduce drive noise */
|
||||||
int sbc_stop_unit(struct burn_drive *d)
|
int sbc_stop_unit(struct burn_drive *d)
|
||||||
{
|
{
|
||||||
|
@ -761,14 +761,6 @@ void spc_probe_write_modes(struct burn_drive *d)
|
|||||||
c.page->data[23] = 150;
|
c.page->data[23] = 150;
|
||||||
c.dir = TO_DRIVE;
|
c.dir = TO_DRIVE;
|
||||||
|
|
||||||
#ifdef Libburn_pioneer_dvr_216d_no_probe_wM
|
|
||||||
|
|
||||||
key = asc = ascq = 0;
|
|
||||||
if (last_try)
|
|
||||||
break;
|
|
||||||
|
|
||||||
#else /* Libburn_pioneer_dvr_216d_no_probe_wM */
|
|
||||||
|
|
||||||
d->silent_on_scsi_error = 1;
|
d->silent_on_scsi_error = 1;
|
||||||
d->issue_command(d, &c);
|
d->issue_command(d, &c);
|
||||||
d->silent_on_scsi_error = 0;
|
d->silent_on_scsi_error = 0;
|
||||||
@ -779,9 +771,6 @@ void spc_probe_write_modes(struct burn_drive *d)
|
|||||||
key = c.sense[2];
|
key = c.sense[2];
|
||||||
asc = c.sense[12];
|
asc = c.sense[12];
|
||||||
ascq = c.sense[13];
|
ascq = c.sense[13];
|
||||||
|
|
||||||
#endif /* ! Libburn_pioneer_dvr_216d_no_probe_wM */
|
|
||||||
|
|
||||||
if (key)
|
if (key)
|
||||||
burn_print(7, "%d not supported\n", try_block_type);
|
burn_print(7, "%d not supported\n", try_block_type);
|
||||||
else {
|
else {
|
||||||
|
Loading…
Reference in New Issue
Block a user