blob: a3608e028bf69328bc886b72dff2adc3291a2696 [file] [log] [blame]
David Somayajuluafaf5a22006-09-19 10:28:00 -07001/*
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 Somayajulue08c1822007-05-23 18:14:34 -070011struct iscsi_cls_conn;
12
13void qla4xxx_hw_reset(struct scsi_qla_host *ha);
David C Somayajuluf26b9042006-11-15 16:41:09 -080014int ql4xxx_lock_drvr_wait(struct scsi_qla_host *a);
David Somayajuluafaf5a22006-09-19 10:28:00 -070015int qla4xxx_send_tgts(struct scsi_qla_host *ha, char *ip, uint16_t port);
16int qla4xxx_send_command_to_isp(struct scsi_qla_host *ha, struct srb * srb);
17int qla4xxx_initialize_adapter(struct scsi_qla_host * ha,
18 uint8_t renew_ddb_list);
19int qla4xxx_soft_reset(struct scsi_qla_host *ha);
David Howells7d12e782006-10-05 14:55:46 +010020irqreturn_t qla4xxx_intr_handler(int irq, void *dev_id);
David Somayajuluafaf5a22006-09-19 10:28:00 -070021
22void qla4xxx_free_ddb_list(struct scsi_qla_host * ha);
23void qla4xxx_process_aen(struct scsi_qla_host * ha, uint8_t process_aen);
24
25int qla4xxx_get_dhcp_ip_address(struct scsi_qla_host * ha);
26int qla4xxx_relogin_device(struct scsi_qla_host * ha,
27 struct ddb_entry * ddb_entry);
28int qla4xxx_reset_lun(struct scsi_qla_host * ha, struct ddb_entry * ddb_entry,
29 int lun);
30int qla4xxx_get_flash(struct scsi_qla_host * ha, dma_addr_t dma_addr,
31 uint32_t offset, uint32_t len);
32int qla4xxx_get_firmware_status(struct scsi_qla_host * ha);
33int qla4xxx_get_firmware_state(struct scsi_qla_host * ha);
34int qla4xxx_initialize_fw_cb(struct scsi_qla_host * ha);
35
36/* FIXME: Goodness! this really wants a small struct to hold the
37 * parameters. On x86 the args will get passed on the stack! */
38int qla4xxx_get_fwddb_entry(struct scsi_qla_host *ha,
39 uint16_t fw_ddb_index,
40 struct dev_db_entry *fw_ddb_entry,
41 dma_addr_t fw_ddb_entry_dma,
42 uint32_t *num_valid_ddb_entries,
43 uint32_t *next_ddb_index,
44 uint32_t *fw_ddb_device_state,
45 uint32_t *conn_err_detail,
46 uint16_t *tcp_source_port_num,
47 uint16_t *connection_id);
48
David Somayajuluafaf5a22006-09-19 10:28:00 -070049int qla4xxx_set_ddb_entry(struct scsi_qla_host * ha, uint16_t fw_ddb_index,
50 dma_addr_t fw_ddb_entry_dma);
51
52void qla4xxx_mark_device_missing(struct scsi_qla_host *ha,
53 struct ddb_entry *ddb_entry);
54u16 rd_nvram_word(struct scsi_qla_host * ha, int offset);
55void qla4xxx_get_crash_record(struct scsi_qla_host * ha);
56struct ddb_entry *qla4xxx_alloc_sess(struct scsi_qla_host *ha);
57int qla4xxx_add_sess(struct ddb_entry *);
58void qla4xxx_destroy_sess(struct ddb_entry *ddb_entry);
David Somayajuluafaf5a22006-09-19 10:28:00 -070059int qla4xxx_is_nvram_configuration_valid(struct scsi_qla_host * ha);
60int qla4xxx_get_fw_version(struct scsi_qla_host * ha);
61void qla4xxx_interrupt_service_routine(struct scsi_qla_host * ha,
62 uint32_t intr_status);
63int qla4xxx_init_rings(struct scsi_qla_host * ha);
David C Somayajulue08c1822007-05-23 18:14:34 -070064struct srb * qla4xxx_del_from_active_array(struct scsi_qla_host *ha,
65 uint32_t index);
David Somayajuluafaf5a22006-09-19 10:28:00 -070066void qla4xxx_srb_compl(struct scsi_qla_host *ha, struct srb *srb);
67int qla4xxx_reinitialize_ddb_list(struct scsi_qla_host * ha);
68int qla4xxx_process_ddb_changed(struct scsi_qla_host * ha,
69 uint32_t fw_ddb_index, uint32_t state);
David C Somayajulue08c1822007-05-23 18:14:34 -070070void qla4xxx_dump_buffer(void *b, uint32_t size);
David Somayajuluafaf5a22006-09-19 10:28:00 -070071
Andrew Vasquez11010fe2006-10-06 09:54:59 -070072extern int ql4xextended_error_logging;
David Somayajuluafaf5a22006-09-19 10:28:00 -070073extern int ql4xdiscoverywait;
74extern int ql4xdontresethba;
David C Somayajulu477ffb92007-01-22 12:26:11 -080075extern int ql4_mod_unload;
David C Somayajulud9150582006-11-15 17:38:40 -080076#endif /* _QLA4x_GBL_H */