net/mlx5: Add MCC (Management Component Control) register definitions
[sfrench/cifs-2.6.git] / include / linux / mlx5 / driver.h
index 93273d9ea4d145f125846f0c9a56a5a6e74915e4..750701b3b863e20056819db8103e59d6f9d8e843 100644 (file)
@@ -108,6 +108,8 @@ enum {
        MLX5_REG_QTCT            = 0x400a,
        MLX5_REG_DCBX_PARAM      = 0x4020,
        MLX5_REG_DCBX_APP        = 0x4021,
+       MLX5_REG_FPGA_CAP        = 0x4022,
+       MLX5_REG_FPGA_CTRL       = 0x4023,
        MLX5_REG_PCAP            = 0x5001,
        MLX5_REG_PMTU            = 0x5003,
        MLX5_REG_PTYS            = 0x5004,
@@ -129,6 +131,9 @@ enum {
        MLX5_REG_MPCNT           = 0x9051,
        MLX5_REG_MTPPS           = 0x9053,
        MLX5_REG_MTPPSE          = 0x9054,
+       MLX5_REG_MCQI            = 0x9061,
+       MLX5_REG_MCC             = 0x9062,
+       MLX5_REG_MCDA            = 0x9063,
        MLX5_REG_MCAM            = 0x907f,
 };
 
@@ -761,6 +766,9 @@ struct mlx5_core_dev {
        atomic_t                num_qps;
        u32                     issi;
        struct mlx5e_resources  mlx5e_res;
+#ifdef CONFIG_MLX5_FPGA
+       struct mlx5_fpga_device *fpga;
+#endif
 #ifdef CONFIG_RFS_ACCEL
        struct cpu_rmap         *rmap;
 #endif
@@ -812,6 +820,7 @@ struct mlx5_cmd_work_ent {
        u64                     ts1;
        u64                     ts2;
        u16                     op;
+       bool                    polling;
 };
 
 struct mlx5_pas {
@@ -895,11 +904,6 @@ static inline u16 cmdif_rev(struct mlx5_core_dev *dev)
        return ioread32be(&dev->iseg->cmdif_rev_fw_sub) >> 16;
 }
 
-static inline void *mlx5_vzalloc(unsigned long size)
-{
-       return kvzalloc(size, GFP_KERNEL);
-}
-
 static inline u32 mlx5_base_mkey(const u32 key)
 {
        return key & 0xffffff00u;
@@ -915,6 +919,8 @@ int mlx5_cmd_exec(struct mlx5_core_dev *dev, void *in, int in_size, void *out,
 int mlx5_cmd_exec_cb(struct mlx5_core_dev *dev, void *in, int in_size,
                     void *out, int out_size, mlx5_cmd_cbk_t callback,
                     void *context);
+int mlx5_cmd_exec_polling(struct mlx5_core_dev *dev, void *in, int in_size,
+                         void *out, int out_size);
 void mlx5_cmd_mbox_status(void *out, u8 *status, u32 *syndrome);
 
 int mlx5_core_get_caps(struct mlx5_core_dev *dev, enum mlx5_cap_type cap_type);
@@ -925,6 +931,7 @@ int mlx5_health_init(struct mlx5_core_dev *dev);
 void mlx5_start_health_poll(struct mlx5_core_dev *dev);
 void mlx5_stop_health_poll(struct mlx5_core_dev *dev);
 void mlx5_drain_health_wq(struct mlx5_core_dev *dev);
+void mlx5_trigger_health_work(struct mlx5_core_dev *dev);
 int mlx5_buf_alloc_node(struct mlx5_core_dev *dev, int size,
                        struct mlx5_buf *buf, int node);
 int mlx5_buf_alloc(struct mlx5_core_dev *dev, int size, struct mlx5_buf *buf);