aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/mlx4/fw.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/mlx4/fw.c')
-rw-r--r--drivers/net/mlx4/fw.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/drivers/net/mlx4/fw.c b/drivers/net/mlx4/fw.c
index d82f2751d2c7..2b5006b9be67 100644
--- a/drivers/net/mlx4/fw.c
+++ b/drivers/net/mlx4/fw.c
@@ -101,6 +101,34 @@ static void dump_dev_cap_flags(struct mlx4_dev *dev, u32 flags)
101 mlx4_dbg(dev, " %s\n", fname[i]); 101 mlx4_dbg(dev, " %s\n", fname[i]);
102} 102}
103 103
104int mlx4_MOD_STAT_CFG(struct mlx4_dev *dev, struct mlx4_mod_stat_cfg *cfg)
105{
106 struct mlx4_cmd_mailbox *mailbox;
107 u32 *inbox;
108 int err = 0;
109
110#define MOD_STAT_CFG_IN_SIZE 0x100
111
112#define MOD_STAT_CFG_PG_SZ_M_OFFSET 0x002
113#define MOD_STAT_CFG_PG_SZ_OFFSET 0x003
114
115 mailbox = mlx4_alloc_cmd_mailbox(dev);
116 if (IS_ERR(mailbox))
117 return PTR_ERR(mailbox);
118 inbox = mailbox->buf;
119
120 memset(inbox, 0, MOD_STAT_CFG_IN_SIZE);
121
122 MLX4_PUT(inbox, cfg->log_pg_sz, MOD_STAT_CFG_PG_SZ_OFFSET);
123 MLX4_PUT(inbox, cfg->log_pg_sz_m, MOD_STAT_CFG_PG_SZ_M_OFFSET);
124
125 err = mlx4_cmd(dev, mailbox->dma, 0, 0, MLX4_CMD_MOD_STAT_CFG,
126 MLX4_CMD_TIME_CLASS_A);
127
128 mlx4_free_cmd_mailbox(dev, mailbox);
129 return err;
130}
131
104int mlx4_QUERY_DEV_CAP(struct mlx4_dev *dev, struct mlx4_dev_cap *dev_cap) 132int mlx4_QUERY_DEV_CAP(struct mlx4_dev *dev, struct mlx4_dev_cap *dev_cap)
105{ 133{
106 struct mlx4_cmd_mailbox *mailbox; 134 struct mlx4_cmd_mailbox *mailbox;