All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Poirier <benjamin.poirier@gmail.com>
To: David Thompson <davthompson@nvidia.com>
Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com, andriy.shevchenko@linux.intel.com,
	u.kleine-koenig@pengutronix.de, asmaa@nvidia.com,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net v1] mlxbf_gige: disable port during stop()
Date: Mon, 19 Aug 2024 14:55:12 -0400	[thread overview]
Message-ID: <ZsOVEMvzAXfaRiEY@f4> (raw)
In-Reply-To: <20240816204808.30359-1-davthompson@nvidia.com>

On 2024-08-16 16:48 -0400, David Thompson wrote:
> The mlxbf_gige_open() routine initializes and enables the
> Gigabit Ethernet port from a hardware point of view. The
> mlxbf_gige_stop() routine must disable the port hardware
> to fully quiesce it.
> 
> Fixes: f92e1869d74e ("Add Mellanox BlueField Gigabit Ethernet driver")
> Reviewed-by: Asmaa Mnebhi <asmaa@nvidia.com>
> Signed-off-by: David Thompson <davthompson@nvidia.com>
> ---
>  drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c b/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c
> index 385a56ac7348..12942a50e1bb 100644
> --- a/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c
> +++ b/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c
> @@ -205,8 +205,14 @@ static int mlxbf_gige_open(struct net_device *netdev)
>  static int mlxbf_gige_stop(struct net_device *netdev)
>  {
>  	struct mlxbf_gige *priv = netdev_priv(netdev);
> +	u64 control;
> +
> +	control = readq(priv->base + MLXBF_GIGE_CONTROL);
> +	control &= ~MLXBF_GIGE_CONTROL_PORT_EN;
> +	writeq(control, priv->base + MLXBF_GIGE_CONTROL);
>  
>  	writeq(0, priv->base + MLXBF_GIGE_INT_EN);
> +	mb();

checkpatch says:
WARNING: memory barrier without comment
#37: FILE: drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c:215:
+       mb();

Is this memory barrier paired with another one?

  reply	other threads:[~2024-08-19 18:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-16 20:48 [PATCH net v1] mlxbf_gige: disable port during stop() David Thompson
2024-08-19 18:55 ` Benjamin Poirier [this message]
2024-08-20  0:47   ` Jakub Kicinski
2024-08-28 21:37     ` David Thompson
2024-08-28 22:55       ` Jakub Kicinski

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=ZsOVEMvzAXfaRiEY@f4 \
    --to=benjamin.poirier@gmail.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=asmaa@nvidia.com \
    --cc=davem@davemloft.net \
    --cc=davthompson@nvidia.com \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=u.kleine-koenig@pengutronix.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.