diff options
Diffstat (limited to 'drivers/scsi/atari_NCR5380.c')
-rw-r--r-- | drivers/scsi/atari_NCR5380.c | 27 |
1 files changed, 10 insertions, 17 deletions
diff --git a/drivers/scsi/atari_NCR5380.c b/drivers/scsi/atari_NCR5380.c index 03dbe60c264a..52d0b87e9aa4 100644 --- a/drivers/scsi/atari_NCR5380.c +++ b/drivers/scsi/atari_NCR5380.c | |||
@@ -2041,7 +2041,7 @@ static void NCR5380_information_transfer(struct Scsi_Host *instance) | |||
2041 | sink = 1; | 2041 | sink = 1; |
2042 | do_abort(instance); | 2042 | do_abort(instance); |
2043 | cmd->result = DID_ERROR << 16; | 2043 | cmd->result = DID_ERROR << 16; |
2044 | cmd->done(cmd); | 2044 | cmd->scsi_done(cmd); |
2045 | return; | 2045 | return; |
2046 | #endif | 2046 | #endif |
2047 | case PHASE_DATAIN: | 2047 | case PHASE_DATAIN: |
@@ -2100,7 +2100,7 @@ static void NCR5380_information_transfer(struct Scsi_Host *instance) | |||
2100 | sink = 1; | 2100 | sink = 1; |
2101 | do_abort(instance); | 2101 | do_abort(instance); |
2102 | cmd->result = DID_ERROR << 16; | 2102 | cmd->result = DID_ERROR << 16; |
2103 | cmd->done(cmd); | 2103 | cmd->scsi_done(cmd); |
2104 | /* XXX - need to source or sink data here, as appropriate */ | 2104 | /* XXX - need to source or sink data here, as appropriate */ |
2105 | } else { | 2105 | } else { |
2106 | #ifdef REAL_DMA | 2106 | #ifdef REAL_DMA |
@@ -2235,24 +2235,17 @@ static void NCR5380_information_transfer(struct Scsi_Host *instance) | |||
2235 | cmd->result = (cmd->result & 0x00ffff) | (DID_ERROR << 16); | 2235 | cmd->result = (cmd->result & 0x00ffff) | (DID_ERROR << 16); |
2236 | 2236 | ||
2237 | #ifdef AUTOSENSE | 2237 | #ifdef AUTOSENSE |
2238 | if ((cmd->cmnd[0] == REQUEST_SENSE) && | ||
2239 | hostdata->ses.cmd_len) { | ||
2240 | scsi_eh_restore_cmnd(cmd, &hostdata->ses); | ||
2241 | hostdata->ses.cmd_len = 0 ; | ||
2242 | } | ||
2243 | |||
2238 | if ((cmd->cmnd[0] != REQUEST_SENSE) && | 2244 | if ((cmd->cmnd[0] != REQUEST_SENSE) && |
2239 | (status_byte(cmd->SCp.Status) == CHECK_CONDITION)) { | 2245 | (status_byte(cmd->SCp.Status) == CHECK_CONDITION)) { |
2246 | scsi_eh_prep_cmnd(cmd, &hostdata->ses, NULL, 0, ~0); | ||
2247 | |||
2240 | ASEN_PRINTK("scsi%d: performing request sense\n", HOSTNO); | 2248 | ASEN_PRINTK("scsi%d: performing request sense\n", HOSTNO); |
2241 | cmd->cmnd[0] = REQUEST_SENSE; | ||
2242 | cmd->cmnd[1] &= 0xe0; | ||
2243 | cmd->cmnd[2] = 0; | ||
2244 | cmd->cmnd[3] = 0; | ||
2245 | cmd->cmnd[4] = sizeof(cmd->sense_buffer); | ||
2246 | cmd->cmnd[5] = 0; | ||
2247 | cmd->cmd_len = COMMAND_SIZE(cmd->cmnd[0]); | ||
2248 | |||
2249 | cmd->use_sg = 0; | ||
2250 | /* this is initialized from initialize_SCp | ||
2251 | cmd->SCp.buffer = NULL; | ||
2252 | cmd->SCp.buffers_residual = 0; | ||
2253 | */ | ||
2254 | cmd->request_buffer = (char *) cmd->sense_buffer; | ||
2255 | cmd->request_bufflen = sizeof(cmd->sense_buffer); | ||
2256 | 2249 | ||
2257 | local_irq_save(flags); | 2250 | local_irq_save(flags); |
2258 | LIST(cmd,hostdata->issue_queue); | 2251 | LIST(cmd,hostdata->issue_queue); |