| David Somayajulu | afaf5a2 | 2006-09-19 10:28:00 -0700 | [diff] [blame] | 1 | /* | 
 | 2 |  * QLogic iSCSI HBA Driver | 
| Vikas Chaudhary | 7d01d06 | 2010-12-02 22:12:51 -0800 | [diff] [blame] | 3 |  * Copyright (c)  2003-2010 QLogic Corporation | 
| David Somayajulu | afaf5a2 | 2006-09-19 10:28:00 -0700 | [diff] [blame] | 4 |  * | 
 | 5 |  * See LICENSE.qla4xxx for copyright and licensing details. | 
 | 6 |  */ | 
 | 7 |  | 
 | 8 | #ifndef __QLA4x_GBL_H | 
 | 9 | #define	__QLA4x_GBL_H | 
 | 10 |  | 
| David C Somayajulu | e08c182 | 2007-05-23 18:14:34 -0700 | [diff] [blame] | 11 | struct iscsi_cls_conn; | 
 | 12 |  | 
| Vikas Chaudhary | f4f5df23 | 2010-07-28 15:53:44 +0530 | [diff] [blame] | 13 | int qla4xxx_hw_reset(struct scsi_qla_host *ha); | 
| David C Somayajulu | f26b904 | 2006-11-15 16:41:09 -0800 | [diff] [blame] | 14 | int ql4xxx_lock_drvr_wait(struct scsi_qla_host *a); | 
| David Somayajulu | afaf5a2 | 2006-09-19 10:28:00 -0700 | [diff] [blame] | 15 | int qla4xxx_send_tgts(struct scsi_qla_host *ha, char *ip, uint16_t port); | 
| Vikas Chaudhary | f4f5df23 | 2010-07-28 15:53:44 +0530 | [diff] [blame] | 16 | int qla4xxx_send_command_to_isp(struct scsi_qla_host *ha, struct srb *srb); | 
 | 17 | int qla4xxx_initialize_adapter(struct scsi_qla_host *ha, | 
| David Somayajulu | afaf5a2 | 2006-09-19 10:28:00 -0700 | [diff] [blame] | 18 | 			       uint8_t renew_ddb_list); | 
 | 19 | int qla4xxx_soft_reset(struct scsi_qla_host *ha); | 
| David Howells | 7d12e78 | 2006-10-05 14:55:46 +0100 | [diff] [blame] | 20 | irqreturn_t qla4xxx_intr_handler(int irq, void *dev_id); | 
| David Somayajulu | afaf5a2 | 2006-09-19 10:28:00 -0700 | [diff] [blame] | 21 |  | 
| Vikas Chaudhary | f4f5df23 | 2010-07-28 15:53:44 +0530 | [diff] [blame] | 22 | void qla4xxx_free_ddb_list(struct scsi_qla_host *ha); | 
 | 23 | void qla4xxx_free_ddb(struct scsi_qla_host *ha, struct ddb_entry *ddb_entry); | 
 | 24 | void qla4xxx_process_aen(struct scsi_qla_host *ha, uint8_t process_aen); | 
| David Somayajulu | afaf5a2 | 2006-09-19 10:28:00 -0700 | [diff] [blame] | 25 |  | 
| Vikas Chaudhary | f4f5df23 | 2010-07-28 15:53:44 +0530 | [diff] [blame] | 26 | int qla4xxx_get_dhcp_ip_address(struct scsi_qla_host *ha); | 
 | 27 | int qla4xxx_relogin_device(struct scsi_qla_host *ha, | 
 | 28 | 			   struct ddb_entry *ddb_entry); | 
