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 * 8*8f23e9faSHans Rosenfeld * You can obtain a copy of the license at 9*8f23e9faSHans 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 /* 23*8f23e9faSHans 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 */ 69*8f23e9faSHans Rosenfeld extern uint32_t emlxs_flush_ct_event(emlxs_port_t *port, 70*8f23e9faSHans 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); 91*8f23e9faSHans 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 108*8f23e9faSHans 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 */ 135*8f23e9faSHans Rosenfeld 136*8f23e9faSHans Rosenfeld extern void emlxs_fca_link_up(emlxs_port_t *port); 137*8f23e9faSHans Rosenfeld 138*8f23e9faSHans Rosenfeld extern void emlxs_fca_link_down(emlxs_port_t *port); 139*8f23e9faSHans Rosenfeld 140*8f23e9faSHans Rosenfeld extern void emlxs_ulp_unsol_cb(emlxs_port_t *port, 141*8f23e9faSHans Rosenfeld fc_unsol_buf_t *ubp); 142*8f23e9faSHans Rosenfeld extern void emlxs_ulp_statec_cb(emlxs_port_t *port, 143*8f23e9faSHans Rosenfeld uint32_t statec); 144a9800bebSGarrett D'Amore extern int32_t emlxs_fca_reset(opaque_t fca_port_handle, 145*8f23e9faSHans 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); 169*8f23e9faSHans Rosenfeld extern char *emlxs_wwn_xlate(char *buffer, size_t len, 170*8f23e9faSHans Rosenfeld uint8_t *wwn); 171*8f23e9faSHans 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 222*8f23e9faSHans Rosenfeld extern char *emlxs_strtoupper(char *str); 223*8f23e9faSHans Rosenfeld 224*8f23e9faSHans Rosenfeld extern void emlxs_mode_set(emlxs_hba_t *hba); 225*8f23e9faSHans Rosenfeld 226*8f23e9faSHans Rosenfeld extern char *emlxs_mode_xlate(uint32_t mode); 227*8f23e9faSHans 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); 266*8f23e9faSHans Rosenfeld extern void emlxs_timer_cancel_clean_address( 267*8f23e9faSHans 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 */ 321*8f23e9faSHans Rosenfeld extern void emlxs_node_throttle_set(emlxs_port_t *port, 322*8f23e9faSHans 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, 334*8f23e9faSHans 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, 343*8f23e9faSHans 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, 371*8f23e9faSHans Rosenfeld uint32_t size, char *buffer, 372*8f23e9faSHans Rosenfeld size_t len); 373291a2b48SSukumar Swaminathan extern uint32_t emlxs_process_unsol_plogi(emlxs_port_t *port, 374291a2b48SSukumar Swaminathan IOCBQ *iocbq, MATCHMAP *mp, 375*8f23e9faSHans Rosenfeld uint32_t size, char *buffer, 376*8f23e9faSHans 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 */ 401*8f23e9faSHans Rosenfeld extern void emlxs_mb_get_port_name(emlxs_hba_t *hba, 402*8f23e9faSHans Rosenfeld MAILBOXQ *mbq); 403*8f23e9faSHans Rosenfeld extern void emlxs_mb_get_extents_info(emlxs_hba_t *hba, 404*8f23e9faSHans Rosenfeld MAILBOXQ *mbq, uint16_t type); 405*8f23e9faSHans Rosenfeld extern void emlxs_mb_get_extents(emlxs_hba_t *hba, 406*8f23e9faSHans Rosenfeld MAILBOXQ *mbq, uint16_t type); 407*8f23e9faSHans Rosenfeld extern void emlxs_mb_dealloc_extents(emlxs_hba_t *hba, 408*8f23e9faSHans Rosenfeld MAILBOXQ *mbq, uint16_t type); 409*8f23e9faSHans Rosenfeld extern void emlxs_mb_alloc_extents(emlxs_hba_t *hba, 410*8f23e9faSHans Rosenfeld MAILBOXQ *mbq, uint16_t type, 411*8f23e9faSHans Rosenfeld uint16_t count); 412*8f23e9faSHans Rosenfeld extern void emlxs_mb_get_sli4_params(emlxs_hba_t *hba, 413*8f23e9faSHans Rosenfeld MAILBOXQ *mbq); 414*8f23e9faSHans Rosenfeld extern char *emlxs_mb_xlate_status(uint32_t status); 415*8f23e9faSHans 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); 471*8f23e9faSHans 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); 48982527734SSukumar Swaminathan extern void emlxs_mb_request_features(emlxs_hba_t *hba, 490*8f23e9faSHans Rosenfeld MAILBOXQ *mbq, uint32_t mask); 49182527734SSukumar Swaminathan extern int emlxs_mb_resume_rpi(emlxs_hba_t *hba, 49282527734SSukumar Swaminathan emlxs_buf_t *sbp, uint16_t rpi); 49382527734SSukumar Swaminathan extern void emlxs_mb_noop(emlxs_hba_t *hba, 49482527734SSukumar Swaminathan MAILBOXQ *mbq); 49582527734SSukumar Swaminathan extern int emlxs_mbext_noop(emlxs_hba_t *hba, 49682527734SSukumar Swaminathan MAILBOXQ *mbq); 49782527734SSukumar Swaminathan extern void emlxs_mb_resetport(emlxs_hba_t *hba, 49882527734SSukumar Swaminathan MAILBOXQ *mbq); 49982527734SSukumar Swaminathan extern void emlxs_mb_eq_create(emlxs_hba_t *hba, 50082527734SSukumar Swaminathan MAILBOXQ *mbq, uint32_t num); 50182527734SSukumar Swaminathan extern void emlxs_mb_cq_create(emlxs_hba_t *hba, 50282527734SSukumar Swaminathan MAILBOXQ *mbq, uint32_t num); 50382527734SSukumar Swaminathan extern void emlxs_mb_wq_create(emlxs_hba_t *hba, 50482527734SSukumar Swaminathan MAILBOXQ *mbq, uint32_t num); 50582527734SSukumar Swaminathan extern void emlxs_mb_rq_create(emlxs_hba_t *hba, 50682527734SSukumar Swaminathan MAILBOXQ *mbq, uint32_t num); 50782527734SSukumar Swaminathan extern void emlxs_mb_mq_create(emlxs_hba_t *hba, 50882527734SSukumar Swaminathan MAILBOXQ *mbq); 509*8f23e9faSHans Rosenfeld extern void emlxs_mb_mq_create_ext(emlxs_hba_t *hba, 510a9800bebSGarrett D'Amore MAILBOXQ *mbq); 511a9800bebSGarrett D'Amore extern int emlxs_mb_reg_fcfi(emlxs_hba_t *hba, 51282527734SSukumar Swaminathan MAILBOXQ *mbq, FCFIobj_t *fcfp); 51382527734SSukumar Swaminathan extern int emlxs_mb_unreg_fcfi(emlxs_hba_t *hba, 51482527734SSukumar Swaminathan FCFIobj_t *fcfp); 51582527734SSukumar Swaminathan extern int emlxs_mb_reg_vfi(emlxs_hba_t *hba, 51682527734SSukumar Swaminathan MAILBOXQ *mb, VFIobj_t *vfip, 51782527734SSukumar Swaminathan emlxs_port_t *vpip); 51882527734SSukumar Swaminathan extern int emlxs_mb_unreg_vfi(emlxs_hba_t *hba, 51982527734SSukumar Swaminathan VFIobj_t *vfip); 52082527734SSukumar Swaminathan extern int emlxs_mbext_read_fcf_table(emlxs_hba_t *hba, 52182527734SSukumar Swaminathan MAILBOXQ *mbq, uint32_t index); 52282527734SSukumar Swaminathan extern int emlxs_mbext_add_fcf_table(emlxs_hba_t *hba, 52382527734SSukumar Swaminathan MAILBOXQ *mbq, uint32_t index); 524a9800bebSGarrett D'Amore extern void emlxs_mb_rediscover_fcf_table(emlxs_hba_t *hba, 525a9800bebSGarrett D'Amore MAILBOXQ *mbq); 526291a2b48SSukumar Swaminathan extern void emlxs_mb_async_event(emlxs_hba_t *hba, 52782527734SSukumar Swaminathan MAILBOXQ *mbq); 528291a2b48SSukumar Swaminathan extern int32_t emlxs_mb_check_sparm(emlxs_hba_t *hba, 529291a2b48SSukumar Swaminathan SERV_PARM *nsp); 53082527734SSukumar Swaminathan extern void emlxs_cmpl_mbox(emlxs_hba_t *hba, MAILBOXQ *mq); 53182527734SSukumar Swaminathan extern void emlxs_mb_dump(emlxs_hba_t *hba, MAILBOXQ *mbq, 532291a2b48SSukumar Swaminathan uint32_t offset, uint32_t words); 53382527734SSukumar Swaminathan extern void emlxs_mb_retry(emlxs_hba_t *hba, MAILBOXQ *mbq); 534291a2b48SSukumar Swaminathan extern void emlxs_mb_init(emlxs_hba_t *hba, MAILBOXQ *mbq, 535291a2b48SSukumar Swaminathan uint32_t flag, uint32_t tmo); 536291a2b48SSukumar Swaminathan extern void emlxs_mb_config_hbq(emlxs_hba_t *hba, 53782527734SSukumar Swaminathan MAILBOXQ *mbq, int hbq_id); 538fcf3ce44SJohn Forte 539fcf3ce44SJohn Forte /* Module emlxs_mem.c External Routine Declarations */ 540*8f23e9faSHans Rosenfeld extern void *emlxs_mem_pool_get(emlxs_hba_t *hba, 541*8f23e9faSHans Rosenfeld MEMSEG *seg); 542*8f23e9faSHans Rosenfeld extern void emlxs_mem_pool_put(emlxs_hba_t *hba, 543*8f23e9faSHans Rosenfeld MEMSEG *seg, void *bp); 544*8f23e9faSHans Rosenfeld extern uint32_t emlxs_mem_pool_create(emlxs_hba_t *hba, 545*8f23e9faSHans Rosenfeld MEMSEG *seg); 546*8f23e9faSHans Rosenfeld extern void emlxs_mem_pool_destroy(emlxs_hba_t *hba, 547*8f23e9faSHans Rosenfeld MEMSEG *seg); 548*8f23e9faSHans Rosenfeld extern void emlxs_mem_pool_clean(emlxs_hba_t *hba, 549*8f23e9faSHans Rosenfeld MEMSEG *seg); 550291a2b48SSukumar Swaminathan extern MATCHMAP *emlxs_mem_get_vaddr(emlxs_hba_t *hba, 551291a2b48SSukumar Swaminathan RING *rp, uint64_t mapbp); 552a9800bebSGarrett D'Amore extern void *emlxs_mem_get(emlxs_hba_t *hba, 553*8f23e9faSHans Rosenfeld uint32_t seg_id); 554a9800bebSGarrett D'Amore extern void emlxs_mem_put(emlxs_hba_t *hba, 555a9800bebSGarrett D'Amore uint32_t seg_id, void *bp); 556291a2b48SSukumar Swaminathan extern int32_t emlxs_mem_free_buffer(emlxs_hba_t *hba); 557291a2b48SSukumar Swaminathan extern int32_t emlxs_mem_alloc_buffer(emlxs_hba_t *hba); 558291a2b48SSukumar Swaminathan extern void emlxs_mem_map_vaddr(emlxs_hba_t *hba, 559291a2b48SSukumar Swaminathan RING *rp, MATCHMAP *mp, uint32_t *haddr, 560291a2b48SSukumar Swaminathan uint32_t *laddr); 56182527734SSukumar Swaminathan extern MATCHMAP *emlxs_mem_buf_alloc(emlxs_hba_t *hba, 56282527734SSukumar Swaminathan uint32_t size); 563a9800bebSGarrett D'Amore extern void emlxs_mem_buf_free(emlxs_hba_t *hba, 56482527734SSukumar Swaminathan MATCHMAP *mp); 565291a2b48SSukumar Swaminathan extern uint32_t emlxs_hbq_alloc(emlxs_hba_t *hba, 566291a2b48SSukumar Swaminathan uint32_t hbq_id); 567fcf3ce44SJohn Forte 568fcf3ce44SJohn Forte /* Module emlxs_hba.c External Routine Declarations */ 569*8f23e9faSHans Rosenfeld extern char *emlxs_pci_cap_xlate(uint32_t id); 570*8f23e9faSHans Rosenfeld extern char *emlxs_pci_ecap_xlate(uint32_t id); 571*8f23e9faSHans Rosenfeld 572291a2b48SSukumar Swaminathan extern void emlxs_decode_firmware_rev(emlxs_hba_t *hba, 573291a2b48SSukumar Swaminathan emlxs_vpd_t *vp); 574291a2b48SSukumar Swaminathan extern uint32_t emlxs_init_adapter_info(emlxs_hba_t *hba); 575291a2b48SSukumar Swaminathan extern uint32_t emlxs_strtol(char *str, uint32_t base); 576291a2b48SSukumar Swaminathan extern uint64_t emlxs_strtoll(char *str, uint32_t base); 577291a2b48SSukumar Swaminathan extern void emlxs_decode_version(uint32_t version, 578*8f23e9faSHans Rosenfeld char *buffer, size_t len); 579291a2b48SSukumar Swaminathan extern char *emlxs_ffstate_xlate(uint32_t new_state); 580291a2b48SSukumar Swaminathan extern char *emlxs_ring_xlate(uint32_t ringno); 58182527734SSukumar Swaminathan extern void emlxs_proc_channel(emlxs_hba_t *hba, 58282527734SSukumar Swaminathan CHANNEL *cp, void *arg2); 583291a2b48SSukumar Swaminathan extern void emlxs_pcix_mxr_update(emlxs_hba_t *hba, 584291a2b48SSukumar Swaminathan uint32_t verbose); 585bb63f56eSSukumar Swaminathan extern void emlxs_restart_thread(emlxs_hba_t *hba, 586bb63f56eSSukumar Swaminathan void *arg1, void *arg2); 587291a2b48SSukumar Swaminathan extern void emlxs_fw_show(emlxs_hba_t *hba); 58882527734SSukumar Swaminathan extern void emlxs_proc_channel_event(emlxs_hba_t *hba, 58982527734SSukumar Swaminathan CHANNEL *cp, IOCBQ *iocbq); 590291a2b48SSukumar Swaminathan 59182527734SSukumar Swaminathan #ifdef MODFW_SUPPORT 59282527734SSukumar Swaminathan extern void emlxs_fw_load(emlxs_hba_t *hba, 59382527734SSukumar Swaminathan emlxs_firmware_t *fw); 59482527734SSukumar Swaminathan extern void emlxs_fw_unload(emlxs_hba_t *hba, 59582527734SSukumar Swaminathan emlxs_firmware_t *fw); 59682527734SSukumar Swaminathan #endif /* MODFW_SUPPORT */ 597fcf3ce44SJohn Forte 598fcf3ce44SJohn Forte #ifdef MSI_SUPPORT 599291a2b48SSukumar Swaminathan extern int32_t emlxs_msi_add(emlxs_hba_t *hba); 600291a2b48SSukumar Swaminathan extern int32_t emlxs_msi_remove(emlxs_hba_t *hba); 601291a2b48SSukumar Swaminathan extern int32_t emlxs_msi_init(emlxs_hba_t *hba, uint32_t max); 602291a2b48SSukumar Swaminathan extern int32_t emlxs_msi_uninit(emlxs_hba_t *hba); 603fcf3ce44SJohn Forte #endif /* MSI_SUPPORT */ 604fcf3ce44SJohn Forte 605291a2b48SSukumar Swaminathan extern int32_t emlxs_intx_add(emlxs_hba_t *hba); 606291a2b48SSukumar Swaminathan extern int32_t emlxs_intx_remove(emlxs_hba_t *hba); 607291a2b48SSukumar Swaminathan extern int32_t emlxs_intx_init(emlxs_hba_t *hba, uint32_t max); 608291a2b48SSukumar Swaminathan extern int32_t emlxs_intx_uninit(emlxs_hba_t *hba); 609291a2b48SSukumar Swaminathan 61082527734SSukumar Swaminathan extern void emlxs_parse_prog_types(emlxs_hba_t *hba, 61182527734SSukumar Swaminathan char *types); 61282527734SSukumar Swaminathan extern int32_t emlxs_parse_vpd(emlxs_hba_t *hba, uint8_t *vpd, 61382527734SSukumar Swaminathan uint32_t size); 61482527734SSukumar Swaminathan extern int32_t emlxs_parse_fcoe(emlxs_hba_t *hba, uint8_t *p, 61582527734SSukumar Swaminathan uint32_t size); 616291a2b48SSukumar Swaminathan 61782527734SSukumar Swaminathan extern void emlxs_decode_label(char *label, char *buffer, 618*8f23e9faSHans Rosenfeld int bige, size_t len); 61982527734SSukumar Swaminathan extern void emlxs_build_prog_types(emlxs_hba_t *hba, 620*8f23e9faSHans Rosenfeld emlxs_vpd_t *vpd); 62182527734SSukumar Swaminathan extern void emlxs_process_link_speed(emlxs_hba_t *hba); 622291a2b48SSukumar Swaminathan 62382527734SSukumar Swaminathan extern uint32_t emlxs_iotag_flush(emlxs_hba_t *hba); 624291a2b48SSukumar Swaminathan 62582527734SSukumar Swaminathan extern int emlxs_pci_model_count; 62682527734SSukumar Swaminathan extern emlxs_model_t emlxs_pci_model[]; 627291a2b48SSukumar Swaminathan 62882527734SSukumar Swaminathan extern int emlxs_fw_count; 62982527734SSukumar Swaminathan extern emlxs_firmware_t emlxs_fw_table[]; 630291a2b48SSukumar Swaminathan 631291a2b48SSukumar Swaminathan 63282527734SSukumar Swaminathan /* Module emlxs_sli3.c External Routine Declarations */ 63382527734SSukumar Swaminathan extern emlxs_sli_api_t emlxs_sli3_api; 634291a2b48SSukumar Swaminathan 635291a2b48SSukumar Swaminathan extern int emlxs_handle_rcv_seq(emlxs_hba_t *hba, 63682527734SSukumar Swaminathan CHANNEL *cp, IOCBQ *iocbq); 637291a2b48SSukumar Swaminathan extern void emlxs_update_HBQ_index(emlxs_hba_t *hba, 638291a2b48SSukumar Swaminathan uint32_t hbq_id); 639291a2b48SSukumar Swaminathan extern void emlxs_hbq_free_all(emlxs_hba_t *hba, 640291a2b48SSukumar Swaminathan uint32_t hbq_id); 64182527734SSukumar Swaminathan 64282527734SSukumar Swaminathan /* Module emlxs_sli4.c External Routine Declarations */ 643*8f23e9faSHans Rosenfeld 644*8f23e9faSHans Rosenfeld extern uint32_t emlxs_sli4_vfi_to_index(emlxs_hba_t *hba, 645*8f23e9faSHans Rosenfeld uint32_t vfi); 646*8f23e9faSHans Rosenfeld extern uint32_t emlxs_sli4_index_to_vfi(emlxs_hba_t *hba, 647*8f23e9faSHans Rosenfeld uint32_t index); 648*8f23e9faSHans Rosenfeld extern uint32_t emlxs_sli4_vpi_to_index(emlxs_hba_t *hba, 649*8f23e9faSHans Rosenfeld uint32_t vpi); 650*8f23e9faSHans Rosenfeld extern uint32_t emlxs_sli4_index_to_vpi(emlxs_hba_t *hba, 651*8f23e9faSHans Rosenfeld uint32_t index); 652*8f23e9faSHans Rosenfeld extern uint32_t emlxs_sli4_xri_to_index(emlxs_hba_t *hba, 653*8f23e9faSHans Rosenfeld uint32_t xri); 654*8f23e9faSHans Rosenfeld extern uint32_t emlxs_sli4_index_to_xri(emlxs_hba_t *hba, 655*8f23e9faSHans Rosenfeld uint32_t index); 656*8f23e9faSHans Rosenfeld extern uint32_t emlxs_sli4_rpi_to_index(emlxs_hba_t *hba, 657*8f23e9faSHans Rosenfeld uint32_t rpi); 658*8f23e9faSHans Rosenfeld extern uint32_t emlxs_sli4_index_to_rpi(emlxs_hba_t *hba, 659*8f23e9faSHans Rosenfeld uint32_t index); 660*8f23e9faSHans Rosenfeld 661a9800bebSGarrett D'Amore extern uint32_t emlxs_sli4_unreg_all_nodes( 662*8f23e9faSHans Rosenfeld emlxs_port_t *port); 663*8f23e9faSHans Rosenfeld extern void emlxs_sli4_hba_reset_all(emlxs_hba_t *hba, 664*8f23e9faSHans Rosenfeld uint32_t flag); 665*8f23e9faSHans Rosenfeld extern XRIobj_t *emlxs_sli4_reserve_xri(emlxs_port_t *port, 666*8f23e9faSHans Rosenfeld RPIobj_t *rpip, uint32_t type, 667*8f23e9faSHans Rosenfeld uint16_t rx_id); 66882527734SSukumar Swaminathan extern emlxs_sli_api_t emlxs_sli4_api; 66982527734SSukumar Swaminathan 67082527734SSukumar Swaminathan extern FCFIobj_t *emlxs_sli4_assign_fcfi(emlxs_hba_t *hba, 671a9800bebSGarrett D'Amore FCF_RECORD_t *fcfrec, 672a9800bebSGarrett D'Amore uint32_t event_tag); 673a9800bebSGarrett D'Amore extern void emlxs_data_dump(emlxs_port_t *port, char *str, 67482527734SSukumar Swaminathan uint32_t *data, int cnt, int err); 67582527734SSukumar Swaminathan extern void emlxs_ue_dump(emlxs_hba_t *hba, char *str); 67682527734SSukumar Swaminathan 677*8f23e9faSHans Rosenfeld extern XRIobj_t *emlxs_sli4_find_xri(emlxs_port_t *port, 67882527734SSukumar Swaminathan uint16_t xri); 67982527734SSukumar Swaminathan extern VFIobj_t *emlxs_sli4_alloc_vfi(emlxs_hba_t *hba, 68082527734SSukumar Swaminathan FCFIobj_t *fp); 68182527734SSukumar Swaminathan extern void emlxs_sli4_free_vfi(emlxs_hba_t *hba, 68282527734SSukumar Swaminathan VFIobj_t *xp); 68382527734SSukumar Swaminathan extern void emlxs_sli4_free_fcfi(emlxs_hba_t *hba, 68482527734SSukumar Swaminathan FCFIobj_t *xp); 685*8f23e9faSHans Rosenfeld extern void emlxs_sli4_free_xri(emlxs_port_t *port, 686a9800bebSGarrett D'Amore emlxs_buf_t *sbp, XRIobj_t *xp, 687a9800bebSGarrett D'Amore uint8_t lock); 68882527734SSukumar Swaminathan extern FCFIobj_t *emlxs_sli4_bind_fcfi(emlxs_hba_t *hba); 68982527734SSukumar Swaminathan 690*8f23e9faSHans Rosenfeld extern uint32_t emlxs_sli4_unreserve_xri(emlxs_port_t *port, 691a9800bebSGarrett D'Amore uint16_t xri, uint32_t lock); 692*8f23e9faSHans Rosenfeld extern XRIobj_t *emlxs_sli4_register_xri(emlxs_port_t *port, 693*8f23e9faSHans Rosenfeld emlxs_buf_t *sbp, uint16_t xri, 694*8f23e9faSHans Rosenfeld uint32_t did); 695*8f23e9faSHans Rosenfeld 696fcf3ce44SJohn Forte 697fcf3ce44SJohn Forte /* Module emlxs_diag.c External Routine Declarations */ 698291a2b48SSukumar Swaminathan extern uint32_t emlxs_diag_post_run(emlxs_hba_t *hba); 699291a2b48SSukumar Swaminathan extern uint32_t emlxs_diag_biu_run(emlxs_hba_t *hba, 700291a2b48SSukumar Swaminathan uint32_t pattern); 701291a2b48SSukumar Swaminathan extern uint32_t emlxs_diag_pattern[256]; 702291a2b48SSukumar Swaminathan extern uint32_t emlxs_diag_echo_run(emlxs_port_t *port, 703291a2b48SSukumar Swaminathan uint32_t did, uint32_t pattern); 704fcf3ce44SJohn Forte 705fcf3ce44SJohn Forte /* Module emlxs_download.c External Routine Declarations */ 706a9800bebSGarrett D'Amore extern void emlxs_memset(uint8_t *buffer, uint8_t value, 707a9800bebSGarrett D'Amore uint32_t size); 708291a2b48SSukumar Swaminathan extern int32_t emlxs_fw_download(emlxs_hba_t *hba, 709291a2b48SSukumar Swaminathan caddr_t buffer, uint32_t len, 710291a2b48SSukumar Swaminathan uint32_t offline); 711291a2b48SSukumar Swaminathan extern uint32_t emlxs_get_max_sram(emlxs_hba_t *hba, 712291a2b48SSukumar Swaminathan uint32_t *MaxRbusSize, 713291a2b48SSukumar Swaminathan uint32_t *MaxIbusSize); 714291a2b48SSukumar Swaminathan extern uint32_t emlxs_get_load_list(emlxs_hba_t *hba, 715291a2b48SSukumar Swaminathan PROG_ID *load_list); 716291a2b48SSukumar Swaminathan extern uint32_t emlxs_read_wakeup_parms(emlxs_hba_t *hba, 717291a2b48SSukumar Swaminathan PWAKE_UP_PARMS WakeUpParms, 718291a2b48SSukumar Swaminathan uint32_t verbose); 719291a2b48SSukumar Swaminathan extern int32_t emlxs_cfl_download(emlxs_hba_t *hba, 720291a2b48SSukumar Swaminathan uint32_t region, caddr_t buffer, 721291a2b48SSukumar Swaminathan uint32_t len); 722291a2b48SSukumar Swaminathan 723291a2b48SSukumar Swaminathan extern int32_t emlxs_boot_code_disable(emlxs_hba_t *hba); 724291a2b48SSukumar Swaminathan extern int32_t emlxs_boot_code_enable(emlxs_hba_t *hba); 725291a2b48SSukumar Swaminathan extern int32_t emlxs_boot_code_state(emlxs_hba_t *hba); 726fcf3ce44SJohn Forte 727*8f23e9faSHans Rosenfeld extern int32_t emlxs_be_read_fw_version(emlxs_hba_t *hba, 72882527734SSukumar Swaminathan emlxs_firmware_t *fw); 72982527734SSukumar Swaminathan 730fcf3ce44SJohn Forte /* Module emlxs_fcp.c External Routine Declarations */ 731291a2b48SSukumar Swaminathan extern int emlxs_power_up(emlxs_hba_t *hba); 732291a2b48SSukumar Swaminathan extern int emlxs_power_down(emlxs_hba_t *hba); 733291a2b48SSukumar Swaminathan extern int emlxs_reset_link(emlxs_hba_t *hba, 73482527734SSukumar Swaminathan uint32_t linkup, uint32_t wait); 73582527734SSukumar Swaminathan extern emlxs_buf_t *emlxs_unregister_pkt(CHANNEL *cp, 736291a2b48SSukumar Swaminathan uint16_t iotag, uint32_t forced); 73782527734SSukumar Swaminathan extern uint16_t emlxs_register_pkt(CHANNEL *cp, 738291a2b48SSukumar Swaminathan emlxs_buf_t *sbp); 739291a2b48SSukumar Swaminathan 740291a2b48SSukumar Swaminathan extern IOCBQ *emlxs_create_abort_xri_cn(emlxs_port_t *port, 741291a2b48SSukumar Swaminathan NODELIST *ndlp, uint16_t iotag, 74282527734SSukumar Swaminathan CHANNEL *cp, uint8_t class, 74382527734SSukumar Swaminathan int32_t flag); 744291a2b48SSukumar Swaminathan extern IOCBQ *emlxs_create_close_xri_cn(emlxs_port_t *port, 745291a2b48SSukumar Swaminathan NODELIST *ndlp, uint16_t iotag, 74682527734SSukumar Swaminathan CHANNEL *cp); 747291a2b48SSukumar Swaminathan extern IOCBQ *emlxs_create_abort_xri_cx(emlxs_port_t *port, 74882527734SSukumar Swaminathan NODELIST *ndlp, uint16_t xid, 74982527734SSukumar Swaminathan CHANNEL *cp, uint8_t class, 75082527734SSukumar Swaminathan int32_t flag); 751291a2b48SSukumar Swaminathan extern IOCBQ *emlxs_create_close_xri_cx(emlxs_port_t *port, 75282527734SSukumar Swaminathan NODELIST *ndlp, uint16_t xid, 75382527734SSukumar Swaminathan CHANNEL *cp); 754bb63f56eSSukumar Swaminathan extern void emlxs_abort_ct_exchange(emlxs_hba_t *hba, 755bb63f56eSSukumar Swaminathan emlxs_port_t *port, uint32_t rxid); 756fe199829SSukumar Swaminathan extern void emlxs_abort_els_exchange(emlxs_hba_t *hba, 757fe199829SSukumar Swaminathan emlxs_port_t *port, uint32_t rxid); 758a9800bebSGarrett D'Amore extern void emlxs_close_els_exchange(emlxs_hba_t *hba, 759a9800bebSGarrett D'Amore emlxs_port_t *port, uint32_t rxid); 760fe199829SSukumar Swaminathan extern void emlxs_abort_fct_exchange(emlxs_hba_t *hba, 761fe199829SSukumar Swaminathan emlxs_port_t *port, uint32_t rxid); 76282527734SSukumar Swaminathan extern emlxs_buf_t *emlxs_chipq_get(CHANNEL *cp, uint16_t iotag); 76382527734SSukumar Swaminathan extern void emlxs_chipq_put(CHANNEL *cp, emlxs_buf_t *sbp); 764291a2b48SSukumar Swaminathan extern uint32_t emlxs_chipq_node_flush(emlxs_port_t *port, 76582527734SSukumar Swaminathan CHANNEL *cp, NODELIST *ndlp, 766291a2b48SSukumar Swaminathan emlxs_buf_t *fpkt); 767291a2b48SSukumar Swaminathan extern uint32_t emlxs_chipq_lun_flush(emlxs_port_t *port, 768291a2b48SSukumar Swaminathan NODELIST *ndlp, uint32_t lun, 769291a2b48SSukumar Swaminathan emlxs_buf_t *fpkt); 770291a2b48SSukumar Swaminathan extern uint32_t emlxs_chipq_node_check(emlxs_port_t *port, 77182527734SSukumar Swaminathan CHANNEL *cp, NODELIST *ndlp); 772291a2b48SSukumar Swaminathan 77382527734SSukumar Swaminathan extern IOCBQ *emlxs_tx_get(CHANNEL *cp, uint32_t lock); 774291a2b48SSukumar Swaminathan extern void emlxs_tx_put(IOCBQ *iocbq, uint32_t lock); 77582527734SSukumar Swaminathan extern void emlxs_tx_move(NODELIST *ndlp, CHANNEL *from, 77682527734SSukumar Swaminathan CHANNEL *to, uint32_t cmd, 77782527734SSukumar Swaminathan emlxs_buf_t *fpkt, uint32_t lock); 77882527734SSukumar Swaminathan 779291a2b48SSukumar Swaminathan extern uint32_t emlxs_tx_node_check(emlxs_port_t *port, 78082527734SSukumar Swaminathan NODELIST *ndlp, CHANNEL *cp); 781291a2b48SSukumar Swaminathan extern uint32_t emlxs_tx_node_flush(emlxs_port_t *port, 78282527734SSukumar Swaminathan NODELIST *ndlp, CHANNEL *cp, 783291a2b48SSukumar Swaminathan uint32_t shutdown, emlxs_buf_t *fpkt); 784291a2b48SSukumar Swaminathan extern uint32_t emlxs_tx_lun_flush(emlxs_port_t *port, 785291a2b48SSukumar Swaminathan NODELIST *ndlp, uint32_t lun, 786291a2b48SSukumar Swaminathan emlxs_buf_t *fpkt); 78782527734SSukumar Swaminathan extern uint32_t emlxs_tx_channel_flush(emlxs_hba_t *hba, 78882527734SSukumar Swaminathan CHANNEL *cp, emlxs_buf_t *fpkt); 789291a2b48SSukumar Swaminathan 790291a2b48SSukumar Swaminathan extern void emlxs_linkdown(emlxs_hba_t *hba); 791291a2b48SSukumar Swaminathan extern void emlxs_linkup(emlxs_hba_t *hba); 792291a2b48SSukumar Swaminathan extern void emlxs_port_online(emlxs_port_t *port); 793291a2b48SSukumar Swaminathan extern int32_t emlxs_port_offline(emlxs_port_t *port, 794291a2b48SSukumar Swaminathan uint32_t scope); 795291a2b48SSukumar Swaminathan extern void emlxs_ffcleanup(emlxs_hba_t *hba); 796*8f23e9faSHans Rosenfeld extern int32_t emlxs_offline(emlxs_hba_t *hba, 797*8f23e9faSHans Rosenfeld uint32_t reset_requested); 798291a2b48SSukumar Swaminathan extern int32_t emlxs_online(emlxs_hba_t *hba); 799291a2b48SSukumar Swaminathan extern int32_t emlxs_post_buffer(emlxs_hba_t *hba, 800291a2b48SSukumar Swaminathan RING *rp, int16_t cnt); 801291a2b48SSukumar Swaminathan extern void emlxs_ff_start(emlxs_hba_t *hba); 802291a2b48SSukumar Swaminathan extern void emlxs_handle_fcp_event(emlxs_hba_t *hba, 80382527734SSukumar Swaminathan CHANNEL *rp, IOCBQ *temp); 804291a2b48SSukumar Swaminathan extern int emlxs_fct_handle_abort(emlxs_hba_t *hba, 80582527734SSukumar Swaminathan CHANNEL *rp, IOCBQ *iocbq); 806fcf3ce44SJohn Forte 807fcf3ce44SJohn Forte /* Module emlxs_thread.c External Routine Declarations */ 808291a2b48SSukumar Swaminathan extern void emlxs_taskq_destroy(emlxs_taskq_t *taskq); 809291a2b48SSukumar Swaminathan extern void emlxs_taskq_create(emlxs_hba_t *hba, 810291a2b48SSukumar Swaminathan emlxs_taskq_t *taskq); 811291a2b48SSukumar Swaminathan extern uint32_t emlxs_taskq_dispatch(emlxs_taskq_t *taskq, 812291a2b48SSukumar Swaminathan void (*func) (), void *arg); 813291a2b48SSukumar Swaminathan extern void emlxs_thread_create(emlxs_hba_t *hba, 814291a2b48SSukumar Swaminathan emlxs_thread_t *ethread); 815291a2b48SSukumar Swaminathan extern void emlxs_thread_destroy(emlxs_thread_t *ethread); 816291a2b48SSukumar Swaminathan extern void emlxs_thread_trigger1(emlxs_thread_t *ethread, 817291a2b48SSukumar Swaminathan void (*func) ()); 818291a2b48SSukumar Swaminathan extern void emlxs_thread_trigger2(emlxs_thread_t *ethread, 81982527734SSukumar Swaminathan void (*func) (), CHANNEL *cp); 820bb63f56eSSukumar Swaminathan extern void emlxs_thread_spawn(emlxs_hba_t *hba, 821bb63f56eSSukumar Swaminathan void (*func) (), void *arg1, 822bb63f56eSSukumar Swaminathan void *arg2); 823bb63f56eSSukumar Swaminathan extern void emlxs_thread_spawn_create(emlxs_hba_t *hba); 824bb63f56eSSukumar Swaminathan extern void emlxs_thread_spawn_destroy(emlxs_hba_t *hba); 825fcf3ce44SJohn Forte 826fcf3ce44SJohn Forte /* Module emlxs_dfc.c External Routine Declarations */ 827291a2b48SSukumar Swaminathan extern int32_t emlxs_dfc_manage(emlxs_hba_t *hba, void *dfc, 828291a2b48SSukumar Swaminathan int32_t mode); 829291a2b48SSukumar Swaminathan extern int32_t emlxs_dfc_handle_event(emlxs_hba_t *hba, 83082527734SSukumar Swaminathan CHANNEL *cp, IOCBQ *temp); 831291a2b48SSukumar Swaminathan extern int emlxs_dfc_handle_unsol_req(emlxs_port_t *port, 83282527734SSukumar Swaminathan CHANNEL *cp, IOCBQ *iocbq, 83382527734SSukumar Swaminathan MATCHMAP *mp, uint32_t size); 834bb63f56eSSukumar Swaminathan extern void emlxs_fcoe_attention_thread(emlxs_hba_t *hba, 835bb63f56eSSukumar Swaminathan void *arg1, void *arg2); 836291a2b48SSukumar Swaminathan extern uint32_t emlxs_set_hba_mode(emlxs_hba_t *hba, uint32_t mode); 837291a2b48SSukumar Swaminathan extern uint32_t emlxs_get_dump_region(emlxs_hba_t *hba, uint32_t region, 838291a2b48SSukumar Swaminathan uint8_t *buffer, uint32_t *psize); 839291a2b48SSukumar Swaminathan extern int32_t emlxs_send_menlo_cmd(emlxs_hba_t *hba, uint8_t *cmd_buf, 840291a2b48SSukumar Swaminathan uint32_t cmd_size, uint8_t *rsp_buf, 841291a2b48SSukumar Swaminathan uint32_t *rsp_size); 842fcf3ce44SJohn Forte 843fcf3ce44SJohn Forte #ifdef SFCT_SUPPORT 844fcf3ce44SJohn Forte /* Module emlxs_fct.c External Routine Declarations */ 845*8f23e9faSHans Rosenfeld extern uint32_t emlxs_fct_stmf_alloc(emlxs_hba_t *hba, 846*8f23e9faSHans Rosenfeld MATCHMAP *mp); 847*8f23e9faSHans Rosenfeld extern void emlxs_fct_stmf_free(emlxs_hba_t *hba, 848*8f23e9faSHans Rosenfeld MATCHMAP *mp); 849291a2b48SSukumar Swaminathan extern void emlxs_fct_link_down(emlxs_port_t *port); 850291a2b48SSukumar Swaminathan extern void emlxs_fct_link_up(emlxs_port_t *port); 851*8f23e9faSHans Rosenfeld extern uint32_t emlxs_fct_init(emlxs_hba_t *hba); 852291a2b48SSukumar Swaminathan extern void emlxs_fct_detach(emlxs_hba_t *hba); 853291a2b48SSukumar Swaminathan extern int emlxs_fct_handle_unsol_els(emlxs_port_t *port, 85482527734SSukumar Swaminathan CHANNEL *cp, IOCBQ *iocbq, MATCHMAP *mp, 855291a2b48SSukumar Swaminathan uint32_t size); 856291a2b48SSukumar Swaminathan extern int emlxs_fct_handle_unsol_req(emlxs_port_t *port, 85782527734SSukumar Swaminathan CHANNEL *cp, IOCBQ *iocbq, MATCHMAP *mp, 858291a2b48SSukumar Swaminathan uint32_t size); 859291a2b48SSukumar Swaminathan extern int emlxs_fct_handle_fcp_event(emlxs_hba_t *hba, 86082527734SSukumar Swaminathan CHANNEL *cp, IOCBQ *iocbq); 861291a2b48SSukumar Swaminathan extern void emlxs_fct_bind_port(emlxs_port_t *port); 862291a2b48SSukumar Swaminathan extern void emlxs_fct_unbind_port(emlxs_port_t *port); 863291a2b48SSukumar Swaminathan extern void emlxs_fct_unsol_callback(emlxs_port_t *port, 864291a2b48SSukumar Swaminathan fct_cmd_t *fct_cmd); 865291a2b48SSukumar Swaminathan extern void emlxs_fct_attach(emlxs_hba_t *hba); 866291a2b48SSukumar Swaminathan extern int emlxs_fct_port_shutdown(emlxs_port_t *port); 867291a2b48SSukumar Swaminathan extern int emlxs_fct_port_initialize(emlxs_port_t *port); 868fcf3ce44SJohn Forte 869fcf3ce44SJohn Forte #ifdef MODSYM_SUPPORT 870e51761e0SSukumar Swaminathan extern int emlxs_fct_modopen(); 871291a2b48SSukumar Swaminathan extern void emlxs_fct_modclose(); 872291a2b48SSukumar Swaminathan #endif /* MODSYM_SUPPORT */ 873291a2b48SSukumar Swaminathan 874291a2b48SSukumar Swaminathan #ifdef FCT_IO_TRACE 875291a2b48SSukumar Swaminathan extern void emlxs_fct_io_trace(emlxs_port_t *, 876291a2b48SSukumar Swaminathan fct_cmd_t *, uint32_t); 877291a2b48SSukumar Swaminathan #endif /* FCT_IO_TRACE */ 878291a2b48SSukumar Swaminathan #endif /* SFCT_SUPPORT */ 879291a2b48SSukumar Swaminathan 880291a2b48SSukumar Swaminathan #ifdef DUMP_SUPPORT 881291a2b48SSukumar Swaminathan /* Module emlxs_dump.c External Routine Declarations */ 882291a2b48SSukumar Swaminathan extern uint32_t emlxs_dump_drv_event(emlxs_hba_t *hba); 883291a2b48SSukumar Swaminathan extern uint32_t emlxs_dump_user_event(emlxs_hba_t *hba); 884291a2b48SSukumar Swaminathan extern uint32_t emlxs_dump_temp_event(emlxs_hba_t *hba, 885291a2b48SSukumar Swaminathan uint32_t tempType, uint32_t temp); 886bb63f56eSSukumar Swaminathan extern void emlxs_dump_drv_thread(emlxs_hba_t *hba, 887bb63f56eSSukumar Swaminathan void *arg1, void *arg2); 888bb63f56eSSukumar Swaminathan extern void emlxs_dump_user_thread(emlxs_hba_t *hba, 889bb63f56eSSukumar Swaminathan void *arg1, void *arg2); 890bb63f56eSSukumar Swaminathan extern void emlxs_dump_temp_thread(emlxs_hba_t *hba, 891bb63f56eSSukumar Swaminathan void *arg1, void *arg2); 892291a2b48SSukumar Swaminathan extern uint32_t emlxs_ftell(emlxs_file_t *fp); 893291a2b48SSukumar Swaminathan extern uint32_t emlxs_get_dump(emlxs_hba_t *hba, uint8_t *buffer, 894291a2b48SSukumar Swaminathan uint32_t *buflen); 895291a2b48SSukumar Swaminathan extern void emlxs_dump_wait(emlxs_hba_t *hba); 896291a2b48SSukumar Swaminathan extern void emlxs_dump(emlxs_hba_t *hba, uint32_t type, 897291a2b48SSukumar Swaminathan uint32_t temp_type, uint32_t temp); 898291a2b48SSukumar Swaminathan 89982527734SSukumar Swaminathan extern emlxs_file_t *emlxs_fopen(emlxs_hba_t *hba, uint32_t file_type); 90082527734SSukumar Swaminathan extern void emlxs_fflush(emlxs_file_t *fp); 90182527734SSukumar Swaminathan extern uint32_t emlxs_fclose(emlxs_file_t *fp); 90282527734SSukumar Swaminathan extern uint32_t emlxs_dump_word_dmpfile(emlxs_file_t *fpDmpFile, 90382527734SSukumar Swaminathan uint8_t *pBuffer, uint32_t bufferLen, 90482527734SSukumar Swaminathan int fSwap); 905291a2b48SSukumar Swaminathan #endif /* DUMP_SUPPORT */ 906fcf3ce44SJohn Forte 907a9800bebSGarrett D'Amore 908a9800bebSGarrett D'Amore /* Module emlxs_fcf.c External Routine Declarations */ 909a9800bebSGarrett D'Amore extern void emlxs_fcf_init(emlxs_hba_t *hba); 910a9800bebSGarrett D'Amore 911a9800bebSGarrett D'Amore extern void emlxs_fcf_fini(emlxs_hba_t *hba); 912a9800bebSGarrett D'Amore 913a9800bebSGarrett D'Amore extern uint32_t emlxs_vpi_port_bind_notify(emlxs_port_t *port); 914a9800bebSGarrett D'Amore 915a9800bebSGarrett D'Amore extern uint32_t emlxs_vpi_port_unbind_notify(emlxs_port_t *port, 916a9800bebSGarrett D'Amore uint32_t wait); 917*8f23e9faSHans Rosenfeld extern uint32_t emlxs_vpi_logo_cmpl_notify(emlxs_port_t *port); 918a9800bebSGarrett D'Amore 919a9800bebSGarrett D'Amore extern uint32_t emlxs_vpi_logi_notify(emlxs_port_t *port, 920a9800bebSGarrett D'Amore emlxs_buf_t *sbp); 921*8f23e9faSHans Rosenfeld extern uint32_t emlxs_vpi_logi_failed_notify(emlxs_port_t *port, 922a9800bebSGarrett D'Amore emlxs_buf_t *sbp); 923a9800bebSGarrett D'Amore extern uint32_t emlxs_vpi_rpi_offline_notify(emlxs_port_t *port, 924a9800bebSGarrett D'Amore uint32_t did, uint32_t rpi); 925a9800bebSGarrett D'Amore extern uint32_t emlxs_vpi_rpi_online_notify(emlxs_port_t *port, 926a9800bebSGarrett D'Amore uint32_t did, uint32_t rpi, uint32_t lock); 927a9800bebSGarrett D'Amore extern uint32_t emlxs_fcf_shutdown_notify(emlxs_port_t *port, 928a9800bebSGarrett D'Amore uint32_t wait); 929a9800bebSGarrett D'Amore extern uint32_t emlxs_fcf_linkup_notify(emlxs_port_t *port); 930a9800bebSGarrett D'Amore 931a9800bebSGarrett D'Amore extern uint32_t emlxs_fcf_linkdown_notify(emlxs_port_t *port); 932a9800bebSGarrett D'Amore 933a9800bebSGarrett D'Amore extern uint32_t emlxs_fcf_cvl_notify(emlxs_port_t *port, uint32_t vpi); 934a9800bebSGarrett D'Amore 935a9800bebSGarrett D'Amore extern uint32_t emlxs_fcf_full_notify(emlxs_port_t *port); 936a9800bebSGarrett D'Amore 937a9800bebSGarrett D'Amore extern uint32_t emlxs_fcf_found_notify(emlxs_port_t *port, 938a9800bebSGarrett D'Amore uint32_t fcf_index); 939a9800bebSGarrett D'Amore extern uint32_t emlxs_fcf_changed_notify(emlxs_port_t *port, 940a9800bebSGarrett D'Amore uint32_t fcf_index); 941a9800bebSGarrett D'Amore extern uint32_t emlxs_fcf_lost_notify(emlxs_port_t *port, 942a9800bebSGarrett D'Amore uint32_t fcf_index); 943a9800bebSGarrett D'Amore extern void emlxs_fcf_timer_notify(emlxs_hba_t *hba); 944a9800bebSGarrett D'Amore 945a9800bebSGarrett D'Amore 946a9800bebSGarrett D'Amore extern RPIobj_t *emlxs_rpi_find(emlxs_port_t *port, uint16_t rpi); 947a9800bebSGarrett D'Amore 948*8f23e9faSHans Rosenfeld extern RPIobj_t *emlxs_rpi_reserve_notify(emlxs_port_t *port, 949*8f23e9faSHans Rosenfeld uint32_t did, XRIobj_t *xrip); 950a9800bebSGarrett D'Amore extern RPIobj_t *emlxs_rpi_alloc_notify(emlxs_port_t *port, 951a9800bebSGarrett D'Amore uint32_t did); 952a9800bebSGarrett D'Amore extern uint32_t emlxs_rpi_free_notify(emlxs_port_t *port, 953a9800bebSGarrett D'Amore RPIobj_t *rpip); 954a9800bebSGarrett D'Amore extern uint32_t emlxs_rpi_online_notify(emlxs_port_t *port, 955a9800bebSGarrett D'Amore RPIobj_t *rpip, uint32_t did, SERV_PARM *sparam, 956a9800bebSGarrett D'Amore void *arg1, void *arg2, void *arg3); 957a9800bebSGarrett D'Amore extern uint32_t emlxs_rpi_offline_notify(emlxs_port_t *port, 958a9800bebSGarrett D'Amore RPIobj_t *rpip, void *arg1, void *arg2, 959a9800bebSGarrett D'Amore void *arg3); 960a9800bebSGarrett D'Amore extern uint32_t emlxs_rpi_pause_notify(emlxs_port_t *port, 961a9800bebSGarrett D'Amore RPIobj_t *rpip); 962a9800bebSGarrett D'Amore extern uint32_t emlxs_rpi_resume_notify(emlxs_port_t *port, 963a9800bebSGarrett D'Amore RPIobj_t *rpip, emlxs_buf_t *sbp); 964a9800bebSGarrett D'Amore 965a9800bebSGarrett D'Amore 966fcf3ce44SJohn Forte #ifdef __cplusplus 967fcf3ce44SJohn Forte } 968fcf3ce44SJohn Forte #endif 969fcf3ce44SJohn Forte 970fcf3ce44SJohn Forte #endif /* _EMLXS_EXTERN_H */ 971