Thomas Gleixner | 6e9ef50 | 2019-05-29 16:57:52 -0700 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Jitendra Bhivare | 942b765 | 2017-03-24 14:11:48 +0530 | [diff] [blame] | 2 | /* |
Jitendra Bhivare | 0172dc6 | 2017-10-10 16:18:19 +0530 | [diff] [blame] | 3 | * Copyright 2017 Broadcom. All Rights Reserved. |
Jitendra Bhivare | 942b765 | 2017-03-24 14:11:48 +0530 | [diff] [blame] | 4 | * The term "Broadcom" refers to Broadcom Limited and/or its subsidiaries. |
Jayamohan Kallickal | 6733b39 | 2009-09-05 07:36:35 +0530 | [diff] [blame] | 5 | * |
Jayamohan Kallickal | 6733b39 | 2009-09-05 07:36:35 +0530 | [diff] [blame] | 6 | * Contact Information: |
Jitendra Bhivare | 60f36e0 | 2016-08-19 15:20:24 +0530 | [diff] [blame] | 7 | * linux-drivers@broadcom.com |
Jayamohan Kallickal | 6733b39 | 2009-09-05 07:36:35 +0530 | [diff] [blame] | 8 | */ |
| 9 | |
| 10 | #ifndef _BE_ISCSI_ |
| 11 | #define _BE_ISCSI_ |
| 12 | |
| 13 | #include "be_main.h" |
| 14 | #include "be_mgmt.h" |
| 15 | |
Jitendra Bhivare | 96b48b9 | 2016-08-19 15:20:06 +0530 | [diff] [blame] | 16 | void beiscsi_iface_create_default(struct beiscsi_hba *phba); |
Mike Christie | 0e43895 | 2012-04-03 23:41:51 -0500 | [diff] [blame] | 17 | |
Jitendra Bhivare | 96b48b9 | 2016-08-19 15:20:06 +0530 | [diff] [blame] | 18 | void beiscsi_iface_destroy_default(struct beiscsi_hba *phba); |
Mike Christie | 0e43895 | 2012-04-03 23:41:51 -0500 | [diff] [blame] | 19 | |
Jitendra Bhivare | 96b48b9 | 2016-08-19 15:20:06 +0530 | [diff] [blame] | 20 | int beiscsi_iface_get_param(struct iscsi_iface *iface, |
Mike Christie | 0e43895 | 2012-04-03 23:41:51 -0500 | [diff] [blame] | 21 | enum iscsi_param_type param_type, |
| 22 | int param, char *buf); |
| 23 | |
Jitendra Bhivare | 96b48b9 | 2016-08-19 15:20:06 +0530 | [diff] [blame] | 24 | int beiscsi_iface_set_param(struct Scsi_Host *shost, |
Mike Christie | 0e43895 | 2012-04-03 23:41:51 -0500 | [diff] [blame] | 25 | void *data, uint32_t count); |
Jayamohan Kallickal | 6733b39 | 2009-09-05 07:36:35 +0530 | [diff] [blame] | 26 | |
Jitendra Bhivare | 96b48b9 | 2016-08-19 15:20:06 +0530 | [diff] [blame] | 27 | umode_t beiscsi_attr_is_visible(int param_type, int param); |
Mike Christie | 3128c6c | 2011-07-25 13:48:42 -0500 | [diff] [blame] | 28 | |
Jayamohan Kallickal | 6733b39 | 2009-09-05 07:36:35 +0530 | [diff] [blame] | 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 | |
Jitendra Bhivare | 480195c | 2016-08-19 15:20:15 +0530 | [diff] [blame] | 43 | void beiscsi_session_fail(struct iscsi_cls_session *cls_session); |
| 44 | |
Jayamohan Kallickal | 6733b39 | 2009-09-05 07:36:35 +0530 | [diff] [blame] | 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 | |
Mike Christie | c7f7fd5 | 2011-02-16 15:04:41 -0600 | [diff] [blame] | 52 | int beiscsi_ep_get_param(struct iscsi_endpoint *ep, enum iscsi_param param, |
| 53 | char *buf); |
Jayamohan Kallickal | 6733b39 | 2009-09-05 07:36:35 +0530 | [diff] [blame] | 54 | |
| 55 | int beiscsi_get_host_param(struct Scsi_Host *shost, |
| 56 | enum iscsi_host_param param, char *buf); |
| 57 | |
Jayamohan Kallickal | c7acc5b | 2010-07-22 04:29:18 +0530 | [diff] [blame] | 58 | int beiscsi_get_macaddr(char *buf, struct beiscsi_hba *phba); |
| 59 | |
Jayamohan Kallickal | 6733b39 | 2009-09-05 07:36:35 +0530 | [diff] [blame] | 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 | |
Jayamohan Kallickal | 6733b39 | 2009-09-05 07:36:35 +0530 | [diff] [blame] | 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 |