Emulex Logo
OneCoreā„¢ Storage SDK Release 11.2
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
mode_sense.c File Reference
#include "ocs.h"
#include "ocs_ramd.h"

Go to the source code of this file.

Detailed Description

Mode sense SCSI command processing

Definition in file mode_sense.c.

Data Structures

struct  mode_parameter_header6_s
 Defines the mode sense 6 parameter header. More...
 
struct  mode_parameter_header10_s
 Defines the mode sense 10 parameter header. More...
 
struct  mode_parameter_block_descriptor_s
 Defines the mode sense parameter block descriptor. More...
 
struct  mode_parameter_long_block_descriptor_s
 Defines the mode sense long parameter block descriptor. More...
 
struct  mode_parameter_data_s
 internal structure for mode sense parameter data pages. More...
 

Macros

#define MODE_SENSE_ALL_PAGES   0x3f
 
#define MODE_SENSE_PC_CURRENT   0x0
 
#define MODE_SENSE_PC_CHANGEABLE   0x1
 
#define MODE_SENSE_PC_DEFAULT   0x2
 
#define MODE_SENSE_PC_SAVED   0x3
 
#define tm_prot_luns   (0)
 
#define TM_PROT_MODE_DEFAULT   0x0
 
#define TM_PROT_MODE_END2END   0x1
 
#define TM_PROT_MODE_WIRE_ONLY   0x2
 
#define TM_PROT_MODE_HOST_ONLY   0x3
 
#define tm_prot_mode   TM_PROT_MODE_DEFAULT
 

Functions

static ocs_ramd_hndlr_rtn_e ocs_ramd_mode_sense (ocs_io_t *io, uint32_t hdrsize, uint8_t cdb[])
 
static int tm_mode_page_supported (int page)
 
static uint32_t ocs_htobe24 (uint32_t value)
 
static int tm_build_mode_parameter (ocs_io_t *io, int page, int dbd, int llbaa, int hdrsize, uint8_t *buffer, uint32_t buffer_length)
 
ocs_ramd_hndlr_rtn_e ocs_ramd_mode_sense6 (ocs_io_t *io, uint8_t cdb[])
 Process SCSI Mode Sense 6 command. More...
 
ocs_ramd_hndlr_rtn_e ocs_ramd_mode_sense10 (ocs_io_t *io, uint8_t cdb[])
 Process SCSI Mode Sense 10 command. More...
 

Variables

static uint8_t mode_parameter_page_01 []
 
static uint8_t mode_parameter_page_02 []
 
static uint8_t mode_parameter_page_03 []
 
static uint8_t mode_parameter_page_04 []
 
static uint8_t mode_parameter_page_07 []
 
static uint8_t mode_parameter_page_08 []
 
static uint8_t mode_parameter_page_0a []
 
static uint8_t mode_parameter_page_18 []
 
static uint8_t mode_parameter_page_1c []
 
static uint8_t mode_parameter_page_00 []
 
static struct mode_parameter_data_s mode_parameter_data []
 

Macro Details

#define MODE_SENSE_ALL_PAGES   0x3f

Definition at line 90 of file mode_sense.c.

#define MODE_SENSE_PC_CHANGEABLE   0x1

Definition at line 92 of file mode_sense.c.

#define MODE_SENSE_PC_CURRENT   0x0

Definition at line 91 of file mode_sense.c.

#define MODE_SENSE_PC_DEFAULT   0x2

Definition at line 93 of file mode_sense.c.

#define MODE_SENSE_PC_SAVED   0x3

Definition at line 94 of file mode_sense.c.

#define tm_prot_luns   (0)
#define tm_prot_mode   TM_PROT_MODE_DEFAULT
#define TM_PROT_MODE_DEFAULT   0x0
#define TM_PROT_MODE_END2END   0x1
#define TM_PROT_MODE_HOST_ONLY   0x3
#define TM_PROT_MODE_WIRE_ONLY   0x2

Function Details

static uint32_t ocs_htobe24 ( uint32_t  value)
static

