2019-05-30 07:57:52 +08:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
2017-03-24 16:41:48 +08:00
|
|
|
/*
|
2017-10-10 18:48:19 +08:00
|
|
|
* Copyright 2017 Broadcom. All Rights Reserved.
|
2017-03-24 16:41:48 +08:00
|
|
|
* The term "Broadcom" refers to Broadcom Limited and/or its subsidiaries.
|
2009-09-05 10:06:35 +08:00
|
|
|
*
|
|
|
|
* Contact Information:
|
2016-08-19 17:50:24 +08:00
|
|
|
* linux-drivers@broadcom.com
|
2009-09-05 10:06:35 +08:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _BE_ISCSI_
|
|
|
|
#define _BE_ISCSI_
|
|
|
|
|
|
|
|
#include "be_main.h"
|
|
|
|
#include "be_mgmt.h"
|
|
|
|
|
2016-08-19 17:50:06 +08:00
|
|
|
void beiscsi_iface_create_default(struct beiscsi_hba *phba);
|
2012-04-04 12:41:51 +08:00
|
|
|
|
2016-08-19 17:50:06 +08:00
|
|
|
void beiscsi_iface_destroy_default(struct beiscsi_hba *phba);
|
2012-04-04 12:41:51 +08:00
|
|
|
|
2016-08-19 17:50:06 +08:00
|
|
|
int beiscsi_iface_get_param(struct iscsi_iface *iface,
|
2012-04-04 12:41:51 +08:00
|
|
|
enum iscsi_param_type param_type,
|
|
|
|
int param, char *buf);
|
|
|
|
|
2016-08-19 17:50:06 +08:00
|
|
|
int beiscsi_iface_set_param(struct Scsi_Host *shost,
|
2012-04-04 12:41:51 +08:00
|
|
|
void *data, uint32_t count);
|
2009-09-05 10:06:35 +08:00
|
|
|
|
2016-08-19 17:50:06 +08:00
|
|
|
umode_t beiscsi_attr_is_visible(int param_type, int param);
|
2011-07-26 02:48:42 +08:00
|
|
|
|
2009-09-05 10:06:35 +08:00
|
|
|
void beiscsi_offload_connection(struct beiscsi_conn *beiscsi_conn,
|
|
|
|
struct beiscsi_offload_params *params);
|
|
|
|
|
|
|
|
void beiscsi_offload_iscsi(struct beiscsi_hba *phba, struct iscsi_conn *conn,
|
|
|
|
struct beiscsi_conn *beiscsi_conn,
|
|
|
|
unsigned int fw_handle);
|
|
|
|
|
|
|
|
struct iscsi_cls_session *beiscsi_session_create(struct iscsi_endpoint *ep,
|
|
|
|
uint16_t cmds_max,
|
|
|
|
uint16_t qdepth,
|
|
|
|
uint32_t initial_cmdsn);
|
|
|
|
|
|
|
|
void beiscsi_session_destroy(struct iscsi_cls_session *cls_session);
|
|
|
|
|
2016-08-19 17:50:15 +08:00
|
|
|
void beiscsi_session_fail(struct iscsi_cls_session *cls_session);
|
|
|
|
|
2009-09-05 10:06:35 +08:00
|
|
|
struct iscsi_cls_conn *beiscsi_conn_create(struct iscsi_cls_session
|
|
|
|
*cls_session, uint32_t cid);
|
|
|
|
|
|
|
|
int beiscsi_conn_bind(struct iscsi_cls_session *cls_session,
|
|
|
|
struct iscsi_cls_conn *cls_conn,
|
|
|
|
uint64_t transport_fd, int is_leading);
|
|
|
|
|
2011-02-17 05:04:41 +08:00
|
|
|
int beiscsi_ep_get_param(struct iscsi_endpoint *ep, enum iscsi_param param,
|
|
|
|
char *buf);
|
2009-09-05 10:06:35 +08:00
|
|
|
|
|
|
|
int beiscsi_get_host_param(struct Scsi_Host *shost,
|
|
|
|
enum iscsi_host_param param, char *buf);
|
|
|
|
|
2010-07-22 06:59:18 +08:00
|
|
|
int beiscsi_get_macaddr(char *buf, struct beiscsi_hba *phba);
|
|
|
|
|
2009-09-05 10:06:35 +08:00
|
|
|
int beiscsi_set_param(struct iscsi_cls_conn *cls_conn,
|
|
|
|
enum iscsi_param param, char *buf, int buflen);
|
|
|
|
|
|
|
|
int beiscsi_conn_start(struct iscsi_cls_conn *cls_conn);
|
|
|
|
|
|
|
|
struct iscsi_endpoint *beiscsi_ep_connect(struct Scsi_Host *shost,
|
|
|
|
struct sockaddr *dst_addr,
|
|
|
|
int non_blocking);
|
|
|
|
|
|
|
|
int beiscsi_ep_poll(struct iscsi_endpoint *ep, int timeout_ms);
|
|
|
|
|
|
|
|
void beiscsi_ep_disconnect(struct iscsi_endpoint *ep);
|
|
|
|
|
|
|
|
void beiscsi_conn_get_stats(struct iscsi_cls_conn *cls_conn,
|
|
|
|
struct iscsi_stats *stats);
|
|
|
|
|
|
|
|
#endif
|