Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e40a02c1 authored by James Smart's avatar James Smart Committed by James Bottomley
Browse files

[SCSI] lpfc 8.3.10: Fix user interface issues



- Add Logging message for critial errors.
- Remove unused variable from lpfc_nodev_tmo_show
- Update supress_link_up parameter with #define values.

Signed-off-by: default avatarJames Smart <james.smart@emulex.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
parent 9f1177a3
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -623,6 +623,9 @@ struct lpfc_hba {
	uint32_t cfg_log_verbose;
	uint32_t cfg_log_verbose;
	uint32_t cfg_aer_support;
	uint32_t cfg_aer_support;
	uint32_t cfg_suppress_link_up;
	uint32_t cfg_suppress_link_up;
#define LPFC_INITIALIZE_LINK              0	/* do normal init_link mbox */
#define LPFC_DELAY_INIT_LINK              1	/* layered driver hold off */
#define LPFC_DELAY_INIT_LINK_INDEFINITELY 2	/* wait, manual intervention */


	lpfc_vpd_t vpd;		/* vital product data */
	lpfc_vpd_t vpd;		/* vital product data */


+4 −3
Original line number Original line Diff line number Diff line
@@ -1939,7 +1939,9 @@ static DEVICE_ATTR(lpfc_enable_npiv, S_IRUGO,
#            0x2  = never bring up link
#            0x2  = never bring up link
# Default value is 0.
# Default value is 0.
*/
*/
LPFC_ATTR_R(suppress_link_up, 0, 0, 2, "Suppress Link Up at initialization");
LPFC_ATTR_R(suppress_link_up, LPFC_INITIALIZE_LINK, LPFC_INITIALIZE_LINK,
		LPFC_DELAY_INIT_LINK_INDEFINITELY,
		"Suppress Link Up at initialization");


/*
/*
# lpfc_nodev_tmo: If set, it will hold all I/O errors on devices that disappear
# lpfc_nodev_tmo: If set, it will hold all I/O errors on devices that disappear
@@ -1966,8 +1968,7 @@ lpfc_nodev_tmo_show(struct device *dev, struct device_attribute *attr,
{
{
	struct Scsi_Host  *shost = class_to_shost(dev);
	struct Scsi_Host  *shost = class_to_shost(dev);
	struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata;
	struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata;
	int val = 0;

	val = vport->cfg_devloss_tmo;
	return snprintf(buf, PAGE_SIZE, "%d\n",	vport->cfg_devloss_tmo);
	return snprintf(buf, PAGE_SIZE, "%d\n",	vport->cfg_devloss_tmo);
}
}


+18 −3
Original line number Original line Diff line number Diff line
@@ -806,9 +806,8 @@ lpfc_cmpl_els_flogi(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
		}
		}


		/* FLOGI failure */
		/* FLOGI failure */
		lpfc_printf_vlog(vport, KERN_INFO, LOG_ELS,
		lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS,
				 "0100 FLOGI failure Data: x%x x%x "
				 "0100 FLOGI failure Status:x%x/x%x TMO:x%x\n",
				 "x%x\n",
				 irsp->ulpStatus, irsp->un.ulpWord[4],
				 irsp->ulpStatus, irsp->un.ulpWord[4],
				 irsp->ulpTimeout);
				 irsp->ulpTimeout);
		goto flogifail;
		goto flogifail;
@@ -1409,6 +1408,10 @@ lpfc_cmpl_els_plogi(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
			goto out;
			goto out;
		}
		}
		/* PLOGI failed */
		/* PLOGI failed */
		lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS,
				 "2753 PLOGI failure DID:%06X Status:x%x/x%x\n",
				 ndlp->nlp_DID, irsp->ulpStatus,
				 irsp->un.ulpWord[4]);
		/* Do not call DSM for lpfc_els_abort'ed ELS cmds */
		/* Do not call DSM for lpfc_els_abort'ed ELS cmds */
		if (lpfc_error_lost_link(irsp))
		if (lpfc_error_lost_link(irsp))
			rc = NLP_STE_FREED_NODE;
			rc = NLP_STE_FREED_NODE;
@@ -1577,6 +1580,10 @@ lpfc_cmpl_els_prli(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
			goto out;
			goto out;
		}
		}
		/* PRLI failed */
		/* PRLI failed */
		lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS,
				 "2754 PRLI failure DID:%06X Status:x%x/x%x\n",
				 ndlp->nlp_DID, irsp->ulpStatus,
				 irsp->un.ulpWord[4]);
		/* Do not call DSM for lpfc_els_abort'ed ELS cmds */
		/* Do not call DSM for lpfc_els_abort'ed ELS cmds */
		if (lpfc_error_lost_link(irsp))
		if (lpfc_error_lost_link(irsp))
			goto out;
			goto out;
