summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/soc/qcom/qdss_bridge.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/soc/qcom/qdss_bridge.c b/drivers/soc/qcom/qdss_bridge.c
index 443e9e384ea2..087f01154924 100644
--- a/drivers/soc/qcom/qdss_bridge.c
+++ b/drivers/soc/qcom/qdss_bridge.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2017, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -352,6 +352,14 @@ static void mhi_notifier(struct mhi_cb_info *cb_info)
queue_work(drvdata->mhi_wq, &drvdata->close_work);
break;
+ case MHI_CB_SYS_ERROR:
+ case MHI_CB_MHI_SHUTDOWN:
+ drvdata->opened = 0;
+
+ flush_workqueue(drvdata->mhi_wq);
+ qdss_destroy_buf_tbl(drvdata);
+ break;
+
default:
pr_err_ratelimited("MHI returned invalid cb reason 0x%x\n",
cb_info->cb_reason);