diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-15 11:19:33 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-15 11:19:33 -0400 |
commit | df3d80f5a5c74168be42788364d13cf6c83c7b9c (patch) | |
tree | 892a964c2fd28d028f2fb7471e8543d3f4006a58 /drivers/scsi/sun3_NCR5380.c | |
parent | 3d06f7a5f74a813cee817c4b30b5e6f0398da0be (diff) | |
parent | c8e91b0a8fc8493e3bf3efcb3c8f866e9453cf1c (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (207 commits)
[SCSI] gdth: fix CONFIG_ISA build failure
[SCSI] esp_scsi: remove __dev{init,exit}
[SCSI] gdth: !use_sg cleanup and use of scsi accessors
[SCSI] gdth: Move members from SCp to gdth_cmndinfo, stage 2
[SCSI] gdth: Setup proper per-command private data
[SCSI] gdth: Remove gdth_ctr_tab[]
[SCSI] gdth: switch to modern scsi host registration
[SCSI] gdth: gdth_interrupt() gdth_get_status() & gdth_wait() fixes
[SCSI] gdth: clean up host private data
[SCSI] gdth: Remove virt hosts
[SCSI] gdth: Reorder scsi_host_template intitializers
[SCSI] gdth: kill gdth_{read,write}[bwl] wrappers
[SCSI] gdth: Remove 2.4.x support, in-kernel changelog
[SCSI] gdth: split out pci probing
[SCSI] gdth: split out eisa probing
[SCSI] gdth: split out isa probing
gdth: Make one abuse of scsi_cmnd less obvious
[SCSI] NCR5380: Use scsi_eh API for REQUEST_SENSE invocation
[SCSI] usb storage: use scsi_eh API in REQUEST_SENSE execution
[SCSI] scsi_error: Refactoring scsi_error to facilitate in synchronous REQUEST_SENSE
...
Diffstat (limited to 'drivers/scsi/sun3_NCR5380.c')
-rw-r--r-- | drivers/scsi/sun3_NCR5380.c | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/drivers/scsi/sun3_NCR5380.c b/drivers/scsi/sun3_NCR5380.c index 98e3fe10c1dc..dc15a22105f7 100644 --- a/drivers/scsi/sun3_NCR5380.c +++ b/drivers/scsi/sun3_NCR5380.c | |||
@@ -2055,7 +2055,7 @@ static void NCR5380_information_transfer (struct Scsi_Host *instance) | |||
2055 | sink = 1; | 2055 | sink = 1; |
2056 | do_abort(instance); | 2056 | do_abort(instance); |
2057 | cmd->result = DID_ERROR << 16; | 2057 | cmd->result = DID_ERROR << 16; |
2058 | cmd->done(cmd); | 2058 | cmd->scsi_done(cmd); |
2059 | return; | 2059 | return; |
2060 | #endif | 2060 | #endif |
2061 | case PHASE_DATAIN: | 2061 | case PHASE_DATAIN: |
@@ -2115,7 +2115,7 @@ static void NCR5380_information_transfer (struct Scsi_Host *instance) | |||
2115 | sink = 1; | 2115 | sink = 1; |
2116 | do_abort(instance); | 2116 | do_abort(instance); |
2117 | cmd->result = DID_ERROR << 16; | 2117 | cmd->result = DID_ERROR << 16; |
2118 | cmd->done(cmd); | 2118 | cmd->scsi_done(cmd); |
2119 | /* XXX - need to source or sink data here, as appropriate */ | 2119 | /* XXX - need to source or sink data here, as appropriate */ |
2120 | } else { | 2120 | } else { |
2121 | #ifdef REAL_DMA | 2121 | #ifdef REAL_DMA |
@@ -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); |