@@ -1860,6 +1867,10 @@ lpfc_cmpl_els_adisc(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
			goto out;
			goto out;
		}
		}
		/* ADISC failed */
		/* ADISC failed */
		lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS,
				 "2755 ADISC failure DID:%06X Status:x%x/x%x\n",
				 ndlp->nlp_DID, irsp->ulpStatus,
				 irsp->un.ulpWord[4]);
		/* Do not call DSM for lpfc_els_abort'ed ELS cmds */
		/* Do not call DSM for lpfc_els_abort'ed ELS cmds */
		if (!lpfc_error_lost_link(irsp))
		if (!lpfc_error_lost_link(irsp))
			lpfc_disc_state_machine(vport, ndlp, cmdiocb,
			lpfc_disc_state_machine(vport, ndlp, cmdiocb,
@@ -2009,6 +2020,10 @@ lpfc_cmpl_els_logo(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
			/* ELS command is being retried */
			/* ELS command is being retried */
			goto out;
			goto out;
		/* LOGO failed */
		/* LOGO failed */
		lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS,
				 "2756 LOGO failure DID:%06X Status:x%x/x%x\n",
				 ndlp->nlp_DID, irsp->ulpStatus,
				 irsp->un.ulpWord[4]);
		/* Do not call DSM for lpfc_els_abort'ed ELS cmds */
		/* Do not call DSM for lpfc_els_abort'ed ELS cmds */
		if (lpfc_error_lost_link(irsp))
		if (lpfc_error_lost_link(irsp))
			goto out;
			goto out;
+2 −2
Original line number Original line Diff line number Diff line
@@ -549,7 +549,7 @@ lpfc_config_port_post(struct lpfc_hba *phba)
			mempool_free(pmb, phba->mbox_mem_pool);
			mempool_free(pmb, phba->mbox_mem_pool);
			return -EIO;
			return -EIO;
		}
		}
	} else if (phba->cfg_suppress_link_up == 0) {
	} else if (phba->cfg_suppress_link_up == LPFC_INITIALIZE_LINK) {
		lpfc_init_link(phba, pmb, phba->cfg_topology,
		lpfc_init_link(phba, pmb, phba->cfg_topology,
			phba->cfg_link_speed);
			phba->cfg_link_speed);
		pmb->mbox_cmpl = lpfc_sli_def_mbox_cmpl;
		pmb->mbox_cmpl = lpfc_sli_def_mbox_cmpl;
@@ -667,7 +667,7 @@ lpfc_hba_init_link(struct lpfc_hba *phba)
			mempool_free(pmb, phba->mbox_mem_pool);
			mempool_free(pmb, phba->mbox_mem_pool);
		return -EIO;
		return -EIO;
	}
	}
	phba->cfg_suppress_link_up = 0;
	phba->cfg_suppress_link_up = LPFC_INITIALIZE_LINK;


	return 0;
	return 0;
}
}
+12 −2
Original line number Original line Diff line number Diff line
@@ -2079,8 +2079,7 @@ lpfc_handle_fcp_err(struct lpfc_vport *vport, struct lpfc_scsi_buf *lpfc_cmd,


	if (resp_info & RSP_LEN_VALID) {
	if (resp_info & RSP_LEN_VALID) {
		rsplen = be32_to_cpu(fcprsp->rspRspLen);
		rsplen = be32_to_cpu(fcprsp->rspRspLen);
		if ((rsplen != 0 && rsplen != 4 && rsplen != 8) ||
		if (rsplen != 0 && rsplen != 4 && rsplen != 8) {
		    (fcprsp->rspInfo3 != RSP_NO_FAILURE)) {
			lpfc_printf_vlog(vport, KERN_ERR, LOG_FCP,
			lpfc_printf_vlog(vport, KERN_ERR, LOG_FCP,
				 "2719 Invalid response length: "
				 "2719 Invalid response length: "
				 "tgt x%x lun x%x cmnd x%x rsplen x%x\n",
				 "tgt x%x lun x%x cmnd x%x rsplen x%x\n",
@@ -2090,6 +2089,17 @@ lpfc_handle_fcp_err(struct lpfc_vport *vport, struct lpfc_scsi_buf *lpfc_cmd,
			host_status = DID_ERROR;
			host_status = DID_ERROR;
			goto out;
			goto out;
		}
		}
		if (fcprsp->rspInfo3 != RSP_NO_FAILURE) {
			lpfc_printf_vlog(vport, KERN_ERR, LOG_FCP,
				 "2757 Protocol failure detected during "
				 "processing of FCP I/O op: "
				 "tgt x%x lun x%x cmnd x%x rspInfo3 x%x\n",
				 cmnd->device->id,
				 cmnd->device->lun, cmnd->cmnd[0],
				 fcprsp->rspInfo3);
			host_status = DID_ERROR;
			goto out;
		}
	}
	}


	if ((resp_info & SNS_LEN_VALID) && fcprsp->rspSnsLen) {
	if ((resp_info & SNS_LEN_VALID) && fcprsp->rspSnsLen) {
Loading