From: Tomer Tayar <[email protected]> Date: Sun, 19 Aug 2018 20:58:04 +0300
> + while (!p_info->mfw_mb_length && cnt--) {
> + msleep(msec);
> + p_info->mfw_mb_length =
> + (u16)qed_rd(p_hwfn, p_ptt,
> + p_info->mfw_mb_addr +
> + offsetof(struct public_mfw_mb, sup_msgs));
> + }
> +
> + if (!cnt) {
Because you use postdecrement on 'cnt', the loop will timeout with
'cnt' equal to '-1' not zero.
You need to fix this.
