Commit 24dfee40 authored by Todd Poynor's avatar Todd Poynor Committed by Greg Kroah-Hartman

staging: gasket: fix gasket_wait_with_reschedule timeout return code

Return -ETIMEDOUT, not -EINVAL, on timeout, including callers.
Reported-by: default avatarDmitry Torokhov <dtor@chromium.org>
Signed-off-by: default avatarZhongze Hu <frankhu@chromium.org>
Signed-off-by: default avatarTodd Poynor <toddpoynor@google.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e24fbaf7
...@@ -490,7 +490,7 @@ static int apex_enter_reset(struct gasket_dev *gasket_dev, uint type) ...@@ -490,7 +490,7 @@ static int apex_enter_reset(struct gasket_dev *gasket_dev, uint type)
gasket_log_error(gasket_dev, gasket_log_error(gasket_dev,
"DMAs did not quiesce within timeout (%d ms)", "DMAs did not quiesce within timeout (%d ms)",
APEX_RESET_RETRY * APEX_RESET_DELAY); APEX_RESET_RETRY * APEX_RESET_DELAY);
return -EINVAL; return -ETIMEDOUT;
} }
/* - Enable GCB reset (0x1 to rg_rst_gcb) */ /* - Enable GCB reset (0x1 to rg_rst_gcb) */
...@@ -513,7 +513,7 @@ static int apex_enter_reset(struct gasket_dev *gasket_dev, uint type) ...@@ -513,7 +513,7 @@ static int apex_enter_reset(struct gasket_dev *gasket_dev, uint type)
gasket_dev, gasket_dev,
"RAM did not shut down within timeout (%d ms)", "RAM did not shut down within timeout (%d ms)",
APEX_RESET_RETRY * APEX_RESET_DELAY); APEX_RESET_RETRY * APEX_RESET_DELAY);
return -EINVAL; return -ETIMEDOUT;
} }
return 0; return 0;
...@@ -562,7 +562,7 @@ static int apex_quit_reset(struct gasket_dev *gasket_dev, uint type) ...@@ -562,7 +562,7 @@ static int apex_quit_reset(struct gasket_dev *gasket_dev, uint type)
gasket_dev, gasket_dev,
"RAM did not enable within timeout (%d ms)", "RAM did not enable within timeout (%d ms)",
APEX_RESET_RETRY * APEX_RESET_DELAY); APEX_RESET_RETRY * APEX_RESET_DELAY);
return -EINVAL; return -ETIMEDOUT;
} }
/* - Wait for Reset complete. */ /* - Wait for Reset complete. */
...@@ -574,7 +574,7 @@ static int apex_quit_reset(struct gasket_dev *gasket_dev, uint type) ...@@ -574,7 +574,7 @@ static int apex_quit_reset(struct gasket_dev *gasket_dev, uint type)
gasket_dev, gasket_dev,
"GCB did not leave reset within timeout (%d ms)", "GCB did not leave reset within timeout (%d ms)",
APEX_RESET_RETRY * APEX_RESET_DELAY); APEX_RESET_RETRY * APEX_RESET_DELAY);
return -EINVAL; return -ETIMEDOUT;
} }
if (!allow_hw_clock_gating) { if (!allow_hw_clock_gating) {
......
...@@ -2106,7 +2106,7 @@ int gasket_wait_with_reschedule( ...@@ -2106,7 +2106,7 @@ int gasket_wait_with_reschedule(
"%s timeout: reg %llx timeout (%llu ms)", "%s timeout: reg %llx timeout (%llu ms)",
__func__, __func__,
offset, max_retries * delay_ms); offset, max_retries * delay_ms);
return -EINVAL; return -ETIMEDOUT;
} }
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment