diff options
| author | Hadar Hen Zion <hadarh@mellanox.com> | 2013-12-19 14:20:12 -0500 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2013-12-19 19:04:43 -0500 |
| commit | 8e1a28e8e6797449dfdfa4739002d1e5939355a8 (patch) | |
| tree | 10bf6bb908f2a5e7632280eb0f362112c27cfc29 /include/linux/mlx4 | |
| parent | eb17711bc1d6611e934af5b6dabc225936084128 (diff) | |
net/mlx4_core: Expose physical port id as PF/VF capability
Add the infrastructure needed to support ndo_get_phys_port_id which
allows users to identify to which physical port a net-device is connected
to by reading a unique port id.
This will work for VFs and PFs.
The driver uses a new device capability - phys_port_id, The PF driver
reads the port phys_port_id from Firmware and stores it. The VF driver
reads the port phys_port_id from the PF using QUERY_FUNC_CAP command.
Signed-off-by: Hadar Hen Zion <hadarh@mellanox.com>
Signed-off-by: Amir Vadai <amirv@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/mlx4')
| -rw-r--r-- | include/linux/mlx4/device.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h index 7d3a523160ba..294b7c58fe95 100644 --- a/include/linux/mlx4/device.h +++ b/include/linux/mlx4/device.h | |||
| @@ -454,6 +454,7 @@ struct mlx4_caps { | |||
| 454 | u32 userspace_caps; /* userspace must be aware of these */ | 454 | u32 userspace_caps; /* userspace must be aware of these */ |
| 455 | u32 function_caps; /* VFs must be aware of these */ | 455 | u32 function_caps; /* VFs must be aware of these */ |
| 456 | u16 hca_core_clock; | 456 | u16 hca_core_clock; |
| 457 | u64 phys_port_id[MLX4_MAX_PORTS + 1]; | ||
| 457 | }; | 458 | }; |
| 458 | 459 | ||
| 459 | struct mlx4_buf_list { | 460 | struct mlx4_buf_list { |
| @@ -1113,6 +1114,7 @@ int mlx4_assign_eq(struct mlx4_dev *dev, char *name, struct cpu_rmap *rmap, | |||
| 1113 | int *vector); | 1114 | int *vector); |
| 1114 | void mlx4_release_eq(struct mlx4_dev *dev, int vec); | 1115 | void mlx4_release_eq(struct mlx4_dev *dev, int vec); |
| 1115 | 1116 | ||
| 1117 | int mlx4_get_phys_port_id(struct mlx4_dev *dev); | ||
| 1116 | int mlx4_wol_read(struct mlx4_dev *dev, u64 *config, int port); | 1118 | int mlx4_wol_read(struct mlx4_dev *dev, u64 *config, int port); |
| 1117 | int mlx4_wol_write(struct mlx4_dev *dev, u64 config, int port); | 1119 | int mlx4_wol_write(struct mlx4_dev *dev, u64 config, int port); |
| 1118 | 1120 | ||
