1fcf3ce44SJohn Forte /* 2fcf3ce44SJohn Forte * CDDL HEADER START 3fcf3ce44SJohn Forte * 4fcf3ce44SJohn Forte * The contents of this file are subject to the terms of the 5fcf3ce44SJohn Forte * Common Development and Distribution License (the "License"). 6fcf3ce44SJohn Forte * You may not use this file except in compliance with the License. 7fcf3ce44SJohn Forte * 88f23e9faSHans Rosenfeld * You can obtain a copy of the license at 98f23e9faSHans Rosenfeld * http://www.opensource.org/licenses/cddl1.txt. 10fcf3ce44SJohn Forte * See the License for the specific language governing permissions 11fcf3ce44SJohn Forte * and limitations under the License. 12fcf3ce44SJohn Forte * 13fcf3ce44SJohn Forte * When distributing Covered Code, include this CDDL HEADER in each 14fcf3ce44SJohn Forte * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15fcf3ce44SJohn Forte * If applicable, add the following below this CDDL HEADER, with the 16fcf3ce44SJohn Forte * fields enclosed by brackets "[]" replaced with your own identifying 17fcf3ce44SJohn Forte * information: Portions Copyright [yyyy] [name of copyright owner] 18fcf3ce44SJohn Forte * 19fcf3ce44SJohn Forte * CDDL HEADER END 20fcf3ce44SJohn Forte */ 21fcf3ce44SJohn Forte 22fcf3ce44SJohn Forte /* 238f23e9faSHans Rosenfeld * Copyright (c) 2004-2011 Emulex. All rights reserved. 2482527734SSukumar Swaminathan * Use is subject to license terms. 25fcf3ce44SJohn Forte */ 26fcf3ce44SJohn Forte 27fcf3ce44SJohn Forte #ifndef _EMLXS_EXTERN_H 28fcf3ce44SJohn Forte #define _EMLXS_EXTERN_H 29fcf3ce44SJohn Forte 30fcf3ce44SJohn Forte #ifdef __cplusplus 31fcf3ce44SJohn Forte extern "C" { 32fcf3ce44SJohn Forte #endif 33fcf3ce44SJohn Forte 34291a2b48SSukumar Swaminathan extern void *emlxs_soft_state; 35291a2b48SSukumar Swaminathan extern uint32_t emlxs_instance[MAX_FC_BRDS]; 36291a2b48SSukumar Swaminathan extern uint32_t emlxs_instance_count; 37291a2b48SSukumar Swaminathan extern char emlxs_revision[32]; 38291a2b48SSukumar Swaminathan extern char emlxs_version[32]; 39291a2b48SSukumar Swaminathan extern char emlxs_name[64]; 40291a2b48SSukumar Swaminathan extern char emlxs_label[64]; 41291a2b48SSukumar Swaminathan 42291a2b48SSukumar Swaminathan extern emlxs_device_t emlxs_device; 43291a2b48SSukumar Swaminathan extern uint32_t emlxs_instance[MAX_FC_BRDS]; 44291a2b48SSukumar Swaminathan extern uint32_t emlxs_instance_count; 45291a2b48SSukumar Swaminathan 46291a2b48SSukumar Swaminathan extern ddi_device_acc_attr_t emlxs_data_acc_attr; 47291a2b48SSukumar Swaminathan extern ddi_device_acc_attr_t emlxs_dev_acc_attr; 48291a2b48SSukumar Swaminathan extern ddi_dma_lim_t emlxs_dma_lim; 49291a2b48SSukumar Swaminathan extern emlxs_config_t emlxs_cfg[]; 50291a2b48SSukumar Swaminathan extern ddi_dma_attr_t emlxs_dma_attr; 51291a2b48SSukumar Swaminathan extern ddi_dma_attr_t emlxs_dma_attr_ro; 52291a2b48SSukumar Swaminathan extern ddi_dma_attr_t emlxs_dma_attr_fcip_rsp; 53291a2b48SSukumar Swaminathan extern ddi_dma_attr_t emlxs_dma_attr_1sg; 54fcf3ce44SJohn Forte 55fcf3ce44SJohn Forte /* Module emlxs_msg.c External Routine Declarations */ 56291a2b48SSukumar Swaminathan extern void emlxs_msg_printf(emlxs_port_t *port, 57291a2b48SSukumar Swaminathan const uint32_t fileno, 58291a2b48SSukumar Swaminathan const uint32_t line, 59291a2b48SSukumar Swaminathan emlxs_msg_t *msg, 60291a2b48SSukumar Swaminathan const char *fmt, ...); 61291a2b48SSukumar Swaminathan extern uint32_t emlxs_msg_log_create(emlxs_hba_t *hba); 62a9800bebSGarrett D'Amore extern void emlxs_msg_lock_reinit(emlxs_hba_t *hba); 63a9800bebSGarrett D'Amore extern void emlxs_msg_log_destroy(emlxs_hba_t *hba); 64291a2b48SSukumar Swaminathan extern uint32_t emlxs_msg_log_get(emlxs_hba_t *hba, 65291a2b48SSukumar Swaminathan emlxs_log_req_t *req, 66291a2b48SSukumar Swaminathan emlxs_log_resp_t *resp); 6782527734SSukumar Swaminathan 6882527734SSukumar Swaminathan /* Module emlxs_event.c External Routine Declarations */ 698f23e9faSHans Rosenfeld extern uint32_t emlxs_flush_ct_event(emlxs_port_t *port, 708f23e9faSHans Rosenfeld uint32_t rxid); 7182527734SSukumar Swaminathan extern void emlxs_timer_check_events(emlxs_hba_t *hba); 7282527734SSukumar Swaminathan 7382527734SSukumar Swaminathan extern uint32_t emlxs_event_queue_create(emlxs_hba_t *hba); 7482527734SSukumar Swaminathan 7582527734SSukumar Swaminathan extern void emlxs_event_queue_destroy(emlxs_hba_t *hba); 7682527734SSukumar Swaminathan 7782527734SSukumar Swaminathan extern void emlxs_event(emlxs_port_t *port, 7882527734SSukumar Swaminathan emlxs_event_t *evt, void *bp, 7982527734SSukumar Swaminathan uint32_t size); 80291a2b48SSukumar Swaminathan extern void emlxs_log_dump_event(emlxs_port_t *port, 81291a2b48SSukumar Swaminathan uint8_t *buffer, uint32_t size); 82291a2b48SSukumar Swaminathan extern void emlxs_log_link_event(emlxs_port_t *port); 8382527734SSukumar Swaminathan 84291a2b48SSukumar Swaminathan extern uint32_t emlxs_log_ct_event(emlxs_port_t *port, 85291a2b48SSukumar Swaminathan uint8_t *payload, uint32_t size, 86291a2b48SSukumar Swaminathan uint32_t rxid); 87291a2b48SSukumar Swaminathan extern void emlxs_log_rscn_event(emlxs_port_t *port, 88291a2b48SSukumar Swaminathan uint8_t *payload, uint32_t size); 89291a2b48SSukumar Swaminathan extern void emlxs_log_vportrscn_event(emlxs_port_t *port, 90291a2b48SSukumar Swaminathan uint8_t *payload, uint32_t size); 918f23e9faSHans Rosenfeld extern void emlxs_get_dfc_event(emlxs_port_t *port, 92291a2b48SSukumar Swaminathan emlxs_dfc_event_t *dfc_event, 93291a2b48SSukumar Swaminathan uint32_t sleep); 94291a2b48SSukumar Swaminathan extern uint32_t emlxs_kill_dfc_event(emlxs_port_t *port, 95291a2b48SSukumar Swaminathan emlxs_dfc_event_t *dfc_event); 96291a2b48SSukumar Swaminathan extern uint32_t emlxs_get_dfc_eventinfo(emlxs_port_t *port, 97291a2b48SSukumar Swaminathan HBA_EVENTINFO *eventinfo, 98291a2b48SSukumar Swaminathan uint32_t *eventcount, 99291a2b48SSukumar Swaminathan uint32_t *missed); 100291a2b48SSukumar Swaminathan extern void emlxs_log_temp_event(emlxs_port_t *port, 101291a2b48SSukumar Swaminathan uint32_t type, uint32_t temp); 102291a2b48SSukumar Swaminathan extern void emlxs_log_fcoe_event(emlxs_port_t *port, 103291a2b48SSukumar Swaminathan menlo_init_rsp_t *init_rsp); 104291a2b48SSukumar Swaminathan extern void emlxs_log_async_event(emlxs_port_t *port, 105291a2b48SSukumar Swaminathan IOCB *iocb); 106fcf3ce44SJohn Forte 10782527734SSukumar Swaminathan #ifdef SAN_DIAG_SUPPORT 1088f23e9faSHans Rosenfeld extern void emlxs_get_sd_event(emlxs_port_t *port, 10982527734SSukumar Swaminathan emlxs_dfc_event_t *dfc_event, 11082527734SSukumar Swaminathan uint32_t sleep); 11182527734SSukumar Swaminathan extern void emlxs_log_sd_basic_els_event(emlxs_port_t *port, 11282527734SSukumar Swaminathan uint32_t subcat, HBA_WWN *portname, 11382527734SSukumar Swaminathan HBA_WWN *nodename); 11482527734SSukumar Swaminathan extern void emlxs_log_sd_prlo_event(emlxs_port_t *port, 11582527734SSukumar Swaminathan HBA_WWN *portname); 11682527734SSukumar Swaminathan extern void emlxs_log_sd_lsrjt_event(emlxs_port_t *port, 11782527734SSukumar Swaminathan HBA_WWN *remoteport, uint32_t orig_cmd, 11882527734SSukumar Swaminathan uint32_t reason, uint32_t reason_expl); 11982527734SSukumar Swaminathan extern void emlxs_log_sd_fc_bsy_event(emlxs_port_t *port, 12082527734SSukumar Swaminathan HBA_WWN *remoteport); 12182527734SSukumar Swaminathan extern void emlxs_log_sd_fc_rdchk_event(emlxs_port_t *port, 12282527734SSukumar Swaminathan HBA_WWN *remoteport, uint32_t lun, 12382527734SSukumar Swaminathan uint32_t opcode, uint32_t fcp_param); 12482527734SSukumar Swaminathan extern void emlxs_log_sd_scsi_event(emlxs_port_t *port, 12582527734SSukumar Swaminathan uint32_t type, HBA_WWN *remoteport, 12682527734SSukumar Swaminathan int32_t lun); 12782527734SSukumar Swaminathan extern void emlxs_log_sd_scsi_check_event( 12882527734SSukumar Swaminathan emlxs_port_t *port, 12982527734SSukumar Swaminathan HBA_WWN *remoteport, uint32_t lun, 13082527734SSukumar Swaminathan uint32_t cmdcode, uint32_t sensekey, 13182527734SSukumar Swaminathan uint32_t asc, uint32_t ascq); 13282527734SSukumar Swaminathan #endif /* SAN_DIAG_SUPPORT */ 13382527734SSukumar Swaminathan 134fcf3ce44SJohn Forte /* Module emlxs_solaris.c External Routine Declarations */ 1358f23e9faSHans Rosenfeld 1368f23e9faSHans Rosenfeld extern void emlxs_fca_link_up(emlxs_port_t *port); 1378f23e9faSHans Rosenfeld 1388f23e9faSHans Rosenfeld extern void emlxs_fca_link_down(emlxs_port_t *port); 1398f23e9faSHans Rosenfeld 1408f23e9faSHans Rosenfeld extern void emlxs_ulp_unsol_cb(emlxs_port_t *port, 1418f23e9faSHans Rosenfeld fc_unsol_buf_t *ubp); 1428f23e9faSHans Rosenfeld extern void emlxs_ulp_statec_cb(emlxs_port_t *port, 1438f23e9faSHans Rosenfeld uint32_t statec); 144a9800bebSGarrett D'Amore extern int32_t emlxs_fca_reset(opaque_t fca_port_handle, 1458f23e9faSHans Rosenfeld uint32_t cmd); 146a9800bebSGarrett D'Amore extern int32_t emlxs_fca_pkt_abort(opaque_t fca_port_handle, 147291a2b48SSukumar Swaminathan fc_packet_t *pkt, int32_t sleep); 148291a2b48SSukumar Swaminathan extern char *emlxs_state_xlate(uint8_t state); 149291a2b48SSukumar Swaminathan extern char *emlxs_error_xlate(uint8_t errno); 150291a2b48SSukumar Swaminathan extern void emlxs_mem_free(emlxs_hba_t *hba, 151291a2b48SSukumar Swaminathan MBUF_INFO *buf_info); 152291a2b48SSukumar Swaminathan extern uint8_t *emlxs_mem_alloc(emlxs_hba_t *hba, 153291a2b48SSukumar Swaminathan MBUF_INFO *buf_info); 154291a2b48SSukumar Swaminathan extern int emlxs_map_bus(emlxs_hba_t *hba); 155291a2b48SSukumar Swaminathan extern void emlxs_unmap_bus(emlxs_hba_t *hba); 156291a2b48SSukumar Swaminathan extern fc_unsol_buf_t *emlxs_ub_find(emlxs_port_t *port, 157291a2b48SSukumar Swaminathan uint32_t token); 158291a2b48SSukumar Swaminathan extern fc_unsol_buf_t *emlxs_ub_get(emlxs_port_t *port, uint32_t size, 159291a2b48SSukumar Swaminathan uint32_t type, uint32_t resv); 160291a2b48SSukumar Swaminathan extern int32_t emlxs_log_printf(int32_t f, int32_t type, 161291a2b48SSukumar Swaminathan int32_t num, int32_t brdno, 162291a2b48SSukumar Swaminathan const char *fmt, ...); 163291a2b48SSukumar Swaminathan extern void emlxs_set_pkt_state(emlxs_buf_t *sbp, 164291a2b48SSukumar Swaminathan uint32_t iostat, uint8_t localstat, 165291a2b48SSukumar Swaminathan uint32_t lock); 166291a2b48SSukumar Swaminathan extern char *emlxs_elscmd_xlate(uint32_t cmd); 167291a2b48SSukumar Swaminathan extern char *emlxs_ctcmd_xlate(uint32_t cmd); 168291a2b48SSukumar Swaminathan extern char *emlxs_rmcmd_xlate(uint32_t cmd); 1698f23e9faSHans Rosenfeld extern char *emlxs_wwn_xlate(char *buffer, size_t len, 1708f23e9faSHans Rosenfeld uint8_t *wwn); 1718f23e9faSHans Rosenfeld extern int32_t emlxs_wwn_cmp(uint8_t *wwn1, uint8_t *wwn2); 172a9800bebSGarrett D'Amore extern int32_t emlxs_fca_transport(opaque_t fca_port_handle, 173291a2b48SSukumar Swaminathan fc_packet_t *pkt); 174a9800bebSGarrett D'Amore extern int32_t emlxs_fca_pkt_uninit(opaque_t fca_port_handle, 175291a2b48SSukumar Swaminathan fc_packet_t *pkt); 176a9800bebSGarrett D'Amore extern int32_t emlxs_fca_pkt_init(opaque_t fca_port_handle, 177291a2b48SSukumar Swaminathan fc_packet_t *pkt, int32_t sleep); 178291a2b48SSukumar Swaminathan extern void emlxs_pkt_complete(emlxs_buf_t *sbp, 179291a2b48SSukumar Swaminathan uint32_t iostat, uint8_t localstat, 180291a2b48SSukumar Swaminathan uint32_t doneq); 181291a2b48SSukumar Swaminathan 182291a2b48SSukumar Swaminathan #ifdef SAN_DIAG_SUPPORT 183291a2b48SSukumar Swaminathan extern void emlxs_update_sd_bucket(emlxs_buf_t *sbp); 184291a2b48SSukumar Swaminathan #endif /* SAN_DIAG_SUPPORT */ 185291a2b48SSukumar Swaminathan 186291a2b48SSukumar Swaminathan extern uint32_t emlxs_get_instance(int32_t ddiinst); 187291a2b48SSukumar Swaminathan extern char *emlxs_mscmd_xlate(uint16_t cmd); 1886a573d82SSukumar Swaminathan extern int32_t emlxs_reset(emlxs_port_t *port, uint32_t cmd); 189291a2b48SSukumar Swaminathan extern void emlxs_swap_service_params(SERV_PARM *sp); 190291a2b48SSukumar Swaminathan extern void emlxs_swap_fcp_pkt(emlxs_buf_t *sbp); 191291a2b48SSukumar Swaminathan extern void emlxs_swap_ct_pkt(emlxs_buf_t *sbp); 192291a2b48SSukumar Swaminathan extern void emlxs_swap_els_pkt(emlxs_buf_t *sbp); 193a9800bebSGarrett D'Amore extern int emlxs_fca_ub_release(opaque_t fca_port_handle, 194291a2b48SSukumar Swaminathan uint32_t count, uint64_t tokens[]); 195291a2b48SSukumar Swaminathan extern void emlxs_swap_els_ub(fc_unsol_buf_t *ubp); 196291a2b48SSukumar Swaminathan extern void emlxs_unswap_pkt(emlxs_buf_t *sbp); 19782527734SSukumar Swaminathan extern uint32_t emlxs_get_key(emlxs_hba_t *hba, MAILBOXQ *mbq); 198291a2b48SSukumar Swaminathan extern int emlxs_pm_busy_component(dev_info_t *dip); 199291a2b48SSukumar Swaminathan extern int emlxs_pm_idle_component(dev_info_t *dip); 200291a2b48SSukumar Swaminathan extern void emlxs_pm_idle_timer(dev_info_t *dip); 201bb63f56eSSukumar Swaminathan extern void emlxs_shutdown_thread(emlxs_hba_t *hba, 202bb63f56eSSukumar Swaminathan void *arg1, void *arg2); 203291a2b48SSukumar Swaminathan extern uint32_t emlxs_set_parm(emlxs_hba_t *hba, uint32_t index, 204291a2b48SSukumar Swaminathan uint32_t new_value); 205291a2b48SSukumar Swaminathan extern void emlxs_ub_destroy(emlxs_port_t *port, 206291a2b48SSukumar Swaminathan emlxs_unsol_buf_t *pool); 207291a2b48SSukumar Swaminathan extern void emlxs_ub_callback(emlxs_port_t *port, 208291a2b48SSukumar Swaminathan fc_unsol_buf_t *ubp); 209291a2b48SSukumar Swaminathan extern void emlxs_ub_flush(emlxs_port_t *port); 210291a2b48SSukumar Swaminathan extern uint32_t emlxs_check_parm(emlxs_hba_t *hba, 211291a2b48SSukumar Swaminathan uint32_t index, uint32_t new_value); 212a9800bebSGarrett D'Amore extern int32_t emlxs_fca_port_manage(opaque_t fca_port_handle, 213291a2b48SSukumar Swaminathan fc_fca_pm_t *pm); 214291a2b48SSukumar Swaminathan extern void emlxs_port_init(emlxs_port_t *port); 215291a2b48SSukumar Swaminathan extern void emlxs_get_fcode_version(emlxs_hba_t *hba); 216fcf3ce44SJohn Forte 21782527734SSukumar Swaminathan extern void emlxs_swap32_buffer(uint8_t *buffer, 21882527734SSukumar Swaminathan uint32_t size); 21982527734SSukumar Swaminathan extern void emlxs_swap32_bcopy(uint8_t *src, 22082527734SSukumar Swaminathan uint8_t *dst, uint32_t size); 22182527734SSukumar Swaminathan 2228f23e9faSHans Rosenfeld extern char *emlxs_strtoupper(char *str); 2238f23e9faSHans Rosenfeld 2248f23e9faSHans Rosenfeld extern void emlxs_mode_set(emlxs_hba_t *hba); 2258f23e9faSHans Rosenfeld 2268f23e9faSHans Rosenfeld extern char *emlxs_mode_xlate(uint32_t mode); 2278f23e9faSHans Rosenfeld 228fcf3ce44SJohn Forte #ifdef MENLO_SUPPORT 229291a2b48SSukumar Swaminathan extern char *emlxs_menlo_cmd_xlate(uint32_t cmd); 230291a2b48SSukumar Swaminathan extern char *emlxs_menlo_rsp_xlate(uint32_t rsp); 231291a2b48SSukumar Swaminathan #endif /* MENLO_SUPPORT */ 232291a2b48SSukumar Swaminathan 233291a2b48SSukumar Swaminathan #ifdef FMA_SUPPORT 234291a2b48SSukumar Swaminathan extern void emlxs_fm_init(emlxs_hba_t *hba); 235291a2b48SSukumar Swaminathan extern void emlxs_fm_fini(emlxs_hba_t *hba); 236bb63f56eSSukumar Swaminathan extern int emlxs_fm_check_acc_handle(emlxs_hba_t *hba, 237291a2b48SSukumar Swaminathan ddi_acc_handle_t handle); 238bb63f56eSSukumar Swaminathan extern int emlxs_fm_check_dma_handle(emlxs_hba_t *hba, 239291a2b48SSukumar Swaminathan ddi_dma_handle_t handle); 240291a2b48SSukumar Swaminathan extern void emlxs_fm_ereport(emlxs_hba_t *hba, 241291a2b48SSukumar Swaminathan char *detail); 242bb63f56eSSukumar Swaminathan extern void emlxs_fm_service_impact(emlxs_hba_t *hba, 243bb63f56eSSukumar Swaminathan int impact); 244291a2b48SSukumar Swaminathan extern int emlxs_fm_error_cb(dev_info_t *dip, 245291a2b48SSukumar Swaminathan ddi_fm_error_t *err, 246291a2b48SSukumar Swaminathan const void *impl_data); 247b3660a96SSukumar Swaminathan extern void emlxs_check_dma(emlxs_hba_t *hba, 248b3660a96SSukumar Swaminathan emlxs_buf_t *sbp); 249291a2b48SSukumar Swaminathan #endif /* FMA_SUPPORT */ 250fcf3ce44SJohn Forte 251fcf3ce44SJohn Forte /* Module emlxs_pkt.c External Routine Declarations */ 252291a2b48SSukumar Swaminathan extern int32_t emlxs_pkt_send(fc_packet_t *pkt, uint32_t now); 253291a2b48SSukumar Swaminathan extern void emlxs_pkt_free(fc_packet_t *pkt); 254291a2b48SSukumar Swaminathan extern void emlxs_pkt_callback(fc_packet_t *pkt); 255291a2b48SSukumar Swaminathan extern fc_packet_t *emlxs_pkt_alloc(emlxs_port_t *port, 256291a2b48SSukumar Swaminathan uint32_t cmdlen, uint32_t rsplen, 257291a2b48SSukumar Swaminathan uint32_t datalen, int32_t sleep); 258fcf3ce44SJohn Forte 259fcf3ce44SJohn Forte /* Module emlxs_clock.c External Routine Declarations */ 260291a2b48SSukumar Swaminathan extern void emlxs_timer_checks(emlxs_hba_t *hba); 261291a2b48SSukumar Swaminathan extern void emlxs_timer_start(emlxs_hba_t *hba); 262291a2b48SSukumar Swaminathan extern void emlxs_timer_stop(emlxs_hba_t *hba); 263291a2b48SSukumar Swaminathan extern void emlxs_link_timeout(emlxs_hba_t *hba); 264291a2b48SSukumar Swaminathan extern clock_t emlxs_timeout(emlxs_hba_t *hba, 265291a2b48SSukumar Swaminathan uint32_t timeout); 2668f23e9faSHans Rosenfeld extern void emlxs_timer_cancel_clean_address( 2678f23e9faSHans Rosenfeld emlxs_port_t *port); 268fcf3ce44SJohn Forte 269fcf3ce44SJohn Forte /* Module emlxs_dhchap.c External Routine Declarations */ 270fcf3ce44SJohn Forte #ifdef DHCHAP_SUPPORT 271291a2b48SSukumar Swaminathan extern int emlxs_dhchap_state_machine(emlxs_port_t *port, 27282527734SSukumar Swaminathan CHANNEL *cp, IOCBQ *iocbq, 27382527734SSukumar Swaminathan MATCHMAP *mp, NODELIST *node, int evt); 274291a2b48SSukumar Swaminathan 275291a2b48SSukumar Swaminathan extern void emlxs_dhc_attach(emlxs_hba_t *hba); 276291a2b48SSukumar Swaminathan extern void emlxs_dhc_detach(emlxs_hba_t *hba); 277291a2b48SSukumar Swaminathan extern void emlxs_dhc_authrsp_timeout(emlxs_port_t *port, 278291a2b48SSukumar Swaminathan void *node, void *null); 279291a2b48SSukumar Swaminathan extern void emlxs_dhc_reauth_timeout(emlxs_port_t *port, 280291a2b48SSukumar Swaminathan void *newtimeout, void *node); 281291a2b48SSukumar Swaminathan extern void emlxs_dhc_auth_stop(emlxs_port_t *port, 282291a2b48SSukumar Swaminathan emlxs_node_t *node); 283291a2b48SSukumar Swaminathan extern int emlxs_dhc_auth_start(emlxs_port_t *port, 284291a2b48SSukumar Swaminathan emlxs_node_t *node, uint8_t *sbp, 285291a2b48SSukumar Swaminathan uint8_t *ubp); 286291a2b48SSukumar Swaminathan extern void emlxs_dhc_init_sp(emlxs_port_t *port, 287291a2b48SSukumar Swaminathan uint32_t did, SERV_PARM *sp, 288291a2b48SSukumar Swaminathan char **msg); 289291a2b48SSukumar Swaminathan extern uint32_t emlxs_dhc_verify_login(emlxs_port_t *port, 290291a2b48SSukumar Swaminathan uint32_t sid, SERV_PARM *sp); 291291a2b48SSukumar Swaminathan extern void emlxs_dhc_status(emlxs_port_t *port, 292291a2b48SSukumar Swaminathan emlxs_node_t *ndlp, uint32_t reason, 293291a2b48SSukumar Swaminathan uint32_t explaination); 294291a2b48SSukumar Swaminathan extern void emlxs_dhc_state(emlxs_port_t *port, 295291a2b48SSukumar Swaminathan emlxs_node_t *ndlp, uint32_t state, 296291a2b48SSukumar Swaminathan uint32_t reason, 297291a2b48SSukumar Swaminathan uint32_t explaination); 298291a2b48SSukumar Swaminathan extern uint32_t emlxs_dhc_init_auth(emlxs_hba_t *hba, 299291a2b48SSukumar Swaminathan uint8_t *lwwpn, uint8_t *rwwpn); 300291a2b48SSukumar Swaminathan extern uint32_t emlxs_dhc_get_auth_cfg(emlxs_hba_t *hba, 301291a2b48SSukumar Swaminathan dfc_fcsp_config_t *fcsp_cfg); 302291a2b48SSukumar Swaminathan extern uint32_t emlxs_dhc_get_auth_key(emlxs_hba_t *hba, 303291a2b48SSukumar Swaminathan dfc_auth_password_t *dfc_auth_pwd); 304291a2b48SSukumar Swaminathan extern uint32_t emlxs_dhc_add_auth_cfg(emlxs_hba_t *hba, 305291a2b48SSukumar Swaminathan dfc_fcsp_config_t *fcsp_cfg, 306291a2b48SSukumar Swaminathan dfc_password_t *dfc_pwd); 307291a2b48SSukumar Swaminathan extern uint32_t emlxs_dhc_delete_auth_cfg(emlxs_hba_t *hba, 308291a2b48SSukumar Swaminathan dfc_fcsp_config_t *fcsp_cfg, 309291a2b48SSukumar Swaminathan dfc_password_t *dfc_pwd); 310291a2b48SSukumar Swaminathan extern uint32_t emlxs_dhc_set_auth_key(emlxs_hba_t *hba, 311291a2b48SSukumar Swaminathan dfc_auth_password_t *dfc_pwd); 312291a2b48SSukumar Swaminathan extern uint32_t emlxs_dhc_get_auth_status(emlxs_hba_t *hba, 313291a2b48SSukumar Swaminathan dfc_auth_status_t *fcsp_status); 314291a2b48SSukumar Swaminathan extern uint32_t emlxs_dhc_get_auth_cfg_table(emlxs_hba_t *hba, 315291a2b48SSukumar Swaminathan dfc_fcsp_config_t *fcsp_cfg); 316291a2b48SSukumar Swaminathan extern uint32_t emlxs_dhc_get_auth_key_table(emlxs_hba_t *hba, 317291a2b48SSukumar Swaminathan dfc_auth_password_t *auth_pwd); 318fcf3ce44SJohn Forte #endif /* DHCHAP_SUPPORT */ 319fcf3ce44SJohn Forte 320fcf3ce44SJohn Forte /* Module emlxs_node.c External Routine Declarations */ 3218f23e9faSHans Rosenfeld extern void emlxs_node_throttle_set(emlxs_port_t *port, 3228f23e9faSHans Rosenfeld NODELIST *node); 323a9800bebSGarrett D'Amore extern NODELIST * emlxs_node_create(emlxs_port_t *port, 324a9800bebSGarrett D'Amore uint32_t did, uint32_t rpi, 325a9800bebSGarrett D'Amore SERV_PARM *sp); 326291a2b48SSukumar Swaminathan extern void emlxs_node_timeout(emlxs_port_t *port, 327291a2b48SSukumar Swaminathan NODELIST *ndlp, uint32_t ringno); 328291a2b48SSukumar Swaminathan extern void emlxs_node_open(emlxs_port_t *port, 329291a2b48SSukumar Swaminathan NODELIST *ndlp, uint32_t ringno); 330291a2b48SSukumar Swaminathan extern void emlxs_node_close(emlxs_port_t *port, 331291a2b48SSukumar Swaminathan NODELIST *ndlp, uint32_t ringno, 332291a2b48SSukumar Swaminathan int32_t timeout); 333291a2b48SSukumar Swaminathan extern NODELIST *emlxs_node_find_did(emlxs_port_t *port, 3348f23e9faSHans Rosenfeld uint32_t did, uint32_t lock); 335291a2b48SSukumar Swaminathan extern NODELIST *emlxs_node_find_rpi(emlxs_port_t *port, 336291a2b48SSukumar Swaminathan uint32_t rpi); 337291a2b48SSukumar Swaminathan extern void emlxs_node_destroy_all(emlxs_port_t *port); 338291a2b48SSukumar Swaminathan extern NODELIST *emlxs_node_find_mac(emlxs_port_t *port, 339291a2b48SSukumar Swaminathan uint8_t *mac); 340291a2b48SSukumar Swaminathan extern void emlxs_node_rm(emlxs_port_t *port, 341291a2b48SSukumar Swaminathan NODELIST *ndlp); 342291a2b48SSukumar Swaminathan extern NODELIST *emlxs_node_find_wwpn(emlxs_port_t *port, 3438f23e9faSHans Rosenfeld uint8_t *wwpn, uint32_t lock); 344291a2b48SSukumar Swaminathan extern NODELIST *emlxs_node_find_index(emlxs_port_t *port, 345291a2b48SSukumar Swaminathan uint32_t index, uint32_t nports_only); 346291a2b48SSukumar Swaminathan extern uint32_t emlxs_nport_count(emlxs_port_t *port); 347fcf3ce44SJohn Forte 348fcf3ce44SJohn Forte /* Module emlxs_els.c External Routine Declarations */ 349291a2b48SSukumar Swaminathan extern int32_t emlxs_els_handle_event(emlxs_hba_t *hba, 35082527734SSukumar Swaminathan CHANNEL *cp, IOCBQ *temp); 351291a2b48SSukumar Swaminathan extern int32_t emlxs_els_handle_unsol_req(emlxs_port_t *port, 35282527734SSukumar Swaminathan CHANNEL *cp, IOCBQ *iocbq, 35382527734SSukumar Swaminathan MATCHMAP *mp, uint32_t size); 354291a2b48SSukumar Swaminathan extern uint32_t emlxs_generate_rscn(emlxs_port_t *port, 355291a2b48SSukumar Swaminathan uint32_t d_id); 356291a2b48SSukumar Swaminathan extern int32_t emlxs_ct_handle_event(emlxs_hba_t *hba, 35782527734SSukumar Swaminathan CHANNEL *cp, IOCBQ *temp); 358291a2b48SSukumar Swaminathan extern int32_t emlxs_ct_handle_unsol_req(emlxs_port_t *port, 35982527734SSukumar Swaminathan CHANNEL *cp, IOCBQ *iocbq, 36082527734SSukumar Swaminathan MATCHMAP *mp, uint32_t size); 361291a2b48SSukumar Swaminathan extern int32_t emlxs_els_reply(emlxs_port_t *port, 362291a2b48SSukumar Swaminathan IOCBQ *iocbq, uint32_t type, 363291a2b48SSukumar Swaminathan uint32_t type2, uint32_t reason, 364291a2b48SSukumar Swaminathan uint32_t explain); 365291a2b48SSukumar Swaminathan extern void emlxs_send_logo(emlxs_port_t *port, 366291a2b48SSukumar Swaminathan uint32_t d_id); 367bb63f56eSSukumar Swaminathan extern void emlxs_reset_link_thread(emlxs_hba_t *hba, 368bb63f56eSSukumar Swaminathan void *arg1, void *arg2); 369291a2b48SSukumar Swaminathan extern uint32_t emlxs_process_unsol_flogi(emlxs_port_t *port, 370291a2b48SSukumar Swaminathan IOCBQ *iocbq, MATCHMAP *mp, 3718f23e9faSHans Rosenfeld uint32_t size, char *buffer, 3728f23e9faSHans Rosenfeld size_t len); 373291a2b48SSukumar Swaminathan extern uint32_t emlxs_process_unsol_plogi(emlxs_port_t *port, 374291a2b48SSukumar Swaminathan IOCBQ *iocbq, MATCHMAP *mp, 3758f23e9faSHans Rosenfeld uint32_t size, char *buffer, 3768f23e9faSHans Rosenfeld size_t len); 377291a2b48SSukumar Swaminathan extern uint32_t emlxs_ub_send_login_acc(emlxs_port_t *port, 378291a2b48SSukumar Swaminathan fc_unsol_buf_t *ubp); 379fcf3ce44SJohn Forte 380fcf3ce44SJohn Forte #ifdef MENLO_SUPPORT 381291a2b48SSukumar Swaminathan extern int emlxs_menlo_handle_event(emlxs_hba_t *hba, 38282527734SSukumar Swaminathan CHANNEL *cp, IOCBQ *iocbq); 383291a2b48SSukumar Swaminathan #endif /* MENLO_SUPPORT */ 384fcf3ce44SJohn Forte 385fcf3ce44SJohn Forte /* Module emlxs_ip.c External Routine Declarations */ 386291a2b48SSukumar Swaminathan extern int32_t emlxs_ip_handle_event(emlxs_hba_t *hba, 38782527734SSukumar Swaminathan CHANNEL *cp, IOCBQ *temp); 388291a2b48SSukumar Swaminathan extern int emlxs_ip_handle_rcv_seq_list(emlxs_hba_t *hba, 38982527734SSukumar Swaminathan CHANNEL *cp, IOCBQ *saveq); 390291a2b48SSukumar Swaminathan extern int emlxs_ip_handle_unsol_req(emlxs_port_t *port, 39182527734SSukumar Swaminathan CHANNEL *cp, IOCBQ *iocbq, MATCHMAP *mp, 392291a2b48SSukumar Swaminathan uint32_t size); 39382527734SSukumar Swaminathan extern int emlxs_create_xri(emlxs_port_t *port, 39482527734SSukumar Swaminathan CHANNEL *cp, NODELIST *ndlp); 395291a2b48SSukumar Swaminathan extern int emlxs_handle_create_xri(emlxs_hba_t *hba, 39682527734SSukumar Swaminathan CHANNEL *cp, IOCBQ *temp); 397291a2b48SSukumar Swaminathan extern int emlxs_handle_xri_aborted(emlxs_hba_t *hba, 39882527734SSukumar Swaminathan CHANNEL *cp, IOCBQ *temp); 399fcf3ce44SJohn Forte 400fcf3ce44SJohn Forte /* Module emlxs_mbox.c External Routine Declarations */ 4018f23e9faSHans Rosenfeld extern void emlxs_mb_get_port_name(emlxs_hba_t *hba, 4028f23e9faSHans Rosenfeld MAILBOXQ *mbq); 4038f23e9faSHans Rosenfeld extern void emlxs_mb_get_extents_info(emlxs_hba_t *hba, 4048f23e9faSHans Rosenfeld MAILBOXQ *mbq, uint16_t type); 4058f23e9faSHans Rosenfeld extern void emlxs_mb_get_extents(emlxs_hba_t *hba, 4068f23e9faSHans Rosenfeld MAILBOXQ *mbq, uint16_t type); 4078f23e9faSHans Rosenfeld extern void emlxs_mb_dealloc_extents(emlxs_hba_t *hba, 4088f23e9faSHans Rosenfeld MAILBOXQ *mbq, uint16_t type); 4098f23e9faSHans Rosenfeld extern void emlxs_mb_alloc_extents(emlxs_hba_t *hba, 4108f23e9faSHans Rosenfeld MAILBOXQ *mbq, uint16_t type, 4118f23e9faSHans Rosenfeld uint16_t count); 4128f23e9faSHans Rosenfeld extern void emlxs_mb_get_sli4_params(emlxs_hba_t *hba, 4138f23e9faSHans Rosenfeld MAILBOXQ *mbq); 4148f23e9faSHans Rosenfeld extern char *emlxs_mb_xlate_status(uint32_t status); 4158f23e9faSHans Rosenfeld 416291a2b48SSukumar Swaminathan extern void emlxs_mb_config_msi(emlxs_hba_t *hba, 41782527734SSukumar Swaminathan MAILBOXQ *mbq, uint32_t *intr_map, 418291a2b48SSukumar Swaminathan uint32_t intr_count); 419291a2b48SSukumar Swaminathan extern void emlxs_mb_config_msix(emlxs_hba_t *hba, 42082527734SSukumar Swaminathan MAILBOXQ *mbq, uint32_t *intr_map, 421291a2b48SSukumar Swaminathan uint32_t intr_count); 422291a2b48SSukumar Swaminathan extern void emlxs_mb_read_lnk_stat(emlxs_hba_t *hba, 42382527734SSukumar Swaminathan MAILBOXQ *mbq); 424291a2b48SSukumar Swaminathan extern void emlxs_mb_config_link(emlxs_hba_t *hba, 42582527734SSukumar Swaminathan MAILBOXQ *mbq); 426291a2b48SSukumar Swaminathan extern void emlxs_mb_config_ring(emlxs_hba_t *hba, 42782527734SSukumar Swaminathan int32_t ring, MAILBOXQ *mbq); 428291a2b48SSukumar Swaminathan extern void emlxs_mb_init_link(emlxs_hba_t *hba, 42982527734SSukumar Swaminathan MAILBOXQ *mbq, uint32_t topology, 430291a2b48SSukumar Swaminathan uint32_t linkspeed); 431291a2b48SSukumar Swaminathan extern void emlxs_mb_down_link(emlxs_hba_t *hba, 43282527734SSukumar Swaminathan MAILBOXQ *mbq); 433291a2b48SSukumar Swaminathan extern uint32_t emlxs_mb_read_la(emlxs_hba_t *hba, 43482527734SSukumar Swaminathan MAILBOXQ *mbq); 435291a2b48SSukumar Swaminathan extern void emlxs_mb_read_nv(emlxs_hba_t *hba, 43682527734SSukumar Swaminathan MAILBOXQ *mbq); 437291a2b48SSukumar Swaminathan extern void emlxs_mb_read_rev(emlxs_hba_t *hba, 43882527734SSukumar Swaminathan MAILBOXQ *mbq, uint32_t v3); 439291a2b48SSukumar Swaminathan extern uint32_t emlxs_mb_read_rpi(emlxs_hba_t *hba, 44082527734SSukumar Swaminathan uint32_t rpi, MAILBOXQ *mbq, 441291a2b48SSukumar Swaminathan uint32_t flg); 442291a2b48SSukumar Swaminathan extern uint32_t emlxs_mb_read_xri(emlxs_hba_t *hba, 44382527734SSukumar Swaminathan uint32_t xri, MAILBOXQ *mbq, 444291a2b48SSukumar Swaminathan uint32_t flg); 445291a2b48SSukumar Swaminathan extern uint32_t emlxs_mb_read_sparam(emlxs_hba_t *hba, 44682527734SSukumar Swaminathan MAILBOXQ *mbq); 447291a2b48SSukumar Swaminathan extern void emlxs_disable_tc(emlxs_hba_t *hba, 44882527734SSukumar Swaminathan MAILBOXQ *mbq); 449291a2b48SSukumar Swaminathan extern uint32_t emlxs_mb_run_biu_diag(emlxs_hba_t *hba, 45082527734SSukumar Swaminathan MAILBOXQ *mbq, uint64_t in, 45182527734SSukumar Swaminathan uint64_t out); 452291a2b48SSukumar Swaminathan extern void emlxs_mb_dump_vpd(emlxs_hba_t *hba, 45382527734SSukumar Swaminathan MAILBOXQ *mbq, uint32_t offset); 45482527734SSukumar Swaminathan extern void emlxs_mb_dump_fcoe(emlxs_hba_t *hba, 45582527734SSukumar Swaminathan MAILBOXQ *mbq, uint32_t offset); 456291a2b48SSukumar Swaminathan extern void emlxs_mb_config_farp(emlxs_hba_t *hba, 45782527734SSukumar Swaminathan MAILBOXQ *mbq); 458291a2b48SSukumar Swaminathan extern void emlxs_mb_read_config(emlxs_hba_t *hba, 45982527734SSukumar Swaminathan MAILBOXQ *mbq); 460291a2b48SSukumar Swaminathan extern void emlxs_mb_put(emlxs_hba_t *hba, 461291a2b48SSukumar Swaminathan MAILBOXQ *mbq); 462291a2b48SSukumar Swaminathan extern MAILBOXQ *emlxs_mb_get(emlxs_hba_t *hba); 463291a2b48SSukumar Swaminathan extern void emlxs_mb_clear_la(emlxs_hba_t *hba, 46482527734SSukumar Swaminathan MAILBOXQ *mbq); 465291a2b48SSukumar Swaminathan extern void emlxs_mb_set_var(emlxs_hba_t *hba, 46682527734SSukumar Swaminathan MAILBOXQ *mbq, uint32_t addr, 467291a2b48SSukumar Swaminathan uint32_t value); 468291a2b48SSukumar Swaminathan extern void emlxs_mb_reset_ring(emlxs_hba_t *hba, 46982527734SSukumar Swaminathan MAILBOXQ *mbq, uint32_t ringno); 470291a2b48SSukumar Swaminathan extern char *emlxs_mb_cmd_xlate(uint8_t command); 4718f23e9faSHans Rosenfeld extern char *emlxs_request_feature_xlate(uint32_t mask); 472291a2b48SSukumar Swaminathan extern void emlxs_mb_read_status(emlxs_hba_t *hba, 47382527734SSukumar Swaminathan MAILBOXQ *mbq); 47482527734SSukumar Swaminathan extern int emlxs_cmpl_init_vpi(void *arg1, MAILBOXQ *mbq); 47582527734SSukumar Swaminathan extern uint32_t emlxs_mb_init_vpi(emlxs_port_t *port); 47682527734SSukumar Swaminathan extern int emlxs_cmpl_reg_vpi(void *arg1, MAILBOXQ *mbq); 47782527734SSukumar Swaminathan extern uint32_t emlxs_mb_reg_vpi(emlxs_port_t *port, 47882527734SSukumar Swaminathan emlxs_buf_t *sbp); 47982527734SSukumar Swaminathan extern int emlxs_cmpl_unreg_vpi(void *arg1, MAILBOXQ *mbq); 480291a2b48SSukumar Swaminathan extern uint32_t emlxs_mb_unreg_vpi(emlxs_port_t *port); 481291a2b48SSukumar Swaminathan extern void emlxs_mb_fini(emlxs_hba_t *hba, 482291a2b48SSukumar Swaminathan MAILBOX *mb, uint32_t mbxStatus); 483a9800bebSGarrett D'Amore extern void emlxs_mb_deferred_cmpl(emlxs_port_t *port, 484a9800bebSGarrett D'Amore uint32_t mbxStatus, emlxs_buf_t *sbp, 485a9800bebSGarrett D'Amore fc_unsol_buf_t *ubp, IOCBQ *iocbq); 48682527734SSukumar Swaminathan extern void emlxs_mb_flush(emlxs_hba_t *hba); 487291a2b48SSukumar Swaminathan extern void emlxs_mb_heartbeat(emlxs_hba_t *hba, 48882527734SSukumar Swaminathan MAILBOXQ *mbq); 489*088c6f3fSHans Rosenfeld extern void emlxs_mb_gpio_write(emlxs_hba_t *hba, 490*088c6f3fSHans Rosenfeld MAILBOXQ *mbq, uint8_t pin, 491*088c6f3fSHans Rosenfeld uint8_t val); 49282527734SSukumar Swaminathan extern void emlxs_mb_request_features(emlxs_hba_t *hba, 4938f23e9faSHans Rosenfeld MAILBOXQ *mbq, uint32_t mask); 49482527734SSukumar Swaminathan extern int emlxs_mb_resume_rpi(emlxs_hba_t *hba, 49582527734SSukumar Swaminathan emlxs_buf_t *sbp, uint16_t rpi); 49682527734SSukumar Swaminathan extern void emlxs_mb_noop(emlxs_hba_t *hba, 49782527734SSukumar Swaminathan MAILBOXQ *mbq); 49882527734SSukumar Swaminathan extern int emlxs_mbext_noop(emlxs_hba_t *hba, 49982527734SSukumar Swaminathan MAILBOXQ *mbq); 50082527734SSukumar Swaminathan extern void emlxs_mb_resetport(emlxs_hba_t *hba, 50182527734SSukumar Swaminathan MAILBOXQ *mbq); 50282527734SSukumar Swaminathan extern void emlxs_mb_eq_create(emlxs_hba_t *hba, 50382527734SSukumar Swaminathan MAILBOXQ *mbq, uint32_t num); 50482527734SSukumar Swaminathan extern void emlxs_mb_cq_create(emlxs_hba_t *hba, 50582527734SSukumar Swaminathan MAILBOXQ *mbq, uint32_t num); 50682527734SSukumar Swaminathan extern void emlxs_mb_wq_create(emlxs_hba_t *hba, 50782527734SSukumar Swaminathan MAILBOXQ *mbq, uint32_t num); 50882527734SSukumar Swaminathan extern void emlxs_mb_rq_create(emlxs_hba_t *hba, 50982527734SSukumar Swaminathan MAILBOXQ *mbq, uint32_t num); 51082527734SSukumar Swaminathan extern void emlxs_mb_mq_create(emlxs_hba_t *hba, 51182527734SSukumar Swaminathan MAILBOXQ *mbq); 5128f23e9faSHans Rosenfeld extern void emlxs_mb_mq_create_ext(emlxs_hba_t *hba, 513a9800bebSGarrett D'Amore MAILBOXQ *mbq); 514a9800bebSGarrett D'Amore extern int emlxs_mb_reg_fcfi(emlxs_hba_t *hba, 51582527734SSukumar Swaminathan MAILBOXQ *mbq, FCFIobj_t *fcfp); 51682527734SSukumar Swaminathan extern int emlxs_mb_unreg_fcfi(emlxs_hba_t *hba, 51782527734SSukumar Swaminathan FCFIobj_t *fcfp); 51882527734SSukumar Swaminathan extern int emlxs_mb_reg_vfi(emlxs_hba_t *hba, 51982527734SSukumar Swaminathan MAILBOXQ *mb, VFIobj_t *vfip, 52082527734SSukumar Swaminathan emlxs_port_t *vpip); 52182527734SSukumar Swaminathan extern int emlxs_mb_unreg_vfi(emlxs_hba_t *hba, 52282527734SSukumar Swaminathan VFIobj_t *vfip); 52382527734SSukumar Swaminathan extern int emlxs_mbext_read_fcf_table(emlxs_hba_t *hba, 52482527734SSukumar Swaminathan MAILBOXQ *mbq, uint32_t index); 52582527734SSukumar Swaminathan extern int emlxs_mbext_add_fcf_table(emlxs_hba_t *hba, 52682527734SSukumar Swaminathan MAILBOXQ *mbq, uint32_t index); 527a9800bebSGarrett D'Amore extern void emlxs_mb_rediscover_fcf_table(emlxs_hba_t *hba, 528a9800bebSGarrett D'Amore MAILBOXQ *mbq); 529291a2b48SSukumar Swaminathan extern void emlxs_mb_async_event(emlxs_hba_t *hba, 53082527734SSukumar Swaminathan MAILBOXQ *mbq); 531291a2b48SSukumar Swaminathan extern int32_t emlxs_mb_check_sparm(emlxs_hba_t *hba, 532291a2b48SSukumar Swaminathan SERV_PARM *nsp); 53382527734SSukumar Swaminathan extern void emlxs_cmpl_mbox(emlxs_hba_t *hba, MAILBOXQ *mq); 53482527734SSukumar Swaminathan extern void emlxs_mb_dump(emlxs_hba_t *hba, MAILBOXQ *mbq, 535291a2b48SSukumar Swaminathan uint32_t offset, uint32_t words); 53682527734SSukumar Swaminathan extern void emlxs_mb_retry(emlxs_hba_t *hba, MAILBOXQ *mbq); 537291a2b48SSukumar Swaminathan extern void emlxs_mb_init(emlxs_hba_t *hba, MAILBOXQ *mbq, 538291a2b48SSukumar Swaminathan uint32_t flag, uint32_t tmo); 539291a2b48SSukumar Swaminathan extern void emlxs_mb_config_hbq(emlxs_hba_t *hba, 54082527734SSukumar Swaminathan MAILBOXQ *mbq, int hbq_id); 541fcf3ce44SJohn Forte 542fcf3ce44SJohn Forte /* Module emlxs_mem.c External Routine Declarations */ 5438f23e9faSHans Rosenfeld extern void *emlxs_mem_pool_get(emlxs_hba_t *hba, 5448f23e9faSHans Rosenfeld MEMSEG *seg); 5458f23e9faSHans Rosenfeld extern void emlxs_mem_pool_put(emlxs_hba_t *hba, 5468f23e9faSHans Rosenfeld MEMSEG *seg, void *bp); 5478f23e9faSHans Rosenfeld extern uint32_t emlxs_mem_pool_create(emlxs_hba_t *hba, 5488f23e9faSHans Rosenfeld MEMSEG *seg); 5498f23e9faSHans Rosenfeld extern void emlxs_mem_pool_destroy(emlxs_hba_t *hba, 5508f23e9faSHans Rosenfeld MEMSEG *seg); 5518f23e9faSHans Rosenfeld extern void emlxs_mem_pool_clean(emlxs_hba_t *hba, 5528f23e9faSHans Rosenfeld MEMSEG *seg); 553291a2b48SSukumar Swaminathan extern MATCHMAP *emlxs_mem_get_vaddr(emlxs_hba_t *hba, 554291a2b48SSukumar Swaminathan RING *rp, uint64_t mapbp); 555a9800bebSGarrett D'Amore extern void *emlxs_mem_get(emlxs_hba_t *hba, 5568f23e9faSHans Rosenfeld uint32_t seg_id); 557a9800bebSGarrett D'Amore extern void emlxs_mem_put(emlxs_hba_t *hba, 558a9800bebSGarrett D'Amore uint32_t seg_id, void *bp); 559291a2b48SSukumar Swaminathan extern int32_t emlxs_mem_free_buffer(emlxs_hba_t *hba); 560291a2b48SSukumar Swaminathan extern int32_t emlxs_mem_alloc_buffer(emlxs_hba_t *hba); 561291a2b48SSukumar Swaminathan extern void emlxs_mem_map_vaddr(emlxs_hba_t *hba, 562291a2b48SSukumar Swaminathan RING *rp, MATCHMAP *mp, uint32_t *haddr, 563291a2b48SSukumar Swaminathan uint32_t *laddr); 56482527734SSukumar Swaminathan extern MATCHMAP *emlxs_mem_buf_alloc(emlxs_hba_t *hba, 56582527734SSukumar Swaminathan uint32_t size); 566a9800bebSGarrett D'Amore extern void emlxs_mem_buf_free(emlxs_hba_t *hba, 56782527734SSukumar Swaminathan MATCHMAP *mp); 568291a2b48SSukumar Swaminathan extern uint32_t emlxs_hbq_alloc(emlxs_hba_t *hba, 569291a2b48SSukumar Swaminathan uint32_t hbq_id); 570fcf3ce44SJohn Forte 571fcf3ce44SJohn Forte /* Module emlxs_hba.c External Routine Declarations */ 5728f23e9faSHans Rosenfeld extern char *emlxs_pci_cap_xlate(uint32_t id); 5738f23e9faSHans Rosenfeld extern char *emlxs_pci_ecap_xlate(uint32_t id); 5748f23e9faSHans Rosenfeld 575291a2b48SSukumar Swaminathan extern void emlxs_decode_firmware_rev(emlxs_hba_t *hba, 576291a2b48SSukumar Swaminathan emlxs_vpd_t *vp); 577291a2b48SSukumar Swaminathan extern uint32_t emlxs_init_adapter_info(emlxs_hba_t *hba); 578291a2b48SSukumar Swaminathan extern uint32_t emlxs_strtol(char *str, uint32_t base); 579291a2b48SSukumar Swaminathan extern uint64_t emlxs_strtoll(char *str, uint32_t base); 580291a2b48SSukumar Swaminathan extern void emlxs_decode_version(uint32_t version, 5818f23e9faSHans Rosenfeld char *buffer, size_t len); 582291a2b48SSukumar Swaminathan extern char *emlxs_ffstate_xlate(uint32_t new_state); 583291a2b48SSukumar Swaminathan extern char *emlxs_ring_xlate(uint32_t ringno); 58482527734SSukumar Swaminathan extern void emlxs_proc_channel(emlxs_hba_t *hba, 58582527734SSukumar Swaminathan CHANNEL *cp, void *arg2); 586291a2b48SSukumar Swaminathan extern void emlxs_pcix_mxr_update(emlxs_hba_t *hba, 587291a2b48SSukumar Swaminathan uint32_t verbose); 588bb63f56eSSukumar Swaminathan extern void emlxs_restart_thread(emlxs_hba_t *hba, 589bb63f56eSSukumar Swaminathan void *arg1, void *arg2); 590291a2b48SSukumar Swaminathan extern void emlxs_fw_show(emlxs_hba_t *hba); 59182527734SSukumar Swaminathan extern void emlxs_proc_channel_event(emlxs_hba_t *hba, 59282527734SSukumar Swaminathan CHANNEL *cp, IOCBQ *iocbq); 593291a2b48SSukumar Swaminathan 59482527734SSukumar Swaminathan #ifdef MODFW_SUPPORT 59582527734SSukumar Swaminathan extern void emlxs_fw_load(emlxs_hba_t *hba, 59682527734SSukumar Swaminathan emlxs_firmware_t *fw); 59782527734SSukumar Swaminathan extern void emlxs_fw_unload(emlxs_hba_t *hba, 59882527734SSukumar Swaminathan emlxs_firmware_t *fw); 59982527734SSukumar Swaminathan #endif /* MODFW_SUPPORT */ 600fcf3ce44SJohn Forte 601fcf3ce44SJohn Forte #ifdef MSI_SUPPORT 602291a2b48SSukumar Swaminathan extern int32_t emlxs_msi_add(emlxs_hba_t *hba); 603291a2b48SSukumar Swaminathan extern int32_t emlxs_msi_remove(emlxs_hba_t *hba); 604291a2b48SSukumar Swaminathan extern int32_t emlxs_msi_init(emlxs_hba_t *hba, uint32_t max); 605291a2b48SSukumar Swaminathan extern int32_t emlxs_msi_uninit(emlxs_hba_t *hba); 606fcf3ce44SJohn Forte #endif /* MSI_SUPPORT */ 607fcf3ce44SJohn Forte 608291a2b48SSukumar Swaminathan extern int32_t emlxs_intx_add(emlxs_hba_t *hba); 609291a2b48SSukumar Swaminathan extern int32_t emlxs_intx_remove(emlxs_hba_t *hba); 610291a2b48SSukumar Swaminathan extern int32_t emlxs_intx_init(emlxs_hba_t *hba, uint32_t max); 611291a2b48SSukumar Swaminathan extern int32_t emlxs_intx_uninit(emlxs_hba_t *hba); 612291a2b48SSukumar Swaminathan 61382527734SSukumar Swaminathan extern void emlxs_parse_prog_types(emlxs_hba_t *hba, 61482527734SSukumar Swaminathan char *types); 61582527734SSukumar Swaminathan extern int32_t emlxs_parse_vpd(emlxs_hba_t *hba, uint8_t *vpd, 61682527734SSukumar Swaminathan uint32_t size); 61782527734SSukumar Swaminathan extern int32_t emlxs_parse_fcoe(emlxs_hba_t *hba, uint8_t *p, 61882527734SSukumar Swaminathan uint32_t size); 619291a2b48SSukumar Swaminathan 62082527734SSukumar Swaminathan extern void emlxs_decode_label(char *label, char *buffer, 6218f23e9faSHans Rosenfeld int bige, size_t len); 62282527734SSukumar Swaminathan extern void emlxs_build_prog_types(emlxs_hba_t *hba, 6238f23e9faSHans Rosenfeld emlxs_vpd_t *vpd); 62482527734SSukumar Swaminathan extern void emlxs_process_link_speed(emlxs_hba_t *hba); 625291a2b48SSukumar Swaminathan 62682527734SSukumar Swaminathan extern uint32_t emlxs_iotag_flush(emlxs_hba_t *hba); 627291a2b48SSukumar Swaminathan 62882527734SSukumar Swaminathan extern int emlxs_pci_model_count; 62982527734SSukumar Swaminathan extern emlxs_model_t emlxs_pci_model[]; 630291a2b48SSukumar Swaminathan 63182527734SSukumar Swaminathan extern int emlxs_fw_count; 63282527734SSukumar Swaminathan extern emlxs_firmware_t emlxs_fw_table[]; 633291a2b48SSukumar Swaminathan 634291a2b48SSukumar Swaminathan 63582527734SSukumar Swaminathan /* Module emlxs_sli3.c External Routine Declarations */ 63682527734SSukumar Swaminathan extern emlxs_sli_api_t emlxs_sli3_api; 637291a2b48SSukumar Swaminathan 638291a2b48SSukumar Swaminathan extern int emlxs_handle_rcv_seq(emlxs_hba_t *hba, 63982527734SSukumar Swaminathan CHANNEL *cp, IOCBQ *iocbq); 640291a2b48SSukumar Swaminathan extern void emlxs_update_HBQ_index(emlxs_hba_t *hba, 641291a2b48SSukumar Swaminathan uint32_t hbq_id); 642291a2b48SSukumar Swaminathan extern void emlxs_hbq_free_all(emlxs_hba_t *hba, 643291a2b48SSukumar Swaminathan uint32_t hbq_id); 64482527734SSukumar Swaminathan 64582527734SSukumar Swaminathan /* Module emlxs_sli4.c External Routine Declarations */ 6468f23e9faSHans Rosenfeld 6478f23e9faSHans Rosenfeld extern uint32_t emlxs_sli4_vfi_to_index(emlxs_hba_t *hba, 6488f23e9faSHans Rosenfeld uint32_t vfi); 6498f23e9faSHans Rosenfeld extern uint32_t emlxs_sli4_index_to_vfi(emlxs_hba_t *hba, 6508f23e9faSHans Rosenfeld uint32_t index); 6518f23e9faSHans Rosenfeld extern uint32_t emlxs_sli4_vpi_to_index(emlxs_hba_t *hba, 6528f23e9faSHans Rosenfeld uint32_t vpi); 6538f23e9faSHans Rosenfeld extern uint32_t emlxs_sli4_index_to_vpi(emlxs_hba_t *hba, 6548f23e9faSHans Rosenfeld uint32_t index); 6558f23e9faSHans Rosenfeld extern uint32_t emlxs_sli4_xri_to_index(emlxs_hba_t *hba, 6568f23e9faSHans Rosenfeld uint32_t xri); 6578f23e9faSHans Rosenfeld extern uint32_t emlxs_sli4_index_to_xri(emlxs_hba_t *hba, 6588f23e9faSHans Rosenfeld uint32_t index); 6598f23e9faSHans Rosenfeld extern uint32_t emlxs_sli4_rpi_to_index(emlxs_hba_t *hba, 6608f23e9faSHans Rosenfeld uint32_t rpi); 6618f23e9faSHans Rosenfeld extern uint32_t emlxs_sli4_index_to_rpi(emlxs_hba_t *hba, 6628f23e9faSHans Rosenfeld uint32_t index); 6638f23e9faSHans Rosenfeld 664a9800bebSGarrett D'Amore extern uint32_t emlxs_sli4_unreg_all_nodes( 6658f23e9faSHans Rosenfeld emlxs_port_t *port); 6668f23e9faSHans Rosenfeld extern void emlxs_sli4_hba_reset_all(emlxs_hba_t *hba, 6678f23e9faSHans Rosenfeld uint32_t flag); 6688f23e9faSHans Rosenfeld extern XRIobj_t *emlxs_sli4_reserve_xri(emlxs_port_t *port, 6698f23e9faSHans Rosenfeld RPIobj_t *rpip, uint32_t type, 6708f23e9faSHans Rosenfeld uint16_t rx_id); 67182527734SSukumar Swaminathan extern emlxs_sli_api_t emlxs_sli4_api; 67282527734SSukumar Swaminathan 67382527734SSukumar Swaminathan extern FCFIobj_t *emlxs_sli4_assign_fcfi(emlxs_hba_t *hba, 674a9800bebSGarrett D'Amore FCF_RECORD_t *fcfrec, 675a9800bebSGarrett D'Amore uint32_t event_tag); 676a9800bebSGarrett D'Amore extern void emlxs_data_dump(emlxs_port_t *port, char *str, 67782527734SSukumar Swaminathan uint32_t *data, int cnt, int err); 67882527734SSukumar Swaminathan extern void emlxs_ue_dump(emlxs_hba_t *hba, char *str); 67982527734SSukumar Swaminathan 6808f23e9faSHans Rosenfeld extern XRIobj_t *emlxs_sli4_find_xri(emlxs_port_t *port, 68182527734SSukumar Swaminathan uint16_t xri); 68282527734SSukumar Swaminathan extern VFIobj_t *emlxs_sli4_alloc_vfi(emlxs_hba_t *hba, 68382527734SSukumar Swaminathan FCFIobj_t *fp); 68482527734SSukumar Swaminathan extern void emlxs_sli4_free_vfi(emlxs_hba_t *hba, 68582527734SSukumar Swaminathan VFIobj_t *xp); 68682527734SSukumar Swaminathan extern void emlxs_sli4_free_fcfi(emlxs_hba_t *hba, 68782527734SSukumar Swaminathan FCFIobj_t *xp); 6888f23e9faSHans Rosenfeld extern void emlxs_sli4_free_xri(emlxs_port_t *port, 689a9800bebSGarrett D'Amore emlxs_buf_t *sbp, XRIobj_t *xp, 690a9800bebSGarrett D'Amore uint8_t lock); 69182527734SSukumar Swaminathan extern FCFIobj_t *emlxs_sli4_bind_fcfi(emlxs_hba_t *hba); 69282527734SSukumar Swaminathan 6938f23e9faSHans Rosenfeld extern uint32_t emlxs_sli4_unreserve_xri(emlxs_port_t *port, 694a9800bebSGarrett D'Amore uint16_t xri, uint32_t lock); 6958f23e9faSHans Rosenfeld extern XRIobj_t *emlxs_sli4_register_xri(emlxs_port_t *port, 6968f23e9faSHans Rosenfeld emlxs_buf_t *sbp, uint16_t xri, 6978f23e9faSHans Rosenfeld uint32_t did); 6988f23e9faSHans Rosenfeld 699fcf3ce44SJohn Forte 700fcf3ce44SJohn Forte /* Module emlxs_diag.c External Routine Declarations */ 701291a2b48SSukumar Swaminathan extern uint32_t emlxs_diag_post_run(emlxs_hba_t *hba); 702291a2b48SSukumar Swaminathan extern uint32_t emlxs_diag_biu_run(emlxs_hba_t *hba, 703291a2b48SSukumar Swaminathan uint32_t pattern); 704291a2b48SSukumar Swaminathan extern uint32_t emlxs_diag_pattern[256]; 705291a2b48SSukumar Swaminathan extern uint32_t emlxs_diag_echo_run(emlxs_port_t *port, 706291a2b48SSukumar Swaminathan uint32_t did, uint32_t pattern); 707fcf3ce44SJohn Forte 708fcf3ce44SJohn Forte /* Module emlxs_download.c External Routine Declarations */ 709a9800bebSGarrett D'Amore extern void emlxs_memset(uint8_t *buffer, uint8_t value, 710a9800bebSGarrett D'Amore uint32_t size); 711291a2b48SSukumar Swaminathan extern int32_t emlxs_fw_download(emlxs_hba_t *hba, 712291a2b48SSukumar Swaminathan caddr_t buffer, uint32_t len, 713291a2b48SSukumar Swaminathan uint32_t offline); 714291a2b48SSukumar Swaminathan extern uint32_t emlxs_get_max_sram(emlxs_hba_t *hba, 715291a2b48SSukumar Swaminathan uint32_t *MaxRbusSize, 716291a2b48SSukumar Swaminathan uint32_t *MaxIbusSize); 717291a2b48SSukumar Swaminathan extern uint32_t emlxs_get_load_list(emlxs_hba_t *hba, 718291a2b48SSukumar Swaminathan PROG_ID *load_list); 719291a2b48SSukumar Swaminathan extern uint32_t emlxs_read_wakeup_parms(emlxs_hba_t *hba, 720291a2b48SSukumar Swaminathan PWAKE_UP_PARMS WakeUpParms, 721291a2b48SSukumar Swaminathan uint32_t verbose); 722291a2b48SSukumar Swaminathan extern int32_t emlxs_cfl_download(emlxs_hba_t *hba, 723291a2b48SSukumar Swaminathan uint32_t region, caddr_t buffer, 724291a2b48SSukumar Swaminathan uint32_t len); 725291a2b48SSukumar Swaminathan 726291a2b48SSukumar Swaminathan extern int32_t emlxs_boot_code_disable(emlxs_hba_t *hba); 727291a2b48SSukumar Swaminathan extern int32_t emlxs_boot_code_enable(emlxs_hba_t *hba); 728291a2b48SSukumar Swaminathan extern int32_t emlxs_boot_code_state(emlxs_hba_t *hba); 729fcf3ce44SJohn Forte 7308f23e9faSHans Rosenfeld extern int32_t emlxs_be_read_fw_version(emlxs_hba_t *hba, 73182527734SSukumar Swaminathan emlxs_firmware_t *fw); 73282527734SSukumar Swaminathan 733fcf3ce44SJohn Forte /* Module emlxs_fcp.c External Routine Declarations */ 734291a2b48SSukumar Swaminathan extern int emlxs_power_up(emlxs_hba_t *hba); 735291a2b48SSukumar Swaminathan extern int emlxs_power_down(emlxs_hba_t *hba); 736291a2b48SSukumar Swaminathan extern int emlxs_reset_link(emlxs_hba_t *hba, 73782527734SSukumar Swaminathan uint32_t linkup, uint32_t wait); 73882527734SSukumar Swaminathan extern emlxs_buf_t *emlxs_unregister_pkt(CHANNEL *cp, 739291a2b48SSukumar Swaminathan uint16_t iotag, uint32_t forced); 74082527734SSukumar Swaminathan extern uint16_t emlxs_register_pkt(CHANNEL *cp, 741291a2b48SSukumar Swaminathan emlxs_buf_t *sbp); 742291a2b48SSukumar Swaminathan 743291a2b48SSukumar Swaminathan extern IOCBQ *emlxs_create_abort_xri_cn(emlxs_port_t *port, 744291a2b48SSukumar Swaminathan NODELIST *ndlp, uint16_t iotag, 74582527734SSukumar Swaminathan CHANNEL *cp, uint8_t class, 74682527734SSukumar Swaminathan int32_t flag); 747291a2b48SSukumar Swaminathan extern IOCBQ *emlxs_create_close_xri_cn(emlxs_port_t *port, 748291a2b48SSukumar Swaminathan NODELIST *ndlp, uint16_t iotag, 74982527734SSukumar Swaminathan CHANNEL *cp); 750291a2b48SSukumar Swaminathan extern IOCBQ *emlxs_create_abort_xri_cx(emlxs_port_t *port, 75182527734SSukumar Swaminathan NODELIST *ndlp, uint16_t xid, 75282527734SSukumar Swaminathan CHANNEL *cp, uint8_t class, 75382527734SSukumar Swaminathan int32_t flag); 754291a2b48SSukumar Swaminathan extern IOCBQ *emlxs_create_close_xri_cx(emlxs_port_t *port, 75582527734SSukumar Swaminathan NODELIST *ndlp, uint16_t xid, 75682527734SSukumar Swaminathan CHANNEL *cp); 757bb63f56eSSukumar Swaminathan extern void emlxs_abort_ct_exchange(emlxs_hba_t *hba, 758bb63f56eSSukumar Swaminathan emlxs_port_t *port, uint32_t rxid); 759fe199829SSukumar Swaminathan extern void emlxs_abort_els_exchange(emlxs_hba_t *hba, 760fe199829SSukumar Swaminathan emlxs_port_t *port, uint32_t rxid); 761a9800bebSGarrett D'Amore extern void emlxs_close_els_exchange(emlxs_hba_t *hba, 762a9800bebSGarrett D'Amore emlxs_port_t *port, uint32_t rxid); 763fe199829SSukumar Swaminathan extern void emlxs_abort_fct_exchange(emlxs_hba_t *hba, 764fe199829SSukumar Swaminathan emlxs_port_t *port, uint32_t rxid); 76582527734SSukumar Swaminathan extern emlxs_buf_t *emlxs_chipq_get(CHANNEL *cp, uint16_t iotag); 76682527734SSukumar Swaminathan extern void emlxs_chipq_put(CHANNEL *cp, emlxs_buf_t *sbp); 767291a2b48SSukumar Swaminathan extern uint32_t emlxs_chipq_node_flush(emlxs_port_t *port, 76882527734SSukumar Swaminathan CHANNEL *cp, NODELIST *ndlp, 769291a2b48SSukumar Swaminathan emlxs_buf_t *fpkt); 770291a2b48SSukumar Swaminathan extern uint32_t emlxs_chipq_lun_flush(emlxs_port_t *port, 771291a2b48SSukumar Swaminathan NODELIST *ndlp, uint32_t lun, 772291a2b48SSukumar Swaminathan emlxs_buf_t *fpkt); 773291a2b48SSukumar Swaminathan extern uint32_t emlxs_chipq_node_check(emlxs_port_t *port, 77482527734SSukumar Swaminathan CHANNEL *cp, NODELIST *ndlp); 775291a2b48SSukumar Swaminathan 77682527734SSukumar Swaminathan extern IOCBQ *emlxs_tx_get(CHANNEL *cp, uint32_t lock); 777291a2b48SSukumar Swaminathan extern void emlxs_tx_put(IOCBQ *iocbq, uint32_t lock); 77882527734SSukumar Swaminathan extern void emlxs_tx_move(NODELIST *ndlp, CHANNEL *from, 77982527734SSukumar Swaminathan CHANNEL *to, uint32_t cmd, 78082527734SSukumar Swaminathan emlxs_buf_t *fpkt, uint32_t lock); 78182527734SSukumar Swaminathan 782291a2b48SSukumar Swaminathan extern uint32_t emlxs_tx_node_check(emlxs_port_t *port, 78382527734SSukumar Swaminathan NODELIST *ndlp, CHANNEL *cp); 784291a2b48SSukumar Swaminathan extern uint32_t emlxs_tx_node_flush(emlxs_port_t *port, 78582527734SSukumar Swaminathan NODELIST *ndlp, CHANNEL *cp, 786291a2b48SSukumar Swaminathan uint32_t shutdown, emlxs_buf_t *fpkt); 787291a2b48SSukumar Swaminathan extern uint32_t emlxs_tx_lun_flush(emlxs_port_t *port, 788291a2b48SSukumar Swaminathan NODELIST *ndlp, uint32_t lun, 789291a2b48SSukumar Swaminathan emlxs_buf_t *fpkt); 79082527734SSukumar Swaminathan extern uint32_t emlxs_tx_channel_flush(emlxs_hba_t *hba, 79182527734SSukumar Swaminathan CHANNEL *cp, emlxs_buf_t *fpkt); 792291a2b48SSukumar Swaminathan 793291a2b48SSukumar Swaminathan extern void emlxs_linkdown(emlxs_hba_t *hba); 794291a2b48SSukumar Swaminathan extern void emlxs_linkup(emlxs_hba_t *hba); 795291a2b48SSukumar Swaminathan extern void emlxs_port_online(emlxs_port_t *port); 796291a2b48SSukumar Swaminathan extern int32_t emlxs_port_offline(emlxs_port_t *port, 797291a2b48SSukumar Swaminathan uint32_t scope); 798291a2b48SSukumar Swaminathan extern void emlxs_ffcleanup(emlxs_hba_t *hba); 7998f23e9faSHans Rosenfeld extern int32_t emlxs_offline(emlxs_hba_t *hba, 8008f23e9faSHans Rosenfeld uint32_t reset_requested); 801291a2b48SSukumar Swaminathan extern int32_t emlxs_online(emlxs_hba_t *hba); 802291a2b48SSukumar Swaminathan extern int32_t emlxs_post_buffer(emlxs_hba_t *hba, 803291a2b48SSukumar Swaminathan RING *rp, int16_t cnt); 804291a2b48SSukumar Swaminathan extern void emlxs_ff_start(emlxs_hba_t *hba); 805291a2b48SSukumar Swaminathan extern void emlxs_handle_fcp_event(emlxs_hba_t *hba, 80682527734SSukumar Swaminathan CHANNEL *rp, IOCBQ *temp); 807291a2b48SSukumar Swaminathan extern int emlxs_fct_handle_abort(emlxs_hba_t *hba, 80882527734SSukumar Swaminathan CHANNEL *rp, IOCBQ *iocbq); 809fcf3ce44SJohn Forte 810fcf3ce44SJohn Forte /* Module emlxs_thread.c External Routine Declarations */ 811291a2b48SSukumar Swaminathan extern void emlxs_taskq_destroy(emlxs_taskq_t *taskq); 812291a2b48SSukumar Swaminathan extern void emlxs_taskq_create(emlxs_hba_t *hba, 813291a2b48SSukumar Swaminathan emlxs_taskq_t *taskq); 814291a2b48SSukumar Swaminathan extern uint32_t emlxs_taskq_dispatch(emlxs_taskq_t *taskq, 815291a2b48SSukumar Swaminathan void (*func) (), void *arg); 816291a2b48SSukumar Swaminathan extern void emlxs_thread_create(emlxs_hba_t *hba, 817291a2b48SSukumar Swaminathan emlxs_thread_t *ethread); 818291a2b48SSukumar Swaminathan extern void emlxs_thread_destroy(emlxs_thread_t *ethread); 819291a2b48SSukumar Swaminathan extern void emlxs_thread_trigger1(emlxs_thread_t *ethread, 820291a2b48SSukumar Swaminathan void (*func) ()); 821291a2b48SSukumar Swaminathan extern void emlxs_thread_trigger2(emlxs_thread_t *ethread, 82282527734SSukumar Swaminathan void (*func) (), CHANNEL *cp); 823bb63f56eSSukumar Swaminathan extern void emlxs_thread_spawn(emlxs_hba_t *hba, 824bb63f56eSSukumar Swaminathan void (*func) (), void *arg1, 825bb63f56eSSukumar Swaminathan void *arg2); 826bb63f56eSSukumar Swaminathan extern void emlxs_thread_spawn_create(emlxs_hba_t *hba); 827bb63f56eSSukumar Swaminathan extern void emlxs_thread_spawn_destroy(emlxs_hba_t *hba); 828fcf3ce44SJohn Forte 829fcf3ce44SJohn Forte /* Module emlxs_dfc.c External Routine Declarations */ 830291a2b48SSukumar Swaminathan extern int32_t emlxs_dfc_manage(emlxs_hba_t *hba, void *dfc, 831291a2b48SSukumar Swaminathan int32_t mode); 832291a2b48SSukumar Swaminathan extern int32_t emlxs_dfc_handle_event(emlxs_hba_t *hba, 83382527734SSukumar Swaminathan CHANNEL *cp, IOCBQ *temp); 834291a2b48SSukumar Swaminathan extern int emlxs_dfc_handle_unsol_req(emlxs_port_t *port, 83582527734SSukumar Swaminathan CHANNEL *cp, IOCBQ *iocbq, 83682527734SSukumar Swaminathan MATCHMAP *mp, uint32_t size); 837bb63f56eSSukumar Swaminathan extern void emlxs_fcoe_attention_thread(emlxs_hba_t *hba, 838bb63f56eSSukumar Swaminathan void *arg1, void *arg2); 839291a2b48SSukumar Swaminathan extern uint32_t emlxs_set_hba_mode(emlxs_hba_t *hba, uint32_t mode); 840291a2b48SSukumar Swaminathan extern uint32_t emlxs_get_dump_region(emlxs_hba_t *hba, uint32_t region, 841291a2b48SSukumar Swaminathan uint8_t *buffer, uint32_t *psize); 842291a2b48SSukumar Swaminathan extern int32_t emlxs_send_menlo_cmd(emlxs_hba_t *hba, uint8_t *cmd_buf, 843291a2b48SSukumar Swaminathan uint32_t cmd_size, uint8_t *rsp_buf, 844291a2b48SSukumar Swaminathan uint32_t *rsp_size); 845fcf3ce44SJohn Forte 846fcf3ce44SJohn Forte #ifdef SFCT_SUPPORT 847fcf3ce44SJohn Forte /* Module emlxs_fct.c External Routine Declarations */ 8488f23e9faSHans Rosenfeld extern uint32_t emlxs_fct_stmf_alloc(emlxs_hba_t *hba, 8498f23e9faSHans Rosenfeld MATCHMAP *mp); 8508f23e9faSHans Rosenfeld extern void emlxs_fct_stmf_free(emlxs_hba_t *hba, 8518f23e9faSHans Rosenfeld MATCHMAP *mp); 852291a2b48SSukumar Swaminathan extern void emlxs_fct_link_down(emlxs_port_t *port); 853291a2b48SSukumar Swaminathan extern void emlxs_fct_link_up(emlxs_port_t *port); 8548f23e9faSHans Rosenfeld extern uint32_t emlxs_fct_init(emlxs_hba_t *hba); 855291a2b48SSukumar Swaminathan extern void emlxs_fct_detach(emlxs_hba_t *hba); 856291a2b48SSukumar Swaminathan extern int emlxs_fct_handle_unsol_els(emlxs_port_t *port, 85782527734SSukumar Swaminathan CHANNEL *cp, IOCBQ *iocbq, MATCHMAP *mp, 858291a2b48SSukumar Swaminathan uint32_t size); 859291a2b48SSukumar Swaminathan extern int emlxs_fct_handle_unsol_req(emlxs_port_t *port, 86082527734SSukumar Swaminathan CHANNEL *cp, IOCBQ *iocbq, MATCHMAP *mp, 861291a2b48SSukumar Swaminathan uint32_t size); 862291a2b48SSukumar Swaminathan extern int emlxs_fct_handle_fcp_event(emlxs_hba_t *hba, 86382527734SSukumar Swaminathan CHANNEL *cp, IOCBQ *iocbq); 864291a2b48SSukumar Swaminathan extern void emlxs_fct_bind_port(emlxs_port_t *port); 865291a2b48SSukumar Swaminathan extern void emlxs_fct_unbind_port(emlxs_port_t *port); 866291a2b48SSukumar Swaminathan extern void emlxs_fct_unsol_callback(emlxs_port_t *port, 867291a2b48SSukumar Swaminathan fct_cmd_t *fct_cmd); 868291a2b48SSukumar Swaminathan extern void emlxs_fct_attach(emlxs_hba_t *hba); 869291a2b48SSukumar Swaminathan extern int emlxs_fct_port_shutdown(emlxs_port_t *port); 870291a2b48SSukumar Swaminathan extern int emlxs_fct_port_initialize(emlxs_port_t *port); 871fcf3ce44SJohn Forte 872fcf3ce44SJohn Forte #ifdef MODSYM_SUPPORT 873e51761e0SSukumar Swaminathan extern int emlxs_fct_modopen(); 874291a2b48SSukumar Swaminathan extern void emlxs_fct_modclose(); 875291a2b48SSukumar Swaminathan #endif /* MODSYM_SUPPORT */ 876291a2b48SSukumar Swaminathan 877291a2b48SSukumar Swaminathan #ifdef FCT_IO_TRACE 878291a2b48SSukumar Swaminathan extern void emlxs_fct_io_trace(emlxs_port_t *, 879291a2b48SSukumar Swaminathan fct_cmd_t *, uint32_t); 880291a2b48SSukumar Swaminathan #endif /* FCT_IO_TRACE */ 881291a2b48SSukumar Swaminathan #endif /* SFCT_SUPPORT */ 882291a2b48SSukumar Swaminathan 883291a2b48SSukumar Swaminathan #ifdef DUMP_SUPPORT 884291a2b48SSukumar Swaminathan /* Module emlxs_dump.c External Routine Declarations */ 885291a2b48SSukumar Swaminathan extern uint32_t emlxs_dump_drv_event(emlxs_hba_t *hba); 886291a2b48SSukumar Swaminathan extern uint32_t emlxs_dump_user_event(emlxs_hba_t *hba); 887291a2b48SSukumar Swaminathan extern uint32_t emlxs_dump_temp_event(emlxs_hba_t *hba, 888291a2b48SSukumar Swaminathan uint32_t tempType, uint32_t temp); 889bb63f56eSSukumar Swaminathan extern void emlxs_dump_drv_thread(emlxs_hba_t *hba, 890bb63f56eSSukumar Swaminathan void *arg1, void *arg2); 891bb63f56eSSukumar Swaminathan extern void emlxs_dump_user_thread(emlxs_hba_t *hba, 892bb63f56eSSukumar Swaminathan void *arg1, void *arg2); 893bb63f56eSSukumar Swaminathan extern void emlxs_dump_temp_thread(emlxs_hba_t *hba, 894bb63f56eSSukumar Swaminathan void *arg1, void *arg2); 895291a2b48SSukumar Swaminathan extern uint32_t emlxs_ftell(emlxs_file_t *fp); 896291a2b48SSukumar Swaminathan extern uint32_t emlxs_get_dump(emlxs_hba_t *hba, uint8_t *buffer, 897291a2b48SSukumar Swaminathan uint32_t *buflen); 898291a2b48SSukumar Swaminathan extern void emlxs_dump_wait(emlxs_hba_t *hba); 899291a2b48SSukumar Swaminathan extern void emlxs_dump(emlxs_hba_t *hba, uint32_t type, 900291a2b48SSukumar Swaminathan uint32_t temp_type, uint32_t temp); 901291a2b48SSukumar Swaminathan 90282527734SSukumar Swaminathan extern emlxs_file_t *emlxs_fopen(emlxs_hba_t *hba, uint32_t file_type); 90382527734SSukumar Swaminathan extern void emlxs_fflush(emlxs_file_t *fp); 90482527734SSukumar Swaminathan extern uint32_t emlxs_fclose(emlxs_file_t *fp); 90582527734SSukumar Swaminathan extern uint32_t emlxs_dump_word_dmpfile(emlxs_file_t *fpDmpFile, 90682527734SSukumar Swaminathan uint8_t *pBuffer, uint32_t bufferLen, 90782527734SSukumar Swaminathan int fSwap); 908291a2b48SSukumar Swaminathan #endif /* DUMP_SUPPORT */ 909fcf3ce44SJohn Forte 910a9800bebSGarrett D'Amore 911a9800bebSGarrett D'Amore /* Module emlxs_fcf.c External Routine Declarations */ 912a9800bebSGarrett D'Amore extern void emlxs_fcf_init(emlxs_hba_t *hba); 913a9800bebSGarrett D'Amore 914a9800bebSGarrett D'Amore extern void emlxs_fcf_fini(emlxs_hba_t *hba); 915a9800bebSGarrett D'Amore 916a9800bebSGarrett D'Amore extern uint32_t emlxs_vpi_port_bind_notify(emlxs_port_t *port); 917a9800bebSGarrett D'Amore 918a9800bebSGarrett D'Amore extern uint32_t emlxs_vpi_port_unbind_notify(emlxs_port_t *port, 919a9800bebSGarrett D'Amore uint32_t wait); 9208f23e9faSHans Rosenfeld extern uint32_t emlxs_vpi_logo_cmpl_notify(emlxs_port_t *port); 921a9800bebSGarrett D'Amore 922a9800bebSGarrett D'Amore extern uint32_t emlxs_vpi_logi_notify(emlxs_port_t *port, 923a9800bebSGarrett D'Amore emlxs_buf_t *sbp); 9248f23e9faSHans Rosenfeld extern uint32_t emlxs_vpi_logi_failed_notify(emlxs_port_t *port, 925a9800bebSGarrett D'Amore emlxs_buf_t *sbp); 926a9800bebSGarrett D'Amore extern uint32_t emlxs_vpi_rpi_offline_notify(emlxs_port_t *port, 927a9800bebSGarrett D'Amore uint32_t did, uint32_t rpi); 928a9800bebSGarrett D'Amore extern uint32_t emlxs_vpi_rpi_online_notify(emlxs_port_t *port, 929a9800bebSGarrett D'Amore uint32_t did, uint32_t rpi, uint32_t lock); 930a9800bebSGarrett D'Amore extern uint32_t emlxs_fcf_shutdown_notify(emlxs_port_t *port, 931a9800bebSGarrett D'Amore uint32_t wait); 932a9800bebSGarrett D'Amore extern uint32_t emlxs_fcf_linkup_notify(emlxs_port_t *port); 933a9800bebSGarrett D'Amore 934a9800bebSGarrett D'Amore extern uint32_t emlxs_fcf_linkdown_notify(emlxs_port_t *port); 935a9800bebSGarrett D'Amore 936a9800bebSGarrett D'Amore extern uint32_t emlxs_fcf_cvl_notify(emlxs_port_t *port, uint32_t vpi); 937a9800bebSGarrett D'Amore 938a9800bebSGarrett D'Amore extern uint32_t emlxs_fcf_full_notify(emlxs_port_t *port); 939a9800bebSGarrett D'Amore 940a9800bebSGarrett D'Amore extern uint32_t emlxs_fcf_found_notify(emlxs_port_t *port, 941a9800bebSGarrett D'Amore uint32_t fcf_index); 942a9800bebSGarrett D'Amore extern uint32_t emlxs_fcf_changed_notify(emlxs_port_t *port, 943a9800bebSGarrett D'Amore uint32_t fcf_index); 944a9800bebSGarrett D'Amore extern uint32_t emlxs_fcf_lost_notify(emlxs_port_t *port, 945a9800bebSGarrett D'Amore uint32_t fcf_index); 946a9800bebSGarrett D'Amore extern void emlxs_fcf_timer_notify(emlxs_hba_t *hba); 947a9800bebSGarrett D'Amore 948a9800bebSGarrett D'Amore 949a9800bebSGarrett D'Amore extern RPIobj_t *emlxs_rpi_find(emlxs_port_t *port, uint16_t rpi); 950a9800bebSGarrett D'Amore 9518f23e9faSHans Rosenfeld extern RPIobj_t *emlxs_rpi_reserve_notify(emlxs_port_t *port, 9528f23e9faSHans Rosenfeld uint32_t did, XRIobj_t *xrip); 953a9800bebSGarrett D'Amore extern RPIobj_t *emlxs_rpi_alloc_notify(emlxs_port_t *port, 954a9800bebSGarrett D'Amore uint32_t did); 955a9800bebSGarrett D'Amore extern uint32_t emlxs_rpi_free_notify(emlxs_port_t *port, 956a9800bebSGarrett D'Amore RPIobj_t *rpip); 957a9800bebSGarrett D'Amore extern uint32_t emlxs_rpi_online_notify(emlxs_port_t *port, 958a9800bebSGarrett D'Amore RPIobj_t *rpip, uint32_t did, SERV_PARM *sparam, 959a9800bebSGarrett D'Amore void *arg1, void *arg2, void *arg3); 960a9800bebSGarrett D'Amore extern uint32_t emlxs_rpi_offline_notify(emlxs_port_t *port, 961a9800bebSGarrett D'Amore RPIobj_t *rpip, void *arg1, void *arg2, 962a9800bebSGarrett D'Amore void *arg3); 963a9800bebSGarrett D'Amore extern uint32_t emlxs_rpi_pause_notify(emlxs_port_t *port, 964a9800bebSGarrett D'Amore RPIobj_t *rpip); 965a9800bebSGarrett D'Amore extern uint32_t emlxs_rpi_resume_notify(emlxs_port_t *port, 966a9800bebSGarrett D'Amore RPIobj_t *rpip, emlxs_buf_t *sbp); 967a9800bebSGarrett D'Amore 968a9800bebSGarrett D'Amore 969fcf3ce44SJohn Forte #ifdef __cplusplus 970fcf3ce44SJohn Forte } 971fcf3ce44SJohn Forte #endif 972fcf3ce44SJohn Forte 973fcf3ce44SJohn Forte #endif /* _EMLXS_EXTERN_H */ 974