Netdev List
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: somnath.kotur@emulex.com
Cc: netdev@vger.kernel.org, kalesh.purayil@emulex.com
Subject: Re: [PATCH net 2/2] be2net: Need a delay before processing CQE after 2nd mbox register write
Date: Fri, 10 Jan 2014 15:11:09 -0500 (EST)	[thread overview]
Message-ID: <20140110.151109.1275347758815420234.davem@davemloft.net> (raw)
In-Reply-To: <4b4fd4cb-9d23-4900-a20c-f2c2bef70849@CMEXHTCAS2.ad.emulex.com>

From: Somnath Kotur <somnath.kotur@emulex.com>
Date: Wed, 8 Jan 2014 14:52:02 +0530

> Due to Host platform synchronization issues between the mbox RDY bit polled
> status and the completion of the DMA for the CQE, it is preferable that the
> Host always wait for the RDY bit to transition to 1 after the 2nd mbox register
> write and always follow that with a short wait for the valid bit in the CQE,
> before processing the CQE.
> 
> Signed-off-by: Kalesh AP <kalesh.purayil@emulex.com>
> Signed-off-by: Somnath Kotur <somnath.kotur@emulex.com>
> ---
>  drivers/net/ethernet/emulex/benet/be_cmds.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/net/ethernet/emulex/benet/be_cmds.c b/drivers/net/ethernet/emulex/benet/be_cmds.c
> index 94c35c8..78560f2 100644
> --- a/drivers/net/ethernet/emulex/benet/be_cmds.c
> +++ b/drivers/net/ethernet/emulex/benet/be_cmds.c
> @@ -502,6 +502,9 @@ static int be_mbox_notify_wait(struct be_adapter *adapter)
>  	if (status != 0)
>  		return status;
>  
> +	/* Need a delay before processing CQE after 2nd mbox register write */
> +	udelay(1);
> +

Like others, I find his delay being used to fix the stated problem as questionable,
at best.

Either find a more appropriate way to fix this problem, or elaborate (in the commit
message), why this is really a suitable way to handle this.

  parent reply	other threads:[~2014-01-10 20:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-08  9:22 [PATCH net 2/2] be2net: Need a delay before processing CQE after 2nd mbox register write Somnath Kotur
2014-01-08  9:32 ` David Laight
2014-01-14  6:33   ` Somnath Kotur
2014-01-10 20:11 ` David Miller [this message]
2014-01-14  6:30   ` Somnath Kotur

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=20140110.151109.1275347758815420234.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=kalesh.purayil@emulex.com \
    --cc=netdev@vger.kernel.org \
    --cc=somnath.kotur@emulex.com \
    /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