blob: d9712b54349387905bc38b1d5142ab3d2bec0624 [file] [log] [blame]
Andrew Vasquezfa90c542005-10-27 11:10:08 -07001/*
2 * QLogic Fibre Channel HBA Driver
Andrew Vasquez01e58d82008-04-03 13:13:13 -07003 * Copyright (c) 2003-2008 QLogic Corporation
Andrew Vasquezfa90c542005-10-27 11:10:08 -07004 *
5 * See LICENSE.qla2xxx for copyright and licensing details.
6 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07007#ifndef __QLA_GBL_H
8#define __QLA_GBL_H
9
10#include <linux/interrupt.h>
11
Linus Torvalds1da177e2005-04-16 15:20:36 -070012/*
13 * Global Function Prototypes in qla_init.c source file.
14 */
15extern int qla2x00_initialize_adapter(scsi_qla_host_t *);
Andrew Vasquezabbd8872005-07-06 10:30:05 -070016
17extern int qla2100_pci_config(struct scsi_qla_host *);
18extern int qla2300_pci_config(struct scsi_qla_host *);
Andrew Vasquez0107109e2005-07-06 10:31:37 -070019extern int qla24xx_pci_config(scsi_qla_host_t *);
Andrew Vasquezc3a2f0d2007-07-19 20:37:34 -070020extern int qla25xx_pci_config(scsi_qla_host_t *);
Andrew Vasquezabbd8872005-07-06 10:30:05 -070021extern void qla2x00_reset_chip(struct scsi_qla_host *);
Andrew Vasquez0107109e2005-07-06 10:31:37 -070022extern void qla24xx_reset_chip(struct scsi_qla_host *);
Andrew Vasquezabbd8872005-07-06 10:30:05 -070023extern int qla2x00_chip_diag(struct scsi_qla_host *);
Andrew Vasquez0107109e2005-07-06 10:31:37 -070024extern int qla24xx_chip_diag(struct scsi_qla_host *);
Andrew Vasquezabbd8872005-07-06 10:30:05 -070025extern void qla2x00_config_rings(struct scsi_qla_host *);
Andrew Vasquez0107109e2005-07-06 10:31:37 -070026extern void qla24xx_config_rings(struct scsi_qla_host *);
Andrew Vasquezabbd8872005-07-06 10:30:05 -070027extern void qla2x00_reset_adapter(struct scsi_qla_host *);
Andrew Vasquez0107109e2005-07-06 10:31:37 -070028extern void qla24xx_reset_adapter(struct scsi_qla_host *);
Andrew Vasquezabbd8872005-07-06 10:30:05 -070029extern int qla2x00_nvram_config(struct scsi_qla_host *);
Andrew Vasquez0107109e2005-07-06 10:31:37 -070030extern int qla24xx_nvram_config(struct scsi_qla_host *);
Andrew Vasquezabbd8872005-07-06 10:30:05 -070031extern void qla2x00_update_fw_options(struct scsi_qla_host *);
Andrew Vasquez0107109e2005-07-06 10:31:37 -070032extern void qla24xx_update_fw_options(scsi_qla_host_t *);
Andrew Vasquezabbd8872005-07-06 10:30:05 -070033extern int qla2x00_load_risc(struct scsi_qla_host *, uint32_t *);
Andrew Vasquez54333832005-11-09 15:49:04 -080034extern int qla24xx_load_risc(scsi_qla_host_t *, uint32_t *);
Linus Torvalds1da177e2005-04-16 15:20:36 -070035
36extern int qla2x00_loop_resync(scsi_qla_host_t *);
37
Linus Torvalds1da177e2005-04-16 15:20:36 -070038extern int qla2x00_fabric_login(scsi_qla_host_t *, fc_port_t *, uint16_t *);
andrew.vasquez@qlogic.com9a52a57c2006-03-09 14:27:44 -080039extern int qla2x00_local_device_login(scsi_qla_host_t *, fc_port_t *);
Linus Torvalds1da177e2005-04-16 15:20:36 -070040
andrew.vasquez@qlogic.comd97994d2006-01-20 14:53:13 -080041extern void qla2x00_update_fcports(scsi_qla_host_t *);
Linus Torvalds1da177e2005-04-16 15:20:36 -070042
Linus Torvalds1da177e2005-04-16 15:20:36 -070043extern int qla2x00_abort_isp(scsi_qla_host_t *);
44
andrew.vasquez@qlogic.com052c40c2006-01-20 14:53:19 -080045extern void qla2x00_update_fcport(scsi_qla_host_t *, fc_port_t *);
8482e1182005-04-17 15:04:54 -050046
Andrew Vasqueza7a167b2006-06-23 16:10:29 -070047extern void qla2x00_alloc_fw_dump(scsi_qla_host_t *);
Andrew Vasquez18c6c122006-10-13 09:33:38 -070048extern void qla2x00_try_to_stop_firmware(scsi_qla_host_t *);
Andrew Vasqueza7a167b2006-06-23 16:10:29 -070049
Harihara Kadayam4d4df192008-04-03 13:13:26 -070050extern void qla84xx_put_chip(struct scsi_qla_host *);
51
Linus Torvalds1da177e2005-04-16 15:20:36 -070052/*
53 * Global Data in qla_os.c source file.
54 */
55extern char qla2x00_version_str[];
56
Linus Torvalds1da177e2005-04-16 15:20:36 -070057extern int ql2xlogintimeout;
58extern int qlport_down_retry;
Linus Torvalds1da177e2005-04-16 15:20:36 -070059extern int ql2xplogiabsentdevice;
Linus Torvalds1da177e2005-04-16 15:20:36 -070060extern int ql2xloginretrycount;
Andrew Vasquezcca53352005-08-26 19:08:30 -070061extern int ql2xfdmienable;
Andrew Vasqueza7a167b2006-06-23 16:10:29 -070062extern int ql2xallocfwdump;
Andrew Vasquez11010fe2006-10-06 09:54:59 -070063extern int ql2xextended_error_logging;
Andrew Vasquezdf7baa52006-10-13 09:33:39 -070064extern int ql2xqfullrampup;
Andrew Vasqueze5896bd2008-07-10 16:55:52 -070065extern int ql2xiidmaenable;
Anirban Chakraborty73208df2008-12-09 16:45:39 -080066extern int ql2xmaxqueues;
Seokmann Ju2c3dfe32007-07-05 13:16:51 -070067
Andrew Vasqueza4722cf2008-01-17 09:02:12 -080068extern int qla2x00_loop_reset(scsi_qla_host_t *);
Andrew Vasquezdf4bf0b2008-01-31 12:33:46 -080069extern void qla2x00_abort_all_cmds(scsi_qla_host_t *, int);
Andrew Vasquez0971de72008-04-03 13:13:18 -070070extern int qla2x00_post_aen_work(struct scsi_qla_host *, enum
71 fc_host_event_code, u32);
Andrew Vasquezcb8dacb2008-04-03 13:13:19 -070072extern int qla2x00_post_hwe_work(struct scsi_qla_host *, uint16_t , uint16_t,
73 uint16_t, uint16_t);
Andrew Vasqueza4722cf2008-01-17 09:02:12 -080074
Seokmann Ju5f3a9a22008-07-10 16:55:47 -070075extern void qla2x00_abort_fcport_cmds(fc_port_t *);
Anirban Chakraborty7b867cf2008-11-06 10:40:19 -080076extern struct scsi_qla_host *qla2x00_create_host(struct scsi_host_template *,
77 struct qla_hw_data *);
78extern void qla2x00_free_host(struct scsi_qla_host *);
79extern void qla2x00_relogin(struct scsi_qla_host *);
Seokmann Ju2c3dfe32007-07-05 13:16:51 -070080/*
81 * Global Functions in qla_mid.c source file.
82 */
Seokmann Ju2c3dfe32007-07-05 13:16:51 -070083extern struct scsi_host_template qla24xx_driver_template;
84extern struct scsi_transport_template *qla2xxx_transport_vport_template;
Seokmann Ju2c3dfe32007-07-05 13:16:51 -070085extern void qla2x00_timer(scsi_qla_host_t *);
86extern void qla2x00_start_timer(scsi_qla_host_t *, void *, unsigned long);
Seokmann Ju2c3dfe32007-07-05 13:16:51 -070087extern void qla24xx_deallocate_vp_id(scsi_qla_host_t *);
88extern int qla24xx_disable_vp (scsi_qla_host_t *);
89extern int qla24xx_enable_vp (scsi_qla_host_t *);
Seokmann Ju2c3dfe32007-07-05 13:16:51 -070090extern int qla24xx_control_vp(scsi_qla_host_t *, int );
91extern int qla24xx_modify_vp_config(scsi_qla_host_t *);
92extern int qla2x00_send_change_request(scsi_qla_host_t *, uint16_t, uint16_t);
93extern void qla2x00_vp_stop_timer(scsi_qla_host_t *);
94extern int qla24xx_configure_vhba (scsi_qla_host_t *);
Seokmann Ju2c3dfe32007-07-05 13:16:51 -070095extern void qla24xx_report_id_acquisition(scsi_qla_host_t *,
96 struct vp_rpt_id_entry_24xx *);
Seokmann Ju2c3dfe32007-07-05 13:16:51 -070097extern void qla2x00_do_dpc_all_vps(scsi_qla_host_t *);
98extern int qla24xx_vport_create_req_sanity_check(struct fc_vport *);
99extern scsi_qla_host_t * qla24xx_create_vhost(struct fc_vport *);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700100
Anirban Chakraborty73208df2008-12-09 16:45:39 -0800101extern void qla2x00_sp_compl(struct qla_hw_data *, srb_t *);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700102
103extern char *qla2x00_get_fw_version_str(struct scsi_qla_host *, char *);
104
andrew.vasquez@qlogic.comd97994d2006-01-20 14:53:13 -0800105extern void qla2x00_mark_device_lost(scsi_qla_host_t *, fc_port_t *, int, int);
106extern void qla2x00_mark_all_devices_lost(scsi_qla_host_t *, int);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700107
Andrew Vasquez54333832005-11-09 15:49:04 -0800108extern struct fw_blob *qla2x00_request_firmware(scsi_qla_host_t *);
109
andrew.vasquez@qlogic.com854165f2006-01-31 16:05:17 -0800110extern int qla2x00_wait_for_hba_online(scsi_qla_host_t *);
111
Anirban Chakraborty7b867cf2008-11-06 10:40:19 -0800112extern void qla2xxx_wake_dpc(struct scsi_qla_host *);
Anirban Chakraborty73208df2008-12-09 16:45:39 -0800113extern void qla2x00_alert_all_vps(struct rsp_que *, uint16_t *);
114extern void qla2x00_async_event(scsi_qla_host_t *, struct rsp_que *,
115 uint16_t *);
Anirban Chakraborty7b867cf2008-11-06 10:40:19 -0800116extern int qla2x00_vp_abort_isp(scsi_qla_host_t *);
Christoph Hellwig39a11242006-02-14 18:46:22 +0100117
Linus Torvalds1da177e2005-04-16 15:20:36 -0700118/*
119 * Global Function Prototypes in qla_iocb.c source file.
120 */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700121extern uint16_t qla2x00_calc_iocbs_32(uint16_t);
122extern uint16_t qla2x00_calc_iocbs_64(uint16_t);
123extern void qla2x00_build_scsi_iocbs_32(srb_t *, cmd_entry_t *, uint16_t);
124extern void qla2x00_build_scsi_iocbs_64(srb_t *, cmd_entry_t *, uint16_t);
125extern int qla2x00_start_scsi(srb_t *sp);
Andrew Vasquez2b6c0ce2005-07-06 10:31:17 -0700126extern int qla24xx_start_scsi(srb_t *sp);
Anirban Chakraborty73208df2008-12-09 16:45:39 -0800127int qla2x00_marker(struct scsi_qla_host *, struct req_que *, struct rsp_que *,
128 uint16_t, uint16_t, uint8_t);
129int __qla2x00_marker(struct scsi_qla_host *, struct req_que *, struct rsp_que *,
130 uint16_t, uint16_t, uint8_t);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700131
132/*
133 * Global Function Prototypes in qla_mbx.c source file.
134 */
135extern int
andrew.vasquez@qlogic.com590f98e2006-01-13 17:05:37 -0800136qla2x00_load_ram(scsi_qla_host_t *, dma_addr_t, uint32_t, uint32_t);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700137
138extern int
Andrew Vasquez338c9162007-09-20 14:07:33 -0700139qla2x00_dump_ram(scsi_qla_host_t *, dma_addr_t, uint32_t, uint32_t);
140
141extern int
Andrew Vasquez1c7c6352005-07-06 10:30:57 -0700142qla2x00_execute_fw(scsi_qla_host_t *, uint32_t);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700143
144extern void
145qla2x00_get_fw_version(scsi_qla_host_t *, uint16_t *,
146 uint16_t *, uint16_t *, uint16_t *, uint32_t *);
147
148extern int
149qla2x00_get_fw_options(scsi_qla_host_t *, uint16_t *);
150
151extern int
152qla2x00_set_fw_options(scsi_qla_host_t *, uint16_t *);
153
154extern int
155qla2x00_mbx_reg_test(scsi_qla_host_t *);
156
157extern int
Andrew Vasquez1c7c6352005-07-06 10:30:57 -0700158qla2x00_verify_checksum(scsi_qla_host_t *, uint32_t);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700159
160extern int
161qla2x00_issue_iocb(scsi_qla_host_t *, void *, dma_addr_t, size_t);
162
163extern int
Anirban Chakraborty73208df2008-12-09 16:45:39 -0800164qla2x00_abort_command(scsi_qla_host_t *, srb_t *, struct req_que *);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700165
Linus Torvalds1da177e2005-04-16 15:20:36 -0700166extern int
Andrew Vasquez523ec772008-04-03 13:13:24 -0700167qla2x00_abort_target(struct fc_port *, unsigned int);
168
169extern int
170qla2x00_lun_reset(struct fc_port *, unsigned int);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700171
172extern int
Linus Torvalds1da177e2005-04-16 15:20:36 -0700173qla2x00_get_adapter_id(scsi_qla_host_t *, uint16_t *, uint8_t *, uint8_t *,
Seokmann Ju2c3dfe32007-07-05 13:16:51 -0700174 uint8_t *, uint16_t *, uint16_t *);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700175
176extern int
177qla2x00_get_retry_cnt(scsi_qla_host_t *, uint8_t *, uint8_t *, uint16_t *);
178
179extern int
180qla2x00_init_firmware(scsi_qla_host_t *, uint16_t);
181
182extern int
183qla2x00_get_port_database(scsi_qla_host_t *, fc_port_t *, uint8_t);
184
185extern int
186qla2x00_get_firmware_state(scsi_qla_host_t *, uint16_t *);
187
188extern int
189qla2x00_get_port_name(scsi_qla_host_t *, uint16_t, uint8_t *, uint8_t);
190
191extern int
192qla2x00_lip_reset(scsi_qla_host_t *);
193
194extern int
195qla2x00_send_sns(scsi_qla_host_t *, dma_addr_t, uint16_t, size_t);
196
197extern int
198qla2x00_login_fabric(scsi_qla_host_t *, uint16_t, uint8_t, uint8_t, uint8_t,
199 uint16_t *, uint8_t);
Andrew Vasquez1c7c6352005-07-06 10:30:57 -0700200extern int
201qla24xx_login_fabric(scsi_qla_host_t *, uint16_t, uint8_t, uint8_t, uint8_t,
202 uint16_t *, uint8_t);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700203
204extern int
andrew.vasquez@qlogic.com9a52a57c2006-03-09 14:27:44 -0800205qla2x00_login_local_device(scsi_qla_host_t *, fc_port_t *, uint16_t *,
206 uint8_t);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700207
208extern int
Andrew Vasquez1c7c6352005-07-06 10:30:57 -0700209qla2x00_fabric_logout(scsi_qla_host_t *, uint16_t, uint8_t, uint8_t, uint8_t);
210
211extern int
212qla24xx_fabric_logout(scsi_qla_host_t *, uint16_t, uint8_t, uint8_t, uint8_t);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700213
214extern int
215qla2x00_full_login_lip(scsi_qla_host_t *ha);
216
217extern int
218qla2x00_get_id_list(scsi_qla_host_t *, void *, dma_addr_t, uint16_t *);
219
220extern int
Seokmann Ju4d0ea242007-09-20 14:07:43 -0700221qla2x00_get_resource_cnts(scsi_qla_host_t *, uint16_t *, uint16_t *,
222 uint16_t *, uint16_t *, uint16_t *);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700223
224extern int
225qla2x00_get_fcal_position_map(scsi_qla_host_t *ha, char *pos_map);
226
andrew.vasquez@qlogic.com392e2f62006-01-31 16:05:02 -0800227extern int
Andrew Vasquez43ef0582008-01-17 09:02:08 -0800228qla2x00_get_link_status(scsi_qla_host_t *, uint16_t, struct link_statistics *,
229 dma_addr_t);
andrew.vasquez@qlogic.com392e2f62006-01-31 16:05:02 -0800230
231extern int
Andrew Vasquez43ef0582008-01-17 09:02:08 -0800232qla24xx_get_isp_stats(scsi_qla_host_t *, struct link_statistics *,
233 dma_addr_t);
andrew.vasquez@qlogic.com392e2f62006-01-31 16:05:02 -0800234
Anirban Chakraborty73208df2008-12-09 16:45:39 -0800235extern int qla24xx_abort_command(scsi_qla_host_t *, srb_t *, struct req_que *);
Andrew Vasquez523ec772008-04-03 13:13:24 -0700236extern int qla24xx_abort_target(struct fc_port *, unsigned int);
237extern int qla24xx_lun_reset(struct fc_port *, unsigned int);
Andrew Vasquez1c7c6352005-07-06 10:30:57 -0700238
Andrew Vasquez1c7c6352005-07-06 10:30:57 -0700239extern int
Andrew Vasquez68af0812008-05-12 22:21:13 -0700240qla2x00_system_error(scsi_qla_host_t *);
241
242extern int
Andrew Vasquez1c7c6352005-07-06 10:30:57 -0700243qla2x00_set_serdes_params(scsi_qla_host_t *, uint16_t, uint16_t, uint16_t);
244
Andrew Vasquezf6ef3b12005-08-26 19:10:20 -0700245extern int
246qla2x00_stop_firmware(scsi_qla_host_t *);
247
Andrew Vasqueza7a167b2006-06-23 16:10:29 -0700248extern int
Andrew Vasquez00b6bd22008-01-17 09:02:16 -0800249qla2x00_enable_eft_trace(scsi_qla_host_t *, dma_addr_t, uint16_t);
250extern int
251qla2x00_disable_eft_trace(scsi_qla_host_t *);
Andrew Vasqueza7a167b2006-06-23 16:10:29 -0700252
Andrew Vasquez88729e52006-06-23 16:10:50 -0700253extern int
Andrew Vasquezdf613b92008-01-17 09:02:17 -0800254qla2x00_enable_fce_trace(scsi_qla_host_t *, dma_addr_t, uint16_t , uint16_t *,
255 uint32_t *);
256
257extern int
258qla2x00_disable_fce_trace(scsi_qla_host_t *, uint64_t *, uint64_t *);
259
260extern int
Andrew Vasquez88729e52006-06-23 16:10:50 -0700261qla2x00_read_sfp(scsi_qla_host_t *, dma_addr_t, uint16_t, uint16_t, uint16_t);
262
Andrew Vasquezd8b45212006-10-02 12:00:43 -0700263extern int
Andrew Vasquezd8b45212006-10-02 12:00:43 -0700264qla2x00_set_idma_speed(scsi_qla_host_t *, uint16_t, uint16_t, uint16_t *);
265
Harihara Kadayam4d4df192008-04-03 13:13:26 -0700266extern int qla84xx_verify_chip(struct scsi_qla_host *, uint16_t *);
267
Linus Torvalds1da177e2005-04-16 15:20:36 -0700268/*
269 * Global Function Prototypes in qla_isr.c source file.
270 */
David Howells7d12e782006-10-05 14:55:46 +0100271extern irqreturn_t qla2100_intr_handler(int, void *);
272extern irqreturn_t qla2300_intr_handler(int, void *);
273extern irqreturn_t qla24xx_intr_handler(int, void *);
Anirban Chakraborty73208df2008-12-09 16:45:39 -0800274extern void qla2x00_process_response_queue(struct rsp_que *);
275extern void qla24xx_process_response_queue(struct rsp_que *);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700276
Anirban Chakraborty73208df2008-12-09 16:45:39 -0800277extern int qla2x00_request_irqs(struct qla_hw_data *, struct rsp_que *);
Andrew Vasqueza8488ab2007-01-29 10:22:19 -0800278extern void qla2x00_free_irqs(scsi_qla_host_t *);
279
Linus Torvalds1da177e2005-04-16 15:20:36 -0700280/*
281 * Global Function Prototypes in qla_sup.c source file.
282 */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700283extern void qla2x00_release_nvram_protection(scsi_qla_host_t *);
Andrew Vasquez459c5372005-07-06 10:31:07 -0700284extern uint32_t *qla24xx_read_flash_data(scsi_qla_host_t *, uint32_t *,
285 uint32_t, uint32_t);
286extern uint8_t *qla2x00_read_nvram_data(scsi_qla_host_t *, uint8_t *, uint32_t,
287 uint32_t);
288extern uint8_t *qla24xx_read_nvram_data(scsi_qla_host_t *, uint8_t *, uint32_t,
289 uint32_t);
290extern int qla2x00_write_nvram_data(scsi_qla_host_t *, uint8_t *, uint32_t,
291 uint32_t);
292extern int qla24xx_write_nvram_data(scsi_qla_host_t *, uint8_t *, uint32_t,
293 uint32_t);
Andrew Vasquezc3a2f0d2007-07-19 20:37:34 -0700294extern uint8_t *qla25xx_read_nvram_data(scsi_qla_host_t *, uint8_t *, uint32_t,
295 uint32_t);
296extern int qla25xx_write_nvram_data(scsi_qla_host_t *, uint8_t *, uint32_t,
297 uint32_t);
Andrew Vasquez459c5372005-07-06 10:31:07 -0700298
andrew.vasquez@qlogic.comf6df1442006-01-31 16:05:07 -0800299extern int qla2x00_beacon_on(struct scsi_qla_host *);
300extern int qla2x00_beacon_off(struct scsi_qla_host *);
301extern void qla2x00_beacon_blink(struct scsi_qla_host *);
302extern int qla24xx_beacon_on(struct scsi_qla_host *);
303extern int qla24xx_beacon_off(struct scsi_qla_host *);
304extern void qla24xx_beacon_blink(struct scsi_qla_host *);
305
andrew.vasquez@qlogic.com854165f2006-01-31 16:05:17 -0800306extern uint8_t *qla2x00_read_optrom_data(struct scsi_qla_host *, uint8_t *,
307 uint32_t, uint32_t);
308extern int qla2x00_write_optrom_data(struct scsi_qla_host *, uint8_t *,
309 uint32_t, uint32_t);
310extern uint8_t *qla24xx_read_optrom_data(struct scsi_qla_host *, uint8_t *,
311 uint32_t, uint32_t);
312extern int qla24xx_write_optrom_data(struct scsi_qla_host *, uint8_t *,
313 uint32_t, uint32_t);
Andrew Vasquez338c9162007-09-20 14:07:33 -0700314extern uint8_t *qla25xx_read_optrom_data(struct scsi_qla_host *, uint8_t *,
315 uint32_t, uint32_t);
andrew.vasquez@qlogic.com854165f2006-01-31 16:05:17 -0800316
Andrew Vasquez30c47662007-01-29 10:22:21 -0800317extern int qla2x00_get_flash_version(scsi_qla_host_t *, void *);
318extern int qla24xx_get_flash_version(scsi_qla_host_t *, void *);
319
Andrew Vasquezcb8dacb2008-04-03 13:13:19 -0700320extern int qla2xxx_hw_event_log(scsi_qla_host_t *, uint16_t , uint16_t,
321 uint16_t, uint16_t);
322
Andrew Vasquezc00d8992008-09-11 21:22:49 -0700323extern int qla2xxx_get_flash_info(scsi_qla_host_t *);
Joe Carnuccio1ee27142008-07-10 16:55:53 -0700324extern int qla2xxx_get_vpd_field(scsi_qla_host_t *, char *, char *, size_t);
Andrew Vasquez7d232c72008-04-03 13:13:22 -0700325
Andrew Vasquez272976c2008-09-11 21:22:50 -0700326extern void qla2xxx_flash_npiv_conf(scsi_qla_host_t *);
327
Linus Torvalds1da177e2005-04-16 15:20:36 -0700328/*
329 * Global Function Prototypes in qla_dbg.c source file.
330 */
331extern void qla2100_fw_dump(scsi_qla_host_t *, int);
332extern void qla2300_fw_dump(scsi_qla_host_t *, int);
Andrew Vasquez6d9b61e2005-07-06 10:30:36 -0700333extern void qla24xx_fw_dump(scsi_qla_host_t *, int);
Andrew Vasquezc3a2f0d2007-07-19 20:37:34 -0700334extern void qla25xx_fw_dump(scsi_qla_host_t *, int);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700335extern void qla2x00_dump_regs(scsi_qla_host_t *);
336extern void qla2x00_dump_buffer(uint8_t *, uint32_t);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700337
338/*
339 * Global Function Prototypes in qla_gs.c source file.
340 */
Andrew Vasquez8c958a92005-07-06 10:30:47 -0700341extern void *qla2x00_prep_ms_iocb(scsi_qla_host_t *, uint32_t, uint32_t);
342extern void *qla24xx_prep_ms_iocb(scsi_qla_host_t *, uint32_t, uint32_t);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700343extern int qla2x00_ga_nxt(scsi_qla_host_t *, fc_port_t *);
344extern int qla2x00_gid_pt(scsi_qla_host_t *, sw_info_t *);
345extern int qla2x00_gpn_id(scsi_qla_host_t *, sw_info_t *);
346extern int qla2x00_gnn_id(scsi_qla_host_t *, sw_info_t *);
347extern int qla2x00_rft_id(scsi_qla_host_t *);
348extern int qla2x00_rff_id(scsi_qla_host_t *);
349extern int qla2x00_rnn_id(scsi_qla_host_t *);
350extern int qla2x00_rsnn_nn(scsi_qla_host_t *);
Andrew Vasquezcca53352005-08-26 19:08:30 -0700351extern void *qla2x00_prep_ms_fdmi_iocb(scsi_qla_host_t *, uint32_t, uint32_t);
352extern void *qla24xx_prep_ms_fdmi_iocb(scsi_qla_host_t *, uint32_t, uint32_t);
353extern int qla2x00_fdmi_register(scsi_qla_host_t *);
Andrew Vasquezd8b45212006-10-02 12:00:43 -0700354extern int qla2x00_gfpn_id(scsi_qla_host_t *, sw_info_t *);
355extern int qla2x00_gpsc(scsi_qla_host_t *, sw_info_t *);
Andrew Vasquez1620f7c2006-10-02 12:00:44 -0700356extern void qla2x00_get_sym_node_name(scsi_qla_host_t *, uint8_t *);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700357
358/*
8482e1182005-04-17 15:04:54 -0500359 * Global Function Prototypes in qla_attr.c source file.
360 */
Tony Jonesee959b02008-02-22 00:13:36 +0100361struct device_attribute;
362extern struct device_attribute *qla2x00_host_attrs[];
Andrew Vasquez1c97a122005-04-21 16:13:36 -0400363struct fc_function_template;
364extern struct fc_function_template qla2xxx_transport_functions;
Seokmann Ju2c3dfe32007-07-05 13:16:51 -0700365extern struct fc_function_template qla2xxx_transport_vport_functions;
8482e1182005-04-17 15:04:54 -0500366extern void qla2x00_alloc_sysfs_attr(scsi_qla_host_t *);
367extern void qla2x00_free_sysfs_attr(scsi_qla_host_t *);
8482e1182005-04-17 15:04:54 -0500368extern void qla2x00_init_host_attr(scsi_qla_host_t *);
369extern void qla2x00_alloc_sysfs_attr(scsi_qla_host_t *);
370extern void qla2x00_free_sysfs_attr(scsi_qla_host_t *);
Andrew Vasquezdf613b92008-01-17 09:02:17 -0800371
372/*
373 * Global Function Prototypes in qla_dfs.c source file.
374 */
375extern int qla2x00_dfs_setup(scsi_qla_host_t *);
376extern int qla2x00_dfs_remove(scsi_qla_host_t *);
Anirban Chakraborty73208df2008-12-09 16:45:39 -0800377
378/* Globa function prototypes for multi-q */
379extern int qla25xx_request_irq(struct rsp_que *);
380extern int qla25xx_init_req_que(struct scsi_qla_host *, struct req_que *,
381 uint8_t);
382extern int qla25xx_init_rsp_que(struct scsi_qla_host *, struct rsp_que *,
383 uint8_t);
384extern int qla25xx_create_req_que(struct qla_hw_data *, uint16_t, uint8_t,
385 uint16_t, uint8_t, uint8_t);
386extern int qla25xx_create_rsp_que(struct qla_hw_data *, uint16_t, uint8_t,
387 uint16_t);
388extern int qla25xx_update_req_que(struct scsi_qla_host *, uint8_t, uint8_t);
389extern void qla2x00_init_response_q_entries(struct rsp_que *);
390extern int qla25xx_delete_req_que(struct scsi_qla_host *, struct req_que *);
391extern int qla25xx_delete_rsp_que(struct scsi_qla_host *, struct rsp_que *);
392extern int qla25xx_create_queues(struct scsi_qla_host *, uint8_t);
393extern int qla25xx_delete_queues(struct scsi_qla_host *, uint8_t);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700394#endif /* _QLA_GBL_H */