diff options
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_scsi.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_scsi.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c index f1af3f9dead4..c60f5d0b3869 100644 --- a/drivers/scsi/lpfc/lpfc_scsi.c +++ b/drivers/scsi/lpfc/lpfc_scsi.c | |||
@@ -2913,8 +2913,8 @@ lpfc_scsi_prep_cmnd(struct lpfc_vport *vport, struct lpfc_scsi_buf *lpfc_cmd, | |||
2913 | int_to_scsilun(lpfc_cmd->pCmd->device->lun, | 2913 | int_to_scsilun(lpfc_cmd->pCmd->device->lun, |
2914 | &lpfc_cmd->fcp_cmnd->fcp_lun); | 2914 | &lpfc_cmd->fcp_cmnd->fcp_lun); |
2915 | 2915 | ||
2916 | memcpy(&fcp_cmnd->fcpCdb[0], scsi_cmnd->cmnd, 16); | 2916 | memset(&fcp_cmnd->fcpCdb[0], 0, LPFC_FCP_CDB_LEN); |
2917 | 2917 | memcpy(&fcp_cmnd->fcpCdb[0], scsi_cmnd->cmnd, scsi_cmnd->cmd_len); | |
2918 | if (scsi_populate_tag_msg(scsi_cmnd, tag)) { | 2918 | if (scsi_populate_tag_msg(scsi_cmnd, tag)) { |
2919 | switch (tag[0]) { | 2919 | switch (tag[0]) { |
2920 | case HEAD_OF_QUEUE_TAG: | 2920 | case HEAD_OF_QUEUE_TAG: |
@@ -3238,6 +3238,15 @@ lpfc_queuecommand_lck(struct scsi_cmnd *cmnd, void (*done) (struct scsi_cmnd *)) | |||
3238 | cmnd->result = err; | 3238 | cmnd->result = err; |
3239 | goto out_fail_command; | 3239 | goto out_fail_command; |
3240 | } | 3240 | } |
3241 | /* | ||
3242 | * Do not let the mid-layer retry I/O too fast. If an I/O is retried | ||
3243 | * without waiting a bit then indicate that the device is busy. | ||
3244 | */ | ||
3245 | if (cmnd->retries && | ||
3246 | time_before(jiffies, (cmnd->jiffies_at_alloc + | ||
3247 | msecs_to_jiffies(LPFC_RETRY_PAUSE * | ||
3248 | cmnd->retries)))) | ||
3249 | return SCSI_MLQUEUE_DEVICE_BUSY; | ||
3241 | ndlp = rdata->pnode; | 3250 | ndlp = rdata->pnode; |
3242 | 3251 | ||
3243 | if ((scsi_get_prot_op(cmnd) != SCSI_PROT_NORMAL) && | 3252 | if ((scsi_get_prot_op(cmnd) != SCSI_PROT_NORMAL) && |