aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/advansys.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/advansys.c')
-rw-r--r--drivers/scsi/advansys.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/drivers/scsi/advansys.c b/drivers/scsi/advansys.c
index 67cdfe6201ce..d7bc0cf72134 100644
--- a/drivers/scsi/advansys.c
+++ b/drivers/scsi/advansys.c
@@ -3176,23 +3176,24 @@ static void asc_scsi_done(struct scsi_cmnd *scp)
3176 * in the 'scp' result field. 3176 * in the 'scp' result field.
3177 */ 3177 */
3178static int 3178static int
3179advansys_queuecommand(struct scsi_cmnd *scp, void (*done) (struct scsi_cmnd *)) 3179advansys_queuecommand(struct scsi_cmnd *scp, void (*done)(struct scsi_cmnd *))
3180{ 3180{
3181 struct Scsi_Host *shost; 3181 struct Scsi_Host *shost = scp->device->host;
3182 asc_board_t *boardp; 3182 asc_board_t *boardp = ASC_BOARDP(shost);
3183 ulong flags; 3183 unsigned long flags;
3184 int asc_res, result = 0; 3184 int asc_res, result = 0;
3185 3185
3186 shost = scp->device->host;
3187 boardp = ASC_BOARDP(shost);
3188 ASC_STATS(shost, queuecommand); 3186 ASC_STATS(shost, queuecommand);
3187 scp->scsi_done = done;
3189 3188
3190 /* host_lock taken by mid-level prior to call but need to protect */ 3189 /*
3191 /* against own ISR */ 3190 * host_lock taken by mid-level prior to call, but need
3191 * to protect against own ISR
3192 */
3192 spin_lock_irqsave(&boardp->lock, flags); 3193 spin_lock_irqsave(&boardp->lock, flags);
3193
3194 scp->scsi_done = done;
3195 asc_res = asc_execute_scsi_cmnd(scp); 3194 asc_res = asc_execute_scsi_cmnd(scp);
3195 spin_unlock_irqrestore(&boardp->lock, flags);
3196
3196 switch (asc_res) { 3197 switch (asc_res) {
3197 case ASC_NOERROR: 3198 case ASC_NOERROR:
3198 break; 3199 break;
@@ -3201,11 +3202,9 @@ advansys_queuecommand(struct scsi_cmnd *scp, void (*done) (struct scsi_cmnd *))
3201 break; 3202 break;
3202 case ASC_ERROR: 3203 case ASC_ERROR:
3203 default: 3204 default:
3204 /* Interrupts could be enabled here. */
3205 asc_scsi_done(scp); 3205 asc_scsi_done(scp);
3206 break; 3206 break;
3207 } 3207 }
3208 spin_unlock_irqrestore(&boardp->lock, flags);
3209 3208
3210 return result; 3209 return result;
3211} 3210}