[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f551f20b0649b4be3f4c9536e756986665366e46.1731005223.git.leonro@nvidia.com>
Date: Thu, 7 Nov 2024 20:56:57 +0200
From: Leon Romanovsky <leon@...nel.org>
To: Bjorn Helgaas <helgaas@...nel.org>
Cc: Leon Romanovsky <leonro@...dia.com>,
Krzysztof WilczyĆski <kw@...ux.com>,
linux-pci@...r.kernel.org,
"Ariel Almog" <ariela@...dia.com>,
"Aditya Prabhune" <aprabhune@...dia.com>,
"Hannes Reinecke" <hare@...e.de>,
"Heiner Kallweit" <hkallweit1@...il.com>,
"Arun Easi" <aeasi@...vell.com>,
"Jonathan Chocron" <jonnyc@...zon.com>,
"Bert Kenward" <bkenward@...arflare.com>,
"Matt Carlson" <mcarlson@...adcom.com>,
"Kai-Heng Feng" <kai.heng.feng@...onical.com>,
"Jean Delvare" <jdelvare@...e.de>,
"Alex Williamson" <alex.williamson@...hat.com>,
linux-kernel@...r.kernel.org,
netdev@...r.kernel.org
Subject: [PATCH v1 2/2] net/mlx5: Enable unprivileged read of PCI VPD file
From: Leon Romanovsky <leonro@...dia.com>
mlx5 devices are PCIe spec compliant, doesn't expose any sensitive
information Vital Product Data (VPD) section. In addition, these devices
are capable to provide an unprivileged read access file exposed by PCI core.
The parsed VPD section looks like this:
08:00.0 Ethernet controller: Mellanox Technologies MT2910 Family
[ConnectX-7]
...
Capabilities: [48] Vital Product Data
Product Name: NVIDIA ConnectX-7 HHHL adapter Card, 200GbE / NDR200 IB, Dual-port QSFP112, PCIe 5.0 x16 with x16 PCIe
extension option, Crypto, Secure Boot Capable
Read-only fields:
[PN] Part number: MCX713106AEHEA_QP1
[EC] Engineering changes: A5
[V2] Vendor specific: MCX713106AEHEA_QP1
[SN] Serial number: MT2314XZ0JUZ
[V3] Vendor specific: 0a5efb8958deed118000946dae7db798
[VA] Vendor specific: MLX:MN=MLNX:CSKU=V2:UUID=V3:PCI=V0:MODL=CX713106A
[V0] Vendor specific: PCIeGen5 x16
[VU] Vendor specific: MT2314XZ0JUZMLNXS0D0F0
[RV] Reserved: checksum good, 1 byte(s) reserved
End
Signed-off-by: Leon Romanovsky <leonro@...dia.com>
---
drivers/net/ethernet/mellanox/mlx5/core/main.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/main.c b/drivers/net/ethernet/mellanox/mlx5/core/main.c
index 220a9ac75c8b..7e34badd174b 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/main.c
@@ -2280,6 +2280,7 @@ static struct pci_driver mlx5_core_driver = {
.sriov_configure = mlx5_core_sriov_configure,
.sriov_get_vf_total_msix = mlx5_sriov_get_vf_total_msix,
.sriov_set_msix_vec_count = mlx5_core_sriov_set_msix_vec_count,
+ .downgrade_vpd_read = true,
};
/**
--
2.47.0
Powered by blists - more mailing lists