diff options
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_scsi.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_scsi.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c index 3a658953486c..581837b3c71a 100644 --- a/drivers/scsi/lpfc/lpfc_scsi.c +++ b/drivers/scsi/lpfc/lpfc_scsi.c | |||
@@ -169,6 +169,7 @@ lpfc_update_stats(struct lpfc_hba *phba, struct lpfc_scsi_buf *lpfc_cmd) | |||
169 | spin_lock_irqsave(shost->host_lock, flags); | 169 | spin_lock_irqsave(shost->host_lock, flags); |
170 | if (!vport->stat_data_enabled || | 170 | if (!vport->stat_data_enabled || |
171 | vport->stat_data_blocked || | 171 | vport->stat_data_blocked || |
172 | !pnode || | ||
172 | !pnode->lat_data || | 173 | !pnode->lat_data || |
173 | (phba->bucket_type == LPFC_NO_BUCKET)) { | 174 | (phba->bucket_type == LPFC_NO_BUCKET)) { |
174 | spin_unlock_irqrestore(shost->host_lock, flags); | 175 | spin_unlock_irqrestore(shost->host_lock, flags); |
@@ -2040,6 +2041,9 @@ lpfc_send_scsi_error_event(struct lpfc_hba *phba, struct lpfc_vport *vport, | |||
2040 | struct lpfc_nodelist *pnode = lpfc_cmd->rdata->pnode; | 2041 | struct lpfc_nodelist *pnode = lpfc_cmd->rdata->pnode; |
2041 | unsigned long flags; | 2042 | unsigned long flags; |
2042 | 2043 | ||
2044 | if (!pnode || !NLP_CHK_NODE_ACT(pnode)) | ||
2045 | return; | ||
2046 | |||
2043 | /* If there is queuefull or busy condition send a scsi event */ | 2047 | /* If there is queuefull or busy condition send a scsi event */ |
2044 | if ((cmnd->result == SAM_STAT_TASK_SET_FULL) || | 2048 | if ((cmnd->result == SAM_STAT_TASK_SET_FULL) || |
2045 | (cmnd->result == SAM_STAT_BUSY)) { | 2049 | (cmnd->result == SAM_STAT_BUSY)) { |
@@ -2895,7 +2899,7 @@ void lpfc_poll_timeout(unsigned long ptr) | |||
2895 | * SCSI_MLQUEUE_HOST_BUSY - Block all devices served by this host temporarily. | 2899 | * SCSI_MLQUEUE_HOST_BUSY - Block all devices served by this host temporarily. |
2896 | **/ | 2900 | **/ |
2897 | static int | 2901 | static int |
2898 | lpfc_queuecommand(struct scsi_cmnd *cmnd, void (*done) (struct scsi_cmnd *)) | 2902 | lpfc_queuecommand_lck(struct scsi_cmnd *cmnd, void (*done) (struct scsi_cmnd *)) |
2899 | { | 2903 | { |
2900 | struct Scsi_Host *shost = cmnd->device->host; | 2904 | struct Scsi_Host *shost = cmnd->device->host; |
2901 | struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata; | 2905 | struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata; |
@@ -3056,6 +3060,8 @@ lpfc_queuecommand(struct scsi_cmnd *cmnd, void (*done) (struct scsi_cmnd *)) | |||
3056 | return 0; | 3060 | return 0; |
3057 | } | 3061 | } |
3058 | 3062 | ||
3063 | static DEF_SCSI_QCMD(lpfc_queuecommand) | ||
3064 | |||
3059 | /** | 3065 | /** |
3060 | * lpfc_abort_handler - scsi_host_template eh_abort_handler entry point | 3066 | * lpfc_abort_handler - scsi_host_template eh_abort_handler entry point |
3061 | * @cmnd: Pointer to scsi_cmnd data structure. | 3067 | * @cmnd: Pointer to scsi_cmnd data structure. |
@@ -3226,10 +3232,11 @@ lpfc_send_taskmgmt(struct lpfc_vport *vport, struct lpfc_rport_data *rdata, | |||
3226 | struct lpfc_scsi_buf *lpfc_cmd; | 3232 | struct lpfc_scsi_buf *lpfc_cmd; |
3227 | struct lpfc_iocbq *iocbq; | 3233 | struct lpfc_iocbq *iocbq; |
3228 | struct lpfc_iocbq *iocbqrsp; | 3234 | struct lpfc_iocbq *iocbqrsp; |
3235 | struct lpfc_nodelist *pnode = rdata->pnode; | ||
3229 | int ret; | 3236 | int ret; |
3230 | int status; | 3237 | int status; |
3231 | 3238 | ||
3232 | if (!rdata->pnode || !NLP_CHK_NODE_ACT(rdata->pnode)) | 3239 | if (!pnode || !NLP_CHK_NODE_ACT(pnode)) |
3233 | return FAILED; | 3240 | return FAILED; |
3234 | 3241 | ||
3235 | lpfc_cmd = lpfc_get_scsi_buf(phba); | 3242 | lpfc_cmd = lpfc_get_scsi_buf(phba); |
@@ -3256,7 +3263,7 @@ lpfc_send_taskmgmt(struct lpfc_vport *vport, struct lpfc_rport_data *rdata, | |||
3256 | "0702 Issue %s to TGT %d LUN %d " | 3263 | "0702 Issue %s to TGT %d LUN %d " |
3257 | "rpi x%x nlp_flag x%x\n", | 3264 | "rpi x%x nlp_flag x%x\n", |
3258 | lpfc_taskmgmt_name(task_mgmt_cmd), tgt_id, lun_id, | 3265 | lpfc_taskmgmt_name(task_mgmt_cmd), tgt_id, lun_id, |
3259 | rdata->pnode->nlp_rpi, rdata->pnode->nlp_flag); | 3266 | pnode->nlp_rpi, pnode->nlp_flag); |
3260 | 3267 | ||
3261 | status = lpfc_sli_issue_iocb_wait(phba, LPFC_FCP_RING, | 3268 | status = lpfc_sli_issue_iocb_wait(phba, LPFC_FCP_RING, |
3262 | iocbq, iocbqrsp, lpfc_cmd->timeout); | 3269 | iocbq, iocbqrsp, lpfc_cmd->timeout); |