aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_scsi.c
diff options
context:
space:
mode:
authorJames Smart <james.smart@emulex.com>2011-10-10 21:32:10 -0400
committerJames Bottomley <JBottomley@Parallels.com>2011-10-16 12:28:48 -0400
commit73d91e503a60bd164b636258ae9f558b72010602 (patch)
treedc319fbf3cb55fc8d011720d5c13f1b814ae8539 /drivers/scsi/lpfc/lpfc_scsi.c
parent8d6f5cea12e5eebdaca94b3a3a4bd4f12e83d85d (diff)
[SCSI] lpfc 8.3.27: Miscellanous logic and interface fixes
Miscellanous logic and interface fixes - Fix lpfc_init_vfi_cmpl to check the interface type for interface type 0 before parsing the results. - Cast uint32_t values that are multiplied to uint64_t before the multiplication. - Instead of "break" statement when PCI read returned error, use the goto statement to the end of the routine after setting return value - moved the msleep(10) to the beginning of the wait loop for checking the SLIPort_Status register - Added the code to follow the existing wait for SLIPort_Status register RDY, ERR, and RN bits to be set by the port before proceeding to perform PCI function reset. - Do not override ulpCt_h and ulpCt_l for SLI 4 ports. - For vport delete, call lpfc_nlp_put when the vport's vpi state is not marked with VPI_REGISTERED. - Added missed fields into the driver's Controller Attributes Structure - Changed ringing EQ/CQ/RQ doorbell register to be dependent on the size of the queue. - Return -EACCES in issue_reset if cfg_enable_hba_reset is zero. - Added new logging flag LOG_FCP_UNDER 0x00040000 to qualify underrun logging. - Add a check in the fabric name display routine to display 0 if the port state is <= FLOGI. - Add a check to the switch statement in lpfc_decode_firmware_rev to check for an 'X'. Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_scsi.c')
-rw-r--r--drivers/scsi/lpfc/lpfc_scsi.c34
1 files changed, 21 insertions, 13 deletions
diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c
index 75a48e38c1fe..2a3c9c924279 100644
--- a/drivers/scsi/lpfc/lpfc_scsi.c
+++ b/drivers/scsi/lpfc/lpfc_scsi.c
@@ -2325,8 +2325,9 @@ lpfc_handle_fcp_err(struct lpfc_vport *vport, struct lpfc_scsi_buf *lpfc_cmd,
2325 } 2325 }
2326 lp = (uint32_t *)cmnd->sense_buffer; 2326 lp = (uint32_t *)cmnd->sense_buffer;
2327 2327
2328 if (!scsi_status && (resp_info & RESID_UNDER)) 2328 if (!scsi_status && (resp_info & RESID_UNDER) &&
2329 logit = LOG_FCP; 2329 vport->cfg_log_verbose & LOG_FCP_UNDER)
2330 logit = LOG_FCP_UNDER;
2330 2331
2331 lpfc_printf_vlog(vport, KERN_WARNING, logit, 2332 lpfc_printf_vlog(vport, KERN_WARNING, logit,
2332 "9024 FCP command x%x failed: x%x SNS x%x x%x " 2333 "9024 FCP command x%x failed: x%x SNS x%x x%x "
@@ -2342,7 +2343,7 @@ lpfc_handle_fcp_err(struct lpfc_vport *vport, struct lpfc_scsi_buf *lpfc_cmd,
2342 if (resp_info & RESID_UNDER) { 2343 if (resp_info & RESID_UNDER) {
2343 scsi_set_resid(cmnd, be32_to_cpu(fcprsp->rspResId)); 2344 scsi_set_resid(cmnd, be32_to_cpu(fcprsp->rspResId));
2344 2345
2345 lpfc_printf_vlog(vport, KERN_INFO, LOG_FCP, 2346 lpfc_printf_vlog(vport, KERN_INFO, LOG_FCP_UNDER,
2346 "9025 FCP Read Underrun, expected %d, " 2347 "9025 FCP Read Underrun, expected %d, "
2347 "residual %d Data: x%x x%x x%x\n", 2348 "residual %d Data: x%x x%x x%x\n",
2348 be32_to_cpu(fcpcmd->fcpDl), 2349 be32_to_cpu(fcpcmd->fcpDl),
@@ -2449,6 +2450,7 @@ lpfc_scsi_cmd_iocb_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *pIocbIn,
2449 struct lpfc_fast_path_event *fast_path_evt; 2450 struct lpfc_fast_path_event *fast_path_evt;
2450 struct Scsi_Host *shost; 2451 struct Scsi_Host *shost;
2451 uint32_t queue_depth, scsi_id; 2452 uint32_t queue_depth, scsi_id;
2453 uint32_t logit = LOG_FCP;
2452 2454
2453 /* Sanity check on return of outstanding command */ 2455 /* Sanity check on return of outstanding command */
2454 if (!(lpfc_cmd->pCmd)) 2456 if (!(lpfc_cmd->pCmd))
@@ -2470,16 +2472,22 @@ lpfc_scsi_cmd_iocb_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *pIocbIn,
2470 lpfc_cmd->status = IOSTAT_DRIVER_REJECT; 2472 lpfc_cmd->status = IOSTAT_DRIVER_REJECT;
2471 else if (lpfc_cmd->status >= IOSTAT_CNT) 2473 else if (lpfc_cmd->status >= IOSTAT_CNT)
2472 lpfc_cmd->status = IOSTAT_DEFAULT; 2474 lpfc_cmd->status = IOSTAT_DEFAULT;
2473 2475 if (lpfc_cmd->status == IOSTAT_FCP_RSP_ERROR
2474 lpfc_printf_vlog(vport, KERN_WARNING, LOG_FCP, 2476 && !lpfc_cmd->fcp_rsp->rspStatus3
2475 "9030 FCP cmd x%x failed <%d/%d> " 2477 && (lpfc_cmd->fcp_rsp->rspStatus2 & RESID_UNDER)
2476 "status: x%x result: x%x Data: x%x x%x\n", 2478 && !(phba->cfg_log_verbose & LOG_FCP_UNDER))
2477 cmd->cmnd[0], 2479 logit = 0;
2478 cmd->device ? cmd->device->id : 0xffff, 2480 else
2479 cmd->device ? cmd->device->lun : 0xffff, 2481 logit = LOG_FCP | LOG_FCP_UNDER;
2480 lpfc_cmd->status, lpfc_cmd->result, 2482 lpfc_printf_vlog(vport, KERN_WARNING, logit,
2481 pIocbOut->iocb.ulpContext, 2483 "9030 FCP cmd x%x failed <%d/%d> "
2482 lpfc_cmd->cur_iocbq.iocb.ulpIoTag); 2484 "status: x%x result: x%x Data: x%x x%x\n",
2485 cmd->cmnd[0],
2486 cmd->device ? cmd->device->id : 0xffff,
2487 cmd->device ? cmd->device->lun : 0xffff,
2488 lpfc_cmd->status, lpfc_cmd->result,
2489 pIocbOut->iocb.ulpContext,
2490 lpfc_cmd->cur_iocbq.iocb.ulpIoTag);
2483 2491
2484 switch (lpfc_cmd->status) { 2492 switch (lpfc_cmd->status) {
2485 case IOSTAT_FCP_RSP_ERROR: 2493 case IOSTAT_FCP_RSP_ERROR: