diff options
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_iocb.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_iocb.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/scsi/qla2xxx/qla_iocb.c b/drivers/scsi/qla2xxx/qla_iocb.c index 6b1a0450e8d4..59d62cbb994e 100644 --- a/drivers/scsi/qla2xxx/qla_iocb.c +++ b/drivers/scsi/qla2xxx/qla_iocb.c | |||
@@ -328,7 +328,6 @@ qla2x00_start_scsi(srb_t *sp) | |||
328 | int ret; | 328 | int ret; |
329 | unsigned long flags; | 329 | unsigned long flags; |
330 | scsi_qla_host_t *ha; | 330 | scsi_qla_host_t *ha; |
331 | fc_lun_t *fclun; | ||
332 | struct scsi_cmnd *cmd; | 331 | struct scsi_cmnd *cmd; |
333 | uint32_t *clr_ptr; | 332 | uint32_t *clr_ptr; |
334 | uint32_t index; | 333 | uint32_t index; |
@@ -343,8 +342,7 @@ qla2x00_start_scsi(srb_t *sp) | |||
343 | 342 | ||
344 | /* Setup device pointers. */ | 343 | /* Setup device pointers. */ |
345 | ret = 0; | 344 | ret = 0; |
346 | fclun = sp->lun_queue->fclun; | 345 | ha = sp->ha; |
347 | ha = fclun->fcport->ha; | ||
348 | reg = ha->iobase; | 346 | reg = ha->iobase; |
349 | cmd = sp->cmd; | 347 | cmd = sp->cmd; |
350 | 348 | ||
@@ -411,11 +409,9 @@ qla2x00_start_scsi(srb_t *sp) | |||
411 | memset(clr_ptr, 0, REQUEST_ENTRY_SIZE - 8); | 409 | memset(clr_ptr, 0, REQUEST_ENTRY_SIZE - 8); |
412 | cmd_pkt->dseg_count = cpu_to_le16(tot_dsds); | 410 | cmd_pkt->dseg_count = cpu_to_le16(tot_dsds); |
413 | 411 | ||
414 | /* Set target ID */ | 412 | /* Set target ID and LUN number*/ |
415 | SET_TARGET_ID(ha, cmd_pkt->target, fclun->fcport->loop_id); | 413 | SET_TARGET_ID(ha, cmd_pkt->target, sp->fcport->loop_id); |
416 | 414 | cmd_pkt->lun = cpu_to_le16(sp->cmd->device->lun); | |
417 | /* Set LUN number*/ | ||
418 | cmd_pkt->lun = cpu_to_le16(fclun->lun); | ||
419 | 415 | ||
420 | /* Update tagged queuing modifier */ | 416 | /* Update tagged queuing modifier */ |
421 | cmd_pkt->control_flags = __constant_cpu_to_le16(CF_SIMPLE_TAG); | 417 | cmd_pkt->control_flags = __constant_cpu_to_le16(CF_SIMPLE_TAG); |
@@ -453,7 +449,6 @@ qla2x00_start_scsi(srb_t *sp) | |||
453 | 449 | ||
454 | ha->actthreads++; | 450 | ha->actthreads++; |
455 | ha->total_ios++; | 451 | ha->total_ios++; |
456 | sp->lun_queue->out_cnt++; | ||
457 | sp->flags |= SRB_DMA_VALID; | 452 | sp->flags |= SRB_DMA_VALID; |
458 | sp->state = SRB_ACTIVE_STATE; | 453 | sp->state = SRB_ACTIVE_STATE; |
459 | sp->u_start = jiffies; | 454 | sp->u_start = jiffies; |