[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20180819.111053.432633844805546559.davem@davemloft.net>
Date: Sun, 19 Aug 2018 11:10:53 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: Tomer.Tayar@...ium.com
Cc: netdev@...r.kernel.org, Ariel.Elior@...ium.com
Subject: Re: [PATCH net 1/4] qed: Wait for ready indication before
rereading the shmem
From: Tomer Tayar <Tomer.Tayar@...ium.com>
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.
Powered by blists - more mailing lists