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

Commit b258a45b authored by Yaniv Gardi's avatar Yaniv Gardi
Browse files

scsi: ufs-debugfs: remove unnecessary error scenario use-cases



This change removes error scenario use-cases that have not been
implemented yet, and one error scenario (ERR_INJECT_LINK_STARTUP)
that anyway is not recoverable.

Change-Id: I78948f64ee3868333ec27e17695980b642248dcf
Signed-off-by: default avatarYaniv Gardi <ygardi@codeaurora.org>
parent f4ffbc1c
Loading
Loading
Loading
Loading
+0 −35
Original line number Diff line number Diff line
@@ -85,11 +85,6 @@ static const int err_inject_pwr_change_err_codes[] = {
	PWR_FATAL_ERROR,
};

static const int err_inject_link_startup_err_codes[] = {
	-EIO,
	-ETIMEDOUT,
};

static const int err_inject_uic_err_codes[] = {
	-EIO,
	-ETIMEDOUT,
@@ -126,11 +121,6 @@ static struct ufsdbg_err_scenario err_scen_arr[] = {
		err_inject_pwr_change_err_codes,
		ARRAY_SIZE(err_inject_pwr_change_err_codes),
	},
	{
		"ERR_INJECT_LINK_STARTUP",
		err_inject_link_startup_err_codes,
		ARRAY_SIZE(err_inject_link_startup_err_codes),
	},
	{
		"ERR_INJECT_UIC",
		err_inject_uic_err_codes,
@@ -146,26 +136,6 @@ static struct ufsdbg_err_scenario err_scen_arr[] = {
		err_inject_query_err_codes,
		ARRAY_SIZE(err_inject_query_err_codes),
	},
	{
		"ERR_INJECT_RUNTIME_PM",
		NULL,
		0,
	},
	{
		"ERR_INJECT_SYSTEM_PM",
		NULL,
		0,
	},
	{
		"ERR_INJECT_CLOCK_GATING_SCALING",
		NULL,
		0,
	},
	{
		"ERR_INJECT_PHY_POWER_UP_SEQ",
		NULL,
		0,
	},
};

static bool inject_fatal_err_tr(struct ufs_hba *hba, u8 ocs_err)
@@ -320,14 +290,9 @@ void ufsdbg_error_inject_dispatcher(struct ufs_hba *hba,
	case ERR_INJECT_HIBERN8_ENTER:
	case ERR_INJECT_HIBERN8_EXIT:
	case ERR_INJECT_PWR_CHANGE:
	case ERR_INJECT_LINK_STARTUP:
	case ERR_INJECT_UIC:
	case ERR_INJECT_DME_ATTR:
	case ERR_INJECT_QUERY:
	case ERR_INJECT_RUNTIME_PM:
	case ERR_INJECT_SYSTEM_PM:
	case ERR_INJECT_CLOCK_GATING_SCALING:
	case ERR_INJECT_PHY_POWER_UP_SEQ:
		goto should_fail;
	default:
		dev_err(hba->dev, "%s: unsupported error scenario\n",
+0 −5
Original line number Diff line number Diff line
@@ -28,14 +28,9 @@ enum ufsdbg_err_inject_scenario {
	ERR_INJECT_HIBERN8_ENTER,
	ERR_INJECT_HIBERN8_EXIT,
	ERR_INJECT_PWR_CHANGE,
	ERR_INJECT_LINK_STARTUP,
	ERR_INJECT_UIC,
	ERR_INJECT_DME_ATTR,
	ERR_INJECT_QUERY,
	ERR_INJECT_RUNTIME_PM,
	ERR_INJECT_SYSTEM_PM,
	ERR_INJECT_CLOCK_GATING_SCALING,
	ERR_INJECT_PHY_POWER_UP_SEQ,
	ERR_INJECT_MAX_ERR_SCENARIOS,
};

+0 −3
Original line number Diff line number Diff line
@@ -4433,9 +4433,6 @@ static int ufshcd_link_startup(struct ufs_hba *hba)

	ret = ufshcd_make_hba_operational(hba);
out:
	ufsdbg_error_inject_dispatcher(hba,
		ERR_INJECT_LINK_STARTUP, 0, &ret);

	if (ret)
		dev_err(hba->dev, "link startup failed %d\n", ret);
	return ret;