diff options
Diffstat (limited to 'include/linux/mlx4/cmd.h')
| -rw-r--r-- | include/linux/mlx4/cmd.h | 51 |
1 files changed, 43 insertions, 8 deletions
diff --git a/include/linux/mlx4/cmd.h b/include/linux/mlx4/cmd.h index b56e4587208d..9958ff2cad3c 100644 --- a/include/linux/mlx4/cmd.h +++ b/include/linux/mlx4/cmd.h | |||
| @@ -59,12 +59,15 @@ enum { | |||
| 59 | MLX4_CMD_HW_HEALTH_CHECK = 0x50, | 59 | MLX4_CMD_HW_HEALTH_CHECK = 0x50, |
| 60 | MLX4_CMD_SET_PORT = 0xc, | 60 | MLX4_CMD_SET_PORT = 0xc, |
| 61 | MLX4_CMD_SET_NODE = 0x5a, | 61 | MLX4_CMD_SET_NODE = 0x5a, |
| 62 | MLX4_CMD_QUERY_FUNC = 0x56, | ||
| 62 | MLX4_CMD_ACCESS_DDR = 0x2e, | 63 | MLX4_CMD_ACCESS_DDR = 0x2e, |
| 63 | MLX4_CMD_MAP_ICM = 0xffa, | 64 | MLX4_CMD_MAP_ICM = 0xffa, |
| 64 | MLX4_CMD_UNMAP_ICM = 0xff9, | 65 | MLX4_CMD_UNMAP_ICM = 0xff9, |
| 65 | MLX4_CMD_MAP_ICM_AUX = 0xffc, | 66 | MLX4_CMD_MAP_ICM_AUX = 0xffc, |
| 66 | MLX4_CMD_UNMAP_ICM_AUX = 0xffb, | 67 | MLX4_CMD_UNMAP_ICM_AUX = 0xffb, |
| 67 | MLX4_CMD_SET_ICM_SIZE = 0xffd, | 68 | MLX4_CMD_SET_ICM_SIZE = 0xffd, |
| 69 | /*master notify fw on finish for slave's flr*/ | ||
| 70 | MLX4_CMD_INFORM_FLR_DONE = 0x5b, | ||
| 68 | 71 | ||
| 69 | /* TPT commands */ | 72 | /* TPT commands */ |
| 70 | MLX4_CMD_SW2HW_MPT = 0xd, | 73 | MLX4_CMD_SW2HW_MPT = 0xd, |
| @@ -119,6 +122,26 @@ enum { | |||
| 119 | /* miscellaneous commands */ | 122 | /* miscellaneous commands */ |
| 120 | MLX4_CMD_DIAG_RPRT = 0x30, | 123 | MLX4_CMD_DIAG_RPRT = 0x30, |
| 121 | MLX4_CMD_NOP = 0x31, | 124 | MLX4_CMD_NOP = 0x31, |
| 125 | MLX4_CMD_ACCESS_MEM = 0x2e, | ||
| 126 | MLX4_CMD_SET_VEP = 0x52, | ||
| 127 | |||
| 128 | /* Ethernet specific commands */ | ||
| 129 | MLX4_CMD_SET_VLAN_FLTR = 0x47, | ||
| 130 | MLX4_CMD_SET_MCAST_FLTR = 0x48, | ||
| 131 | MLX4_CMD_DUMP_ETH_STATS = 0x49, | ||
| 132 | |||
| 133 | /* Communication channel commands */ | ||
| 134 | MLX4_CMD_ARM_COMM_CHANNEL = 0x57, | ||
| 135 | MLX4_CMD_GEN_EQE = 0x58, | ||
| 136 | |||
| 137 | /* virtual commands */ | ||
| 138 | MLX4_CMD_ALLOC_RES = 0xf00, | ||
| 139 | MLX4_CMD_FREE_RES = 0xf01, | ||
| 140 | MLX4_CMD_MCAST_ATTACH = 0xf05, | ||
| 141 | MLX4_CMD_UCAST_ATTACH = 0xf06, | ||
| 142 | MLX4_CMD_PROMISC = 0xf08, | ||
| 143 | MLX4_CMD_QUERY_FUNC_CAP = 0xf0a, | ||
| 144 | MLX4_CMD_QP_ATTACH = 0xf0b, | ||
| 122 | 145 | ||
| 123 | /* debug commands */ | 146 | /* debug commands */ |
| 124 | MLX4_CMD_QUERY_DEBUG_MSG = 0x2a, | 147 | MLX4_CMD_QUERY_DEBUG_MSG = 0x2a, |
| @@ -126,6 +149,7 @@ enum { | |||
| 126 | 149 | ||
| 127 | /* statistics commands */ | 150 | /* statistics commands */ |
| 128 | MLX4_CMD_QUERY_IF_STAT = 0X54, | 151 | MLX4_CMD_QUERY_IF_STAT = 0X54, |
| 152 | MLX4_CMD_SET_IF_STAT = 0X55, | ||
| 129 | }; | 153 | }; |
| 130 | 154 | ||
| 131 | enum { | 155 | enum { |
| @@ -135,7 +159,8 @@ enum { | |||
| 135 | }; | 159 | }; |
| 136 | 160 | ||
| 137 | enum { | 161 | enum { |
| 138 | MLX4_MAILBOX_SIZE = 4096 | 162 | MLX4_MAILBOX_SIZE = 4096, |
| 163 | MLX4_ACCESS_MEM_ALIGN = 256, | ||
| 139 | }; | 164 | }; |
| 140 | 165 | ||
| 141 | enum { | 166 | enum { |
| @@ -148,6 +173,11 @@ enum { | |||
| 148 | MLX4_SET_PORT_GID_TABLE = 0x5, | 173 | MLX4_SET_PORT_GID_TABLE = 0x5, |
| 149 | }; | 174 | }; |
| 150 | 175 | ||
| 176 | enum { | ||
| 177 | MLX4_CMD_WRAPPED, | ||
| 178 | MLX4_CMD_NATIVE | ||
| 179 | }; | ||
| 180 | |||
| 151 | struct mlx4_dev; | 181 | struct mlx4_dev; |
| 152 | 182 | ||
| 153 | struct mlx4_cmd_mailbox { | 183 | struct mlx4_cmd_mailbox { |
| @@ -157,23 +187,24 @@ struct mlx4_cmd_mailbox { | |||
| 157 | 187 | ||
| 158 | int __mlx4_cmd(struct mlx4_dev *dev, u64 in_param, u64 *out_param, | 188 | int __mlx4_cmd(struct mlx4_dev *dev, u64 in_param, u64 *out_param, |
| 159 | int out_is_imm, u32 in_modifier, u8 op_modifier, | 189 | int out_is_imm, u32 in_modifier, u8 op_modifier, |
| 160 | u16 op, unsigned long timeout); | 190 | u16 op, unsigned long timeout, int native); |
| 161 | 191 | ||
| 162 | /* Invoke a command with no output parameter */ | 192 | /* Invoke a command with no output parameter */ |
| 163 | static inline int mlx4_cmd(struct mlx4_dev *dev, u64 in_param, u32 in_modifier, | 193 | static inline int mlx4_cmd(struct mlx4_dev *dev, u64 in_param, u32 in_modifier, |
| 164 | u8 op_modifier, u16 op, unsigned long timeout) | 194 | u8 op_modifier, u16 op, unsigned long timeout, |
| 195 | int native) | ||
| 165 | { | 196 | { |
| 166 | return __mlx4_cmd(dev, in_param, NULL, 0, in_modifier, | 197 | return __mlx4_cmd(dev, in_param, NULL, 0, in_modifier, |
| 167 | op_modifier, op, timeout); | 198 | op_modifier, op, timeout, native); |
| 168 | } | 199 | } |
| 169 | 200 | ||
| 170 | /* Invoke a command with an output mailbox */ | 201 | /* Invoke a command with an output mailbox */ |
| 171 | static inline int mlx4_cmd_box(struct mlx4_dev *dev, u64 in_param, u64 out_param, | 202 | static inline int mlx4_cmd_box(struct mlx4_dev *dev, u64 in_param, u64 out_param, |
| 172 | u32 in_modifier, u8 op_modifier, u16 op, | 203 | u32 in_modifier, u8 op_modifier, u16 op, |
| 173 | unsigned long timeout) | 204 | unsigned long timeout, int native) |
| 174 | { | 205 | { |
| 175 | return __mlx4_cmd(dev, in_param, &out_param, 0, in_modifier, | 206 | return __mlx4_cmd(dev, in_param, &out_param, 0, in_modifier, |
| 176 | op_modifier, op, timeout); | 207 | op_modifier, op, timeout, native); |
| 177 | } | 208 | } |
| 178 | 209 | ||
| 179 | /* | 210 | /* |
| @@ -183,13 +214,17 @@ static inline int mlx4_cmd_box(struct mlx4_dev *dev, u64 in_param, u64 out_param | |||
| 183 | */ | 214 | */ |
| 184 | static inline int mlx4_cmd_imm(struct mlx4_dev *dev, u64 in_param, u64 *out_param, | 215 | static inline int mlx4_cmd_imm(struct mlx4_dev *dev, u64 in_param, u64 *out_param, |
| 185 | u32 in_modifier, u8 op_modifier, u16 op, | 216 | u32 in_modifier, u8 op_modifier, u16 op, |
| 186 | unsigned long timeout) | 217 | unsigned long timeout, int native) |
| 187 | { | 218 | { |
| 188 | return __mlx4_cmd(dev, in_param, out_param, 1, in_modifier, | 219 | return __mlx4_cmd(dev, in_param, out_param, 1, in_modifier, |
| 189 | op_modifier, op, timeout); | 220 | op_modifier, op, timeout, native); |
| 190 | } | 221 | } |
| 191 | 222 | ||
| 192 | struct mlx4_cmd_mailbox *mlx4_alloc_cmd_mailbox(struct mlx4_dev *dev); | 223 | struct mlx4_cmd_mailbox *mlx4_alloc_cmd_mailbox(struct mlx4_dev *dev); |
| 193 | void mlx4_free_cmd_mailbox(struct mlx4_dev *dev, struct mlx4_cmd_mailbox *mailbox); | 224 | void mlx4_free_cmd_mailbox(struct mlx4_dev *dev, struct mlx4_cmd_mailbox *mailbox); |
| 194 | 225 | ||
| 226 | u32 mlx4_comm_get_version(void); | ||
| 227 | |||
| 228 | #define MLX4_COMM_GET_IF_REV(cmd_chan_ver) (u8)((cmd_chan_ver) >> 8) | ||
| 229 | |||
| 195 | #endif /* MLX4_CMD_H */ | 230 | #endif /* MLX4_CMD_H */ |
