diff options
author | Linux Build Service Account <lnxbuild@localhost> | 2016-09-19 23:28:01 -0700 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2016-09-19 23:28:01 -0700 |
commit | 4886f3b04bab13a0b34925db9b25a1655f01ba78 (patch) | |
tree | 5c996a9d97d52482df65f6581277c9cb6d48cb95 /drivers/soc | |
parent | e61009aff817eb477ecab8a20d82f10816e40404 (diff) | |
parent | d7532eb42e7b73e1b67b5be20a9fd3106cab263d (diff) |
Merge "soc: qcom: Add subsys state with service notifier notification"
Diffstat (limited to 'drivers/soc')
-rw-r--r-- | drivers/soc/qcom/service-notifier.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/drivers/soc/qcom/service-notifier.c b/drivers/soc/qcom/service-notifier.c index 81dde8ca1ae8..981f78491ecf 100644 --- a/drivers/soc/qcom/service-notifier.c +++ b/drivers/soc/qcom/service-notifier.c @@ -386,7 +386,8 @@ static void root_service_service_arrive(struct work_struct *work) mutex_unlock(¬if_add_lock); } -static void root_service_service_exit(struct qmi_client_info *data) +static void root_service_service_exit(struct qmi_client_info *data, + enum pd_subsys_state state) { struct service_notif_info *service_notif = NULL; int rc; @@ -401,7 +402,7 @@ static void root_service_service_exit(struct qmi_client_info *data) if (service_notif->instance_id == data->instance_id) { rc = service_notif_queue_notification(service_notif, SERVREG_NOTIF_SERVICE_STATE_DOWN_V01, - NULL); + &state); if (rc & NOTIFY_STOP_MASK) pr_err("Notifier callback aborted for %s with error %d\n", service_notif->service_path, rc); @@ -425,7 +426,7 @@ static void root_service_exit_work(struct work_struct *work) { struct qmi_client_info *data = container_of(work, struct qmi_client_info, svc_exit); - root_service_service_exit(data); + root_service_service_exit(data, UNKNOWN); } static int service_event_notify(struct notifier_block *this, @@ -456,10 +457,15 @@ static int ssr_event_notify(struct notifier_block *this, { struct qmi_client_info *info = container_of(this, struct qmi_client_info, ssr_notifier); + struct notif_data *notif = data; switch (code) { case SUBSYS_BEFORE_SHUTDOWN: - pr_debug("Root PD service Down (SSR notification)\n"); - root_service_service_exit(info); + pr_debug("Root PD DOWN(SSR notification), crashed?%d\n", + notif->crashed); + if (notif->crashed) + root_service_service_exit(info, CRASHED); + else + root_service_service_exit(info, SHUTDOWN); break; default: break; |