Loading drivers/soc/qcom/icnss.c +18 −1 Original line number Diff line number Diff line Loading @@ -960,8 +960,16 @@ static int icnss_driver_event_server_arrive(void *data) int ret = 0; bool ignore_assert = false; if (!penv) if (!penv) { kfree(data); return -ENODEV; } if (test_bit(ICNSS_MODEM_SHUTDOWN, &penv->state)) { icnss_pr_dbg("WLFW server arrive: Modem is down"); kfree(data); return -EINVAL; } set_bit(ICNSS_WLFW_EXISTS, &penv->state); clear_bit(ICNSS_FW_DOWN, &penv->state); Loading Loading @@ -1579,14 +1587,20 @@ static int icnss_modem_notifier_nb(struct notifier_block *nb, icnss_pr_err("Not able to Collect msa0 segment dump, Apps permissions not assigned %d\n", ret); } clear_bit(ICNSS_MODEM_SHUTDOWN, &priv->state); return NOTIFY_OK; } if (code == SUBSYS_AFTER_SHUTDOWN) clear_bit(ICNSS_MODEM_SHUTDOWN, &priv->state); if (code != SUBSYS_BEFORE_SHUTDOWN) return NOTIFY_OK; priv->is_ssr = true; set_bit(ICNSS_MODEM_SHUTDOWN, &priv->state); if (notif->crashed) set_bit(ICNSS_MODEM_CRASHED, &priv->state); Loading Loading @@ -3153,6 +3167,9 @@ static int icnss_stats_show_state(struct seq_file *s, struct icnss_priv *priv) continue; case ICNSS_MODEM_CRASHED: seq_puts(s, "MODEM CRASHED"); continue; case ICNSS_MODEM_SHUTDOWN: seq_puts(s, "MODEM SHUTDOWN"); } seq_printf(s, "UNKNOWN-%d", i); Loading drivers/soc/qcom/icnss_private.h +2 −1 Original line number Diff line number Diff line /* Copyright (c) 2017-2019, The Linux Foundation. All rights reserved. /* Copyright (c) 2017-2020, 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 Loading Loading @@ -168,6 +168,7 @@ enum icnss_driver_state { ICNSS_CLK_UP, ICNSS_ESOC_OFF, ICNSS_MODEM_CRASHED, ICNSS_MODEM_SHUTDOWN, }; struct ce_irq_list { Loading drivers/soc/qcom/icnss_qmi.c +6 −0 Original line number Diff line number Diff line Loading @@ -1218,11 +1218,17 @@ int icnss_clear_server(struct icnss_priv *priv) static int wlfw_new_server(struct qmi_handle *qmi, struct qmi_service *service) { struct icnss_priv *priv = container_of(qmi, struct icnss_priv, qmi); struct icnss_event_server_arrive_data *event_data; icnss_pr_dbg("WLFW server arrive: node %u port %u\n", service->node, service->port); if (test_bit(ICNSS_MODEM_SHUTDOWN, &priv->state)) { icnss_pr_dbg("WLFW server arrive: Modem is down"); return -EINVAL; } event_data = kzalloc(sizeof(*event_data), GFP_KERNEL); if (event_data == NULL) return -ENOMEM; Loading Loading
drivers/soc/qcom/icnss.c +18 −1 Original line number Diff line number Diff line Loading @@ -960,8 +960,16 @@ static int icnss_driver_event_server_arrive(void *data) int ret = 0; bool ignore_assert = false; if (!penv) if (!penv) { kfree(data); return -ENODEV; } if (test_bit(ICNSS_MODEM_SHUTDOWN, &penv->state)) { icnss_pr_dbg("WLFW server arrive: Modem is down"); kfree(data); return -EINVAL; } set_bit(ICNSS_WLFW_EXISTS, &penv->state); clear_bit(ICNSS_FW_DOWN, &penv->state); Loading Loading @@ -1579,14 +1587,20 @@ static int icnss_modem_notifier_nb(struct notifier_block *nb, icnss_pr_err("Not able to Collect msa0 segment dump, Apps permissions not assigned %d\n", ret); } clear_bit(ICNSS_MODEM_SHUTDOWN, &priv->state); return NOTIFY_OK; } if (code == SUBSYS_AFTER_SHUTDOWN) clear_bit(ICNSS_MODEM_SHUTDOWN, &priv->state); if (code != SUBSYS_BEFORE_SHUTDOWN) return NOTIFY_OK; priv->is_ssr = true; set_bit(ICNSS_MODEM_SHUTDOWN, &priv->state); if (notif->crashed) set_bit(ICNSS_MODEM_CRASHED, &priv->state); Loading Loading @@ -3153,6 +3167,9 @@ static int icnss_stats_show_state(struct seq_file *s, struct icnss_priv *priv) continue; case ICNSS_MODEM_CRASHED: seq_puts(s, "MODEM CRASHED"); continue; case ICNSS_MODEM_SHUTDOWN: seq_puts(s, "MODEM SHUTDOWN"); } seq_printf(s, "UNKNOWN-%d", i); Loading
drivers/soc/qcom/icnss_private.h +2 −1 Original line number Diff line number Diff line /* Copyright (c) 2017-2019, The Linux Foundation. All rights reserved. /* Copyright (c) 2017-2020, 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 Loading Loading @@ -168,6 +168,7 @@ enum icnss_driver_state { ICNSS_CLK_UP, ICNSS_ESOC_OFF, ICNSS_MODEM_CRASHED, ICNSS_MODEM_SHUTDOWN, }; struct ce_irq_list { Loading
drivers/soc/qcom/icnss_qmi.c +6 −0 Original line number Diff line number Diff line Loading @@ -1218,11 +1218,17 @@ int icnss_clear_server(struct icnss_priv *priv) static int wlfw_new_server(struct qmi_handle *qmi, struct qmi_service *service) { struct icnss_priv *priv = container_of(qmi, struct icnss_priv, qmi); struct icnss_event_server_arrive_data *event_data; icnss_pr_dbg("WLFW server arrive: node %u port %u\n", service->node, service->port); if (test_bit(ICNSS_MODEM_SHUTDOWN, &priv->state)) { icnss_pr_dbg("WLFW server arrive: Modem is down"); return -EINVAL; } event_data = kzalloc(sizeof(*event_data), GFP_KERNEL); if (event_data == NULL) return -ENOMEM; Loading