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

Commit 9a956773 authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "scsi: ufs: Add new debugfs entry to crash on ufs error"

parents 928ffd43 93da75e9
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -1767,6 +1767,12 @@ void ufsdbg_add_debugfs(struct ufs_hba *hba)
		goto err;
	}

	if (!debugfs_create_bool("crash_on_err",
		0600, hba->debugfs_files.debugfs_root,
		&hba->crash_on_err))
		goto err;


	ufsdbg_setup_fault_injection(hba);

	ufshcd_vops_add_debugfs(hba, hba->debugfs_files.debugfs_root);
+5 −0
Original line number Diff line number Diff line
@@ -5130,6 +5130,8 @@ static int ufshcd_uic_pwr_ctrl(struct ufs_hba *hba, struct uic_command *cmd)
		ufshcd_print_pwr_info(hba);
		ufshcd_print_host_regs(hba);
		ufshcd_print_cmd_log(hba);
		if (hba->crash_on_err)
			BUG_ON(1);
	}

	ufshcd_save_tstamp_of_last_dme_cmd(hba);
@@ -7702,6 +7704,9 @@ static int ufshcd_abort(struct scsi_cmnd *cmd)
		ufshcd_print_host_state(hba);
		ufshcd_print_pwr_info(hba);
		ufshcd_print_trs(hba, 1 << tag, true);
		/* crash the system upon setting this debugfs. */
		if (hba->crash_on_err)
			BUG_ON(1);
	} else {
		ufshcd_print_trs(hba, 1 << tag, false);
	}
+1 −0
Original line number Diff line number Diff line
@@ -813,6 +813,7 @@ struct ufs_hba {
	void *priv;
	unsigned int irq;
	bool is_irq_enabled;
	bool crash_on_err;

	u32 dev_ref_clk_gating_wait;
	u32 dev_ref_clk_freq;