blob: e4d67dfea4cbd6666f09d1231546b16e43ccb848 [file] [log] [blame]
Jayamohan Kallickal6733b392009-09-05 07:36:35 +05301/**
Jitendra Bhivare60f36e02016-08-19 15:20:24 +05302 * Copyright (C) 2005 - 2016 Broadcom
Jayamohan Kallickal6733b392009-09-05 07:36:35 +05303 * All rights reserved.
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 *
Jitendra Bhivare60f36e02016-08-19 15:20:24 +053010 * Written by: Jayamohan Kallickal (jayamohan.kallickal@broadcom.com)
Jayamohan Kallickal6733b392009-09-05 07:36:35 +053011 *
12 * Contact Information:
Jitendra Bhivare60f36e02016-08-19 15:20:24 +053013 * linux-drivers@broadcom.com
Jayamohan Kallickal6733b392009-09-05 07:36:35 +053014 *
Minh Tran4627de92015-05-14 23:16:17 -070015 * Avago Technologies
Jayamohan Kallickal255fa9a2011-03-25 14:23:57 -070016 * 3333 Susan Street
17 * Costa Mesa, CA 92626
Jayamohan Kallickal6733b392009-09-05 07:36:35 +053018 */
19
20#ifndef _BE_ISCSI_
21#define _BE_ISCSI_
22
23#include "be_main.h"
24#include "be_mgmt.h"
25
Jitendra Bhivare96b48b92016-08-19 15:20:06 +053026void beiscsi_iface_create_default(struct beiscsi_hba *phba);
Mike Christie0e438952012-04-03 23:41:51 -050027
Jitendra Bhivare96b48b92016-08-19 15:20:06 +053028void beiscsi_iface_destroy_default(struct beiscsi_hba *phba);
Mike Christie0e438952012-04-03 23:41:51 -050029
Jitendra Bhivare96b48b92016-08-19 15:20:06 +053030int beiscsi_iface_get_param(struct iscsi_iface *iface,
Mike Christie0e438952012-04-03 23:41:51 -050031 enum iscsi_param_type param_type,
32 int param, char *buf);
33
Jitendra Bhivare96b48b92016-08-19 15:20:06 +053034int beiscsi_iface_set_param(struct Scsi_Host *shost,
Mike Christie0e438952012-04-03 23:41:51 -050035 void *data, uint32_t count);
Jayamohan Kallickal6733b392009-09-05 07:36:35 +053036
Jitendra Bhivare96b48b92016-08-19 15:20:06 +053037umode_t beiscsi_attr_is_visible(int param_type, int param);
Mike Christie3128c6c2011-07-25 13:48:42 -050038
Jayamohan Kallickal6733b392009-09-05 07:36:35 +053039void beiscsi_offload_connection(struct beiscsi_conn *beiscsi_conn,
40 struct beiscsi_offload_params *params);
41
42void beiscsi_offload_iscsi(struct beiscsi_hba *phba, struct iscsi_conn *conn,
43 struct beiscsi_conn *beiscsi_conn,
44 unsigned int fw_handle);
45
46struct iscsi_cls_session *beiscsi_session_create(struct iscsi_endpoint *ep,
47 uint16_t cmds_max,
48 uint16_t qdepth,
49 uint32_t initial_cmdsn);
50
51void beiscsi_session_destroy(struct iscsi_cls_session *cls_session);
52
Jitendra Bhivare480195c2016-08-19 15:20:15 +053053void beiscsi_session_fail(struct iscsi_cls_session *cls_session);
54
Jayamohan Kallickal6733b392009-09-05 07:36:35 +053055struct iscsi_cls_conn *beiscsi_conn_create(struct iscsi_cls_session
56 *cls_session, uint32_t cid);
57
58int beiscsi_conn_bind(struct iscsi_cls_session *cls_session,
59 struct iscsi_cls_conn *cls_conn,
60 uint64_t transport_fd, int is_leading);
61
Mike Christiec7f7fd52011-02-16 15:04:41 -060062int beiscsi_ep_get_param(struct iscsi_endpoint *ep, enum iscsi_param param,
63 char *buf);
Jayamohan Kallickal6733b392009-09-05 07:36:35 +053064
65int beiscsi_get_host_param(struct Scsi_Host *shost,
66 enum iscsi_host_param param, char *buf);
67
Jayamohan Kallickalc7acc5b2010-07-22 04:29:18 +053068int beiscsi_get_macaddr(char *buf, struct beiscsi_hba *phba);
69
Jayamohan Kallickal6733b392009-09-05 07:36:35 +053070int beiscsi_set_param(struct iscsi_cls_conn *cls_conn,
71 enum iscsi_param param, char *buf, int buflen);
72
73int beiscsi_conn_start(struct iscsi_cls_conn *cls_conn);
74
Jayamohan Kallickal6733b392009-09-05 07:36:35 +053075struct iscsi_endpoint *beiscsi_ep_connect(struct Scsi_Host *shost,
76 struct sockaddr *dst_addr,
77 int non_blocking);
78
79int beiscsi_ep_poll(struct iscsi_endpoint *ep, int timeout_ms);
80
81void beiscsi_ep_disconnect(struct iscsi_endpoint *ep);
82
83void beiscsi_conn_get_stats(struct iscsi_cls_conn *cls_conn,
84 struct iscsi_stats *stats);
85
86#endif