| Vikas Chaudhary | 09a0f71 | 2010-04-28 11:42:24 +0530 | [diff] [blame] | 29 | int qla4xxx_abort_task(struct scsi_qla_host *ha, struct srb *srb); | 
| Vikas Chaudhary | f4f5df23 | 2010-07-28 15:53:44 +0530 | [diff] [blame] | 30 | int qla4xxx_reset_lun(struct scsi_qla_host *ha, struct ddb_entry *ddb_entry, | 
| David Somayajulu | afaf5a2 | 2006-09-19 10:28:00 -0700 | [diff] [blame] | 31 | 		      int lun); | 
| Vikas Chaudhary | f4f5df23 | 2010-07-28 15:53:44 +0530 | [diff] [blame] | 32 | int qla4xxx_reset_target(struct scsi_qla_host *ha, | 
 | 33 | 			 struct ddb_entry *ddb_entry); | 
 | 34 | int qla4xxx_get_flash(struct scsi_qla_host *ha, dma_addr_t dma_addr, | 
| David Somayajulu | afaf5a2 | 2006-09-19 10:28:00 -0700 | [diff] [blame] | 35 | 		      uint32_t offset, uint32_t len); | 
| Vikas Chaudhary | f4f5df23 | 2010-07-28 15:53:44 +0530 | [diff] [blame] | 36 | int qla4xxx_get_firmware_status(struct scsi_qla_host *ha); | 
 | 37 | int qla4xxx_get_firmware_state(struct scsi_qla_host *ha); | 
 | 38 | int qla4xxx_initialize_fw_cb(struct scsi_qla_host *ha); | 
| David Somayajulu | afaf5a2 | 2006-09-19 10:28:00 -0700 | [diff] [blame] | 39 |  | 
 | 40 | /* FIXME: Goodness!  this really wants a small struct to hold the | 
 | 41 |  * parameters. On x86 the args will get passed on the stack! */ | 
 | 42 | int qla4xxx_get_fwddb_entry(struct scsi_qla_host *ha, | 
 | 43 | 			    uint16_t fw_ddb_index, | 
 | 44 | 			    struct dev_db_entry *fw_ddb_entry, | 
 | 45 | 			    dma_addr_t fw_ddb_entry_dma, | 
 | 46 | 			    uint32_t *num_valid_ddb_entries, | 
 | 47 | 			    uint32_t *next_ddb_index, | 
 | 48 | 			    uint32_t *fw_ddb_device_state, | 
 | 49 | 			    uint32_t *conn_err_detail, | 
 | 50 | 			    uint16_t *tcp_source_port_num, | 
 | 51 | 			    uint16_t *connection_id); | 
 | 52 |  | 
| David Somayajulu | afaf5a2 | 2006-09-19 10:28:00 -0700 | [diff] [blame] | 53 | int qla4xxx_set_ddb_entry(struct scsi_qla_host * ha, uint16_t fw_ddb_index, | 
 | 54 | 			  dma_addr_t fw_ddb_entry_dma); | 
 | 55 |  | 
 | 56 | void qla4xxx_mark_device_missing(struct scsi_qla_host *ha, | 
 | 57 | 				 struct ddb_entry *ddb_entry); | 
| Vikas Chaudhary | f4f5df23 | 2010-07-28 15:53:44 +0530 | [diff] [blame] | 58 | u16 rd_nvram_word(struct scsi_qla_host *ha, int offset); | 
 | 59 | void qla4xxx_get_crash_record(struct scsi_qla_host *ha); | 
| David Somayajulu | afaf5a2 | 2006-09-19 10:28:00 -0700 | [diff] [blame] | 60 | struct ddb_entry *qla4xxx_alloc_sess(struct scsi_qla_host *ha); | 
 | 61 | int qla4xxx_add_sess(struct ddb_entry *); | 
 | 62 | void qla4xxx_destroy_sess(struct ddb_entry *ddb_entry); | 
| Vikas Chaudhary | f4f5df23 | 2010-07-28 15:53:44 +0530 | [diff] [blame] | 63 | int qla4xxx_is_nvram_configuration_valid(struct scsi_qla_host *ha); | 
| David Somayajulu | afaf5a2 | 2006-09-19 10:28:00 -0700 | [diff] [blame] | 64 | int qla4xxx_get_fw_version(struct scsi_qla_host * ha); | 
| Vikas Chaudhary | f4f5df23 | 2010-07-28 15:53:44 +0530 | [diff] [blame] | 65 | void qla4xxx_interrupt_service_routine(struct scsi_qla_host *ha, | 
| David Somayajulu | afaf5a2 | 2006-09-19 10:28:00 -0700 | [diff] [blame] | 66 | 				       uint32_t intr_status); | 
| Vikas Chaudhary | f4f5df23 | 2010-07-28 15:53:44 +0530 | [diff] [blame] | 67 | int qla4xxx_init_rings(struct scsi_qla_host *ha); | 
| Vikas Chaudhary | 09a0f71 | 2010-04-28 11:42:24 +0530 | [diff] [blame] | 68 | void qla4xxx_srb_compl(struct kref *ref); | 
| Vikas Chaudhary | f4f5df23 | 2010-07-28 15:53:44 +0530 | [diff] [blame] | 69 | struct srb *qla4xxx_del_from_active_array(struct scsi_qla_host *ha, | 
 | 70 | 		uint32_t index); | 
 | 71 | int qla4xxx_reinitialize_ddb_list(struct scsi_qla_host *ha); | 
