aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_sli.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_sli.c')
-rw-r--r--drivers/scsi/lpfc/lpfc_sli.c36
1 files changed, 25 insertions, 11 deletions
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
index e758eae0d0f..fb8905f893f 100644
--- a/drivers/scsi/lpfc/lpfc_sli.c
+++ b/drivers/scsi/lpfc/lpfc_sli.c
@@ -1046,7 +1046,7 @@ lpfc_sli_next_iotag(struct lpfc_hba *phba, struct lpfc_iocbq *iocbq)
1046 } else 1046 } else
1047 spin_unlock_irq(&phba->hbalock); 1047 spin_unlock_irq(&phba->hbalock);
1048 1048
1049 lpfc_printf_log(phba, KERN_ERR,LOG_SLI, 1049 lpfc_printf_log(phba, KERN_WARNING, LOG_SLI,
1050 "0318 Failed to allocate IOTAG.last IOTAG is %d\n", 1050 "0318 Failed to allocate IOTAG.last IOTAG is %d\n",
1051 psli->last_iotag); 1051 psli->last_iotag);
1052 1052
@@ -3914,7 +3914,8 @@ lpfc_sli_config_port(struct lpfc_hba *phba, int sli_mode)
3914 phba->sli3_options &= ~(LPFC_SLI3_NPIV_ENABLED | 3914 phba->sli3_options &= ~(LPFC_SLI3_NPIV_ENABLED |
3915 LPFC_SLI3_HBQ_ENABLED | 3915 LPFC_SLI3_HBQ_ENABLED |
3916 LPFC_SLI3_CRP_ENABLED | 3916 LPFC_SLI3_CRP_ENABLED |
3917 LPFC_SLI3_BG_ENABLED); 3917 LPFC_SLI3_BG_ENABLED |
3918 LPFC_SLI3_DSS_ENABLED);
3918 if (rc != MBX_SUCCESS) { 3919 if (rc != MBX_SUCCESS) {
3919 lpfc_printf_log(phba, KERN_ERR, LOG_INIT, 3920 lpfc_printf_log(phba, KERN_ERR, LOG_INIT,
3920 "0442 Adapter failed to init, mbxCmd x%x " 3921 "0442 Adapter failed to init, mbxCmd x%x "
@@ -3949,8 +3950,23 @@ lpfc_sli_config_port(struct lpfc_hba *phba, int sli_mode)
3949 3950
3950 } else 3951 } else
3951 phba->max_vpi = 0; 3952 phba->max_vpi = 0;
3952 if (pmb->u.mb.un.varCfgPort.gdss) 3953 phba->fips_level = 0;
3954 phba->fips_spec_rev = 0;
3955 if (pmb->u.mb.un.varCfgPort.gdss) {
3953 phba->sli3_options |= LPFC_SLI3_DSS_ENABLED; 3956 phba->sli3_options |= LPFC_SLI3_DSS_ENABLED;
3957 phba->fips_level = pmb->u.mb.un.varCfgPort.fips_level;
3958 phba->fips_spec_rev = pmb->u.mb.un.varCfgPort.fips_rev;
3959 lpfc_printf_log(phba, KERN_INFO, LOG_INIT,
3960 "2850 Security Crypto Active. FIPS x%d "
3961 "(Spec Rev: x%d)",
3962 phba->fips_level, phba->fips_spec_rev);
3963 }
3964 if (pmb->u.mb.un.varCfgPort.sec_err) {
3965 lpfc_printf_log(phba, KERN_ERR, LOG_INIT,
3966 "2856 Config Port Security Crypto "
3967 "Error: x%x ",
3968 pmb->u.mb.un.varCfgPort.sec_err);
3969 }
3954 if (pmb->u.mb.un.varCfgPort.gerbm) 3970 if (pmb->u.mb.un.varCfgPort.gerbm)
3955 phba->sli3_options |= LPFC_SLI3_HBQ_ENABLED; 3971 phba->sli3_options |= LPFC_SLI3_HBQ_ENABLED;
3956 if (pmb->u.mb.un.varCfgPort.gcrp) 3972 if (pmb->u.mb.un.varCfgPort.gcrp)
@@ -9040,6 +9056,7 @@ lpfc_sli4_sp_handle_cqe(struct lpfc_hba *phba, struct lpfc_queue *cq,
9040 switch (bf_get(lpfc_cqe_code, &cqevt)) { 9056 switch (bf_get(lpfc_cqe_code, &cqevt)) {
9041 case CQE_CODE_COMPL_WQE: 9057 case CQE_CODE_COMPL_WQE:
9042 /* Process the WQ/RQ complete event */ 9058 /* Process the WQ/RQ complete event */
9059 phba->last_completion_time = jiffies;
9043 workposted = lpfc_sli4_sp_handle_els_wcqe(phba, 9060 workposted = lpfc_sli4_sp_handle_els_wcqe(phba,
9044 (struct lpfc_wcqe_complete *)&cqevt); 9061 (struct lpfc_wcqe_complete *)&cqevt);
9045 break; 9062 break;
@@ -9050,11 +9067,13 @@ lpfc_sli4_sp_handle_cqe(struct lpfc_hba *phba, struct lpfc_queue *cq,
9050 break; 9067 break;
9051 case CQE_CODE_XRI_ABORTED: 9068 case CQE_CODE_XRI_ABORTED:
9052 /* Process the WQ XRI abort event */ 9069 /* Process the WQ XRI abort event */
9070 phba->last_completion_time = jiffies;
9053 workposted = lpfc_sli4_sp_handle_abort_xri_wcqe(phba, cq, 9071 workposted = lpfc_sli4_sp_handle_abort_xri_wcqe(phba, cq,
9054 (struct sli4_wcqe_xri_aborted *)&cqevt); 9072 (struct sli4_wcqe_xri_aborted *)&cqevt);
9055 break; 9073 break;
9056 case CQE_CODE_RECEIVE: 9074 case CQE_CODE_RECEIVE:
9057 /* Process the RQ event */ 9075 /* Process the RQ event */
9076 phba->last_completion_time = jiffies;
9058 workposted = lpfc_sli4_sp_handle_rcqe(phba, 9077 workposted = lpfc_sli4_sp_handle_rcqe(phba,
9059 (struct lpfc_rcqe *)&cqevt); 9078 (struct lpfc_rcqe *)&cqevt);
9060 break; 9079 break;
@@ -9276,7 +9295,6 @@ lpfc_sli4_fp_handle_wcqe(struct lpfc_hba *phba, struct lpfc_queue *cq,
9276{ 9295{
9277 struct lpfc_wcqe_release wcqe; 9296 struct lpfc_wcqe_release wcqe;
9278 bool workposted = false; 9297 bool workposted = false;
9279 unsigned long iflag;
9280 9298
9281 /* Copy the work queue CQE and convert endian order if needed */ 9299 /* Copy the work queue CQE and convert endian order if needed */
9282 lpfc_sli_pcimem_bcopy(cqe, &wcqe, sizeof(struct lpfc_cqe)); 9300 lpfc_sli_pcimem_bcopy(cqe, &wcqe, sizeof(struct lpfc_cqe));
@@ -9285,9 +9303,7 @@ lpfc_sli4_fp_handle_wcqe(struct lpfc_hba *phba, struct lpfc_queue *cq,
9285 switch (bf_get(lpfc_wcqe_c_code, &wcqe)) { 9303 switch (bf_get(lpfc_wcqe_c_code, &wcqe)) {
9286 case CQE_CODE_COMPL_WQE: 9304 case CQE_CODE_COMPL_WQE:
9287 /* Process the WQ complete event */ 9305 /* Process the WQ complete event */
9288 spin_lock_irqsave(&phba->hbalock, iflag);
9289 phba->last_completion_time = jiffies; 9306 phba->last_completion_time = jiffies;
9290 spin_unlock_irqrestore(&phba->hbalock, iflag);
9291 lpfc_sli4_fp_handle_fcp_wcqe(phba, 9307 lpfc_sli4_fp_handle_fcp_wcqe(phba,
9292 (struct lpfc_wcqe_complete *)&wcqe); 9308 (struct lpfc_wcqe_complete *)&wcqe);
9293 break; 9309 break;
@@ -9298,6 +9314,7 @@ lpfc_sli4_fp_handle_wcqe(struct lpfc_hba *phba, struct lpfc_queue *cq,
9298 break; 9314 break;
9299 case CQE_CODE_XRI_ABORTED: 9315 case CQE_CODE_XRI_ABORTED:
9300 /* Process the WQ XRI abort event */ 9316 /* Process the WQ XRI abort event */
9317 phba->last_completion_time = jiffies;
9301 workposted = lpfc_sli4_sp_handle_abort_xri_wcqe(phba, cq, 9318 workposted = lpfc_sli4_sp_handle_abort_xri_wcqe(phba, cq,
9302 (struct sli4_wcqe_xri_aborted *)&wcqe); 9319 (struct sli4_wcqe_xri_aborted *)&wcqe);
9303 break; 9320 break;
@@ -12278,12 +12295,9 @@ lpfc_sli4_fcf_scan_read_fcf_rec(struct lpfc_hba *phba, uint16_t fcf_index)
12278 spin_lock_irq(&phba->hbalock); 12295 spin_lock_irq(&phba->hbalock);
12279 phba->hba_flag |= FCF_DISC_INPROGRESS; 12296 phba->hba_flag |= FCF_DISC_INPROGRESS;
12280 spin_unlock_irq(&phba->hbalock); 12297 spin_unlock_irq(&phba->hbalock);
12281 /* Reset FCF round robin index bmask for new scan */ 12298 /* Reset eligible FCF count for new scan */
12282 if (fcf_index == LPFC_FCOE_FCF_GET_FIRST) { 12299 if (fcf_index == LPFC_FCOE_FCF_GET_FIRST)
12283 memset(phba->fcf.fcf_rr_bmask, 0,
12284 sizeof(*phba->fcf.fcf_rr_bmask));
12285 phba->fcf.eligible_fcf_cnt = 0; 12300 phba->fcf.eligible_fcf_cnt = 0;
12286 }
12287 error = 0; 12301 error = 0;
12288 } 12302 }
12289fail_fcf_scan: 12303fail_fcf_scan: