summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYaniv Gardi <ygardi@codeaurora.org>2015-08-17 15:47:14 +0300
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-22 11:00:32 -0700
commit43ba62d81cafe4e55c871d2ec6bf4a26bb4f5414 (patch)
treef2a631949fe8f382c5a5f27d87123b35eda0b4e5
parent2a1a416bc828fbdd157a9bfdf79505192793d6a7 (diff)
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: Yaniv Gardi <ygardi@codeaurora.org>
-rw-r--r--drivers/scsi/ufs/ufs-debugfs.c35
-rw-r--r--drivers/scsi/ufs/ufs-debugfs.h5
-rw-r--r--drivers/scsi/ufs/ufshcd.c3
3 files changed, 0 insertions, 43 deletions
diff --git a/drivers/scsi/ufs/ufs-debugfs.c b/drivers/scsi/ufs/ufs-debugfs.c
index 479b75cb8375..4486f7cf910d 100644
--- a/drivers/scsi/ufs/ufs-debugfs.c
+++ b/drivers/scsi/ufs/ufs-debugfs.c
@@ -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,
@@ -127,11 +122,6 @@ static struct ufsdbg_err_scenario err_scen_arr[] = {
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,
ARRAY_SIZE(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",
diff --git a/drivers/scsi/ufs/ufs-debugfs.h b/drivers/scsi/ufs/ufs-debugfs.h
index 6aaa2a407a5f..094808b5ac54 100644
--- a/drivers/scsi/ufs/ufs-debugfs.h
+++ b/drivers/scsi/ufs/ufs-debugfs.h
@@ -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,
};
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index 801afdbb7664..43a259b98436 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -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;