diff options
author | Jack Morgenstein <jackm@dev.mellanox.co.il> | 2012-06-19 04:21:41 -0400 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2012-07-10 12:57:06 -0400 |
commit | 2aca1172c2f5b27fbc37297574f716c1c15f4153 (patch) | |
tree | 8f6eb799bb0fa1c172ea45773d9d1c41ca934c87 /include/linux/mlx4 | |
parent | 00f5ce99dc6ee46c3113393cc8fa12173f9bbcd7 (diff) |
net/mlx4_core: Initialize IB port capabilities for all slaves
With IB SR-IOV, each slave has its own separate copy of the port
capabilities flags. For example, the master can run a subnet manager
(which causes the IsSM bit to be set in the master's port
capabilities) without affecting the port capabilities seen by the
slaves (the IsSM bit will be seen as cleared in the slaves).
Also add a static inline mlx4_master_func_num() to enhance readability
of the code.
Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'include/linux/mlx4')
-rw-r--r-- | include/linux/mlx4/device.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h index 560b2201519f..7fbdc89de495 100644 --- a/include/linux/mlx4/device.h +++ b/include/linux/mlx4/device.h | |||
@@ -633,6 +633,11 @@ struct mlx4_init_port_param { | |||
633 | 633 | ||
634 | void handle_port_mgmt_change_event(struct work_struct *work); | 634 | void handle_port_mgmt_change_event(struct work_struct *work); |
635 | 635 | ||
636 | static inline int mlx4_master_func_num(struct mlx4_dev *dev) | ||
637 | { | ||
638 | return dev->caps.function; | ||
639 | } | ||
640 | |||
636 | static inline int mlx4_is_master(struct mlx4_dev *dev) | 641 | static inline int mlx4_is_master(struct mlx4_dev *dev) |
637 | { | 642 | { |
638 | return dev->flags & MLX4_FLAG_MASTER; | 643 | return dev->flags & MLX4_FLAG_MASTER; |