net/mlx5: Add Vendor Specific Capability access gateway
authorAlex Vesker <valex@mellanox.com>
Thu, 28 Jun 2018 12:05:58 +0000 (15:05 +0300)
committerSaeed Mahameed <saeedm@mellanox.com>
Thu, 13 Jun 2019 20:23:17 +0000 (13:23 -0700)
commitb25bbc2f24dcab9cd186ef4003c39bf51ad0454c
tree52c2fce61d25929e74c966605147f88a8e23d3e1
parent1f28d7768f1d181249318a0f61949d4cb412e8c4
net/mlx5: Add Vendor Specific Capability access gateway

The Vendor Specific Capability (VSC) is used to activate a gateway
interfacing with the device. The gateway is used to read or write
device configurations, which are organized in different domains (spaces).
A configuration access may result in multiple actions, reads, writes.

Example usages are accessing the Crspace domain to read the crspace or
locking a device semaphore using the Semaphore domain.

The configuration access use pci_cfg_access to prevent parallel access to
the VSC space by the driver and userspace calls.

Signed-off-by: Alex Vesker <valex@mellanox.com>
Signed-off-by: Feras Daoud <ferasda@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/Makefile
drivers/net/ethernet/mellanox/mlx5/core/lib/pci_vsc.c [new file with mode: 0644]
drivers/net/ethernet/mellanox/mlx5/core/lib/pci_vsc.h [new file with mode: 0644]
drivers/net/ethernet/mellanox/mlx5/core/main.c
include/linux/mlx5/driver.h