Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
sas.h File Reference
#include <linux/types.h>
#include <asm/byteorder.h>

Go to the source code of this file.

Data Structures

struct  dev_to_host_fis
 
struct  host_to_dev_fis
 

Macros

#define SAS_ADDR_SIZE   8
 
#define HASHED_SAS_ADDR_SIZE   3
 
#define SAS_ADDR(_sa)   ((unsigned long long) be64_to_cpu(*(__be64 *)(_sa)))
 
#define SMP_REQUEST   0x40
 
#define SMP_RESPONSE   0x41
 
#define SSP_DATA   0x01
 
#define SSP_XFER_RDY   0x05
 
#define SSP_COMMAND   0x06
 
#define SSP_RESPONSE   0x07
 
#define SSP_TASK   0x16
 
#define SMP_REPORT_GENERAL   0x00
 
#define SMP_REPORT_MANUF_INFO   0x01
 
#define SMP_READ_GPIO_REG   0x02
 
#define SMP_DISCOVER   0x10
 
#define SMP_REPORT_PHY_ERR_LOG   0x11
 
#define SMP_REPORT_PHY_SATA   0x12
 
#define SMP_REPORT_ROUTE_INFO   0x13
 
#define SMP_WRITE_GPIO_REG   0x82
 
#define SMP_CONF_ROUTE_INFO   0x90
 
#define SMP_PHY_CONTROL   0x91
 
#define SMP_PHY_TEST_FUNCTION   0x92
 
#define SMP_RESP_FUNC_ACC   0x00
 
#define SMP_RESP_FUNC_UNK   0x01
 
#define SMP_RESP_FUNC_FAILED   0x02
 
#define SMP_RESP_INV_FRM_LEN   0x03
 
#define SMP_RESP_NO_PHY   0x10
 
#define SMP_RESP_NO_INDEX   0x11
 
#define SMP_RESP_PHY_NO_SATA   0x12
 
#define SMP_RESP_PHY_UNK_OP   0x13
 
#define SMP_RESP_PHY_UNK_TESTF   0x14
 
#define SMP_RESP_PHY_TEST_INPROG   0x15
 
#define SMP_RESP_PHY_VACANT   0x16
 
#define TMF_ABORT_TASK   0x01
 
#define TMF_ABORT_TASK_SET   0x02
 
#define TMF_CLEAR_TASK_SET   0x04
 
#define TMF_LU_RESET   0x08
 
#define TMF_CLEAR_ACA   0x40
 
#define TMF_QUERY_TASK   0x80
 
#define TMF_RESP_FUNC_COMPLETE   0x00
 
#define TMF_RESP_INVALID_FRAME   0x02
 
#define TMF_RESP_FUNC_ESUPP   0x04
 
#define TMF_RESP_FUNC_FAILED   0x05
 
#define TMF_RESP_FUNC_SUCC   0x08
 
#define TMF_RESP_NO_LUN   0x09
 
#define TMF_RESP_OVERLAPPED_TAG   0x0A
 

Enumerations

enum  sas_oob_mode { OOB_NOT_CONNECTED, SATA_OOB_MODE, SAS_OOB_MODE }
 
enum  sas_dev_type {
  NO_DEVICE = 0, SAS_END_DEV = 1, EDGE_DEV = 2, FANOUT_DEV = 3,
  SAS_HA = 4, SATA_DEV = 5, SATA_PM = 7, SATA_PM_PORT = 8,
  SATA_PENDING = 9
}
 
enum  sas_protocol {
  SAS_PROTOCOL_NONE = 0, SAS_PROTOCOL_SATA = 0x01, SAS_PROTOCOL_SMP = 0x02, SAS_PROTOCOL_STP = 0x04,
  SAS_PROTOCOL_SSP = 0x08, SAS_PROTOCOL_ALL = 0x0E, SAS_PROTOCOL_STP_ALL = SAS_PROTOCOL_STP|SAS_PROTOCOL_SATA
}
 
enum  phy_func {
  PHY_FUNC_NOP, PHY_FUNC_LINK_RESET, PHY_FUNC_HARD_RESET, PHY_FUNC_DISABLE,
  PHY_FUNC_CLEAR_ERROR_LOG = 5, PHY_FUNC_CLEAR_AFFIL, PHY_FUNC_TX_SATA_PS_SIGNAL, PHY_FUNC_RELEASE_SPINUP_HOLD = 0x10,
  PHY_FUNC_SET_LINK_RATE, PHY_FUNC_GET_EVENTS
}
 
