Skip to content

Commit 373f121

Browse files
mchetankumarkuba-moo
authored andcommitted
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: M Chetan Kumar <[email protected]> Reviewed-by: Sergey Ryazanov <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>
1 parent e8b1d76 commit 373f121

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

drivers/net/wwan/iosm/iosm_ipc_imem.c

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -181,9 +181,9 @@ void ipc_imem_hrtimer_stop(struct hrtimer *hr_timer)
181181
bool ipc_imem_ul_write_td(struct iosm_imem *ipc_imem)
182182
{
183183
struct ipc_mem_channel *channel;
184+
bool hpda_ctrl_pending = false;
184185
struct sk_buff_head *ul_list;
185186
bool hpda_pending = false;
186-
bool forced_hpdu = false;
187187
struct ipc_pipe *pipe;
188188
int i;
189189

@@ -200,15 +200,19 @@ bool ipc_imem_ul_write_td(struct iosm_imem *ipc_imem)
200200
ul_list = &channel->ul_list;
201201

202202
/* Fill the transfer descriptor with the uplink buffer info. */
203-
hpda_pending |= ipc_protocol_ul_td_send(ipc_imem->ipc_protocol,
203+
if (!ipc_imem_check_wwan_ips(channel)) {
204+
hpda_ctrl_pending |=
205+
ipc_protocol_ul_td_send(ipc_imem->ipc_protocol,
204206
pipe, ul_list);
205-
206-
/* forced HP update needed for non data channels */
207-
if (hpda_pending && !ipc_imem_check_wwan_ips(channel))
208-
forced_hpdu = true;
207+
} else {
208+
hpda_pending |=
209+
ipc_protocol_ul_td_send(ipc_imem->ipc_protocol,
210+
pipe, ul_list);
211+
}
209212
}
210213

211-
if (forced_hpdu) {
214+
/* forced HP update needed for non data channels */
215+
if (hpda_ctrl_pending) {
212216
hpda_pending = false;
213217
ipc_protocol_doorbell_trigger(ipc_imem->ipc_protocol,
214218
IPC_HP_UL_WRITE_TD);

0 commit comments

Comments
 (0)