1*e3976af5SThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-only */ 2afaf5a2dSDavid Somayajulu /* 3afaf5a2dSDavid Somayajulu * QLogic iSCSI HBA Driver 44a4f51e9SVikas Chaudhary * Copyright (c) 2003-2013 QLogic Corporation 5afaf5a2dSDavid Somayajulu */ 6afaf5a2dSDavid Somayajulu 7afaf5a2dSDavid Somayajulu #ifndef __QLA4x_GBL_H 8afaf5a2dSDavid Somayajulu #define __QLA4x_GBL_H 9afaf5a2dSDavid Somayajulu 10e08c182cSDavid C Somayajulu struct iscsi_cls_conn; 11e08c182cSDavid C Somayajulu 12f4f5df23SVikas Chaudhary int qla4xxx_hw_reset(struct scsi_qla_host *ha); 13f26b9044SDavid C Somayajulu int ql4xxx_lock_drvr_wait(struct scsi_qla_host *a); 14afaf5a2dSDavid Somayajulu int qla4xxx_send_command_to_isp(struct scsi_qla_host *ha, struct srb *srb); 1513483730SMike Christie int qla4xxx_initialize_adapter(struct scsi_qla_host *ha, int is_reset); 16afaf5a2dSDavid Somayajulu int qla4xxx_soft_reset(struct scsi_qla_host *ha); 177d12e780SDavid Howells irqreturn_t qla4xxx_intr_handler(int irq, void *dev_id); 18afaf5a2dSDavid Somayajulu 19f4f5df23SVikas Chaudhary void qla4xxx_free_ddb(struct scsi_qla_host *ha, struct ddb_entry *ddb_entry); 20afaf5a2dSDavid Somayajulu void qla4xxx_process_aen(struct scsi_qla_host *ha, uint8_t process_aen); 21afaf5a2dSDavid Somayajulu 22afaf5a2dSDavid Somayajulu int qla4xxx_get_dhcp_ip_address(struct scsi_qla_host *ha); 2309a0f719SVikas Chaudhary int qla4xxx_abort_task(struct scsi_qla_host *ha, struct srb *srb); 24afaf5a2dSDavid Somayajulu int qla4xxx_reset_lun(struct scsi_qla_host *ha, struct ddb_entry *ddb_entry, 259cb78c16SHannes Reinecke uint64_t lun); 26ce545039SMike Christie int qla4xxx_reset_target(struct scsi_qla_host *ha, 27ce545039SMike Christie struct ddb_entry *ddb_entry); 28afaf5a2dSDavid Somayajulu int qla4xxx_get_flash(struct scsi_qla_host *ha, dma_addr_t dma_addr, 29afaf5a2dSDavid Somayajulu uint32_t offset, uint32_t len); 30afaf5a2dSDavid Somayajulu int qla4xxx_get_firmware_status(struct scsi_qla_host *ha); 31afaf5a2dSDavid Somayajulu int qla4xxx_get_firmware_state(struct scsi_qla_host *ha); 32afaf5a2dSDavid Somayajulu int qla4xxx_initialize_fw_cb(struct scsi_qla_host *ha); 33afaf5a2dSDavid Somayajulu 34afaf5a2dSDavid Somayajulu /* FIXME: Goodness! this really wants a small struct to hold the 35afaf5a2dSDavid Somayajulu * parameters. On x86 the args will get passed on the stack! */ 36afaf5a2dSDavid Somayajulu int qla4xxx_get_fwddb_entry(struct scsi_qla_host *ha, 37afaf5a2dSDavid Somayajulu uint16_t fw_ddb_index, 38afaf5a2dSDavid Somayajulu struct dev_db_entry *fw_ddb_entry, 39afaf5a2dSDavid Somayajulu dma_addr_t fw_ddb_entry_dma, 40afaf5a2dSDavid Somayajulu uint32_t *num_valid_ddb_entries, 41afaf5a2dSDavid Somayajulu uint32_t *next_ddb_index, 42afaf5a2dSDavid Somayajulu uint32_t *fw_ddb_device_state, 43afaf5a2dSDavid Somayajulu uint32_t *conn_err_detail, 44afaf5a2dSDavid Somayajulu uint16_t *tcp_source_port_num, 45afaf5a2dSDavid Somayajulu uint16_t *connection_id); 46afaf5a2dSDavid Somayajulu 47afaf5a2dSDavid Somayajulu int qla4xxx_set_ddb_entry(struct scsi_qla_host * ha, uint16_t fw_ddb_index, 48b3a271a9SManish Rangankar dma_addr_t fw_ddb_entry_dma, uint32_t *mbx_sts); 49d00efe3fSMike Christie uint8_t qla4xxx_get_ifcb(struct scsi_qla_host *ha, uint32_t *mbox_cmd, 50d00efe3fSMike Christie uint32_t *mbox_sts, dma_addr_t init_fw_cb_dma); 51d00efe3fSMike Christie int qla4xxx_conn_close_sess_logout(struct scsi_qla_host *ha, 52d00efe3fSMike Christie uint16_t fw_ddb_index, 53d00efe3fSMike Christie uint16_t connection_id, 54d00efe3fSMike Christie uint16_t option); 55d00efe3fSMike Christie int qla4xxx_disable_acb(struct scsi_qla_host *ha); 56d00efe3fSMike Christie int qla4xxx_set_acb(struct scsi_qla_host *ha, uint32_t *mbox_cmd, 57d00efe3fSMike Christie uint32_t *mbox_sts, dma_addr_t acb_dma); 586085491cSHarish Zunjarrao int qla4xxx_get_acb(struct scsi_qla_host *ha, dma_addr_t acb_dma, 596085491cSHarish Zunjarrao uint32_t acb_type, uint32_t len); 608b0402e1SHarish Zunjarrao int qla4xxx_get_ip_state(struct scsi_qla_host *ha, uint32_t acb_idx, 618b0402e1SHarish Zunjarrao uint32_t ip_idx, uint32_t *sts); 62b3a271a9SManish Rangankar void qla4xxx_mark_device_missing(struct iscsi_cls_session *cls_session); 63afaf5a2dSDavid Somayajulu u16 rd_nvram_word(struct scsi_qla_host *ha, int offset); 642a991c21SManish Rangankar u8 rd_nvram_byte(struct scsi_qla_host *ha, int offset); 65afaf5a2dSDavid Somayajulu void qla4xxx_get_crash_record(struct scsi_qla_host *ha); 66afaf5a2dSDavid Somayajulu int qla4xxx_is_nvram_configuration_valid(struct scsi_qla_host *ha); 677ad633c0SHarish Zunjarrao int qla4xxx_about_firmware(struct scsi_qla_host *ha); 68afaf5a2dSDavid Somayajulu void qla4xxx_interrupt_service_routine(struct scsi_qla_host *ha, 69afaf5a2dSDavid Somayajulu uint32_t intr_status); 70afaf5a2dSDavid Somayajulu int qla4xxx_init_rings(struct scsi_qla_host *ha); 71f4f5df23SVikas Chaudhary void qla4xxx_srb_compl(struct kref *ref); 72e08c182cSDavid C Somayajulu struct srb *qla4xxx_del_from_active_array(struct scsi_qla_host *ha, 73e08c182cSDavid C Somayajulu uint32_t index); 74821d6e54SVikas Chaudhary int qla4xxx_process_ddb_changed(struct scsi_qla_host *ha, uint32_t fw_ddb_index, 75821d6e54SVikas Chaudhary uint32_t state, uint32_t conn_error); 76e08c182cSDavid C Somayajulu void qla4xxx_dump_buffer(void *b, uint32_t size); 779d562913SDavid C Somayajulu int qla4xxx_send_marker_iocb(struct scsi_qla_host *ha, 789cb78c16SHannes Reinecke struct ddb_entry *ddb_entry, uint64_t lun, uint16_t mrkr_mod); 79d00efe3fSMike Christie int qla4xxx_set_flash(struct scsi_qla_host *ha, dma_addr_t dma_addr, 80d00efe3fSMike Christie uint32_t offset, uint32_t length, uint32_t options); 81f4f5df23SVikas Chaudhary int qla4xxx_mailbox_command(struct scsi_qla_host *ha, uint8_t inCount, 82f4f5df23SVikas Chaudhary uint8_t outCount, uint32_t *mbx_cmd, uint32_t *mbx_sts); 83fca9f04dSMike Christie int qla4xxx_get_chap_index(struct scsi_qla_host *ha, char *username, 84fca9f04dSMike Christie char *password, int bidi, uint16_t *chap_index); 8526ffd7b4SAdheer Chandravanshi int qla4xxx_set_chap(struct scsi_qla_host *ha, char *username, char *password, 8626ffd7b4SAdheer Chandravanshi uint16_t idx, int bidi); 87f4f5df23SVikas Chaudhary 88f4f5df23SVikas Chaudhary void qla4xxx_queue_iocb(struct scsi_qla_host *ha); 89f4f5df23SVikas Chaudhary void qla4xxx_complete_iocb(struct scsi_qla_host *ha); 90f4f5df23SVikas Chaudhary int qla4xxx_get_sys_info(struct scsi_qla_host *ha); 91f4f5df23SVikas Chaudhary int qla4xxx_iospace_config(struct scsi_qla_host *ha); 92f4f5df23SVikas Chaudhary void qla4xxx_pci_config(struct scsi_qla_host *ha); 93f4f5df23SVikas Chaudhary int qla4xxx_start_firmware(struct scsi_qla_host *ha); 94f4f5df23SVikas Chaudhary irqreturn_t qla4xxx_intr_handler(int irq, void *dev_id); 95f4f5df23SVikas Chaudhary uint16_t qla4xxx_rd_shdw_req_q_out(struct scsi_qla_host *ha); 96f4f5df23SVikas Chaudhary uint16_t qla4xxx_rd_shdw_rsp_q_in(struct scsi_qla_host *ha); 97f4f5df23SVikas Chaudhary int qla4xxx_request_irqs(struct scsi_qla_host *ha); 98f4f5df23SVikas Chaudhary void qla4xxx_free_irqs(struct scsi_qla_host *ha); 99f4f5df23SVikas Chaudhary void qla4xxx_process_response_queue(struct scsi_qla_host *ha); 100f4f5df23SVikas Chaudhary void qla4xxx_wake_dpc(struct scsi_qla_host *ha); 101f4f5df23SVikas Chaudhary void qla4xxx_get_conn_event_log(struct scsi_qla_host *ha); 10221033639SNilesh Javali void qla4xxx_mailbox_premature_completion(struct scsi_qla_host *ha); 10391a772a4SKaren Higgins void qla4xxx_dump_registers(struct scsi_qla_host *ha); 104d00efe3fSMike Christie uint8_t qla4xxx_update_local_ifcb(struct scsi_qla_host *ha, 105d00efe3fSMike Christie uint32_t *mbox_cmd, 106d00efe3fSMike Christie uint32_t *mbox_sts, 107d00efe3fSMike Christie struct addr_ctrl_blk *init_fw_cb, 108d00efe3fSMike Christie dma_addr_t init_fw_cb_dma); 109f4f5df23SVikas Chaudhary 110f4f5df23SVikas Chaudhary void qla4_8xxx_pci_config(struct scsi_qla_host *); 111f4f5df23SVikas Chaudhary int qla4_8xxx_iospace_config(struct scsi_qla_host *ha); 112f4f5df23SVikas Chaudhary int qla4_8xxx_load_risc(struct scsi_qla_host *); 113f8086f4fSVikas Chaudhary irqreturn_t qla4_82xx_intr_handler(int irq, void *dev_id); 114f8086f4fSVikas Chaudhary void qla4_82xx_queue_iocb(struct scsi_qla_host *ha); 115f8086f4fSVikas Chaudhary void qla4_82xx_complete_iocb(struct scsi_qla_host *ha); 116f4f5df23SVikas Chaudhary 117f8086f4fSVikas Chaudhary int qla4_82xx_crb_win_lock(struct scsi_qla_host *); 118f8086f4fSVikas Chaudhary void qla4_82xx_crb_win_unlock(struct scsi_qla_host *); 119f8086f4fSVikas Chaudhary int qla4_82xx_pci_get_crb_addr_2M(struct scsi_qla_host *, ulong *); 120f8086f4fSVikas Chaudhary void qla4_82xx_wr_32(struct scsi_qla_host *, ulong, u32); 12133693c7aSVikas Chaudhary uint32_t qla4_82xx_rd_32(struct scsi_qla_host *, ulong); 122f8086f4fSVikas Chaudhary int qla4_82xx_pci_mem_read_2M(struct scsi_qla_host *, u64, void *, int); 123f8086f4fSVikas Chaudhary int qla4_82xx_pci_mem_write_2M(struct scsi_qla_host *ha, u64, void *, int); 124f8086f4fSVikas Chaudhary int qla4_82xx_isp_reset(struct scsi_qla_host *ha); 125f8086f4fSVikas Chaudhary void qla4_82xx_interrupt_service_routine(struct scsi_qla_host *ha, 126f4f5df23SVikas Chaudhary uint32_t intr_status); 127f8086f4fSVikas Chaudhary uint16_t qla4_82xx_rd_shdw_req_q_out(struct scsi_qla_host *ha); 128f8086f4fSVikas Chaudhary uint16_t qla4_82xx_rd_shdw_rsp_q_in(struct scsi_qla_host *ha); 129f4f5df23SVikas Chaudhary int qla4_8xxx_get_sys_info(struct scsi_qla_host *ha); 130f4f5df23SVikas Chaudhary void qla4_8xxx_watchdog(struct scsi_qla_host *ha); 131f4f5df23SVikas Chaudhary int qla4_8xxx_stop_firmware(struct scsi_qla_host *ha); 132f4f5df23SVikas Chaudhary int qla4_8xxx_get_flash_info(struct scsi_qla_host *ha); 133f8086f4fSVikas Chaudhary void qla4_82xx_enable_intrs(struct scsi_qla_host *ha); 134f8086f4fSVikas Chaudhary void qla4_82xx_disable_intrs(struct scsi_qla_host *ha); 135f4f5df23SVikas Chaudhary int qla4_8xxx_enable_msix(struct scsi_qla_host *ha); 136f4f5df23SVikas Chaudhary irqreturn_t qla4_8xxx_msi_handler(int irq, void *dev_id); 137f4f5df23SVikas Chaudhary irqreturn_t qla4_8xxx_default_intr_handler(int irq, void *dev_id); 138f4f5df23SVikas Chaudhary irqreturn_t qla4_8xxx_msix_rsp_q(int irq, void *dev_id); 139f4f5df23SVikas Chaudhary void qla4xxx_mark_all_devices_missing(struct scsi_qla_host *ha); 140f4f5df23SVikas Chaudhary void qla4xxx_dead_adapter_cleanup(struct scsi_qla_host *ha); 141f8086f4fSVikas Chaudhary int qla4_82xx_idc_lock(struct scsi_qla_host *ha); 142f8086f4fSVikas Chaudhary void qla4_82xx_idc_unlock(struct scsi_qla_host *ha); 143f4f5df23SVikas Chaudhary int qla4_8xxx_device_state_handler(struct scsi_qla_host *ha); 144f4f5df23SVikas Chaudhary void qla4_8xxx_need_qsnt_handler(struct scsi_qla_host *ha); 145f4f5df23SVikas Chaudhary void qla4_8xxx_clear_drv_active(struct scsi_qla_host *ha); 146626115cdSAndrew Morton void qla4_8xxx_set_drv_active(struct scsi_qla_host *ha); 147b3a271a9SManish Rangankar int qla4xxx_conn_open(struct scsi_qla_host *ha, uint16_t fw_ddb_index); 148b3a271a9SManish Rangankar int qla4xxx_set_param_ddbentry(struct scsi_qla_host *ha, 149b3a271a9SManish Rangankar struct ddb_entry *ddb_entry, 150b3a271a9SManish Rangankar struct iscsi_cls_conn *cls_conn, 151b3a271a9SManish Rangankar uint32_t *mbx_sts); 152b3a271a9SManish Rangankar int qla4xxx_session_logout_ddb(struct scsi_qla_host *ha, 153b3a271a9SManish Rangankar struct ddb_entry *ddb_entry, int options); 154b3a271a9SManish Rangankar int qla4xxx_req_ddb_entry(struct scsi_qla_host *ha, uint32_t fw_ddb_index, 155b3a271a9SManish Rangankar uint32_t *mbx_sts); 156b3a271a9SManish Rangankar int qla4xxx_clear_ddb_entry(struct scsi_qla_host *ha, uint32_t fw_ddb_index); 157b3a271a9SManish Rangankar int qla4xxx_send_passthru0(struct iscsi_task *task); 15813483730SMike Christie void qla4xxx_free_ddb_index(struct scsi_qla_host *ha); 159b3a271a9SManish Rangankar int qla4xxx_get_mgmt_data(struct scsi_qla_host *ha, uint16_t fw_ddb_index, 160b3a271a9SManish Rangankar uint16_t stats_size, dma_addr_t stats_dma); 161b3a271a9SManish Rangankar void qla4xxx_update_session_conn_param(struct scsi_qla_host *ha, 162b3a271a9SManish Rangankar struct ddb_entry *ddb_entry); 16313483730SMike Christie void qla4xxx_update_session_conn_fwddb_param(struct scsi_qla_host *ha, 16413483730SMike Christie struct ddb_entry *ddb_entry); 1652a991c21SManish Rangankar int qla4xxx_bootdb_by_index(struct scsi_qla_host *ha, 1662a991c21SManish Rangankar struct dev_db_entry *fw_ddb_entry, 1672a991c21SManish Rangankar dma_addr_t fw_ddb_entry_dma, uint16_t ddb_index); 1682a991c21SManish Rangankar int qla4xxx_get_chap(struct scsi_qla_host *ha, char *username, 1692a991c21SManish Rangankar char *password, uint16_t idx); 1707c07d139SHarish Zunjarrao int qla4xxx_get_nvram(struct scsi_qla_host *ha, dma_addr_t nvram_dma, 1717c07d139SHarish Zunjarrao uint32_t offset, uint32_t size); 1727c07d139SHarish Zunjarrao int qla4xxx_set_nvram(struct scsi_qla_host *ha, dma_addr_t nvram_dma, 1737c07d139SHarish Zunjarrao uint32_t offset, uint32_t size); 1745232f801SHarish Zunjarrao int qla4xxx_restore_factory_defaults(struct scsi_qla_host *ha, 1755232f801SHarish Zunjarrao uint32_t region, uint32_t field0, 1765232f801SHarish Zunjarrao uint32_t field1); 17713483730SMike Christie int qla4xxx_get_ddb_index(struct scsi_qla_host *ha, uint16_t *ddb_index); 17813483730SMike Christie void qla4xxx_login_flash_ddb(struct iscsi_cls_session *cls_session); 17913483730SMike Christie int qla4xxx_unblock_ddb(struct iscsi_cls_session *cls_session); 18013483730SMike Christie int qla4xxx_unblock_flash_ddb(struct iscsi_cls_session *cls_session); 18113483730SMike Christie int qla4xxx_flash_ddb_change(struct scsi_qla_host *ha, uint32_t fw_ddb_index, 18213483730SMike Christie struct ddb_entry *ddb_entry, uint32_t state); 18313483730SMike Christie int qla4xxx_ddb_change(struct scsi_qla_host *ha, uint32_t fw_ddb_index, 18413483730SMike Christie struct ddb_entry *ddb_entry, uint32_t state); 18513483730SMike Christie void qla4xxx_build_ddb_list(struct scsi_qla_host *ha, int is_reset); 18668b6d5d3SVikas Chaudhary int qla4xxx_post_aen_work(struct scsi_qla_host *ha, 18768b6d5d3SVikas Chaudhary enum iscsi_host_event_code aen_code, 188ff884430SVikas Chaudhary uint32_t data_size, uint8_t *data); 189c0b9d3f7SVikas Chaudhary int qla4xxx_ping_iocb(struct scsi_qla_host *ha, uint32_t options, 190c0b9d3f7SVikas Chaudhary uint32_t payload_size, uint32_t pid, uint8_t *ipaddr); 191c0b9d3f7SVikas Chaudhary int qla4xxx_post_ping_evt_work(struct scsi_qla_host *ha, 192c0b9d3f7SVikas Chaudhary uint32_t status, uint32_t pid, 193c0b9d3f7SVikas Chaudhary uint32_t data_size, uint8_t *data); 1941e9e2be3SAdheer Chandravanshi int qla4xxx_flashdb_by_index(struct scsi_qla_host *ha, 1951e9e2be3SAdheer Chandravanshi struct dev_db_entry *fw_ddb_entry, 1961e9e2be3SAdheer Chandravanshi dma_addr_t fw_ddb_entry_dma, uint16_t ddb_index); 1972a991c21SManish Rangankar 198a355943cSVikas Chaudhary /* BSG Functions */ 199a355943cSVikas Chaudhary int qla4xxx_bsg_request(struct bsg_job *bsg_job); 200a355943cSVikas Chaudhary int qla4xxx_process_vendor_specific(struct bsg_job *bsg_job); 201a355943cSVikas Chaudhary 20213483730SMike Christie void qla4xxx_arm_relogin_timer(struct ddb_entry *ddb_entry); 203068237c8STej Parkash int qla4xxx_get_minidump_template(struct scsi_qla_host *ha, 204068237c8STej Parkash dma_addr_t phys_addr); 205068237c8STej Parkash int qla4xxx_req_template_size(struct scsi_qla_host *ha); 206068237c8STej Parkash void qla4_8xxx_alloc_sysfs_attr(struct scsi_qla_host *ha); 207068237c8STej Parkash void qla4_8xxx_free_sysfs_attr(struct scsi_qla_host *ha); 208068237c8STej Parkash void qla4xxx_alloc_fw_dump(struct scsi_qla_host *ha); 20933693c7aSVikas Chaudhary int qla4_82xx_try_start_fw(struct scsi_qla_host *ha); 21033693c7aSVikas Chaudhary int qla4_8xxx_need_reset(struct scsi_qla_host *ha); 21133693c7aSVikas Chaudhary int qla4_82xx_md_rd_32(struct scsi_qla_host *ha, uint32_t off, uint32_t *data); 21233693c7aSVikas Chaudhary int qla4_82xx_md_wr_32(struct scsi_qla_host *ha, uint32_t off, uint32_t data); 21333693c7aSVikas Chaudhary void qla4_82xx_rom_lock_recovery(struct scsi_qla_host *ha); 21433693c7aSVikas Chaudhary void qla4_82xx_queue_mbox_cmd(struct scsi_qla_host *ha, uint32_t *mbx_cmd, 21533693c7aSVikas Chaudhary int incount); 21633693c7aSVikas Chaudhary void qla4_82xx_process_mbox_intr(struct scsi_qla_host *ha, int outcount); 21733693c7aSVikas Chaudhary void qla4xxx_queue_mbox_cmd(struct scsi_qla_host *ha, uint32_t *mbx_cmd, 21833693c7aSVikas Chaudhary int incount); 21933693c7aSVikas Chaudhary void qla4xxx_process_mbox_intr(struct scsi_qla_host *ha, int outcount); 2206e7b4292SVikas Chaudhary void qla4_8xxx_dump_peg_reg(struct scsi_qla_host *ha); 2216e7b4292SVikas Chaudhary void qla4_83xx_disable_intrs(struct scsi_qla_host *ha); 2226e7b4292SVikas Chaudhary void qla4_83xx_enable_intrs(struct scsi_qla_host *ha); 2236e7b4292SVikas Chaudhary int qla4_83xx_start_firmware(struct scsi_qla_host *ha); 2246e7b4292SVikas Chaudhary irqreturn_t qla4_83xx_intr_handler(int irq, void *dev_id); 2256e7b4292SVikas Chaudhary void qla4_83xx_interrupt_service_routine(struct scsi_qla_host *ha, 2266e7b4292SVikas Chaudhary uint32_t intr_status); 2276e7b4292SVikas Chaudhary int qla4_83xx_isp_reset(struct scsi_qla_host *ha); 2286e7b4292SVikas Chaudhary void qla4_83xx_queue_iocb(struct scsi_qla_host *ha); 2296e7b4292SVikas Chaudhary void qla4_83xx_complete_iocb(struct scsi_qla_host *ha); 2306e7b4292SVikas Chaudhary uint32_t qla4_83xx_rd_reg(struct scsi_qla_host *ha, ulong addr); 2316e7b4292SVikas Chaudhary void qla4_83xx_wr_reg(struct scsi_qla_host *ha, ulong addr, uint32_t val); 2326e7b4292SVikas Chaudhary int qla4_83xx_rd_reg_indirect(struct scsi_qla_host *ha, uint32_t addr, 2336e7b4292SVikas Chaudhary uint32_t *data); 2346e7b4292SVikas Chaudhary int qla4_83xx_wr_reg_indirect(struct scsi_qla_host *ha, uint32_t addr, 2356e7b4292SVikas Chaudhary uint32_t data); 2366e7b4292SVikas Chaudhary int qla4_83xx_drv_lock(struct scsi_qla_host *ha); 2376e7b4292SVikas Chaudhary void qla4_83xx_drv_unlock(struct scsi_qla_host *ha); 2386e7b4292SVikas Chaudhary void qla4_83xx_rom_lock_recovery(struct scsi_qla_host *ha); 2396e7b4292SVikas Chaudhary void qla4_83xx_queue_mbox_cmd(struct scsi_qla_host *ha, uint32_t *mbx_cmd, 2406e7b4292SVikas Chaudhary int incount); 2416e7b4292SVikas Chaudhary void qla4_83xx_process_mbox_intr(struct scsi_qla_host *ha, int outcount); 2426e7b4292SVikas Chaudhary void qla4_83xx_read_reset_template(struct scsi_qla_host *ha); 2436e7b4292SVikas Chaudhary void qla4_83xx_set_idc_dontreset(struct scsi_qla_host *ha); 2446e7b4292SVikas Chaudhary int qla4_83xx_idc_dontreset(struct scsi_qla_host *ha); 2456e7b4292SVikas Chaudhary int qla4_83xx_lockless_flash_read_u32(struct scsi_qla_host *ha, 2466e7b4292SVikas Chaudhary uint32_t flash_addr, uint8_t *p_data, 2476e7b4292SVikas Chaudhary int u32_word_count); 2486e7b4292SVikas Chaudhary void qla4_83xx_clear_idc_dontreset(struct scsi_qla_host *ha); 2496e7b4292SVikas Chaudhary void qla4_83xx_need_reset_handler(struct scsi_qla_host *ha); 2506e7b4292SVikas Chaudhary int qla4_83xx_flash_read_u32(struct scsi_qla_host *ha, uint32_t flash_addr, 2516e7b4292SVikas Chaudhary uint8_t *p_data, int u32_word_count); 2526e7b4292SVikas Chaudhary void qla4_83xx_get_idc_param(struct scsi_qla_host *ha); 2536e7b4292SVikas Chaudhary void qla4_8xxx_set_rst_ready(struct scsi_qla_host *ha); 2546e7b4292SVikas Chaudhary void qla4_8xxx_clear_rst_ready(struct scsi_qla_host *ha); 2556e7b4292SVikas Chaudhary int qla4_8xxx_device_bootstrap(struct scsi_qla_host *ha); 2566e7b4292SVikas Chaudhary void qla4_8xxx_get_minidump(struct scsi_qla_host *ha); 2575c19b92aSVikas Chaudhary int qla4_8xxx_intr_disable(struct scsi_qla_host *ha); 2585c19b92aSVikas Chaudhary int qla4_8xxx_intr_enable(struct scsi_qla_host *ha); 259cfb27874SManish Dusane int qla4_8xxx_set_param(struct scsi_qla_host *ha, int param); 26039c95826SVikas Chaudhary int qla4_8xxx_update_idc_reg(struct scsi_qla_host *ha); 261320a61deSNilesh Javali int qla4_83xx_post_idc_ack(struct scsi_qla_host *ha); 262546fef27STej Parkash void qla4_83xx_disable_pause(struct scsi_qla_host *ha); 2635c19b92aSVikas Chaudhary void qla4_83xx_enable_mbox_intrs(struct scsi_qla_host *ha); 2649661975fSVikas Chaudhary int qla4_83xx_can_perform_reset(struct scsi_qla_host *ha); 2651e9e2be3SAdheer Chandravanshi int qla4xxx_get_default_ddb(struct scsi_qla_host *ha, uint32_t options, 2661e9e2be3SAdheer Chandravanshi dma_addr_t dma_addr); 2671e9e2be3SAdheer Chandravanshi int qla4xxx_get_uni_chap_at_index(struct scsi_qla_host *ha, char *username, 2681e9e2be3SAdheer Chandravanshi char *password, uint16_t chap_index); 2697ab284c9SNilesh Javali int qla4xxx_disable_acb(struct scsi_qla_host *ha); 2707ab284c9SNilesh Javali int qla4xxx_set_acb(struct scsi_qla_host *ha, uint32_t *mbox_cmd, 2717ab284c9SNilesh Javali uint32_t *mbox_sts, dma_addr_t acb_dma); 2727ab284c9SNilesh Javali int qla4xxx_get_acb(struct scsi_qla_host *ha, dma_addr_t acb_dma, 2737ab284c9SNilesh Javali uint32_t acb_type, uint32_t len); 2747ab284c9SNilesh Javali int qla4_84xx_config_acb(struct scsi_qla_host *ha, int acb_config); 2753c3cab17STej Parkash int qla4_8xxx_ms_mem_write_128b(struct scsi_qla_host *ha, 27641f79bdeSSantosh Vernekar uint64_t addr, uint32_t *data, uint32_t count); 277f8e93412SHarish Zunjarrao uint8_t qla4xxx_set_ipaddr_state(uint8_t fw_ipaddr_state); 278df86f771SVikas Chaudhary int qla4_83xx_get_port_config(struct scsi_qla_host *ha, uint32_t *config); 279df86f771SVikas Chaudhary int qla4_83xx_set_port_config(struct scsi_qla_host *ha, uint32_t *config); 28037418cc6SNilesh Javali int qla4_8xxx_check_init_adapter_retry(struct scsi_qla_host *ha); 281a083e8bcSVikas Chaudhary int qla4_83xx_is_detached(struct scsi_qla_host *ha); 282906cbf3dSNilesh Javali int qla4xxx_sysfs_ddb_export(struct scsi_qla_host *ha); 28313483730SMike Christie 28411010fecSAndrew Vasquez extern int ql4xextended_error_logging; 285afaf5a2dSDavid Somayajulu extern int ql4xdontresethba; 286f4f5df23SVikas Chaudhary extern int ql4xenablemsix; 287068237c8STej Parkash extern int ql4xmdcapmask; 288068237c8STej Parkash extern int ql4xenablemd; 289f4f5df23SVikas Chaudhary 2907ad633c0SHarish Zunjarrao extern struct device_attribute *qla4xxx_host_attrs[]; 291afaf5a2dSDavid Somayajulu #endif /* _QLA4x_GBL_H */ 292