All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] net/mlx4: Use Kconfig flag to remove support of old gen2 Mellanox devices
@ 2017-11-10  7:10 Tariq Toukan
  2017-11-13  1:27 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Tariq Toukan @ 2017-11-10  7:10 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev, Eran Ben Elisha, Slava Shwartsman, Tariq Toukan

From: Slava Shwartsman <slavash@mellanox.com>

Since Mellanox focus is on newer adapters, we would like to have the
ability to disable the support for old gen2 adapters.

This can be done by turning off the MLX4_CORE_GEN2 Kconfig flag.
We keep it turned on by default.

Signed-off-by: Slava Shwartsman <slavash@mellanox.com>
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
---
 drivers/net/ethernet/mellanox/mlx4/Kconfig | 8 ++++++++
 drivers/net/ethernet/mellanox/mlx4/main.c  | 2 ++
 2 files changed, 10 insertions(+)

diff --git a/drivers/net/ethernet/mellanox/mlx4/Kconfig b/drivers/net/ethernet/mellanox/mlx4/Kconfig
index 22b1cc012bc9..36054e6fb9d3 100644
--- a/drivers/net/ethernet/mellanox/mlx4/Kconfig
+++ b/drivers/net/ethernet/mellanox/mlx4/Kconfig
@@ -38,3 +38,11 @@ config MLX4_DEBUG
 	  mlx4_core driver.  The output can be turned on via the
 	  debug_level module parameter (which can also be set after
 	  the driver is loaded through sysfs).
+
+config MLX4_CORE_GEN2
+	bool "Support for old gen2 Mellanox PCI IDs" if (MLX4_CORE)
+	depends on MLX4_CORE
+	default y
+	---help---
+	  Say Y here if you want to use old gen2 Mellanox devices in the
+	  driver.
diff --git a/drivers/net/ethernet/mellanox/mlx4/main.c b/drivers/net/ethernet/mellanox/mlx4/main.c
index e61c99ef741d..4d84cab77105 100644
--- a/drivers/net/ethernet/mellanox/mlx4/main.c
+++ b/drivers/net/ethernet/mellanox/mlx4/main.c
@@ -4066,6 +4066,7 @@ int mlx4_restart_one(struct pci_dev *pdev)
 #define MLX_GN(id) { PCI_VDEVICE(MELLANOX, id), 0 }
 
 static const struct pci_device_id mlx4_pci_table[] = {
+#ifdef CONFIG_MLX4_CORE_GEN2
 	/* MT25408 "Hermon" */
 	MLX_SP(PCI_DEVICE_ID_MELLANOX_HERMON_SDR),	/* SDR */
 	MLX_SP(PCI_DEVICE_ID_MELLANOX_HERMON_DDR),	/* DDR */
@@ -4085,6 +4086,7 @@ int mlx4_restart_one(struct pci_dev *pdev)
 	MLX_SP(PCI_DEVICE_ID_MELLANOX_CONNECTX2),
 	/* MT25400 Family [ConnectX-2] */
 	MLX_VF(0x1002),					/* Virtual Function */
+#endif /* CONFIG_MLX4_CORE_GEN2 */
 	/* MT27500 Family [ConnectX-3] */
 	MLX_GN(PCI_DEVICE_ID_MELLANOX_CONNECTX3),
 	MLX_VF(0x1004),					/* Virtual Function */
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net-next] net/mlx4: Use Kconfig flag to remove support of old gen2 Mellanox devices
  2017-11-10  7:10 [PATCH net-next] net/mlx4: Use Kconfig flag to remove support of old gen2 Mellanox devices Tariq Toukan
@ 2017-11-13  1:27 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2017-11-13  1:27 UTC (permalink / raw)
  To: tariqt; +Cc: netdev, eranbe, slavash

From: Tariq Toukan <tariqt@mellanox.com>
Date: Fri, 10 Nov 2017 09:10:29 +0200

> From: Slava Shwartsman <slavash@mellanox.com>
> 
> Since Mellanox focus is on newer adapters, we would like to have the
> ability to disable the support for old gen2 adapters.
> 
> This can be done by turning off the MLX4_CORE_GEN2 Kconfig flag.
> We keep it turned on by default.
> 
> Signed-off-by: Slava Shwartsman <slavash@mellanox.com>
> Signed-off-by: Tariq Toukan <tariqt@mellanox.com>

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-11-13  1:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-10  7:10 [PATCH net-next] net/mlx4: Use Kconfig flag to remove support of old gen2 Mellanox devices Tariq Toukan
2017-11-13  1:27 ` David Miller

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.