1 /** 2 * Copyright (C) 2005 - 2015 Avago Technologies 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 * 10 * Written by: Jayamohan Kallickal (jayamohan.kallickal@avagotech.com) 11 * 12 * Contact Information: 13 * linux-drivers@avagotech.com 14 * 15 * Avago Technologies 16 * 3333 Susan Street 17 * Costa Mesa, CA 92626 18 */ 19 20 #ifndef _BE_ISCSI_ 21 #define _BE_ISCSI_ 22 23 #include "be_main.h" 24 #include "be_mgmt.h" 25 26 void beiscsi_iface_create_default(struct beiscsi_hba *phba); 27 28 void beiscsi_iface_destroy_default(struct beiscsi_hba *phba); 29 30 int beiscsi_iface_get_param(struct iscsi_iface *iface, 31 enum iscsi_param_type param_type, 32 int param, char *buf); 33 34 int beiscsi_iface_set_param(struct Scsi_Host *shost, 35 void *data, uint32_t count); 36 37 umode_t beiscsi_attr_is_visible(int param_type, int param); 38 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 53 struct iscsi_cls_conn *beiscsi_conn_create(struct iscsi_cls_session 54 *cls_session, uint32_t cid); 55 56 int beiscsi_conn_bind(struct iscsi_cls_session *cls_session, 57 struct iscsi_cls_conn *cls_conn, 58 uint64_t transport_fd, int is_leading); 59 60 int beiscsi_ep_get_param(struct iscsi_endpoint *ep, enum iscsi_param param, 61 char *buf); 62 63 int beiscsi_get_host_param(struct Scsi_Host *shost, 64 enum iscsi_host_param param, char *buf); 65 66 int beiscsi_get_macaddr(char *buf, struct beiscsi_hba *phba); 67 68 int beiscsi_set_param(struct iscsi_cls_conn *cls_conn, 69 enum iscsi_param param, char *buf, int buflen); 70 71 int beiscsi_conn_start(struct iscsi_cls_conn *cls_conn); 72 73 struct iscsi_endpoint *beiscsi_ep_connect(struct Scsi_Host *shost, 74 struct sockaddr *dst_addr, 75 int non_blocking); 76 77 int beiscsi_ep_poll(struct iscsi_endpoint *ep, int timeout_ms); 78 79 void beiscsi_ep_disconnect(struct iscsi_endpoint *ep); 80 81 void beiscsi_conn_get_stats(struct iscsi_cls_conn *cls_conn, 82 struct iscsi_stats *stats); 83 84 #endif 85