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