Definition at line 200 of file mode_sense.c.

static ocs_ramd_hndlr_rtn_e ocs_ramd_mode_sense ( ocs_io_t *  io,
uint32_t  hdrsize,
uint8_t  cdb[] 
)
static

Definition at line 400 of file mode_sense.c.

static int tm_build_mode_parameter ( ocs_io_t *  io,
int  page,
int  dbd,
int  llbaa,
int  hdrsize,
uint8_t *  buffer,
uint32_t  buffer_length 
)
static

Definition at line 207 of file mode_sense.c.

static int tm_mode_page_supported ( int  page)
static

Definition at line 185 of file mode_sense.c.

Variable Details

struct mode_parameter_data_s mode_parameter_data[]
static
Initial value:
= {
static uint8_t mode_parameter_page_02[]
Definition: mode_sense.c:103
static uint8_t mode_parameter_page_00[]
Definition: mode_sense.c:159
static uint8_t mode_parameter_page_1c[]
Definition: mode_sense.c:153
static uint8_t mode_parameter_page_01[]
Definition: mode_sense.c:97
static uint8_t mode_parameter_page_0a[]
Definition: mode_sense.c:142
static uint8_t mode_parameter_page_08[]
Definition: mode_sense.c:134
static uint8_t mode_parameter_page_03[]
Definition: mode_sense.c:110
static uint8_t mode_parameter_page_07[]
Definition: mode_sense.c:128
static uint8_t mode_parameter_page_04[]
Definition: mode_sense.c:119
static uint8_t mode_parameter_page_18[]
Definition: mode_sense.c:148

Definition at line 171 of file mode_sense.c.

uint8_t mode_parameter_page_00[]
static
Initial value:
= {
0x00, 0x02, 0x00, 0x00, }

Definition at line 159 of file mode_sense.c.

uint8_t mode_parameter_page_01[]
static
Initial value:
= {
0x01, 0x0a, 0x0c, 0x4b,
0x30, 0x00, 0x00, 0x00,
0x29, 0x00, 0xff, 0xff, }

Definition at line 97 of file mode_sense.c.

uint8_t mode_parameter_page_02[]
static
Initial value:
= {
0x02, 0x0e, 0x80, 0x80,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x02, 0x84,
0x00, 0x00, 0x00, 0x04, }

Definition at line 103 of file mode_sense.c.

uint8_t mode_parameter_page_03[]
static
Initial value:
= {
0x03, 0x16, 0x00, 0x01,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x40,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, }

Definition at line 110 of file mode_sense.c.

uint8_t mode_parameter_page_04[]
static
Initial value:
= {
0x04, 0x16, 0x00, 0x01,
0x01, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x1c, 0x20, 0x00, 0x00, }

Definition at line 119 of file mode_sense.c.

uint8_t mode_parameter_page_07[]
static
Initial value:
= {
0x07, 0x0a, 0x00, 0x4b,
0x30, 0x00, 0x00, 0x00,
0x00, 0x00, 0xff, 0xff, }

Definition at line 128 of file mode_sense.c.

uint8_t mode_parameter_page_08[]
static
Initial value:
= {
0x08, 0x12, 0x10, 0x00,
0xff, 0xff, 0x00, 0x00,
0xff, 0xff, 0xff, 0xff,
0x80, 0x03, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, }

Definition at line 134 of file mode_sense.c.

uint8_t mode_parameter_page_0a[]
static
Initial value:
= {
0x0a, 0x0a, 0x02, 0x00,
0x00, 0x80, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, }

Definition at line 142 of file mode_sense.c.

uint8_t mode_parameter_page_18[]
static
Initial value:
= {
0x18, 0x06, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, }

Definition at line 148 of file mode_sense.c.

uint8_t mode_parameter_page_1c[]
static
Initial value:
= {
0x1c, 0x0a, 0x00, 0x00,
0xff, 0xff, 0xff, 0xff,
0x00, 0x00, 0x00, 0x00, }

Definition at line 153 of file mode_sense.c.