From: David Miller <davem@davemloft.net>
To: Tomer.Tayar@cavium.com
Cc: netdev@vger.kernel.org, Ariel.Elior@cavium.com
Subject: Re: [PATCH net 1/4] qed: Wait for ready indication before rereading the shmem
Date: Sun, 19 Aug 2018 11:10:53 -0700 (PDT) [thread overview]
Message-ID: <20180819.111053.432633844805546559.davem@davemloft.net> (raw)
In-Reply-To: <1534701487-25778-2-git-send-email-Tomer.Tayar@cavium.com>
From: Tomer Tayar <Tomer.Tayar@cavium.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.
next prev parent reply other threads:[~2018-08-19 21:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-19 17:58 [PATCH net 0/4] qed: Misc fixes in the interface with the MFW Tomer Tayar
2018-08-19 17:58 ` [PATCH net 1/4] qed: Wait for ready indication before rereading the shmem Tomer Tayar
2018-08-19 18:10 ` David Miller [this message]
2018-08-19 17:58 ` [PATCH net 2/4] qed: Wait for MCP halt and resume commands to take place Tomer Tayar
2018-08-19 17:58 ` [PATCH net 3/4] qed: Prevent a possible deadlock during driver load and unload Tomer Tayar
2018-08-19 17:58 ` [PATCH net 4/4] qed: Avoid sending mailbox commands when MFW is not responsive Tomer Tayar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180819.111053.432633844805546559.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=Ariel.Elior@cavium.com \
--cc=Tomer.Tayar@cavium.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox