18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * QLogic iSCSI Offload Driver 48c2ecf20Sopenharmony_ci * Copyright (c) 2016 Cavium Inc. 58c2ecf20Sopenharmony_ci */ 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_ci#ifndef _QEDI_GBL_H_ 88c2ecf20Sopenharmony_ci#define _QEDI_GBL_H_ 98c2ecf20Sopenharmony_ci 108c2ecf20Sopenharmony_ci#include "qedi_iscsi.h" 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_ci#ifdef CONFIG_DEBUG_FS 138c2ecf20Sopenharmony_ciextern int qedi_do_not_recover; 148c2ecf20Sopenharmony_ci#else 158c2ecf20Sopenharmony_ci#define qedi_do_not_recover (0) 168c2ecf20Sopenharmony_ci#endif 178c2ecf20Sopenharmony_ci 188c2ecf20Sopenharmony_ciextern uint qedi_io_tracing; 198c2ecf20Sopenharmony_ci 208c2ecf20Sopenharmony_ciextern struct scsi_host_template qedi_host_template; 218c2ecf20Sopenharmony_ciextern struct iscsi_transport qedi_iscsi_transport; 228c2ecf20Sopenharmony_ciextern const struct qed_iscsi_ops *qedi_ops; 238c2ecf20Sopenharmony_ciextern const struct qedi_debugfs_ops qedi_debugfs_ops[]; 248c2ecf20Sopenharmony_ciextern const struct file_operations qedi_dbg_fops[]; 258c2ecf20Sopenharmony_ciextern struct device_attribute *qedi_shost_attrs[]; 268c2ecf20Sopenharmony_ci 278c2ecf20Sopenharmony_ciint qedi_alloc_sq(struct qedi_ctx *qedi, struct qedi_endpoint *ep); 288c2ecf20Sopenharmony_civoid qedi_free_sq(struct qedi_ctx *qedi, struct qedi_endpoint *ep); 298c2ecf20Sopenharmony_ci 308c2ecf20Sopenharmony_ciint qedi_send_iscsi_login(struct qedi_conn *qedi_conn, 318c2ecf20Sopenharmony_ci struct iscsi_task *task); 328c2ecf20Sopenharmony_ciint qedi_send_iscsi_logout(struct qedi_conn *qedi_conn, 338c2ecf20Sopenharmony_ci struct iscsi_task *task); 348c2ecf20Sopenharmony_ciint qedi_iscsi_abort_work(struct qedi_conn *qedi_conn, 358c2ecf20Sopenharmony_ci struct iscsi_task *mtask); 368c2ecf20Sopenharmony_ciint qedi_send_iscsi_text(struct qedi_conn *qedi_conn, 378c2ecf20Sopenharmony_ci struct iscsi_task *task); 388c2ecf20Sopenharmony_ciint qedi_send_iscsi_nopout(struct qedi_conn *qedi_conn, 398c2ecf20Sopenharmony_ci struct iscsi_task *task, 408c2ecf20Sopenharmony_ci char *datap, int data_len, int unsol); 418c2ecf20Sopenharmony_ciint qedi_iscsi_send_ioreq(struct iscsi_task *task); 428c2ecf20Sopenharmony_ciint qedi_get_task_idx(struct qedi_ctx *qedi); 438c2ecf20Sopenharmony_civoid qedi_clear_task_idx(struct qedi_ctx *qedi, int idx); 448c2ecf20Sopenharmony_ciint qedi_iscsi_cleanup_task(struct iscsi_task *task, 458c2ecf20Sopenharmony_ci bool mark_cmd_node_deleted); 468c2ecf20Sopenharmony_civoid qedi_iscsi_unmap_sg_list(struct qedi_cmd *cmd); 478c2ecf20Sopenharmony_civoid qedi_update_itt_map(struct qedi_ctx *qedi, u32 tid, u32 proto_itt, 488c2ecf20Sopenharmony_ci struct qedi_cmd *qedi_cmd); 498c2ecf20Sopenharmony_civoid qedi_get_proto_itt(struct qedi_ctx *qedi, u32 tid, u32 *proto_itt); 508c2ecf20Sopenharmony_civoid qedi_get_task_tid(struct qedi_ctx *qedi, u32 itt, int16_t *tid); 518c2ecf20Sopenharmony_civoid qedi_process_iscsi_error(struct qedi_endpoint *ep, 528c2ecf20Sopenharmony_ci struct iscsi_eqe_data *data); 538c2ecf20Sopenharmony_civoid qedi_start_conn_recovery(struct qedi_ctx *qedi, 548c2ecf20Sopenharmony_ci struct qedi_conn *qedi_conn); 558c2ecf20Sopenharmony_cistruct qedi_conn *qedi_get_conn_from_id(struct qedi_ctx *qedi, u32 iscsi_cid); 568c2ecf20Sopenharmony_civoid qedi_process_tcp_error(struct qedi_endpoint *ep, 578c2ecf20Sopenharmony_ci struct iscsi_eqe_data *data); 588c2ecf20Sopenharmony_civoid qedi_mark_device_missing(struct iscsi_cls_session *cls_session); 598c2ecf20Sopenharmony_civoid qedi_mark_device_available(struct iscsi_cls_session *cls_session); 608c2ecf20Sopenharmony_civoid qedi_reset_host_mtu(struct qedi_ctx *qedi, u16 mtu); 618c2ecf20Sopenharmony_ciint qedi_recover_all_conns(struct qedi_ctx *qedi); 628c2ecf20Sopenharmony_civoid qedi_fp_process_cqes(struct qedi_work *work); 638c2ecf20Sopenharmony_ciint qedi_cleanup_all_io(struct qedi_ctx *qedi, 648c2ecf20Sopenharmony_ci struct qedi_conn *qedi_conn, 658c2ecf20Sopenharmony_ci struct iscsi_task *task, bool in_recovery); 668c2ecf20Sopenharmony_civoid qedi_trace_io(struct qedi_ctx *qedi, struct iscsi_task *task, 678c2ecf20Sopenharmony_ci u16 tid, int8_t direction); 688c2ecf20Sopenharmony_ciint qedi_alloc_id(struct qedi_portid_tbl *id_tbl, u16 id); 698c2ecf20Sopenharmony_ciu16 qedi_alloc_new_id(struct qedi_portid_tbl *id_tbl); 708c2ecf20Sopenharmony_civoid qedi_free_id(struct qedi_portid_tbl *id_tbl, u16 id); 718c2ecf20Sopenharmony_ciint qedi_create_sysfs_ctx_attr(struct qedi_ctx *qedi); 728c2ecf20Sopenharmony_civoid qedi_remove_sysfs_ctx_attr(struct qedi_ctx *qedi); 738c2ecf20Sopenharmony_civoid qedi_clearsq(struct qedi_ctx *qedi, 748c2ecf20Sopenharmony_ci struct qedi_conn *qedi_conn, 758c2ecf20Sopenharmony_ci struct iscsi_task *task); 768c2ecf20Sopenharmony_civoid qedi_clear_session_ctx(struct iscsi_cls_session *cls_sess); 778c2ecf20Sopenharmony_ci 788c2ecf20Sopenharmony_ci#endif 79