18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * QLogic Fibre Channel HBA Driver 48c2ecf20Sopenharmony_ci * Copyright (c) 2003-2014 QLogic Corporation 58c2ecf20Sopenharmony_ci */ 68c2ecf20Sopenharmony_ci#ifndef __QLA_GBL_H 78c2ecf20Sopenharmony_ci#define __QLA_GBL_H 88c2ecf20Sopenharmony_ci 98c2ecf20Sopenharmony_ci#include <linux/interrupt.h> 108c2ecf20Sopenharmony_ci 118c2ecf20Sopenharmony_ci/* 128c2ecf20Sopenharmony_ci * Global Function Prototypes in qla_init.c source file. 138c2ecf20Sopenharmony_ci */ 148c2ecf20Sopenharmony_ciextern int qla2x00_initialize_adapter(scsi_qla_host_t *); 158c2ecf20Sopenharmony_ci 168c2ecf20Sopenharmony_ciextern int qla2100_pci_config(struct scsi_qla_host *); 178c2ecf20Sopenharmony_ciextern int qla2300_pci_config(struct scsi_qla_host *); 188c2ecf20Sopenharmony_ciextern int qla24xx_pci_config(scsi_qla_host_t *); 198c2ecf20Sopenharmony_ciextern int qla25xx_pci_config(scsi_qla_host_t *); 208c2ecf20Sopenharmony_ciextern int qla2x00_reset_chip(struct scsi_qla_host *); 218c2ecf20Sopenharmony_ciextern int qla24xx_reset_chip(struct scsi_qla_host *); 228c2ecf20Sopenharmony_ciextern int qla2x00_chip_diag(struct scsi_qla_host *); 238c2ecf20Sopenharmony_ciextern int qla24xx_chip_diag(struct scsi_qla_host *); 248c2ecf20Sopenharmony_ciextern void qla2x00_config_rings(struct scsi_qla_host *); 258c2ecf20Sopenharmony_ciextern void qla24xx_config_rings(struct scsi_qla_host *); 268c2ecf20Sopenharmony_ciextern int qla2x00_reset_adapter(struct scsi_qla_host *); 278c2ecf20Sopenharmony_ciextern int qla24xx_reset_adapter(struct scsi_qla_host *); 288c2ecf20Sopenharmony_ciextern int qla2x00_nvram_config(struct scsi_qla_host *); 298c2ecf20Sopenharmony_ciextern int qla24xx_nvram_config(struct scsi_qla_host *); 308c2ecf20Sopenharmony_ciextern int qla81xx_nvram_config(struct scsi_qla_host *); 318c2ecf20Sopenharmony_ciextern void qla2x00_update_fw_options(struct scsi_qla_host *); 328c2ecf20Sopenharmony_ciextern void qla24xx_update_fw_options(scsi_qla_host_t *); 338c2ecf20Sopenharmony_ci 348c2ecf20Sopenharmony_ciextern int qla2x00_load_risc(struct scsi_qla_host *, uint32_t *); 358c2ecf20Sopenharmony_ciextern int qla24xx_load_risc(scsi_qla_host_t *, uint32_t *); 368c2ecf20Sopenharmony_ciextern int qla81xx_load_risc(scsi_qla_host_t *, uint32_t *); 378c2ecf20Sopenharmony_ci 388c2ecf20Sopenharmony_ciextern int qla2x00_perform_loop_resync(scsi_qla_host_t *); 398c2ecf20Sopenharmony_ciextern int qla2x00_loop_resync(scsi_qla_host_t *); 408c2ecf20Sopenharmony_ciextern void qla2x00_clear_loop_id(fc_port_t *fcport); 418c2ecf20Sopenharmony_ci 428c2ecf20Sopenharmony_ciextern int qla2x00_fabric_login(scsi_qla_host_t *, fc_port_t *, uint16_t *); 438c2ecf20Sopenharmony_ciextern int qla2x00_local_device_login(scsi_qla_host_t *, fc_port_t *); 448c2ecf20Sopenharmony_ci 458c2ecf20Sopenharmony_ciextern int qla24xx_els_dcmd_iocb(scsi_qla_host_t *, int, port_id_t); 468c2ecf20Sopenharmony_ciextern int qla24xx_els_dcmd2_iocb(scsi_qla_host_t *, int, fc_port_t *, bool); 478c2ecf20Sopenharmony_ciextern void qla2x00_els_dcmd2_free(scsi_qla_host_t *vha, 488c2ecf20Sopenharmony_ci struct els_plogi *els_plogi); 498c2ecf20Sopenharmony_ci 508c2ecf20Sopenharmony_ciextern void qla2x00_update_fcports(scsi_qla_host_t *); 518c2ecf20Sopenharmony_ci 528c2ecf20Sopenharmony_ciextern int qla2x00_abort_isp(scsi_qla_host_t *); 538c2ecf20Sopenharmony_ciextern void qla2x00_abort_isp_cleanup(scsi_qla_host_t *); 548c2ecf20Sopenharmony_ciextern void qla2x00_quiesce_io(scsi_qla_host_t *); 558c2ecf20Sopenharmony_ci 568c2ecf20Sopenharmony_ciextern void qla2x00_update_fcport(scsi_qla_host_t *, fc_port_t *); 578c2ecf20Sopenharmony_civoid qla_register_fcport_fn(struct work_struct *); 588c2ecf20Sopenharmony_ciextern void qla2x00_alloc_fw_dump(scsi_qla_host_t *); 598c2ecf20Sopenharmony_ciextern void qla2x00_try_to_stop_firmware(scsi_qla_host_t *); 608c2ecf20Sopenharmony_ci 618c2ecf20Sopenharmony_ciextern int qla2x00_get_thermal_temp(scsi_qla_host_t *, uint16_t *); 628c2ecf20Sopenharmony_ci 638c2ecf20Sopenharmony_ciextern void qla84xx_put_chip(struct scsi_qla_host *); 648c2ecf20Sopenharmony_ci 658c2ecf20Sopenharmony_ciextern int qla2x00_async_login(struct scsi_qla_host *, fc_port_t *, 668c2ecf20Sopenharmony_ci uint16_t *); 678c2ecf20Sopenharmony_ciextern int qla2x00_async_logout(struct scsi_qla_host *, fc_port_t *); 688c2ecf20Sopenharmony_ciextern int qla2x00_async_prlo(struct scsi_qla_host *, fc_port_t *); 698c2ecf20Sopenharmony_ciextern int qla2x00_async_adisc(struct scsi_qla_host *, fc_port_t *, 708c2ecf20Sopenharmony_ci uint16_t *); 718c2ecf20Sopenharmony_ciextern int qla2x00_async_tm_cmd(fc_port_t *, uint32_t, uint32_t, uint32_t); 728c2ecf20Sopenharmony_ciextern void qla2x00_async_login_done(struct scsi_qla_host *, fc_port_t *, 738c2ecf20Sopenharmony_ci uint16_t *); 748c2ecf20Sopenharmony_cistruct qla_work_evt *qla2x00_alloc_work(struct scsi_qla_host *, 758c2ecf20Sopenharmony_ci enum qla_work_type); 768c2ecf20Sopenharmony_ciextern int qla24xx_async_gnl(struct scsi_qla_host *, fc_port_t *); 778c2ecf20Sopenharmony_ciint qla2x00_post_work(struct scsi_qla_host *vha, struct qla_work_evt *e); 788c2ecf20Sopenharmony_ciextern void *qla2x00_alloc_iocbs_ready(struct qla_qpair *, srb_t *); 798c2ecf20Sopenharmony_ciextern int qla24xx_update_fcport_fcp_prio(scsi_qla_host_t *, fc_port_t *); 808c2ecf20Sopenharmony_ciextern int qla24xx_async_abort_cmd(srb_t *, bool); 818c2ecf20Sopenharmony_ci 828c2ecf20Sopenharmony_ciextern void qla2x00_set_fcport_state(fc_port_t *fcport, int state); 838c2ecf20Sopenharmony_ciextern fc_port_t * 848c2ecf20Sopenharmony_ciqla2x00_alloc_fcport(scsi_qla_host_t *, gfp_t ); 858c2ecf20Sopenharmony_ci 868c2ecf20Sopenharmony_ciextern int __qla83xx_set_idc_control(scsi_qla_host_t *, uint32_t); 878c2ecf20Sopenharmony_ciextern int __qla83xx_get_idc_control(scsi_qla_host_t *, uint32_t *); 888c2ecf20Sopenharmony_ciextern void qla83xx_idc_audit(scsi_qla_host_t *, int); 898c2ecf20Sopenharmony_ciextern int qla83xx_nic_core_reset(scsi_qla_host_t *); 908c2ecf20Sopenharmony_ciextern void qla83xx_reset_ownership(scsi_qla_host_t *); 918c2ecf20Sopenharmony_ciextern int qla2xxx_mctp_dump(scsi_qla_host_t *); 928c2ecf20Sopenharmony_ci 938c2ecf20Sopenharmony_ciextern int 948c2ecf20Sopenharmony_ciqla2x00_alloc_outstanding_cmds(struct qla_hw_data *, struct req_que *); 958c2ecf20Sopenharmony_ciextern int qla2x00_init_rings(scsi_qla_host_t *); 968c2ecf20Sopenharmony_ciextern struct qla_qpair *qla2xxx_create_qpair(struct scsi_qla_host *, 978c2ecf20Sopenharmony_ci int, int, bool); 988c2ecf20Sopenharmony_ciextern int qla2xxx_delete_qpair(struct scsi_qla_host *, struct qla_qpair *); 998c2ecf20Sopenharmony_civoid qla2x00_handle_rscn(scsi_qla_host_t *vha, struct event_arg *ea); 1008c2ecf20Sopenharmony_civoid qla24xx_handle_plogi_done_event(struct scsi_qla_host *vha, 1018c2ecf20Sopenharmony_ci struct event_arg *ea); 1028c2ecf20Sopenharmony_civoid qla24xx_handle_relogin_event(scsi_qla_host_t *vha, 1038c2ecf20Sopenharmony_ci struct event_arg *ea); 1048c2ecf20Sopenharmony_ciint qla24xx_async_gpdb(struct scsi_qla_host *, fc_port_t *, u8); 1058c2ecf20Sopenharmony_ciint qla24xx_async_prli(struct scsi_qla_host *, fc_port_t *); 1068c2ecf20Sopenharmony_ciint qla24xx_async_notify_ack(scsi_qla_host_t *, fc_port_t *, 1078c2ecf20Sopenharmony_ci struct imm_ntfy_from_isp *, int); 1088c2ecf20Sopenharmony_ciint qla24xx_post_newsess_work(struct scsi_qla_host *, port_id_t *, u8 *, u8*, 1098c2ecf20Sopenharmony_ci void *, u8); 1108c2ecf20Sopenharmony_ciint qla24xx_fcport_handle_login(struct scsi_qla_host *, fc_port_t *); 1118c2ecf20Sopenharmony_ciint qla24xx_detect_sfp(scsi_qla_host_t *); 1128c2ecf20Sopenharmony_ciint qla24xx_post_gpdb_work(struct scsi_qla_host *, fc_port_t *, u8); 1138c2ecf20Sopenharmony_ci 1148c2ecf20Sopenharmony_ciextern void qla28xx_get_aux_images(struct scsi_qla_host *, 1158c2ecf20Sopenharmony_ci struct active_regions *); 1168c2ecf20Sopenharmony_ciextern void qla27xx_get_active_image(struct scsi_qla_host *, 1178c2ecf20Sopenharmony_ci struct active_regions *); 1188c2ecf20Sopenharmony_ci 1198c2ecf20Sopenharmony_civoid qla2x00_async_prlo_done(struct scsi_qla_host *, fc_port_t *, 1208c2ecf20Sopenharmony_ci uint16_t *); 1218c2ecf20Sopenharmony_ciextern int qla2x00_post_async_prlo_work(struct scsi_qla_host *, fc_port_t *, 1228c2ecf20Sopenharmony_ci uint16_t *); 1238c2ecf20Sopenharmony_ciextern int qla2x00_post_async_prlo_done_work(struct scsi_qla_host *, 1248c2ecf20Sopenharmony_ci fc_port_t *, uint16_t *); 1258c2ecf20Sopenharmony_ciint qla_post_iidma_work(struct scsi_qla_host *vha, fc_port_t *fcport); 1268c2ecf20Sopenharmony_civoid qla_do_iidma_work(struct scsi_qla_host *vha, fc_port_t *fcport); 1278c2ecf20Sopenharmony_ciint qla2x00_reserve_mgmt_server_loop_id(scsi_qla_host_t *); 1288c2ecf20Sopenharmony_civoid qla_rscn_replay(fc_port_t *fcport); 1298c2ecf20Sopenharmony_civoid qla24xx_free_purex_item(struct purex_item *item); 1308c2ecf20Sopenharmony_ciextern bool qla24xx_risc_firmware_invalid(uint32_t *); 1318c2ecf20Sopenharmony_civoid qla_init_iocb_limit(scsi_qla_host_t *); 1328c2ecf20Sopenharmony_ci 1338c2ecf20Sopenharmony_ci 1348c2ecf20Sopenharmony_ci/* 1358c2ecf20Sopenharmony_ci * Global Data in qla_os.c source file. 1368c2ecf20Sopenharmony_ci */ 1378c2ecf20Sopenharmony_ciextern char qla2x00_version_str[]; 1388c2ecf20Sopenharmony_ci 1398c2ecf20Sopenharmony_ciextern struct kmem_cache *srb_cachep; 1408c2ecf20Sopenharmony_ciextern struct kmem_cache *qla_tgt_plogi_cachep; 1418c2ecf20Sopenharmony_ci 1428c2ecf20Sopenharmony_ciextern int ql2xlogintimeout; 1438c2ecf20Sopenharmony_ciextern int qlport_down_retry; 1448c2ecf20Sopenharmony_ciextern int ql2xplogiabsentdevice; 1458c2ecf20Sopenharmony_ciextern int ql2xloginretrycount; 1468c2ecf20Sopenharmony_ciextern int ql2xfdmienable; 1478c2ecf20Sopenharmony_ciextern int ql2xrdpenable; 1488c2ecf20Sopenharmony_ciextern int ql2xsmartsan; 1498c2ecf20Sopenharmony_ciextern int ql2xallocfwdump; 1508c2ecf20Sopenharmony_ciextern int ql2xextended_error_logging; 1518c2ecf20Sopenharmony_ciextern int ql2xiidmaenable; 1528c2ecf20Sopenharmony_ciextern int ql2xmqsupport; 1538c2ecf20Sopenharmony_ciextern int ql2xfwloadbin; 1548c2ecf20Sopenharmony_ciextern int ql2xetsenable; 1558c2ecf20Sopenharmony_ciextern int ql2xshiftctondsd; 1568c2ecf20Sopenharmony_ciextern int ql2xdbwr; 1578c2ecf20Sopenharmony_ciextern int ql2xasynctmfenable; 1588c2ecf20Sopenharmony_ciextern int ql2xgffidenable; 1598c2ecf20Sopenharmony_ciextern int ql2xenabledif; 1608c2ecf20Sopenharmony_ciextern int ql2xenablehba_err_chk; 1618c2ecf20Sopenharmony_ciextern int ql2xdontresethba; 1628c2ecf20Sopenharmony_ciextern uint64_t ql2xmaxlun; 1638c2ecf20Sopenharmony_ciextern int ql2xmdcapmask; 1648c2ecf20Sopenharmony_ciextern int ql2xmdenable; 1658c2ecf20Sopenharmony_ciextern int ql2xexlogins; 1668c2ecf20Sopenharmony_ciextern int ql2xexchoffld; 1678c2ecf20Sopenharmony_ciextern int ql2xiniexchg; 1688c2ecf20Sopenharmony_ciextern int ql2xfwholdabts; 1698c2ecf20Sopenharmony_ciextern int ql2xmvasynctoatio; 1708c2ecf20Sopenharmony_ciextern int ql2xuctrlirq; 1718c2ecf20Sopenharmony_ciextern int ql2xnvmeenable; 1728c2ecf20Sopenharmony_ciextern int ql2xautodetectsfp; 1738c2ecf20Sopenharmony_ciextern int ql2xenablemsix; 1748c2ecf20Sopenharmony_ciextern int qla2xuseresexchforels; 1758c2ecf20Sopenharmony_ciextern int ql2xexlogins; 1768c2ecf20Sopenharmony_ciextern int ql2xdifbundlinginternalbuffers; 1778c2ecf20Sopenharmony_ciextern int ql2xfulldump_on_mpifail; 1788c2ecf20Sopenharmony_ciextern int ql2xenforce_iocb_limit; 1798c2ecf20Sopenharmony_ci 1808c2ecf20Sopenharmony_ciextern int qla2x00_loop_reset(scsi_qla_host_t *); 1818c2ecf20Sopenharmony_ciextern void qla2x00_abort_all_cmds(scsi_qla_host_t *, int); 1828c2ecf20Sopenharmony_ciextern int qla2x00_post_aen_work(struct scsi_qla_host *, enum 1838c2ecf20Sopenharmony_ci fc_host_event_code, u32); 1848c2ecf20Sopenharmony_ciextern int qla2x00_post_idc_ack_work(struct scsi_qla_host *, uint16_t *); 1858c2ecf20Sopenharmony_ciextern int qla2x00_post_async_login_work(struct scsi_qla_host *, fc_port_t *, 1868c2ecf20Sopenharmony_ci uint16_t *); 1878c2ecf20Sopenharmony_ciextern int qla2x00_post_async_logout_work(struct scsi_qla_host *, fc_port_t *, 1888c2ecf20Sopenharmony_ci uint16_t *); 1898c2ecf20Sopenharmony_ciextern int qla2x00_post_async_adisc_work(struct scsi_qla_host *, fc_port_t *, 1908c2ecf20Sopenharmony_ci uint16_t *); 1918c2ecf20Sopenharmony_ciextern int qla2x00_post_async_adisc_done_work(struct scsi_qla_host *, 1928c2ecf20Sopenharmony_ci fc_port_t *, uint16_t *); 1938c2ecf20Sopenharmony_ciextern int qla2x00_set_exlogins_buffer(struct scsi_qla_host *); 1948c2ecf20Sopenharmony_ciextern void qla2x00_free_exlogin_buffer(struct qla_hw_data *); 1958c2ecf20Sopenharmony_ciextern int qla2x00_set_exchoffld_buffer(struct scsi_qla_host *); 1968c2ecf20Sopenharmony_ciextern void qla2x00_free_exchoffld_buffer(struct qla_hw_data *); 1978c2ecf20Sopenharmony_ci 1988c2ecf20Sopenharmony_ciextern int qla81xx_restart_mpi_firmware(scsi_qla_host_t *); 1998c2ecf20Sopenharmony_ci 2008c2ecf20Sopenharmony_ciextern struct scsi_qla_host *qla2x00_create_host(struct scsi_host_template *, 2018c2ecf20Sopenharmony_ci struct qla_hw_data *); 2028c2ecf20Sopenharmony_ciextern void qla2x00_free_host(struct scsi_qla_host *); 2038c2ecf20Sopenharmony_ciextern void qla2x00_relogin(struct scsi_qla_host *); 2048c2ecf20Sopenharmony_ciextern void qla2x00_do_work(struct scsi_qla_host *); 2058c2ecf20Sopenharmony_ciextern void qla2x00_free_fcports(struct scsi_qla_host *); 2068c2ecf20Sopenharmony_ciextern void qla2x00_free_fcport(fc_port_t *); 2078c2ecf20Sopenharmony_ci 2088c2ecf20Sopenharmony_ciextern void qla83xx_schedule_work(scsi_qla_host_t *, int); 2098c2ecf20Sopenharmony_ciextern void qla83xx_service_idc_aen(struct work_struct *); 2108c2ecf20Sopenharmony_ciextern void qla83xx_nic_core_unrecoverable_work(struct work_struct *); 2118c2ecf20Sopenharmony_ciextern void qla83xx_idc_state_handler_work(struct work_struct *); 2128c2ecf20Sopenharmony_ciextern void qla83xx_nic_core_reset_work(struct work_struct *); 2138c2ecf20Sopenharmony_ci 2148c2ecf20Sopenharmony_ciextern void qla83xx_idc_lock(scsi_qla_host_t *, uint16_t); 2158c2ecf20Sopenharmony_ciextern void qla83xx_idc_unlock(scsi_qla_host_t *, uint16_t); 2168c2ecf20Sopenharmony_ciextern int qla83xx_idc_state_handler(scsi_qla_host_t *); 2178c2ecf20Sopenharmony_ciextern int qla83xx_set_drv_presence(scsi_qla_host_t *vha); 2188c2ecf20Sopenharmony_ciextern int __qla83xx_set_drv_presence(scsi_qla_host_t *vha); 2198c2ecf20Sopenharmony_ciextern int qla83xx_clear_drv_presence(scsi_qla_host_t *vha); 2208c2ecf20Sopenharmony_ciextern int __qla83xx_clear_drv_presence(scsi_qla_host_t *vha); 2218c2ecf20Sopenharmony_ciextern int qla2x00_post_uevent_work(struct scsi_qla_host *, u32); 2228c2ecf20Sopenharmony_ci 2238c2ecf20Sopenharmony_ciextern int qla2x00_post_uevent_work(struct scsi_qla_host *, u32); 2248c2ecf20Sopenharmony_ciextern void qla2x00_disable_board_on_pci_error(struct work_struct *); 2258c2ecf20Sopenharmony_ciextern void qla_eeh_work(struct work_struct *); 2268c2ecf20Sopenharmony_ciextern void qla2x00_sp_compl(srb_t *sp, int); 2278c2ecf20Sopenharmony_ciextern void qla2xxx_qpair_sp_free_dma(srb_t *sp); 2288c2ecf20Sopenharmony_ciextern void qla2xxx_qpair_sp_compl(srb_t *sp, int); 2298c2ecf20Sopenharmony_ciextern void qla24xx_sched_upd_fcport(fc_port_t *); 2308c2ecf20Sopenharmony_civoid qla2x00_handle_login_done_event(struct scsi_qla_host *, fc_port_t *, 2318c2ecf20Sopenharmony_ci uint16_t *); 2328c2ecf20Sopenharmony_ciint qla24xx_post_gnl_work(struct scsi_qla_host *, fc_port_t *); 2338c2ecf20Sopenharmony_ciint qla24xx_post_relogin_work(struct scsi_qla_host *vha); 2348c2ecf20Sopenharmony_civoid qla2x00_wait_for_sess_deletion(scsi_qla_host_t *); 2358c2ecf20Sopenharmony_civoid qla24xx_process_purex_rdp(struct scsi_qla_host *vha, 2368c2ecf20Sopenharmony_ci struct purex_item *pkt); 2378c2ecf20Sopenharmony_civoid qla_pci_set_eeh_busy(struct scsi_qla_host *); 2388c2ecf20Sopenharmony_civoid qla_schedule_eeh_work(struct scsi_qla_host *); 2398c2ecf20Sopenharmony_ci 2408c2ecf20Sopenharmony_ci/* 2418c2ecf20Sopenharmony_ci * Global Functions in qla_mid.c source file. 2428c2ecf20Sopenharmony_ci */ 2438c2ecf20Sopenharmony_ciextern struct scsi_host_template qla2xxx_driver_template; 2448c2ecf20Sopenharmony_ciextern struct scsi_transport_template *qla2xxx_transport_vport_template; 2458c2ecf20Sopenharmony_ciextern void qla2x00_timer(struct timer_list *); 2468c2ecf20Sopenharmony_ciextern void qla2x00_start_timer(scsi_qla_host_t *, unsigned long); 2478c2ecf20Sopenharmony_ciextern void qla24xx_deallocate_vp_id(scsi_qla_host_t *); 2488c2ecf20Sopenharmony_ciextern int qla24xx_disable_vp (scsi_qla_host_t *); 2498c2ecf20Sopenharmony_ciextern int qla24xx_enable_vp (scsi_qla_host_t *); 2508c2ecf20Sopenharmony_ciextern int qla24xx_control_vp(scsi_qla_host_t *, int ); 2518c2ecf20Sopenharmony_ciextern int qla24xx_modify_vp_config(scsi_qla_host_t *); 2528c2ecf20Sopenharmony_ciextern int qla2x00_send_change_request(scsi_qla_host_t *, uint16_t, uint16_t); 2538c2ecf20Sopenharmony_ciextern void qla2x00_vp_stop_timer(scsi_qla_host_t *); 2548c2ecf20Sopenharmony_ciextern int qla24xx_configure_vhba (scsi_qla_host_t *); 2558c2ecf20Sopenharmony_ciextern void qla24xx_report_id_acquisition(scsi_qla_host_t *, 2568c2ecf20Sopenharmony_ci struct vp_rpt_id_entry_24xx *); 2578c2ecf20Sopenharmony_ciextern void qla2x00_do_dpc_all_vps(scsi_qla_host_t *); 2588c2ecf20Sopenharmony_ciextern int qla24xx_vport_create_req_sanity_check(struct fc_vport *); 2598c2ecf20Sopenharmony_ciextern scsi_qla_host_t *qla24xx_create_vhost(struct fc_vport *); 2608c2ecf20Sopenharmony_ci 2618c2ecf20Sopenharmony_ciextern void qla2x00_sp_free_dma(srb_t *sp); 2628c2ecf20Sopenharmony_ciextern char *qla2x00_get_fw_version_str(struct scsi_qla_host *, char *); 2638c2ecf20Sopenharmony_ci 2648c2ecf20Sopenharmony_ciextern void qla2x00_mark_device_lost(scsi_qla_host_t *, fc_port_t *, int); 2658c2ecf20Sopenharmony_ciextern void qla2x00_mark_all_devices_lost(scsi_qla_host_t *); 2668c2ecf20Sopenharmony_ciextern int qla24xx_async_abort_cmd(srb_t *, bool); 2678c2ecf20Sopenharmony_ci 2688c2ecf20Sopenharmony_ciextern struct fw_blob *qla2x00_request_firmware(scsi_qla_host_t *); 2698c2ecf20Sopenharmony_ci 2708c2ecf20Sopenharmony_ciextern int qla2x00_wait_for_hba_online(scsi_qla_host_t *); 2718c2ecf20Sopenharmony_ciextern int qla2x00_wait_for_chip_reset(scsi_qla_host_t *); 2728c2ecf20Sopenharmony_ciextern int qla2x00_wait_for_fcoe_ctx_reset(scsi_qla_host_t *); 2738c2ecf20Sopenharmony_ci 2748c2ecf20Sopenharmony_ciextern void qla2xxx_wake_dpc(struct scsi_qla_host *); 2758c2ecf20Sopenharmony_ciextern void qla2x00_alert_all_vps(struct rsp_que *, uint16_t *); 2768c2ecf20Sopenharmony_ciextern void qla2x00_async_event(scsi_qla_host_t *, struct rsp_que *, 2778c2ecf20Sopenharmony_ci uint16_t *); 2788c2ecf20Sopenharmony_ciextern int qla2x00_vp_abort_isp(scsi_qla_host_t *); 2798c2ecf20Sopenharmony_ci 2808c2ecf20Sopenharmony_ci/* 2818c2ecf20Sopenharmony_ci * Global Function Prototypes in qla_iocb.c source file. 2828c2ecf20Sopenharmony_ci */ 2838c2ecf20Sopenharmony_ci 2848c2ecf20Sopenharmony_ciextern uint16_t qla2x00_calc_iocbs_32(uint16_t); 2858c2ecf20Sopenharmony_ciextern uint16_t qla2x00_calc_iocbs_64(uint16_t); 2868c2ecf20Sopenharmony_ciextern void qla2x00_build_scsi_iocbs_32(srb_t *, cmd_entry_t *, uint16_t); 2878c2ecf20Sopenharmony_ciextern void qla2x00_build_scsi_iocbs_64(srb_t *, cmd_entry_t *, uint16_t); 2888c2ecf20Sopenharmony_ciextern void qla24xx_build_scsi_iocbs(srb_t *, struct cmd_type_7 *, 2898c2ecf20Sopenharmony_ci uint16_t, struct req_que *); 2908c2ecf20Sopenharmony_ciextern uint32_t qla2xxx_get_next_handle(struct req_que *req); 2918c2ecf20Sopenharmony_ciextern int qla2x00_start_scsi(srb_t *sp); 2928c2ecf20Sopenharmony_ciextern int qla24xx_start_scsi(srb_t *sp); 2938c2ecf20Sopenharmony_ciint qla2x00_marker(struct scsi_qla_host *, struct qla_qpair *, 2948c2ecf20Sopenharmony_ci uint16_t, uint64_t, uint8_t); 2958c2ecf20Sopenharmony_ciextern int qla2x00_start_sp(srb_t *); 2968c2ecf20Sopenharmony_ciextern int qla24xx_dif_start_scsi(srb_t *); 2978c2ecf20Sopenharmony_ciextern int qla2x00_start_bidir(srb_t *, struct scsi_qla_host *, uint32_t); 2988c2ecf20Sopenharmony_ciextern int qla2xxx_dif_start_scsi_mq(srb_t *); 2998c2ecf20Sopenharmony_ciextern void qla2x00_init_timer(srb_t *sp, unsigned long tmo); 3008c2ecf20Sopenharmony_ciextern unsigned long qla2x00_get_async_timeout(struct scsi_qla_host *); 3018c2ecf20Sopenharmony_ci 3028c2ecf20Sopenharmony_ciextern void *qla2x00_alloc_iocbs(struct scsi_qla_host *, srb_t *); 3038c2ecf20Sopenharmony_ciextern void *__qla2x00_alloc_iocbs(struct qla_qpair *, srb_t *); 3048c2ecf20Sopenharmony_ciextern int qla2x00_issue_marker(scsi_qla_host_t *, int); 3058c2ecf20Sopenharmony_ciextern int qla24xx_walk_and_build_sglist_no_difb(struct qla_hw_data *, srb_t *, 3068c2ecf20Sopenharmony_ci struct dsd64 *, uint16_t, struct qla_tc_param *); 3078c2ecf20Sopenharmony_ciextern int qla24xx_walk_and_build_sglist(struct qla_hw_data *, srb_t *, 3088c2ecf20Sopenharmony_ci struct dsd64 *, uint16_t, struct qla_tc_param *); 3098c2ecf20Sopenharmony_ciextern int qla24xx_walk_and_build_prot_sglist(struct qla_hw_data *, srb_t *, 3108c2ecf20Sopenharmony_ci struct dsd64 *, uint16_t, struct qla_tgt_cmd *); 3118c2ecf20Sopenharmony_ciextern int qla24xx_get_one_block_sg(uint32_t, struct qla2_sgx *, uint32_t *); 3128c2ecf20Sopenharmony_ciextern int qla24xx_configure_prot_mode(srb_t *, uint16_t *); 3138c2ecf20Sopenharmony_ci 3148c2ecf20Sopenharmony_ci/* 3158c2ecf20Sopenharmony_ci * Global Function Prototypes in qla_mbx.c source file. 3168c2ecf20Sopenharmony_ci */ 3178c2ecf20Sopenharmony_ciextern int 3188c2ecf20Sopenharmony_ciqla2x00_load_ram(scsi_qla_host_t *, dma_addr_t, uint32_t, uint32_t); 3198c2ecf20Sopenharmony_ci 3208c2ecf20Sopenharmony_ciextern int 3218c2ecf20Sopenharmony_ciqla2x00_dump_ram(scsi_qla_host_t *, dma_addr_t, uint32_t, uint32_t); 3228c2ecf20Sopenharmony_ci 3238c2ecf20Sopenharmony_ciextern int 3248c2ecf20Sopenharmony_ciqla2x00_execute_fw(scsi_qla_host_t *, uint32_t); 3258c2ecf20Sopenharmony_ci 3268c2ecf20Sopenharmony_ciextern int 3278c2ecf20Sopenharmony_ciqla2x00_get_fw_version(scsi_qla_host_t *); 3288c2ecf20Sopenharmony_ci 3298c2ecf20Sopenharmony_ciextern int 3308c2ecf20Sopenharmony_ciqla2x00_get_fw_options(scsi_qla_host_t *, uint16_t *); 3318c2ecf20Sopenharmony_ci 3328c2ecf20Sopenharmony_ciextern int 3338c2ecf20Sopenharmony_ciqla2x00_set_fw_options(scsi_qla_host_t *, uint16_t *); 3348c2ecf20Sopenharmony_ci 3358c2ecf20Sopenharmony_ciextern int 3368c2ecf20Sopenharmony_ciqla2x00_mbx_reg_test(scsi_qla_host_t *); 3378c2ecf20Sopenharmony_ci 3388c2ecf20Sopenharmony_ciextern int 3398c2ecf20Sopenharmony_ciqla2x00_verify_checksum(scsi_qla_host_t *, uint32_t); 3408c2ecf20Sopenharmony_ci 3418c2ecf20Sopenharmony_ciextern int 3428c2ecf20Sopenharmony_ciqla2x00_issue_iocb(scsi_qla_host_t *, void *, dma_addr_t, size_t); 3438c2ecf20Sopenharmony_ci 3448c2ecf20Sopenharmony_ciextern int 3458c2ecf20Sopenharmony_ciqla2x00_abort_command(srb_t *); 3468c2ecf20Sopenharmony_ci 3478c2ecf20Sopenharmony_ciextern int 3488c2ecf20Sopenharmony_ciqla2x00_abort_target(struct fc_port *, uint64_t, int); 3498c2ecf20Sopenharmony_ci 3508c2ecf20Sopenharmony_ciextern int 3518c2ecf20Sopenharmony_ciqla2x00_lun_reset(struct fc_port *, uint64_t, int); 3528c2ecf20Sopenharmony_ci 3538c2ecf20Sopenharmony_ciextern int 3548c2ecf20Sopenharmony_ciqla2x00_get_adapter_id(scsi_qla_host_t *, uint16_t *, uint8_t *, uint8_t *, 3558c2ecf20Sopenharmony_ci uint8_t *, uint16_t *, uint16_t *); 3568c2ecf20Sopenharmony_ci 3578c2ecf20Sopenharmony_ciextern int 3588c2ecf20Sopenharmony_ciqla2x00_get_retry_cnt(scsi_qla_host_t *, uint8_t *, uint8_t *, uint16_t *); 3598c2ecf20Sopenharmony_ci 3608c2ecf20Sopenharmony_ciextern int 3618c2ecf20Sopenharmony_ciqla2x00_init_firmware(scsi_qla_host_t *, uint16_t); 3628c2ecf20Sopenharmony_ci 3638c2ecf20Sopenharmony_ciextern int 3648c2ecf20Sopenharmony_ciqla2x00_get_port_database(scsi_qla_host_t *, fc_port_t *, uint8_t); 3658c2ecf20Sopenharmony_ci 3668c2ecf20Sopenharmony_ciextern int 3678c2ecf20Sopenharmony_ciqla24xx_get_port_database(scsi_qla_host_t *, u16, struct port_database_24xx *); 3688c2ecf20Sopenharmony_ci 3698c2ecf20Sopenharmony_ciextern int 3708c2ecf20Sopenharmony_ciqla2x00_get_firmware_state(scsi_qla_host_t *, uint16_t *); 3718c2ecf20Sopenharmony_ci 3728c2ecf20Sopenharmony_ciextern int 3738c2ecf20Sopenharmony_ciqla2x00_get_port_name(scsi_qla_host_t *, uint16_t, uint8_t *, uint8_t); 3748c2ecf20Sopenharmony_ci 3758c2ecf20Sopenharmony_ciextern int 3768c2ecf20Sopenharmony_ciqla24xx_link_initialize(scsi_qla_host_t *); 3778c2ecf20Sopenharmony_ci 3788c2ecf20Sopenharmony_ciextern int 3798c2ecf20Sopenharmony_ciqla2x00_lip_reset(scsi_qla_host_t *); 3808c2ecf20Sopenharmony_ci 3818c2ecf20Sopenharmony_ciextern int 3828c2ecf20Sopenharmony_ciqla2x00_send_sns(scsi_qla_host_t *, dma_addr_t, uint16_t, size_t); 3838c2ecf20Sopenharmony_ci 3848c2ecf20Sopenharmony_ciextern int 3858c2ecf20Sopenharmony_ciqla2x00_login_fabric(scsi_qla_host_t *, uint16_t, uint8_t, uint8_t, uint8_t, 3868c2ecf20Sopenharmony_ci uint16_t *, uint8_t); 3878c2ecf20Sopenharmony_ciextern int 3888c2ecf20Sopenharmony_ciqla24xx_login_fabric(scsi_qla_host_t *, uint16_t, uint8_t, uint8_t, uint8_t, 3898c2ecf20Sopenharmony_ci uint16_t *, uint8_t); 3908c2ecf20Sopenharmony_ci 3918c2ecf20Sopenharmony_ciextern int 3928c2ecf20Sopenharmony_ciqla2x00_login_local_device(scsi_qla_host_t *, fc_port_t *, uint16_t *, 3938c2ecf20Sopenharmony_ci uint8_t); 3948c2ecf20Sopenharmony_ci 3958c2ecf20Sopenharmony_ciextern int 3968c2ecf20Sopenharmony_ciqla2x00_fabric_logout(scsi_qla_host_t *, uint16_t, uint8_t, uint8_t, uint8_t); 3978c2ecf20Sopenharmony_ci 3988c2ecf20Sopenharmony_ciextern int 3998c2ecf20Sopenharmony_ciqla24xx_fabric_logout(scsi_qla_host_t *, uint16_t, uint8_t, uint8_t, uint8_t); 4008c2ecf20Sopenharmony_ci 4018c2ecf20Sopenharmony_ciextern int 4028c2ecf20Sopenharmony_ciqla2x00_full_login_lip(scsi_qla_host_t *ha); 4038c2ecf20Sopenharmony_ci 4048c2ecf20Sopenharmony_ciextern int 4058c2ecf20Sopenharmony_ciqla2x00_get_id_list(scsi_qla_host_t *, void *, dma_addr_t, uint16_t *); 4068c2ecf20Sopenharmony_ci 4078c2ecf20Sopenharmony_ciextern int 4088c2ecf20Sopenharmony_ciqla2x00_get_resource_cnts(scsi_qla_host_t *); 4098c2ecf20Sopenharmony_ci 4108c2ecf20Sopenharmony_ciextern int 4118c2ecf20Sopenharmony_ciqla2x00_get_fcal_position_map(scsi_qla_host_t *ha, char *pos_map, 4128c2ecf20Sopenharmony_ci u8 *num_entries); 4138c2ecf20Sopenharmony_ci 4148c2ecf20Sopenharmony_ciextern int 4158c2ecf20Sopenharmony_ciqla2x00_get_link_status(scsi_qla_host_t *, uint16_t, struct link_statistics *, 4168c2ecf20Sopenharmony_ci dma_addr_t); 4178c2ecf20Sopenharmony_ci 4188c2ecf20Sopenharmony_ciextern int 4198c2ecf20Sopenharmony_ciqla24xx_get_isp_stats(scsi_qla_host_t *, struct link_statistics *, 4208c2ecf20Sopenharmony_ci dma_addr_t, uint16_t); 4218c2ecf20Sopenharmony_ci 4228c2ecf20Sopenharmony_ciextern int qla24xx_abort_command(srb_t *); 4238c2ecf20Sopenharmony_ciextern int qla24xx_async_abort_command(srb_t *); 4248c2ecf20Sopenharmony_ciextern int 4258c2ecf20Sopenharmony_ciqla24xx_abort_target(struct fc_port *, uint64_t, int); 4268c2ecf20Sopenharmony_ciextern int 4278c2ecf20Sopenharmony_ciqla24xx_lun_reset(struct fc_port *, uint64_t, int); 4288c2ecf20Sopenharmony_ciextern int 4298c2ecf20Sopenharmony_ciqla2x00_eh_wait_for_pending_commands(scsi_qla_host_t *, unsigned int, 4308c2ecf20Sopenharmony_ci uint64_t, enum nexus_wait_type); 4318c2ecf20Sopenharmony_ciextern int 4328c2ecf20Sopenharmony_ciqla2x00_system_error(scsi_qla_host_t *); 4338c2ecf20Sopenharmony_ci 4348c2ecf20Sopenharmony_ciextern int 4358c2ecf20Sopenharmony_ciqla2x00_write_serdes_word(scsi_qla_host_t *, uint16_t, uint16_t); 4368c2ecf20Sopenharmony_ciextern int 4378c2ecf20Sopenharmony_ciqla2x00_read_serdes_word(scsi_qla_host_t *, uint16_t, uint16_t *); 4388c2ecf20Sopenharmony_ci 4398c2ecf20Sopenharmony_ciextern int 4408c2ecf20Sopenharmony_ciqla8044_write_serdes_word(scsi_qla_host_t *, uint32_t, uint32_t); 4418c2ecf20Sopenharmony_ciextern int 4428c2ecf20Sopenharmony_ciqla8044_read_serdes_word(scsi_qla_host_t *, uint32_t, uint32_t *); 4438c2ecf20Sopenharmony_ci 4448c2ecf20Sopenharmony_ciextern int 4458c2ecf20Sopenharmony_ciqla2x00_set_serdes_params(scsi_qla_host_t *, uint16_t, uint16_t, uint16_t); 4468c2ecf20Sopenharmony_ci 4478c2ecf20Sopenharmony_ciextern int 4488c2ecf20Sopenharmony_ciqla2x00_stop_firmware(scsi_qla_host_t *); 4498c2ecf20Sopenharmony_ci 4508c2ecf20Sopenharmony_ciextern int 4518c2ecf20Sopenharmony_ciqla2x00_enable_eft_trace(scsi_qla_host_t *, dma_addr_t, uint16_t); 4528c2ecf20Sopenharmony_ciextern int 4538c2ecf20Sopenharmony_ciqla2x00_disable_eft_trace(scsi_qla_host_t *); 4548c2ecf20Sopenharmony_ci 4558c2ecf20Sopenharmony_ciextern int 4568c2ecf20Sopenharmony_ciqla2x00_enable_fce_trace(scsi_qla_host_t *, dma_addr_t, uint16_t , uint16_t *, 4578c2ecf20Sopenharmony_ci uint32_t *); 4588c2ecf20Sopenharmony_ci 4598c2ecf20Sopenharmony_ciextern int 4608c2ecf20Sopenharmony_ciqla2x00_disable_fce_trace(scsi_qla_host_t *, uint64_t *, uint64_t *); 4618c2ecf20Sopenharmony_ci 4628c2ecf20Sopenharmony_ciextern int 4638c2ecf20Sopenharmony_ciqla82xx_set_driver_version(scsi_qla_host_t *, char *); 4648c2ecf20Sopenharmony_ci 4658c2ecf20Sopenharmony_ciextern int 4668c2ecf20Sopenharmony_ciqla25xx_set_driver_version(scsi_qla_host_t *, char *); 4678c2ecf20Sopenharmony_ci 4688c2ecf20Sopenharmony_ciextern int 4698c2ecf20Sopenharmony_ciqla25xx_set_els_cmds_supported(scsi_qla_host_t *); 4708c2ecf20Sopenharmony_ci 4718c2ecf20Sopenharmony_ciextern int 4728c2ecf20Sopenharmony_ciqla24xx_get_buffer_credits(scsi_qla_host_t *, struct buffer_credit_24xx *, 4738c2ecf20Sopenharmony_ci dma_addr_t); 4748c2ecf20Sopenharmony_ci 4758c2ecf20Sopenharmony_ciextern int 4768c2ecf20Sopenharmony_ciqla2x00_read_sfp(scsi_qla_host_t *, dma_addr_t, uint8_t *, 4778c2ecf20Sopenharmony_ci uint16_t, uint16_t, uint16_t, uint16_t); 4788c2ecf20Sopenharmony_ci 4798c2ecf20Sopenharmony_ciextern int 4808c2ecf20Sopenharmony_ciqla2x00_write_sfp(scsi_qla_host_t *, dma_addr_t, uint8_t *, 4818c2ecf20Sopenharmony_ci uint16_t, uint16_t, uint16_t, uint16_t); 4828c2ecf20Sopenharmony_ci 4838c2ecf20Sopenharmony_ciextern int 4848c2ecf20Sopenharmony_ciqla2x00_set_idma_speed(scsi_qla_host_t *, uint16_t, uint16_t, uint16_t *); 4858c2ecf20Sopenharmony_ci 4868c2ecf20Sopenharmony_ciextern int qla84xx_verify_chip(struct scsi_qla_host *, uint16_t *); 4878c2ecf20Sopenharmony_ci 4888c2ecf20Sopenharmony_ciextern int qla81xx_idc_ack(scsi_qla_host_t *, uint16_t *); 4898c2ecf20Sopenharmony_ci 4908c2ecf20Sopenharmony_ciextern int 4918c2ecf20Sopenharmony_ciqla81xx_fac_get_sector_size(scsi_qla_host_t *, uint32_t *); 4928c2ecf20Sopenharmony_ci 4938c2ecf20Sopenharmony_ciextern int 4948c2ecf20Sopenharmony_ciqla81xx_fac_do_write_enable(scsi_qla_host_t *, int); 4958c2ecf20Sopenharmony_ci 4968c2ecf20Sopenharmony_ciextern int 4978c2ecf20Sopenharmony_ciqla81xx_fac_erase_sector(scsi_qla_host_t *, uint32_t, uint32_t); 4988c2ecf20Sopenharmony_ci 4998c2ecf20Sopenharmony_ciextern int qla81xx_fac_semaphore_access(scsi_qla_host_t *, int); 5008c2ecf20Sopenharmony_ci 5018c2ecf20Sopenharmony_ciextern int 5028c2ecf20Sopenharmony_ciqla2x00_get_xgmac_stats(scsi_qla_host_t *, dma_addr_t, uint16_t, uint16_t *); 5038c2ecf20Sopenharmony_ci 5048c2ecf20Sopenharmony_ciextern int 5058c2ecf20Sopenharmony_ciqla2x00_get_dcbx_params(scsi_qla_host_t *, dma_addr_t, uint16_t); 5068c2ecf20Sopenharmony_ci 5078c2ecf20Sopenharmony_ciextern int 5088c2ecf20Sopenharmony_ciqla2x00_read_ram_word(scsi_qla_host_t *, uint32_t, uint32_t *); 5098c2ecf20Sopenharmony_ci 5108c2ecf20Sopenharmony_ciextern int 5118c2ecf20Sopenharmony_ciqla2x00_write_ram_word(scsi_qla_host_t *, uint32_t, uint32_t); 5128c2ecf20Sopenharmony_ci 5138c2ecf20Sopenharmony_ciextern int 5148c2ecf20Sopenharmony_ciqla81xx_write_mpi_register(scsi_qla_host_t *, uint16_t *); 5158c2ecf20Sopenharmony_ciextern int qla2x00_get_data_rate(scsi_qla_host_t *); 5168c2ecf20Sopenharmony_ciextern int qla24xx_set_fcp_prio(scsi_qla_host_t *, uint16_t, uint16_t, 5178c2ecf20Sopenharmony_ci uint16_t *); 5188c2ecf20Sopenharmony_ciextern int 5198c2ecf20Sopenharmony_ciqla81xx_get_port_config(scsi_qla_host_t *, uint16_t *); 5208c2ecf20Sopenharmony_ci 5218c2ecf20Sopenharmony_ciextern int 5228c2ecf20Sopenharmony_ciqla81xx_set_port_config(scsi_qla_host_t *, uint16_t *); 5238c2ecf20Sopenharmony_ci 5248c2ecf20Sopenharmony_ciextern int 5258c2ecf20Sopenharmony_ciqla2x00_port_logout(scsi_qla_host_t *, struct fc_port *); 5268c2ecf20Sopenharmony_ci 5278c2ecf20Sopenharmony_ciextern int 5288c2ecf20Sopenharmony_ciqla2x00_dump_mctp_data(scsi_qla_host_t *, dma_addr_t, uint32_t, uint32_t); 5298c2ecf20Sopenharmony_ci 5308c2ecf20Sopenharmony_ciextern int 5318c2ecf20Sopenharmony_ciqla26xx_dport_diagnostics(scsi_qla_host_t *, void *, uint, uint); 5328c2ecf20Sopenharmony_ci 5338c2ecf20Sopenharmony_ciint qla24xx_send_mb_cmd(struct scsi_qla_host *, mbx_cmd_t *); 5348c2ecf20Sopenharmony_ciint qla24xx_gpdb_wait(struct scsi_qla_host *, fc_port_t *, u8); 5358c2ecf20Sopenharmony_ciint qla24xx_gidlist_wait(struct scsi_qla_host *, void *, dma_addr_t, 5368c2ecf20Sopenharmony_ci uint16_t *); 5378c2ecf20Sopenharmony_ciint __qla24xx_parse_gpdb(struct scsi_qla_host *, fc_port_t *, 5388c2ecf20Sopenharmony_ci struct port_database_24xx *); 5398c2ecf20Sopenharmony_ciint qla24xx_get_port_login_templ(scsi_qla_host_t *, dma_addr_t, 5408c2ecf20Sopenharmony_ci void *, uint16_t); 5418c2ecf20Sopenharmony_ci 5428c2ecf20Sopenharmony_ciextern int qla27xx_get_zio_threshold(scsi_qla_host_t *, uint16_t *); 5438c2ecf20Sopenharmony_ciextern int qla27xx_set_zio_threshold(scsi_qla_host_t *, uint16_t); 5448c2ecf20Sopenharmony_ciint qla24xx_res_count_wait(struct scsi_qla_host *, uint16_t *, int); 5458c2ecf20Sopenharmony_ci 5468c2ecf20Sopenharmony_ciextern int qla28xx_secure_flash_update(scsi_qla_host_t *, uint16_t, uint16_t, 5478c2ecf20Sopenharmony_ci uint32_t, dma_addr_t, uint32_t); 5488c2ecf20Sopenharmony_ci 5498c2ecf20Sopenharmony_ciextern int qla2xxx_read_remote_register(scsi_qla_host_t *, uint32_t, 5508c2ecf20Sopenharmony_ci uint32_t *); 5518c2ecf20Sopenharmony_ciextern int qla2xxx_write_remote_register(scsi_qla_host_t *, uint32_t, 5528c2ecf20Sopenharmony_ci uint32_t); 5538c2ecf20Sopenharmony_ci 5548c2ecf20Sopenharmony_ci/* 5558c2ecf20Sopenharmony_ci * Global Function Prototypes in qla_isr.c source file. 5568c2ecf20Sopenharmony_ci */ 5578c2ecf20Sopenharmony_ciextern irqreturn_t qla2100_intr_handler(int, void *); 5588c2ecf20Sopenharmony_ciextern irqreturn_t qla2300_intr_handler(int, void *); 5598c2ecf20Sopenharmony_ciextern irqreturn_t qla24xx_intr_handler(int, void *); 5608c2ecf20Sopenharmony_ciextern void qla2x00_process_response_queue(struct rsp_que *); 5618c2ecf20Sopenharmony_ciextern void 5628c2ecf20Sopenharmony_ciqla24xx_process_response_queue(struct scsi_qla_host *, struct rsp_que *); 5638c2ecf20Sopenharmony_ciextern int qla2x00_request_irqs(struct qla_hw_data *, struct rsp_que *); 5648c2ecf20Sopenharmony_ciextern void qla2x00_free_irqs(scsi_qla_host_t *); 5658c2ecf20Sopenharmony_ci 5668c2ecf20Sopenharmony_ciextern int qla2x00_get_data_rate(scsi_qla_host_t *); 5678c2ecf20Sopenharmony_ciextern const char *qla2x00_get_link_speed_str(struct qla_hw_data *, uint16_t); 5688c2ecf20Sopenharmony_ciextern srb_t * 5698c2ecf20Sopenharmony_ciqla2x00_get_sp_from_handle(scsi_qla_host_t *, const char *, struct req_que *, 5708c2ecf20Sopenharmony_ci void *); 5718c2ecf20Sopenharmony_ciextern void 5728c2ecf20Sopenharmony_ciqla2x00_process_completed_request(struct scsi_qla_host *, struct req_que *, 5738c2ecf20Sopenharmony_ci uint32_t); 5748c2ecf20Sopenharmony_ciextern irqreturn_t 5758c2ecf20Sopenharmony_ciqla2xxx_msix_rsp_q(int irq, void *dev_id); 5768c2ecf20Sopenharmony_ciextern irqreturn_t 5778c2ecf20Sopenharmony_ciqla2xxx_msix_rsp_q_hs(int irq, void *dev_id); 5788c2ecf20Sopenharmony_cifc_port_t *qla2x00_find_fcport_by_loopid(scsi_qla_host_t *, uint16_t); 5798c2ecf20Sopenharmony_cifc_port_t *qla2x00_find_fcport_by_wwpn(scsi_qla_host_t *, u8 *, u8); 5808c2ecf20Sopenharmony_cifc_port_t *qla2x00_find_fcport_by_nportid(scsi_qla_host_t *, port_id_t *, u8); 5818c2ecf20Sopenharmony_ci 5828c2ecf20Sopenharmony_ci/* 5838c2ecf20Sopenharmony_ci * Global Function Prototypes in qla_sup.c source file. 5848c2ecf20Sopenharmony_ci */ 5858c2ecf20Sopenharmony_ciextern void qla2x00_release_nvram_protection(scsi_qla_host_t *); 5868c2ecf20Sopenharmony_ciextern int qla24xx_read_flash_data(scsi_qla_host_t *, uint32_t *, 5878c2ecf20Sopenharmony_ci uint32_t, uint32_t); 5888c2ecf20Sopenharmony_ciextern uint8_t *qla2x00_read_nvram_data(scsi_qla_host_t *, void *, uint32_t, 5898c2ecf20Sopenharmony_ci uint32_t); 5908c2ecf20Sopenharmony_ciextern uint8_t *qla24xx_read_nvram_data(scsi_qla_host_t *, void *, uint32_t, 5918c2ecf20Sopenharmony_ci uint32_t); 5928c2ecf20Sopenharmony_ciextern int qla2x00_write_nvram_data(scsi_qla_host_t *, void *, uint32_t, 5938c2ecf20Sopenharmony_ci uint32_t); 5948c2ecf20Sopenharmony_ciextern int qla24xx_write_nvram_data(scsi_qla_host_t *, void *, uint32_t, 5958c2ecf20Sopenharmony_ci uint32_t); 5968c2ecf20Sopenharmony_ciextern uint8_t *qla25xx_read_nvram_data(scsi_qla_host_t *, void *, uint32_t, 5978c2ecf20Sopenharmony_ci uint32_t); 5988c2ecf20Sopenharmony_ciextern int qla25xx_write_nvram_data(scsi_qla_host_t *, void *, uint32_t, 5998c2ecf20Sopenharmony_ci uint32_t); 6008c2ecf20Sopenharmony_ci 6018c2ecf20Sopenharmony_ciextern int qla2x00_is_a_vp_did(scsi_qla_host_t *, uint32_t); 6028c2ecf20Sopenharmony_cibool qla2x00_check_reg32_for_disconnect(scsi_qla_host_t *, uint32_t); 6038c2ecf20Sopenharmony_cibool qla2x00_check_reg16_for_disconnect(scsi_qla_host_t *, uint16_t); 6048c2ecf20Sopenharmony_ci 6058c2ecf20Sopenharmony_ciextern int qla2x00_beacon_on(struct scsi_qla_host *); 6068c2ecf20Sopenharmony_ciextern int qla2x00_beacon_off(struct scsi_qla_host *); 6078c2ecf20Sopenharmony_ciextern void qla2x00_beacon_blink(struct scsi_qla_host *); 6088c2ecf20Sopenharmony_ciextern int qla24xx_beacon_on(struct scsi_qla_host *); 6098c2ecf20Sopenharmony_ciextern int qla24xx_beacon_off(struct scsi_qla_host *); 6108c2ecf20Sopenharmony_ciextern void qla24xx_beacon_blink(struct scsi_qla_host *); 6118c2ecf20Sopenharmony_ciextern void qla83xx_beacon_blink(struct scsi_qla_host *); 6128c2ecf20Sopenharmony_ciextern int qla82xx_beacon_on(struct scsi_qla_host *); 6138c2ecf20Sopenharmony_ciextern int qla82xx_beacon_off(struct scsi_qla_host *); 6148c2ecf20Sopenharmony_ciextern int qla83xx_wr_reg(scsi_qla_host_t *, uint32_t, uint32_t); 6158c2ecf20Sopenharmony_ciextern int qla83xx_rd_reg(scsi_qla_host_t *, uint32_t, uint32_t *); 6168c2ecf20Sopenharmony_ciextern int qla83xx_restart_nic_firmware(scsi_qla_host_t *); 6178c2ecf20Sopenharmony_ciextern int qla83xx_access_control(scsi_qla_host_t *, uint16_t, uint32_t, 6188c2ecf20Sopenharmony_ci uint32_t, uint16_t *); 6198c2ecf20Sopenharmony_ci 6208c2ecf20Sopenharmony_ciextern void *qla2x00_read_optrom_data(struct scsi_qla_host *, void *, 6218c2ecf20Sopenharmony_ci uint32_t, uint32_t); 6228c2ecf20Sopenharmony_ciextern int qla2x00_write_optrom_data(struct scsi_qla_host *, void *, 6238c2ecf20Sopenharmony_ci uint32_t, uint32_t); 6248c2ecf20Sopenharmony_ciextern void *qla24xx_read_optrom_data(struct scsi_qla_host *, void *, 6258c2ecf20Sopenharmony_ci uint32_t, uint32_t); 6268c2ecf20Sopenharmony_ciextern int qla24xx_write_optrom_data(struct scsi_qla_host *, void *, 6278c2ecf20Sopenharmony_ci uint32_t, uint32_t); 6288c2ecf20Sopenharmony_ciextern void *qla25xx_read_optrom_data(struct scsi_qla_host *, void *, 6298c2ecf20Sopenharmony_ci uint32_t, uint32_t); 6308c2ecf20Sopenharmony_ciextern void *qla8044_read_optrom_data(struct scsi_qla_host *, 6318c2ecf20Sopenharmony_ci void *, uint32_t, uint32_t); 6328c2ecf20Sopenharmony_ciextern void qla8044_watchdog(struct scsi_qla_host *vha); 6338c2ecf20Sopenharmony_ci 6348c2ecf20Sopenharmony_ciextern int qla2x00_get_flash_version(scsi_qla_host_t *, void *); 6358c2ecf20Sopenharmony_ciextern int qla24xx_get_flash_version(scsi_qla_host_t *, void *); 6368c2ecf20Sopenharmony_ciextern int qla82xx_get_flash_version(scsi_qla_host_t *, void *); 6378c2ecf20Sopenharmony_ci 6388c2ecf20Sopenharmony_ciextern int qla2xxx_get_flash_info(scsi_qla_host_t *); 6398c2ecf20Sopenharmony_ciextern int qla2xxx_get_vpd_field(scsi_qla_host_t *, char *, char *, size_t); 6408c2ecf20Sopenharmony_ci 6418c2ecf20Sopenharmony_ciextern void qla2xxx_flash_npiv_conf(scsi_qla_host_t *); 6428c2ecf20Sopenharmony_ciextern int qla24xx_read_fcp_prio_cfg(scsi_qla_host_t *); 6438c2ecf20Sopenharmony_ci 6448c2ecf20Sopenharmony_ci/* 6458c2ecf20Sopenharmony_ci * Global Function Prototypes in qla_dbg.c source file. 6468c2ecf20Sopenharmony_ci */ 6478c2ecf20Sopenharmony_civoid qla2xxx_dump_fw(scsi_qla_host_t *vha); 6488c2ecf20Sopenharmony_civoid qla2100_fw_dump(scsi_qla_host_t *vha); 6498c2ecf20Sopenharmony_civoid qla2300_fw_dump(scsi_qla_host_t *vha); 6508c2ecf20Sopenharmony_civoid qla24xx_fw_dump(scsi_qla_host_t *vha); 6518c2ecf20Sopenharmony_civoid qla25xx_fw_dump(scsi_qla_host_t *vha); 6528c2ecf20Sopenharmony_civoid qla81xx_fw_dump(scsi_qla_host_t *vha); 6538c2ecf20Sopenharmony_civoid qla82xx_fw_dump(scsi_qla_host_t *vha); 6548c2ecf20Sopenharmony_civoid qla8044_fw_dump(scsi_qla_host_t *vha); 6558c2ecf20Sopenharmony_ci 6568c2ecf20Sopenharmony_civoid qla27xx_fwdump(scsi_qla_host_t *vha); 6578c2ecf20Sopenharmony_ciextern void qla27xx_mpi_fwdump(scsi_qla_host_t *, int); 6588c2ecf20Sopenharmony_ciextern ulong qla27xx_fwdt_calculate_dump_size(struct scsi_qla_host *, void *); 6598c2ecf20Sopenharmony_ciextern int qla27xx_fwdt_template_valid(void *); 6608c2ecf20Sopenharmony_ciextern ulong qla27xx_fwdt_template_size(void *); 6618c2ecf20Sopenharmony_ci 6628c2ecf20Sopenharmony_ciextern void qla2xxx_dump_post_process(scsi_qla_host_t *, int); 6638c2ecf20Sopenharmony_ciextern void ql_dump_regs(uint, scsi_qla_host_t *, uint); 6648c2ecf20Sopenharmony_ciextern void ql_dump_buffer(uint, scsi_qla_host_t *, uint, const void *, uint); 6658c2ecf20Sopenharmony_ci/* 6668c2ecf20Sopenharmony_ci * Global Function Prototypes in qla_gs.c source file. 6678c2ecf20Sopenharmony_ci */ 6688c2ecf20Sopenharmony_ciextern void *qla2x00_prep_ms_iocb(scsi_qla_host_t *, struct ct_arg *); 6698c2ecf20Sopenharmony_ciextern void *qla24xx_prep_ms_iocb(scsi_qla_host_t *, struct ct_arg *); 6708c2ecf20Sopenharmony_ciextern int qla2x00_ga_nxt(scsi_qla_host_t *, fc_port_t *); 6718c2ecf20Sopenharmony_ciextern int qla2x00_gid_pt(scsi_qla_host_t *, sw_info_t *); 6728c2ecf20Sopenharmony_ciextern int qla2x00_gpn_id(scsi_qla_host_t *, sw_info_t *); 6738c2ecf20Sopenharmony_ciextern int qla2x00_gnn_id(scsi_qla_host_t *, sw_info_t *); 6748c2ecf20Sopenharmony_ciextern void qla2x00_gff_id(scsi_qla_host_t *, sw_info_t *); 6758c2ecf20Sopenharmony_ciextern int qla2x00_rft_id(scsi_qla_host_t *); 6768c2ecf20Sopenharmony_ciextern int qla2x00_rff_id(scsi_qla_host_t *, u8); 6778c2ecf20Sopenharmony_ciextern int qla2x00_rnn_id(scsi_qla_host_t *); 6788c2ecf20Sopenharmony_ciextern int qla2x00_rsnn_nn(scsi_qla_host_t *); 6798c2ecf20Sopenharmony_ciextern void *qla2x00_prep_ms_fdmi_iocb(scsi_qla_host_t *, uint32_t, uint32_t); 6808c2ecf20Sopenharmony_ciextern void *qla24xx_prep_ms_fdmi_iocb(scsi_qla_host_t *, uint32_t, uint32_t); 6818c2ecf20Sopenharmony_ciextern int qla2x00_fdmi_register(scsi_qla_host_t *); 6828c2ecf20Sopenharmony_ciextern int qla2x00_gfpn_id(scsi_qla_host_t *, sw_info_t *); 6838c2ecf20Sopenharmony_ciextern int qla2x00_gpsc(scsi_qla_host_t *, sw_info_t *); 6848c2ecf20Sopenharmony_ciextern size_t qla2x00_get_sym_node_name(scsi_qla_host_t *, uint8_t *, size_t); 6858c2ecf20Sopenharmony_ciextern int qla2x00_chk_ms_status(scsi_qla_host_t *, ms_iocb_entry_t *, 6868c2ecf20Sopenharmony_ci struct ct_sns_rsp *, const char *); 6878c2ecf20Sopenharmony_ciextern void qla2x00_async_iocb_timeout(void *data); 6888c2ecf20Sopenharmony_ci 6898c2ecf20Sopenharmony_ciextern void qla2x00_free_fcport(fc_port_t *); 6908c2ecf20Sopenharmony_ci 6918c2ecf20Sopenharmony_ciextern int qla24xx_post_gpnid_work(struct scsi_qla_host *, port_id_t *); 6928c2ecf20Sopenharmony_ciextern int qla24xx_async_gpnid(scsi_qla_host_t *, port_id_t *); 6938c2ecf20Sopenharmony_civoid qla24xx_handle_gpnid_event(scsi_qla_host_t *, struct event_arg *); 6948c2ecf20Sopenharmony_ci 6958c2ecf20Sopenharmony_ciint qla24xx_post_gpsc_work(struct scsi_qla_host *, fc_port_t *); 6968c2ecf20Sopenharmony_ciint qla24xx_async_gpsc(scsi_qla_host_t *, fc_port_t *); 6978c2ecf20Sopenharmony_civoid qla24xx_handle_gpsc_event(scsi_qla_host_t *, struct event_arg *); 6988c2ecf20Sopenharmony_ciint qla2x00_mgmt_svr_login(scsi_qla_host_t *); 6998c2ecf20Sopenharmony_civoid qla24xx_handle_gffid_event(scsi_qla_host_t *vha, struct event_arg *ea); 7008c2ecf20Sopenharmony_ciint qla24xx_async_gffid(scsi_qla_host_t *vha, fc_port_t *fcport); 7018c2ecf20Sopenharmony_ciint qla24xx_async_gpnft(scsi_qla_host_t *, u8, srb_t *); 7028c2ecf20Sopenharmony_civoid qla24xx_async_gpnft_done(scsi_qla_host_t *, srb_t *); 7038c2ecf20Sopenharmony_civoid qla24xx_async_gnnft_done(scsi_qla_host_t *, srb_t *); 7048c2ecf20Sopenharmony_ciint qla24xx_async_gnnid(scsi_qla_host_t *, fc_port_t *); 7058c2ecf20Sopenharmony_civoid qla24xx_handle_gnnid_event(scsi_qla_host_t *, struct event_arg *); 7068c2ecf20Sopenharmony_ciint qla24xx_post_gnnid_work(struct scsi_qla_host *, fc_port_t *); 7078c2ecf20Sopenharmony_ciint qla24xx_post_gfpnid_work(struct scsi_qla_host *, fc_port_t *); 7088c2ecf20Sopenharmony_ciint qla24xx_async_gfpnid(scsi_qla_host_t *, fc_port_t *); 7098c2ecf20Sopenharmony_civoid qla24xx_handle_gfpnid_event(scsi_qla_host_t *, struct event_arg *); 7108c2ecf20Sopenharmony_civoid qla24xx_sp_unmap(scsi_qla_host_t *, srb_t *); 7118c2ecf20Sopenharmony_civoid qla_scan_work_fn(struct work_struct *); 7128c2ecf20Sopenharmony_ciuint qla25xx_fdmi_port_speed_capability(struct qla_hw_data *); 7138c2ecf20Sopenharmony_ciuint qla25xx_fdmi_port_speed_currently(struct qla_hw_data *); 7148c2ecf20Sopenharmony_ci 7158c2ecf20Sopenharmony_ci/* 7168c2ecf20Sopenharmony_ci * Global Function Prototypes in qla_attr.c source file. 7178c2ecf20Sopenharmony_ci */ 7188c2ecf20Sopenharmony_cistruct device_attribute; 7198c2ecf20Sopenharmony_ciextern struct device_attribute *qla2x00_host_attrs[]; 7208c2ecf20Sopenharmony_ciextern struct device_attribute *qla2x00_host_attrs_dm[]; 7218c2ecf20Sopenharmony_cistruct fc_function_template; 7228c2ecf20Sopenharmony_ciextern struct fc_function_template qla2xxx_transport_functions; 7238c2ecf20Sopenharmony_ciextern struct fc_function_template qla2xxx_transport_vport_functions; 7248c2ecf20Sopenharmony_ciextern void qla2x00_alloc_sysfs_attr(scsi_qla_host_t *); 7258c2ecf20Sopenharmony_ciextern void qla2x00_free_sysfs_attr(scsi_qla_host_t *, bool); 7268c2ecf20Sopenharmony_ciextern void qla2x00_init_host_attr(scsi_qla_host_t *); 7278c2ecf20Sopenharmony_ciextern void qla2x00_alloc_sysfs_attr(scsi_qla_host_t *); 7288c2ecf20Sopenharmony_ciextern int qla2x00_loopback_test(scsi_qla_host_t *, struct msg_echo_lb *, uint16_t *); 7298c2ecf20Sopenharmony_ciextern int qla2x00_echo_test(scsi_qla_host_t *, 7308c2ecf20Sopenharmony_ci struct msg_echo_lb *, uint16_t *); 7318c2ecf20Sopenharmony_ciextern int qla24xx_update_all_fcp_prio(scsi_qla_host_t *); 7328c2ecf20Sopenharmony_ciextern int qla24xx_fcp_prio_cfg_valid(scsi_qla_host_t *, 7338c2ecf20Sopenharmony_ci struct qla_fcp_prio_cfg *, uint8_t); 7348c2ecf20Sopenharmony_civoid qla_insert_tgt_attrs(void); 7358c2ecf20Sopenharmony_ci/* 7368c2ecf20Sopenharmony_ci * Global Function Prototypes in qla_dfs.c source file. 7378c2ecf20Sopenharmony_ci */ 7388c2ecf20Sopenharmony_ciextern int qla2x00_dfs_setup(scsi_qla_host_t *); 7398c2ecf20Sopenharmony_ciextern int qla2x00_dfs_remove(scsi_qla_host_t *); 7408c2ecf20Sopenharmony_ci 7418c2ecf20Sopenharmony_ci/* Globa function prototypes for multi-q */ 7428c2ecf20Sopenharmony_ciextern int qla25xx_request_irq(struct qla_hw_data *, struct qla_qpair *, 7438c2ecf20Sopenharmony_ci struct qla_msix_entry *, int); 7448c2ecf20Sopenharmony_ciextern int qla25xx_init_req_que(struct scsi_qla_host *, struct req_que *); 7458c2ecf20Sopenharmony_ciextern int qla25xx_init_rsp_que(struct scsi_qla_host *, struct rsp_que *); 7468c2ecf20Sopenharmony_ciextern int qla25xx_create_req_que(struct qla_hw_data *, uint16_t, uint8_t, 7478c2ecf20Sopenharmony_ci uint16_t, int, uint8_t, bool); 7488c2ecf20Sopenharmony_ciextern int qla25xx_create_rsp_que(struct qla_hw_data *, uint16_t, uint8_t, 7498c2ecf20Sopenharmony_ci uint16_t, struct qla_qpair *, bool); 7508c2ecf20Sopenharmony_ci 7518c2ecf20Sopenharmony_ciextern void qla2x00_init_response_q_entries(struct rsp_que *); 7528c2ecf20Sopenharmony_ciextern int qla25xx_delete_req_que(struct scsi_qla_host *, struct req_que *); 7538c2ecf20Sopenharmony_ciextern int qla25xx_delete_rsp_que(struct scsi_qla_host *, struct rsp_que *); 7548c2ecf20Sopenharmony_ciextern int qla25xx_delete_queues(struct scsi_qla_host *); 7558c2ecf20Sopenharmony_ciextern uint16_t qla24xx_rd_req_reg(struct qla_hw_data *, uint16_t); 7568c2ecf20Sopenharmony_ciextern uint16_t qla25xx_rd_req_reg(struct qla_hw_data *, uint16_t); 7578c2ecf20Sopenharmony_ciextern void qla24xx_wrt_req_reg(struct qla_hw_data *, uint16_t, uint16_t); 7588c2ecf20Sopenharmony_ciextern void qla25xx_wrt_req_reg(struct qla_hw_data *, uint16_t, uint16_t); 7598c2ecf20Sopenharmony_ciextern void qla25xx_wrt_rsp_reg(struct qla_hw_data *, uint16_t, uint16_t); 7608c2ecf20Sopenharmony_ciextern void qla24xx_wrt_rsp_reg(struct qla_hw_data *, uint16_t, uint16_t); 7618c2ecf20Sopenharmony_ci 7628c2ecf20Sopenharmony_ci/* qlafx00 related functions */ 7638c2ecf20Sopenharmony_ciextern int qlafx00_pci_config(struct scsi_qla_host *); 7648c2ecf20Sopenharmony_ciextern int qlafx00_initialize_adapter(struct scsi_qla_host *); 7658c2ecf20Sopenharmony_ciextern int qlafx00_soft_reset(scsi_qla_host_t *); 7668c2ecf20Sopenharmony_ciextern int qlafx00_chip_diag(scsi_qla_host_t *); 7678c2ecf20Sopenharmony_ciextern void qlafx00_config_rings(struct scsi_qla_host *); 7688c2ecf20Sopenharmony_ciextern char *qlafx00_pci_info_str(struct scsi_qla_host *, char *, size_t); 7698c2ecf20Sopenharmony_ciextern char *qlafx00_fw_version_str(struct scsi_qla_host *, char *, size_t); 7708c2ecf20Sopenharmony_ciextern irqreturn_t qlafx00_intr_handler(int, void *); 7718c2ecf20Sopenharmony_ciextern void qlafx00_enable_intrs(struct qla_hw_data *); 7728c2ecf20Sopenharmony_ciextern void qlafx00_disable_intrs(struct qla_hw_data *); 7738c2ecf20Sopenharmony_ciextern int qlafx00_abort_target(fc_port_t *, uint64_t, int); 7748c2ecf20Sopenharmony_ciextern int qlafx00_lun_reset(fc_port_t *, uint64_t, int); 7758c2ecf20Sopenharmony_ciextern int qlafx00_start_scsi(srb_t *); 7768c2ecf20Sopenharmony_ciextern int qlafx00_abort_isp(scsi_qla_host_t *); 7778c2ecf20Sopenharmony_ciextern int qlafx00_iospace_config(struct qla_hw_data *); 7788c2ecf20Sopenharmony_ciextern int qlafx00_init_firmware(scsi_qla_host_t *, uint16_t); 7798c2ecf20Sopenharmony_ciextern int qlafx00_driver_shutdown(scsi_qla_host_t *, int); 7808c2ecf20Sopenharmony_ciextern int qlafx00_fw_ready(scsi_qla_host_t *); 7818c2ecf20Sopenharmony_ciextern int qlafx00_configure_devices(scsi_qla_host_t *); 7828c2ecf20Sopenharmony_ciextern int qlafx00_reset_initialize(scsi_qla_host_t *); 7838c2ecf20Sopenharmony_ciextern int qlafx00_fx_disc(scsi_qla_host_t *, fc_port_t *, uint16_t); 7848c2ecf20Sopenharmony_ciextern void qlafx00_process_aen(struct scsi_qla_host *, struct qla_work_evt *); 7858c2ecf20Sopenharmony_ciextern int qlafx00_post_aenfx_work(struct scsi_qla_host *, uint32_t, 7868c2ecf20Sopenharmony_ci uint32_t *, int); 7878c2ecf20Sopenharmony_ciextern uint32_t qlafx00_fw_state_show(struct device *, 7888c2ecf20Sopenharmony_ci struct device_attribute *, char *); 7898c2ecf20Sopenharmony_ciextern void qlafx00_get_host_speed(struct Scsi_Host *); 7908c2ecf20Sopenharmony_ciextern void qlafx00_init_response_q_entries(struct rsp_que *); 7918c2ecf20Sopenharmony_ci 7928c2ecf20Sopenharmony_ciextern void qlafx00_tm_iocb(srb_t *, struct tsk_mgmt_entry_fx00 *); 7938c2ecf20Sopenharmony_ciextern void qlafx00_abort_iocb(srb_t *, struct abort_iocb_entry_fx00 *); 7948c2ecf20Sopenharmony_ciextern void qlafx00_fxdisc_iocb(srb_t *, struct fxdisc_entry_fx00 *); 7958c2ecf20Sopenharmony_ciextern void qlafx00_timer_routine(scsi_qla_host_t *); 7968c2ecf20Sopenharmony_ciextern int qlafx00_rescan_isp(scsi_qla_host_t *); 7978c2ecf20Sopenharmony_ci 7988c2ecf20Sopenharmony_ci/* qla82xx related functions */ 7998c2ecf20Sopenharmony_ci 8008c2ecf20Sopenharmony_ci/* PCI related functions */ 8018c2ecf20Sopenharmony_ciextern int qla82xx_pci_config(struct scsi_qla_host *); 8028c2ecf20Sopenharmony_ciextern int qla82xx_pci_mem_read_2M(struct qla_hw_data *, u64, void *, int); 8038c2ecf20Sopenharmony_ciextern int qla82xx_pci_region_offset(struct pci_dev *, int); 8048c2ecf20Sopenharmony_ciextern int qla82xx_iospace_config(struct qla_hw_data *); 8058c2ecf20Sopenharmony_ci 8068c2ecf20Sopenharmony_ci/* Initialization related functions */ 8078c2ecf20Sopenharmony_ciextern int qla82xx_reset_chip(struct scsi_qla_host *); 8088c2ecf20Sopenharmony_ciextern void qla82xx_config_rings(struct scsi_qla_host *); 8098c2ecf20Sopenharmony_ciextern void qla82xx_watchdog(scsi_qla_host_t *); 8108c2ecf20Sopenharmony_ciextern int qla82xx_start_firmware(scsi_qla_host_t *); 8118c2ecf20Sopenharmony_ci 8128c2ecf20Sopenharmony_ci/* Firmware and flash related functions */ 8138c2ecf20Sopenharmony_ciextern int qla82xx_load_risc(scsi_qla_host_t *, uint32_t *); 8148c2ecf20Sopenharmony_ciextern void *qla82xx_read_optrom_data(struct scsi_qla_host *, void *, 8158c2ecf20Sopenharmony_ci uint32_t, uint32_t); 8168c2ecf20Sopenharmony_ciextern int qla82xx_write_optrom_data(struct scsi_qla_host *, void *, 8178c2ecf20Sopenharmony_ci uint32_t, uint32_t); 8188c2ecf20Sopenharmony_ci 8198c2ecf20Sopenharmony_ci/* Mailbox related functions */ 8208c2ecf20Sopenharmony_ciextern int qla82xx_abort_isp(scsi_qla_host_t *); 8218c2ecf20Sopenharmony_ciextern int qla82xx_restart_isp(scsi_qla_host_t *); 8228c2ecf20Sopenharmony_ci 8238c2ecf20Sopenharmony_ci/* IOCB related functions */ 8248c2ecf20Sopenharmony_ciextern int qla82xx_start_scsi(srb_t *); 8258c2ecf20Sopenharmony_ciextern void qla2x00_sp_free(srb_t *sp); 8268c2ecf20Sopenharmony_ciextern void qla2x00_sp_timeout(struct timer_list *); 8278c2ecf20Sopenharmony_ciextern void qla2x00_bsg_job_done(srb_t *sp, int); 8288c2ecf20Sopenharmony_ciextern void qla2x00_bsg_sp_free(srb_t *sp); 8298c2ecf20Sopenharmony_ciextern void qla2x00_start_iocbs(struct scsi_qla_host *, struct req_que *); 8308c2ecf20Sopenharmony_ci 8318c2ecf20Sopenharmony_ci/* Interrupt related */ 8328c2ecf20Sopenharmony_ciextern irqreturn_t qla82xx_intr_handler(int, void *); 8338c2ecf20Sopenharmony_ciextern irqreturn_t qla82xx_msi_handler(int, void *); 8348c2ecf20Sopenharmony_ciextern irqreturn_t qla82xx_msix_default(int, void *); 8358c2ecf20Sopenharmony_ciextern irqreturn_t qla82xx_msix_rsp_q(int, void *); 8368c2ecf20Sopenharmony_ciextern void qla82xx_enable_intrs(struct qla_hw_data *); 8378c2ecf20Sopenharmony_ciextern void qla82xx_disable_intrs(struct qla_hw_data *); 8388c2ecf20Sopenharmony_ciextern void qla82xx_poll(int, void *); 8398c2ecf20Sopenharmony_ciextern void qla82xx_init_flags(struct qla_hw_data *); 8408c2ecf20Sopenharmony_ci 8418c2ecf20Sopenharmony_ci/* ISP 8021 hardware related */ 8428c2ecf20Sopenharmony_ciextern void qla82xx_set_drv_active(scsi_qla_host_t *); 8438c2ecf20Sopenharmony_ciextern int qla82xx_wr_32(struct qla_hw_data *, ulong, u32); 8448c2ecf20Sopenharmony_ciextern int qla82xx_rd_32(struct qla_hw_data *, ulong); 8458c2ecf20Sopenharmony_ciextern int qla82xx_rdmem(struct qla_hw_data *, u64, void *, int); 8468c2ecf20Sopenharmony_ciextern int qla82xx_wrmem(struct qla_hw_data *, u64, void *, int); 8478c2ecf20Sopenharmony_ci 8488c2ecf20Sopenharmony_ci/* ISP 8021 IDC */ 8498c2ecf20Sopenharmony_ciextern void qla82xx_clear_drv_active(struct qla_hw_data *); 8508c2ecf20Sopenharmony_ciextern uint32_t qla82xx_wait_for_state_change(scsi_qla_host_t *, uint32_t); 8518c2ecf20Sopenharmony_ciextern int qla82xx_idc_lock(struct qla_hw_data *); 8528c2ecf20Sopenharmony_ciextern void qla82xx_idc_unlock(struct qla_hw_data *); 8538c2ecf20Sopenharmony_ciextern int qla82xx_device_state_handler(scsi_qla_host_t *); 8548c2ecf20Sopenharmony_ciextern void qla8xxx_dev_failed_handler(scsi_qla_host_t *); 8558c2ecf20Sopenharmony_ciextern void qla82xx_clear_qsnt_ready(scsi_qla_host_t *); 8568c2ecf20Sopenharmony_ci 8578c2ecf20Sopenharmony_ciextern void qla2x00_set_model_info(scsi_qla_host_t *, uint8_t *, size_t, 8588c2ecf20Sopenharmony_ci const char *); 8598c2ecf20Sopenharmony_ciextern int qla82xx_mbx_intr_enable(scsi_qla_host_t *); 8608c2ecf20Sopenharmony_ciextern int qla82xx_mbx_intr_disable(scsi_qla_host_t *); 8618c2ecf20Sopenharmony_ciextern void qla82xx_start_iocbs(scsi_qla_host_t *); 8628c2ecf20Sopenharmony_ciextern int qla82xx_fcoe_ctx_reset(scsi_qla_host_t *); 8638c2ecf20Sopenharmony_ciextern int qla82xx_check_md_needed(scsi_qla_host_t *); 8648c2ecf20Sopenharmony_ciextern void qla82xx_chip_reset_cleanup(scsi_qla_host_t *); 8658c2ecf20Sopenharmony_ciextern int qla81xx_set_led_config(scsi_qla_host_t *, uint16_t *); 8668c2ecf20Sopenharmony_ciextern int qla81xx_get_led_config(scsi_qla_host_t *, uint16_t *); 8678c2ecf20Sopenharmony_ciextern int qla82xx_mbx_beacon_ctl(scsi_qla_host_t *, int); 8688c2ecf20Sopenharmony_ciextern char *qdev_state(uint32_t); 8698c2ecf20Sopenharmony_ciextern void qla82xx_clear_pending_mbx(scsi_qla_host_t *); 8708c2ecf20Sopenharmony_ciextern int qla82xx_read_temperature(scsi_qla_host_t *); 8718c2ecf20Sopenharmony_ciextern int qla8044_read_temperature(scsi_qla_host_t *); 8728c2ecf20Sopenharmony_ciextern int qla2x00_read_sfp_dev(struct scsi_qla_host *, char *, int); 8738c2ecf20Sopenharmony_ciextern int ql26xx_led_config(scsi_qla_host_t *, uint16_t, uint16_t *); 8748c2ecf20Sopenharmony_ci 8758c2ecf20Sopenharmony_ci/* BSG related functions */ 8768c2ecf20Sopenharmony_ciextern int qla24xx_bsg_request(struct bsg_job *); 8778c2ecf20Sopenharmony_ciextern int qla24xx_bsg_timeout(struct bsg_job *); 8788c2ecf20Sopenharmony_ciextern int qla84xx_reset_chip(scsi_qla_host_t *, uint16_t); 8798c2ecf20Sopenharmony_ciextern int qla2x00_issue_iocb_timeout(scsi_qla_host_t *, void *, 8808c2ecf20Sopenharmony_ci dma_addr_t, size_t, uint32_t); 8818c2ecf20Sopenharmony_ciextern int qla2x00_get_idma_speed(scsi_qla_host_t *, uint16_t, 8828c2ecf20Sopenharmony_ci uint16_t *, uint16_t *); 8838c2ecf20Sopenharmony_ci 8848c2ecf20Sopenharmony_ci/* 83xx related functions */ 8858c2ecf20Sopenharmony_civoid qla83xx_fw_dump(scsi_qla_host_t *vha); 8868c2ecf20Sopenharmony_ci 8878c2ecf20Sopenharmony_ci/* Minidump related functions */ 8888c2ecf20Sopenharmony_ciextern int qla82xx_md_get_template_size(scsi_qla_host_t *); 8898c2ecf20Sopenharmony_ciextern int qla82xx_md_get_template(scsi_qla_host_t *); 8908c2ecf20Sopenharmony_ciextern int qla82xx_md_alloc(scsi_qla_host_t *); 8918c2ecf20Sopenharmony_ciextern void qla82xx_md_free(scsi_qla_host_t *); 8928c2ecf20Sopenharmony_ciextern int qla82xx_md_collect(scsi_qla_host_t *); 8938c2ecf20Sopenharmony_ciextern void qla82xx_md_prep(scsi_qla_host_t *); 8948c2ecf20Sopenharmony_ciextern void qla82xx_set_reset_owner(scsi_qla_host_t *); 8958c2ecf20Sopenharmony_ciextern int qla82xx_validate_template_chksum(scsi_qla_host_t *vha); 8968c2ecf20Sopenharmony_ci 8978c2ecf20Sopenharmony_ci/* Function declarations for ISP8044 */ 8988c2ecf20Sopenharmony_ciextern int qla8044_idc_lock(struct qla_hw_data *ha); 8998c2ecf20Sopenharmony_ciextern void qla8044_idc_unlock(struct qla_hw_data *ha); 9008c2ecf20Sopenharmony_ciextern uint32_t qla8044_rd_reg(struct qla_hw_data *ha, ulong addr); 9018c2ecf20Sopenharmony_ciextern void qla8044_wr_reg(struct qla_hw_data *ha, ulong addr, uint32_t val); 9028c2ecf20Sopenharmony_ciextern void qla8044_read_reset_template(struct scsi_qla_host *ha); 9038c2ecf20Sopenharmony_ciextern void qla8044_set_idc_dontreset(struct scsi_qla_host *ha); 9048c2ecf20Sopenharmony_ciextern int qla8044_rd_direct(struct scsi_qla_host *vha, const uint32_t crb_reg); 9058c2ecf20Sopenharmony_ciextern void qla8044_wr_direct(struct scsi_qla_host *vha, 9068c2ecf20Sopenharmony_ci const uint32_t crb_reg, const uint32_t value); 9078c2ecf20Sopenharmony_ciextern int qla8044_device_state_handler(struct scsi_qla_host *vha); 9088c2ecf20Sopenharmony_ciextern void qla8044_clear_qsnt_ready(struct scsi_qla_host *vha); 9098c2ecf20Sopenharmony_ciextern void qla8044_clear_drv_active(struct qla_hw_data *); 9108c2ecf20Sopenharmony_civoid qla8044_get_minidump(struct scsi_qla_host *vha); 9118c2ecf20Sopenharmony_ciint qla8044_collect_md_data(struct scsi_qla_host *vha); 9128c2ecf20Sopenharmony_ciextern int qla8044_md_get_template(scsi_qla_host_t *); 9138c2ecf20Sopenharmony_ciextern int qla8044_write_optrom_data(struct scsi_qla_host *, void *, 9148c2ecf20Sopenharmony_ci uint32_t, uint32_t); 9158c2ecf20Sopenharmony_ciextern irqreturn_t qla8044_intr_handler(int, void *); 9168c2ecf20Sopenharmony_ciextern void qla82xx_mbx_completion(scsi_qla_host_t *, uint16_t); 9178c2ecf20Sopenharmony_ciextern int qla8044_abort_isp(scsi_qla_host_t *); 9188c2ecf20Sopenharmony_ciextern int qla8044_check_fw_alive(struct scsi_qla_host *); 9198c2ecf20Sopenharmony_ciextern int qla_get_exlogin_status(scsi_qla_host_t *, uint16_t *, 9208c2ecf20Sopenharmony_ci uint16_t *); 9218c2ecf20Sopenharmony_ciextern int qla_set_exlogin_mem_cfg(scsi_qla_host_t *vha, dma_addr_t phys_addr); 9228c2ecf20Sopenharmony_ciextern int qla_get_exchoffld_status(scsi_qla_host_t *, uint16_t *, uint16_t *); 9238c2ecf20Sopenharmony_ciextern int qla_set_exchoffld_mem_cfg(scsi_qla_host_t *); 9248c2ecf20Sopenharmony_ciextern void qlt_handle_abts_recv(struct scsi_qla_host *, struct rsp_que *, 9258c2ecf20Sopenharmony_ci response_t *); 9268c2ecf20Sopenharmony_ci 9278c2ecf20Sopenharmony_ciint qla24xx_async_notify_ack(scsi_qla_host_t *, fc_port_t *, 9288c2ecf20Sopenharmony_ci struct imm_ntfy_from_isp *, int); 9298c2ecf20Sopenharmony_civoid qla24xx_do_nack_work(struct scsi_qla_host *, struct qla_work_evt *); 9308c2ecf20Sopenharmony_civoid qlt_plogi_ack_link(struct scsi_qla_host *, struct qlt_plogi_ack_t *, 9318c2ecf20Sopenharmony_ci struct fc_port *, enum qlt_plogi_link_t); 9328c2ecf20Sopenharmony_civoid qlt_plogi_ack_unref(struct scsi_qla_host *, struct qlt_plogi_ack_t *); 9338c2ecf20Sopenharmony_ciextern void qlt_schedule_sess_for_deletion(struct fc_port *); 9348c2ecf20Sopenharmony_ciextern struct fc_port *qlt_find_sess_invalidate_other(scsi_qla_host_t *, 9358c2ecf20Sopenharmony_ci uint64_t wwn, port_id_t port_id, uint16_t loop_id, struct fc_port **); 9368c2ecf20Sopenharmony_civoid qla24xx_delete_sess_fn(struct work_struct *); 9378c2ecf20Sopenharmony_civoid qlt_unknown_atio_work_fn(struct work_struct *); 9388c2ecf20Sopenharmony_civoid qlt_update_host_map(struct scsi_qla_host *, port_id_t); 9398c2ecf20Sopenharmony_civoid qlt_remove_target_resources(struct qla_hw_data *); 9408c2ecf20Sopenharmony_civoid qlt_clr_qp_table(struct scsi_qla_host *vha); 9418c2ecf20Sopenharmony_civoid qlt_set_mode(struct scsi_qla_host *); 9428c2ecf20Sopenharmony_ciint qla2x00_set_data_rate(scsi_qla_host_t *vha, uint16_t mode); 9438c2ecf20Sopenharmony_ciextern void qla24xx_process_purex_list(struct purex_list *); 9448c2ecf20Sopenharmony_ciextern void qla2x00_dfs_create_rport(scsi_qla_host_t *vha, struct fc_port *fp); 9458c2ecf20Sopenharmony_ciextern void qla2x00_dfs_remove_rport(scsi_qla_host_t *vha, struct fc_port *fp); 9468c2ecf20Sopenharmony_ci 9478c2ecf20Sopenharmony_ci/* nvme.c */ 9488c2ecf20Sopenharmony_civoid qla_nvme_unregister_remote_port(struct fc_port *fcport); 9498c2ecf20Sopenharmony_civoid qla_handle_els_plogi_done(scsi_qla_host_t *vha, struct event_arg *ea); 9508c2ecf20Sopenharmony_ci#endif /* _QLA_GBL_H */ 951