diff --git a/drivers/soc/qcom/icnss2/debug.c b/drivers/soc/qcom/icnss2/debug.c index b3dfbd53cd76..588892f5be46 100644 --- a/drivers/soc/qcom/icnss2/debug.c +++ b/drivers/soc/qcom/icnss2/debug.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-only /* - * Copyright (c) 2015-2020, The Linux Foundation. All rights reserved. + * Copyright (c) 2015-2021, The Linux Foundation. All rights reserved. */ #include #include @@ -14,6 +14,7 @@ void *icnss_ipc_log_context; void *icnss_ipc_log_long_context; +void *icnss_ipc_log_long1_context; static ssize_t icnss_regwrite_write(struct file *fp, const char __user *user_buf, @@ -770,6 +771,12 @@ void icnss_debug_init(void) "icnss_long", 0); if (!icnss_ipc_log_long_context) icnss_pr_err("Unable to create log long context\n"); + + icnss_ipc_log_long1_context = ipc_log_context_create(NUM_LOG_LONG_PAGES, + "icnss_long1", 0); + if (!icnss_ipc_log_long1_context) + icnss_pr_err("Unable to create log long context\n"); + } void icnss_debug_deinit(void) @@ -783,4 +790,9 @@ void icnss_debug_deinit(void) ipc_log_context_destroy(icnss_ipc_log_long_context); icnss_ipc_log_long_context = NULL; } + if (icnss_ipc_log_long1_context) { + ipc_log_context_destroy(icnss_ipc_log_long1_context); + icnss_ipc_log_long1_context = NULL; + } + } diff --git a/drivers/soc/qcom/icnss2/debug.h b/drivers/soc/qcom/icnss2/debug.h index ada100e79cc0..ae4b258800c4 100644 --- a/drivers/soc/qcom/icnss2/debug.h +++ b/drivers/soc/qcom/icnss2/debug.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */ /* - * Copyright (c) 2017-2020, The Linux Foundation. All rights reserved. + * Copyright (c) 2017-2021, The Linux Foundation. All rights reserved. */ #ifndef _ICNSS_DEBUG_H @@ -14,6 +14,7 @@ extern void *icnss_ipc_log_context; extern void *icnss_ipc_log_long_context; +extern void *icnss_ipc_log_long1_context; #define icnss_ipc_log_string(_x...) \ ipc_log_string(icnss_ipc_log_context, _x) @@ -21,6 +22,9 @@ extern void *icnss_ipc_log_long_context; #define icnss_ipc_log_long_string(_x...) \ ipc_log_string(icnss_ipc_log_long_context, _x) +#define icnss_ipc_log_long1_string(_x...) \ + ipc_log_string(icnss_ipc_log_long1_context, _x) + #define icnss_pr_err(_fmt, ...) do { \ printk("%s" pr_fmt(_fmt), KERN_ERR, ##__VA_ARGS__); \ icnss_ipc_log_string("%s" pr_fmt(_fmt), "", \ @@ -49,6 +53,12 @@ extern void *icnss_ipc_log_long_context; pr_debug(_fmt, ##__VA_ARGS__); \ icnss_ipc_log_long_string(pr_fmt(_fmt), ##__VA_ARGS__); \ } while (0) + +#define icnss_pr_vdbg1(_fmt, ...) do { \ + pr_debug(_fmt, ##__VA_ARGS__); \ + icnss_ipc_log_long1_string(pr_fmt(_fmt), ##__VA_ARGS__); \ + } while (0) + #elif defined(DEBUG) #define icnss_pr_dbg(_fmt, ...) do { \ printk("%s" pr_fmt(_fmt), KERN_DEBUG, ##__VA_ARGS__); \ @@ -61,6 +71,13 @@ extern void *icnss_ipc_log_long_context; icnss_ipc_log_long_string("%s" pr_fmt(_fmt), "", \ ##__VA_ARGS__); \ } while (0) + +#define icnss_pr_vdbg1(_fmt, ...) do { \ + pr_debug(_fmt, ##__VA_ARGS__); \ + icnss_ipc_log_long1_string("%s" pr_fmt(_fmt), "", \ + ##__VA_ARGS__); \ + } while (0) + #else #define icnss_pr_dbg(_fmt, ...) do { \ no_printk("%s" pr_fmt(_fmt), KERN_DEBUG, ##__VA_ARGS__); \ @@ -73,6 +90,13 @@ extern void *icnss_ipc_log_long_context; icnss_ipc_log_long_string("%s" pr_fmt(_fmt), "", \ ##__VA_ARGS__); \ } while (0) + +#define icnss_pr_vdbg1(_fmt, ...) do { \ + no_printk("%s" pr_fmt(_fmt), KERN_DEBUG, ##__VA_ARGS__); \ + icnss_ipc_log_long1_string("%s" pr_fmt(_fmt), "", \ + ##__VA_ARGS__); \ + } while (0) + #endif #ifdef CONFIG_ICNSS2_DEBUG diff --git a/drivers/soc/qcom/icnss2/main.c b/drivers/soc/qcom/icnss2/main.c index 56c369b9cfc0..4b428826d785 100644 --- a/drivers/soc/qcom/icnss2/main.c +++ b/drivers/soc/qcom/icnss2/main.c @@ -2124,9 +2124,9 @@ static int icnss_trigger_ssr_smp2p(struct icnss_priv *priv) ICNSS_SMEM_VALUE_MASK, value); if (ret) - icnss_pr_dbg("Error in SMP2P sent ret: %d\n", ret); + icnss_pr_vdbg1("Error in SMP2P sent ret: %d\n", ret); - icnss_pr_dbg("Initiate Root PD restart. SMP2P sent value: 0x%X\n", + icnss_pr_vdbg1("Initiate Root PD restart. SMP2P sent value: 0x%X\n", value); set_bit(ICNSS_HOST_TRIGGERED_PDR, &priv->state); return ret; @@ -3064,7 +3064,7 @@ int icnss_exit_power_save(struct device *dev) unsigned int value = 0; int ret; - icnss_pr_dbg("Calling Exit Power Save\n"); + icnss_pr_vdbg1("Calling Exit Power Save\n"); if (test_bit(ICNSS_PD_RESTART, &priv->state) || !test_bit(ICNSS_MODE_ON, &priv->state)) @@ -3078,9 +3078,9 @@ int icnss_exit_power_save(struct device *dev) ICNSS_SMEM_VALUE_MASK, value); if (ret) - icnss_pr_dbg("Error in SMP2P sent ret: %d\n", ret); + icnss_pr_vdbg1("Error in SMP2P sent ret: %d\n", ret); - icnss_pr_dbg("SMP2P sent value: 0x%X\n", value); + icnss_pr_vdbg1("SMP2P sent value: 0x%X\n", value); return ret; } EXPORT_SYMBOL(icnss_exit_power_save); @@ -3664,7 +3664,7 @@ static inline void icnss_get_smp2p_info(struct icnss_priv *priv) "wlan-smp2p-out", &priv->smp2p_info.smem_bit); if (IS_ERR(priv->smp2p_info.smem_state)) { - icnss_pr_dbg("Failed to get smem state %d", + icnss_pr_vdbg1("Failed to get smem state %d", PTR_ERR(priv->smp2p_info.smem_state)); } @@ -3904,10 +3904,10 @@ static int icnss_pm_suspend(struct device *dev) ICNSS_SMEM_VALUE_MASK, value); if (ret) - icnss_pr_dbg("Error in SMP2P sent ret: %d\n", + icnss_pr_vdbg1("Error in SMP2P sent ret: %d\n", ret); - icnss_pr_dbg("SMP2P sent value: 0x%X\n", value); + icnss_pr_vdbg1("SMP2P sent value: 0x%X\n", value); } priv->stats.pm_suspend++; set_bit(ICNSS_PM_SUSPEND, &priv->state); @@ -4042,9 +4042,9 @@ static int icnss_pm_runtime_suspend(struct device *dev) ICNSS_SMEM_VALUE_MASK, value); if (ret) - icnss_pr_dbg("Error in SMP2P sent ret: %d\n", ret); + icnss_pr_vdbg1("Error in SMP2P sent ret: %d\n", ret); - icnss_pr_dbg("SMP2P sent value: 0x%X\n", value); + icnss_pr_vdbg1("SMP2P sent value: 0x%X\n", value); } out: return ret; diff --git a/drivers/soc/qcom/icnss2/qmi.c b/drivers/soc/qcom/icnss2/qmi.c index 7b9c1cb2868d..258de0233ede 100644 --- a/drivers/soc/qcom/icnss2/qmi.c +++ b/drivers/soc/qcom/icnss2/qmi.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-only /* - * Copyright (c) 2017-2020, The Linux Foundation. All rights reserved. + * Copyright (c) 2017-2021, The Linux Foundation. All rights reserved. */ #define pr_fmt(fmt) "icnss2_qmi: " fmt @@ -2342,8 +2342,6 @@ static void icnss_wlfw_respond_get_info_ind_cb(struct qmi_handle *qmi, struct icnss_priv *priv = container_of(qmi, struct icnss_priv, qmi); const struct wlfw_respond_get_info_ind_msg_v01 *ind_msg = data; - icnss_pr_vdbg("Received QMI WLFW respond get info indication\n"); - if (!txn) { icnss_pr_err("Spurious indication\n"); return; @@ -2942,9 +2940,6 @@ int icnss_wlfw_get_info_send_sync(struct icnss_priv *plat_priv, int type, struct qmi_txn txn; int ret = 0; - icnss_pr_dbg("Sending get info message, type: %d, cmd length: %d, state: 0x%lx\n", - type, cmd_len, plat_priv->state); - if (cmd_len > QMI_WLFW_MAX_DATA_SIZE_V01) return -EINVAL;