aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/arm/fas216.c16
-rw-r--r--drivers/scsi/arm/fas216.h3
2 files changed, 6 insertions, 13 deletions
diff --git a/drivers/scsi/arm/fas216.c b/drivers/scsi/arm/fas216.c
index fb5f20284389..a715632e19d4 100644
--- a/drivers/scsi/arm/fas216.c
+++ b/drivers/scsi/arm/fas216.c
@@ -2018,6 +2018,7 @@ static void fas216_rq_sns_done(FAS216_Info *info, struct scsi_cmnd *SCpnt,
2018 * the upper layers to process. This would have been set 2018 * the upper layers to process. This would have been set
2019 * correctly by fas216_std_done. 2019 * correctly by fas216_std_done.
2020 */ 2020 */
2021 scsi_eh_restore_cmnd(SCpnt, &info->ses);
2021 SCpnt->scsi_done(SCpnt); 2022 SCpnt->scsi_done(SCpnt);
2022} 2023}
2023 2024
@@ -2103,23 +2104,12 @@ request_sense:
2103 if (SCpnt->cmnd[0] == REQUEST_SENSE) 2104 if (SCpnt->cmnd[0] == REQUEST_SENSE)
2104 goto done; 2105 goto done;
2105 2106
2107 scsi_eh_prep_cmnd(SCpnt, &info->ses, NULL, 0, ~0);
2106 fas216_log_target(info, LOG_CONNECT, SCpnt->device->id, 2108 fas216_log_target(info, LOG_CONNECT, SCpnt->device->id,
2107 "requesting sense"); 2109 "requesting sense");
2108 memset(SCpnt->cmnd, 0, sizeof (SCpnt->cmnd)); 2110 init_SCp(SCpnt);
2109 SCpnt->cmnd[0] = REQUEST_SENSE;
2110 SCpnt->cmnd[1] = SCpnt->device->lun << 5;
2111 SCpnt->cmnd[4] = sizeof(SCpnt->sense_buffer);
2112 SCpnt->cmd_len = COMMAND_SIZE(SCpnt->cmnd[0]);
2113 SCpnt->SCp.buffer = NULL;
2114 SCpnt->SCp.buffers_residual = 0;
2115 SCpnt->SCp.ptr = (char *)SCpnt->sense_buffer;
2116 SCpnt->SCp.this_residual = sizeof(SCpnt->sense_buffer);
2117 SCpnt->SCp.phase = sizeof(SCpnt->sense_buffer);
2118 SCpnt->SCp.Message = 0; 2111 SCpnt->SCp.Message = 0;
2119 SCpnt->SCp.Status = 0; 2112 SCpnt->SCp.Status = 0;
2120 SCpnt->request_bufflen = sizeof(SCpnt->sense_buffer);
2121 SCpnt->sc_data_direction = DMA_FROM_DEVICE;
2122 SCpnt->use_sg = 0;
2123 SCpnt->tag = 0; 2113 SCpnt->tag = 0;
2124 SCpnt->host_scribble = (void *)fas216_rq_sns_done; 2114 SCpnt->host_scribble = (void *)fas216_rq_sns_done;
2125 2115
diff --git a/drivers/scsi/arm/fas216.h b/drivers/scsi/arm/fas216.h
index 00e5f055afdc..3e73e264972e 100644
--- a/drivers/scsi/arm/fas216.h
+++ b/drivers/scsi/arm/fas216.h
@@ -16,6 +16,8 @@
16#define NO_IRQ 255 16#define NO_IRQ 255
17#endif 17#endif
18 18
19#include <scsi/scsi_eh.h>
20
19#include "queue.h" 21#include "queue.h"
20#include "msgqueue.h" 22#include "msgqueue.h"
21 23
@@ -311,6 +313,7 @@ typedef struct {
311 313
312 /* miscellaneous */ 314 /* miscellaneous */
313 int internal_done; /* flag to indicate request done */ 315 int internal_done; /* flag to indicate request done */
316 struct scsi_eh_save *ses; /* holds request sense restore info */
314 unsigned long magic_end; 317 unsigned long magic_end;
315} FAS216_Info; 318} FAS216_Info;
316 319