enum  sas_prim {
  SAS_PRIM_AIP_NORMAL = 1, SAS_PRIM_AIP_R0 = 2, SAS_PRIM_AIP_R1 = 3, SAS_PRIM_AIP_R2 = 4,
  SAS_PRIM_AIP_WC = 5, SAS_PRIM_AIP_WD = 6, SAS_PRIM_AIP_WP = 7, SAS_PRIM_AIP_RWP = 8,
  SAS_PRIM_BC_CH = 9, SAS_PRIM_BC_RCH0 = 10, SAS_PRIM_BC_RCH1 = 11, SAS_PRIM_BC_R0 = 12,
  SAS_PRIM_BC_R1 = 13, SAS_PRIM_BC_R2 = 14, SAS_PRIM_BC_R3 = 15, SAS_PRIM_BC_R4 = 16,
  SAS_PRIM_NOTIFY_ENSP = 17, SAS_PRIM_NOTIFY_R0 = 18, SAS_PRIM_NOTIFY_R1 = 19, SAS_PRIM_NOTIFY_R2 = 20,
  SAS_PRIM_CLOSE_CLAF = 21, SAS_PRIM_CLOSE_NORM = 22, SAS_PRIM_CLOSE_R0 = 23, SAS_PRIM_CLOSE_R1 = 24,
  SAS_PRIM_OPEN_RTRY = 25, SAS_PRIM_OPEN_RJCT = 26, SAS_PRIM_OPEN_ACPT = 27, SAS_PRIM_DONE = 28,
  SAS_PRIM_BREAK = 29, SATA_PRIM_DMAT = 33, SATA_PRIM_PMNAK = 34, SATA_PRIM_PMACK = 35,
  SATA_PRIM_PMREQ_S = 36, SATA_PRIM_PMREQ_P = 37, SATA_SATA_R_ERR = 38
}
 
enum  sas_open_rej_reason {
  SAS_OREJ_UNKNOWN = 0, SAS_OREJ_BAD_DEST = 1, SAS_OREJ_CONN_RATE = 2, SAS_OREJ_EPROTO = 3,
  SAS_OREJ_RESV_AB0 = 4, SAS_OREJ_RESV_AB1 = 5, SAS_OREJ_RESV_AB2 = 6, SAS_OREJ_RESV_AB3 = 7,
  SAS_OREJ_WRONG_DEST = 8, SAS_OREJ_STP_NORES = 9, SAS_OREJ_NO_DEST = 10, SAS_OREJ_PATH_BLOCKED = 11,
  SAS_OREJ_RSVD_CONT0 = 12, SAS_OREJ_RSVD_CONT1 = 13, SAS_OREJ_RSVD_INIT0 = 14, SAS_OREJ_RSVD_INIT1 = 15,
  SAS_OREJ_RSVD_STOP0 = 16, SAS_OREJ_RSVD_STOP1 = 17, SAS_OREJ_RSVD_RETRY = 18
}
 
enum  sas_gpio_reg_type {
  SAS_GPIO_REG_CFG = 0, SAS_GPIO_REG_RX = 1, SAS_GPIO_REG_RX_GP = 2, SAS_GPIO_REG_TX = 3,
  SAS_GPIO_REG_TX_GP = 4
}
 

Functions

struct dev_to_host_fis __attribute__ ((packed))
 

Variables

u8 fis_type
 
u8 flags
 
u8 status
 
u8 error
 
u8 lbal
 
union {
   u8   lbam
 
   u8   byte_count_low
 
}; 
 
union {
   u8   lbah
 
   u8   byte_count_high
 
}; 
 
u8 device
 
u8 lbal_exp
 
u8 lbam_exp
 
u8 lbah_exp
 
u8 _r_a
 
union {
   u8   sector_count
 
   u8   interrupt_reason
 
}; 
 
u8 sector_count_exp
 
u8 _r_b
 
u8 _r_c
 
u32 _r_d
 
u8 command
 
u8 features
 
union {
   u8   lbam
 
   u8   byte_count_low
 
}; 
 
union {
   u8   lbah
 
   u8   byte_count_high
 
}; 
 
u8 features_exp
 
union {
   u8   sector_count
 
   u8   interrupt_reason
 
}; 
 
u8 control
 

Macro Definition Documentation

#define HASHED_SAS_ADDR_SIZE   3

Definition at line 33 of file sas.h.

#define SAS_ADDR (   _sa)    ((unsigned long long) be64_to_cpu(*(__be64 *)(_sa)))

Definition at line 34 of file sas.h.

#define SAS_ADDR_SIZE   8

Definition at line 32 of file sas.h.

#define SMP_CONF_ROUTE_INFO   0x90

Definition at line 53 of file sas.h.

#define SMP_DISCOVER   0x10

Definition at line 48 of file sas.h.

#define SMP_PHY_CONTROL   0x91

Definition at line 54 of file sas.h.

#define SMP_PHY_TEST_FUNCTION   0x92

Definition at line 55 of file sas.h.

#define SMP_READ_GPIO_REG   0x02

Definition at line 47 of file sas.h.

