mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paolo Abeni <pabeni@redhat.com>
To: Subbaraya Sundeep <sbhatta@marvell.com>,
	netdev@vger.kernel.org,  linux-kernel@vger.kernel.org
Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	 sgoutham@marvell.com, lcherian@marvell.com, gakula@marvell.com,
	hkelam@marvell.com,  naveenm@marvell.com, horms@kernel.org
Subject: Re: [net PATCH 1/5] octeontx2: Detect the mbox up or down message via register
Date: Tue, 12 Mar 2024 12:22:27 +0100	[thread overview]
Message-ID: <570d5e37b84d5e2907e4b195d6c6df8c5e6c8830.camel@redhat.com> (raw)
In-Reply-To: <1710184612-29027-2-git-send-email-sbhatta@marvell.com>

On Tue, 2024-03-12 at 00:46 +0530, Subbaraya Sundeep wrote:
> +bool otx2_mbox_wait_for_zero(struct otx2_mbox *mbox, int devid)
> +{
> +	u64 data;
> +
> +	data = readq((void __iomem *)mbox->reg_base +
> +		     (mbox->trigger | (devid << mbox->tr_shift)));
> +
> +	/* If data is non-zero wait for ~1ms and return to caller
> +	 * whether data has changed to zero or not after the wait.
> +	 */
> +
> +	if (data)
> +		usleep_range(950, 1000);
> +	else
> +		return true;

Since you have to repost,

	if (!data)
		return true;

	usleep_range(950, 1000);


will be more readable


Side note: this quite huge for a 'net' patch: it would be nice (but not
mandatory) if you could break it in smaller pieces or consider a 'net-
next' target. In the latter case, please note that 'net-next' is
currently closed for the merge window.

Cheers,

Paolo


  parent reply	other threads:[~2024-03-12 11:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-11 19:16 [net PATCH 0/5] octeontx2-pf: RVU Mailbox fixes Subbaraya Sundeep
2024-03-11 19:16 ` [net PATCH 1/5] octeontx2: Detect the mbox up or down message via register Subbaraya Sundeep
2024-03-11 22:58   ` Jakub Kicinski
2024-03-12 11:22   ` Paolo Abeni [this message]
2024-03-12 11:49     ` [EXTERNAL] " Subbaraya Sundeep Bhatta
2024-03-11 19:16 ` [net PATCH 2/5] octeontx2-pf: Wait till detach_resources msg is complete Subbaraya Sundeep
2024-03-11 19:16 ` [net PATCH 3/5] octeontx2-pf: Use default max_active works instead of one Subbaraya Sundeep
2024-03-11 19:16 ` [net PATCH 4/5] octeontx2-pf: Send UP messages to VF only when VF is up Subbaraya Sundeep
2024-03-11 19:16 ` [net PATCH 5/5] octeontx2-af: Use separate handlers for interrupts Subbaraya Sundeep

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=570d5e37b84d5e2907e4b195d6c6df8c5e6c8830.camel@redhat.com \
    --to=pabeni@redhat.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gakula@marvell.com \
    --cc=hkelam@marvell.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=lcherian@marvell.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=naveenm@marvell.com \
    --cc=netdev@vger.kernel.org \
    --cc=sbhatta@marvell.com \
    --cc=sgoutham@marvell.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

all inboxes | Powered by JetHome®