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

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

[SCSI] lpfc 8.3.44: Fixed incorrect allocation of iDiags directories/files in debugfs

parent cff261f6
Loading
Loading
Loading
Loading
+10 −0
Original line number Original line Diff line number Diff line
@@ -3927,6 +3927,7 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport)
	struct lpfc_hba   *phba = vport->phba;
	struct lpfc_hba   *phba = vport->phba;
	char name[64];
	char name[64];
	uint32_t num, i;
	uint32_t num, i;
	bool pport_setup = false;


	if (!lpfc_debugfs_enable)
	if (!lpfc_debugfs_enable)
		return;
		return;
@@ -3947,6 +3948,7 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport)
	/* Setup funcX directory for specific HBA PCI function */
	/* Setup funcX directory for specific HBA PCI function */
	snprintf(name, sizeof(name), "fn%d", phba->brd_no);
	snprintf(name, sizeof(name), "fn%d", phba->brd_no);
	if (!phba->hba_debugfs_root) {
	if (!phba->hba_debugfs_root) {
		pport_setup = true;
		phba->hba_debugfs_root =
		phba->hba_debugfs_root =
			debugfs_create_dir(name, lpfc_debugfs_root);
			debugfs_create_dir(name, lpfc_debugfs_root);
		if (!phba->hba_debugfs_root) {
		if (!phba->hba_debugfs_root) {
@@ -4238,6 +4240,14 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport)
		goto debug_failed;
		goto debug_failed;
	}
	}


	/*
	 * The following section is for additional directories/files for the
	 * physical port.
	 */

	if (!pport_setup)
		goto debug_failed;

	/*
	/*
	 * iDiag debugfs root entry points for SLI4 device only
	 * iDiag debugfs root entry points for SLI4 device only
	 */
	 */