aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/sun3_NCR5380.c
diff options
context:
space:
mode:
authorBoaz Harrosh <bharrosh@panasas.com>2007-09-10 15:37:45 -0400
committerJames Bottomley <jejb@mulgrave.localdomain>2007-10-12 14:55:07 -0400
commit28424d3a503d43482a5537e556f7b7652d8e56d8 (patch)
treecfdfea7e635461887b735610d00d15fc41e6d19a /drivers/scsi/sun3_NCR5380.c
parentdff6de73f9d29868729cb1d21d86ba0dbd28871f (diff)
[SCSI] NCR5380: Use scsi_eh API for REQUEST_SENSE invocation
- Use new scsi_eh_prep/restor_cmnd() for synchronous REQUEST_SENSE invocation. Signed-off-by: Boaz Harrosh <bharrosh@panasas.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/sun3_NCR5380.c')
-rw-r--r--drivers/scsi/sun3_NCR5380.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/drivers/scsi/sun3_NCR5380.c b/drivers/scsi/sun3_NCR5380.c
index 376953776ea3..dc15a22105f7 100644
--- a/drivers/scsi/sun3_NCR5380.c
+++ b/drivers/scsi/sun3_NCR5380.c
@@ -2254,25 +2254,21 @@ static void NCR5380_information_transfer (struct Scsi_Host *instance)
2254 cmd->result = (cmd->result & 0x00ffff) | (DID_ERROR << 16); 2254 cmd->result = (cmd->result & 0x00ffff) | (DID_ERROR << 16);
2255 2255
2256#ifdef AUTOSENSE 2256#ifdef AUTOSENSE
2257 if ((cmd->cmnd[0] == REQUEST_SENSE) &&
2258 hostdata->ses.cmd_len) {
2259 scsi_eh_restore_cmnd(cmd, &hostdata->ses);
2260 hostdata->ses.cmd_len = 0 ;
2261 }
2262
2257 if ((cmd->cmnd[0] != REQUEST_SENSE) && 2263 if ((cmd->cmnd[0] != REQUEST_SENSE) &&
2258 (status_byte(cmd->SCp.Status) == CHECK_CONDITION)) { 2264 (status_byte(cmd->SCp.Status) == CHECK_CONDITION)) {
2265 scsi_eh_prep_cmnd(cmd, &hostdata->ses, NULL, 0, ~0);
2259 ASEN_PRINTK("scsi%d: performing request sense\n", 2266 ASEN_PRINTK("scsi%d: performing request sense\n",
2260 HOSTNO); 2267 HOSTNO);
2261 cmd->cmnd[0] = REQUEST_SENSE;
2262 cmd->cmnd[1] &= 0xe0;
2263 cmd->cmnd[2] = 0;
2264 cmd->cmnd[3] = 0;
2265 cmd->cmnd[4] = sizeof(cmd->sense_buffer);
2266 cmd->cmnd[5] = 0;
2267 cmd->cmd_len = COMMAND_SIZE(cmd->cmnd[0]);
2268
2269 cmd->use_sg = 0;
2270 /* this is initialized from initialize_SCp 2268 /* this is initialized from initialize_SCp
2271 cmd->SCp.buffer = NULL; 2269 cmd->SCp.buffer = NULL;
2272 cmd->SCp.buffers_residual = 0; 2270 cmd->SCp.buffers_residual = 0;
2273 */ 2271 */
2274 cmd->request_buffer = (char *) cmd->sense_buffer;
2275 cmd->request_bufflen = sizeof(cmd->sense_buffer);
2276 2272
2277 local_irq_save(flags); 2273 local_irq_save(flags);
2278 LIST(cmd,hostdata->issue_queue); 2274 LIST(cmd,hostdata->issue_queue);