• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
16 void beiscsi_iface_create_default(struct beiscsi_hba *phba);
17 
18 void beiscsi_iface_destroy_default(struct beiscsi_hba *phba);
19 
20 int beiscsi_iface_get_param(struct iscsi_iface *iface,
21 			     enum iscsi_param_type param_type,
22 			     int param, char *buf);
23 
24 int beiscsi_iface_set_param(struct Scsi_Host *shost,
25 			     void *data, uint32_t count);
26 
27 umode_t beiscsi_attr_is_visible(int param_type, int param);
28 
29 void beiscsi_offload_connection(struct beiscsi_conn *beiscsi_conn,
30 				struct beiscsi_offload_params *params);
31 
32 void beiscsi_offload_iscsi(struct beiscsi_hba *phba, struct iscsi_conn *conn,
33 			   struct beiscsi_conn *beiscsi_conn,
34 			   unsigned int fw_handle);
35 
36 struct 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 
41 void beiscsi_session_destroy(struct iscsi_cls_session *cls_session);
42 
43 void beiscsi_session_fail(struct iscsi_cls_session *cls_session);
44 
45 struct iscsi_cls_conn *beiscsi_conn_create(struct iscsi_cls_session
46 					   *cls_session, uint32_t cid);
47 
48 int 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 
52 int beiscsi_ep_get_param(struct iscsi_endpoint *ep, enum iscsi_param param,
53 			 char *buf);
54 
55 int beiscsi_get_host_param(struct Scsi_Host *shost,
56 			   enum iscsi_host_param param, char *buf);
57 
58 int beiscsi_get_macaddr(char *buf, struct beiscsi_hba *phba);
59 
60 int beiscsi_set_param(struct iscsi_cls_conn *cls_conn,
61 		      enum iscsi_param param, char *buf, int buflen);
62 
63 int beiscsi_conn_start(struct iscsi_cls_conn *cls_conn);
64 
65 struct iscsi_endpoint *beiscsi_ep_connect(struct Scsi_Host *shost,
66 					  struct sockaddr *dst_addr,
67 					  int non_blocking);
68 
69 int beiscsi_ep_poll(struct iscsi_endpoint *ep, int timeout_ms);
70 
71 void beiscsi_ep_disconnect(struct iscsi_endpoint *ep);
72 
73 void beiscsi_conn_get_stats(struct iscsi_cls_conn *cls_conn,
74 			    struct iscsi_stats *stats);
75 
76 #endif
77