diff options
Diffstat (limited to 'drivers/scsi/lpfc')
| -rw-r--r-- | drivers/scsi/lpfc/lpfc_attr.c | 10 | ||||
| -rw-r--r-- | drivers/scsi/lpfc/lpfc_init.c | 9 | ||||
| -rw-r--r-- | drivers/scsi/lpfc/lpfc_scsi.c | 36 |
3 files changed, 33 insertions, 22 deletions
diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c index 1d7a5c34ee8c..6eed9e76a166 100644 --- a/drivers/scsi/lpfc/lpfc_attr.c +++ b/drivers/scsi/lpfc/lpfc_attr.c | |||
| @@ -1998,6 +1998,14 @@ lpfc_vport_param_show(name)\ | |||
| 1998 | lpfc_vport_param_init(name, defval, minval, maxval)\ | 1998 | lpfc_vport_param_init(name, defval, minval, maxval)\ |
| 1999 | static DEVICE_ATTR(lpfc_##name, S_IRUGO , lpfc_##name##_show, NULL) | 1999 | static DEVICE_ATTR(lpfc_##name, S_IRUGO , lpfc_##name##_show, NULL) |
| 2000 | 2000 | ||
| 2001 | #define LPFC_VPORT_ULL_ATTR_R(name, defval, minval, maxval, desc) \ | ||
| 2002 | static uint64_t lpfc_##name = defval;\ | ||
| 2003 | module_param(lpfc_##name, ullong, S_IRUGO);\ | ||
| 2004 | MODULE_PARM_DESC(lpfc_##name, desc);\ | ||
| 2005 | lpfc_vport_param_show(name)\ | ||
| 2006 | lpfc_vport_param_init(name, defval, minval, maxval)\ | ||
| 2007 | static DEVICE_ATTR(lpfc_##name, S_IRUGO , lpfc_##name##_show, NULL) | ||
| 2008 | |||
| 2001 | #define LPFC_VPORT_ATTR_RW(name, defval, minval, maxval, desc) \ | 2009 | #define LPFC_VPORT_ATTR_RW(name, defval, minval, maxval, desc) \ |
| 2002 | static uint lpfc_##name = defval;\ | 2010 | static uint lpfc_##name = defval;\ |
| 2003 | module_param(lpfc_##name, uint, S_IRUGO);\ | 2011 | module_param(lpfc_##name, uint, S_IRUGO);\ |
| @@ -4596,7 +4604,7 @@ LPFC_VPORT_ATTR(discovery_threads, 32, 1, 64, "Maximum number of ELS commands " | |||
| 4596 | # Value range is [0,65535]. Default value is 255. | 4604 | # Value range is [0,65535]. Default value is 255. |
| 4597 | # NOTE: The SCSI layer might probe all allowed LUN on some old targets. | 4605 | # NOTE: The SCSI layer might probe all allowed LUN on some old targets. |
| 4598 | */ | 4606 | */ |
| 4599 | LPFC_VPORT_ATTR_R(max_luns, 255, 0, 65535, "Maximum allowed LUN ID"); | 4607 | LPFC_VPORT_ULL_ATTR_R(max_luns, 255, 0, 65535, "Maximum allowed LUN ID"); |
| 4600 | 4608 | ||
| 4601 | /* | 4609 | /* |
| 4602 | # lpfc_poll_tmo: .Milliseconds driver will wait between polling FCP ring. | 4610 | # lpfc_poll_tmo: .Milliseconds driver will wait between polling FCP ring. |
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index 06f9a5b79e66..a5769a9960ac 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c | |||
| @@ -8242,7 +8242,7 @@ lpfc_sli_enable_msix(struct lpfc_hba *phba) | |||
| 8242 | if (rc) { | 8242 | if (rc) { |
| 8243 | lpfc_printf_log(phba, KERN_INFO, LOG_INIT, | 8243 | lpfc_printf_log(phba, KERN_INFO, LOG_INIT, |
| 8244 | "0420 PCI enable MSI-X failed (%d)\n", rc); | 8244 | "0420 PCI enable MSI-X failed (%d)\n", rc); |
| 8245 | goto msi_fail_out; | 8245 | goto vec_fail_out; |
| 8246 | } | 8246 | } |
| 8247 | for (i = 0; i < LPFC_MSIX_VECTORS; i++) | 8247 | for (i = 0; i < LPFC_MSIX_VECTORS; i++) |
| 8248 | lpfc_printf_log(phba, KERN_INFO, LOG_INIT, | 8248 | lpfc_printf_log(phba, KERN_INFO, LOG_INIT, |
| @@ -8320,6 +8320,8 @@ irq_fail_out: | |||
| 8320 | msi_fail_out: | 8320 | msi_fail_out: |
| 8321 | /* Unconfigure MSI-X capability structure */ | 8321 | /* Unconfigure MSI-X capability structure */ |
| 8322 | pci_disable_msix(phba->pcidev); | 8322 | pci_disable_msix(phba->pcidev); |
| 8323 | |||
| 8324 | vec_fail_out: | ||
| 8323 | return rc; | 8325 | return rc; |
| 8324 | } | 8326 | } |
| 8325 | 8327 | ||
| @@ -8812,7 +8814,7 @@ enable_msix_vectors: | |||
| 8812 | } else if (rc) { | 8814 | } else if (rc) { |
| 8813 | lpfc_printf_log(phba, KERN_INFO, LOG_INIT, | 8815 | lpfc_printf_log(phba, KERN_INFO, LOG_INIT, |
| 8814 | "0484 PCI enable MSI-X failed (%d)\n", rc); | 8816 | "0484 PCI enable MSI-X failed (%d)\n", rc); |
| 8815 | goto msi_fail_out; | 8817 | goto vec_fail_out; |
| 8816 | } | 8818 | } |
| 8817 | 8819 | ||
| 8818 | /* Log MSI-X vector assignment */ | 8820 | /* Log MSI-X vector assignment */ |
| @@ -8875,9 +8877,10 @@ cfg_fail_out: | |||
| 8875 | &phba->sli4_hba.fcp_eq_hdl[index]); | 8877 | &phba->sli4_hba.fcp_eq_hdl[index]); |
| 8876 | } | 8878 | } |
| 8877 | 8879 | ||
| 8878 | msi_fail_out: | ||
| 8879 | /* Unconfigure MSI-X capability structure */ | 8880 | /* Unconfigure MSI-X capability structure */ |
| 8880 | pci_disable_msix(phba->pcidev); | 8881 | pci_disable_msix(phba->pcidev); |
| 8882 | |||
| 8883 | vec_fail_out: | ||
| 8881 | return rc; | 8884 | return rc; |
| 8882 | } | 8885 | } |
| 8883 | 8886 | ||
diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c index 2df11daad85b..7862c5540861 100644 --- a/drivers/scsi/lpfc/lpfc_scsi.c +++ b/drivers/scsi/lpfc/lpfc_scsi.c | |||
| @@ -258,7 +258,7 @@ static void | |||
| 258 | lpfc_send_sdev_queuedepth_change_event(struct lpfc_hba *phba, | 258 | lpfc_send_sdev_queuedepth_change_event(struct lpfc_hba *phba, |
| 259 | struct lpfc_vport *vport, | 259 | struct lpfc_vport *vport, |
| 260 | struct lpfc_nodelist *ndlp, | 260 | struct lpfc_nodelist *ndlp, |
| 261 | uint32_t lun, | 261 | uint64_t lun, |
| 262 | uint32_t old_val, | 262 | uint32_t old_val, |
| 263 | uint32_t new_val) | 263 | uint32_t new_val) |
| 264 | { | 264 | { |
| @@ -3823,7 +3823,7 @@ lpfc_handle_fcp_err(struct lpfc_vport *vport, struct lpfc_scsi_buf *lpfc_cmd, | |||
| 3823 | if (rsplen != 0 && rsplen != 4 && rsplen != 8) { | 3823 | if (rsplen != 0 && rsplen != 4 && rsplen != 8) { |
| 3824 | lpfc_printf_vlog(vport, KERN_ERR, LOG_FCP, | 3824 | lpfc_printf_vlog(vport, KERN_ERR, LOG_FCP, |
| 3825 | "2719 Invalid response length: " | 3825 | "2719 Invalid response length: " |
| 3826 | "tgt x%x lun x%x cmnd x%x rsplen x%x\n", | 3826 | "tgt x%x lun x%llx cmnd x%x rsplen x%x\n", |
| 3827 | cmnd->device->id, | 3827 | cmnd->device->id, |
| 3828 | cmnd->device->lun, cmnd->cmnd[0], | 3828 | cmnd->device->lun, cmnd->cmnd[0], |
| 3829 | rsplen); | 3829 | rsplen); |
| @@ -3834,7 +3834,7 @@ lpfc_handle_fcp_err(struct lpfc_vport *vport, struct lpfc_scsi_buf *lpfc_cmd, | |||
| 3834 | lpfc_printf_vlog(vport, KERN_ERR, LOG_FCP, | 3834 | lpfc_printf_vlog(vport, KERN_ERR, LOG_FCP, |
| 3835 | "2757 Protocol failure detected during " | 3835 | "2757 Protocol failure detected during " |
| 3836 | "processing of FCP I/O op: " | 3836 | "processing of FCP I/O op: " |
| 3837 | "tgt x%x lun x%x cmnd x%x rspInfo3 x%x\n", | 3837 | "tgt x%x lun x%llx cmnd x%x rspInfo3 x%x\n", |
| 3838 | cmnd->device->id, | 3838 | cmnd->device->id, |
| 3839 | cmnd->device->lun, cmnd->cmnd[0], | 3839 | cmnd->device->lun, cmnd->cmnd[0], |
| 3840 | fcprsp->rspInfo3); | 3840 | fcprsp->rspInfo3); |
| @@ -4045,7 +4045,7 @@ lpfc_scsi_cmd_iocb_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *pIocbIn, | |||
| 4045 | else | 4045 | else |
| 4046 | logit = LOG_FCP | LOG_FCP_UNDER; | 4046 | logit = LOG_FCP | LOG_FCP_UNDER; |
| 4047 | lpfc_printf_vlog(vport, KERN_WARNING, logit, | 4047 | lpfc_printf_vlog(vport, KERN_WARNING, logit, |
| 4048 | "9030 FCP cmd x%x failed <%d/%d> " | 4048 | "9030 FCP cmd x%x failed <%d/%lld> " |
| 4049 | "status: x%x result: x%x " | 4049 | "status: x%x result: x%x " |
| 4050 | "sid: x%x did: x%x oxid: x%x " | 4050 | "sid: x%x did: x%x oxid: x%x " |
| 4051 | "Data: x%x x%x\n", | 4051 | "Data: x%x x%x\n", |
| @@ -4157,7 +4157,7 @@ lpfc_scsi_cmd_iocb_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *pIocbIn, | |||
| 4157 | uint32_t *lp = (uint32_t *)cmd->sense_buffer; | 4157 | uint32_t *lp = (uint32_t *)cmd->sense_buffer; |
| 4158 | 4158 | ||
| 4159 | lpfc_printf_vlog(vport, KERN_INFO, LOG_FCP, | 4159 | lpfc_printf_vlog(vport, KERN_INFO, LOG_FCP, |
| 4160 | "0710 Iodone <%d/%d> cmd %p, error " | 4160 | "0710 Iodone <%d/%llu> cmd %p, error " |
| 4161 | "x%x SNS x%x x%x Data: x%x x%x\n", | 4161 | "x%x SNS x%x x%x Data: x%x x%x\n", |
| 4162 | cmd->device->id, cmd->device->lun, cmd, | 4162 | cmd->device->id, cmd->device->lun, cmd, |
| 4163 | cmd->result, *lp, *(lp + 3), cmd->retries, | 4163 | cmd->result, *lp, *(lp + 3), cmd->retries, |
| @@ -4390,7 +4390,7 @@ lpfc_scsi_prep_cmnd(struct lpfc_vport *vport, struct lpfc_scsi_buf *lpfc_cmd, | |||
| 4390 | static int | 4390 | static int |
| 4391 | lpfc_scsi_prep_task_mgmt_cmd(struct lpfc_vport *vport, | 4391 | lpfc_scsi_prep_task_mgmt_cmd(struct lpfc_vport *vport, |
| 4392 | struct lpfc_scsi_buf *lpfc_cmd, | 4392 | struct lpfc_scsi_buf *lpfc_cmd, |
| 4393 | unsigned int lun, | 4393 | uint64_t lun, |
| 4394 | uint8_t task_mgmt_cmd) | 4394 | uint8_t task_mgmt_cmd) |
| 4395 | { | 4395 | { |
| 4396 | struct lpfc_iocbq *piocbq; | 4396 | struct lpfc_iocbq *piocbq; |
| @@ -4719,12 +4719,12 @@ lpfc_queuecommand(struct Scsi_Host *shost, struct scsi_cmnd *cmnd) | |||
| 4719 | atomic_dec(&ndlp->cmd_pending); | 4719 | atomic_dec(&ndlp->cmd_pending); |
| 4720 | lpfc_printf_vlog(vport, KERN_INFO, LOG_FCP, | 4720 | lpfc_printf_vlog(vport, KERN_INFO, LOG_FCP, |
| 4721 | "3376 FCP could not issue IOCB err %x" | 4721 | "3376 FCP could not issue IOCB err %x" |
| 4722 | "FCP cmd x%x <%d/%d> " | 4722 | "FCP cmd x%x <%d/%llu> " |
| 4723 | "sid: x%x did: x%x oxid: x%x " | 4723 | "sid: x%x did: x%x oxid: x%x " |
| 4724 | "Data: x%x x%x x%x x%x\n", | 4724 | "Data: x%x x%x x%x x%x\n", |
| 4725 | err, cmnd->cmnd[0], | 4725 | err, cmnd->cmnd[0], |
| 4726 | cmnd->device ? cmnd->device->id : 0xffff, | 4726 | cmnd->device ? cmnd->device->id : 0xffff, |
| 4727 | cmnd->device ? cmnd->device->lun : 0xffff, | 4727 | cmnd->device ? cmnd->device->lun : (u64) -1, |
| 4728 | vport->fc_myDID, ndlp->nlp_DID, | 4728 | vport->fc_myDID, ndlp->nlp_DID, |
| 4729 | phba->sli_rev == LPFC_SLI_REV4 ? | 4729 | phba->sli_rev == LPFC_SLI_REV4 ? |
| 4730 | lpfc_cmd->cur_iocbq.sli4_xritag : 0xffff, | 4730 | lpfc_cmd->cur_iocbq.sli4_xritag : 0xffff, |
| @@ -4807,7 +4807,7 @@ lpfc_abort_handler(struct scsi_cmnd *cmnd) | |||
| 4807 | spin_unlock_irqrestore(&phba->hbalock, flags); | 4807 | spin_unlock_irqrestore(&phba->hbalock, flags); |
| 4808 | lpfc_printf_vlog(vport, KERN_WARNING, LOG_FCP, | 4808 | lpfc_printf_vlog(vport, KERN_WARNING, LOG_FCP, |
| 4809 | "2873 SCSI Layer I/O Abort Request IO CMPL Status " | 4809 | "2873 SCSI Layer I/O Abort Request IO CMPL Status " |
| 4810 | "x%x ID %d LUN %d\n", | 4810 | "x%x ID %d LUN %llu\n", |
| 4811 | SUCCESS, cmnd->device->id, cmnd->device->lun); | 4811 | SUCCESS, cmnd->device->id, cmnd->device->lun); |
| 4812 | return SUCCESS; | 4812 | return SUCCESS; |
| 4813 | } | 4813 | } |
| @@ -4924,7 +4924,7 @@ wait_for_cmpl: | |||
| 4924 | lpfc_printf_vlog(vport, KERN_ERR, LOG_FCP, | 4924 | lpfc_printf_vlog(vport, KERN_ERR, LOG_FCP, |
| 4925 | "0748 abort handler timed out waiting " | 4925 | "0748 abort handler timed out waiting " |
| 4926 | "for abortng I/O (xri:x%x) to complete: " | 4926 | "for abortng I/O (xri:x%x) to complete: " |
| 4927 | "ret %#x, ID %d, LUN %d\n", | 4927 | "ret %#x, ID %d, LUN %llu\n", |
| 4928 | iocb->sli4_xritag, ret, | 4928 | iocb->sli4_xritag, ret, |
| 4929 | cmnd->device->id, cmnd->device->lun); | 4929 | cmnd->device->id, cmnd->device->lun); |
| 4930 | } | 4930 | } |
| @@ -4935,7 +4935,7 @@ out_unlock: | |||
| 4935 | out: | 4935 | out: |
| 4936 | lpfc_printf_vlog(vport, KERN_WARNING, LOG_FCP, | 4936 | lpfc_printf_vlog(vport, KERN_WARNING, LOG_FCP, |
| 4937 | "0749 SCSI Layer I/O Abort Request Status x%x ID %d " | 4937 | "0749 SCSI Layer I/O Abort Request Status x%x ID %d " |
| 4938 | "LUN %d\n", ret, cmnd->device->id, | 4938 | "LUN %llu\n", ret, cmnd->device->id, |
| 4939 | cmnd->device->lun); | 4939 | cmnd->device->lun); |
| 4940 | return ret; | 4940 | return ret; |
| 4941 | } | 4941 | } |
| @@ -5047,7 +5047,7 @@ lpfc_check_fcp_rsp(struct lpfc_vport *vport, struct lpfc_scsi_buf *lpfc_cmd) | |||
| 5047 | **/ | 5047 | **/ |
| 5048 | static int | 5048 | static int |
| 5049 | lpfc_send_taskmgmt(struct lpfc_vport *vport, struct lpfc_rport_data *rdata, | 5049 | lpfc_send_taskmgmt(struct lpfc_vport *vport, struct lpfc_rport_data *rdata, |
| 5050 | unsigned tgt_id, unsigned int lun_id, | 5050 | unsigned tgt_id, uint64_t lun_id, |
| 5051 | uint8_t task_mgmt_cmd) | 5051 | uint8_t task_mgmt_cmd) |
| 5052 | { | 5052 | { |
| 5053 | struct lpfc_hba *phba = vport->phba; | 5053 | struct lpfc_hba *phba = vport->phba; |
| @@ -5083,7 +5083,7 @@ lpfc_send_taskmgmt(struct lpfc_vport *vport, struct lpfc_rport_data *rdata, | |||
| 5083 | iocbq->iocb_cmpl = lpfc_tskmgmt_def_cmpl; | 5083 | iocbq->iocb_cmpl = lpfc_tskmgmt_def_cmpl; |
| 5084 | 5084 | ||
| 5085 | lpfc_printf_vlog(vport, KERN_INFO, LOG_FCP, | 5085 | lpfc_printf_vlog(vport, KERN_INFO, LOG_FCP, |
| 5086 | "0702 Issue %s to TGT %d LUN %d " | 5086 | "0702 Issue %s to TGT %d LUN %llu " |
| 5087 | "rpi x%x nlp_flag x%x Data: x%x x%x\n", | 5087 | "rpi x%x nlp_flag x%x Data: x%x x%x\n", |
| 5088 | lpfc_taskmgmt_name(task_mgmt_cmd), tgt_id, lun_id, | 5088 | lpfc_taskmgmt_name(task_mgmt_cmd), tgt_id, lun_id, |
| 5089 | pnode->nlp_rpi, pnode->nlp_flag, iocbq->sli4_xritag, | 5089 | pnode->nlp_rpi, pnode->nlp_flag, iocbq->sli4_xritag, |
| @@ -5094,7 +5094,7 @@ lpfc_send_taskmgmt(struct lpfc_vport *vport, struct lpfc_rport_data *rdata, | |||
| 5094 | if ((status != IOCB_SUCCESS) || | 5094 | if ((status != IOCB_SUCCESS) || |
| 5095 | (iocbqrsp->iocb.ulpStatus != IOSTAT_SUCCESS)) { | 5095 | (iocbqrsp->iocb.ulpStatus != IOSTAT_SUCCESS)) { |
| 5096 | lpfc_printf_vlog(vport, KERN_ERR, LOG_FCP, | 5096 | lpfc_printf_vlog(vport, KERN_ERR, LOG_FCP, |
| 5097 | "0727 TMF %s to TGT %d LUN %d failed (%d, %d) " | 5097 | "0727 TMF %s to TGT %d LUN %llu failed (%d, %d) " |
| 5098 | "iocb_flag x%x\n", | 5098 | "iocb_flag x%x\n", |
| 5099 | lpfc_taskmgmt_name(task_mgmt_cmd), | 5099 | lpfc_taskmgmt_name(task_mgmt_cmd), |
| 5100 | tgt_id, lun_id, iocbqrsp->iocb.ulpStatus, | 5100 | tgt_id, lun_id, iocbqrsp->iocb.ulpStatus, |
| @@ -5238,7 +5238,7 @@ lpfc_device_reset_handler(struct scsi_cmnd *cmnd) | |||
| 5238 | struct lpfc_rport_data *rdata; | 5238 | struct lpfc_rport_data *rdata; |
| 5239 | struct lpfc_nodelist *pnode; | 5239 | struct lpfc_nodelist *pnode; |
| 5240 | unsigned tgt_id = cmnd->device->id; | 5240 | unsigned tgt_id = cmnd->device->id; |
| 5241 | unsigned int lun_id = cmnd->device->lun; | 5241 | uint64_t lun_id = cmnd->device->lun; |
| 5242 | struct lpfc_scsi_event_header scsi_event; | 5242 | struct lpfc_scsi_event_header scsi_event; |
| 5243 | int status; | 5243 | int status; |
| 5244 | 5244 | ||
| @@ -5273,7 +5273,7 @@ lpfc_device_reset_handler(struct scsi_cmnd *cmnd) | |||
| 5273 | FCP_LUN_RESET); | 5273 | FCP_LUN_RESET); |
| 5274 | 5274 | ||
| 5275 | lpfc_printf_vlog(vport, KERN_ERR, LOG_FCP, | 5275 | lpfc_printf_vlog(vport, KERN_ERR, LOG_FCP, |
| 5276 | "0713 SCSI layer issued Device Reset (%d, %d) " | 5276 | "0713 SCSI layer issued Device Reset (%d, %llu) " |
| 5277 | "return x%x\n", tgt_id, lun_id, status); | 5277 | "return x%x\n", tgt_id, lun_id, status); |
| 5278 | 5278 | ||
| 5279 | /* | 5279 | /* |
| @@ -5308,7 +5308,7 @@ lpfc_target_reset_handler(struct scsi_cmnd *cmnd) | |||
| 5308 | struct lpfc_rport_data *rdata; | 5308 | struct lpfc_rport_data *rdata; |
| 5309 | struct lpfc_nodelist *pnode; | 5309 | struct lpfc_nodelist *pnode; |
| 5310 | unsigned tgt_id = cmnd->device->id; | 5310 | unsigned tgt_id = cmnd->device->id; |
| 5311 | unsigned int lun_id = cmnd->device->lun; | 5311 | uint64_t lun_id = cmnd->device->lun; |
| 5312 | struct lpfc_scsi_event_header scsi_event; | 5312 | struct lpfc_scsi_event_header scsi_event; |
| 5313 | int status; | 5313 | int status; |
| 5314 | 5314 | ||
| @@ -5343,7 +5343,7 @@ lpfc_target_reset_handler(struct scsi_cmnd *cmnd) | |||
| 5343 | FCP_TARGET_RESET); | 5343 | FCP_TARGET_RESET); |
| 5344 | 5344 | ||
| 5345 | lpfc_printf_vlog(vport, KERN_ERR, LOG_FCP, | 5345 | lpfc_printf_vlog(vport, KERN_ERR, LOG_FCP, |
| 5346 | "0723 SCSI layer issued Target Reset (%d, %d) " | 5346 | "0723 SCSI layer issued Target Reset (%d, %llu) " |
| 5347 | "return x%x\n", tgt_id, lun_id, status); | 5347 | "return x%x\n", tgt_id, lun_id, status); |
| 5348 | 5348 | ||
| 5349 | /* | 5349 | /* |
