]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blob - drivers/scsi/be2iscsi/be_iscsi.h
UBUNTU: Ubuntu-4.13.0-45.50
[mirror_ubuntu-artful-kernel.git] / drivers / scsi / be2iscsi / be_iscsi.h
1 /*
2 * Copyright 2017 Broadcom. All Rights Reserved.
3 * The term "Broadcom" refers to Broadcom Limited and/or its subsidiaries.
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License version 2
7 * as published by the Free Software Foundation. The full GNU General
8 * Public License is included in this distribution in the file called COPYING.
9 *
10 * Contact Information:
11 * linux-drivers@broadcom.com
12 *
13 */
14
15 #ifndef _BE_ISCSI_
16 #define _BE_ISCSI_
17
18 #include "be_main.h"
19 #include "be_mgmt.h"
20
21 void beiscsi_iface_create_default(struct beiscsi_hba *phba);
22
23 void beiscsi_iface_destroy_default(struct beiscsi_hba *phba);
24
25 int beiscsi_iface_get_param(struct iscsi_iface *iface,
26 enum iscsi_param_type param_type,
27 int param, char *buf);
28
29 int beiscsi_iface_set_param(struct Scsi_Host *shost,
30 void *data, uint32_t count);
31
32 umode_t beiscsi_attr_is_visible(int param_type, int param);
33
34 void beiscsi_offload_connection(struct beiscsi_conn *beiscsi_conn,
35 struct beiscsi_offload_params *params);
36
37 void beiscsi_offload_iscsi(struct beiscsi_hba *phba, struct iscsi_conn *conn,
38 struct beiscsi_conn *beiscsi_conn,
39 unsigned int fw_handle);
40
41 struct iscsi_cls_session *beiscsi_session_create(struct iscsi_endpoint *ep,
42 uint16_t cmds_max,
43 uint16_t qdepth,
44 uint32_t initial_cmdsn);
45
46 void beiscsi_session_destroy(struct iscsi_cls_session *cls_session);
47
48 void beiscsi_session_fail(struct iscsi_cls_session *cls_session);
49
50 struct iscsi_cls_conn *beiscsi_conn_create(struct iscsi_cls_session
51 *cls_session, uint32_t cid);
52
53 int beiscsi_conn_bind(struct iscsi_cls_session *cls_session,
54 struct iscsi_cls_conn *cls_conn,
55 uint64_t transport_fd, int is_leading);
56
57 int beiscsi_ep_get_param(struct iscsi_endpoint *ep, enum iscsi_param param,
58 char *buf);
59
60 int beiscsi_get_host_param(struct Scsi_Host *shost,
61 enum iscsi_host_param param, char *buf);
62
63 int beiscsi_get_macaddr(char *buf, struct beiscsi_hba *phba);
64
65 int beiscsi_set_param(struct iscsi_cls_conn *cls_conn,
66 enum iscsi_param param, char *buf, int buflen);
67
68 int beiscsi_conn_start(struct iscsi_cls_conn *cls_conn);
69
70 struct iscsi_endpoint *beiscsi_ep_connect(struct Scsi_Host *shost,
71 struct sockaddr *dst_addr,
72 int non_blocking);
73
74 int beiscsi_ep_poll(struct iscsi_endpoint *ep, int timeout_ms);
75
76 void beiscsi_ep_disconnect(struct iscsi_endpoint *ep);
77
78 void beiscsi_conn_get_stats(struct iscsi_cls_conn *cls_conn,
79 struct iscsi_stats *stats);
80
81 #endif