3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at
9 * http://www.opensource.org/licenses/cddl1.txt.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
20 */
23 * Copyright (c) 2004-2011 Emulex. All rights reserved.
24 * Use is subject to license terms.
25 */
27#ifndef _EMLXS_EXTERN_H
28#define	_EMLXS_EXTERN_H
30#ifdef	__cplusplus
31extern "C" {
34extern void			*emlxs_soft_state;
35extern uint32_t			emlxs_instance[MAX_FC_BRDS];
36extern uint32_t			emlxs_instance_count;
37extern char			emlxs_revision[32];
38extern char			emlxs_version[32];
39extern char			emlxs_name[64];
40extern char			emlxs_label[64];
42extern emlxs_device_t		emlxs_device;
43extern uint32_t			emlxs_instance[MAX_FC_BRDS];
44extern uint32_t			emlxs_instance_count;
46extern ddi_device_acc_attr_t	emlxs_data_acc_attr;
47extern ddi_device_acc_attr_t	emlxs_dev_acc_attr;
48extern ddi_dma_lim_t		emlxs_dma_lim;
49extern emlxs_config_t		emlxs_cfg[];
50extern ddi_dma_attr_t		emlxs_dma_attr;
51extern ddi_dma_attr_t		emlxs_dma_attr_ro;
52extern ddi_dma_attr_t		emlxs_dma_attr_fcip_rsp;
53extern ddi_dma_attr_t		emlxs_dma_attr_1sg;
55/* Module emlxs_msg.c External Routine Declarations */
56extern void			emlxs_msg_printf(emlxs_port_t *port,
57					const uint32_t fileno,
58					const uint32_t line,
59					emlxs_msg_t *msg,
60					const char *fmt, ...);
61extern uint32_t			emlxs_msg_log_create(emlxs_hba_t *hba);
62extern void			emlxs_msg_lock_reinit(emlxs_hba_t *hba);
63extern void			emlxs_msg_log_destroy(emlxs_hba_t *hba);
64extern uint32_t			emlxs_msg_log_get(emlxs_hba_t *hba,
65					emlxs_log_req_t *req,
66					emlxs_log_resp_t *resp);
68/* Module emlxs_event.c External Routine Declarations */
69extern uint32_t			emlxs_flush_ct_event(emlxs_port_t *port,
70					uint32_t rxid);
71extern void			emlxs_timer_check_events(emlxs_hba_t *hba);
73extern uint32_t			emlxs_event_queue_create(emlxs_hba_t *hba);
75extern void			emlxs_event_queue_destroy(emlxs_hba_t *hba);
77extern void			emlxs_event(emlxs_port_t *port,
78					emlxs_event_t *evt, void *bp,
79					uint32_t size);
80extern void			emlxs_log_dump_event(emlxs_port_t *port,
81					uint8_t *buffer, uint32_t size);
82extern void			emlxs_log_link_event(emlxs_port_t *port);
84extern uint32_t			emlxs_log_ct_event(emlxs_port_t *port,
85					uint8_t *payload, uint32_t size,
86					uint32_t rxid);
87extern void			emlxs_log_rscn_event(emlxs_port_t *port,
88					uint8_t *payload, uint32_t size);
89extern void			emlxs_log_vportrscn_event(emlxs_port_t *port,
90					uint8_t *payload, uint32_t size);
91extern void			emlxs_get_dfc_event(emlxs_port_t *port,
92					emlxs_dfc_event_t *dfc_event,
93					uint32_t sleep);
94extern uint32_t			emlxs_kill_dfc_event(emlxs_port_t *port,
95					emlxs_dfc_event_t *dfc_event);
96extern uint32_t			emlxs_get_dfc_eventinfo(emlxs_port_t *port,
97					HBA_EVENTINFO *eventinfo,
98					uint32_t *eventcount,
99					uint32_t *missed);
100extern void			emlxs_log_temp_event(emlxs_port_t *port,
101					uint32_t type, uint32_t temp);
102extern void			emlxs_log_fcoe_event(emlxs_port_t *port,
103					menlo_init_rsp_t *init_rsp);
104extern void			emlxs_log_async_event(emlxs_port_t *port,
105					IOCB *iocb);
108extern void			emlxs_get_sd_event(emlxs_port_t *port,
109					emlxs_dfc_event_t *dfc_event,
110					uint32_t sleep);
111extern void			emlxs_log_sd_basic_els_event(emlxs_port_t *port,
112					uint32_t subcat, HBA_WWN *portname,
113					HBA_WWN *nodename);
114extern void			emlxs_log_sd_prlo_event(emlxs_port_t *port,
115					HBA_WWN *portname);
116extern void			emlxs_log_sd_lsrjt_event(emlxs_port_t *port,
117					HBA_WWN *remoteport, uint32_t orig_cmd,
118					uint32_t reason, uint32_t reason_expl);
119extern void			emlxs_log_sd_fc_bsy_event(emlxs_port_t *port,
120					HBA_WWN *remoteport);
121extern void			emlxs_log_sd_fc_rdchk_event(emlxs_port_t *port,
122					HBA_WWN *remoteport, uint32_t lun,
123					uint32_t opcode, uint32_t fcp_param);
124extern void			emlxs_log_sd_scsi_event(emlxs_port_t *port,
125					uint32_t type, HBA_WWN *remoteport,
126					int32_t lun);
127extern void			emlxs_log_sd_scsi_check_event(
128					emlxs_port_t *port,
129					HBA_WWN *remoteport, uint32_t lun,
130					uint32_t cmdcode, uint32_t sensekey,
131					uint32_t asc, uint32_t ascq);
132#endif  /* SAN_DIAG_SUPPORT */
134/* Module emlxs_solaris.c External Routine Declarations */
136extern void			emlxs_fca_link_up(emlxs_port_t *port);
138extern void			emlxs_fca_link_down(emlxs_port_t *port);
140extern void 			emlxs_ulp_unsol_cb(emlxs_port_t *port,
141					fc_unsol_buf_t *ubp);
142extern void			emlxs_ulp_statec_cb(emlxs_port_t *port,
143					uint32_t statec);
144extern int32_t			emlxs_fca_reset(opaque_t fca_port_handle,
145					uint32_t cmd);
146extern int32_t			emlxs_fca_pkt_abort(opaque_t fca_port_handle,
147					fc_packet_t *pkt, int32_t sleep);
148extern char			*emlxs_state_xlate(uint8_t state);
149extern char			*emlxs_error_xlate(uint8_t errno);
150extern void			emlxs_mem_free(emlxs_hba_t *hba,
151					MBUF_INFO *buf_info);
152extern uint8_t			*emlxs_mem_alloc(emlxs_hba_t *hba,
153					MBUF_INFO *buf_info);
154extern int			emlxs_map_bus(emlxs_hba_t *hba);
155extern void			emlxs_unmap_bus(emlxs_hba_t *hba);
156extern fc_unsol_buf_t		*emlxs_ub_find(emlxs_port_t *port,
157					uint32_t token);
158extern fc_unsol_buf_t		*emlxs_ub_get(emlxs_port_t *port, uint32_t size,
159					uint32_t type, uint32_t resv);
160extern int32_t			emlxs_log_printf(int32_t f, int32_t type,
161					int32_t num, int32_t brdno,
162					const char *fmt, ...);
163extern void			emlxs_set_pkt_state(emlxs_buf_t *sbp,
164					uint32_t iostat, uint8_t localstat,
165					uint32_t lock);
166extern char			*emlxs_elscmd_xlate(uint32_t cmd);
167extern char			*emlxs_ctcmd_xlate(uint32_t cmd);
168extern char			*emlxs_rmcmd_xlate(uint32_t cmd);
169extern char			*emlxs_wwn_xlate(char *buffer, size_t len,
170					uint8_t *wwn);
171extern int32_t			emlxs_wwn_cmp(uint8_t *wwn1, uint8_t *wwn2);
172extern int32_t			emlxs_fca_transport(opaque_t fca_port_handle,
173					fc_packet_t *pkt);
174extern int32_t			emlxs_fca_pkt_uninit(opaque_t fca_port_handle,
175					fc_packet_t *pkt);
176extern int32_t			emlxs_fca_pkt_init(opaque_t fca_port_handle,
177					fc_packet_t *pkt, int32_t sleep);
178extern void			emlxs_pkt_complete(emlxs_buf_t *sbp,
179					uint32_t iostat, uint8_t localstat,
180					uint32_t doneq);
183extern void			emlxs_update_sd_bucket(emlxs_buf_t *sbp);
184#endif /* SAN_DIAG_SUPPORT */
186extern uint32_t			emlxs_get_instance(int32_t ddiinst);
187extern char			*emlxs_mscmd_xlate(uint16_t cmd);
188extern int32_t			emlxs_reset(emlxs_port_t *port, uint32_t cmd);
189extern void			emlxs_swap_service_params(SERV_PARM *sp);
190extern void			emlxs_swap_fcp_pkt(emlxs_buf_t *sbp);
191extern void			emlxs_swap_ct_pkt(emlxs_buf_t *sbp);
192extern void			emlxs_swap_els_pkt(emlxs_buf_t *sbp);
193extern int			emlxs_fca_ub_release(opaque_t fca_port_handle,
194					uint32_t count, uint64_t tokens[]);
195extern void			emlxs_swap_els_ub(fc_unsol_buf_t *ubp);
196extern void			emlxs_unswap_pkt(emlxs_buf_t *sbp);
197extern uint32_t			emlxs_get_key(emlxs_hba_t *hba, MAILBOXQ *mbq);
198extern int			emlxs_pm_busy_component(dev_info_t *dip);
199extern int			emlxs_pm_idle_component(dev_info_t *dip);
200extern void			emlxs_pm_idle_timer(dev_info_t *dip);
201extern void			emlxs_shutdown_thread(emlxs_hba_t *hba,
202					void *arg1, void *arg2);
203extern uint32_t			emlxs_set_parm(emlxs_hba_t *hba, uint32_t index,
204					uint32_t new_value);
205extern void			emlxs_ub_destroy(emlxs_port_t *port,
206					emlxs_unsol_buf_t *pool);
207extern void			emlxs_ub_callback(emlxs_port_t *port,
208					fc_unsol_buf_t *ubp);
209extern void			emlxs_ub_flush(emlxs_port_t *port);
210extern uint32_t			emlxs_check_parm(emlxs_hba_t *hba,
211					uint32_t index, uint32_t new_value);
212extern int32_t			emlxs_fca_port_manage(opaque_t fca_port_handle,
213					fc_fca_pm_t *pm);
214extern void			emlxs_port_init(emlxs_port_t *port);
215extern void			emlxs_get_fcode_version(emlxs_hba_t *hba);
217extern void			emlxs_swap32_buffer(uint8_t *buffer,
218					uint32_t size);
219extern void			emlxs_swap32_bcopy(uint8_t *src,
220					uint8_t *dst, uint32_t size);
222extern char 			*emlxs_strtoupper(char *str);
224extern void			emlxs_mode_set(emlxs_hba_t *hba);
226extern char			*emlxs_mode_xlate(uint32_t mode);
229extern char			*emlxs_menlo_cmd_xlate(uint32_t cmd);
230extern char			*emlxs_menlo_rsp_xlate(uint32_t rsp);
231#endif /* MENLO_SUPPORT */
233#ifdef FMA_SUPPORT
234extern void			emlxs_fm_init(emlxs_hba_t *hba);
235extern void			emlxs_fm_fini(emlxs_hba_t *hba);
236extern int			emlxs_fm_check_acc_handle(emlxs_hba_t *hba,
237					ddi_acc_handle_t handle);
238extern int			emlxs_fm_check_dma_handle(emlxs_hba_t *hba,
239					ddi_dma_handle_t handle);
240extern void			emlxs_fm_ereport(emlxs_hba_t *hba,
241					char *detail);
242extern void			emlxs_fm_service_impact(emlxs_hba_t *hba,
243					int impact);
244extern int			emlxs_fm_error_cb(dev_info_t *dip,
245					ddi_fm_error_t *err,
246					const void *impl_data);
247extern void			emlxs_check_dma(emlxs_hba_t *hba,
248					emlxs_buf_t *sbp);
249#endif	/* FMA_SUPPORT */
251/* Module emlxs_pkt.c External Routine Declarations */
252extern int32_t			emlxs_pkt_send(fc_packet_t *pkt, uint32_t now);
253extern void			emlxs_pkt_free(fc_packet_t *pkt);
254extern void			emlxs_pkt_callback(fc_packet_t *pkt);
255extern fc_packet_t		*emlxs_pkt_alloc(emlxs_port_t *port,
256					uint32_t cmdlen, uint32_t rsplen,
257					uint32_t datalen, int32_t sleep);
259/* Module emlxs_clock.c External Routine Declarations */
260extern void			emlxs_timer_checks(emlxs_hba_t *hba);
261extern void			emlxs_timer_start(emlxs_hba_t *hba);
262extern void			emlxs_timer_stop(emlxs_hba_t *hba);
263extern void			emlxs_link_timeout(emlxs_hba_t *hba);
264extern clock_t			emlxs_timeout(emlxs_hba_t *hba,
265					uint32_t timeout);
266extern void			emlxs_timer_cancel_clean_address(
267					emlxs_port_t *port);
269/* Module emlxs_dhchap.c External Routine Declarations */
271extern int			emlxs_dhchap_state_machine(emlxs_port_t *port,
272					CHANNEL *cp, IOCBQ *iocbq,
273					MATCHMAP *mp, NODELIST *node, int evt);
275extern void			emlxs_dhc_attach(emlxs_hba_t *hba);
276extern void			emlxs_dhc_detach(emlxs_hba_t *hba);
277extern void			emlxs_dhc_authrsp_timeout(emlxs_port_t *port,
278					void *node, void *null);
279extern void			emlxs_dhc_reauth_timeout(emlxs_port_t *port,
280					void *newtimeout, void *node);
281extern void			emlxs_dhc_auth_stop(emlxs_port_t *port,
282					emlxs_node_t *node);
283extern int			emlxs_dhc_auth_start(emlxs_port_t *port,
284					emlxs_node_t *node, uint8_t *sbp,
285					uint8_t *ubp);
286extern void			emlxs_dhc_init_sp(emlxs_port_t *port,
287					uint32_t did, SERV_PARM *sp,
288					char **msg);
289extern uint32_t			emlxs_dhc_verify_login(emlxs_port_t *port,
290					uint32_t sid, SERV_PARM *sp);
291extern void			emlxs_dhc_status(emlxs_port_t *port,
292					emlxs_node_t *ndlp, uint32_t reason,
293					uint32_t explaination);
294extern void			emlxs_dhc_state(emlxs_port_t *port,
295					emlxs_node_t *ndlp, uint32_t state,
296					uint32_t reason,
297					uint32_t explaination);
298extern uint32_t			emlxs_dhc_init_auth(emlxs_hba_t *hba,
299					uint8_t *lwwpn, uint8_t *rwwpn);
300extern uint32_t			emlxs_dhc_get_auth_cfg(emlxs_hba_t *hba,
301					dfc_fcsp_config_t *fcsp_cfg);
302extern uint32_t			emlxs_dhc_get_auth_key(emlxs_hba_t *hba,
303					dfc_auth_password_t *dfc_auth_pwd);
304extern uint32_t			emlxs_dhc_add_auth_cfg(emlxs_hba_t *hba,
305					dfc_fcsp_config_t *fcsp_cfg,
306					dfc_password_t *dfc_pwd);
307extern uint32_t			emlxs_dhc_delete_auth_cfg(emlxs_hba_t *hba,
308					dfc_fcsp_config_t *fcsp_cfg,
309					dfc_password_t *dfc_pwd);
310extern uint32_t			emlxs_dhc_set_auth_key(emlxs_hba_t *hba,
311					dfc_auth_password_t *dfc_pwd);
312extern uint32_t			emlxs_dhc_get_auth_status(emlxs_hba_t *hba,
313					dfc_auth_status_t *fcsp_status);
314extern uint32_t			emlxs_dhc_get_auth_cfg_table(emlxs_hba_t *hba,
315					dfc_fcsp_config_t *fcsp_cfg);
316extern uint32_t			emlxs_dhc_get_auth_key_table(emlxs_hba_t *hba,
317					dfc_auth_password_t *auth_pwd);
318#endif	/* DHCHAP_SUPPORT */
320/* Module emlxs_node.c External Routine Declarations */
321extern void 			emlxs_node_throttle_set(emlxs_port_t *port,
322					NODELIST *node);
323extern NODELIST *		emlxs_node_create(emlxs_port_t *port,
324					uint32_t did, uint32_t rpi,
325					SERV_PARM *sp);
326extern void			emlxs_node_timeout(emlxs_port_t *port,
327					NODELIST *ndlp, uint32_t ringno);
328extern void			emlxs_node_open(emlxs_port_t *port,
329					NODELIST *ndlp, uint32_t ringno);
330extern void			emlxs_node_close(emlxs_port_t *port,
331					NODELIST *ndlp, uint32_t ringno,
332					int32_t timeout);
333extern NODELIST			*emlxs_node_find_did(emlxs_port_t *port,
334					uint32_t did, uint32_t lock);
335extern NODELIST			*emlxs_node_find_rpi(emlxs_port_t *port,
336					uint32_t rpi);
337extern void			emlxs_node_destroy_all(emlxs_port_t *port);
338extern NODELIST			*emlxs_node_find_mac(emlxs_port_t *port,
339					uint8_t *mac);
340extern void			emlxs_node_rm(emlxs_port_t *port,
341					NODELIST *ndlp);
342extern NODELIST			*emlxs_node_find_wwpn(emlxs_port_t *port,
343					uint8_t *wwpn, uint32_t lock);
344extern NODELIST			*emlxs_node_find_index(emlxs_port_t *port,
345					uint32_t index, uint32_t nports_only);
346extern uint32_t			emlxs_nport_count(emlxs_port_t *port);
348/* Module emlxs_els.c External Routine Declarations */
349extern int32_t			emlxs_els_handle_event(emlxs_hba_t *hba,
350					CHANNEL *cp, IOCBQ *temp);
351extern int32_t			emlxs_els_handle_unsol_req(emlxs_port_t *port,
352					CHANNEL *cp, IOCBQ *iocbq,
353					MATCHMAP *mp, uint32_t size);
354extern uint32_t			emlxs_generate_rscn(emlxs_port_t *port,
355					uint32_t d_id);
356extern int32_t			emlxs_ct_handle_event(emlxs_hba_t *hba,
357					CHANNEL *cp, IOCBQ *temp);
358extern int32_t			emlxs_ct_handle_unsol_req(emlxs_port_t *port,
359					CHANNEL *cp, IOCBQ *iocbq,
360					MATCHMAP *mp, uint32_t size);
361extern int32_t			emlxs_els_reply(emlxs_port_t *port,
362					IOCBQ *iocbq, uint32_t type,
363					uint32_t type2, uint32_t reason,
364					uint32_t explain);
365extern void			emlxs_send_logo(emlxs_port_t *port,
366					uint32_t d_id);
367extern void			emlxs_reset_link_thread(emlxs_hba_t *hba,
368					void *arg1, void *arg2);
369extern uint32_t			emlxs_process_unsol_flogi(emlxs_port_t *port,
370					IOCBQ *iocbq, MATCHMAP *mp,
371					uint32_t size, char *buffer,
372					size_t len);
373extern uint32_t			emlxs_process_unsol_plogi(emlxs_port_t *port,
374					IOCBQ *iocbq, MATCHMAP *mp,
375					uint32_t size, char *buffer,
376					size_t len);
377extern uint32_t			emlxs_ub_send_login_acc(emlxs_port_t *port,
378					fc_unsol_buf_t *ubp);
381extern int			emlxs_menlo_handle_event(emlxs_hba_t *hba,
382					CHANNEL *cp, IOCBQ *iocbq);
383#endif /* MENLO_SUPPORT */
385/* Module emlxs_ip.c External Routine Declarations */
386extern int32_t			emlxs_ip_handle_event(emlxs_hba_t *hba,
387					CHANNEL *cp, IOCBQ *temp);
388extern int			emlxs_ip_handle_rcv_seq_list(emlxs_hba_t *hba,
389					CHANNEL *cp, IOCBQ *saveq);
390extern int			emlxs_ip_handle_unsol_req(emlxs_port_t *port,
391					CHANNEL *cp, IOCBQ *iocbq, MATCHMAP *mp,
392					uint32_t size);
393extern int			emlxs_create_xri(emlxs_port_t *port,
394					CHANNEL *cp, NODELIST *ndlp);
395extern int			emlxs_handle_create_xri(emlxs_hba_t *hba,
396					CHANNEL *cp, IOCBQ *temp);
397extern int			emlxs_handle_xri_aborted(emlxs_hba_t *hba,
398					CHANNEL *cp, IOCBQ *temp);
400/* Module emlxs_mbox.c External Routine Declarations */
401extern void			emlxs_mb_get_port_name(emlxs_hba_t *hba,
402					MAILBOXQ *mbq);
403extern void			emlxs_mb_get_extents_info(emlxs_hba_t *hba,
404					MAILBOXQ *mbq, uint16_t type);
405extern void			emlxs_mb_get_extents(emlxs_hba_t *hba,
406					MAILBOXQ *mbq, uint16_t type);
407extern void			emlxs_mb_dealloc_extents(emlxs_hba_t *hba,
408					MAILBOXQ *mbq, uint16_t type);
409extern void			emlxs_mb_alloc_extents(emlxs_hba_t *hba,
410					MAILBOXQ *mbq, uint16_t type,
411					uint16_t count);
412extern void			emlxs_mb_get_sli4_params(emlxs_hba_t *hba,
413					MAILBOXQ *mbq);
414extern char			*emlxs_mb_xlate_status(uint32_t status);
416extern void			emlxs_mb_config_msi(emlxs_hba_t *hba,
417					MAILBOXQ *mbq, uint32_t *intr_map,
418					uint32_t intr_count);
419extern void			emlxs_mb_config_msix(emlxs_hba_t *hba,
420					MAILBOXQ *mbq, uint32_t *intr_map,
421					uint32_t intr_count);
422extern void			emlxs_mb_read_lnk_stat(emlxs_hba_t *hba,
423					MAILBOXQ *mbq);
424extern void			emlxs_mb_config_link(emlxs_hba_t *hba,
425					MAILBOXQ *mbq);
426extern void			emlxs_mb_config_ring(emlxs_hba_t *hba,
427					int32_t ring, MAILBOXQ *mbq);
428extern void			emlxs_mb_init_link(emlxs_hba_t *hba,
429					MAILBOXQ *mbq, uint32_t topology,
430					uint32_t linkspeed);
431extern void			emlxs_mb_down_link(emlxs_hba_t *hba,
432					MAILBOXQ *mbq);
433extern uint32_t			emlxs_mb_read_la(emlxs_hba_t *hba,
434					MAILBOXQ *mbq);
435extern void			emlxs_mb_read_nv(emlxs_hba_t *hba,
436					MAILBOXQ *mbq);
437extern void			emlxs_mb_read_rev(emlxs_hba_t *hba,
438					MAILBOXQ *mbq, uint32_t v3);
439extern uint32_t			emlxs_mb_read_rpi(emlxs_hba_t *hba,
440					uint32_t rpi, MAILBOXQ *mbq,
441					uint32_t flg);
442extern uint32_t			emlxs_mb_read_xri(emlxs_hba_t *hba,
443					uint32_t xri, MAILBOXQ *mbq,
444					uint32_t flg);
445extern uint32_t			emlxs_mb_read_sparam(emlxs_hba_t *hba,
446					MAILBOXQ *mbq);
447extern void			emlxs_disable_tc(emlxs_hba_t *hba,
448					MAILBOXQ *mbq);
449extern uint32_t			emlxs_mb_run_biu_diag(emlxs_hba_t *hba,
450					MAILBOXQ *mbq, uint64_t in,
451					uint64_t out);
452extern void			emlxs_mb_dump_vpd(emlxs_hba_t *hba,
453					MAILBOXQ *mbq, uint32_t offset);
454extern void			emlxs_mb_dump_fcoe(emlxs_hba_t *hba,
455					MAILBOXQ *mbq, uint32_t offset);
456extern void			emlxs_mb_config_farp(emlxs_hba_t *hba,
457					MAILBOXQ *mbq);
458extern void			emlxs_mb_read_config(emlxs_hba_t *hba,
459					MAILBOXQ *mbq);
460extern void			emlxs_mb_put(emlxs_hba_t *hba,
461					MAILBOXQ *mbq);
462extern MAILBOXQ			*emlxs_mb_get(emlxs_hba_t *hba);
463extern void			emlxs_mb_clear_la(emlxs_hba_t *hba,
464					MAILBOXQ *mbq);
465extern void			emlxs_mb_set_var(emlxs_hba_t *hba,
466					MAILBOXQ *mbq, uint32_t addr,
467					uint32_t value);
468extern void			emlxs_mb_reset_ring(emlxs_hba_t *hba,
469					MAILBOXQ *mbq, uint32_t ringno);
470extern char			*emlxs_mb_cmd_xlate(uint8_t command);
471extern char			*emlxs_request_feature_xlate(uint32_t mask);
472extern void			emlxs_mb_read_status(emlxs_hba_t *hba,
473					MAILBOXQ *mbq);
474extern int			emlxs_cmpl_init_vpi(void *arg1, MAILBOXQ *mbq);
475extern uint32_t			emlxs_mb_init_vpi(emlxs_port_t *port);
476extern int			emlxs_cmpl_reg_vpi(void *arg1, MAILBOXQ *mbq);
477extern uint32_t			emlxs_mb_reg_vpi(emlxs_port_t *port,
478					emlxs_buf_t *sbp);
479extern int			emlxs_cmpl_unreg_vpi(void *arg1, MAILBOXQ *mbq);
480extern uint32_t			emlxs_mb_unreg_vpi(emlxs_port_t *port);
481extern void			emlxs_mb_fini(emlxs_hba_t *hba,
482					MAILBOX *mb, uint32_t mbxStatus);
483extern void			emlxs_mb_deferred_cmpl(emlxs_port_t *port,
484					uint32_t mbxStatus, emlxs_buf_t *sbp,
485					fc_unsol_buf_t *ubp, IOCBQ *iocbq);
486extern void			emlxs_mb_flush(emlxs_hba_t *hba);
487extern void			emlxs_mb_heartbeat(emlxs_hba_t *hba,
488					MAILBOXQ *mbq);
489extern void			emlxs_mb_request_features(emlxs_hba_t *hba,
490					MAILBOXQ *mbq, uint32_t mask);
491extern int			emlxs_mb_resume_rpi(emlxs_hba_t *hba,
492					emlxs_buf_t *sbp, uint16_t rpi);
493extern void			emlxs_mb_noop(emlxs_hba_t *hba,
494					MAILBOXQ *mbq);
495extern int			emlxs_mbext_noop(emlxs_hba_t *hba,
496					MAILBOXQ *mbq);
497extern void			emlxs_mb_resetport(emlxs_hba_t *hba,
498					MAILBOXQ *mbq);
499extern void			emlxs_mb_eq_create(emlxs_hba_t *hba,
500					MAILBOXQ *mbq, uint32_t num);
501extern void			emlxs_mb_cq_create(emlxs_hba_t *hba,
502					MAILBOXQ *mbq, uint32_t num);
503extern void			emlxs_mb_wq_create(emlxs_hba_t *hba,
504					MAILBOXQ *mbq, uint32_t num);
505extern void			emlxs_mb_rq_create(emlxs_hba_t *hba,
506					MAILBOXQ *mbq, uint32_t num);
507extern void			emlxs_mb_mq_create(emlxs_hba_t *hba,
508					MAILBOXQ *mbq);
509extern void			emlxs_mb_mq_create_ext(emlxs_hba_t *hba,
510					MAILBOXQ *mbq);
511extern int			emlxs_mb_reg_fcfi(emlxs_hba_t *hba,
512					MAILBOXQ *mbq, FCFIobj_t *fcfp);
513extern int			emlxs_mb_unreg_fcfi(emlxs_hba_t *hba,
514					FCFIobj_t *fcfp);
515extern int			emlxs_mb_reg_vfi(emlxs_hba_t *hba,
516					MAILBOXQ *mb, VFIobj_t *vfip,
517					emlxs_port_t *vpip);
518extern int			emlxs_mb_unreg_vfi(emlxs_hba_t *hba,
519					VFIobj_t *vfip);
520extern int			emlxs_mbext_read_fcf_table(emlxs_hba_t *hba,
521					MAILBOXQ *mbq, uint32_t index);
522extern int			emlxs_mbext_add_fcf_table(emlxs_hba_t *hba,
523					MAILBOXQ *mbq, uint32_t index);
524extern void			emlxs_mb_rediscover_fcf_table(emlxs_hba_t *hba,
525					MAILBOXQ *mbq);
526extern void			emlxs_mb_async_event(emlxs_hba_t *hba,
527					MAILBOXQ *mbq);
528extern int32_t			emlxs_mb_check_sparm(emlxs_hba_t *hba,
529					SERV_PARM *nsp);
530extern void			emlxs_cmpl_mbox(emlxs_hba_t *hba, MAILBOXQ *mq);
531extern void			emlxs_mb_dump(emlxs_hba_t *hba, MAILBOXQ *mbq,
532					uint32_t offset, uint32_t words);
533extern void			emlxs_mb_retry(emlxs_hba_t *hba, MAILBOXQ *mbq);
534extern void			emlxs_mb_init(emlxs_hba_t *hba, MAILBOXQ *mbq,
535					uint32_t flag, uint32_t tmo);
536extern void			emlxs_mb_config_hbq(emlxs_hba_t *hba,
537					MAILBOXQ *mbq, int hbq_id);
539/* Module emlxs_mem.c External Routine Declarations */
540extern void			*emlxs_mem_pool_get(emlxs_hba_t *hba,
541					MEMSEG *seg);
542extern void 			emlxs_mem_pool_put(emlxs_hba_t *hba,
543					MEMSEG *seg, void *bp);
544extern uint32_t 		emlxs_mem_pool_create(emlxs_hba_t *hba,
545					MEMSEG *seg);
546extern void 			emlxs_mem_pool_destroy(emlxs_hba_t *hba,
547					MEMSEG *seg);
548extern void 			emlxs_mem_pool_clean(emlxs_hba_t *hba,
549					MEMSEG *seg);
550extern MATCHMAP			*emlxs_mem_get_vaddr(emlxs_hba_t *hba,
551					RING *rp, uint64_t mapbp);
552extern void			*emlxs_mem_get(emlxs_hba_t *hba,
553					uint32_t seg_id);
554extern void			emlxs_mem_put(emlxs_hba_t *hba,
555					uint32_t seg_id, void *bp);
556extern int32_t			emlxs_mem_free_buffer(emlxs_hba_t *hba);
557extern int32_t			emlxs_mem_alloc_buffer(emlxs_hba_t *hba);
558extern void			emlxs_mem_map_vaddr(emlxs_hba_t *hba,
559					RING *rp, MATCHMAP *mp, uint32_t *haddr,
560					uint32_t *laddr);
561extern MATCHMAP			*emlxs_mem_buf_alloc(emlxs_hba_t *hba,
562					uint32_t size);
563extern void			emlxs_mem_buf_free(emlxs_hba_t *hba,
564					MATCHMAP *mp);
565extern uint32_t			emlxs_hbq_alloc(emlxs_hba_t *hba,
566					uint32_t hbq_id);
568/* Module emlxs_hba.c  External Routine Declarations */
569extern char			*emlxs_pci_cap_xlate(uint32_t id);
570extern char			*emlxs_pci_ecap_xlate(uint32_t id);
572extern void			emlxs_decode_firmware_rev(emlxs_hba_t *hba,
573					emlxs_vpd_t *vp);
574extern uint32_t			emlxs_init_adapter_info(emlxs_hba_t *hba);
575extern uint32_t			emlxs_strtol(char *str, uint32_t base);
576extern uint64_t			emlxs_strtoll(char *str, uint32_t base);
577extern void			emlxs_decode_version(uint32_t version,
578					char *buffer, size_t len);
579extern char			*emlxs_ffstate_xlate(uint32_t new_state);
580extern char			*emlxs_ring_xlate(uint32_t ringno);
581extern void			emlxs_proc_channel(emlxs_hba_t *hba,
582					CHANNEL *cp, void *arg2);
583extern void			emlxs_pcix_mxr_update(emlxs_hba_t *hba,
584					uint32_t verbose);
585extern void			emlxs_restart_thread(emlxs_hba_t *hba,
586					void *arg1, void *arg2);
587extern void			emlxs_fw_show(emlxs_hba_t *hba);
588extern void			emlxs_proc_channel_event(emlxs_hba_t *hba,
589					CHANNEL *cp, IOCBQ *iocbq);
592extern void			emlxs_fw_load(emlxs_hba_t *hba,
593					emlxs_firmware_t *fw);
594extern void			emlxs_fw_unload(emlxs_hba_t *hba,
595					emlxs_firmware_t *fw);
596#endif /* MODFW_SUPPORT */
598#ifdef MSI_SUPPORT
599extern int32_t			emlxs_msi_add(emlxs_hba_t *hba);
600extern int32_t			emlxs_msi_remove(emlxs_hba_t *hba);
601extern int32_t			emlxs_msi_init(emlxs_hba_t *hba, uint32_t max);
602extern int32_t			emlxs_msi_uninit(emlxs_hba_t *hba);
603#endif	/* MSI_SUPPORT */
605extern int32_t			emlxs_intx_add(emlxs_hba_t *hba);
606extern int32_t			emlxs_intx_remove(emlxs_hba_t *hba);
607extern int32_t			emlxs_intx_init(emlxs_hba_t *hba, uint32_t max);
608extern int32_t			emlxs_intx_uninit(emlxs_hba_t *hba);
610extern void			emlxs_parse_prog_types(emlxs_hba_t *hba,
611					char *types);
612extern int32_t			emlxs_parse_vpd(emlxs_hba_t *hba, uint8_t *vpd,
613					uint32_t size);
614extern int32_t			emlxs_parse_fcoe(emlxs_hba_t *hba, uint8_t *p,
615					uint32_t size);
617extern void			emlxs_decode_label(char *label, char *buffer,
618					int bige, size_t len);
619extern void			emlxs_build_prog_types(emlxs_hba_t *hba,
620					emlxs_vpd_t *vpd);
621extern void			emlxs_process_link_speed(emlxs_hba_t *hba);
623extern uint32_t			emlxs_iotag_flush(emlxs_hba_t *hba);
625extern int			emlxs_pci_model_count;
626extern emlxs_model_t		emlxs_pci_model[];
628extern int			emlxs_fw_count;
629extern emlxs_firmware_t		emlxs_fw_table[];
632/* Module emlxs_sli3.c  External Routine Declarations */
633extern emlxs_sli_api_t		emlxs_sli3_api;
635extern int			emlxs_handle_rcv_seq(emlxs_hba_t *hba,
636					CHANNEL *cp, IOCBQ *iocbq);
637extern void			emlxs_update_HBQ_index(emlxs_hba_t *hba,
638					uint32_t hbq_id);
639extern void			emlxs_hbq_free_all(emlxs_hba_t *hba,
640					uint32_t hbq_id);
642/* Module emlxs_sli4.c  External Routine Declarations */
644extern uint32_t			emlxs_sli4_vfi_to_index(emlxs_hba_t *hba,
645					uint32_t vfi);
646extern uint32_t			emlxs_sli4_index_to_vfi(emlxs_hba_t *hba,
647					uint32_t index);
648extern uint32_t			emlxs_sli4_vpi_to_index(emlxs_hba_t *hba,
649					uint32_t vpi);
650extern uint32_t			emlxs_sli4_index_to_vpi(emlxs_hba_t *hba,
651					uint32_t index);
652extern uint32_t			emlxs_sli4_xri_to_index(emlxs_hba_t *hba,
653					uint32_t xri);
654extern uint32_t			emlxs_sli4_index_to_xri(emlxs_hba_t *hba,
655					uint32_t index);
656extern uint32_t			emlxs_sli4_rpi_to_index(emlxs_hba_t *hba,
657					uint32_t rpi);
658extern uint32_t			emlxs_sli4_index_to_rpi(emlxs_hba_t *hba,
659					uint32_t index);
661extern uint32_t 		emlxs_sli4_unreg_all_nodes(
662					emlxs_port_t *port);
663extern void			emlxs_sli4_hba_reset_all(emlxs_hba_t *hba,
664					uint32_t flag);
665extern XRIobj_t 		*emlxs_sli4_reserve_xri(emlxs_port_t *port,
666					RPIobj_t *rpip, uint32_t type,
667					uint16_t rx_id);
668extern emlxs_sli_api_t		emlxs_sli4_api;
670extern FCFIobj_t		*emlxs_sli4_assign_fcfi(emlxs_hba_t *hba,
671					FCF_RECORD_t *fcfrec,
672					uint32_t event_tag);
673extern void			emlxs_data_dump(emlxs_port_t *port, char *str,
674					uint32_t *data, int cnt, int err);
675extern void			emlxs_ue_dump(emlxs_hba_t *hba, char *str);
677extern XRIobj_t			*emlxs_sli4_find_xri(emlxs_port_t *port,
678					uint16_t xri);
679extern VFIobj_t			*emlxs_sli4_alloc_vfi(emlxs_hba_t *hba,
680					FCFIobj_t *fp);
681extern void			emlxs_sli4_free_vfi(emlxs_hba_t *hba,
682					VFIobj_t *xp);
683extern void			emlxs_sli4_free_fcfi(emlxs_hba_t *hba,
684					FCFIobj_t *xp);
685extern void			emlxs_sli4_free_xri(emlxs_port_t *port,
686					emlxs_buf_t *sbp, XRIobj_t *xp,
687					uint8_t lock);
688extern FCFIobj_t		*emlxs_sli4_bind_fcfi(emlxs_hba_t *hba);
690extern uint32_t			emlxs_sli4_unreserve_xri(emlxs_port_t *port,
691					uint16_t xri, uint32_t lock);
692extern XRIobj_t 		*emlxs_sli4_register_xri(emlxs_port_t *port,
693					emlxs_buf_t *sbp, uint16_t xri,
694					uint32_t did);
697/* Module emlxs_diag.c  External Routine Declarations */
698extern uint32_t			emlxs_diag_post_run(emlxs_hba_t *hba);
699extern uint32_t			emlxs_diag_biu_run(emlxs_hba_t *hba,
700					uint32_t pattern);
701extern uint32_t			emlxs_diag_pattern[256];
702extern uint32_t			emlxs_diag_echo_run(emlxs_port_t *port,
703					uint32_t did, uint32_t pattern);
705/* Module emlxs_download.c External Routine Declarations */
706extern void			emlxs_memset(uint8_t *buffer, uint8_t value,
707					uint32_t size);
708extern int32_t			emlxs_fw_download(emlxs_hba_t *hba,
709					caddr_t buffer, uint32_t len,
710					uint32_t offline);
711extern uint32_t			emlxs_get_max_sram(emlxs_hba_t *hba,
712					uint32_t *MaxRbusSize,
713					uint32_t *MaxIbusSize);
714extern uint32_t			emlxs_get_load_list(emlxs_hba_t *hba,
715					PROG_ID *load_list);
716extern uint32_t			emlxs_read_wakeup_parms(emlxs_hba_t *hba,
717					PWAKE_UP_PARMS WakeUpParms,
718					uint32_t verbose);
719extern int32_t			emlxs_cfl_download(emlxs_hba_t *hba,
720					uint32_t region, caddr_t buffer,
721					uint32_t len);
723extern int32_t			emlxs_boot_code_disable(emlxs_hba_t *hba);
724extern int32_t			emlxs_boot_code_enable(emlxs_hba_t *hba);
725extern int32_t			emlxs_boot_code_state(emlxs_hba_t *hba);
727extern int32_t			emlxs_be_read_fw_version(emlxs_hba_t *hba,
728					emlxs_firmware_t *fw);
730/* Module emlxs_fcp.c External Routine Declarations */
731extern int			emlxs_power_up(emlxs_hba_t *hba);
732extern int			emlxs_power_down(emlxs_hba_t *hba);
733extern int			emlxs_reset_link(emlxs_hba_t *hba,
734					uint32_t linkup, uint32_t wait);
735extern emlxs_buf_t		*emlxs_unregister_pkt(CHANNEL *cp,
736					uint16_t iotag, uint32_t forced);
737extern uint16_t			emlxs_register_pkt(CHANNEL *cp,
738					emlxs_buf_t *sbp);
740extern IOCBQ			*emlxs_create_abort_xri_cn(emlxs_port_t *port,
741					NODELIST *ndlp, uint16_t iotag,
742					CHANNEL *cp, uint8_t class,
743					int32_t flag);
744extern IOCBQ			*emlxs_create_close_xri_cn(emlxs_port_t *port,
745					NODELIST *ndlp, uint16_t iotag,
746					CHANNEL *cp);
747extern IOCBQ			*emlxs_create_abort_xri_cx(emlxs_port_t *port,
748					NODELIST *ndlp, uint16_t xid,
749					CHANNEL *cp, uint8_t class,
750					int32_t flag);
751extern IOCBQ			*emlxs_create_close_xri_cx(emlxs_port_t *port,
752					NODELIST *ndlp, uint16_t xid,
753					CHANNEL *cp);
754extern void			emlxs_abort_ct_exchange(emlxs_hba_t *hba,
755					emlxs_port_t *port, uint32_t rxid);
756extern void			emlxs_abort_els_exchange(emlxs_hba_t *hba,
757					emlxs_port_t *port, uint32_t rxid);
758extern void			emlxs_close_els_exchange(emlxs_hba_t *hba,
759					emlxs_port_t *port, uint32_t rxid);
760extern void			emlxs_abort_fct_exchange(emlxs_hba_t *hba,
761					emlxs_port_t *port, uint32_t rxid);
762extern emlxs_buf_t		*emlxs_chipq_get(CHANNEL *cp, uint16_t iotag);
763extern void			emlxs_chipq_put(CHANNEL *cp, emlxs_buf_t *sbp);
764extern uint32_t			emlxs_chipq_node_flush(emlxs_port_t *port,
765					CHANNEL *cp, NODELIST *ndlp,
766					emlxs_buf_t *fpkt);
767extern uint32_t			emlxs_chipq_lun_flush(emlxs_port_t *port,
768					NODELIST *ndlp, uint32_t lun,
769					emlxs_buf_t *fpkt);
770extern uint32_t			emlxs_chipq_node_check(emlxs_port_t *port,
771					CHANNEL *cp, NODELIST *ndlp);
773extern IOCBQ			*emlxs_tx_get(CHANNEL *cp, uint32_t lock);
774extern void			emlxs_tx_put(IOCBQ *iocbq, uint32_t lock);
775extern void			emlxs_tx_move(NODELIST *ndlp, CHANNEL *from,
776					CHANNEL *to, uint32_t cmd,
777					emlxs_buf_t *fpkt, uint32_t lock);
779extern uint32_t			emlxs_tx_node_check(emlxs_port_t *port,
780					NODELIST *ndlp, CHANNEL *cp);
781extern uint32_t			emlxs_tx_node_flush(emlxs_port_t *port,
782					NODELIST *ndlp, CHANNEL *cp,
783					uint32_t shutdown, emlxs_buf_t *fpkt);
784extern uint32_t			emlxs_tx_lun_flush(emlxs_port_t *port,
785					NODELIST *ndlp, uint32_t lun,
786					emlxs_buf_t *fpkt);
787extern uint32_t			emlxs_tx_channel_flush(emlxs_hba_t *hba,
788					CHANNEL *cp, emlxs_buf_t *fpkt);
790extern void			emlxs_linkdown(emlxs_hba_t *hba);
791extern void			emlxs_linkup(emlxs_hba_t *hba);
792extern void			emlxs_port_online(emlxs_port_t *port);
793extern int32_t			emlxs_port_offline(emlxs_port_t *port,
794					uint32_t scope);
795extern void			emlxs_ffcleanup(emlxs_hba_t *hba);
796extern int32_t			emlxs_offline(emlxs_hba_t *hba,
797					uint32_t reset_requested);
798extern int32_t			emlxs_online(emlxs_hba_t *hba);
799extern int32_t			emlxs_post_buffer(emlxs_hba_t *hba,
800					RING *rp, int16_t cnt);
801extern void			emlxs_ff_start(emlxs_hba_t *hba);
802extern void			emlxs_handle_fcp_event(emlxs_hba_t *hba,
803					CHANNEL *rp, IOCBQ *temp);
804extern int			emlxs_fct_handle_abort(emlxs_hba_t *hba,
805					CHANNEL *rp, IOCBQ *iocbq);
807/* Module emlxs_thread.c External Routine Declarations */
808extern void			emlxs_taskq_destroy(emlxs_taskq_t *taskq);
809extern void			emlxs_taskq_create(emlxs_hba_t *hba,
810					emlxs_taskq_t *taskq);
811extern uint32_t			emlxs_taskq_dispatch(emlxs_taskq_t *taskq,
812					void (*func) (), void *arg);
813extern void			emlxs_thread_create(emlxs_hba_t *hba,
814					emlxs_thread_t *ethread);
815extern void			emlxs_thread_destroy(emlxs_thread_t *ethread);
816extern void			emlxs_thread_trigger1(emlxs_thread_t *ethread,
817					void (*func) ());
818extern void			emlxs_thread_trigger2(emlxs_thread_t *ethread,
819					void (*func) (), CHANNEL *cp);
820extern void			emlxs_thread_spawn(emlxs_hba_t *hba,
821					void (*func) (), void *arg1,
822					void *arg2);
823extern void			emlxs_thread_spawn_create(emlxs_hba_t *hba);
824extern void			emlxs_thread_spawn_destroy(emlxs_hba_t *hba);
826/* Module emlxs_dfc.c External Routine Declarations */
827extern int32_t			emlxs_dfc_manage(emlxs_hba_t *hba, void *dfc,
828					int32_t mode);
829extern int32_t			emlxs_dfc_handle_event(emlxs_hba_t *hba,
830					CHANNEL *cp, IOCBQ *temp);
831extern int			emlxs_dfc_handle_unsol_req(emlxs_port_t *port,
832					CHANNEL *cp, IOCBQ *iocbq,
833					MATCHMAP *mp, uint32_t size);
834extern void			emlxs_fcoe_attention_thread(emlxs_hba_t *hba,
835					void *arg1, void *arg2);
836extern uint32_t		emlxs_set_hba_mode(emlxs_hba_t *hba, uint32_t mode);
837extern uint32_t		emlxs_get_dump_region(emlxs_hba_t *hba, uint32_t region,
838			    uint8_t *buffer, uint32_t *psize);
839extern int32_t		emlxs_send_menlo_cmd(emlxs_hba_t *hba, uint8_t *cmd_buf,
840			    uint32_t cmd_size, uint8_t *rsp_buf,
841			    uint32_t *rsp_size);
843#ifdef SFCT_SUPPORT
844/* Module emlxs_fct.c External Routine Declarations */
845extern uint32_t			emlxs_fct_stmf_alloc(emlxs_hba_t *hba,
846					MATCHMAP *mp);
847extern void			emlxs_fct_stmf_free(emlxs_hba_t *hba,
848					MATCHMAP *mp);
849extern void			emlxs_fct_link_down(emlxs_port_t *port);
850extern void			emlxs_fct_link_up(emlxs_port_t *port);
851extern uint32_t			emlxs_fct_init(emlxs_hba_t *hba);
852extern void			emlxs_fct_detach(emlxs_hba_t *hba);
853extern int			emlxs_fct_handle_unsol_els(emlxs_port_t *port,
854					CHANNEL *cp, IOCBQ *iocbq, MATCHMAP *mp,
855					uint32_t size);
856extern int			emlxs_fct_handle_unsol_req(emlxs_port_t *port,
857					CHANNEL *cp, IOCBQ *iocbq, MATCHMAP *mp,
858					uint32_t size);
859extern int			emlxs_fct_handle_fcp_event(emlxs_hba_t *hba,
860					CHANNEL *cp, IOCBQ *iocbq);
861extern void			emlxs_fct_bind_port(emlxs_port_t *port);
862extern void			emlxs_fct_unbind_port(emlxs_port_t *port);
863extern void			emlxs_fct_unsol_callback(emlxs_port_t *port,
864					fct_cmd_t *fct_cmd);
865extern void			emlxs_fct_attach(emlxs_hba_t *hba);
866extern int			emlxs_fct_port_shutdown(emlxs_port_t *port);
867extern int			emlxs_fct_port_initialize(emlxs_port_t *port);
870extern int			emlxs_fct_modopen();
871extern void			emlxs_fct_modclose();
872#endif /* MODSYM_SUPPORT */
874#ifdef FCT_IO_TRACE
875extern void			emlxs_fct_io_trace(emlxs_port_t *,
876					fct_cmd_t *, uint32_t);
877#endif /* FCT_IO_TRACE */
878#endif /* SFCT_SUPPORT */
880#ifdef DUMP_SUPPORT
881/* Module emlxs_dump.c External Routine Declarations */
882extern uint32_t		emlxs_dump_drv_event(emlxs_hba_t *hba);
883extern uint32_t		emlxs_dump_user_event(emlxs_hba_t *hba);
884extern uint32_t		emlxs_dump_temp_event(emlxs_hba_t *hba,
885				uint32_t tempType, uint32_t temp);
886extern void		emlxs_dump_drv_thread(emlxs_hba_t *hba,
887				void *arg1, void *arg2);
888extern void		emlxs_dump_user_thread(emlxs_hba_t *hba,
889				void *arg1, void *arg2);
890extern void		emlxs_dump_temp_thread(emlxs_hba_t *hba,
891				void *arg1, void *arg2);
892extern uint32_t		emlxs_ftell(emlxs_file_t *fp);
893extern uint32_t		emlxs_get_dump(emlxs_hba_t *hba, uint8_t *buffer,
894			    uint32_t *buflen);
895extern void		emlxs_dump_wait(emlxs_hba_t *hba);
896extern void		emlxs_dump(emlxs_hba_t *hba, uint32_t type,
897			    uint32_t temp_type, uint32_t temp);
899extern emlxs_file_t	*emlxs_fopen(emlxs_hba_t *hba, uint32_t file_type);
900extern void		emlxs_fflush(emlxs_file_t *fp);
901extern uint32_t		emlxs_fclose(emlxs_file_t *fp);
902extern uint32_t		emlxs_dump_word_dmpfile(emlxs_file_t *fpDmpFile,
903				uint8_t *pBuffer, uint32_t bufferLen,
904				int fSwap);
905#endif /* DUMP_SUPPORT */
908/* Module emlxs_fcf.c External Routine Declarations */
909extern void		emlxs_fcf_init(emlxs_hba_t *hba);
911extern void		emlxs_fcf_fini(emlxs_hba_t *hba);
913extern uint32_t 	emlxs_vpi_port_bind_notify(emlxs_port_t *port);
915extern uint32_t 	emlxs_vpi_port_unbind_notify(emlxs_port_t *port,
916				uint32_t wait);
917extern uint32_t		emlxs_vpi_logo_cmpl_notify(emlxs_port_t *port);
919extern uint32_t		emlxs_vpi_logi_notify(emlxs_port_t *port,
920				emlxs_buf_t *sbp);
921extern uint32_t		emlxs_vpi_logi_failed_notify(emlxs_port_t *port,
922				emlxs_buf_t *sbp);
923extern uint32_t		emlxs_vpi_rpi_offline_notify(emlxs_port_t *port,
924				uint32_t did, uint32_t rpi);
925extern uint32_t		emlxs_vpi_rpi_online_notify(emlxs_port_t *port,
926				uint32_t did, uint32_t rpi, uint32_t lock);
927extern uint32_t		emlxs_fcf_shutdown_notify(emlxs_port_t *port,
928				uint32_t wait);
929extern uint32_t		emlxs_fcf_linkup_notify(emlxs_port_t *port);
931extern uint32_t		emlxs_fcf_linkdown_notify(emlxs_port_t *port);
933extern uint32_t		emlxs_fcf_cvl_notify(emlxs_port_t *port, uint32_t vpi);
935extern uint32_t		emlxs_fcf_full_notify(emlxs_port_t *port);
937extern uint32_t		emlxs_fcf_found_notify(emlxs_port_t *port,
938				uint32_t fcf_index);
939extern uint32_t		emlxs_fcf_changed_notify(emlxs_port_t *port,
940				uint32_t fcf_index);
941extern uint32_t		emlxs_fcf_lost_notify(emlxs_port_t *port,
942				uint32_t fcf_index);
943extern void		emlxs_fcf_timer_notify(emlxs_hba_t *hba);
946extern RPIobj_t 	*emlxs_rpi_find(emlxs_port_t *port, uint16_t rpi);
948extern RPIobj_t		*emlxs_rpi_reserve_notify(emlxs_port_t *port,
949				uint32_t did, XRIobj_t *xrip);
950extern RPIobj_t 	*emlxs_rpi_alloc_notify(emlxs_port_t *port,
951				uint32_t did);
952extern uint32_t		emlxs_rpi_free_notify(emlxs_port_t *port,
953				RPIobj_t *rpip);
954extern uint32_t		emlxs_rpi_online_notify(emlxs_port_t *port,
955				RPIobj_t *rpip, uint32_t did, SERV_PARM *sparam,
956				void *arg1, void *arg2, void *arg3);
957extern uint32_t		emlxs_rpi_offline_notify(emlxs_port_t *port,
958				RPIobj_t *rpip, void *arg1, void *arg2,
959				void *arg3);
960extern uint32_t		emlxs_rpi_pause_notify(emlxs_port_t *port,
961				RPIobj_t *rpip);
962extern uint32_t		emlxs_rpi_resume_notify(emlxs_port_t *port,
963				RPIobj_t *rpip, emlxs_buf_t *sbp);
966#ifdef	__cplusplus
970#endif	/* _EMLXS_EXTERN_H */