#define SMP_REPORT_GENERAL   0x00

Definition at line 45 of file sas.h.

#define SMP_REPORT_MANUF_INFO   0x01

Definition at line 46 of file sas.h.

#define SMP_REPORT_PHY_ERR_LOG   0x11

Definition at line 49 of file sas.h.

#define SMP_REPORT_PHY_SATA   0x12

Definition at line 50 of file sas.h.

#define SMP_REPORT_ROUTE_INFO   0x13

Definition at line 51 of file sas.h.

#define SMP_REQUEST   0x40

Definition at line 36 of file sas.h.

#define SMP_RESP_FUNC_ACC   0x00

Definition at line 57 of file sas.h.

#define SMP_RESP_FUNC_FAILED   0x02

Definition at line 59 of file sas.h.

#define SMP_RESP_FUNC_UNK   0x01

Definition at line 58 of file sas.h.

#define SMP_RESP_INV_FRM_LEN   0x03

Definition at line 60 of file sas.h.

#define SMP_RESP_NO_INDEX   0x11

Definition at line 62 of file sas.h.

#define SMP_RESP_NO_PHY   0x10

Definition at line 61 of file sas.h.

#define SMP_RESP_PHY_NO_SATA   0x12

Definition at line 63 of file sas.h.

#define SMP_RESP_PHY_TEST_INPROG   0x15

Definition at line 66 of file sas.h.

#define SMP_RESP_PHY_UNK_OP   0x13

Definition at line 64 of file sas.h.

#define SMP_RESP_PHY_UNK_TESTF   0x14

Definition at line 65 of file sas.h.

#define SMP_RESP_PHY_VACANT   0x16

Definition at line 67 of file sas.h.

#define SMP_RESPONSE   0x41

Definition at line 37 of file sas.h.

#define SMP_WRITE_GPIO_REG   0x82

Definition at line 52 of file sas.h.

#define SSP_COMMAND   0x06

Definition at line 41 of file sas.h.

#define SSP_DATA   0x01

Definition at line 39 of file sas.h.

#define SSP_RESPONSE   0x07

Definition at line 42 of file sas.h.

#define SSP_TASK   0x16

Definition at line 43 of file sas.h.

#define SSP_XFER_RDY   0x05

Definition at line 40 of file sas.h.

#define TMF_ABORT_TASK   0x01

Definition at line 70 of file sas.h.

#define TMF_ABORT_TASK_SET   0x02

Definition at line 71 of file sas.h.

#define TMF_CLEAR_ACA   0x40

Definition at line 74 of file sas.h.

#define TMF_CLEAR_TASK_SET   0x04

Definition at line 72 of file sas.h.

#define TMF_LU_RESET   0x08

Definition at line 73 of file sas.h.

#define TMF_QUERY_TASK   0x80

Definition at line 75 of file sas.h.

#define TMF_RESP_FUNC_COMPLETE   0x00

Definition at line 78 of file sas.h.

#define TMF_RESP_FUNC_ESUPP   0x04

Definition at line 80 of file sas.h.

#define TMF_RESP_FUNC_FAILED   0x05

Definition at line 81 of file sas.h.

#define TMF_RESP_FUNC_SUCC   0x08

Definition at line 82 of file sas.h.

#define TMF_RESP_INVALID_FRAME   0x02

Definition at line 79 of file sas.h.

#define TMF_RESP_NO_LUN   0x09

Definition at line 83 of file sas.h.

#define TMF_RESP_OVERLAPPED_TAG   0x0A

Definition at line 84 of file sas.h.

Enumeration Type Documentation

enum phy_func
Enumerator:
PHY_FUNC_NOP 
PHY_FUNC_LINK_RESET 
PHY_FUNC_HARD_RESET 
PHY_FUNC_DISABLE 
PHY_FUNC_CLEAR_ERROR_LOG 
PHY_FUNC_CLEAR_AFFIL 
PHY_FUNC_TX_SATA_PS_SIGNAL 
PHY_FUNC_RELEASE_SPINUP_HOLD 
PHY_FUNC_SET_LINK_RATE 
PHY_FUNC_GET_EVENTS 

Definition at line 116 of file sas.h.

Enumerator:
NO_DEVICE 
SAS_END_DEV 
EDGE_DEV 
FANOUT_DEV 
SAS_HA 
SATA_DEV 
SATA_PM 
SATA_PM_PORT 
SATA_PENDING 

Definition at line 93 of file sas.h.

Enumerator:
SAS_GPIO_REG_CFG 
SAS_GPIO_REG_RX 
SAS_GPIO_REG_RX_GP 
SAS_GPIO_REG_TX 
SAS_GPIO_REG_TX_GP 

Definition at line 201 of file sas.h.

Enumerator:
OOB_NOT_CONNECTED 
SATA_OOB_MODE 
SAS_OOB_MODE 

