Jayamohan Kallickal | 6733b39 | 2009-09-05 07:36:35 +0530 | [diff] [blame] | 1 | /** |
Jitendra Bhivare | 60f36e0 | 2016-08-19 15:20:24 +0530 | [diff] [blame] | 2 | * Copyright (C) 2005 - 2016 Broadcom |
Jayamohan Kallickal | 6733b39 | 2009-09-05 07:36:35 +0530 | [diff] [blame] | 3 | * 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 Bhivare | 60f36e0 | 2016-08-19 15:20:24 +0530 | [diff] [blame] | 10 | * Written by: Jayamohan Kallickal (jayamohan.kallickal@broadcom.com) |
Jayamohan Kallickal | 6733b39 | 2009-09-05 07:36:35 +0530 | [diff] [blame] | 11 | * |
| 12 | * Contact Information: |
Jitendra Bhivare | 60f36e0 | 2016-08-19 15:20:24 +0530 | [diff] [blame] | 13 | * linux-drivers@broadcom.com |
Jayamohan Kallickal | 6733b39 | 2009-09-05 07:36:35 +0530 | [diff] [blame] | 14 | * |
Minh Tran | 4627de9 | 2015-05-14 23:16:17 -0700 | [diff] [blame] | 15 | * Avago Technologies |
Jayamohan Kallickal | 255fa9a | 2011-03-25 14:23:57 -0700 | [diff] [blame] | 16 | * 3333 Susan Street |
| 17 | * Costa Mesa, CA 92626 |
Jayamohan Kallickal | 6733b39 | 2009-09-05 07:36:35 +0530 | [diff] [blame] | 18 | */ |
| 19 | |
| 20 | #ifndef _BE_ISCSI_ |
| 21 | #define _BE_ISCSI_ |
| 22 | |
| 23 | #include "be_main.h" |
| 24 | #include "be_mgmt.h" |
| 25 | |
Jitendra Bhivare | 96b48b9 | 2016-08-19 15:20:06 +0530 | [diff] [blame] | 26 | void beiscsi_iface_create_default(struct beiscsi_hba *phba); |
Mike Christie | 0e43895 | 2012-04-03 23:41:51 -0500 | [diff] [blame] | 27 | |
Jitendra Bhivare | 96b48b9 | 2016-08-19 15:20:06 +0530 | [diff] [blame] | 28 | void beiscsi_iface_destroy_default(struct beiscsi_hba *phba); |
Mike Christie | 0e43895 | 2012-04-03 23:41:51 -0500 | [diff] [blame] | 29 | |
Jitendra Bhivare | 96b48b9 | 2016-08-19 15:20:06 +0530 | [diff] [blame] | 30 | int beiscsi_iface_get_param(struct iscsi_iface *iface, |
Mike Christie | 0e43895 | 2012-04-03 23:41:51 -0500 | [diff] [blame] | 31 | enum iscsi_param_type param_type, |
| 32 | int param, char *buf); |
| 33 | |
Jitendra Bhivare | 96b48b9 | 2016-08-19 15:20:06 +0530 | [diff] [blame] | 34 | int beiscsi_iface_set_param(struct Scsi_Host *shost, |
Mike Christie | 0e43895 | 2012-04-03 23:41:51 -0500 | [diff] [blame] | 35 | void *data, uint32_t count); |
Jayamohan Kallickal | 6733b39 | 2009-09-05 07:36:35 +0530 | [diff] [blame] | 36 | |
Jitendra Bhivare | 96b48b9 | 2016-08-19 15:20:06 +0530 | [diff] [blame] | 37 | umode_t beiscsi_attr_is_visible(int param_type, int param); |
Mike Christie | 3128c6c | 2011-07-25 13:48:42 -0500 | [diff] [blame] | 38 | |
Jayamohan Kallickal | 6733b39 | 2009-09-05 07:36:35 +0530 | [diff] [blame] | 39 | void beiscsi_offload_connection(struct beiscsi_conn *beiscsi_conn, |
| 40 | struct beiscsi_offload_params *params); |
| 41 | |
| 42 | void beiscsi_offload_iscsi(struct beiscsi_hba *phba, struct iscsi_conn *conn, |
| 43 | struct beiscsi_conn *beiscsi_conn, |
| 44 | unsigned int fw_handle); |
| 45 | |
| 46 | struct 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 | |
| 51 | void beiscsi_session_destroy(struct iscsi_cls_session *cls_session); |
| 52 | |
Jitendra Bhivare | 480195c | 2016-08-19 15:20:15 +0530 | [diff] [blame] | 53 | void beiscsi_session_fail(struct iscsi_cls_session *cls_session); |
| 54 | |
Jayamohan Kallickal | 6733b39 | 2009-09-05 07:36:35 +0530 | [diff] [blame] | 55 | struct iscsi_cls_conn *beiscsi_conn_create(struct iscsi_cls_session |
| 56 | *cls_session, uint32_t cid); |
| 57 | |
| 58 | int 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 Christie | c7f7fd5 | 2011-02-16 15:04:41 -0600 | [diff] [blame] | 62 | int beiscsi_ep_get_param(struct iscsi_endpoint *ep, enum iscsi_param param, |
| 63 | char *buf); |
Jayamohan Kallickal | 6733b39 | 2009-09-05 07:36:35 +0530 | [diff] [blame] | 64 | |
| 65 | int beiscsi_get_host_param(struct Scsi_Host *shost, |
| 66 | enum iscsi_host_param param, char *buf); |
| 67 | |
Jayamohan Kallickal | c7acc5b | 2010-07-22 04:29:18 +0530 | [diff] [blame] | 68 | int beiscsi_get_macaddr(char *buf, struct beiscsi_hba *phba); |
| 69 | |
Jayamohan Kallickal | 6733b39 | 2009-09-05 07:36:35 +0530 | [diff] [blame] | 70 | int beiscsi_set_param(struct iscsi_cls_conn *cls_conn, |
| 71 | enum iscsi_param param, char *buf, int buflen); |
| 72 | |
| 73 | int beiscsi_conn_start(struct iscsi_cls_conn *cls_conn); |
| 74 | |
Jayamohan Kallickal | 6733b39 | 2009-09-05 07:36:35 +0530 | [diff] [blame] | 75 | struct iscsi_endpoint *beiscsi_ep_connect(struct Scsi_Host *shost, |
| 76 | struct sockaddr *dst_addr, |
| 77 | int non_blocking); |
| 78 | |
| 79 | int beiscsi_ep_poll(struct iscsi_endpoint *ep, int timeout_ms); |
| 80 | |
| 81 | void beiscsi_ep_disconnect(struct iscsi_endpoint *ep); |
| 82 | |
| 83 | void beiscsi_conn_get_stats(struct iscsi_cls_conn *cls_conn, |
| 84 | struct iscsi_stats *stats); |
| 85 | |
| 86 | #endif |