Browse Source

Handled SCSI status "BUSY" on Solaris

tags/ZeroEightTwo
Thomas Schmitt 10 years ago
parent
commit
6674667b7f
2 changed files with 7 additions and 10 deletions
  1. +1
    -1
      cdrskin/cdrskin_timestamp.h
  2. +6
    -9
      libburn/sg-solaris.c

+ 1
- 1
cdrskin/cdrskin_timestamp.h View File

@@ -1 +1 @@
#define Cdrskin_timestamP "2010.06.08.173156"
#define Cdrskin_timestamP "2010.06.08.174946"

+ 6
- 9
libburn/sg-solaris.c View File

@@ -577,6 +577,7 @@ int sg_issue_command(struct burn_drive *d, struct command *c)
int i, usleep_time, timeout_ms, no_retry = 0, ret;
time_t start_time;
struct uscsi_cmd cgc;
char msg[80];
static FILE *fp = NULL;

c->error = 0;
@@ -632,13 +633,14 @@ int sg_issue_command(struct burn_drive *d, struct command *c)
0 = GOOD , 2 = CHECK CONDITION : Sense Data are delivered
8 = BUSY
*/
if (ret != 0 &&
cgc.uscsi_status != 2 && cgc.uscsi_status != 8) {
if (ret != 0 && cgc.uscsi_status != 2) {
sprintf(msg,
"Failed to transfer command to drive. (uscsi_status = 0x%X)",
(unsigned int) cgc.uscsi_status),
libdax_msgs_submit(libdax_messenger,
d->global_index, 0x0002010c,
LIBDAX_MSGS_SEV_FATAL, LIBDAX_MSGS_PRIO_HIGH,
"Failed to transfer command to drive",
errno, 0);
msg, errno, 0);
sg_close_drive(d);
d->released = 1;
d->busy = BURN_DRIVE_IDLE;
@@ -648,10 +650,6 @@ int sg_issue_command(struct burn_drive *d, struct command *c)

c->sense[2] &= 15;

if (cgc.uscsi_status == 8) {
/* >>> fake BUSY sense */;
}

/* >>> valid sense: cgc.uscsi_rqlen - cgc.uscsi_rqresid */;

if (c->sense[2] || c->sense[12] || c->sense[13]) {
@@ -698,7 +696,6 @@ ex:;
return 1;
}

/* >>> */

/** Tries to obtain SCSI address parameters.
@return 1 is success , 0 is failure


Loading…
Cancel
Save