lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1cbb02c8-ca3b-4de4-ae25-940bddd5469f@intel.com>
Date: Wed, 31 Jul 2024 14:50:18 +0200
From: Wojciech Drewek <wojciech.drewek@...el.com>
To: Tariq Toukan <tariqt@...dia.com>, "David S. Miller" <davem@...emloft.net>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, "Eric
 Dumazet" <edumazet@...gle.com>
CC: <netdev@...r.kernel.org>, Saeed Mahameed <saeedm@...dia.com>, Gal Pressman
	<gal@...dia.com>, Leon Romanovsky <leonro@...dia.com>, John Stultz
	<jstultz@...gle.com>, Thomas Gleixner <tglx@...utronix.de>, "Anna-Maria
 Behnsen" <anna-maria@...utronix.de>, Frederic Weisbecker
	<frederic@...nel.org>, <linux-kernel@...r.kernel.org>, Bjorn Helgaas
	<bhelgaas@...gle.com>, <linux-pci@...r.kernel.org>, Ingo Molnar
	<mingo@...hat.com>, Borislav Petkov <bp@...en8.de>, Dave Hansen
	<dave.hansen@...ux.intel.com>, <x86@...nel.org>, Carolina Jubran
	<cjubran@...dia.com>, Bar Shapira <bshapira@...dia.com>, Rahul Rameshbabu
	<rrameshbabu@...dia.com>
Subject: Re: [PATCH net-next V3 2/3] net/mlx5: Add support for enabling PTM
 PCI capability



On 30.07.2024 15:40, Tariq Toukan wrote:
> From: Carolina Jubran <cjubran@...dia.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@...dia.com>
> Signed-off-by: Tariq Toukan <tariqt@...dia.com>
> ---

Reviewed-by: Wojciech Drewek <wojciech.drewek@...el.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);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