David Somayajulu | afaf5a2 | 2006-09-19 10:28:00 -0700 | [diff] [blame] | 1 | /* |
| 2 | * QLogic iSCSI HBA Driver |
| 3 | * Copyright (c) 2003-2006 QLogic Corporation |
| 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 | |
| 13 | void 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); |
| 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, |
| 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 | |
| 22 | void qla4xxx_free_ddb_list(struct scsi_qla_host * ha); |
| 23 | void qla4xxx_process_aen(struct scsi_qla_host * ha, uint8_t process_aen); |
| 24 | |
| 25 | int qla4xxx_get_dhcp_ip_address(struct scsi_qla_host * ha); |
| 26 | int qla4xxx_relogin_device(struct scsi_qla_host * ha, |
| 27 | struct ddb_entry * ddb_entry); |
| 28 | int qla4xxx_reset_lun(struct scsi_qla_host * ha, struct ddb_entry * ddb_entry, |
| 29 | int lun); |
Mike Christie | ce54503 | 2008-02-29 18:25:20 -0600 | [diff] [blame] | 30 | int qla4xxx_reset_target(struct scsi_qla_host * ha, |
| 31 | struct ddb_entry * ddb_entry); |
David Somayajulu | afaf5a2 | 2006-09-19 10:28:00 -0700 | [diff] [blame] | 32 | int qla4xxx_get_flash(struct scsi_qla_host * ha, dma_addr_t dma_addr, |
| 33 | uint32_t offset, uint32_t len); |
| 34 | int qla4xxx_get_firmware_status(struct scsi_qla_host * ha); |
| 35 | int qla4xxx_get_firmware_state(struct scsi_qla_host * ha); |
| 36 | int qla4xxx_initialize_fw_cb(struct scsi_qla_host * ha); |
| 37 | |
| 38 | /* FIXME: Goodness! this really wants a small struct to hold the |
| 39 | * parameters. On x86 the args will get passed on the stack! */ |
| 40 | int qla4xxx_get_fwddb_entry(struct scsi_qla_host *ha, |
| 41 | uint16_t fw_ddb_index, |
| 42 | struct dev_db_entry *fw_ddb_entry, |
| 43 | dma_addr_t fw_ddb_entry_dma, |
| 44 | uint32_t *num_valid_ddb_entries, |
| 45 | uint32_t *next_ddb_index, |
| 46 | uint32_t *fw_ddb_device_state, |
| 47 | uint32_t *conn_err_detail, |
| 48 | uint16_t *tcp_source_port_num, |
| 49 | uint16_t *connection_id); |
| 50 | |
David Somayajulu | afaf5a2 | 2006-09-19 10:28:00 -0700 | [diff] [blame] | 51 | int qla4xxx_set_ddb_entry(struct scsi_qla_host * ha, uint16_t fw_ddb_index, |
| 52 | dma_addr_t fw_ddb_entry_dma); |
| 53 | |
| 54 | void qla4xxx_mark_device_missing(struct scsi_qla_host *ha, |
| 55 | struct ddb_entry *ddb_entry); |
| 56 | u16 rd_nvram_word(struct scsi_qla_host * ha, int offset); |
| 57 | void qla4xxx_get_crash_record(struct scsi_qla_host * ha); |
| 58 | struct ddb_entry *qla4xxx_alloc_sess(struct scsi_qla_host *ha); |
| 59 | int qla4xxx_add_sess(struct ddb_entry *); |
| 60 | void qla4xxx_destroy_sess(struct ddb_entry *ddb_entry); |
David Somayajulu | afaf5a2 | 2006-09-19 10:28:00 -0700 | [diff] [blame] | 61 | int qla4xxx_is_nvram_configuration_valid(struct scsi_qla_host * ha); |
| 62 | int qla4xxx_get_fw_version(struct scsi_qla_host * ha); |
| 63 | void qla4xxx_interrupt_service_routine(struct scsi_qla_host * ha, |
| 64 | uint32_t intr_status); |
| 65 | int qla4xxx_init_rings(struct scsi_qla_host * ha); |
David C Somayajulu | e08c182 | 2007-05-23 18:14:34 -0700 | [diff] [blame] | 66 | struct srb * qla4xxx_del_from_active_array(struct scsi_qla_host *ha, |
| 67 | uint32_t index); |
David Somayajulu | afaf5a2 | 2006-09-19 10:28:00 -0700 | [diff] [blame] | 68 | void qla4xxx_srb_compl(struct scsi_qla_host *ha, struct srb *srb); |
| 69 | int qla4xxx_reinitialize_ddb_list(struct scsi_qla_host * ha); |
| 70 | int qla4xxx_process_ddb_changed(struct scsi_qla_host * ha, |
| 71 | uint32_t fw_ddb_index, uint32_t state); |
David C Somayajulu | e08c182 | 2007-05-23 18:14:34 -0700 | [diff] [blame] | 72 | void qla4xxx_dump_buffer(void *b, uint32_t size); |
David C Somayajulu | 9d56291 | 2008-03-19 11:23:03 -0700 | [diff] [blame] | 73 | int qla4xxx_send_marker_iocb(struct scsi_qla_host *ha, |
| 74 | struct ddb_entry *ddb_entry, int lun, uint16_t mrkr_mod); |
David Somayajulu | afaf5a2 | 2006-09-19 10:28:00 -0700 | [diff] [blame] | 75 | |
Andrew Vasquez | 11010fe | 2006-10-06 09:54:59 -0700 | [diff] [blame] | 76 | extern int ql4xextended_error_logging; |
David Somayajulu | afaf5a2 | 2006-09-19 10:28:00 -0700 | [diff] [blame] | 77 | extern int ql4xdiscoverywait; |
| 78 | extern int ql4xdontresethba; |
David C Somayajulu | 477ffb9 | 2007-01-22 12:26:11 -0800 | [diff] [blame] | 79 | extern int ql4_mod_unload; |
David C Somayajulu | d915058 | 2006-11-15 17:38:40 -0800 | [diff] [blame] | 80 | #endif /* _QLA4x_GBL_H */ |