forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-11 1f93a7dfd1f8d5ff7a5c53246c7534fe2332d6f4
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,17 @@
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 qla2x00_sp_compl(srb_t *sp, int);
226
+extern void qla2xxx_qpair_sp_free_dma(srb_t *sp);
227
+extern void qla2xxx_qpair_sp_compl(srb_t *sp, int);
211228 extern void qla24xx_sched_upd_fcport(fc_port_t *);
212229 void qla2x00_handle_login_done_event(struct scsi_qla_host *, fc_port_t *,
213230 uint16_t *);
214231 int qla24xx_post_gnl_work(struct scsi_qla_host *, fc_port_t *);
215
-int qla24xx_async_abort_cmd(srb_t *, bool);
216232 int qla24xx_post_relogin_work(struct scsi_qla_host *vha);
217233 void qla2x00_wait_for_sess_deletion(scsi_qla_host_t *);
234
+void qla24xx_process_purex_rdp(struct scsi_qla_host *vha,
235
+ struct purex_item *pkt);
218236
219237 /*
220238 * Global Functions in qla_mid.c source file.
....@@ -235,13 +253,14 @@
235253 struct vp_rpt_id_entry_24xx *);
236254 extern void qla2x00_do_dpc_all_vps(scsi_qla_host_t *);
237255 extern int qla24xx_vport_create_req_sanity_check(struct fc_vport *);
238
-extern scsi_qla_host_t * qla24xx_create_vhost(struct fc_vport *);
256
+extern scsi_qla_host_t *qla24xx_create_vhost(struct fc_vport *);
239257
240
-extern void qla2x00_sp_free_dma(void *);
258
+extern void qla2x00_sp_free_dma(srb_t *sp);
241259 extern char *qla2x00_get_fw_version_str(struct scsi_qla_host *, char *);
242260
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);
261
+extern void qla2x00_mark_device_lost(scsi_qla_host_t *, fc_port_t *, int);
262
+extern void qla2x00_mark_all_devices_lost(scsi_qla_host_t *);
263
+extern int qla24xx_async_abort_cmd(srb_t *, bool);
245264
246265 extern struct fw_blob *qla2x00_request_firmware(scsi_qla_host_t *);
247266
....@@ -265,29 +284,29 @@
265284 extern void qla2x00_build_scsi_iocbs_64(srb_t *, cmd_entry_t *, uint16_t);
266285 extern void qla24xx_build_scsi_iocbs(srb_t *, struct cmd_type_7 *,
267286 uint16_t, struct req_que *);
287
+extern uint32_t qla2xxx_get_next_handle(struct req_que *req);
268288 extern int qla2x00_start_scsi(srb_t *sp);
269289 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);
290
+int qla2x00_marker(struct scsi_qla_host *, struct qla_qpair *,
291
+ uint16_t, uint64_t, uint8_t);
272292 extern int qla2x00_start_sp(srb_t *);
273293 extern int qla24xx_dif_start_scsi(srb_t *);
274294 extern int qla2x00_start_bidir(srb_t *, struct scsi_qla_host *, uint32_t);
275295 extern int qla2xxx_dif_start_scsi_mq(srb_t *);
296
+extern void qla2x00_init_timer(srb_t *sp, unsigned long tmo);
276297 extern unsigned long qla2x00_get_async_timeout(struct scsi_qla_host *);
277298
278299 extern void *qla2x00_alloc_iocbs(struct scsi_qla_host *, srb_t *);
279300 extern void *__qla2x00_alloc_iocbs(struct qla_qpair *, srb_t *);
280301 extern int qla2x00_issue_marker(scsi_qla_host_t *, int);
281302 extern int qla24xx_walk_and_build_sglist_no_difb(struct qla_hw_data *, srb_t *,
282
- uint32_t *, uint16_t, struct qla_tc_param *);
303
+ struct dsd64 *, uint16_t, struct qla_tc_param *);
283304 extern int qla24xx_walk_and_build_sglist(struct qla_hw_data *, srb_t *,
284
- uint32_t *, uint16_t, struct qla_tc_param *);
305
+ struct dsd64 *, uint16_t, struct qla_tc_param *);
285306 extern int qla24xx_walk_and_build_prot_sglist(struct qla_hw_data *, srb_t *,
286
- uint32_t *, uint16_t, struct qla_tc_param *);
307
+ struct dsd64 *, uint16_t, struct qla_tgt_cmd *);
287308 extern int qla24xx_get_one_block_sg(uint32_t, struct qla2_sgx *, uint32_t *);
288309 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);
291310
292311 /*
293312 * Global Function Prototypes in qla_mbx.c source file.
....@@ -342,6 +361,9 @@
342361 qla2x00_get_port_database(scsi_qla_host_t *, fc_port_t *, uint8_t);
343362
344363 extern int
364
+qla24xx_get_port_database(scsi_qla_host_t *, u16, struct port_database_24xx *);
365
+
366
+extern int
345367 qla2x00_get_firmware_state(scsi_qla_host_t *, uint16_t *);
346368
347369 extern int
....@@ -383,7 +405,8 @@
383405 qla2x00_get_resource_cnts(scsi_qla_host_t *);
384406
385407 extern int
386
-qla2x00_get_fcal_position_map(scsi_qla_host_t *ha, char *pos_map);
408
+qla2x00_get_fcal_position_map(scsi_qla_host_t *ha, char *pos_map,
409
+ u8 *num_entries);
387410
388411 extern int
389412 qla2x00_get_link_status(scsi_qla_host_t *, uint16_t, struct link_statistics *,
....@@ -440,6 +463,13 @@
440463 qla25xx_set_driver_version(scsi_qla_host_t *, char *);
441464
442465 extern int
466
+qla25xx_set_els_cmds_supported(scsi_qla_host_t *);
467
+
468
+extern int
469
+qla24xx_get_buffer_credits(scsi_qla_host_t *, struct buffer_credit_24xx *,
470
+ dma_addr_t);
471
+
472
+extern int
443473 qla2x00_read_sfp(scsi_qla_host_t *, dma_addr_t, uint8_t *,
444474 uint16_t, uint16_t, uint16_t, uint16_t);
445475
....@@ -462,6 +492,8 @@
462492
463493 extern int
464494 qla81xx_fac_erase_sector(scsi_qla_host_t *, uint32_t, uint32_t);
495
+
496
+extern int qla81xx_fac_semaphore_access(scsi_qla_host_t *, int);
465497
466498 extern int
467499 qla2x00_get_xgmac_stats(scsi_qla_host_t *, dma_addr_t, uint16_t, uint16_t *);
....@@ -508,6 +540,14 @@
508540 extern int qla27xx_set_zio_threshold(scsi_qla_host_t *, uint16_t);
509541 int qla24xx_res_count_wait(struct scsi_qla_host *, uint16_t *, int);
510542
543
+extern int qla28xx_secure_flash_update(scsi_qla_host_t *, uint16_t, uint16_t,
544
+ uint32_t, dma_addr_t, uint32_t);
545
+
546
+extern int qla2xxx_read_remote_register(scsi_qla_host_t *, uint32_t,
547
+ uint32_t *);
548
+extern int qla2xxx_write_remote_register(scsi_qla_host_t *, uint32_t,
549
+ uint32_t);
550
+
511551 /*
512552 * Global Function Prototypes in qla_isr.c source file.
513553 */
....@@ -530,6 +570,8 @@
530570 uint32_t);
531571 extern irqreturn_t
532572 qla2xxx_msix_rsp_q(int irq, void *dev_id);
573
+extern irqreturn_t
574
+qla2xxx_msix_rsp_q_hs(int irq, void *dev_id);
533575 fc_port_t *qla2x00_find_fcport_by_loopid(scsi_qla_host_t *, uint16_t);
534576 fc_port_t *qla2x00_find_fcport_by_wwpn(scsi_qla_host_t *, u8 *, u8);
535577 fc_port_t *qla2x00_find_fcport_by_nportid(scsi_qla_host_t *, port_id_t *, u8);
....@@ -538,20 +580,21 @@
538580 * Global Function Prototypes in qla_sup.c source file.
539581 */
540582 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);
583
+extern int qla24xx_read_flash_data(scsi_qla_host_t *, uint32_t *,
584
+ uint32_t, uint32_t);
585
+extern uint8_t *qla2x00_read_nvram_data(scsi_qla_host_t *, void *, uint32_t,
586
+ uint32_t);
587
+extern uint8_t *qla24xx_read_nvram_data(scsi_qla_host_t *, void *, uint32_t,
588
+ uint32_t);
589
+extern int qla2x00_write_nvram_data(scsi_qla_host_t *, void *, uint32_t,
590
+ uint32_t);
591
+extern int qla24xx_write_nvram_data(scsi_qla_host_t *, void *, uint32_t,
592
+ uint32_t);
593
+extern uint8_t *qla25xx_read_nvram_data(scsi_qla_host_t *, void *, uint32_t,
594
+ uint32_t);
595
+extern int qla25xx_write_nvram_data(scsi_qla_host_t *, void *, uint32_t,
596
+ uint32_t);
597
+
555598 extern int qla2x00_is_a_vp_did(scsi_qla_host_t *, uint32_t);
556599 bool qla2x00_check_reg32_for_disconnect(scsi_qla_host_t *, uint32_t);
557600 bool qla2x00_check_reg16_for_disconnect(scsi_qla_host_t *, uint16_t);
....@@ -571,18 +614,18 @@
571614 extern int qla83xx_access_control(scsi_qla_host_t *, uint16_t, uint32_t,
572615 uint32_t, uint16_t *);
573616
574
-extern uint8_t *qla2x00_read_optrom_data(struct scsi_qla_host *, uint8_t *,
617
+extern void *qla2x00_read_optrom_data(struct scsi_qla_host *, void *,
575618 uint32_t, uint32_t);
576
-extern int qla2x00_write_optrom_data(struct scsi_qla_host *, uint8_t *,
619
+extern int qla2x00_write_optrom_data(struct scsi_qla_host *, void *,
577620 uint32_t, uint32_t);
578
-extern uint8_t *qla24xx_read_optrom_data(struct scsi_qla_host *, uint8_t *,
621
+extern void *qla24xx_read_optrom_data(struct scsi_qla_host *, void *,
579622 uint32_t, uint32_t);
580
-extern int qla24xx_write_optrom_data(struct scsi_qla_host *, uint8_t *,
623
+extern int qla24xx_write_optrom_data(struct scsi_qla_host *, void *,
581624 uint32_t, uint32_t);
582
-extern uint8_t *qla25xx_read_optrom_data(struct scsi_qla_host *, uint8_t *,
625
+extern void *qla25xx_read_optrom_data(struct scsi_qla_host *, void *,
583626 uint32_t, uint32_t);
584
-extern uint8_t *qla8044_read_optrom_data(struct scsi_qla_host *,
585
- uint8_t *, uint32_t, uint32_t);
627
+extern void *qla8044_read_optrom_data(struct scsi_qla_host *,
628
+ void *, uint32_t, uint32_t);
586629 extern void qla8044_watchdog(struct scsi_qla_host *vha);
587630
588631 extern int qla2x00_get_flash_version(scsi_qla_host_t *, void *);
....@@ -598,29 +641,24 @@
598641 /*
599642 * Global Function Prototypes in qla_dbg.c source file.
600643 */
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);
644
+void qla2xxx_dump_fw(scsi_qla_host_t *vha);
645
+void qla2100_fw_dump(scsi_qla_host_t *vha);
646
+void qla2300_fw_dump(scsi_qla_host_t *vha);
647
+void qla24xx_fw_dump(scsi_qla_host_t *vha);
648
+void qla25xx_fw_dump(scsi_qla_host_t *vha);
649
+void qla81xx_fw_dump(scsi_qla_host_t *vha);
650
+void qla82xx_fw_dump(scsi_qla_host_t *vha);
651
+void qla8044_fw_dump(scsi_qla_host_t *vha);
608652
609
-extern void qla27xx_fwdump(scsi_qla_host_t *, int);
610
-extern ulong qla27xx_fwdt_calculate_dump_size(struct scsi_qla_host *);
653
+void qla27xx_fwdump(scsi_qla_host_t *vha);
654
+extern void qla27xx_mpi_fwdump(scsi_qla_host_t *, int);
655
+extern ulong qla27xx_fwdt_calculate_dump_size(struct scsi_qla_host *, void *);
611656 extern int qla27xx_fwdt_template_valid(void *);
612657 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);
615658
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);
622659 extern void qla2xxx_dump_post_process(scsi_qla_host_t *, int);
623
-
660
+extern void ql_dump_regs(uint, scsi_qla_host_t *, uint);
661
+extern void ql_dump_buffer(uint, scsi_qla_host_t *, uint, const void *, uint);
624662 /*
625663 * Global Function Prototypes in qla_gs.c source file.
626664 */
....@@ -640,13 +678,10 @@
640678 extern int qla2x00_fdmi_register(scsi_qla_host_t *);
641679 extern int qla2x00_gfpn_id(scsi_qla_host_t *, sw_info_t *);
642680 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);
681
+extern size_t qla2x00_get_sym_node_name(scsi_qla_host_t *, uint8_t *, size_t);
644682 extern int qla2x00_chk_ms_status(scsi_qla_host_t *, ms_iocb_entry_t *,
645683 struct ct_sns_rsp *, const char *);
646684 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 *);
650685
651686 extern void qla2x00_free_fcport(fc_port_t *);
652687
....@@ -671,12 +706,15 @@
671706 void qla24xx_handle_gfpnid_event(scsi_qla_host_t *, struct event_arg *);
672707 void qla24xx_sp_unmap(scsi_qla_host_t *, srb_t *);
673708 void qla_scan_work_fn(struct work_struct *);
709
+uint qla25xx_fdmi_port_speed_capability(struct qla_hw_data *);
710
+uint qla25xx_fdmi_port_speed_currently(struct qla_hw_data *);
674711
675712 /*
676713 * Global Function Prototypes in qla_attr.c source file.
677714 */
678715 struct device_attribute;
679716 extern struct device_attribute *qla2x00_host_attrs[];
717
+extern struct device_attribute *qla2x00_host_attrs_dm[];
680718 struct fc_function_template;
681719 extern struct fc_function_template qla2xxx_transport_functions;
682720 extern struct fc_function_template qla2xxx_transport_vport_functions;
....@@ -690,7 +728,7 @@
690728 extern int qla24xx_update_all_fcp_prio(scsi_qla_host_t *);
691729 extern int qla24xx_fcp_prio_cfg_valid(scsi_qla_host_t *,
692730 struct qla_fcp_prio_cfg *, uint8_t);
693
-
731
+void qla_insert_tgt_attrs(void);
694732 /*
695733 * Global Function Prototypes in qla_dfs.c source file.
696734 */
....@@ -721,10 +759,10 @@
721759 /* qlafx00 related functions */
722760 extern int qlafx00_pci_config(struct scsi_qla_host *);
723761 extern int qlafx00_initialize_adapter(struct scsi_qla_host *);
724
-extern void qlafx00_soft_reset(scsi_qla_host_t *);
762
+extern int qlafx00_soft_reset(scsi_qla_host_t *);
725763 extern int qlafx00_chip_diag(scsi_qla_host_t *);
726764 extern void qlafx00_config_rings(struct scsi_qla_host *);
727
-extern char *qlafx00_pci_info_str(struct scsi_qla_host *, char *);
765
+extern char *qlafx00_pci_info_str(struct scsi_qla_host *, char *, size_t);
728766 extern char *qlafx00_fw_version_str(struct scsi_qla_host *, char *, size_t);
729767 extern irqreturn_t qlafx00_intr_handler(int, void *);
730768 extern void qlafx00_enable_intrs(struct qla_hw_data *);
....@@ -740,7 +778,7 @@
740778 extern int qlafx00_configure_devices(scsi_qla_host_t *);
741779 extern int qlafx00_reset_initialize(scsi_qla_host_t *);
742780 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 *);
781
+extern void qlafx00_process_aen(struct scsi_qla_host *, struct qla_work_evt *);
744782 extern int qlafx00_post_aenfx_work(struct scsi_qla_host *, uint32_t,
745783 uint32_t *, int);
746784 extern uint32_t qlafx00_fw_state_show(struct device *,
....@@ -763,16 +801,16 @@
763801 extern int qla82xx_iospace_config(struct qla_hw_data *);
764802
765803 /* Initialization related functions */
766
-extern void qla82xx_reset_chip(struct scsi_qla_host *);
804
+extern int qla82xx_reset_chip(struct scsi_qla_host *);
767805 extern void qla82xx_config_rings(struct scsi_qla_host *);
768806 extern void qla82xx_watchdog(scsi_qla_host_t *);
769807 extern int qla82xx_start_firmware(scsi_qla_host_t *);
770808
771809 /* Firmware and flash related functions */
772810 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 *,
811
+extern void *qla82xx_read_optrom_data(struct scsi_qla_host *, void *,
774812 uint32_t, uint32_t);
775
-extern int qla82xx_write_optrom_data(struct scsi_qla_host *, uint8_t *,
813
+extern int qla82xx_write_optrom_data(struct scsi_qla_host *, void *,
776814 uint32_t, uint32_t);
777815
778816 /* Mailbox related functions */
....@@ -781,10 +819,10 @@
781819
782820 /* IOCB related functions */
783821 extern int qla82xx_start_scsi(srb_t *);
784
-extern void qla2x00_sp_free(void *);
822
+extern void qla2x00_sp_free(srb_t *sp);
785823 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 *);
824
+extern void qla2x00_bsg_job_done(srb_t *sp, int);
825
+extern void qla2x00_bsg_sp_free(srb_t *sp);
788826 extern void qla2x00_start_iocbs(struct scsi_qla_host *, struct req_que *);
789827
790828 /* Interrupt related */
....@@ -813,8 +851,8 @@
813851 extern void qla8xxx_dev_failed_handler(scsi_qla_host_t *);
814852 extern void qla82xx_clear_qsnt_ready(scsi_qla_host_t *);
815853
816
-extern void qla2x00_set_model_info(scsi_qla_host_t *, uint8_t *,
817
- size_t, char *);
854
+extern void qla2x00_set_model_info(scsi_qla_host_t *, uint8_t *, size_t,
855
+ const char *);
818856 extern int qla82xx_mbx_intr_enable(scsi_qla_host_t *);
819857 extern int qla82xx_mbx_intr_disable(scsi_qla_host_t *);
820858 extern void qla82xx_start_iocbs(scsi_qla_host_t *);
....@@ -829,6 +867,7 @@
829867 extern int qla82xx_read_temperature(scsi_qla_host_t *);
830868 extern int qla8044_read_temperature(scsi_qla_host_t *);
831869 extern int qla2x00_read_sfp_dev(struct scsi_qla_host *, char *, int);
870
+extern int ql26xx_led_config(scsi_qla_host_t *, uint16_t, uint16_t *);
832871
833872 /* BSG related functions */
834873 extern int qla24xx_bsg_request(struct bsg_job *);
....@@ -840,7 +879,7 @@
840879 uint16_t *, uint16_t *);
841880
842881 /* 83xx related functions */
843
-extern void qla83xx_fw_dump(scsi_qla_host_t *, int);
882
+void qla83xx_fw_dump(scsi_qla_host_t *vha);
844883
845884 /* Minidump related functions */
846885 extern int qla82xx_md_get_template_size(scsi_qla_host_t *);
....@@ -868,7 +907,7 @@
868907 void qla8044_get_minidump(struct scsi_qla_host *vha);
869908 int qla8044_collect_md_data(struct scsi_qla_host *vha);
870909 extern int qla8044_md_get_template(scsi_qla_host_t *);
871
-extern int qla8044_write_optrom_data(struct scsi_qla_host *, uint8_t *,
910
+extern int qla8044_write_optrom_data(struct scsi_qla_host *, void *,
872911 uint32_t, uint32_t);
873912 extern irqreturn_t qla8044_intr_handler(int, void *);
874913 extern void qla82xx_mbx_completion(scsi_qla_host_t *, uint16_t);
....@@ -896,5 +935,13 @@
896935 void qlt_update_host_map(struct scsi_qla_host *, port_id_t);
897936 void qlt_remove_target_resources(struct qla_hw_data *);
898937 void qlt_clr_qp_table(struct scsi_qla_host *vha);
938
+void qlt_set_mode(struct scsi_qla_host *);
939
+int qla2x00_set_data_rate(scsi_qla_host_t *vha, uint16_t mode);
940
+extern void qla24xx_process_purex_list(struct purex_list *);
941
+extern void qla2x00_dfs_create_rport(scsi_qla_host_t *vha, struct fc_port *fp);
942
+extern void qla2x00_dfs_remove_rport(scsi_qla_host_t *vha, struct fc_port *fp);
899943
944
+/* nvme.c */
945
+void qla_nvme_unregister_remote_port(struct fc_port *fcport);
946
+void qla_handle_els_plogi_done(scsi_qla_host_t *vha, struct event_arg *ea);
900947 #endif /* _QLA_GBL_H */