Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   1) /* SPDX-License-Identifier: GPL-2.0-only */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   2) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   3)  * QLogic Fibre Channel HBA Driver
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   4)  * Copyright (c)  2003-2014 QLogic Corporation
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   5)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   6) #ifndef __QLA_GBL_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   7) #define	__QLA_GBL_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   8) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   9) #include <linux/interrupt.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  10) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  11) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  12)  * Global Function Prototypes in qla_init.c source file.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  13)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  14) extern int qla2x00_initialize_adapter(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  15) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  16) extern int qla2100_pci_config(struct scsi_qla_host *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  17) extern int qla2300_pci_config(struct scsi_qla_host *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  18) extern int qla24xx_pci_config(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  19) extern int qla25xx_pci_config(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  20) extern int qla2x00_reset_chip(struct scsi_qla_host *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  21) extern int qla24xx_reset_chip(struct scsi_qla_host *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  22) extern int qla2x00_chip_diag(struct scsi_qla_host *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  23) extern int qla24xx_chip_diag(struct scsi_qla_host *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  24) extern void qla2x00_config_rings(struct scsi_qla_host *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  25) extern void qla24xx_config_rings(struct scsi_qla_host *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  26) extern int qla2x00_reset_adapter(struct scsi_qla_host *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  27) extern int qla24xx_reset_adapter(struct scsi_qla_host *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  28) extern int qla2x00_nvram_config(struct scsi_qla_host *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  29) extern int qla24xx_nvram_config(struct scsi_qla_host *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  30) extern int qla81xx_nvram_config(struct scsi_qla_host *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  31) extern void qla2x00_update_fw_options(struct scsi_qla_host *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  32) extern void qla24xx_update_fw_options(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  33) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  34) extern int qla2x00_load_risc(struct scsi_qla_host *, uint32_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  35) extern int qla24xx_load_risc(scsi_qla_host_t *, uint32_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  36) extern int qla81xx_load_risc(scsi_qla_host_t *, uint32_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  37) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  38) extern int qla2x00_perform_loop_resync(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  39) extern int qla2x00_loop_resync(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  40) extern void qla2x00_clear_loop_id(fc_port_t *fcport);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  41) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  42) extern int qla2x00_fabric_login(scsi_qla_host_t *, fc_port_t *, uint16_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  43) extern int qla2x00_local_device_login(scsi_qla_host_t *, fc_port_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  44) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  45) extern int qla24xx_els_dcmd_iocb(scsi_qla_host_t *, int, port_id_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  46) extern int qla24xx_els_dcmd2_iocb(scsi_qla_host_t *, int, fc_port_t *, bool);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  47) extern void qla2x00_els_dcmd2_free(scsi_qla_host_t *vha,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  48) 				   struct els_plogi *els_plogi);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  49) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  50) extern void qla2x00_update_fcports(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  51) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  52) extern int qla2x00_abort_isp(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  53) extern void qla2x00_abort_isp_cleanup(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  54) extern void qla2x00_quiesce_io(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  55) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  56) extern void qla2x00_update_fcport(scsi_qla_host_t *, fc_port_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  57) void qla_register_fcport_fn(struct work_struct *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  58) extern void qla2x00_alloc_fw_dump(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  59) extern void qla2x00_try_to_stop_firmware(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  60) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  61) extern int qla2x00_get_thermal_temp(scsi_qla_host_t *, uint16_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  62) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  63) extern void qla84xx_put_chip(struct scsi_qla_host *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  64) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  65) extern int qla2x00_async_login(struct scsi_qla_host *, fc_port_t *,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  66)     uint16_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  67) extern int qla2x00_async_logout(struct scsi_qla_host *, fc_port_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  68) extern int qla2x00_async_prlo(struct scsi_qla_host *, fc_port_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  69) extern int qla2x00_async_adisc(struct scsi_qla_host *, fc_port_t *,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  70)     uint16_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  71) extern int qla2x00_async_tm_cmd(fc_port_t *, uint32_t, uint32_t, uint32_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  72) extern void qla2x00_async_login_done(struct scsi_qla_host *, fc_port_t *,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  73)     uint16_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  74) struct qla_work_evt *qla2x00_alloc_work(struct scsi_qla_host *,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  75)     enum qla_work_type);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  76) extern int qla24xx_async_gnl(struct scsi_qla_host *, fc_port_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  77) int qla2x00_post_work(struct scsi_qla_host *vha, struct qla_work_evt *e);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  78) extern void *qla2x00_alloc_iocbs_ready(struct qla_qpair *, srb_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  79) extern int qla24xx_update_fcport_fcp_prio(scsi_qla_host_t *, fc_port_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  80) extern int qla24xx_async_abort_cmd(srb_t *, bool);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  81) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  82) extern void qla2x00_set_fcport_state(fc_port_t *fcport, int state);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  83) extern fc_port_t *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  84) qla2x00_alloc_fcport(scsi_qla_host_t *, gfp_t );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  85) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  86) extern int __qla83xx_set_idc_control(scsi_qla_host_t *, uint32_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  87) extern int __qla83xx_get_idc_control(scsi_qla_host_t *, uint32_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  88) extern void qla83xx_idc_audit(scsi_qla_host_t *, int);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  89) extern int qla83xx_nic_core_reset(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  90) extern void qla83xx_reset_ownership(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  91) extern int qla2xxx_mctp_dump(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  92) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  93) extern int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  94) qla2x00_alloc_outstanding_cmds(struct qla_hw_data *, struct req_que *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  95) extern int qla2x00_init_rings(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  96) extern struct qla_qpair *qla2xxx_create_qpair(struct scsi_qla_host *,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  97) 	int, int, bool);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  98) extern int qla2xxx_delete_qpair(struct scsi_qla_host *, struct qla_qpair *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  99) void qla2x00_handle_rscn(scsi_qla_host_t *vha, struct event_arg *ea);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) void qla24xx_handle_plogi_done_event(struct scsi_qla_host *vha,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) 				     struct event_arg *ea);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) void qla24xx_handle_relogin_event(scsi_qla_host_t *vha,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) 				  struct event_arg *ea);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) int qla24xx_async_gpdb(struct scsi_qla_host *, fc_port_t *, u8);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) int qla24xx_async_prli(struct scsi_qla_host *, fc_port_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) int qla24xx_async_notify_ack(scsi_qla_host_t *, fc_port_t *,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) 	struct imm_ntfy_from_isp *, int);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) int qla24xx_post_newsess_work(struct scsi_qla_host *, port_id_t *, u8 *, u8*,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109)     void *, u8);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) int qla24xx_fcport_handle_login(struct scsi_qla_host *, fc_port_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) int qla24xx_detect_sfp(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) int qla24xx_post_gpdb_work(struct scsi_qla_host *, fc_port_t *, u8);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) extern void qla28xx_get_aux_images(struct scsi_qla_host *,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115)     struct active_regions *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) extern void qla27xx_get_active_image(struct scsi_qla_host *,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117)     struct active_regions *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) void qla2x00_async_prlo_done(struct scsi_qla_host *, fc_port_t *,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120)     uint16_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) extern int qla2x00_post_async_prlo_work(struct scsi_qla_host *, fc_port_t *,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122)     uint16_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) extern int qla2x00_post_async_prlo_done_work(struct scsi_qla_host *,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124)     fc_port_t *, uint16_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) int qla_post_iidma_work(struct scsi_qla_host *vha, fc_port_t *fcport);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) void qla_do_iidma_work(struct scsi_qla_host *vha, fc_port_t *fcport);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) int qla2x00_reserve_mgmt_server_loop_id(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) void qla_rscn_replay(fc_port_t *fcport);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) void qla24xx_free_purex_item(struct purex_item *item);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) extern bool qla24xx_risc_firmware_invalid(uint32_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) void qla_init_iocb_limit(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135)  * Global Data in qla_os.c source file.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) extern char qla2x00_version_str[];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) extern struct kmem_cache *srb_cachep;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) extern struct kmem_cache *qla_tgt_plogi_cachep;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) extern int ql2xlogintimeout;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) extern int qlport_down_retry;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) extern int ql2xplogiabsentdevice;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) extern int ql2xloginretrycount;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) extern int ql2xfdmienable;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) extern int ql2xrdpenable;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) extern int ql2xsmartsan;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) extern int ql2xallocfwdump;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) extern int ql2xextended_error_logging;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) extern int ql2xiidmaenable;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) extern int ql2xmqsupport;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) extern int ql2xfwloadbin;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) extern int ql2xetsenable;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) extern int ql2xshiftctondsd;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) extern int ql2xdbwr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) extern int ql2xasynctmfenable;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) extern int ql2xgffidenable;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) extern int ql2xenabledif;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) extern int ql2xenablehba_err_chk;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) extern int ql2xdontresethba;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) extern uint64_t ql2xmaxlun;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) extern int ql2xmdcapmask;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) extern int ql2xmdenable;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) extern int ql2xexlogins;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) extern int ql2xexchoffld;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) extern int ql2xiniexchg;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) extern int ql2xfwholdabts;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) extern int ql2xmvasynctoatio;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) extern int ql2xuctrlirq;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) extern int ql2xnvmeenable;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) extern int ql2xautodetectsfp;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) extern int ql2xenablemsix;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) extern int qla2xuseresexchforels;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) extern int ql2xexlogins;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) extern int ql2xdifbundlinginternalbuffers;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) extern int ql2xfulldump_on_mpifail;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) extern int ql2xenforce_iocb_limit;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) extern int qla2x00_loop_reset(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) extern void qla2x00_abort_all_cmds(scsi_qla_host_t *, int);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) extern int qla2x00_post_aen_work(struct scsi_qla_host *, enum
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183)     fc_host_event_code, u32);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) extern int qla2x00_post_idc_ack_work(struct scsi_qla_host *, uint16_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) extern int qla2x00_post_async_login_work(struct scsi_qla_host *, fc_port_t *,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186)     uint16_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) extern int qla2x00_post_async_logout_work(struct scsi_qla_host *, fc_port_t *,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188)     uint16_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) extern int qla2x00_post_async_adisc_work(struct scsi_qla_host *, fc_port_t *,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190)     uint16_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) extern int qla2x00_post_async_adisc_done_work(struct scsi_qla_host *,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192)     fc_port_t *, uint16_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) extern int qla2x00_set_exlogins_buffer(struct scsi_qla_host *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) extern void qla2x00_free_exlogin_buffer(struct qla_hw_data *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) extern int qla2x00_set_exchoffld_buffer(struct scsi_qla_host *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) extern void qla2x00_free_exchoffld_buffer(struct qla_hw_data *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) extern int qla81xx_restart_mpi_firmware(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) extern struct scsi_qla_host *qla2x00_create_host(struct scsi_host_template *,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) 	struct qla_hw_data *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) extern void qla2x00_free_host(struct scsi_qla_host *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) extern void qla2x00_relogin(struct scsi_qla_host *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) extern void qla2x00_do_work(struct scsi_qla_host *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) extern void qla2x00_free_fcports(struct scsi_qla_host *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) extern void qla2x00_free_fcport(fc_port_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) extern void qla83xx_schedule_work(scsi_qla_host_t *, int);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) extern void qla83xx_service_idc_aen(struct work_struct *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) extern void qla83xx_nic_core_unrecoverable_work(struct work_struct *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) extern void qla83xx_idc_state_handler_work(struct work_struct *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) extern void qla83xx_nic_core_reset_work(struct work_struct *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) extern void qla83xx_idc_lock(scsi_qla_host_t *, uint16_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) extern void qla83xx_idc_unlock(scsi_qla_host_t *, uint16_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) extern int qla83xx_idc_state_handler(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) extern int qla83xx_set_drv_presence(scsi_qla_host_t *vha);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218) extern int __qla83xx_set_drv_presence(scsi_qla_host_t *vha);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219) extern int qla83xx_clear_drv_presence(scsi_qla_host_t *vha);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220) extern int __qla83xx_clear_drv_presence(scsi_qla_host_t *vha);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221) extern int qla2x00_post_uevent_work(struct scsi_qla_host *, u32);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223) extern int qla2x00_post_uevent_work(struct scsi_qla_host *, u32);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224) extern void qla2x00_disable_board_on_pci_error(struct work_struct *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225) extern void qla2x00_sp_compl(srb_t *sp, int);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226) extern void qla2xxx_qpair_sp_free_dma(srb_t *sp);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227) extern void qla2xxx_qpair_sp_compl(srb_t *sp, int);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228) extern void qla24xx_sched_upd_fcport(fc_port_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229) void qla2x00_handle_login_done_event(struct scsi_qla_host *, fc_port_t *,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 230) 	uint16_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 231) int qla24xx_post_gnl_work(struct scsi_qla_host *, fc_port_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 232) int qla24xx_post_relogin_work(struct scsi_qla_host *vha);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 233) void qla2x00_wait_for_sess_deletion(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 234) void qla24xx_process_purex_rdp(struct scsi_qla_host *vha,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 235) 			       struct purex_item *pkt);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 236) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 237) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 238)  * Global Functions in qla_mid.c source file.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 239)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 240) extern struct scsi_host_template qla2xxx_driver_template;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 241) extern struct scsi_transport_template *qla2xxx_transport_vport_template;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 242) extern void qla2x00_timer(struct timer_list *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 243) extern void qla2x00_start_timer(scsi_qla_host_t *, unsigned long);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 244) extern void qla24xx_deallocate_vp_id(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 245) extern int qla24xx_disable_vp (scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 246) extern int qla24xx_enable_vp (scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 247) extern int qla24xx_control_vp(scsi_qla_host_t *, int );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 248) extern int qla24xx_modify_vp_config(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 249) extern int qla2x00_send_change_request(scsi_qla_host_t *, uint16_t, uint16_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 250) extern void qla2x00_vp_stop_timer(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 251) extern int qla24xx_configure_vhba (scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 252) extern void qla24xx_report_id_acquisition(scsi_qla_host_t *,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 253)     struct vp_rpt_id_entry_24xx *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 254) extern void qla2x00_do_dpc_all_vps(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 255) extern int qla24xx_vport_create_req_sanity_check(struct fc_vport *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 256) extern scsi_qla_host_t *qla24xx_create_vhost(struct fc_vport *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 257) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 258) extern void qla2x00_sp_free_dma(srb_t *sp);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 259) extern char *qla2x00_get_fw_version_str(struct scsi_qla_host *, char *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 260) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 261) extern void qla2x00_mark_device_lost(scsi_qla_host_t *, fc_port_t *, int);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 262) extern void qla2x00_mark_all_devices_lost(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 263) extern int qla24xx_async_abort_cmd(srb_t *, bool);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 264) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 265) extern struct fw_blob *qla2x00_request_firmware(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 266) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 267) extern int qla2x00_wait_for_hba_online(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 268) extern int qla2x00_wait_for_chip_reset(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 269) extern int qla2x00_wait_for_fcoe_ctx_reset(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 270) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 271) extern void qla2xxx_wake_dpc(struct scsi_qla_host *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 272) extern void qla2x00_alert_all_vps(struct rsp_que *, uint16_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 273) extern void qla2x00_async_event(scsi_qla_host_t *, struct rsp_que *,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 274) 	uint16_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 275) extern int  qla2x00_vp_abort_isp(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 276) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 277) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 278)  * Global Function Prototypes in qla_iocb.c source file.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 279)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 280) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 281) extern uint16_t qla2x00_calc_iocbs_32(uint16_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 282) extern uint16_t qla2x00_calc_iocbs_64(uint16_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 283) extern void qla2x00_build_scsi_iocbs_32(srb_t *, cmd_entry_t *, uint16_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 284) extern void qla2x00_build_scsi_iocbs_64(srb_t *, cmd_entry_t *, uint16_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 285) extern void qla24xx_build_scsi_iocbs(srb_t *, struct cmd_type_7 *,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 286) 	uint16_t, struct req_que *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 287) extern uint32_t qla2xxx_get_next_handle(struct req_que *req);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 288) extern int qla2x00_start_scsi(srb_t *sp);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 289) extern int qla24xx_start_scsi(srb_t *sp);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 290) int qla2x00_marker(struct scsi_qla_host *, struct qla_qpair *,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 291)     uint16_t, uint64_t, uint8_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 292) extern int qla2x00_start_sp(srb_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 293) extern int qla24xx_dif_start_scsi(srb_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 294) extern int qla2x00_start_bidir(srb_t *, struct scsi_qla_host *, uint32_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 295) extern int qla2xxx_dif_start_scsi_mq(srb_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 296) extern void qla2x00_init_timer(srb_t *sp, unsigned long tmo);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 297) extern unsigned long qla2x00_get_async_timeout(struct scsi_qla_host *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 298) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 299) extern void *qla2x00_alloc_iocbs(struct scsi_qla_host *, srb_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 300) extern void *__qla2x00_alloc_iocbs(struct qla_qpair *, srb_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 301) extern int qla2x00_issue_marker(scsi_qla_host_t *, int);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 302) extern int qla24xx_walk_and_build_sglist_no_difb(struct qla_hw_data *, srb_t *,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 303) 	struct dsd64 *, uint16_t, struct qla_tc_param *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 304) extern int qla24xx_walk_and_build_sglist(struct qla_hw_data *, srb_t *,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 305) 	struct dsd64 *, uint16_t, struct qla_tc_param *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 306) extern int qla24xx_walk_and_build_prot_sglist(struct qla_hw_data *, srb_t *,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 307) 	struct dsd64 *, uint16_t, struct qla_tgt_cmd *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 308) extern int qla24xx_get_one_block_sg(uint32_t, struct qla2_sgx *, uint32_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 309) extern int qla24xx_configure_prot_mode(srb_t *, uint16_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 310) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 311) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 312)  * Global Function Prototypes in qla_mbx.c source file.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 313)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 314) extern int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 315) qla2x00_load_ram(scsi_qla_host_t *, dma_addr_t, uint32_t, uint32_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 316) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 317) extern int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 318) qla2x00_dump_ram(scsi_qla_host_t *, dma_addr_t, uint32_t, uint32_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 319) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 320) extern int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 321) qla2x00_execute_fw(scsi_qla_host_t *, uint32_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 322) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 323) extern int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 324) qla2x00_get_fw_version(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 325) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 326) extern int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 327) qla2x00_get_fw_options(scsi_qla_host_t *, uint16_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 328) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 329) extern int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 330) qla2x00_set_fw_options(scsi_qla_host_t *, uint16_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 331) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 332) extern int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 333) qla2x00_mbx_reg_test(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 334) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 335) extern int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 336) qla2x00_verify_checksum(scsi_qla_host_t *, uint32_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 337) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 338) extern int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 339) qla2x00_issue_iocb(scsi_qla_host_t *, void *, dma_addr_t, size_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 340) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 341) extern int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 342) qla2x00_abort_command(srb_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 343) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 344) extern int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 345) qla2x00_abort_target(struct fc_port *, uint64_t, int);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 346) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 347) extern int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 348) qla2x00_lun_reset(struct fc_port *, uint64_t, int);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 349) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 350) extern int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 351) qla2x00_get_adapter_id(scsi_qla_host_t *, uint16_t *, uint8_t *, uint8_t *,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 352)     uint8_t *, uint16_t *, uint16_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 353) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 354) extern int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 355) qla2x00_get_retry_cnt(scsi_qla_host_t *, uint8_t *, uint8_t *, uint16_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 356) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 357) extern int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 358) qla2x00_init_firmware(scsi_qla_host_t *, uint16_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 359) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 360) extern int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 361) qla2x00_get_port_database(scsi_qla_host_t *, fc_port_t *, uint8_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 362) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 363) extern int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 364) qla24xx_get_port_database(scsi_qla_host_t *, u16, struct port_database_24xx *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 365) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 366) extern int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 367) qla2x00_get_firmware_state(scsi_qla_host_t *, uint16_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 368) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 369) extern int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 370) qla2x00_get_port_name(scsi_qla_host_t *, uint16_t, uint8_t *, uint8_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 371) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 372) extern int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 373) qla24xx_link_initialize(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 374) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 375) extern int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 376) qla2x00_lip_reset(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 377) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 378) extern int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 379) qla2x00_send_sns(scsi_qla_host_t *, dma_addr_t, uint16_t, size_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 380) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 381) extern int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 382) qla2x00_login_fabric(scsi_qla_host_t *, uint16_t, uint8_t, uint8_t, uint8_t,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 383)     uint16_t *, uint8_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 384) extern int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 385) qla24xx_login_fabric(scsi_qla_host_t *, uint16_t, uint8_t, uint8_t, uint8_t,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 386)     uint16_t *, uint8_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 387) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 388) extern int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 389) qla2x00_login_local_device(scsi_qla_host_t *, fc_port_t *, uint16_t *,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 390)     uint8_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 391) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 392) extern int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 393) qla2x00_fabric_logout(scsi_qla_host_t *, uint16_t, uint8_t, uint8_t, uint8_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 394) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 395) extern int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 396) qla24xx_fabric_logout(scsi_qla_host_t *, uint16_t, uint8_t, uint8_t, uint8_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 397) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 398) extern int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 399) qla2x00_full_login_lip(scsi_qla_host_t *ha);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 400) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 401) extern int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 402) qla2x00_get_id_list(scsi_qla_host_t *, void *, dma_addr_t, uint16_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 403) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 404) extern int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 405) qla2x00_get_resource_cnts(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 406) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 407) extern int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 408) qla2x00_get_fcal_position_map(scsi_qla_host_t *ha, char *pos_map);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 409) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 410) extern int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 411) qla2x00_get_link_status(scsi_qla_host_t *, uint16_t, struct link_statistics *,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 412)     dma_addr_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 413) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 414) extern int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 415) qla24xx_get_isp_stats(scsi_qla_host_t *, struct link_statistics *,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 416)     dma_addr_t, uint16_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 417) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 418) extern int qla24xx_abort_command(srb_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 419) extern int qla24xx_async_abort_command(srb_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 420) extern int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 421) qla24xx_abort_target(struct fc_port *, uint64_t, int);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 422) extern int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 423) qla24xx_lun_reset(struct fc_port *, uint64_t, int);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 424) extern int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 425) qla2x00_eh_wait_for_pending_commands(scsi_qla_host_t *, unsigned int,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 426) 	uint64_t, enum nexus_wait_type);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 427) extern int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 428) qla2x00_system_error(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 429) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 430) extern int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 431) qla2x00_write_serdes_word(scsi_qla_host_t *, uint16_t, uint16_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 432) extern int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 433) qla2x00_read_serdes_word(scsi_qla_host_t *, uint16_t, uint16_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 434) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 435) extern int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 436) qla8044_write_serdes_word(scsi_qla_host_t *, uint32_t, uint32_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 437) extern int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 438) qla8044_read_serdes_word(scsi_qla_host_t *, uint32_t, uint32_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 439) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 440) extern int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 441) qla2x00_set_serdes_params(scsi_qla_host_t *, uint16_t, uint16_t, uint16_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 442) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 443) extern int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 444) qla2x00_stop_firmware(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 445) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 446) extern int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 447) qla2x00_enable_eft_trace(scsi_qla_host_t *, dma_addr_t, uint16_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 448) extern int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 449) qla2x00_disable_eft_trace(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 450) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 451) extern int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 452) qla2x00_enable_fce_trace(scsi_qla_host_t *, dma_addr_t, uint16_t , uint16_t *,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 453)     uint32_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 454) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 455) extern int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 456) qla2x00_disable_fce_trace(scsi_qla_host_t *, uint64_t *, uint64_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 457) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 458) extern int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 459) qla82xx_set_driver_version(scsi_qla_host_t *, char *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 460) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 461) extern int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 462) qla25xx_set_driver_version(scsi_qla_host_t *, char *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 463) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 464) extern int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 465) qla25xx_set_els_cmds_supported(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 466) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 467) extern int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 468) qla24xx_get_buffer_credits(scsi_qla_host_t *, struct buffer_credit_24xx *,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 469) 	dma_addr_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 470) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 471) extern int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 472) qla2x00_read_sfp(scsi_qla_host_t *, dma_addr_t, uint8_t *,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 473) 	uint16_t, uint16_t, uint16_t, uint16_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 474) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 475) extern int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 476) qla2x00_write_sfp(scsi_qla_host_t *, dma_addr_t, uint8_t *,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 477) 	uint16_t, uint16_t, uint16_t, uint16_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 478) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 479) extern int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 480) qla2x00_set_idma_speed(scsi_qla_host_t *, uint16_t, uint16_t, uint16_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 481) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 482) extern int qla84xx_verify_chip(struct scsi_qla_host *, uint16_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 483) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 484) extern int qla81xx_idc_ack(scsi_qla_host_t *, uint16_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 485) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 486) extern int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 487) qla81xx_fac_get_sector_size(scsi_qla_host_t *, uint32_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 488) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 489) extern int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 490) qla81xx_fac_do_write_enable(scsi_qla_host_t *, int);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 491) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 492) extern int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 493) qla81xx_fac_erase_sector(scsi_qla_host_t *, uint32_t, uint32_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 494) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 495) extern int qla81xx_fac_semaphore_access(scsi_qla_host_t *, int);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 496) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 497) extern int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 498) qla2x00_get_xgmac_stats(scsi_qla_host_t *, dma_addr_t, uint16_t, uint16_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 499) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 500) extern int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 501) qla2x00_get_dcbx_params(scsi_qla_host_t *, dma_addr_t, uint16_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 502) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 503) extern int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 504) qla2x00_read_ram_word(scsi_qla_host_t *, uint32_t, uint32_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 505) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 506) extern int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 507) qla2x00_write_ram_word(scsi_qla_host_t *, uint32_t, uint32_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 508) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 509) extern int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 510) qla81xx_write_mpi_register(scsi_qla_host_t *, uint16_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 511) extern int qla2x00_get_data_rate(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 512) extern int qla24xx_set_fcp_prio(scsi_qla_host_t *, uint16_t, uint16_t,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 513) 	uint16_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 514) extern int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 515) qla81xx_get_port_config(scsi_qla_host_t *, uint16_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 516) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 517) extern int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 518) qla81xx_set_port_config(scsi_qla_host_t *, uint16_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 519) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 520) extern int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 521) qla2x00_port_logout(scsi_qla_host_t *, struct fc_port *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 522) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 523) extern int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 524) qla2x00_dump_mctp_data(scsi_qla_host_t *, dma_addr_t, uint32_t, uint32_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 525) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 526) extern int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 527) qla26xx_dport_diagnostics(scsi_qla_host_t *, void *, uint, uint);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 528) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 529) int qla24xx_send_mb_cmd(struct scsi_qla_host *, mbx_cmd_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 530) int qla24xx_gpdb_wait(struct scsi_qla_host *, fc_port_t *, u8);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 531) int qla24xx_gidlist_wait(struct scsi_qla_host *, void *, dma_addr_t,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 532)     uint16_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 533) int __qla24xx_parse_gpdb(struct scsi_qla_host *, fc_port_t *,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 534) 	struct port_database_24xx *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 535) int qla24xx_get_port_login_templ(scsi_qla_host_t *, dma_addr_t,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 536) 				 void *, uint16_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 537) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 538) extern int qla27xx_get_zio_threshold(scsi_qla_host_t *, uint16_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 539) extern int qla27xx_set_zio_threshold(scsi_qla_host_t *, uint16_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 540) int qla24xx_res_count_wait(struct scsi_qla_host *, uint16_t *, int);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 541) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 542) extern int qla28xx_secure_flash_update(scsi_qla_host_t *, uint16_t, uint16_t,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 543)     uint32_t, dma_addr_t, uint32_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 544) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 545) extern int qla2xxx_read_remote_register(scsi_qla_host_t *, uint32_t,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 546)     uint32_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 547) extern int qla2xxx_write_remote_register(scsi_qla_host_t *, uint32_t,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 548)     uint32_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 549) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 550) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 551)  * Global Function Prototypes in qla_isr.c source file.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 552)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 553) extern irqreturn_t qla2100_intr_handler(int, void *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 554) extern irqreturn_t qla2300_intr_handler(int, void *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 555) extern irqreturn_t qla24xx_intr_handler(int, void *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 556) extern void qla2x00_process_response_queue(struct rsp_que *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 557) extern void
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 558) qla24xx_process_response_queue(struct scsi_qla_host *, struct rsp_que *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 559) extern int qla2x00_request_irqs(struct qla_hw_data *, struct rsp_que *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 560) extern void qla2x00_free_irqs(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 561) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 562) extern int qla2x00_get_data_rate(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 563) extern const char *qla2x00_get_link_speed_str(struct qla_hw_data *, uint16_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 564) extern srb_t *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 565) qla2x00_get_sp_from_handle(scsi_qla_host_t *, const char *, struct req_que *,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 566) 	void *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 567) extern void
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 568) qla2x00_process_completed_request(struct scsi_qla_host *, struct req_que *,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 569) 	uint32_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 570) extern irqreturn_t
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 571) qla2xxx_msix_rsp_q(int irq, void *dev_id);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 572) extern irqreturn_t
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 573) qla2xxx_msix_rsp_q_hs(int irq, void *dev_id);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 574) fc_port_t *qla2x00_find_fcport_by_loopid(scsi_qla_host_t *, uint16_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 575) fc_port_t *qla2x00_find_fcport_by_wwpn(scsi_qla_host_t *, u8 *, u8);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 576) fc_port_t *qla2x00_find_fcport_by_nportid(scsi_qla_host_t *, port_id_t *, u8);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 577) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 578) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 579)  * Global Function Prototypes in qla_sup.c source file.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 580)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 581) extern void qla2x00_release_nvram_protection(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 582) extern int qla24xx_read_flash_data(scsi_qla_host_t *, uint32_t *,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 583)     uint32_t, uint32_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 584) extern uint8_t *qla2x00_read_nvram_data(scsi_qla_host_t *, void *, uint32_t,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 585)     uint32_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 586) extern uint8_t *qla24xx_read_nvram_data(scsi_qla_host_t *, void *, uint32_t,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 587)     uint32_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 588) extern int qla2x00_write_nvram_data(scsi_qla_host_t *, void *, uint32_t,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 589)     uint32_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 590) extern int qla24xx_write_nvram_data(scsi_qla_host_t *, void *, uint32_t,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 591)     uint32_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 592) extern uint8_t *qla25xx_read_nvram_data(scsi_qla_host_t *, void *, uint32_t,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 593)     uint32_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 594) extern int qla25xx_write_nvram_data(scsi_qla_host_t *, void *, uint32_t,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 595)     uint32_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 596) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 597) extern int qla2x00_is_a_vp_did(scsi_qla_host_t *, uint32_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 598) bool qla2x00_check_reg32_for_disconnect(scsi_qla_host_t *, uint32_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 599) bool qla2x00_check_reg16_for_disconnect(scsi_qla_host_t *, uint16_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 600) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 601) extern int qla2x00_beacon_on(struct scsi_qla_host *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 602) extern int qla2x00_beacon_off(struct scsi_qla_host *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 603) extern void qla2x00_beacon_blink(struct scsi_qla_host *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 604) extern int qla24xx_beacon_on(struct scsi_qla_host *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 605) extern int qla24xx_beacon_off(struct scsi_qla_host *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 606) extern void qla24xx_beacon_blink(struct scsi_qla_host *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 607) extern void qla83xx_beacon_blink(struct scsi_qla_host *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 608) extern int qla82xx_beacon_on(struct scsi_qla_host *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 609) extern int qla82xx_beacon_off(struct scsi_qla_host *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 610) extern int qla83xx_wr_reg(scsi_qla_host_t *, uint32_t, uint32_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 611) extern int qla83xx_rd_reg(scsi_qla_host_t *, uint32_t, uint32_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 612) extern int qla83xx_restart_nic_firmware(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 613) extern int qla83xx_access_control(scsi_qla_host_t *, uint16_t, uint32_t,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 614) 				  uint32_t, uint16_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 615) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 616) extern void *qla2x00_read_optrom_data(struct scsi_qla_host *, void *,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 617) 					 uint32_t, uint32_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 618) extern int qla2x00_write_optrom_data(struct scsi_qla_host *, void *,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 619) 				     uint32_t, uint32_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 620) extern void *qla24xx_read_optrom_data(struct scsi_qla_host *, void *,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 621) 					 uint32_t, uint32_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 622) extern int qla24xx_write_optrom_data(struct scsi_qla_host *, void *,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 623) 				     uint32_t, uint32_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 624) extern void *qla25xx_read_optrom_data(struct scsi_qla_host *, void *,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 625) 					 uint32_t, uint32_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 626) extern void *qla8044_read_optrom_data(struct scsi_qla_host *,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 627) 					 void *, uint32_t, uint32_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 628) extern void qla8044_watchdog(struct scsi_qla_host *vha);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 629) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 630) extern int qla2x00_get_flash_version(scsi_qla_host_t *, void *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 631) extern int qla24xx_get_flash_version(scsi_qla_host_t *, void *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 632) extern int qla82xx_get_flash_version(scsi_qla_host_t *, void *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 633) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 634) extern int qla2xxx_get_flash_info(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 635) extern int qla2xxx_get_vpd_field(scsi_qla_host_t *, char *, char *, size_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 636) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 637) extern void qla2xxx_flash_npiv_conf(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 638) extern int qla24xx_read_fcp_prio_cfg(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 639) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 640) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 641)  * Global Function Prototypes in qla_dbg.c source file.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 642)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 643) void qla2xxx_dump_fw(scsi_qla_host_t *vha);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 644) void qla2100_fw_dump(scsi_qla_host_t *vha);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 645) void qla2300_fw_dump(scsi_qla_host_t *vha);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 646) void qla24xx_fw_dump(scsi_qla_host_t *vha);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 647) void qla25xx_fw_dump(scsi_qla_host_t *vha);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 648) void qla81xx_fw_dump(scsi_qla_host_t *vha);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 649) void qla82xx_fw_dump(scsi_qla_host_t *vha);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 650) void qla8044_fw_dump(scsi_qla_host_t *vha);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 651) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 652) void qla27xx_fwdump(scsi_qla_host_t *vha);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 653) extern void qla27xx_mpi_fwdump(scsi_qla_host_t *, int);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 654) extern ulong qla27xx_fwdt_calculate_dump_size(struct scsi_qla_host *, void *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 655) extern int qla27xx_fwdt_template_valid(void *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 656) extern ulong qla27xx_fwdt_template_size(void *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 657) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 658) extern void qla2xxx_dump_post_process(scsi_qla_host_t *, int);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 659) extern void ql_dump_regs(uint, scsi_qla_host_t *, uint);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 660) extern void ql_dump_buffer(uint, scsi_qla_host_t *, uint, const void *, uint);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 661) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 662)  * Global Function Prototypes in qla_gs.c source file.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 663)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 664) extern void *qla2x00_prep_ms_iocb(scsi_qla_host_t *, struct ct_arg *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 665) extern void *qla24xx_prep_ms_iocb(scsi_qla_host_t *, struct ct_arg *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 666) extern int qla2x00_ga_nxt(scsi_qla_host_t *, fc_port_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 667) extern int qla2x00_gid_pt(scsi_qla_host_t *, sw_info_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 668) extern int qla2x00_gpn_id(scsi_qla_host_t *, sw_info_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 669) extern int qla2x00_gnn_id(scsi_qla_host_t *, sw_info_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 670) extern void qla2x00_gff_id(scsi_qla_host_t *, sw_info_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 671) extern int qla2x00_rft_id(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 672) extern int qla2x00_rff_id(scsi_qla_host_t *, u8);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 673) extern int qla2x00_rnn_id(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 674) extern int qla2x00_rsnn_nn(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 675) extern void *qla2x00_prep_ms_fdmi_iocb(scsi_qla_host_t *, uint32_t, uint32_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 676) extern void *qla24xx_prep_ms_fdmi_iocb(scsi_qla_host_t *, uint32_t, uint32_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 677) extern int qla2x00_fdmi_register(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 678) extern int qla2x00_gfpn_id(scsi_qla_host_t *, sw_info_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 679) extern int qla2x00_gpsc(scsi_qla_host_t *, sw_info_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 680) extern size_t qla2x00_get_sym_node_name(scsi_qla_host_t *, uint8_t *, size_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 681) extern int qla2x00_chk_ms_status(scsi_qla_host_t *, ms_iocb_entry_t *,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 682) 	struct ct_sns_rsp *, const char *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 683) extern void qla2x00_async_iocb_timeout(void *data);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 684) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 685) extern void qla2x00_free_fcport(fc_port_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 686) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 687) extern int qla24xx_post_gpnid_work(struct scsi_qla_host *, port_id_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 688) extern int qla24xx_async_gpnid(scsi_qla_host_t *, port_id_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 689) void qla24xx_handle_gpnid_event(scsi_qla_host_t *, struct event_arg *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 690) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 691) int qla24xx_post_gpsc_work(struct scsi_qla_host *, fc_port_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 692) int qla24xx_async_gpsc(scsi_qla_host_t *, fc_port_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 693) void qla24xx_handle_gpsc_event(scsi_qla_host_t *, struct event_arg *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 694) int qla2x00_mgmt_svr_login(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 695) void qla24xx_handle_gffid_event(scsi_qla_host_t *vha, struct event_arg *ea);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 696) int qla24xx_async_gffid(scsi_qla_host_t *vha, fc_port_t *fcport);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 697) int qla24xx_async_gpnft(scsi_qla_host_t *, u8, srb_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 698) void qla24xx_async_gpnft_done(scsi_qla_host_t *, srb_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 699) void qla24xx_async_gnnft_done(scsi_qla_host_t *, srb_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 700) int qla24xx_async_gnnid(scsi_qla_host_t *, fc_port_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 701) void qla24xx_handle_gnnid_event(scsi_qla_host_t *, struct event_arg *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 702) int qla24xx_post_gnnid_work(struct scsi_qla_host *, fc_port_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 703) int qla24xx_post_gfpnid_work(struct scsi_qla_host *, fc_port_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 704) int qla24xx_async_gfpnid(scsi_qla_host_t *, fc_port_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 705) void qla24xx_handle_gfpnid_event(scsi_qla_host_t *, struct event_arg *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 706) void qla24xx_sp_unmap(scsi_qla_host_t *, srb_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 707) void qla_scan_work_fn(struct work_struct *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 708) uint qla25xx_fdmi_port_speed_capability(struct qla_hw_data *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 709) uint qla25xx_fdmi_port_speed_currently(struct qla_hw_data *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 710) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 711) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 712)  * Global Function Prototypes in qla_attr.c source file.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 713)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 714) struct device_attribute;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 715) extern struct device_attribute *qla2x00_host_attrs[];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 716) extern struct device_attribute *qla2x00_host_attrs_dm[];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 717) struct fc_function_template;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 718) extern struct fc_function_template qla2xxx_transport_functions;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 719) extern struct fc_function_template qla2xxx_transport_vport_functions;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 720) extern void qla2x00_alloc_sysfs_attr(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 721) extern void qla2x00_free_sysfs_attr(scsi_qla_host_t *, bool);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 722) extern void qla2x00_init_host_attr(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 723) extern void qla2x00_alloc_sysfs_attr(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 724) extern int qla2x00_loopback_test(scsi_qla_host_t *, struct msg_echo_lb *, uint16_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 725) extern int qla2x00_echo_test(scsi_qla_host_t *,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 726) 	struct msg_echo_lb *, uint16_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 727) extern int qla24xx_update_all_fcp_prio(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 728) extern int qla24xx_fcp_prio_cfg_valid(scsi_qla_host_t *,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 729) 	struct qla_fcp_prio_cfg *, uint8_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 730) void qla_insert_tgt_attrs(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 731) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 732)  * Global Function Prototypes in qla_dfs.c source file.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 733)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 734) extern int qla2x00_dfs_setup(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 735) extern int qla2x00_dfs_remove(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 736) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 737) /* Globa function prototypes for multi-q */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 738) extern int qla25xx_request_irq(struct qla_hw_data *, struct qla_qpair *,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 739) 	struct qla_msix_entry *, int);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 740) extern int qla25xx_init_req_que(struct scsi_qla_host *, struct req_que *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 741) extern int qla25xx_init_rsp_que(struct scsi_qla_host *, struct rsp_que *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 742) extern int qla25xx_create_req_que(struct qla_hw_data *, uint16_t, uint8_t,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 743) 	uint16_t, int, uint8_t, bool);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 744) extern int qla25xx_create_rsp_que(struct qla_hw_data *, uint16_t, uint8_t,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 745) 	uint16_t, struct qla_qpair *, bool);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 746) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 747) extern void qla2x00_init_response_q_entries(struct rsp_que *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 748) extern int qla25xx_delete_req_que(struct scsi_qla_host *, struct req_que *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 749) extern int qla25xx_delete_rsp_que(struct scsi_qla_host *, struct rsp_que *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 750) extern int qla25xx_delete_queues(struct scsi_qla_host *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 751) extern uint16_t qla24xx_rd_req_reg(struct qla_hw_data *, uint16_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 752) extern uint16_t qla25xx_rd_req_reg(struct qla_hw_data *, uint16_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 753) extern void qla24xx_wrt_req_reg(struct qla_hw_data *, uint16_t, uint16_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 754) extern void qla25xx_wrt_req_reg(struct qla_hw_data *, uint16_t, uint16_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 755) extern void qla25xx_wrt_rsp_reg(struct qla_hw_data *, uint16_t, uint16_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 756) extern void qla24xx_wrt_rsp_reg(struct qla_hw_data *, uint16_t, uint16_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 757) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 758) /* qlafx00 related functions */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 759) extern int qlafx00_pci_config(struct scsi_qla_host *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 760) extern int qlafx00_initialize_adapter(struct scsi_qla_host *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 761) extern int qlafx00_soft_reset(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 762) extern int qlafx00_chip_diag(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 763) extern void qlafx00_config_rings(struct scsi_qla_host *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 764) extern char *qlafx00_pci_info_str(struct scsi_qla_host *, char *, size_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 765) extern char *qlafx00_fw_version_str(struct scsi_qla_host *, char *, size_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 766) extern irqreturn_t qlafx00_intr_handler(int, void *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 767) extern void qlafx00_enable_intrs(struct qla_hw_data *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 768) extern void qlafx00_disable_intrs(struct qla_hw_data *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 769) extern int qlafx00_abort_target(fc_port_t *, uint64_t, int);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 770) extern int qlafx00_lun_reset(fc_port_t *, uint64_t, int);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 771) extern int qlafx00_start_scsi(srb_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 772) extern int qlafx00_abort_isp(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 773) extern int qlafx00_iospace_config(struct qla_hw_data *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 774) extern int qlafx00_init_firmware(scsi_qla_host_t *, uint16_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 775) extern int qlafx00_driver_shutdown(scsi_qla_host_t *, int);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 776) extern int qlafx00_fw_ready(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 777) extern int qlafx00_configure_devices(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 778) extern int qlafx00_reset_initialize(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 779) extern int qlafx00_fx_disc(scsi_qla_host_t *, fc_port_t *, uint16_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 780) extern void qlafx00_process_aen(struct scsi_qla_host *, struct qla_work_evt *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 781) extern int qlafx00_post_aenfx_work(struct scsi_qla_host *,  uint32_t,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 782) 				   uint32_t *, int);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 783) extern uint32_t qlafx00_fw_state_show(struct device *,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 784) 				      struct device_attribute *, char *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 785) extern void qlafx00_get_host_speed(struct Scsi_Host *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 786) extern void qlafx00_init_response_q_entries(struct rsp_que *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 787) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 788) extern void qlafx00_tm_iocb(srb_t *, struct tsk_mgmt_entry_fx00 *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 789) extern void qlafx00_abort_iocb(srb_t *, struct abort_iocb_entry_fx00 *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 790) extern void qlafx00_fxdisc_iocb(srb_t *, struct fxdisc_entry_fx00 *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 791) extern void qlafx00_timer_routine(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 792) extern int qlafx00_rescan_isp(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 793) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 794) /* qla82xx related functions */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 795) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 796) /* PCI related functions */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 797) extern int qla82xx_pci_config(struct scsi_qla_host *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 798) extern int qla82xx_pci_mem_read_2M(struct qla_hw_data *, u64, void *, int);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 799) extern int qla82xx_pci_region_offset(struct pci_dev *, int);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 800) extern int qla82xx_iospace_config(struct qla_hw_data *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 801) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 802) /* Initialization related functions */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 803) extern int qla82xx_reset_chip(struct scsi_qla_host *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 804) extern void qla82xx_config_rings(struct scsi_qla_host *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 805) extern void qla82xx_watchdog(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 806) extern int qla82xx_start_firmware(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 807) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 808) /* Firmware and flash related functions */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 809) extern int qla82xx_load_risc(scsi_qla_host_t *, uint32_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 810) extern void *qla82xx_read_optrom_data(struct scsi_qla_host *, void *,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 811) 					 uint32_t, uint32_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 812) extern int qla82xx_write_optrom_data(struct scsi_qla_host *, void *,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 813) 				     uint32_t, uint32_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 814) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 815) /* Mailbox related functions */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 816) extern int qla82xx_abort_isp(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 817) extern int qla82xx_restart_isp(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 818) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 819) /* IOCB related functions */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 820) extern int qla82xx_start_scsi(srb_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 821) extern void qla2x00_sp_free(srb_t *sp);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 822) extern void qla2x00_sp_timeout(struct timer_list *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 823) extern void qla2x00_bsg_job_done(srb_t *sp, int);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 824) extern void qla2x00_bsg_sp_free(srb_t *sp);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 825) extern void qla2x00_start_iocbs(struct scsi_qla_host *, struct req_que *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 826) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 827) /* Interrupt related */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 828) extern irqreturn_t qla82xx_intr_handler(int, void *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 829) extern irqreturn_t qla82xx_msi_handler(int, void *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 830) extern irqreturn_t qla82xx_msix_default(int, void *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 831) extern irqreturn_t qla82xx_msix_rsp_q(int, void *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 832) extern void qla82xx_enable_intrs(struct qla_hw_data *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 833) extern void qla82xx_disable_intrs(struct qla_hw_data *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 834) extern void qla82xx_poll(int, void *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 835) extern void qla82xx_init_flags(struct qla_hw_data *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 836) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 837) /* ISP 8021 hardware related */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 838) extern void qla82xx_set_drv_active(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 839) extern int qla82xx_wr_32(struct qla_hw_data *, ulong, u32);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 840) extern int qla82xx_rd_32(struct qla_hw_data *, ulong);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 841) extern int qla82xx_rdmem(struct qla_hw_data *, u64, void *, int);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 842) extern int qla82xx_wrmem(struct qla_hw_data *, u64, void *, int);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 843) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 844) /* ISP 8021 IDC */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 845) extern void qla82xx_clear_drv_active(struct qla_hw_data *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 846) extern uint32_t  qla82xx_wait_for_state_change(scsi_qla_host_t *, uint32_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 847) extern int qla82xx_idc_lock(struct qla_hw_data *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 848) extern void qla82xx_idc_unlock(struct qla_hw_data *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 849) extern int qla82xx_device_state_handler(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 850) extern void qla8xxx_dev_failed_handler(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 851) extern void qla82xx_clear_qsnt_ready(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 852) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 853) extern void qla2x00_set_model_info(scsi_qla_host_t *, uint8_t *, size_t,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 854) 				   const char *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 855) extern int qla82xx_mbx_intr_enable(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 856) extern int qla82xx_mbx_intr_disable(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 857) extern void qla82xx_start_iocbs(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 858) extern int qla82xx_fcoe_ctx_reset(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 859) extern int qla82xx_check_md_needed(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 860) extern void qla82xx_chip_reset_cleanup(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 861) extern int qla81xx_set_led_config(scsi_qla_host_t *, uint16_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 862) extern int qla81xx_get_led_config(scsi_qla_host_t *, uint16_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 863) extern int qla82xx_mbx_beacon_ctl(scsi_qla_host_t *, int);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 864) extern char *qdev_state(uint32_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 865) extern void qla82xx_clear_pending_mbx(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 866) extern int qla82xx_read_temperature(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 867) extern int qla8044_read_temperature(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 868) extern int qla2x00_read_sfp_dev(struct scsi_qla_host *, char *, int);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 869) extern int ql26xx_led_config(scsi_qla_host_t *, uint16_t, uint16_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 870) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 871) /* BSG related functions */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 872) extern int qla24xx_bsg_request(struct bsg_job *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 873) extern int qla24xx_bsg_timeout(struct bsg_job *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 874) extern int qla84xx_reset_chip(scsi_qla_host_t *, uint16_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 875) extern int qla2x00_issue_iocb_timeout(scsi_qla_host_t *, void *,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 876) 	dma_addr_t, size_t, uint32_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 877) extern int qla2x00_get_idma_speed(scsi_qla_host_t *, uint16_t,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 878) 	uint16_t *, uint16_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 879) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 880) /* 83xx related functions */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 881) void qla83xx_fw_dump(scsi_qla_host_t *vha);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 882) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 883) /* Minidump related functions */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 884) extern int qla82xx_md_get_template_size(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 885) extern int qla82xx_md_get_template(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 886) extern int qla82xx_md_alloc(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 887) extern void qla82xx_md_free(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 888) extern int qla82xx_md_collect(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 889) extern void qla82xx_md_prep(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 890) extern void qla82xx_set_reset_owner(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 891) extern int qla82xx_validate_template_chksum(scsi_qla_host_t *vha);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 892) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 893) /* Function declarations for ISP8044 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 894) extern int qla8044_idc_lock(struct qla_hw_data *ha);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 895) extern void qla8044_idc_unlock(struct qla_hw_data *ha);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 896) extern uint32_t qla8044_rd_reg(struct qla_hw_data *ha, ulong addr);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 897) extern void qla8044_wr_reg(struct qla_hw_data *ha, ulong addr, uint32_t val);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 898) extern void qla8044_read_reset_template(struct scsi_qla_host *ha);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 899) extern void qla8044_set_idc_dontreset(struct scsi_qla_host *ha);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 900) extern int qla8044_rd_direct(struct scsi_qla_host *vha, const uint32_t crb_reg);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 901) extern void qla8044_wr_direct(struct scsi_qla_host *vha,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 902) 			      const uint32_t crb_reg, const uint32_t value);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 903) extern int qla8044_device_state_handler(struct scsi_qla_host *vha);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 904) extern void qla8044_clear_qsnt_ready(struct scsi_qla_host *vha);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 905) extern void qla8044_clear_drv_active(struct qla_hw_data *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 906) void qla8044_get_minidump(struct scsi_qla_host *vha);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 907) int qla8044_collect_md_data(struct scsi_qla_host *vha);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 908) extern int qla8044_md_get_template(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 909) extern int qla8044_write_optrom_data(struct scsi_qla_host *, void *,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 910) 				     uint32_t, uint32_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 911) extern irqreturn_t qla8044_intr_handler(int, void *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 912) extern void qla82xx_mbx_completion(scsi_qla_host_t *, uint16_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 913) extern int qla8044_abort_isp(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 914) extern int qla8044_check_fw_alive(struct scsi_qla_host *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 915) extern int qla_get_exlogin_status(scsi_qla_host_t *, uint16_t *,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 916) 	uint16_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 917) extern int qla_set_exlogin_mem_cfg(scsi_qla_host_t *vha, dma_addr_t phys_addr);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 918) extern int qla_get_exchoffld_status(scsi_qla_host_t *, uint16_t *, uint16_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 919) extern int qla_set_exchoffld_mem_cfg(scsi_qla_host_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 920) extern void qlt_handle_abts_recv(struct scsi_qla_host *, struct rsp_que *,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 921) 	response_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 922) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 923) int qla24xx_async_notify_ack(scsi_qla_host_t *, fc_port_t *,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 924) 	struct imm_ntfy_from_isp *, int);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 925) void qla24xx_do_nack_work(struct scsi_qla_host *, struct qla_work_evt *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 926) void qlt_plogi_ack_link(struct scsi_qla_host *, struct qlt_plogi_ack_t *,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 927) 	struct fc_port *, enum qlt_plogi_link_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 928) void qlt_plogi_ack_unref(struct scsi_qla_host *, struct qlt_plogi_ack_t *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 929) extern void qlt_schedule_sess_for_deletion(struct fc_port *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 930) extern struct fc_port *qlt_find_sess_invalidate_other(scsi_qla_host_t *,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 931) 	uint64_t wwn, port_id_t port_id, uint16_t loop_id, struct fc_port **);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 932) void qla24xx_delete_sess_fn(struct work_struct *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 933) void qlt_unknown_atio_work_fn(struct work_struct *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 934) void qlt_update_host_map(struct scsi_qla_host *, port_id_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 935) void qlt_remove_target_resources(struct qla_hw_data *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 936) void qlt_clr_qp_table(struct scsi_qla_host *vha);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 937) void qlt_set_mode(struct scsi_qla_host *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 938) int qla2x00_set_data_rate(scsi_qla_host_t *vha, uint16_t mode);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 939) extern void qla24xx_process_purex_list(struct purex_list *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 940) extern void qla2x00_dfs_create_rport(scsi_qla_host_t *vha, struct fc_port *fp);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 941) extern void qla2x00_dfs_remove_rport(scsi_qla_host_t *vha, struct fc_port *fp);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 942) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 943) /* nvme.c */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 944) void qla_nvme_unregister_remote_port(struct fc_port *fcport);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 945) void qla_handle_els_plogi_done(scsi_qla_host_t *vha, struct event_arg *ea);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 946) #endif /* _QLA_GBL_H */