| Vikas Chaudhary | 821d6e5 | 2010-04-28 11:41:21 +0530 | [diff] [blame] | 72 | int qla4xxx_process_ddb_changed(struct scsi_qla_host *ha, uint32_t fw_ddb_index, | 
 | 73 | 		uint32_t state, uint32_t conn_error); | 
| David C Somayajulu | e08c182 | 2007-05-23 18:14:34 -0700 | [diff] [blame] | 74 | void qla4xxx_dump_buffer(void *b, uint32_t size); | 
| David C Somayajulu | 9d56291 | 2008-03-19 11:23:03 -0700 | [diff] [blame] | 75 | int qla4xxx_send_marker_iocb(struct scsi_qla_host *ha, | 
 | 76 | 	struct ddb_entry *ddb_entry, int lun, uint16_t mrkr_mod); | 
| Vikas Chaudhary | 821d6e5 | 2010-04-28 11:41:21 +0530 | [diff] [blame] | 77 | int qla4_is_relogin_allowed(struct scsi_qla_host *ha, uint32_t conn_err); | 
| David Somayajulu | afaf5a2 | 2006-09-19 10:28:00 -0700 | [diff] [blame] | 78 |  | 
| Vikas Chaudhary | f4f5df23 | 2010-07-28 15:53:44 +0530 | [diff] [blame] | 79 | int qla4xxx_mailbox_command(struct scsi_qla_host *ha, uint8_t inCount, | 
 | 80 | 		uint8_t outCount, uint32_t *mbx_cmd, uint32_t *mbx_sts); | 
 | 81 |  | 
 | 82 | void qla4xxx_queue_iocb(struct scsi_qla_host *ha); | 
 | 83 | void qla4xxx_complete_iocb(struct scsi_qla_host *ha); | 
 | 84 | int qla4xxx_get_sys_info(struct scsi_qla_host *ha); | 
 | 85 | int qla4xxx_iospace_config(struct scsi_qla_host *ha); | 
 | 86 | void qla4xxx_pci_config(struct scsi_qla_host *ha); | 
 | 87 | int qla4xxx_start_firmware(struct scsi_qla_host *ha); | 
 | 88 | irqreturn_t qla4xxx_intr_handler(int irq, void *dev_id); | 
 | 89 | uint16_t qla4xxx_rd_shdw_req_q_out(struct scsi_qla_host *ha); | 
 | 90 | uint16_t qla4xxx_rd_shdw_rsp_q_in(struct scsi_qla_host *ha); | 
 | 91 | int qla4xxx_request_irqs(struct scsi_qla_host *ha); | 
 | 92 | void qla4xxx_free_irqs(struct scsi_qla_host *ha); | 
 | 93 | void qla4xxx_process_response_queue(struct scsi_qla_host *ha); | 
 | 94 | void qla4xxx_wake_dpc(struct scsi_qla_host *ha); | 
 | 95 | void qla4xxx_get_conn_event_log(struct scsi_qla_host *ha); | 
