18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci * Copyright 2017 Broadcom. All Rights Reserved.
48c2ecf20Sopenharmony_ci * The term "Broadcom" refers to Broadcom Limited and/or its subsidiaries.
58c2ecf20Sopenharmony_ci *
68c2ecf20Sopenharmony_ci * Contact Information:
78c2ecf20Sopenharmony_ci * linux-drivers@broadcom.com
88c2ecf20Sopenharmony_ci */
98c2ecf20Sopenharmony_ci
108c2ecf20Sopenharmony_ci#ifndef _BE_ISCSI_
118c2ecf20Sopenharmony_ci#define _BE_ISCSI_
128c2ecf20Sopenharmony_ci
138c2ecf20Sopenharmony_ci#include "be_main.h"
148c2ecf20Sopenharmony_ci#include "be_mgmt.h"
158c2ecf20Sopenharmony_ci
168c2ecf20Sopenharmony_civoid beiscsi_iface_create_default(struct beiscsi_hba *phba);
178c2ecf20Sopenharmony_ci
188c2ecf20Sopenharmony_civoid beiscsi_iface_destroy_default(struct beiscsi_hba *phba);
198c2ecf20Sopenharmony_ci
208c2ecf20Sopenharmony_ciint beiscsi_iface_get_param(struct iscsi_iface *iface,
218c2ecf20Sopenharmony_ci			     enum iscsi_param_type param_type,
228c2ecf20Sopenharmony_ci			     int param, char *buf);
238c2ecf20Sopenharmony_ci
248c2ecf20Sopenharmony_ciint beiscsi_iface_set_param(struct Scsi_Host *shost,
258c2ecf20Sopenharmony_ci			     void *data, uint32_t count);
268c2ecf20Sopenharmony_ci
278c2ecf20Sopenharmony_ciumode_t beiscsi_attr_is_visible(int param_type, int param);
288c2ecf20Sopenharmony_ci
298c2ecf20Sopenharmony_civoid beiscsi_offload_connection(struct beiscsi_conn *beiscsi_conn,
308c2ecf20Sopenharmony_ci				struct beiscsi_offload_params *params);
318c2ecf20Sopenharmony_ci
328c2ecf20Sopenharmony_civoid beiscsi_offload_iscsi(struct beiscsi_hba *phba, struct iscsi_conn *conn,
338c2ecf20Sopenharmony_ci			   struct beiscsi_conn *beiscsi_conn,
348c2ecf20Sopenharmony_ci			   unsigned int fw_handle);
358c2ecf20Sopenharmony_ci
368c2ecf20Sopenharmony_cistruct iscsi_cls_session *beiscsi_session_create(struct iscsi_endpoint *ep,
378c2ecf20Sopenharmony_ci						 uint16_t cmds_max,
388c2ecf20Sopenharmony_ci						 uint16_t qdepth,
398c2ecf20Sopenharmony_ci						 uint32_t initial_cmdsn);
408c2ecf20Sopenharmony_ci
418c2ecf20Sopenharmony_civoid beiscsi_session_destroy(struct iscsi_cls_session *cls_session);
428c2ecf20Sopenharmony_ci
438c2ecf20Sopenharmony_civoid beiscsi_session_fail(struct iscsi_cls_session *cls_session);
448c2ecf20Sopenharmony_ci
458c2ecf20Sopenharmony_cistruct iscsi_cls_conn *beiscsi_conn_create(struct iscsi_cls_session
468c2ecf20Sopenharmony_ci					   *cls_session, uint32_t cid);
478c2ecf20Sopenharmony_ci
488c2ecf20Sopenharmony_ciint beiscsi_conn_bind(struct iscsi_cls_session *cls_session,
498c2ecf20Sopenharmony_ci		      struct iscsi_cls_conn *cls_conn,
508c2ecf20Sopenharmony_ci		      uint64_t transport_fd, int is_leading);
518c2ecf20Sopenharmony_ci
528c2ecf20Sopenharmony_ciint beiscsi_ep_get_param(struct iscsi_endpoint *ep, enum iscsi_param param,
538c2ecf20Sopenharmony_ci			 char *buf);
548c2ecf20Sopenharmony_ci
558c2ecf20Sopenharmony_ciint beiscsi_get_host_param(struct Scsi_Host *shost,
568c2ecf20Sopenharmony_ci			   enum iscsi_host_param param, char *buf);
578c2ecf20Sopenharmony_ci
588c2ecf20Sopenharmony_ciint beiscsi_get_macaddr(char *buf, struct beiscsi_hba *phba);
598c2ecf20Sopenharmony_ci
608c2ecf20Sopenharmony_ciint beiscsi_set_param(struct iscsi_cls_conn *cls_conn,
618c2ecf20Sopenharmony_ci		      enum iscsi_param param, char *buf, int buflen);
628c2ecf20Sopenharmony_ci
638c2ecf20Sopenharmony_ciint beiscsi_conn_start(struct iscsi_cls_conn *cls_conn);
648c2ecf20Sopenharmony_ci
658c2ecf20Sopenharmony_cistruct iscsi_endpoint *beiscsi_ep_connect(struct Scsi_Host *shost,
668c2ecf20Sopenharmony_ci					  struct sockaddr *dst_addr,
678c2ecf20Sopenharmony_ci					  int non_blocking);
688c2ecf20Sopenharmony_ci
698c2ecf20Sopenharmony_ciint beiscsi_ep_poll(struct iscsi_endpoint *ep, int timeout_ms);
708c2ecf20Sopenharmony_ci
718c2ecf20Sopenharmony_civoid beiscsi_ep_disconnect(struct iscsi_endpoint *ep);
728c2ecf20Sopenharmony_ci
738c2ecf20Sopenharmony_civoid beiscsi_conn_get_stats(struct iscsi_cls_conn *cls_conn,
748c2ecf20Sopenharmony_ci			    struct iscsi_stats *stats);
758c2ecf20Sopenharmony_ci
768c2ecf20Sopenharmony_ci#endif
77