aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mlx4
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/mlx4')
-rw-r--r--include/linux/mlx4/cmd.h6
-rw-r--r--include/linux/mlx4/cq.h16
-rw-r--r--include/linux/mlx4/device.h13
3 files changed, 33 insertions, 2 deletions
diff --git a/include/linux/mlx4/cmd.h b/include/linux/mlx4/cmd.h
index 260695186256..adf6e0648f20 100644
--- a/include/linux/mlx4/cmd.h
+++ b/include/linux/mlx4/cmd.h
@@ -34,6 +34,7 @@
34#define MLX4_CMD_H 34#define MLX4_CMD_H
35 35
36#include <linux/dma-mapping.h> 36#include <linux/dma-mapping.h>
37#include <linux/if_link.h>
37 38
38enum { 39enum {
39 /* initialization and general commands */ 40 /* initialization and general commands */
@@ -232,6 +233,11 @@ struct mlx4_cmd_mailbox *mlx4_alloc_cmd_mailbox(struct mlx4_dev *dev);
232void mlx4_free_cmd_mailbox(struct mlx4_dev *dev, struct mlx4_cmd_mailbox *mailbox); 233void mlx4_free_cmd_mailbox(struct mlx4_dev *dev, struct mlx4_cmd_mailbox *mailbox);
233 234
234u32 mlx4_comm_get_version(void); 235u32 mlx4_comm_get_version(void);
236int mlx4_set_vf_mac(struct mlx4_dev *dev, int port, int vf, u64 mac);
237int mlx4_set_vf_vlan(struct mlx4_dev *dev, int port, int vf, u16 vlan, u8 qos);
238int mlx4_set_vf_spoofchk(struct mlx4_dev *dev, int port, int vf, bool setting);
239int mlx4_get_vf_config(struct mlx4_dev *dev, int port, int vf, struct ifla_vf_info *ivf);
240
235 241
236#define MLX4_COMM_GET_IF_REV(cmd_chan_ver) (u8)((cmd_chan_ver) >> 8) 242#define MLX4_COMM_GET_IF_REV(cmd_chan_ver) (u8)((cmd_chan_ver) >> 8)
237 243
diff --git a/include/linux/mlx4/cq.h b/include/linux/mlx4/cq.h
index 6f65b2c8bb89..98fa492cf406 100644
--- a/include/linux/mlx4/cq.h
+++ b/include/linux/mlx4/cq.h
@@ -64,6 +64,22 @@ struct mlx4_err_cqe {
64 u8 owner_sr_opcode; 64 u8 owner_sr_opcode;
65}; 65};
66 66
67struct mlx4_ts_cqe {
68 __be32 vlan_my_qpn;
69 __be32 immed_rss_invalid;
70 __be32 g_mlpath_rqpn;
71 __be32 timestamp_hi;
72 __be16 status;
73 u8 ipv6_ext_mask;
74 u8 badfcs_enc;
75 __be32 byte_cnt;
76 __be16 wqe_index;
77 __be16 checksum;
78 u8 reserved;
79 __be16 timestamp_lo;
80 u8 owner_sr_opcode;
81} __packed;
82
67enum { 83enum {
68 MLX4_CQE_VLAN_PRESENT_MASK = 1 << 29, 84 MLX4_CQE_VLAN_PRESENT_MASK = 1 << 29,
69 MLX4_CQE_QPN_MASK = 0xffffff, 85 MLX4_CQE_QPN_MASK = 0xffffff,
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h
index 811f91cf5e8c..53acaf64189f 100644
--- a/include/linux/mlx4/device.h
+++ b/include/linux/mlx4/device.h
@@ -40,6 +40,8 @@
40 40
41#include <linux/atomic.h> 41#include <linux/atomic.h>
42 42
43#include <linux/clocksource.h>
44
43#define MAX_MSIX_P_PORT 17 45#define MAX_MSIX_P_PORT 17
44#define MAX_MSIX 64 46#define MAX_MSIX 64
45#define MSIX_LEGACY_SZ 4 47#define MSIX_LEGACY_SZ 4
@@ -140,6 +142,7 @@ enum {
140 MLX4_DEV_CAP_FLAG_VEP_UC_STEER = 1LL << 41, 142 MLX4_DEV_CAP_FLAG_VEP_UC_STEER = 1LL << 41,
141 MLX4_DEV_CAP_FLAG_VEP_MC_STEER = 1LL << 42, 143 MLX4_DEV_CAP_FLAG_VEP_MC_STEER = 1LL << 42,
142 MLX4_DEV_CAP_FLAG_COUNTERS = 1LL << 48, 144 MLX4_DEV_CAP_FLAG_COUNTERS = 1LL << 48,
145 MLX4_DEV_CAP_FLAG_SET_ETH_SCHED = 1LL << 53,
143 MLX4_DEV_CAP_FLAG_SENSE_SUPPORT = 1LL << 55, 146 MLX4_DEV_CAP_FLAG_SENSE_SUPPORT = 1LL << 55,
144 MLX4_DEV_CAP_FLAG_PORT_MNG_CHG_EV = 1LL << 59, 147 MLX4_DEV_CAP_FLAG_PORT_MNG_CHG_EV = 1LL << 59,
145 MLX4_DEV_CAP_FLAG_64B_EQE = 1LL << 61, 148 MLX4_DEV_CAP_FLAG_64B_EQE = 1LL << 61,
@@ -151,7 +154,10 @@ enum {
151 MLX4_DEV_CAP_FLAG2_RSS_TOP = 1LL << 1, 154 MLX4_DEV_CAP_FLAG2_RSS_TOP = 1LL << 1,
152 MLX4_DEV_CAP_FLAG2_RSS_XOR = 1LL << 2, 155 MLX4_DEV_CAP_FLAG2_RSS_XOR = 1LL << 2,
153 MLX4_DEV_CAP_FLAG2_FS_EN = 1LL << 3, 156 MLX4_DEV_CAP_FLAG2_FS_EN = 1LL << 3,
154 MLX4_DEV_CAP_FLAGS2_REASSIGN_MAC_EN = 1LL << 4 157 MLX4_DEV_CAP_FLAGS2_REASSIGN_MAC_EN = 1LL << 4,
158 MLX4_DEV_CAP_FLAG2_TS = 1LL << 5,
159 MLX4_DEV_CAP_FLAG2_VLAN_CONTROL = 1LL << 6,
160 MLX4_DEV_CAP_FLAG2_FSM = 1LL << 7
155}; 161};
156 162
157enum { 163enum {
@@ -443,6 +449,7 @@ struct mlx4_caps {
443 u8 eqe_factor; 449 u8 eqe_factor;
444 u32 userspace_caps; /* userspace must be aware of these */ 450 u32 userspace_caps; /* userspace must be aware of these */
445 u32 function_caps; /* VFs must be aware of these */ 451 u32 function_caps; /* VFs must be aware of these */
452 u16 hca_core_clock;
446}; 453};
447 454
448struct mlx4_buf_list { 455struct mlx4_buf_list {
@@ -837,7 +844,7 @@ void mlx4_free_hwq_res(struct mlx4_dev *mdev, struct mlx4_hwq_resources *wqres,
837 844
838int mlx4_cq_alloc(struct mlx4_dev *dev, int nent, struct mlx4_mtt *mtt, 845int mlx4_cq_alloc(struct mlx4_dev *dev, int nent, struct mlx4_mtt *mtt,
839 struct mlx4_uar *uar, u64 db_rec, struct mlx4_cq *cq, 846 struct mlx4_uar *uar, u64 db_rec, struct mlx4_cq *cq,
840 unsigned vector, int collapsed); 847 unsigned vector, int collapsed, int timestamp_en);
841void mlx4_cq_free(struct mlx4_dev *dev, struct mlx4_cq *cq); 848void mlx4_cq_free(struct mlx4_dev *dev, struct mlx4_cq *cq);
842 849
843int mlx4_qp_reserve_range(struct mlx4_dev *dev, int cnt, int align, int *base); 850int mlx4_qp_reserve_range(struct mlx4_dev *dev, int cnt, int align, int *base);
@@ -1028,4 +1035,6 @@ int set_and_calc_slave_port_state(struct mlx4_dev *dev, int slave, u8 port, int
1028void mlx4_put_slave_node_guid(struct mlx4_dev *dev, int slave, __be64 guid); 1035void mlx4_put_slave_node_guid(struct mlx4_dev *dev, int slave, __be64 guid);
1029__be64 mlx4_get_slave_node_guid(struct mlx4_dev *dev, int slave); 1036__be64 mlx4_get_slave_node_guid(struct mlx4_dev *dev, int slave);
1030 1037
1038cycle_t mlx4_read_clock(struct mlx4_dev *dev);
1039
1031#endif /* MLX4_DEVICE_H */ 1040#endif /* MLX4_DEVICE_H */