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.
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:
12 * Redistribution and use in source and binary forms, with or
13 * without modification, are permitted provided that the following
16 * - Redistributions of source code must retain the above
17 * copyright notice, this list of conditions and the following
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.
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
41 struct mlx4_mod_stat_cfg
{
46 struct mlx4_port_cap
{
48 u8 supported_port_types
;
65 u8 dmfs_optimized_state
;
84 int max_requester_per_qp
;
85 int max_responder_per_qp
;
87 int local_ca_ack_delay
;
90 u16 stat_rate_support
;
91 int fs_log_max_ucast_qp_range_size
;
92 int fs_max_num_qp_per_entry
;
128 u32 dmfs_high_rate_qpn_base
;
129 u32 dmfs_high_rate_qpn_range
;
130 struct mlx4_rate_limit_caps rl_caps
;
131 struct mlx4_port_cap port_cap
[MLX4_MAX_PORTS
+ 1];
134 struct mlx4_func_cap
{
137 u32 pf_context_behaviour
;
163 int physical_function
;
169 struct mlx4_adapter
{
170 char board_id
[MLX4_BOARD_ID_LEN
];
174 struct mlx4_init_hca_param
{
189 u16 hca_core_clock
; /* Internal Clock Frequency (in MHz) */
199 u8 mw_enabled
; /* Enable memory windows */
200 u8 uar_page_sz
; /* log pg sz in 4k chunks */
201 u8 steering_mode
; /* for QUERY_HCA */
202 u8 dmfs_high_steer_mode
; /* for QUERY_HCA */
204 u16 cqe_size
; /* For use only when CQE stride feature enabled */
205 u16 eqe_size
; /* For use only when EQE stride feature enabled */
207 u8 phv_check_en
; /* for QUERY_HCA */
210 struct mlx4_init_ib_param
{
224 struct mlx4_set_ib_param
{
231 void mlx4_dev_cap_dump(struct mlx4_dev
*dev
, struct mlx4_dev_cap
*dev_cap
);
232 int mlx4_QUERY_DEV_CAP(struct mlx4_dev
*dev
, struct mlx4_dev_cap
*dev_cap
);
233 int mlx4_QUERY_PORT(struct mlx4_dev
*dev
, int port
, struct mlx4_port_cap
*port_cap
);
234 int mlx4_QUERY_FUNC_CAP(struct mlx4_dev
*dev
, u8 gen_or_port
,
235 struct mlx4_func_cap
*func_cap
);
236 int mlx4_QUERY_FUNC_CAP_wrapper(struct mlx4_dev
*dev
, int slave
,
237 struct mlx4_vhcr
*vhcr
,
238 struct mlx4_cmd_mailbox
*inbox
,
239 struct mlx4_cmd_mailbox
*outbox
,
240 struct mlx4_cmd_info
*cmd
);
241 int mlx4_QUERY_FUNC(struct mlx4_dev
*dev
, struct mlx4_func
*func
, int slave
);
242 int mlx4_MAP_FA(struct mlx4_dev
*dev
, struct mlx4_icm
*icm
);
243 int mlx4_UNMAP_FA(struct mlx4_dev
*dev
);
244 int mlx4_RUN_FW(struct mlx4_dev
*dev
);
245 int mlx4_QUERY_FW(struct mlx4_dev
*dev
);
246 int mlx4_QUERY_ADAPTER(struct mlx4_dev
*dev
, struct mlx4_adapter
*adapter
);
247 int mlx4_INIT_HCA(struct mlx4_dev
*dev
, struct mlx4_init_hca_param
*param
);
248 int mlx4_QUERY_HCA(struct mlx4_dev
*dev
, struct mlx4_init_hca_param
*param
);
249 int mlx4_CLOSE_HCA(struct mlx4_dev
*dev
, int panic
);
250 int mlx4_map_cmd(struct mlx4_dev
*dev
, u16 op
, struct mlx4_icm
*icm
, u64 virt
);
251 int mlx4_SET_ICM_SIZE(struct mlx4_dev
*dev
, u64 icm_size
, u64
*aux_pages
);
252 int mlx4_MAP_ICM_AUX(struct mlx4_dev
*dev
, struct mlx4_icm
*icm
);
253 int mlx4_UNMAP_ICM_AUX(struct mlx4_dev
*dev
);
254 int mlx4_NOP(struct mlx4_dev
*dev
);
255 int mlx4_MOD_STAT_CFG(struct mlx4_dev
*dev
, struct mlx4_mod_stat_cfg
*cfg
);
256 void mlx4_opreq_action(struct work_struct
*work
);
258 #endif /* MLX4_FW_H */