File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -953,6 +953,12 @@ static int clsic_pm_service_transition(struct clsic *clsic, int pm_event)
953953#define CLSIC_BOOT_PROGRESS_POLL_MICROSECONDS 5000
954954#define CLSIC_BOOT_PROGRESS_TIMEOUT_MICROSECONDS 2000000
955955
956+ /*
957+ * Setting the timeout for the enumeration or firmware download to be 100
958+ * seconds (the bootloader message timeout is 90 seconds)
959+ */
960+ #define CLSIC_PM_COMPLETION_TIMEOUT (HZ * 100)
961+
956962static int clsic_runtime_resume (struct device * dev )
957963{
958964 struct clsic * clsic = dev_get_drvdata (dev );
@@ -1024,7 +1030,11 @@ static int clsic_runtime_resume(struct device *dev)
10241030 * Wait for the system to have fully initialised, including any
10251031 * firmware download and enumeration activity
10261032 */
1027- wait_for_completion (& clsic -> pm_completion );
1033+ if (wait_for_completion_timeout (& clsic -> pm_completion ,
1034+ CLSIC_PM_COMPLETION_TIMEOUT ) == 0 ) {
1035+ clsic_err (clsic , "Completion timeout\n" );
1036+ return - ETIMEDOUT ;
1037+ }
10281038
10291039 trace_clsic_pm (RPM_ACTIVE );
10301040
You can’t perform that action at this time.
0 commit comments