Emulex Logo
OneCoreā„¢ Storage SDK Release 11.2
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
ocs_drv_iscsi.h File Reference
#include "ocs_os.h"
#include "ocs_debug.h"
#include "ocs_iscsi_config.h"
#include "ocs_common.h"
#include "ocs_hal.h"
#include "ocs_io.h"
#include "ocs_pm.h"
#include "ocs_iscsi_api.h"
#include "ocs_iscsi.h"
#include "ocs_ioctl.h"
#include "ocs_elxu.h"
#include "ocs_xport.h"
#include "ocs_scsi.h"
#include "ocs_domain.h"
#include "ocs_sport.h"
#include "ocs_cxn.h"

Go to the source code of this file.

Detailed Description

OCS linux driver common include file

Definition in file ocs_drv_iscsi.h.

Data Structures

struct  ocs_s
 A structure used to contain all data related to an adapter for this driver. More...
 

Macros

#define OCS_INCLUDE_ISCSI
 
#define OCS_MAX_SPORTS   32
 
#define ocs_is_initiator_enabled()   (ocs->enable_ini)
 
#define ocs_is_target_enabled()   (ocs->enable_tgt)
 

Functions

static void ocs_device_lock_init (ocs_t *ocs)
 
static void ocs_device_lock_free (ocs_t *ocs)
 
static int32_t ocs_device_lock_try (ocs_t *ocs)
 
static void ocs_device_lock (ocs_t *ocs)
 
static void ocs_device_unlock (ocs_t *ocs)
 
ocs_t * ocs_get_instance (uint32_t index)
 return pointer to ocs structure given instance index More...
 
int32_t ocs_get_bus_dev_func (ocs_t *ocs, uint8_t *bus, uint8_t *dev, uint8_t *func)
 
int32_t ocs_device_ioctl (ocs_t *ocs, unsigned int cmd, unsigned long arg)
 ocs driver ioctl method More...
 
static ocs_io_t * ocs_io_alloc (ocs_t *ocs)
 
static void ocs_io_free (ocs_t *ocs, ocs_io_t *io)
 
void ocs_stop_event_processing (ocs_os_t *ocs_os)
 
int32_t ocs_start_event_processing (ocs_os_t *ocs_os)
 

Macro Details

#define OCS_INCLUDE_ISCSI

Definition at line 42 of file ocs_drv_iscsi.h.

#define ocs_is_initiator_enabled ( )    (ocs->enable_ini)

Definition at line 151 of file ocs_drv_iscsi.h.

#define ocs_is_target_enabled ( )    (ocs->enable_tgt)

Definition at line 152 of file ocs_drv_iscsi.h.

#define OCS_MAX_SPORTS   32

Definition at line 57 of file ocs_drv_iscsi.h.

Function Details

int32_t ocs_device_ioctl ( ocs_t *  ocs,
unsigned int  cmd,
unsigned long  arg 
)

ocs driver ioctl method

Called from ocs_ioctl

Parameters
ocspointer to ocs structure
cmdioctl command to execute
argioctl command specitic data
Returns
returns 0 for success, a negative error code value for failure.

Definition at line 57 of file ocs_ioctl.c.

static void ocs_device_lock ( ocs_t *  ocs)
inlinestatic

Definition at line 170 of file ocs_drv_iscsi.h.

static void ocs_device_lock_free ( ocs_t *  ocs)
inlinestatic

Definition at line 160 of file ocs_drv_iscsi.h.

static void ocs_device_lock_init ( ocs_t *  ocs)
inlinestatic

Definition at line 155 of file ocs_drv_iscsi.h.

static int32_t ocs_device_lock_try ( ocs_t *  ocs)
inlinestatic

Definition at line 165 of file ocs_drv_iscsi.h.

static void ocs_device_unlock ( ocs_t *  ocs)
inlinestatic

Definition at line 175 of file ocs_drv_iscsi.h.

int32_t ocs_get_bus_dev_func ( ocs_t *  ocs,
uint8_t *  bus,
uint8_t *  dev,
uint8_t *  func 
)
ocs_t* ocs_get_instance ( uint32_t  index)

return pointer to ocs structure given instance index

A pointer to an ocs structure is returned given an instance index.

Parameters
indexindex to ocs_devices array
Returns
ocs pointer

Definition at line 436 of file uspace/ocs_fc_ramd/ocs_driver.c.

static ocs_io_t* ocs_io_alloc ( ocs_t *  ocs)
inlinestatic

Definition at line 185 of file ocs_drv_iscsi.h.

static void ocs_io_free ( ocs_t *  ocs,
ocs_io_t *  io 
)
inlinestatic

Definition at line 191 of file ocs_drv_iscsi.h.

int32_t ocs_start_event_processing ( ocs_os_t *  ocs_os)
void ocs_stop_event_processing ( ocs_os_t *  ocs_os)