Commit 373f121a authored by M Chetan Kumar's avatar M Chetan Kumar Committed by Jakub Kicinski

net: wwan: iosm: fixes unnecessary doorbell send

In TX packet accumulation flow transport layer is
giving a doorbell to device even though there is
no pending control TX transfer that needs immediate
attention.

Introduced a new hpda_ctrl_pending variable to keep
track of pending control TX transfer. If there is a
pending control TX transfer which needs an immediate
attention only then give a doorbell to device.
Signed-off-by: default avatarM Chetan Kumar <m.chetan.kumar@linux.intel.com>
Reviewed-by: default avatarSergey Ryazanov <ryazanov.s.a@gmail.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent e8b1d769
...@@ -181,9 +181,9 @@ void ipc_imem_hrtimer_stop(struct hrtimer *hr_timer) ...@@ -181,9 +181,9 @@ void ipc_imem_hrtimer_stop(struct hrtimer *hr_timer)
bool ipc_imem_ul_write_td(struct iosm_imem *ipc_imem) bool ipc_imem_ul_write_td(struct iosm_imem *ipc_imem)
{ {
struct ipc_mem_channel *channel; struct ipc_mem_channel *channel;
bool hpda_ctrl_pending = false;
struct sk_buff_head *ul_list; struct sk_buff_head *ul_list;
bool hpda_pending = false; bool hpda_pending = false;
bool forced_hpdu = false;
struct ipc_pipe *pipe; struct ipc_pipe *pipe;
int i; int i;
...@@ -200,15 +200,19 @@ bool ipc_imem_ul_write_td(struct iosm_imem *ipc_imem) ...@@ -200,15 +200,19 @@ bool ipc_imem_ul_write_td(struct iosm_imem *ipc_imem)
ul_list = &channel->ul_list; ul_list = &channel->ul_list;
/* Fill the transfer descriptor with the uplink buffer info. */ /* Fill the transfer descriptor with the uplink buffer info. */
hpda_pending |= ipc_protocol_ul_td_send(ipc_imem->ipc_protocol, if (!ipc_imem_check_wwan_ips(channel)) {
hpda_ctrl_pending |=
ipc_protocol_ul_td_send(ipc_imem->ipc_protocol,
pipe, ul_list); pipe, ul_list);
} else {
/* forced HP update needed for non data channels */ hpda_pending |=
if (hpda_pending && !ipc_imem_check_wwan_ips(channel)) ipc_protocol_ul_td_send(ipc_imem->ipc_protocol,
forced_hpdu = true; pipe, ul_list);
}
} }
if (forced_hpdu) { /* forced HP update needed for non data channels */
if (hpda_ctrl_pending) {
hpda_pending = false; hpda_pending = false;
ipc_protocol_doorbell_trigger(ipc_imem->ipc_protocol, ipc_protocol_doorbell_trigger(ipc_imem->ipc_protocol,
IPC_HP_UL_WRITE_TD); IPC_HP_UL_WRITE_TD);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment