Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros
sbp_target.h File Reference
#include <linux/firewire.h>
#include <linux/spinlock.h>
#include <linux/types.h>
#include <linux/workqueue.h>
#include <target/target_core_base.h>

Go to the source code of this file.

Data Structures

struct  sbp2_pointer
 
struct  sbp_command_block_orb
 
struct  sbp_page_table_entry
 
struct  sbp_management_orb
 
struct  sbp_status_block
 
struct  sbp_login_response_block
 
struct  sbp_login_descriptor
 
struct  sbp_session
 
struct  sbp_nacl
 
struct  sbp_tpg
 
struct  sbp_tport
 
struct  sbp_target_agent
 
struct  sbp_target_request
 
struct  sbp_management_agent
 
struct  sbp_management_request
 

Macros

#define SBP_VERSION   "v0.1"
 
#define SBP_NAMELEN   32
 
#define SBP_ORB_FETCH_SIZE   8
 
#define MANAGEMENT_AGENT_STATE_IDLE   0
 
#define MANAGEMENT_AGENT_STATE_BUSY   1
 
#define ORB_NOTIFY(v)   (((v) >> 31) & 0x01)
 
#define ORB_REQUEST_FORMAT(v)   (((v) >> 29) & 0x03)
 
#define MANAGEMENT_ORB_FUNCTION(v)   (((v) >> 16) & 0x0f)
 
#define MANAGEMENT_ORB_FUNCTION_LOGIN   0x0
 
#define MANAGEMENT_ORB_FUNCTION_QUERY_LOGINS   0x1
 
#define MANAGEMENT_ORB_FUNCTION_RECONNECT   0x3
 
#define MANAGEMENT_ORB_FUNCTION_SET_PASSWORD   0x4
 
#define MANAGEMENT_ORB_FUNCTION_LOGOUT   0x7
 
#define MANAGEMENT_ORB_FUNCTION_ABORT_TASK   0xb
 
#define MANAGEMENT_ORB_FUNCTION_ABORT_TASK_SET   0xc
 
#define MANAGEMENT_ORB_FUNCTION_LOGICAL_UNIT_RESET   0xe
 
#define MANAGEMENT_ORB_FUNCTION_TARGET_RESET   0xf
 
#define LOGIN_ORB_EXCLUSIVE(v)   (((v) >> 28) & 0x01)
 
#define LOGIN_ORB_RESERVED(v)   (((v) >> 24) & 0x0f)
 
#define LOGIN_ORB_RECONNECT(v)   (((v) >> 20) & 0x0f)
 
#define LOGIN_ORB_LUN(v)   (((v) >> 0) & 0xffff)
 
#define LOGIN_ORB_PASSWORD_LENGTH(v)   (((v) >> 16) & 0xffff)
 
#define LOGIN_ORB_RESPONSE_LENGTH(v)   (((v) >> 0) & 0xffff)
 
#define RECONNECT_ORB_LOGIN_ID(v)   (((v) >> 0) & 0xffff)
 
#define LOGOUT_ORB_LOGIN_ID(v)   (((v) >> 0) & 0xffff)
 
#define CMDBLK_ORB_DIRECTION(v)   (((v) >> 27) & 0x01)
 
#define CMDBLK_ORB_SPEED(v)   (((v) >> 24) & 0x07)
 
#define CMDBLK_ORB_MAX_PAYLOAD(v)   (((v) >> 20) & 0x0f)
 
#define CMDBLK_ORB_PG_TBL_PRESENT(v)   (((v) >> 19) & 0x01)
 
#define CMDBLK_ORB_PG_SIZE(v)   (((v) >> 16) & 0x07)
 
#define CMDBLK_ORB_DATA_SIZE(v)   (((v) >> 0) & 0xffff)
 
#define STATUS_BLOCK_SRC(v)   (((v) & 0x03) << 30)
 
#define STATUS_BLOCK_RESP(v)   (((v) & 0x03) << 28)
 
#define STATUS_BLOCK_DEAD(v)   (((v) ? 1 : 0) << 27)
 
#define STATUS_BLOCK_LEN(v)   (((v) & 0x07) << 24)
 
#define STATUS_BLOCK_SBP_STATUS(v)   (((v) & 0xff) << 16)
 
#define STATUS_BLOCK_ORB_OFFSET_HIGH(v)   (((v) & 0xffff) << 0)
 
#define STATUS_SRC_ORB_CONTINUING   0
 
#define STATUS_SRC_ORB_FINISHED   1
 
#define STATUS_SRC_UNSOLICITED   2
 
#define STATUS_RESP_REQUEST_COMPLETE   0
 
#define STATUS_RESP_TRANSPORT_FAILURE   1
 
#define STATUS_RESP_ILLEGAL_REQUEST   2
 
#define STATUS_RESP_VENDOR_DEPENDENT   3
 
#define SBP_STATUS_OK   0
 
#define SBP_STATUS_REQ_TYPE_NOTSUPP   1
 
#define SBP_STATUS_SPEED_NOTSUPP   2
 
#define SBP_STATUS_PAGE_SIZE_NOTSUPP   3
 
#define SBP_STATUS_ACCESS_DENIED   4
 
#define SBP_STATUS_LUN_NOTSUPP   5
 
#define SBP_STATUS_PAYLOAD_TOO_SMALL   6
 
#define SBP_STATUS_RESOURCES_UNAVAIL   8
 
#define SBP_STATUS_FUNCTION_REJECTED   9
 
#define SBP_STATUS_LOGIN_ID_UNKNOWN   10
 
#define SBP_STATUS_DUMMY_ORB_COMPLETE   11
 
#define SBP_STATUS_REQUEST_ABORTED   12
 
#define SBP_STATUS_UNSPECIFIED_ERROR   0xff
 
#define AGENT_STATE_RESET   0
 
#define AGENT_STATE_ACTIVE   1
 
#define AGENT_STATE_SUSPENDED   2
 
#define AGENT_STATE_DEAD   3
 

Macro Definition Documentation

#define AGENT_STATE_ACTIVE   1

Definition at line 82 of file sbp_target.h.

#define AGENT_STATE_DEAD   3

Definition at line 84 of file sbp_target.h.

#define AGENT_STATE_RESET   0

Definition at line 81 of file sbp_target.h.

#define AGENT_STATE_SUSPENDED   2

Definition at line 83 of file sbp_target.h.

#define CMDBLK_ORB_DATA_SIZE (   v)    (((v) >> 0) & 0xffff)

Definition at line 48 of file sbp_target.h.

#define CMDBLK_ORB_DIRECTION (   v)    (((v) >> 27) & 0x01)

Definition at line 43 of file sbp_target.h.

#define CMDBLK_ORB_MAX_PAYLOAD (   v)    (((v) >> 20) & 0x0f)

Definition at line 45 of file sbp_target.h.

#define CMDBLK_ORB_PG_SIZE (   v)    (((v) >> 16) & 0x07)

Definition at line 47 of file sbp_target.h.

#define CMDBLK_ORB_PG_TBL_PRESENT (   v)    (((v) >> 19) & 0x01)

Definition at line 46 of file sbp_target.h.

#define CMDBLK_ORB_SPEED (   v)    (((v) >> 24) & 0x07)

Definition at line 44 of file sbp_target.h.

#define LOGIN_ORB_EXCLUSIVE (   v)    (((v) >> 28) & 0x01)

Definition at line 33 of file sbp_target.h.

#define LOGIN_ORB_LUN (   v)    (((v) >> 0) & 0xffff)

Definition at line 36 of file sbp_target.h.

#define LOGIN_ORB_PASSWORD_LENGTH (   v)    (((v) >> 16) & 0xffff)

Definition at line 37 of file sbp_target.h.

#define LOGIN_ORB_RECONNECT (   v)    (((v) >> 20) & 0x0f)

Definition at line 35 of file sbp_target.h.

#define LOGIN_ORB_RESERVED (   v)    (((v) >> 24) & 0x0f)

Definition at line 34 of file sbp_target.h.

#define LOGIN_ORB_RESPONSE_LENGTH (   v)    (((v) >> 0) & 0xffff)

Definition at line 38 of file sbp_target.h.

#define LOGOUT_ORB_LOGIN_ID (   v)    (((v) >> 0) & 0xffff)

Definition at line 41 of file sbp_target.h.

#define MANAGEMENT_AGENT_STATE_BUSY   1

Definition at line 16 of file sbp_target.h.

#define MANAGEMENT_AGENT_STATE_IDLE   0

Definition at line 15 of file sbp_target.h.

#define MANAGEMENT_ORB_FUNCTION (   v)    (((v) >> 16) & 0x0f)

Definition at line 21 of file sbp_target.h.

#define MANAGEMENT_ORB_FUNCTION_ABORT_TASK   0xb

Definition at line 28 of file sbp_target.h.

#define MANAGEMENT_ORB_FUNCTION_ABORT_TASK_SET   0xc

Definition at line 29 of file sbp_target.h.

#define MANAGEMENT_ORB_FUNCTION_LOGICAL_UNIT_RESET   0xe

Definition at line 30 of file sbp_target.h.

#define MANAGEMENT_ORB_FUNCTION_LOGIN   0x0

