2009-09-05 09:06:35 +07:00
|
|
|
/**
|
2014-08-08 11:59:59 +07:00
|
|
|
* Copyright (C) 2005 - 2014 Emulex
|
2009-09-05 09:06:35 +07:00
|
|
|
* 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.
|
|
|
|
*
|
2011-03-26 04:23:57 +07:00
|
|
|
* Written by: Jayamohan Kallickal (jayamohan.kallickal@emulex.com)
|
2009-09-05 09:06:35 +07:00
|
|
|
*
|
|
|
|
* Contact Information:
|
2011-03-26 04:23:57 +07:00
|
|
|
* linux-drivers@emulex.com
|
2009-09-05 09:06:35 +07:00
|
|
|
*
|
2011-03-26 04:23:57 +07:00
|
|
|
* Emulex
|
|
|
|
* 3333 Susan Street
|
|
|
|
* Costa Mesa, CA 92626
|
2009-09-05 09:06:35 +07:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _BE_ISCSI_
|
|
|
|
#define _BE_ISCSI_
|
|
|
|
|
|
|
|
#include "be_main.h"
|
|
|
|
#include "be_mgmt.h"
|
|
|
|
|
|
|
|
#define BE2_IPV4 0x1
|
|
|
|
#define BE2_IPV6 0x10
|
2012-04-04 11:41:51 +07:00
|
|
|
#define BE2_DHCP_V4 0x05
|
|
|
|
|
|
|
|
#define NON_BLOCKING 0x0
|
|
|
|
#define BLOCKING 0x1
|
|
|
|
|
|
|
|
void beiscsi_create_def_ifaces(struct beiscsi_hba *phba);
|
|
|
|
|
|
|
|
void beiscsi_destroy_def_ifaces(struct beiscsi_hba *phba);
|
|
|
|
|
|
|
|
int be2iscsi_iface_get_param(struct iscsi_iface *iface,
|
|
|
|
enum iscsi_param_type param_type,
|
|
|
|
int param, char *buf);
|
|
|
|
|
|
|
|
int be2iscsi_iface_set_param(struct Scsi_Host *shost,
|
|
|
|
void *data, uint32_t count);
|
2009-09-05 09:06:35 +07:00
|
|
|
|
2011-07-24 10:11:19 +07:00
|
|
|
umode_t be2iscsi_attr_is_visible(int param_type, int param);
|
2011-07-26 01:48:42 +07:00
|
|
|
|
2009-09-05 09:06:35 +07:00
|
|
|
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);
|
|
|
|
|
2011-02-17 04:04:41 +07:00
|
|
|
int beiscsi_ep_get_param(struct iscsi_endpoint *ep, enum iscsi_param param,
|
|
|
|
char *buf);
|
2009-09-05 09:06:35 +07:00
|
|
|
|
|
|
|
int beiscsi_get_host_param(struct Scsi_Host *shost,
|
|
|
|
enum iscsi_host_param param, char *buf);
|
|
|
|
|
2010-07-22 05:59:18 +07:00
|
|
|
int beiscsi_get_macaddr(char *buf, struct beiscsi_hba *phba);
|
|
|
|
|
2009-09-05 09:06:35 +07:00
|
|
|
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
|