soc: qcom: implement notify_tx_abort() callback
During subsystem restart, glink calls notify_tx_abort() API instead of notify_tx_done() to inform that TX buffer can be freed. Implement notify_tx_abort() to free TX buffer during subsystem restart. Change-Id: I164e4e2775c662821757151a4f2bb21a8c3fc37e Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
This commit is contained in:
parent
758693b4a6
commit
2e16e3b6d0
1 changed files with 19 additions and 0 deletions
|
@ -184,6 +184,24 @@ static void wdsp_glink_notify_tx_done(void *handle, const void *priv,
|
|||
kfree(pkt_priv);
|
||||
}
|
||||
|
||||
/*
|
||||
* wdsp_glink_notify_tx_abort - Glink notify tx abort callback to
|
||||
* free tx buffer
|
||||
* handle: Opaque Channel handle returned by GLink
|
||||
* priv: Private pointer to the channel
|
||||
* pkt_priv: Private pointer to the packet
|
||||
*/
|
||||
static void wdsp_glink_notify_tx_abort(void *handle, const void *priv,
|
||||
const void *pkt_priv)
|
||||
{
|
||||
if (!pkt_priv) {
|
||||
pr_err("%s: Invalid parameter\n", __func__);
|
||||
return;
|
||||
}
|
||||
/* Free tx pkt */
|
||||
kfree(pkt_priv);
|
||||
}
|
||||
|
||||
/*
|
||||
* wdsp_glink_notify_rx_intent_req - Glink notify rx intent request callback
|
||||
* to queue buffer to receive from remote client
|
||||
|
@ -382,6 +400,7 @@ static int wdsp_glink_open_ch(struct wdsp_glink_ch *ch)
|
|||
open_cfg.edge = WDSP_EDGE;
|
||||
open_cfg.notify_rx = wdsp_glink_notify_rx;
|
||||
open_cfg.notify_tx_done = wdsp_glink_notify_tx_done;
|
||||
open_cfg.notify_tx_abort = wdsp_glink_notify_tx_abort;
|
||||
open_cfg.notify_state = wdsp_glink_notify_state;
|
||||
open_cfg.notify_rx_intent_req = wdsp_glink_notify_rx_intent_req;
|
||||
open_cfg.priv = ch;
|
||||
|
|
Loading…
Add table
Reference in a new issue