linux/drivers/scsi/be2iscsi/be_iscsi.h
<<
>>
Prefs
   1/* SPDX-License-Identifier: GPL-2.0-only */
   2/*
   3 * Copyright 2017 Broadcom. All Rights Reserved.
   4 * The term "Broadcom" refers to Broadcom Limited and/or its subsidiaries.
   5 *
   6 * Contact Information:
   7 * linux-drivers@broadcom.com
   8 */
   9
  10#ifndef _BE_ISCSI_
  11#define _BE_ISCSI_
  12
  13#include "be_main.h"
  14#include "be_mgmt.h"
  15
  16void beiscsi_iface_create_default(struct beiscsi_hba *phba);
  17
  18void beiscsi_iface_destroy_default(struct beiscsi_hba *phba);
  19
  20int beiscsi_iface_get_param(struct iscsi_iface *iface,
  21                             enum iscsi_param_type param_type,
  22                             int param, char *buf);
  23
  24int beiscsi_iface_set_param(struct Scsi_Host *shost,
  25                             void *data, uint32_t count);
  26
  27umode_t beiscsi_attr_is_visible(int param_type, int param);
  28
  29void beiscsi_offload_connection(struct beiscsi_conn *beiscsi_conn,
  30                                struct beiscsi_offload_params *params);
  31
  32void beiscsi_offload_iscsi(struct beiscsi_hba *phba, struct iscsi_conn *conn,
  33                           struct beiscsi_conn *beiscsi_conn,
  34                           unsigned int fw_handle);
  35
  36struct iscsi_cls_session *beiscsi_session_create(struct iscsi_endpoint *ep,
  37                                                 uint16_t cmds_max,
  38                                                 uint16_t qdepth,
  39                                                 uint32_t initial_cmdsn);
  40
  41void beiscsi_session_destroy(struct iscsi_cls_session *cls_session);
  42
  43void beiscsi_session_fail(struct iscsi_cls_session *cls_session);
  44
  45struct iscsi_cls_conn *beiscsi_conn_create(struct iscsi_cls_session
  46                                           *cls_session, uint32_t cid);
  47
  48int beiscsi_conn_bind(struct iscsi_cls_session *cls_session,
  49                      struct iscsi_cls_conn *cls_conn,
  50                      uint64_t transport_fd, int is_leading);
  51
  52int beiscsi_ep_get_param(struct iscsi_endpoint *ep, enum iscsi_param param,
  53                         char *buf);
  54
  55int beiscsi_get_host_param(struct Scsi_Host *shost,
  56                           enum iscsi_host_param param, char *buf);
  57
  58int beiscsi_get_macaddr(char *buf, struct beiscsi_hba *phba);
  59
  60int beiscsi_set_param(struct iscsi_cls_conn *cls_conn,
  61                      enum iscsi_param param, char *buf, int buflen);
  62
  63int beiscsi_conn_start(struct iscsi_cls_conn *cls_conn);
  64
  65struct iscsi_endpoint *beiscsi_ep_connect(struct Scsi_Host *shost,
  66                                          struct sockaddr *dst_addr,
  67                                          int non_blocking);
  68
  69int beiscsi_ep_poll(struct iscsi_endpoint *ep, int timeout_ms);
  70
  71void beiscsi_ep_disconnect(struct iscsi_endpoint *ep);
  72
  73void beiscsi_conn_get_stats(struct iscsi_cls_conn *cls_conn,
  74                            struct iscsi_stats *stats);
  75
  76#endif
  77