diff options
Diffstat (limited to 'drivers/scsi/NCR5380.c')
-rw-r--r-- | drivers/scsi/NCR5380.c | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/drivers/scsi/NCR5380.c b/drivers/scsi/NCR5380.c index 5b27966d37f0..988f0bc5eda5 100644 --- a/drivers/scsi/NCR5380.c +++ b/drivers/scsi/NCR5380.c | |||
@@ -1542,9 +1542,7 @@ part2: | |||
1542 | hostdata->connected = cmd; | 1542 | hostdata->connected = cmd; |
1543 | hostdata->busy[cmd->device->id] |= (1 << cmd->device->lun); | 1543 | hostdata->busy[cmd->device->id] |= (1 << cmd->device->lun); |
1544 | 1544 | ||
1545 | if (cmd->SCp.ptr != (char *)cmd->sense_buffer) { | 1545 | initialize_SCp(cmd); |
1546 | initialize_SCp(cmd); | ||
1547 | } | ||
1548 | 1546 | ||
1549 | return 0; | 1547 | return 0; |
1550 | 1548 | ||
@@ -2280,19 +2278,16 @@ static void NCR5380_information_transfer(struct Scsi_Host *instance) { | |||
2280 | cmd->result = (cmd->result & 0x00ffff) | (DID_ERROR << 16); | 2278 | cmd->result = (cmd->result & 0x00ffff) | (DID_ERROR << 16); |
2281 | 2279 | ||
2282 | #ifdef AUTOSENSE | 2280 | #ifdef AUTOSENSE |
2281 | if ((cmd->cmnd[0] == REQUEST_SENSE) && | ||
2282 | hostdata->ses.cmd_len) { | ||
2283 | scsi_eh_restore_cmnd(cmd, &hostdata->ses); | ||
2284 | hostdata->ses.cmd_len = 0 ; | ||
2285 | } | ||
2286 | |||
2283 | if ((cmd->cmnd[0] != REQUEST_SENSE) && (status_byte(cmd->SCp.Status) == CHECK_CONDITION)) { | 2287 | if ((cmd->cmnd[0] != REQUEST_SENSE) && (status_byte(cmd->SCp.Status) == CHECK_CONDITION)) { |
2288 | scsi_eh_prep_cmnd(cmd, &hostdata->ses, NULL, 0, ~0); | ||
2289 | |||
2284 | dprintk(NDEBUG_AUTOSENSE, ("scsi%d : performing request sense\n", instance->host_no)); | 2290 | dprintk(NDEBUG_AUTOSENSE, ("scsi%d : performing request sense\n", instance->host_no)); |
2285 | cmd->cmnd[0] = REQUEST_SENSE; | ||
2286 | cmd->cmnd[1] &= 0xe0; | ||
2287 | cmd->cmnd[2] = 0; | ||
2288 | cmd->cmnd[3] = 0; | ||
2289 | cmd->cmnd[4] = sizeof(cmd->sense_buffer); | ||
2290 | cmd->cmnd[5] = 0; | ||
2291 | |||
2292 | cmd->SCp.buffer = NULL; | ||
2293 | cmd->SCp.buffers_residual = 0; | ||
2294 | cmd->SCp.ptr = (char *) cmd->sense_buffer; | ||
2295 | cmd->SCp.this_residual = sizeof(cmd->sense_buffer); | ||
2296 | 2291 | ||
2297 | LIST(cmd, hostdata->issue_queue); | 2292 | LIST(cmd, hostdata->issue_queue); |
2298 | cmd->host_scribble = (unsigned char *) | 2293 | cmd->host_scribble = (unsigned char *) |