Browse Source

Test wether SCSI 1Bh START UNIT would be helpful with ticket 90

ZeroThreeEight
Thomas Schmitt 15 years ago
parent
commit
ebb94ee212
  1. 2
      cdrskin/cdrskin_timestamp.h
  2. 5
      libburn/drive.c
  3. 17
      libburn/sbc.c
  4. 3
      libburn/sbc.h
  5. 1
      libburn/transport.h

2
cdrskin/cdrskin_timestamp.h

@ -1 +1 @@
#define Cdrskin_timestamP "2006.11.16.133951"
#define Cdrskin_timestamP "2006.11.18.194606"

5
libburn/drive.c

@ -156,10 +156,13 @@ int burn_drive_grab(struct burn_drive *d, int le)
}
d->busy = BURN_DRIVE_GRABBING;
if (le)
if (le) {
d->load(d);
d->start_unit(d);
}
d->lock(d);
d->start_unit(d);
/* ts A61020 : this was BURN_DISC_BLANK as pure guess */
d->status = BURN_DISC_UNREADY;

17
libburn/sbc.c

@ -11,6 +11,7 @@
/* spc command set */
static char SBC_LOAD[] = { 0x1b, 0, 0, 0, 3, 0 };
static char SBC_UNLOAD[] = { 0x1b, 0, 0, 0, 2, 0 };
static char SBC_START_UNIT[] = { 0x1b, 0, 0, 0, 1, 0 };
void sbc_load(struct burn_drive *d)
{
@ -37,12 +38,28 @@ void sbc_eject(struct burn_drive *d)
d->issue_command(d, &c);
}
/* ts A61118 : is it necessary to tell the drive to get ready for use ? */
int sbc_start_unit(struct burn_drive *d)
{
struct command c;
memcpy(c.opcode, SBC_START_UNIT, sizeof(SBC_START_UNIT));
c.retry = 1;
c.oplen = sizeof(SBC_START_UNIT);
c.dir = NO_TRANSFER;
c.page = NULL;
d->issue_command(d, &c);
return (c.error==0);
}
/* ts A61021 : the sbc specific part of sg.c:enumerate_common()
*/
int sbc_setup_drive(struct burn_drive *d)
{
d->eject = sbc_eject;
d->load = sbc_load;
d->start_unit = sbc_start_unit;
return 1;
}

3
libburn/sbc.h

@ -8,6 +8,9 @@ struct burn_drive;
void sbc_load(struct burn_drive *);
void sbc_eject(struct burn_drive *);
/* ts A61118 */
int sbc_start_unit(struct burn_drive *);
/* ts A61021 : the sbc specific part of sg.c:enumerate_common()
*/
int sbc_setup_drive(struct burn_drive *d);

1
libburn/transport.h

@ -159,6 +159,7 @@ struct burn_drive
void (*unlock) (struct burn_drive *);
void (*eject) (struct burn_drive *);
void (*load) (struct burn_drive *);
int (*start_unit) (struct burn_drive *);
void (*read_disc_info) (struct burn_drive *);
void (*read_sectors) (struct burn_drive *,
int start,

Loading…
Cancel
Save