From 352e75bb9ee4ff294f382467ca119b502df93ac9 Mon Sep 17 00:00:00 2001 From: Saranya Chidura Date: Fri, 5 Jan 2018 16:12:28 +0530 Subject: [PATCH] soc: qcom: qdss_bridge: add support for SSR Add support for mhi shutdown and sys_error notification. Signed-off-by: Saranya Chidura Change-Id: Icb5f3ad2161f137adc13d1fb8fe283b638845e59 --- drivers/soc/qcom/qdss_bridge.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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);