Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
fw.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2004, 2005 Topspin Communications. All rights reserved.
3  * Copyright (c) 2005, 2006, 2007, 2008 Mellanox Technologies. All rights reserved.
4  * Copyright (c) 2006, 2007 Cisco Systems. All rights reserved.
5  *
6  * This software is available to you under a choice of one of two
7  * licenses. You may choose to be licensed under the terms of the GNU
8  * General Public License (GPL) Version 2, available from the file
9  * COPYING in the main directory of this source tree, or the
10  * OpenIB.org BSD license below:
11  *
12  * Redistribution and use in source and binary forms, with or
13  * without modification, are permitted provided that the following
14  * conditions are met:
15  *
16  * - Redistributions of source code must retain the above
17  * copyright notice, this list of conditions and the following
18  * disclaimer.
19  *
20  * - Redistributions in binary form must reproduce the above
21  * copyright notice, this list of conditions and the following
22  * disclaimer in the documentation and/or other materials
23  * provided with the distribution.
24  *
25  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
26  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
28  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
29  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
30  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
31  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
32  * SOFTWARE.
33  */
34 
35 #ifndef MLX4_FW_H
36 #define MLX4_FW_H
37 
38 #include "mlx4.h"
39 #include "icm.h"
40 
44 };
45 
46 struct mlx4_dev_cap {
48  int max_qp_sz;
50  int max_qps;
52  int max_srqs;
53  int max_cq_sz;
55  int max_cqs;
56  int max_mpts;
58  int max_eqs;
67  int num_ports;
86  int uar_size;
90  int max_sq_sg;
92  int max_rq_sg;
96  int max_mcgs;
98  int max_pds;
123 };
124 
129  int qp_quota;
130  int cq_quota;
134  int max_eq;
143 };
144 
145 struct mlx4_adapter {
148 };
149 
173  u8 uar_page_sz; /* log pg sz in 4k chunks */
175 };
176 
179  int vl_cap;
180  int mtu_cap;
189 };
190 
196 };
197 
198 int mlx4_QUERY_DEV_CAP(struct mlx4_dev *dev, struct mlx4_dev_cap *dev_cap);
199 int mlx4_QUERY_FUNC_CAP(struct mlx4_dev *dev, u32 gen_or_port,
200  struct mlx4_func_cap *func_cap);
202  struct mlx4_vhcr *vhcr,
203  struct mlx4_cmd_mailbox *inbox,
204  struct mlx4_cmd_mailbox *outbox,
205  struct mlx4_cmd_info *cmd);
206 int mlx4_MAP_FA(struct mlx4_dev *dev, struct mlx4_icm *icm);
207 int mlx4_UNMAP_FA(struct mlx4_dev *dev);
208 int mlx4_RUN_FW(struct mlx4_dev *dev);
209 int mlx4_QUERY_FW(struct mlx4_dev *dev);
210 int mlx4_QUERY_ADAPTER(struct mlx4_dev *dev, struct mlx4_adapter *adapter);
211 int mlx4_INIT_HCA(struct mlx4_dev *dev, struct mlx4_init_hca_param *param);
212 int mlx4_QUERY_HCA(struct mlx4_dev *dev, struct mlx4_init_hca_param *param);
213 int mlx4_CLOSE_HCA(struct mlx4_dev *dev, int panic);
214 int mlx4_map_cmd(struct mlx4_dev *dev, u16 op, struct mlx4_icm *icm, u64 virt);
215 int mlx4_SET_ICM_SIZE(struct mlx4_dev *dev, u64 icm_size, u64 *aux_pages);
216 int mlx4_MAP_ICM_AUX(struct mlx4_dev *dev, struct mlx4_icm *icm);
217 int mlx4_UNMAP_ICM_AUX(struct mlx4_dev *dev);
218 int mlx4_NOP(struct mlx4_dev *dev);
219 int mlx4_MOD_STAT_CFG(struct mlx4_dev *dev, struct mlx4_mod_stat_cfg *cfg);
220 
221 #endif /* MLX4_FW_H */