diff options
author | Jack Morgenstein <jackm@dev.mellanox.co.il> | 2012-06-19 04:21:33 -0400 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2012-07-08 21:05:05 -0400 |
commit | 752a50cab600c6d46c5a1921c6a6d2fb116c8a4b (patch) | |
tree | b6b4fac3ff771523c737eeb0ad922903977b2ec8 /include/linux/mlx4 | |
parent | 6887a4131da3adaab011613776d865f4bcfb5678 (diff) |
mlx4_core: Pass an invalid PCI id number to VFs
Currently, VFs have 0 in their dev->caps.function field. This is a
valid pci id (usually of the PF). Instead, pass an invalid PCI id to
the VF via QUERY_FW, so that if the value gets accessed in the VF
driver, we'll catch the problem.
Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <roland@purestorage.com>
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 6a8f002b8ed3..8eadf0f14cc5 100644 --- a/include/linux/mlx4/device.h +++ b/include/linux/mlx4/device.h | |||
@@ -534,6 +534,8 @@ struct mlx4_init_port_param { | |||
534 | if (((dev)->caps.port_mask[port] == MLX4_PORT_TYPE_IB) || \ | 534 | if (((dev)->caps.port_mask[port] == MLX4_PORT_TYPE_IB) || \ |
535 | ((dev)->caps.flags & MLX4_DEV_CAP_FLAG_IBOE)) | 535 | ((dev)->caps.flags & MLX4_DEV_CAP_FLAG_IBOE)) |
536 | 536 | ||
537 | #define MLX4_INVALID_SLAVE_ID 0xFF | ||
538 | |||
537 | static inline int mlx4_is_master(struct mlx4_dev *dev) | 539 | static inline int mlx4_is_master(struct mlx4_dev *dev) |
538 | { | 540 | { |
539 | return dev->flags & MLX4_FLAG_MASTER; | 541 | return dev->flags & MLX4_FLAG_MASTER; |