Merge "msm: ipa: fix division by 0 for DMA pipes"
This commit is contained in:
commit
8592867f6f
1 changed files with 10 additions and 4 deletions
|
@ -1165,8 +1165,11 @@ void ipa_update_repl_threshold(enum ipa_client_type ipa_client)
|
|||
* Determine how many buffers/descriptors remaining will
|
||||
* cause to drop below the yellow WM bar.
|
||||
*/
|
||||
ep->rx_replenish_threshold = ipa_get_sys_yellow_wm(ep->sys)
|
||||
/ ep->sys->rx_buff_sz;
|
||||
if (ep->sys->rx_buff_sz)
|
||||
ep->rx_replenish_threshold = ipa_get_sys_yellow_wm(ep->sys)
|
||||
/ ep->sys->rx_buff_sz;
|
||||
else
|
||||
ep->rx_replenish_threshold = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1361,8 +1364,11 @@ int ipa2_setup_sys_pipe(struct ipa_sys_connect_params *sys_in, u32 *clnt_hdl)
|
|||
* Determine how many buffers/descriptors remaining will
|
||||
* cause to drop below the yellow WM bar.
|
||||
*/
|
||||
ep->rx_replenish_threshold = ipa_get_sys_yellow_wm(ep->sys)
|
||||
/ ep->sys->rx_buff_sz;
|
||||
if (ep->sys->rx_buff_sz)
|
||||
ep->rx_replenish_threshold =
|
||||
ipa_get_sys_yellow_wm(ep->sys) / ep->sys->rx_buff_sz;
|
||||
else
|
||||
ep->rx_replenish_threshold = 0;
|
||||
/* Only when the WAN pipes are setup, actual threshold will
|
||||
* be read from the register. So update LAN_CONS ep again with
|
||||
* right value.
|
||||
|
|
Loading…
Add table
Reference in a new issue