aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/qla_gbl.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_gbl.h')
-rw-r--r--drivers/scsi/qla2xxx/qla_gbl.h126
1 files changed, 123 insertions, 3 deletions
diff --git a/drivers/scsi/qla2xxx/qla_gbl.h b/drivers/scsi/qla2xxx/qla_gbl.h
index 3a89bc514e2b..8217c3bcbc2e 100644
--- a/drivers/scsi/qla2xxx/qla_gbl.h
+++ b/drivers/scsi/qla2xxx/qla_gbl.h
@@ -44,6 +44,7 @@ extern int qla2x00_local_device_login(scsi_qla_host_t *, fc_port_t *);
44extern void qla2x00_update_fcports(scsi_qla_host_t *); 44extern void qla2x00_update_fcports(scsi_qla_host_t *);
45 45
46extern int qla2x00_abort_isp(scsi_qla_host_t *); 46extern int qla2x00_abort_isp(scsi_qla_host_t *);
47extern void qla2x00_abort_isp_cleanup(scsi_qla_host_t *);
47 48
48extern void qla2x00_update_fcport(scsi_qla_host_t *, fc_port_t *); 49extern void qla2x00_update_fcport(scsi_qla_host_t *, fc_port_t *);
49 50
@@ -55,10 +56,20 @@ extern void qla84xx_put_chip(struct scsi_qla_host *);
55extern int qla2x00_async_login(struct scsi_qla_host *, fc_port_t *, 56extern int qla2x00_async_login(struct scsi_qla_host *, fc_port_t *,
56 uint16_t *); 57 uint16_t *);
57extern int qla2x00_async_logout(struct scsi_qla_host *, fc_port_t *); 58extern int qla2x00_async_logout(struct scsi_qla_host *, fc_port_t *);
58extern int qla2x00_async_login_done(struct scsi_qla_host *, fc_port_t *, 59extern int qla2x00_async_adisc(struct scsi_qla_host *, fc_port_t *,
59 uint16_t *); 60 uint16_t *);
60extern int qla2x00_async_logout_done(struct scsi_qla_host *, fc_port_t *, 61extern int qla2x00_async_tm_cmd(fc_port_t *, uint32_t, uint32_t, uint32_t);
62extern int qla2x00_async_marker(fc_port_t *, uint16_t, uint8_t);
63extern void qla2x00_async_login_done(struct scsi_qla_host *, fc_port_t *,
61 uint16_t *); 64 uint16_t *);
65extern void qla2x00_async_logout_done(struct scsi_qla_host *, fc_port_t *,
66 uint16_t *);
67extern void qla2x00_async_adisc_done(struct scsi_qla_host *, fc_port_t *,
68 uint16_t *);
69extern void qla2x00_async_tm_cmd_done(struct scsi_qla_host *, fc_port_t *,
70 struct srb_iocb *);
71extern void qla2x00_async_marker_done(struct scsi_qla_host *, fc_port_t *,
72 struct srb_iocb *);
62 73
63extern fc_port_t * 74extern fc_port_t *
64qla2x00_alloc_fcport(scsi_qla_host_t *, gfp_t ); 75qla2x00_alloc_fcport(scsi_qla_host_t *, gfp_t );
@@ -79,6 +90,13 @@ extern int ql2xmaxqueues;
79extern int ql2xmultique_tag; 90extern int ql2xmultique_tag;
80extern int ql2xfwloadbin; 91extern int ql2xfwloadbin;
81extern int ql2xetsenable; 92extern int ql2xetsenable;
93extern int ql2xshiftctondsd;
94extern int ql2xdbwr;
95extern int ql2xdontresethba;
96extern int ql2xasynctmfenable;
97extern int ql2xenabledif;
98extern int ql2xenablehba_err_chk;
99extern int ql2xtargetreset;
82 100
83extern int qla2x00_loop_reset(scsi_qla_host_t *); 101extern int qla2x00_loop_reset(scsi_qla_host_t *);
84extern void qla2x00_abort_all_cmds(scsi_qla_host_t *, int); 102extern void qla2x00_abort_all_cmds(scsi_qla_host_t *, int);
@@ -93,6 +111,10 @@ extern int qla2x00_post_async_logout_work(struct scsi_qla_host *, fc_port_t *,
93 uint16_t *); 111 uint16_t *);
94extern int qla2x00_post_async_logout_done_work(struct scsi_qla_host *, 112extern int qla2x00_post_async_logout_done_work(struct scsi_qla_host *,
95 fc_port_t *, uint16_t *); 113 fc_port_t *, uint16_t *);
114extern int qla2x00_post_async_adisc_work(struct scsi_qla_host *, fc_port_t *,
115 uint16_t *);
116extern int qla2x00_post_async_adisc_done_work(struct scsi_qla_host *,
117 fc_port_t *, uint16_t *);
96extern int qla2x00_post_uevent_work(struct scsi_qla_host *, u32); 118extern int qla2x00_post_uevent_work(struct scsi_qla_host *, u32);
97 119
98extern int qla81xx_restart_mpi_firmware(scsi_qla_host_t *); 120extern int qla81xx_restart_mpi_firmware(scsi_qla_host_t *);
@@ -135,6 +157,7 @@ extern struct fw_blob *qla2x00_request_firmware(scsi_qla_host_t *);
135 157
136extern int qla2x00_wait_for_hba_online(scsi_qla_host_t *); 158extern int qla2x00_wait_for_hba_online(scsi_qla_host_t *);
137extern int qla2x00_wait_for_chip_reset(scsi_qla_host_t *); 159extern int qla2x00_wait_for_chip_reset(scsi_qla_host_t *);
160extern int qla2x00_wait_for_fcoe_ctx_reset(scsi_qla_host_t *);
138 161
139extern void qla2xxx_wake_dpc(struct scsi_qla_host *); 162extern void qla2xxx_wake_dpc(struct scsi_qla_host *);
140extern void qla2x00_alert_all_vps(struct rsp_que *, uint16_t *); 163extern void qla2x00_alert_all_vps(struct rsp_que *, uint16_t *);
@@ -157,6 +180,10 @@ int __qla2x00_marker(struct scsi_qla_host *, struct req_que *, struct rsp_que *,
157 uint16_t, uint16_t, uint8_t); 180 uint16_t, uint16_t, uint8_t);
158extern int qla2x00_start_sp(srb_t *); 181extern int qla2x00_start_sp(srb_t *);
159extern void qla2x00_ctx_sp_free(srb_t *); 182extern void qla2x00_ctx_sp_free(srb_t *);
183extern uint16_t qla24xx_calc_iocbs(uint16_t);
184extern void qla24xx_build_scsi_iocbs(srb_t *, struct cmd_type_7 *, uint16_t);
185extern int qla24xx_dif_start_scsi(srb_t *);
186
160 187
161/* 188/*
162 * Global Function Prototypes in qla_mbx.c source file. 189 * Global Function Prototypes in qla_mbx.c source file.
@@ -328,6 +355,9 @@ extern int
328qla2x00_write_ram_word(scsi_qla_host_t *, uint32_t, uint32_t); 355qla2x00_write_ram_word(scsi_qla_host_t *, uint32_t, uint32_t);
329 356
330extern int qla2x00_get_data_rate(scsi_qla_host_t *); 357extern int qla2x00_get_data_rate(scsi_qla_host_t *);
358extern int qla24xx_set_fcp_prio(scsi_qla_host_t *, uint16_t, uint16_t,
359 uint16_t *);
360
331/* 361/*
332 * Global Function Prototypes in qla_isr.c source file. 362 * Global Function Prototypes in qla_isr.c source file.
333 */ 363 */
@@ -340,6 +370,7 @@ qla24xx_process_response_queue(struct scsi_qla_host *, struct rsp_que *);
340extern int qla2x00_request_irqs(struct qla_hw_data *, struct rsp_que *); 370extern int qla2x00_request_irqs(struct qla_hw_data *, struct rsp_que *);
341extern void qla2x00_free_irqs(scsi_qla_host_t *); 371extern void qla2x00_free_irqs(scsi_qla_host_t *);
342 372
373extern int qla2x00_get_data_rate(scsi_qla_host_t *);
343/* 374/*
344 * Global Function Prototypes in qla_sup.c source file. 375 * Global Function Prototypes in qla_sup.c source file.
345 */ 376 */
@@ -384,6 +415,7 @@ extern int qla2xxx_get_flash_info(scsi_qla_host_t *);
384extern int qla2xxx_get_vpd_field(scsi_qla_host_t *, char *, char *, size_t); 415extern int qla2xxx_get_vpd_field(scsi_qla_host_t *, char *, char *, size_t);
385 416
386extern void qla2xxx_flash_npiv_conf(scsi_qla_host_t *); 417extern void qla2xxx_flash_npiv_conf(scsi_qla_host_t *);
418extern int qla24xx_read_fcp_prio_cfg(scsi_qla_host_t *);
387 419
388/* 420/*
389 * Global Function Prototypes in qla_dbg.c source file. 421 * Global Function Prototypes in qla_dbg.c source file.
@@ -395,6 +427,7 @@ extern void qla25xx_fw_dump(scsi_qla_host_t *, int);
395extern void qla81xx_fw_dump(scsi_qla_host_t *, int); 427extern void qla81xx_fw_dump(scsi_qla_host_t *, int);
396extern void qla2x00_dump_regs(scsi_qla_host_t *); 428extern void qla2x00_dump_regs(scsi_qla_host_t *);
397extern void qla2x00_dump_buffer(uint8_t *, uint32_t); 429extern void qla2x00_dump_buffer(uint8_t *, uint32_t);
430extern void qla2x00_dump_buffer_zipped(uint8_t *, uint32_t);
398 431
399/* 432/*
400 * Global Function Prototypes in qla_gs.c source file. 433 * Global Function Prototypes in qla_gs.c source file.
@@ -430,7 +463,10 @@ extern void qla2x00_init_host_attr(scsi_qla_host_t *);
430extern void qla2x00_alloc_sysfs_attr(scsi_qla_host_t *); 463extern void qla2x00_alloc_sysfs_attr(scsi_qla_host_t *);
431extern void qla2x00_free_sysfs_attr(scsi_qla_host_t *); 464extern void qla2x00_free_sysfs_attr(scsi_qla_host_t *);
432extern int qla2x00_loopback_test(scsi_qla_host_t *, struct msg_echo_lb *, uint16_t *); 465extern int qla2x00_loopback_test(scsi_qla_host_t *, struct msg_echo_lb *, uint16_t *);
433extern int qla2x00_echo_test(scsi_qla_host_t *, struct msg_echo_lb *, uint16_t *); 466extern int qla2x00_echo_test(scsi_qla_host_t *,
467 struct msg_echo_lb *, uint16_t *);
468extern int qla24xx_update_all_fcp_prio(scsi_qla_host_t *);
469extern int qla24xx_fcp_prio_cfg_valid(struct qla_fcp_prio_cfg *, uint8_t);
434 470
435/* 471/*
436 * Global Function Prototypes in qla_dfs.c source file. 472 * Global Function Prototypes in qla_dfs.c source file.
@@ -459,4 +495,88 @@ extern void qla25xx_wrt_req_reg(struct qla_hw_data *, uint16_t, uint16_t);
459extern void qla25xx_wrt_rsp_reg(struct qla_hw_data *, uint16_t, uint16_t); 495extern void qla25xx_wrt_rsp_reg(struct qla_hw_data *, uint16_t, uint16_t);
460extern void qla24xx_wrt_rsp_reg(struct qla_hw_data *, uint16_t, uint16_t); 496extern void qla24xx_wrt_rsp_reg(struct qla_hw_data *, uint16_t, uint16_t);
461 497
498/* qla82xx related functions */
499
500/* PCI related functions */
501extern int qla82xx_pci_config(struct scsi_qla_host *);
502extern int qla82xx_pci_mem_read_2M(struct qla_hw_data *, u64, void *, int);
503extern int qla82xx_pci_mem_write_2M(struct qla_hw_data *, u64, void *, int);
504extern char *qla82xx_pci_info_str(struct scsi_qla_host *, char *);
505extern int qla82xx_pci_region_offset(struct pci_dev *, int);
506extern int qla82xx_pci_region_len(struct pci_dev *, int);
507extern int qla82xx_iospace_config(struct qla_hw_data *);
508
509/* Initialization related functions */
510extern void qla82xx_reset_chip(struct scsi_qla_host *);
511extern void qla82xx_config_rings(struct scsi_qla_host *);
512extern int qla82xx_nvram_config(struct scsi_qla_host *);
513extern int qla82xx_pinit_from_rom(scsi_qla_host_t *);
514extern int qla82xx_load_firmware(scsi_qla_host_t *);
515extern int qla82xx_reset_hw(scsi_qla_host_t *);
516extern int qla82xx_load_risc_blob(scsi_qla_host_t *, uint32_t *);
517extern void qla82xx_watchdog(scsi_qla_host_t *);
518
519/* Firmware and flash related functions */
520extern int qla82xx_load_risc(scsi_qla_host_t *, uint32_t *);
521extern uint8_t *qla82xx_read_optrom_data(struct scsi_qla_host *, uint8_t *,
522 uint32_t, uint32_t);
523extern int qla82xx_write_optrom_data(struct scsi_qla_host *, uint8_t *,
524 uint32_t, uint32_t);
525
526/* Mailbox related functions */
527extern int qla82xx_abort_isp(scsi_qla_host_t *);
528extern int qla82xx_restart_isp(scsi_qla_host_t *);
529
530/* IOCB related functions */
531extern int qla82xx_start_scsi(srb_t *);
532
533/* Interrupt related */
534extern irqreturn_t qla82xx_intr_handler(int, void *);
535extern irqreturn_t qla82xx_msi_handler(int, void *);
536extern irqreturn_t qla82xx_msix_default(int, void *);
537extern irqreturn_t qla82xx_msix_rsp_q(int, void *);
538extern void qla82xx_enable_intrs(struct qla_hw_data *);
539extern void qla82xx_disable_intrs(struct qla_hw_data *);
540extern void qla82xx_mbx_completion(scsi_qla_host_t *, uint16_t);
541extern void qla82xx_poll(int, void *);
542extern void qla82xx_init_flags(struct qla_hw_data *);
543
544/* ISP 8021 hardware related */
545extern int qla82xx_crb_win_lock(struct qla_hw_data *);
546extern void qla82xx_crb_win_unlock(struct qla_hw_data *);
547extern int qla82xx_pci_get_crb_addr_2M(struct qla_hw_data *, ulong *);
548extern int qla82xx_wr_32(struct qla_hw_data *, ulong, u32);
549extern int qla82xx_rd_32(struct qla_hw_data *, ulong);
550extern int qla82xx_rdmem(struct qla_hw_data *, u64, void *, int);
551extern int qla82xx_wrmem(struct qla_hw_data *, u64, void *, int);
552extern int qla82xx_check_for_bad_spd(struct qla_hw_data *);
553extern int qla82xx_load_fw(scsi_qla_host_t *);
554extern int qla82xx_rom_lock(struct qla_hw_data *);
555extern void qla82xx_rom_unlock(struct qla_hw_data *);
556extern int qla82xx_rom_fast_read(struct qla_hw_data *, int , int *);
557extern int qla82xx_do_rom_fast_read(struct qla_hw_data *, int, int *);
558extern unsigned long qla82xx_decode_crb_addr(unsigned long);
559
560/* ISP 8021 IDC */
561extern void qla82xx_clear_drv_active(struct qla_hw_data *);
562extern int qla82xx_idc_lock(struct qla_hw_data *);
563extern void qla82xx_idc_unlock(struct qla_hw_data *);
564extern int qla82xx_device_state_handler(scsi_qla_host_t *);
565
566extern void qla2x00_set_model_info(scsi_qla_host_t *, uint8_t *,
567 size_t, char *);
568extern int qla82xx_mbx_intr_enable(scsi_qla_host_t *);
569extern int qla82xx_mbx_intr_disable(scsi_qla_host_t *);
570extern void qla82xx_start_iocbs(srb_t *);
571extern int qla82xx_fcoe_ctx_reset(scsi_qla_host_t *);
572extern void qla82xx_wait_for_pending_commands(scsi_qla_host_t *);
573
574/* BSG related functions */
575extern int qla24xx_bsg_request(struct fc_bsg_job *);
576extern int qla24xx_bsg_timeout(struct fc_bsg_job *);
577extern int qla84xx_reset_chip(scsi_qla_host_t *, uint16_t);
578extern int qla2x00_issue_iocb_timeout(scsi_qla_host_t *, void *,
579 dma_addr_t, size_t, uint32_t);
580extern int qla2x00_get_idma_speed(scsi_qla_host_t *, uint16_t,
581 uint16_t *, uint16_t *);
462#endif /* _QLA_GBL_H */ 582#endif /* _QLA_GBL_H */