From 4dca34f3f36bf8b0eef2ea2a6eee44a82e015f1a Mon Sep 17 00:00:00 2001 From: Raghavendra Rao Ananta Date: Thu, 4 Jan 2018 11:09:45 -0800 Subject: [PATCH] esoc: Notify mdm-helper about the modem's error fatal There is no way for the mdm-helper to know that the modem has crashed to take necessary action. Hence, added the support that sends a notification to the user-space, through IOCTL, as and when the modem sends an error fatal interrupt to the driver. Change-Id: I0a596763b310641d4c9e93d03690ba96162515ff Signed-off-by: Raghavendra Rao Ananta --- drivers/esoc/esoc-mdm-drv.c | 1 + include/uapi/linux/esoc_ctrl.h | 2 ++ 2 files changed, 3 insertions(+) diff --git a/drivers/esoc/esoc-mdm-drv.c b/drivers/esoc/esoc-mdm-drv.c index 8fe85fc46a8a..1342717b4da7 100644 --- a/drivers/esoc/esoc-mdm-drv.c +++ b/drivers/esoc/esoc-mdm-drv.c @@ -169,6 +169,7 @@ static int mdm_subsys_shutdown(const struct subsys_desc *crashed_subsys, */ return 0; + esoc_clink_queue_request(ESOC_REQ_CRASH_SHUTDOWN, esoc_clink); esoc_client_link_power_off(esoc_clink, true); ret = clink_ops->cmd_exe(ESOC_PREPARE_DEBUG, diff --git a/include/uapi/linux/esoc_ctrl.h b/include/uapi/linux/esoc_ctrl.h index 1970e1018a16..a1ea9a0bd75e 100644 --- a/include/uapi/linux/esoc_ctrl.h +++ b/include/uapi/linux/esoc_ctrl.h @@ -26,6 +26,7 @@ struct esoc_link_data { #define ESOC_GET_LINK_ID _IOWR(ESOC_CODE, 9, struct esoc_link_data) #define ESOC_REQ_SEND_SHUTDOWN ESOC_REQ_SEND_SHUTDOWN +#define ESOC_REQ_CRASH_SHUTDOWN ESOC_REQ_CRASH_SHUTDOWN enum esoc_evt { ESOC_RUN_STATE = 0x1, @@ -67,6 +68,7 @@ enum esoc_req { ESOC_REQ_DEBUG, ESOC_REQ_SHUTDOWN, ESOC_REQ_SEND_SHUTDOWN, + ESOC_REQ_CRASH_SHUTDOWN, }; #ifdef __KERNEL__