forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-13 9d77db3c730780c8ef5ccd4b66403ff5675cfe4e
kernel/drivers/scsi/qla2xxx/qla_gbl.h
....@@ -1,8 +1,7 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * QLogic Fibre Channel HBA Driver
34 * Copyright (c) 2003-2014 QLogic Corporation
4
- *
5
- * See LICENSE.qla2xxx for copyright and licensing details.
65 */
76 #ifndef __QLA_GBL_H
87 #define __QLA_GBL_H
....@@ -18,34 +17,35 @@
1817 extern int qla2300_pci_config(struct scsi_qla_host *);
1918 extern int qla24xx_pci_config(scsi_qla_host_t *);
2019 extern int qla25xx_pci_config(scsi_qla_host_t *);
21
-extern void qla2x00_reset_chip(struct scsi_qla_host *);
22
-extern void qla24xx_reset_chip(struct scsi_qla_host *);
20
+extern int qla2x00_reset_chip(struct scsi_qla_host *);
21
+extern int qla24xx_reset_chip(struct scsi_qla_host *);
2322 extern int qla2x00_chip_diag(struct scsi_qla_host *);
2423 extern int qla24xx_chip_diag(struct scsi_qla_host *);
2524 extern void qla2x00_config_rings(struct scsi_qla_host *);
2625 extern void qla24xx_config_rings(struct scsi_qla_host *);
27
-extern void qla2x00_reset_adapter(struct scsi_qla_host *);
28
-extern void qla24xx_reset_adapter(struct scsi_qla_host *);
26
+extern int qla2x00_reset_adapter(struct scsi_qla_host *);
27
+extern int qla24xx_reset_adapter(struct scsi_qla_host *);
2928 extern int qla2x00_nvram_config(struct scsi_qla_host *);
3029 extern int qla24xx_nvram_config(struct scsi_qla_host *);
3130 extern int qla81xx_nvram_config(struct scsi_qla_host *);
3231 extern void qla2x00_update_fw_options(struct scsi_qla_host *);
3332 extern void qla24xx_update_fw_options(scsi_qla_host_t *);
34
-extern void qla81xx_update_fw_options(scsi_qla_host_t *);
33
+
3534 extern int qla2x00_load_risc(struct scsi_qla_host *, uint32_t *);
3635 extern int qla24xx_load_risc(scsi_qla_host_t *, uint32_t *);
3736 extern int qla81xx_load_risc(scsi_qla_host_t *, uint32_t *);
3837
3938 extern int qla2x00_perform_loop_resync(scsi_qla_host_t *);
4039 extern int qla2x00_loop_resync(scsi_qla_host_t *);
41
-
42
-extern int qla2x00_find_new_loop_id(scsi_qla_host_t *, fc_port_t *);
40
+extern void qla2x00_clear_loop_id(fc_port_t *fcport);
4341
4442 extern int qla2x00_fabric_login(scsi_qla_host_t *, fc_port_t *, uint16_t *);
4543 extern int qla2x00_local_device_login(scsi_qla_host_t *, fc_port_t *);
4644
4745 extern int qla24xx_els_dcmd_iocb(scsi_qla_host_t *, int, port_id_t);
4846 extern int qla24xx_els_dcmd2_iocb(scsi_qla_host_t *, int, fc_port_t *, bool);
47
+extern void qla2x00_els_dcmd2_free(scsi_qla_host_t *vha,
48
+ struct els_plogi *els_plogi);
4949
5050 extern void qla2x00_update_fcports(scsi_qla_host_t *);
5151
....@@ -71,17 +71,15 @@
7171 extern int qla2x00_async_tm_cmd(fc_port_t *, uint32_t, uint32_t, uint32_t);
7272 extern void qla2x00_async_login_done(struct scsi_qla_host *, fc_port_t *,
7373 uint16_t *);
74
-extern void qla2x00_async_logout_done(struct scsi_qla_host *, fc_port_t *,
75
- uint16_t *);
76
-extern void qla2x00_async_adisc_done(struct scsi_qla_host *, fc_port_t *,
77
- uint16_t *);
7874 struct qla_work_evt *qla2x00_alloc_work(struct scsi_qla_host *,
7975 enum qla_work_type);
8076 extern int qla24xx_async_gnl(struct scsi_qla_host *, fc_port_t *);
8177 int qla2x00_post_work(struct scsi_qla_host *vha, struct qla_work_evt *e);
8278 extern void *qla2x00_alloc_iocbs_ready(struct qla_qpair *, srb_t *);
8379 extern int qla24xx_update_fcport_fcp_prio(scsi_qla_host_t *, fc_port_t *);
80
+extern int qla24xx_async_abort_cmd(srb_t *, bool);
8481
82
+extern void qla2x00_set_fcport_state(fc_port_t *fcport, int state);
8583 extern fc_port_t *
8684 qla2x00_alloc_fcport(scsi_qla_host_t *, gfp_t );
8785
....@@ -95,11 +93,14 @@
9593 extern int
9694 qla2x00_alloc_outstanding_cmds(struct qla_hw_data *, struct req_que *);
9795 extern int qla2x00_init_rings(scsi_qla_host_t *);
98
-extern uint8_t qla27xx_find_valid_image(struct scsi_qla_host *);
9996 extern struct qla_qpair *qla2xxx_create_qpair(struct scsi_qla_host *,
10097 int, int, bool);
10198 extern int qla2xxx_delete_qpair(struct scsi_qla_host *, struct qla_qpair *);
102
-void qla2x00_fcport_event_handler(scsi_qla_host_t *, struct event_arg *);
99
+void qla2x00_handle_rscn(scsi_qla_host_t *vha, struct event_arg *ea);
100
+void qla24xx_handle_plogi_done_event(struct scsi_qla_host *vha,
101
+ struct event_arg *ea);
102
+void qla24xx_handle_relogin_event(scsi_qla_host_t *vha,
103
+ struct event_arg *ea);
103104 int qla24xx_async_gpdb(struct scsi_qla_host *, fc_port_t *, u8);
104105 int qla24xx_async_prli(struct scsi_qla_host *, fc_port_t *);
105106 int qla24xx_async_notify_ack(scsi_qla_host_t *, fc_port_t *,
....@@ -107,8 +108,13 @@
107108 int qla24xx_post_newsess_work(struct scsi_qla_host *, port_id_t *, u8 *, u8*,
108109 void *, u8);
109110 int qla24xx_fcport_handle_login(struct scsi_qla_host *, fc_port_t *);
110
-int qla24xx_detect_sfp(scsi_qla_host_t *vha);
111
+int qla24xx_detect_sfp(scsi_qla_host_t *);
111112 int qla24xx_post_gpdb_work(struct scsi_qla_host *, fc_port_t *, u8);
113
+
114
+extern void qla28xx_get_aux_images(struct scsi_qla_host *,
115
+ struct active_regions *);
116
+extern void qla27xx_get_active_image(struct scsi_qla_host *,
117
+ struct active_regions *);
112118
113119 void qla2x00_async_prlo_done(struct scsi_qla_host *, fc_port_t *,
114120 uint16_t *);
....@@ -119,6 +125,12 @@
119125 int qla_post_iidma_work(struct scsi_qla_host *vha, fc_port_t *fcport);
120126 void qla_do_iidma_work(struct scsi_qla_host *vha, fc_port_t *fcport);
121127 int qla2x00_reserve_mgmt_server_loop_id(scsi_qla_host_t *);
128
+void qla_rscn_replay(fc_port_t *fcport);
129
+void qla24xx_free_purex_item(struct purex_item *item);
130
+extern bool qla24xx_risc_firmware_invalid(uint32_t *);
131
+void qla_init_iocb_limit(scsi_qla_host_t *);
132
+
133
+
122134 /*
123135 * Global Data in qla_os.c source file.
124136 */
....@@ -132,6 +144,8 @@
132144 extern int ql2xplogiabsentdevice;
133145 extern int ql2xloginretrycount;
134146 extern int ql2xfdmienable;
147
+extern int ql2xrdpenable;
148
+extern int ql2xsmartsan;
135149 extern int ql2xallocfwdump;
136150 extern int ql2xextended_error_logging;
137151 extern int ql2xiidmaenable;
....@@ -158,6 +172,10 @@
158172 extern int ql2xautodetectsfp;
159173 extern int ql2xenablemsix;
160174 extern int qla2xuseresexchforels;
175
+extern int ql2xexlogins;
176
+extern int ql2xdifbundlinginternalbuffers;
177
+extern int ql2xfulldump_on_mpifail;
178
+extern int ql2xenforce_iocb_limit;
161179
162180 extern int qla2x00_loop_reset(scsi_qla_host_t *);
163181 extern void qla2x00_abort_all_cmds(scsi_qla_host_t *, int);
....@@ -168,8 +186,6 @@
168186 uint16_t *);
169187 extern int qla2x00_post_async_logout_work(struct scsi_qla_host *, fc_port_t *,
170188 uint16_t *);
171
-extern int qla2x00_post_async_logout_done_work(struct scsi_qla_host *,
172
- fc_port_t *, uint16_t *);
173189 extern int qla2x00_post_async_adisc_work(struct scsi_qla_host *, fc_port_t *,
174190 uint16_t *);
175191 extern int qla2x00_post_async_adisc_done_work(struct scsi_qla_host *,
....@@ -187,6 +203,7 @@
187203 extern void qla2x00_relogin(struct scsi_qla_host *);
188204 extern void qla2x00_do_work(struct scsi_qla_host *);
189205 extern void qla2x00_free_fcports(struct scsi_qla_host *);
206
+extern void qla2x00_free_fcport(fc_port_t *);
190207
191208 extern void qla83xx_schedule_work(scsi_qla_host_t *, int);
192209 extern void qla83xx_service_idc_aen(struct work_struct *);
....@@ -205,16 +222,20 @@
205222
206223 extern int qla2x00_post_uevent_work(struct scsi_qla_host *, u32);
207224 extern void qla2x00_disable_board_on_pci_error(struct work_struct *);
208
-extern void qla2x00_sp_compl(void *, int);
209
-extern void qla2xxx_qpair_sp_free_dma(void *);
210
-extern void qla2xxx_qpair_sp_compl(void *, int);
225
+extern void qla_eeh_work(struct work_struct *);
226
+extern void qla2x00_sp_compl(srb_t *sp, int);
227
+extern void qla2xxx_qpair_sp_free_dma(srb_t *sp);
228
+extern void qla2xxx_qpair_sp_compl(srb_t *sp, int);
211229 extern void qla24xx_sched_upd_fcport(fc_port_t *);
212230 void qla2x00_handle_login_done_event(struct scsi_qla_host *, fc_port_t *,
213231 uint16_t *);
214232 int qla24xx_post_gnl_work(struct scsi_qla_host *, fc_port_t *);
215
-int qla24xx_async_abort_cmd(srb_t *, bool);
216233 int qla24xx_post_relogin_work(struct scsi_qla_host *vha);
217234 void qla2x00_wait_for_sess_deletion(scsi_qla_host_t *);
235
+void qla24xx_process_purex_rdp(struct scsi_qla_host *vha,
236
+ struct purex_item *pkt);
237
+void qla_pci_set_eeh_busy(struct scsi_qla_host *);
238
+void qla_schedule_eeh_work(struct scsi_qla_host *);
218239
219240 /*
220241 * Global Functions in qla_mid.c source file.
....@@ -235,13 +256,14 @@
235256 struct vp_rpt_id_entry_24xx *);
236257 extern void qla2x00_do_dpc_all_vps(scsi_qla_host_t *);
237258 extern int qla24xx_vport_create_req_sanity_check(struct fc_vport *);
238
-extern scsi_qla_host_t * qla24xx_create_vhost(struct fc_vport *);
259
+extern scsi_qla_host_t *qla24xx_create_vhost(struct fc_vport *);
239260
240
-extern void qla2x00_sp_free_dma(void *);
261
+extern void qla2x00_sp_free_dma(srb_t *sp);
241262 extern char *qla2x00_get_fw_version_str(struct scsi_qla_host *, char *);
242263
243
-extern void qla2x00_mark_device_lost(scsi_qla_host_t *, fc_port_t *, int, int);
244
-extern void qla2x00_mark_all_devices_lost(scsi_qla_host_t *, int);
264
+extern void qla2x00_mark_device_lost(scsi_qla_host_t *, fc_port_t *, int);
265
+extern void qla2x00_mark_all_devices_lost(scsi_qla_host_t *);
266
+extern int qla24xx_async_abort_cmd(srb_t *, bool);
245267
246268 extern struct fw_blob *qla2x00_request_firmware(scsi_qla_host_t *);
247269
....@@ -265,29 +287,29 @@
265287 extern void qla2x00_build_scsi_iocbs_64(srb_t *, cmd_entry_t *, uint16_t);
266288 extern void qla24xx_build_scsi_iocbs(srb_t *, struct cmd_type_7 *,
267289 uint16_t, struct req_que *);
290
+extern uint32_t qla2xxx_get_next_handle(struct req_que *req);
268291 extern int qla2x00_start_scsi(srb_t *sp);
269292 extern int qla24xx_start_scsi(srb_t *sp);
270
-int qla2x00_marker(struct scsi_qla_host *, struct req_que *, struct rsp_que *,
271
- uint16_t, uint64_t, uint8_t);
293
+int qla2x00_marker(struct scsi_qla_host *, struct qla_qpair *,
294
+ uint16_t, uint64_t, uint8_t);
272295 extern int qla2x00_start_sp(srb_t *);
273296 extern int qla24xx_dif_start_scsi(srb_t *);
274297 extern int qla2x00_start_bidir(srb_t *, struct scsi_qla_host *, uint32_t);
275298 extern int qla2xxx_dif_start_scsi_mq(srb_t *);
299
+extern void qla2x00_init_timer(srb_t *sp, unsigned long tmo);
276300 extern unsigned long qla2x00_get_async_timeout(struct scsi_qla_host *);
277301
278302 extern void *qla2x00_alloc_iocbs(struct scsi_qla_host *, srb_t *);
279303 extern void *__qla2x00_alloc_iocbs(struct qla_qpair *, srb_t *);
280304 extern int qla2x00_issue_marker(scsi_qla_host_t *, int);
281305 extern int qla24xx_walk_and_build_sglist_no_difb(struct qla_hw_data *, srb_t *,
282
- uint32_t *, uint16_t, struct qla_tc_param *);
306
+ struct dsd64 *, uint16_t, struct qla_tc_param *);
283307 extern int qla24xx_walk_and_build_sglist(struct qla_hw_data *, srb_t *,
284
- uint32_t *, uint16_t, struct qla_tc_param *);
308
+ struct dsd64 *, uint16_t, struct qla_tc_param *);
285309 extern int qla24xx_walk_and_build_prot_sglist(struct qla_hw_data *, srb_t *,
286
- uint32_t *, uint16_t, struct qla_tc_param *);
310
+ struct dsd64 *, uint16_t, struct qla_tgt_cmd *);
287311 extern int qla24xx_get_one_block_sg(uint32_t, struct qla2_sgx *, uint32_t *);
288312 extern int qla24xx_configure_prot_mode(srb_t *, uint16_t *);
289
-extern int qla24xx_build_scsi_crc_2_iocbs(srb_t *,
290
- struct cmd_type_crc_2 *, uint16_t, uint16_t, uint16_t);
291313
292314 /*
293315 * Global Function Prototypes in qla_mbx.c source file.
....@@ -342,6 +364,9 @@
342364 qla2x00_get_port_database(scsi_qla_host_t *, fc_port_t *, uint8_t);
343365
344366 extern int
367
+qla24xx_get_port_database(scsi_qla_host_t *, u16, struct port_database_24xx *);
368
+
369
+extern int
345370 qla2x00_get_firmware_state(scsi_qla_host_t *, uint16_t *);
346371
347372 extern int
....@@ -383,7 +408,8 @@
383408 qla2x00_get_resource_cnts(scsi_qla_host_t *);
384409
385410 extern int
386
-qla2x00_get_fcal_position_map(scsi_qla_host_t *ha, char *pos_map);
411
+qla2x00_get_fcal_position_map(scsi_qla_host_t *ha, char *pos_map,
412
+ u8 *num_entries);
387413
388414 extern int
389415 qla2x00_get_link_status(scsi_qla_host_t *, uint16_t, struct link_statistics *,
....@@ -440,6 +466,13 @@
440466 qla25xx_set_driver_version(scsi_qla_host_t *, char *);
441467
442468 extern int
469
+qla25xx_set_els_cmds_supported(scsi_qla_host_t *);
470
+
471
+extern int
472
+qla24xx_get_buffer_credits(scsi_qla_host_t *, struct buffer_credit_24xx *,
473
+ dma_addr_t);
474
+
475
+extern int
443476 qla2x00_read_sfp(scsi_qla_host_t *, dma_addr_t, uint8_t *,
444477 uint16_t, uint16_t, uint16_t, uint16_t);
445478
....@@ -462,6 +495,8 @@
462495
463496 extern int
464497 qla81xx_fac_erase_sector(scsi_qla_host_t *, uint32_t, uint32_t);
498
+
499
+extern int qla81xx_fac_semaphore_access(scsi_qla_host_t *, int);
465500
466501 extern int
467502 qla2x00_get_xgmac_stats(scsi_qla_host_t *, dma_addr_t, uint16_t, uint16_t *);
....@@ -508,6 +543,14 @@
508543 extern int qla27xx_set_zio_threshold(scsi_qla_host_t *, uint16_t);
509544 int qla24xx_res_count_wait(struct scsi_qla_host *, uint16_t *, int);
510545
546
+extern int qla28xx_secure_flash_update(scsi_qla_host_t *, uint16_t, uint16_t,
547
+ uint32_t, dma_addr_t, uint32_t);
548
+
549
+extern int qla2xxx_read_remote_register(scsi_qla_host_t *, uint32_t,
550
+ uint32_t *);
551
+extern int qla2xxx_write_remote_register(scsi_qla_host_t *, uint32_t,
552
+ uint32_t);
553
+
511554 /*
512555 * Global Function Prototypes in qla_isr.c source file.
513556 */
....@@ -530,6 +573,8 @@
530573 uint32_t);
531574 extern irqreturn_t
532575 qla2xxx_msix_rsp_q(int irq, void *dev_id);
576
+extern irqreturn_t
577
+qla2xxx_msix_rsp_q_hs(int irq, void *dev_id);
533578 fc_port_t *qla2x00_find_fcport_by_loopid(scsi_qla_host_t *, uint16_t);
534579 fc_port_t *qla2x00_find_fcport_by_wwpn(scsi_qla_host_t *, u8 *, u8);
535580 fc_port_t *qla2x00_find_fcport_by_nportid(scsi_qla_host_t *, port_id_t *, u8);
....@@ -538,20 +583,21 @@
538583 * Global Function Prototypes in qla_sup.c source file.
539584 */
540585 extern void qla2x00_release_nvram_protection(scsi_qla_host_t *);
541
-extern uint32_t *qla24xx_read_flash_data(scsi_qla_host_t *, uint32_t *,
542
- uint32_t, uint32_t);
543
-extern uint8_t *qla2x00_read_nvram_data(scsi_qla_host_t *, uint8_t *, uint32_t,
544
- uint32_t);
545
-extern uint8_t *qla24xx_read_nvram_data(scsi_qla_host_t *, uint8_t *, uint32_t,
546
- uint32_t);
547
-extern int qla2x00_write_nvram_data(scsi_qla_host_t *, uint8_t *, uint32_t,
548
- uint32_t);
549
-extern int qla24xx_write_nvram_data(scsi_qla_host_t *, uint8_t *, uint32_t,
550
- uint32_t);
551
-extern uint8_t *qla25xx_read_nvram_data(scsi_qla_host_t *, uint8_t *, uint32_t,
552
- uint32_t);
553
-extern int qla25xx_write_nvram_data(scsi_qla_host_t *, uint8_t *, uint32_t,
554
- uint32_t);
586
+extern int qla24xx_read_flash_data(scsi_qla_host_t *, uint32_t *,
587
+ uint32_t, uint32_t);
588
+extern uint8_t *qla2x00_read_nvram_data(scsi_qla_host_t *, void *, uint32_t,
589
+ uint32_t);
590
+extern uint8_t *qla24xx_read_nvram_data(scsi_qla_host_t *, void *, uint32_t,
591
+ uint32_t);
592
+extern int qla2x00_write_nvram_data(scsi_qla_host_t *, void *, uint32_t,
593
+ uint32_t);
594
+extern int qla24xx_write_nvram_data(scsi_qla_host_t *, void *, uint32_t,
595
+ uint32_t);
596
+extern uint8_t *qla25xx_read_nvram_data(scsi_qla_host_t *, void *, uint32_t,
597
+ uint32_t);
598
+extern int qla25xx_write_nvram_data(scsi_qla_host_t *, void *, uint32_t,
599
+ uint32_t);
600
+
555601 extern int qla2x00_is_a_vp_did(scsi_qla_host_t *, uint32_t);
556602 bool qla2x00_check_reg32_for_disconnect(scsi_qla_host_t *, uint32_t);
557603 bool qla2x00_check_reg16_for_disconnect(scsi_qla_host_t *, uint16_t);
....@@ -571,18 +617,18 @@
571617 extern int qla83xx_access_control(scsi_qla_host_t *, uint16_t, uint32_t,
572618 uint32_t, uint16_t *);
573619
574
-extern uint8_t *qla2x00_read_optrom_data(struct scsi_qla_host *, uint8_t *,
620
+extern void *qla2x00_read_optrom_data(struct scsi_qla_host *, void *,
575621 uint32_t, uint32_t);
576
-extern int qla2x00_write_optrom_data(struct scsi_qla_host *, uint8_t *,
622
+extern int qla2x00_write_optrom_data(struct scsi_qla_host *, void *,
577623 uint32_t, uint32_t);
578
-extern uint8_t *qla24xx_read_optrom_data(struct scsi_qla_host *, uint8_t *,
624
+extern void *qla24xx_read_optrom_data(struct scsi_qla_host *, void *,
579625 uint32_t, uint32_t);
580
-extern int qla24xx_write_optrom_data(struct scsi_qla_host *, uint8_t *,
626
+extern int qla24xx_write_optrom_data(struct scsi_qla_host *, void *,
581627 uint32_t, uint32_t);
582
-extern uint8_t *qla25xx_read_optrom_data(struct scsi_qla_host *, uint8_t *,
628
+extern void *qla25xx_read_optrom_data(struct scsi_qla_host *, void *,
583629 uint32_t, uint32_t);
584
-extern uint8_t *qla8044_read_optrom_data(struct scsi_qla_host *,
585
- uint8_t *, uint32_t, uint32_t);
630
+extern void *qla8044_read_optrom_data(struct scsi_qla_host *,
631
+ void *, uint32_t, uint32_t);
586632 extern void qla8044_watchdog(struct scsi_qla_host *vha);
587633
588634 extern int qla2x00_get_flash_version(scsi_qla_host_t *, void *);
....@@ -598,29 +644,24 @@
598644 /*
599645 * Global Function Prototypes in qla_dbg.c source file.
600646 */
601
-extern void qla2100_fw_dump(scsi_qla_host_t *, int);
602
-extern void qla2300_fw_dump(scsi_qla_host_t *, int);
603
-extern void qla24xx_fw_dump(scsi_qla_host_t *, int);
604
-extern void qla25xx_fw_dump(scsi_qla_host_t *, int);
605
-extern void qla81xx_fw_dump(scsi_qla_host_t *, int);
606
-extern void qla82xx_fw_dump(scsi_qla_host_t *, int);
607
-extern void qla8044_fw_dump(scsi_qla_host_t *, int);
647
+void qla2xxx_dump_fw(scsi_qla_host_t *vha);
648
+void qla2100_fw_dump(scsi_qla_host_t *vha);
649
+void qla2300_fw_dump(scsi_qla_host_t *vha);
650
+void qla24xx_fw_dump(scsi_qla_host_t *vha);
651
+void qla25xx_fw_dump(scsi_qla_host_t *vha);
652
+void qla81xx_fw_dump(scsi_qla_host_t *vha);
653
+void qla82xx_fw_dump(scsi_qla_host_t *vha);
654
+void qla8044_fw_dump(scsi_qla_host_t *vha);
608655
609
-extern void qla27xx_fwdump(scsi_qla_host_t *, int);
610
-extern ulong qla27xx_fwdt_calculate_dump_size(struct scsi_qla_host *);
656
+void qla27xx_fwdump(scsi_qla_host_t *vha);
657
+extern void qla27xx_mpi_fwdump(scsi_qla_host_t *, int);
658
+extern ulong qla27xx_fwdt_calculate_dump_size(struct scsi_qla_host *, void *);
611659 extern int qla27xx_fwdt_template_valid(void *);
612660 extern ulong qla27xx_fwdt_template_size(void *);
613
-extern const void *qla27xx_fwdt_template_default(void);
614
-extern ulong qla27xx_fwdt_template_default_size(void);
615661
616
-extern void qla2x00_dump_regs(scsi_qla_host_t *);
617
-extern void qla2x00_dump_buffer(uint8_t *, uint32_t);
618
-extern void qla2x00_dump_buffer_zipped(uint8_t *, uint32_t);
619
-extern void ql_dump_regs(uint32_t, scsi_qla_host_t *, int32_t);
620
-extern void ql_dump_buffer(uint32_t, scsi_qla_host_t *, int32_t,
621
- uint8_t *, uint32_t);
622662 extern void qla2xxx_dump_post_process(scsi_qla_host_t *, int);
623
-
663
+extern void ql_dump_regs(uint, scsi_qla_host_t *, uint);
664
+extern void ql_dump_buffer(uint, scsi_qla_host_t *, uint, const void *, uint);
624665 /*
625666 * Global Function Prototypes in qla_gs.c source file.
626667 */
....@@ -640,13 +681,10 @@
640681 extern int qla2x00_fdmi_register(scsi_qla_host_t *);
641682 extern int qla2x00_gfpn_id(scsi_qla_host_t *, sw_info_t *);
642683 extern int qla2x00_gpsc(scsi_qla_host_t *, sw_info_t *);
643
-extern void qla2x00_get_sym_node_name(scsi_qla_host_t *, uint8_t *, size_t);
684
+extern size_t qla2x00_get_sym_node_name(scsi_qla_host_t *, uint8_t *, size_t);
644685 extern int qla2x00_chk_ms_status(scsi_qla_host_t *, ms_iocb_entry_t *,
645686 struct ct_sns_rsp *, const char *);
646687 extern void qla2x00_async_iocb_timeout(void *data);
647
-extern int qla24xx_async_gidpn(scsi_qla_host_t *, fc_port_t *);
648
-int qla24xx_post_gidpn_work(struct scsi_qla_host *, fc_port_t *);
649
-void qla24xx_handle_gidpn_event(scsi_qla_host_t *, struct event_arg *);
650688
651689 extern void qla2x00_free_fcport(fc_port_t *);
652690
....@@ -671,12 +709,15 @@
671709 void qla24xx_handle_gfpnid_event(scsi_qla_host_t *, struct event_arg *);
672710 void qla24xx_sp_unmap(scsi_qla_host_t *, srb_t *);
673711 void qla_scan_work_fn(struct work_struct *);
712
+uint qla25xx_fdmi_port_speed_capability(struct qla_hw_data *);
713
+uint qla25xx_fdmi_port_speed_currently(struct qla_hw_data *);
674714
675715 /*
676716 * Global Function Prototypes in qla_attr.c source file.
677717 */
678718 struct device_attribute;
679719 extern struct device_attribute *qla2x00_host_attrs[];
720
+extern struct device_attribute *qla2x00_host_attrs_dm[];
680721 struct fc_function_template;
681722 extern struct fc_function_template qla2xxx_transport_functions;
682723 extern struct fc_function_template qla2xxx_transport_vport_functions;
....@@ -690,7 +731,7 @@
690731 extern int qla24xx_update_all_fcp_prio(scsi_qla_host_t *);
691732 extern int qla24xx_fcp_prio_cfg_valid(scsi_qla_host_t *,
692733 struct qla_fcp_prio_cfg *, uint8_t);
693
-
734
+void qla_insert_tgt_attrs(void);
694735 /*
695736 * Global Function Prototypes in qla_dfs.c source file.
696737 */
....@@ -721,10 +762,10 @@
721762 /* qlafx00 related functions */
722763 extern int qlafx00_pci_config(struct scsi_qla_host *);
723764 extern int qlafx00_initialize_adapter(struct scsi_qla_host *);
724
-extern void qlafx00_soft_reset(scsi_qla_host_t *);
765
+extern int qlafx00_soft_reset(scsi_qla_host_t *);
725766 extern int qlafx00_chip_diag(scsi_qla_host_t *);
726767 extern void qlafx00_config_rings(struct scsi_qla_host *);
727
-extern char *qlafx00_pci_info_str(struct scsi_qla_host *, char *);
768
+extern char *qlafx00_pci_info_str(struct scsi_qla_host *, char *, size_t);
728769 extern char *qlafx00_fw_version_str(struct scsi_qla_host *, char *, size_t);
729770 extern irqreturn_t qlafx00_intr_handler(int, void *);
730771 extern void qlafx00_enable_intrs(struct qla_hw_data *);
....@@ -740,7 +781,7 @@
740781 extern int qlafx00_configure_devices(scsi_qla_host_t *);
741782 extern int qlafx00_reset_initialize(scsi_qla_host_t *);
742783 extern int qlafx00_fx_disc(scsi_qla_host_t *, fc_port_t *, uint16_t);
743
-extern int qlafx00_process_aen(struct scsi_qla_host *, struct qla_work_evt *);
784
+extern void qlafx00_process_aen(struct scsi_qla_host *, struct qla_work_evt *);
744785 extern int qlafx00_post_aenfx_work(struct scsi_qla_host *, uint32_t,
745786 uint32_t *, int);
746787 extern uint32_t qlafx00_fw_state_show(struct device *,
....@@ -763,16 +804,16 @@
763804 extern int qla82xx_iospace_config(struct qla_hw_data *);
764805
765806 /* Initialization related functions */
766
-extern void qla82xx_reset_chip(struct scsi_qla_host *);
807
+extern int qla82xx_reset_chip(struct scsi_qla_host *);
767808 extern void qla82xx_config_rings(struct scsi_qla_host *);
768809 extern void qla82xx_watchdog(scsi_qla_host_t *);
769810 extern int qla82xx_start_firmware(scsi_qla_host_t *);
770811
771812 /* Firmware and flash related functions */
772813 extern int qla82xx_load_risc(scsi_qla_host_t *, uint32_t *);
773
-extern uint8_t *qla82xx_read_optrom_data(struct scsi_qla_host *, uint8_t *,
814
+extern void *qla82xx_read_optrom_data(struct scsi_qla_host *, void *,
774815 uint32_t, uint32_t);
775
-extern int qla82xx_write_optrom_data(struct scsi_qla_host *, uint8_t *,
816
+extern int qla82xx_write_optrom_data(struct scsi_qla_host *, void *,
776817 uint32_t, uint32_t);
777818
778819 /* Mailbox related functions */
....@@ -781,10 +822,10 @@
781822
782823 /* IOCB related functions */
783824 extern int qla82xx_start_scsi(srb_t *);
784
-extern void qla2x00_sp_free(void *);
825
+extern void qla2x00_sp_free(srb_t *sp);
785826 extern void qla2x00_sp_timeout(struct timer_list *);
786
-extern void qla2x00_bsg_job_done(void *, int);
787
-extern void qla2x00_bsg_sp_free(void *);
827
+extern void qla2x00_bsg_job_done(srb_t *sp, int);
828
+extern void qla2x00_bsg_sp_free(srb_t *sp);
788829 extern void qla2x00_start_iocbs(struct scsi_qla_host *, struct req_que *);
789830
790831 /* Interrupt related */
....@@ -813,8 +854,8 @@
813854 extern void qla8xxx_dev_failed_handler(scsi_qla_host_t *);
814855 extern void qla82xx_clear_qsnt_ready(scsi_qla_host_t *);
815856
816
-extern void qla2x00_set_model_info(scsi_qla_host_t *, uint8_t *,
817
- size_t, char *);
857
+extern void qla2x00_set_model_info(scsi_qla_host_t *, uint8_t *, size_t,
858
+ const char *);
818859 extern int qla82xx_mbx_intr_enable(scsi_qla_host_t *);
819860 extern int qla82xx_mbx_intr_disable(scsi_qla_host_t *);
820861 extern void qla82xx_start_iocbs(scsi_qla_host_t *);
....@@ -829,6 +870,7 @@
829870 extern int qla82xx_read_temperature(scsi_qla_host_t *);
830871 extern int qla8044_read_temperature(scsi_qla_host_t *);
831872 extern int qla2x00_read_sfp_dev(struct scsi_qla_host *, char *, int);
873
+extern int ql26xx_led_config(scsi_qla_host_t *, uint16_t, uint16_t *);
832874
833875 /* BSG related functions */
834876 extern int qla24xx_bsg_request(struct bsg_job *);
....@@ -840,7 +882,7 @@
840882 uint16_t *, uint16_t *);
841883
842884 /* 83xx related functions */
843
-extern void qla83xx_fw_dump(scsi_qla_host_t *, int);
885
+void qla83xx_fw_dump(scsi_qla_host_t *vha);
844886
845887 /* Minidump related functions */
846888 extern int qla82xx_md_get_template_size(scsi_qla_host_t *);
....@@ -868,7 +910,7 @@
868910 void qla8044_get_minidump(struct scsi_qla_host *vha);
869911 int qla8044_collect_md_data(struct scsi_qla_host *vha);
870912 extern int qla8044_md_get_template(scsi_qla_host_t *);
871
-extern int qla8044_write_optrom_data(struct scsi_qla_host *, uint8_t *,
913
+extern int qla8044_write_optrom_data(struct scsi_qla_host *, void *,
872914 uint32_t, uint32_t);
873915 extern irqreturn_t qla8044_intr_handler(int, void *);
874916 extern void qla82xx_mbx_completion(scsi_qla_host_t *, uint16_t);
....@@ -896,5 +938,13 @@
896938 void qlt_update_host_map(struct scsi_qla_host *, port_id_t);
897939 void qlt_remove_target_resources(struct qla_hw_data *);
898940 void qlt_clr_qp_table(struct scsi_qla_host *vha);
941
+void qlt_set_mode(struct scsi_qla_host *);
942
+int qla2x00_set_data_rate(scsi_qla_host_t *vha, uint16_t mode);
943
+extern void qla24xx_process_purex_list(struct purex_list *);
944
+extern void qla2x00_dfs_create_rport(scsi_qla_host_t *vha, struct fc_port *fp);
945
+extern void qla2x00_dfs_remove_rport(scsi_qla_host_t *vha, struct fc_port *fp);
899946
947
+/* nvme.c */
948
+void qla_nvme_unregister_remote_port(struct fc_port *fcport);
949
+void qla_handle_els_plogi_done(scsi_qla_host_t *vha, struct event_arg *ea);
900950 #endif /* _QLA_GBL_H */