| Nilesh Javali | 2103363 | 2010-07-30 14:28:07 +0530 | [diff] [blame] | 96 | void qla4xxx_mailbox_premature_completion(struct scsi_qla_host *ha); | 
| Karen Higgins | 91a772a | 2010-10-06 22:50:21 -0700 | [diff] [blame] | 97 | void qla4xxx_dump_registers(struct scsi_qla_host *ha); | 
| Vikas Chaudhary | f4f5df23 | 2010-07-28 15:53:44 +0530 | [diff] [blame] | 98 |  | 
 | 99 | void qla4_8xxx_pci_config(struct scsi_qla_host *); | 
 | 100 | int qla4_8xxx_iospace_config(struct scsi_qla_host *ha); | 
 | 101 | int qla4_8xxx_load_risc(struct scsi_qla_host *); | 
 | 102 | irqreturn_t qla4_8xxx_intr_handler(int irq, void *dev_id); | 
 | 103 | void qla4_8xxx_queue_iocb(struct scsi_qla_host *ha); | 
 | 104 | void qla4_8xxx_complete_iocb(struct scsi_qla_host *ha); | 
 | 105 |  | 
 | 106 | int qla4_8xxx_crb_win_lock(struct scsi_qla_host *); | 
 | 107 | void qla4_8xxx_crb_win_unlock(struct scsi_qla_host *); | 
 | 108 | int qla4_8xxx_pci_get_crb_addr_2M(struct scsi_qla_host *, ulong *); | 
 | 109 | void qla4_8xxx_wr_32(struct scsi_qla_host *, ulong, u32); | 
 | 110 | int qla4_8xxx_rd_32(struct scsi_qla_host *, ulong); | 
 | 111 | int qla4_8xxx_pci_mem_read_2M(struct scsi_qla_host *, u64, void *, int); | 
 | 112 | int qla4_8xxx_pci_mem_write_2M(struct scsi_qla_host *ha, u64, void *, int); | 
 | 113 | int qla4_8xxx_isp_reset(struct scsi_qla_host *ha); | 
 | 114 | void qla4_8xxx_interrupt_service_routine(struct scsi_qla_host *ha, | 
 | 115 | 		uint32_t intr_status); | 
 | 116 | uint16_t qla4_8xxx_rd_shdw_req_q_out(struct scsi_qla_host *ha); | 
 | 117 | uint16_t qla4_8xxx_rd_shdw_rsp_q_in(struct scsi_qla_host *ha); | 
 | 118 | int qla4_8xxx_get_sys_info(struct scsi_qla_host *ha); | 
 | 119 | void qla4_8xxx_watchdog(struct scsi_qla_host *ha); | 
 | 120 | int qla4_8xxx_stop_firmware(struct scsi_qla_host *ha); | 
 | 121 | int qla4_8xxx_get_flash_info(struct scsi_qla_host *ha); | 
 | 122 | void qla4_8xxx_enable_intrs(struct scsi_qla_host *ha); | 
 | 123 | void qla4_8xxx_disable_intrs(struct scsi_qla_host *ha); | 
 | 124 | int qla4_8xxx_enable_msix(struct scsi_qla_host *ha); | 
 | 125 | void qla4_8xxx_disable_msix(struct scsi_qla_host *ha); | 
 | 126 | irqreturn_t qla4_8xxx_msi_handler(int irq, void *dev_id); | 
 | 127 | irqreturn_t qla4_8xxx_default_intr_handler(int irq, void *dev_id); | 
 | 128 | irqreturn_t qla4_8xxx_msix_rsp_q(int irq, void *dev_id); | 
 | 129 | void qla4xxx_mark_all_devices_missing(struct scsi_qla_host *ha); | 
 | 130 | void qla4xxx_dead_adapter_cleanup(struct scsi_qla_host *ha); | 
 | 131 | int qla4_8xxx_idc_lock(struct scsi_qla_host *ha); | 
 | 132 | void qla4_8xxx_idc_unlock(struct scsi_qla_host *ha); | 
 | 133 | int qla4_8xxx_device_state_handler(struct scsi_qla_host *ha); | 
 | 134 | void qla4_8xxx_need_qsnt_handler(struct scsi_qla_host *ha); | 
 | 135 | void qla4_8xxx_clear_drv_active(struct scsi_qla_host *ha); | 
| Andrew Morton | 626115c | 2010-08-19 14:13:42 -0700 | [diff] [blame] | 136 | void qla4_8xxx_set_drv_active(struct scsi_qla_host *ha); | 
| Vikas Chaudhary | f4f5df23 | 2010-07-28 15:53:44 +0530 | [diff] [blame] | 137 |  | 
| Andrew Vasquez | 11010fe | 2006-10-06 09:54:59 -0700 | [diff] [blame] | 138 | extern int ql4xextended_error_logging; | 
| David Somayajulu | afaf5a2 | 2006-09-19 10:28:00 -0700 | [diff] [blame] | 139 | extern int ql4xdontresethba; | 
| Vikas Chaudhary | f4f5df23 | 2010-07-28 15:53:44 +0530 | [diff] [blame] | 140 | extern int ql4xenablemsix; | 
 | 141 |  | 
| David C Somayajulu | d915058 | 2006-11-15 17:38:40 -0800 | [diff] [blame] | 142 | #endif /* _QLA4x_GBL_H */ |