be_iscsi.h 2.5 KB
Newer Older
1
/**
2
 * Copyright (C) 2005 - 2015 Avago Technologies
3 4 5 6 7 8 9
 * All rights reserved.
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License version 2
 * as published by the Free Software Foundation.  The full GNU General
 * Public License is included in this distribution in the file called COPYING.
 *
10
 * Written by: Jayamohan Kallickal (jayamohan.kallickal@avagotech.com)
11 12
 *
 * Contact Information:
13
 * linux-drivers@avagotech.com
14
 *
15
 * Avago Technologies
16 17
 * 3333 Susan Street
 * Costa Mesa, CA 92626
18 19 20 21 22 23 24 25
 */

#ifndef _BE_ISCSI_
#define _BE_ISCSI_

#include "be_main.h"
#include "be_mgmt.h"

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 32 33
			     enum iscsi_param_type param_type,
			     int param, char *buf);

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 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
void beiscsi_offload_connection(struct beiscsi_conn *beiscsi_conn,
				struct beiscsi_offload_params *params);

void beiscsi_offload_iscsi(struct beiscsi_hba *phba, struct iscsi_conn *conn,
			   struct beiscsi_conn *beiscsi_conn,
			   unsigned int fw_handle);

struct iscsi_cls_session *beiscsi_session_create(struct iscsi_endpoint *ep,
						 uint16_t cmds_max,
						 uint16_t qdepth,
						 uint32_t initial_cmdsn);

void beiscsi_session_destroy(struct iscsi_cls_session *cls_session);

struct iscsi_cls_conn *beiscsi_conn_create(struct iscsi_cls_session
					   *cls_session, uint32_t cid);

int beiscsi_conn_bind(struct iscsi_cls_session *cls_session,
		      struct iscsi_cls_conn *cls_conn,
		      uint64_t transport_fd, int is_leading);

60 61
int beiscsi_ep_get_param(struct iscsi_endpoint *ep, enum iscsi_param param,
			 char *buf);
62 63 64 65

int beiscsi_get_host_param(struct Scsi_Host *shost,
			   enum iscsi_host_param param, char *buf);

66 67
int beiscsi_get_macaddr(char *buf, struct beiscsi_hba *phba);

68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84
int beiscsi_set_param(struct iscsi_cls_conn *cls_conn,
		      enum iscsi_param param, char *buf, int buflen);

int beiscsi_conn_start(struct iscsi_cls_conn *cls_conn);

struct iscsi_endpoint *beiscsi_ep_connect(struct Scsi_Host *shost,
					  struct sockaddr *dst_addr,
					  int non_blocking);

int beiscsi_ep_poll(struct iscsi_endpoint *ep, int timeout_ms);

void beiscsi_ep_disconnect(struct iscsi_endpoint *ep);

void beiscsi_conn_get_stats(struct iscsi_cls_conn *cls_conn,
			    struct iscsi_stats *stats);

#endif