aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_scsi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_scsi.c')
-rw-r--r--drivers/scsi/lpfc/lpfc_scsi.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c
index 4be506a33a2e..b5ad1871d34b 100644
--- a/drivers/scsi/lpfc/lpfc_scsi.c
+++ b/drivers/scsi/lpfc/lpfc_scsi.c
@@ -40,11 +40,6 @@
40#define LPFC_RESET_WAIT 2 40#define LPFC_RESET_WAIT 2
41#define LPFC_ABORT_WAIT 2 41#define LPFC_ABORT_WAIT 2
42 42
43static inline void lpfc_put_lun(struct fcp_cmnd *fcmd, unsigned int lun)
44{
45 fcmd->fcpLunLsl = 0;
46 fcmd->fcpLunMsl = swab16((uint16_t)lun);
47}
48 43
49/* 44/*
50 * This routine allocates a scsi buffer, which contains all the necessary 45 * This routine allocates a scsi buffer, which contains all the necessary
@@ -453,7 +448,8 @@ lpfc_scsi_prep_cmnd(struct lpfc_hba * phba, struct lpfc_scsi_buf * lpfc_cmd,
453 /* clear task management bits */ 448 /* clear task management bits */
454 lpfc_cmd->fcp_cmnd->fcpCntl2 = 0; 449 lpfc_cmd->fcp_cmnd->fcpCntl2 = 0;
455 450
456 lpfc_put_lun(lpfc_cmd->fcp_cmnd, lpfc_cmd->pCmd->device->lun); 451 int_to_scsilun(lpfc_cmd->pCmd->device->lun,
452 &lpfc_cmd->fcp_cmnd->fcp_lun);
457 453
458 memcpy(&fcp_cmnd->fcpCdb[0], scsi_cmnd->cmnd, 16); 454 memcpy(&fcp_cmnd->fcpCdb[0], scsi_cmnd->cmnd, 16);
459 455
@@ -552,7 +548,8 @@ lpfc_scsi_prep_task_mgmt_cmd(struct lpfc_hba *phba,
552 piocb = &piocbq->iocb; 548 piocb = &piocbq->iocb;
553 549
554 fcp_cmnd = lpfc_cmd->fcp_cmnd; 550 fcp_cmnd = lpfc_cmd->fcp_cmnd;
555 lpfc_put_lun(lpfc_cmd->fcp_cmnd, lpfc_cmd->pCmd->device->lun); 551 int_to_scsilun(lpfc_cmd->pCmd->device->lun,
552 &lpfc_cmd->fcp_cmnd->fcp_lun);
556 fcp_cmnd->fcpCntl2 = task_mgmt_cmd; 553 fcp_cmnd->fcpCntl2 = task_mgmt_cmd;
557 554
558 piocb->ulpCommand = CMD_FCP_ICMND64_CR; 555 piocb->ulpCommand = CMD_FCP_ICMND64_CR;