]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: switchx2: Add IB port support
authorElad Raz <eladr@mellanox.com>
Fri, 28 Oct 2016 19:36:00 +0000 (21:36 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sun, 30 Oct 2016 20:50:17 +0000 (16:50 -0400)
commit03d935e5dda290457057f95d85b9ce2ccc56ea7d
treeb0d15348926598e9cf27e47f835809b11dddbdec
parent23a58cc624882c04e9d644c044baf753f853f0b6
mlxsw: switchx2: Add IB port support

SwitchX-2 is IB capable device. This patch add a support to change the
port type between Ethernet and Infiniband.

When the port is set to IB, the FW implements the Subnet Management Agent
(SMA) manage the port. All port attributes can be control remotely by
the SM.

Usage:
$ devlink port show
pci/0000:03:00.0/1: type eth netdev eth0
pci/0000:03:00.0/3: type eth netdev eth1
pci/0000:03:00.0/5: type eth netdev eth2
pci/0000:03:00.0/6: type eth netdev eth3
pci/0000:03:00.0/8: type eth netdev eth4

$ devlink port set pci/0000:03:00.0/1 type ib

$ devlink port show
pci/0000:03:00.0/1: type ib

Signed-off-by: Elad Raz <eladr@mellanox.com>
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/ib.h [new file with mode: 0644]
drivers/net/ethernet/mellanox/mlxsw/switchx2.c