Skip to content

Commit d1ba526

Browse files
Elad Razdavem330
authored andcommitted
mlxsw: switchib: Introduce SwitchIB and SwitchIB silicon driver
SwitchIB and SwitchIB-2 are Infiniband switches with up to 36 ports. This driver initialize the hardware and Firmware which implements the IB management and connection with the SM. Signed-off-by: Elad Raz <eladr@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 64b92b0 commit d1ba526

File tree

5 files changed

+616
-0
lines changed

5 files changed

+616
-0
lines changed

drivers/net/ethernet/mellanox/mlxsw/Kconfig

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,17 @@ config MLXSW_PCI
2929
To compile this driver as a module, choose M here: the
3030
module will be called mlxsw_pci.
3131

32+
config MLXSW_SWITCHIB
33+
tristate "Mellanox Technologies SwitchIB and SwitchIB-2 support"
34+
depends on MLXSW_CORE && NET_SWITCHDEV
35+
default m
36+
---help---
37+
This driver supports Mellanox Technologies SwitchIB and SwitchIB-2
38+
Infiniband Switch ASICs.
39+
40+
To compile this driver as a module, choose M here: the
41+
module will be called mlxsw_switchib.
42+
3243
config MLXSW_SWITCHX2
3344
tristate "Mellanox Technologies SwitchX-2 support"
3445
depends on MLXSW_CORE && MLXSW_PCI && NET_SWITCHDEV

drivers/net/ethernet/mellanox/mlxsw/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ mlxsw_core-objs := core.o
33
mlxsw_core-$(CONFIG_MLXSW_CORE_HWMON) += core_hwmon.o
44
obj-$(CONFIG_MLXSW_PCI) += mlxsw_pci.o
55
mlxsw_pci-objs := pci.o
6+
obj-$(CONFIG_MLXSW_SWITCHIB) += mlxsw_switchib.o
7+
mlxsw_switchib-objs := switchib.o
68
obj-$(CONFIG_MLXSW_SWITCHX2) += mlxsw_switchx2.o
79
mlxsw_switchx2-objs := switchx2.o
810
obj-$(CONFIG_MLXSW_SPECTRUM) += mlxsw_spectrum.o

drivers/net/ethernet/mellanox/mlxsw/pci.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@
3939

4040
#define PCI_DEVICE_ID_MELLANOX_SWITCHX2 0xc738
4141
#define PCI_DEVICE_ID_MELLANOX_SPECTRUM 0xcb84
42+
#define PCI_DEVICE_ID_MELLANOX_SWITCHIB 0xcb20
43+
#define PCI_DEVICE_ID_MELLANOX_SWITCHIB2 0xcf08
4244

4345
#if IS_ENABLED(CONFIG_MLXSW_PCI)
4446

drivers/net/ethernet/mellanox/mlxsw/port.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@
5252
#define MLXSW_PORT_MAX_PHY_PORTS 0x40
5353
#define MLXSW_PORT_MAX_PORTS (MLXSW_PORT_MAX_PHY_PORTS + 1)
5454

55+
#define MLXSW_PORT_MAX_IB_PHY_PORTS 36
56+
#define MLXSW_PORT_MAX_IB_PORTS (MLXSW_PORT_MAX_IB_PHY_PORTS + 1)
57+
5558
#define MLXSW_PORT_DEVID_BITS_OFFSET 10
5659
#define MLXSW_PORT_PHY_BITS_OFFSET 4
5760
#define MLXSW_PORT_PHY_BITS_MASK (MLXSW_PORT_MAX_PHY_PORTS - 1)

0 commit comments

Comments
 (0)