Definition at line 86 of file sas.h.

Enumerator:
SAS_OREJ_UNKNOWN 
SAS_OREJ_BAD_DEST 
SAS_OREJ_CONN_RATE 
SAS_OREJ_EPROTO 
SAS_OREJ_RESV_AB0 
SAS_OREJ_RESV_AB1 
SAS_OREJ_RESV_AB2 
SAS_OREJ_RESV_AB3 
SAS_OREJ_WRONG_DEST 
SAS_OREJ_STP_NORES 
SAS_OREJ_NO_DEST 
SAS_OREJ_PATH_BLOCKED 
SAS_OREJ_RSVD_CONT0 
SAS_OREJ_RSVD_CONT1 
SAS_OREJ_RSVD_INIT0 
SAS_OREJ_RSVD_INIT1 
SAS_OREJ_RSVD_STOP0 
SAS_OREJ_RSVD_STOP1 
SAS_OREJ_RSVD_RETRY 

Definition at line 176 of file sas.h.

enum sas_prim
Enumerator:
SAS_PRIM_AIP_NORMAL 
SAS_PRIM_AIP_R0 
SAS_PRIM_AIP_R1 
SAS_PRIM_AIP_R2 
SAS_PRIM_AIP_WC 
SAS_PRIM_AIP_WD 
SAS_PRIM_AIP_WP 
SAS_PRIM_AIP_RWP 
SAS_PRIM_BC_CH 
SAS_PRIM_BC_RCH0 
SAS_PRIM_BC_RCH1 
SAS_PRIM_BC_R0 
SAS_PRIM_BC_R1 
SAS_PRIM_BC_R2 
SAS_PRIM_BC_R3 
SAS_PRIM_BC_R4 
SAS_PRIM_NOTIFY_ENSP 
SAS_PRIM_NOTIFY_R0 
SAS_PRIM_NOTIFY_R1 
SAS_PRIM_NOTIFY_R2 
SAS_PRIM_CLOSE_CLAF 
SAS_PRIM_CLOSE_NORM 
SAS_PRIM_CLOSE_R0 
SAS_PRIM_CLOSE_R1 
SAS_PRIM_OPEN_RTRY 
SAS_PRIM_OPEN_RJCT 
SAS_PRIM_OPEN_ACPT 
SAS_PRIM_DONE 
SAS_PRIM_BREAK 
SATA_PRIM_DMAT 
SATA_PRIM_PMNAK 
SATA_PRIM_PMACK 
SATA_PRIM_PMREQ_S 
SATA_PRIM_PMREQ_P 
SATA_SATA_R_ERR 

Definition at line 132 of file sas.h.

Enumerator:
SAS_PROTOCOL_NONE 
SAS_PROTOCOL_SATA 
SAS_PROTOCOL_SMP 
SAS_PROTOCOL_STP 
SAS_PROTOCOL_SSP 
SAS_PROTOCOL_ALL 
SAS_PROTOCOL_STP_ALL 

Definition at line 105 of file sas.h.

Function Documentation

struct dev_to_host_fis __attribute__ ( (packed)  )
read

mcontroller : adapter info structure for old mimd_t apps

: base address : irq number : number of logical drives : pci bus : pci device : pci function : pci id : vendor id : slot number : unique id

Definition at line 171 of file esd_usb2.c.

Variable Documentation

union { ... }
union { ... }
union { ... }
union { ... }
union { ... }
union { ... }
u8 _r_a

Definition at line 245 of file sas.h.

u32 _r_b

Definition at line 249 of file sas.h.

u8 _r_c

Definition at line 250 of file sas.h.

u32 _r_d

Definition at line 252 of file sas.h.

u8 byte_count_high

Definition at line 239 of file sas.h.

u8 byte_count_low

Definition at line 238 of file sas.h.

Definition at line 258 of file sas.h.

u8 control

Definition at line 274 of file sas.h.

Definition at line 240 of file sas.h.

u8 error

Definition at line 235 of file sas.h.

Definition at line 259 of file sas.h.

u8 features_exp

Definition at line 269 of file sas.h.

u8 fis_type

Definition at line 232 of file sas.h.

u8 flags

Definition at line 233 of file sas.h.

u8 interrupt_reason

Definition at line 247 of file sas.h.

u8 lbah

Definition at line 239 of file sas.h.

u8 lbah_exp

Definition at line 244 of file sas.h.

u8 lbal

Definition at line 237 of file sas.h.

u8 lbal_exp

Definition at line 242 of file sas.h.

u8 lbam

Definition at line 238 of file sas.h.

u8 lbam_exp

Definition at line 243 of file sas.h.

u8 sector_count

Definition at line 247 of file sas.h.

u8 sector_count_exp

Definition at line 248 of file sas.h.

Definition at line 234 of file sas.h.