Definition at line 23 of file sbp_target.h.

#define MANAGEMENT_ORB_FUNCTION_LOGOUT   0x7

Definition at line 27 of file sbp_target.h.

#define MANAGEMENT_ORB_FUNCTION_QUERY_LOGINS   0x1

Definition at line 24 of file sbp_target.h.

#define MANAGEMENT_ORB_FUNCTION_RECONNECT   0x3

Definition at line 25 of file sbp_target.h.

#define MANAGEMENT_ORB_FUNCTION_SET_PASSWORD   0x4

Definition at line 26 of file sbp_target.h.

#define MANAGEMENT_ORB_FUNCTION_TARGET_RESET   0xf

Definition at line 31 of file sbp_target.h.

#define ORB_NOTIFY (   v)    (((v) >> 31) & 0x01)

Definition at line 18 of file sbp_target.h.

#define ORB_REQUEST_FORMAT (   v)    (((v) >> 29) & 0x03)

Definition at line 19 of file sbp_target.h.

#define RECONNECT_ORB_LOGIN_ID (   v)    (((v) >> 0) & 0xffff)

Definition at line 40 of file sbp_target.h.

#define SBP_NAMELEN   32

Definition at line 11 of file sbp_target.h.

#define SBP_ORB_FETCH_SIZE   8

Definition at line 13 of file sbp_target.h.

#define SBP_STATUS_ACCESS_DENIED   4

Definition at line 70 of file sbp_target.h.

#define SBP_STATUS_DUMMY_ORB_COMPLETE   11

Definition at line 77 of file sbp_target.h.

#define SBP_STATUS_FUNCTION_REJECTED   9

Definition at line 75 of file sbp_target.h.

#define SBP_STATUS_LOGIN_ID_UNKNOWN   10

Definition at line 76 of file sbp_target.h.

#define SBP_STATUS_LUN_NOTSUPP   5

Definition at line 71 of file sbp_target.h.

#define SBP_STATUS_OK   0

Definition at line 66 of file sbp_target.h.

#define SBP_STATUS_PAGE_SIZE_NOTSUPP   3

Definition at line 69 of file sbp_target.h.

#define SBP_STATUS_PAYLOAD_TOO_SMALL   6

Definition at line 72 of file sbp_target.h.

#define SBP_STATUS_REQ_TYPE_NOTSUPP   1

Definition at line 67 of file sbp_target.h.

#define SBP_STATUS_REQUEST_ABORTED   12

Definition at line 78 of file sbp_target.h.

#define SBP_STATUS_RESOURCES_UNAVAIL   8

Definition at line 74 of file sbp_target.h.

#define SBP_STATUS_SPEED_NOTSUPP   2

Definition at line 68 of file sbp_target.h.

#define SBP_STATUS_UNSPECIFIED_ERROR   0xff

Definition at line 79 of file sbp_target.h.

#define SBP_VERSION   "v0.1"

Definition at line 10 of file sbp_target.h.

#define STATUS_BLOCK_DEAD (   v)    (((v) ? 1 : 0) << 27)

Definition at line 52 of file sbp_target.h.

#define STATUS_BLOCK_LEN (   v)    (((v) & 0x07) << 24)

Definition at line 53 of file sbp_target.h.

#define STATUS_BLOCK_ORB_OFFSET_HIGH (   v)    (((v) & 0xffff) << 0)

Definition at line 55 of file sbp_target.h.

#define STATUS_BLOCK_RESP (   v)    (((v) & 0x03) << 28)

Definition at line 51 of file sbp_target.h.

#define STATUS_BLOCK_SBP_STATUS (   v)    (((v) & 0xff) << 16)

Definition at line 54 of file sbp_target.h.

#define STATUS_BLOCK_SRC (   v)    (((v) & 0x03) << 30)

Definition at line 50 of file sbp_target.h.

#define STATUS_RESP_ILLEGAL_REQUEST   2

Definition at line 63 of file sbp_target.h.

#define STATUS_RESP_REQUEST_COMPLETE   0

Definition at line 61 of file sbp_target.h.

#define STATUS_RESP_TRANSPORT_FAILURE   1

Definition at line 62 of file sbp_target.h.

#define STATUS_RESP_VENDOR_DEPENDENT   3

Definition at line 64 of file sbp_target.h.

#define STATUS_SRC_ORB_CONTINUING   0

Definition at line 57 of file sbp_target.h.

#define STATUS_SRC_ORB_FINISHED   1

Definition at line 58 of file sbp_target.h.

#define STATUS_SRC_UNSOLICITED   2

Definition at line 59 of file sbp_target.h.