public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Wojciech Drewek <wojciech.drewek@intel.com>
To: Tariq Toukan <tariqt@nvidia.com>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	"Eric Dumazet" <edumazet@google.com>
Cc: <netdev@vger.kernel.org>, Saeed Mahameed <saeedm@nvidia.com>,
	Gal Pressman <gal@nvidia.com>,
	Leon Romanovsky <leonro@nvidia.com>,
	John Stultz <jstultz@google.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	"Anna-Maria Behnsen" <anna-maria@linutronix.de>,
	Frederic Weisbecker <frederic@kernel.org>,
	<linux-kernel@vger.kernel.org>,
	Bjorn Helgaas <bhelgaas@google.com>, <linux-pci@vger.kernel.org>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>, <x86@kernel.org>,
	Carolina Jubran <cjubran@nvidia.com>,
	Bar Shapira <bshapira@nvidia.com>,
	Rahul Rameshbabu <rrameshbabu@nvidia.com>
Subject: Re: [PATCH net-next V3 2/3] net/mlx5: Add support for enabling PTM PCI capability
Date: Wed, 31 Jul 2024 14:50:18 +0200	[thread overview]
Message-ID: <1cbb02c8-ca3b-4de4-ae25-940bddd5469f@intel.com> (raw)
In-Reply-To: <20240730134055.1835261-3-tariqt@nvidia.com>



On 30.07.2024 15:40, Tariq Toukan wrote:
> From: Carolina Jubran <cjubran@nvidia.com>
> 
> Since the kernel doesn't support enabling Precision Time Measurement
> for an endpoint device, enable the PTM PCI capability in the driver.
> 
> Signed-off-by: Carolina Jubran <cjubran@nvidia.com>
> Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
> ---

Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com>

>  drivers/net/ethernet/mellanox/mlx5/core/main.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/main.c b/drivers/net/ethernet/mellanox/mlx5/core/main.c
> index 527da58c7953..780078bd5b8c 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/main.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/main.c
> @@ -923,6 +923,11 @@ static int mlx5_pci_init(struct mlx5_core_dev *dev, struct pci_dev *pdev,
>  	}
>  
>  	mlx5_pci_vsc_init(dev);
> +
> +	err = pci_enable_ptm(pdev, NULL);
> +	if (err)
> +		mlx5_core_info(dev, "PTM is not supported by PCIe\n");
> +
>  	return 0;
>  
>  err_clr_master:
> @@ -939,6 +944,7 @@ static void mlx5_pci_close(struct mlx5_core_dev *dev)
>  	 * before removing the pci bars
>  	 */
>  	mlx5_drain_health_wq(dev);
> +	pci_disable_ptm(dev->pdev);
>  	iounmap(dev->iseg);
>  	release_bar(dev->pdev);
>  	mlx5_pci_disable_device(dev);

  reply	other threads:[~2024-07-31 12:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-30 13:40 [PATCH net-next V3 0/3] mlx5 PTM cross timestamping support Tariq Toukan
2024-07-30 13:40 ` [PATCH net-next V3 1/3] net/mlx5: Add support for MTPTM and MTCTR registers Tariq Toukan
2024-07-31 12:47   ` Wojciech Drewek
2024-07-30 13:40 ` [PATCH net-next V3 2/3] net/mlx5: Add support for enabling PTM PCI capability Tariq Toukan
2024-07-31 12:50   ` Wojciech Drewek [this message]
2024-07-30 13:40 ` [PATCH net-next V3 3/3] net/mlx5: Implement PTM cross timestamping support Tariq Toukan
2024-07-31 12:59   ` Wojciech Drewek
2024-07-31 13:26 ` [PATCH net-next V3 0/3] mlx5 " Vadim Fedorenko
2024-08-05 23:54 ` patchwork-bot+netdevbpf

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=1cbb02c8-ca3b-4de4-ae25-940bddd5469f@intel.com \
    --to=wojciech.drewek@intel.com \
    --cc=anna-maria@linutronix.de \
    --cc=bhelgaas@google.com \
    --cc=bp@alien8.de \
    --cc=bshapira@nvidia.com \
    --cc=cjubran@nvidia.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=frederic@kernel.org \
    --cc=gal@nvidia.com \
    --cc=jstultz@google.com \
    --cc=kuba@kernel.org \
    --cc=leonro@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=rrameshbabu@nvidia.com \
    --cc=saeedm@nvidia.com \
    --cc=tariqt@nvidia.com \
    --cc=tglx@linutronix.de \
    --cc=x86@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