Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
request.h File Reference
#include "isci.h"
#include "host.h"
#include "scu_task_context.h"

Go to the source code of this file.

Data Structures

struct  isci_stp_request
 
struct  isci_stp_request::isci_stp_pio_sgl
 
struct  isci_request
 
union  isci_request::ttype_ptr_union
 

Macros

#define IREQ_COMPLETE_IN_TARGET   0
 
#define IREQ_TERMINATED   1
 
#define IREQ_TMF   2
 
#define IREQ_ACTIVE   3
 
#define IREQ_PENDING_ABORT   4 /* Set == device was not suspended yet */
 
#define IREQ_TC_ABORT_POSTED   5
 
#define IREQ_ABORT_PATH_ACTIVE   6
 
#define IREQ_NO_AUTO_FREE_TAG   7 /* Set when being explicitly managed */
 
#define SCU_SGL_SIZE   ((SCI_MAX_SCATTER_GATHER_ELEMENTS + 1) / 2)
 
#define REQUEST_STATES
 
#define C(a)   SCI_##a
 
#define isci_request_access_task(req)   ((req)->ttype_ptr.io_task_ptr)
 
#define isci_request_access_tmf(req)   ((req)->ttype_ptr.tmf_task_ptr)
 

Functions

const charreq_state_name (enum sci_base_request_states state)
 
enum sci_status sci_request_start (struct isci_request *ireq)
 
enum sci_status sci_io_request_terminate (struct isci_request *ireq)
 
enum sci_status sci_io_request_event_handler (struct isci_request *ireq, u32 event_code)
 
enum sci_status sci_io_request_frame_handler (struct isci_request *ireq, u32 frame_index)
 
enum sci_status sci_task_request_terminate (struct isci_request *ireq)
 
enum sci_status sci_request_complete (struct isci_request *ireq)
 
enum sci_status sci_io_request_tc_completion (struct isci_request *ireq, u32 code)
 
struct isci_requestisci_tmf_request_from_tag (struct isci_host *ihost, struct isci_tmf *isci_tmf, u16 tag)
 
int isci_request_execute (struct isci_host *ihost, struct isci_remote_device *idev, struct sas_task *task, u16 tag)
 
enum sci_status sci_task_request_construct (struct isci_host *ihost, struct isci_remote_device *idev, u16 io_tag, struct isci_request *ireq)
 
enum sci_status sci_task_request_construct_ssp (struct isci_request *ireq)
 
void sci_smp_request_copy_response (struct isci_request *ireq)
 

Variables

enum sci_base_request_states REQUEST_STATES
 

Macro Definition Documentation

#define C (   a)    SCI_##a

Definition at line 252 of file request.h.

#define IREQ_ABORT_PATH_ACTIVE   6

Definition at line 89 of file request.h.

#define IREQ_ACTIVE   3

Definition at line 86 of file request.h.

#define IREQ_COMPLETE_IN_TARGET   0

Definition at line 83 of file request.h.

#define IREQ_NO_AUTO_FREE_TAG   7 /* Set when being explicitly managed */

Definition at line 90 of file request.h.

#define IREQ_PENDING_ABORT   4 /* Set == device was not suspended yet */

Definition at line 87 of file request.h.

#define IREQ_TC_ABORT_POSTED   5

Definition at line 88 of file request.h.

#define IREQ_TERMINATED   1

Definition at line 84 of file request.h.

#define IREQ_TMF   2

Definition at line 85 of file request.h.

#define isci_request_access_task (   req)    ((req)->ttype_ptr.io_task_ptr)

Definition at line 286 of file request.h.

#define isci_request_access_tmf (   req)    ((req)->ttype_ptr.tmf_task_ptr)

Definition at line 288 of file request.h.

#define REQUEST_STATES
Value:
{\
C(REQ_INIT),\
C(REQ_CONSTRUCTED),\
C(REQ_STP_UDMA_WAIT_TC_COMP),\
C(REQ_STP_UDMA_WAIT_D2H),\
C(REQ_STP_NON_DATA_WAIT_H2D),\
C(REQ_STP_NON_DATA_WAIT_D2H),\
C(REQ_STP_PIO_WAIT_H2D),\
C(REQ_STP_PIO_WAIT_FRAME),\
C(REQ_STP_PIO_DATA_IN),\
C(REQ_STP_PIO_DATA_OUT),\
C(REQ_ATAPI_WAIT_H2D),\
C(REQ_ATAPI_WAIT_PIO_SETUP),\
C(REQ_ATAPI_WAIT_D2H),\
C(REQ_ATAPI_WAIT_TC_COMP),\
C(REQ_TASK_WAIT_TC_COMP),\
C(REQ_TASK_WAIT_TC_RESP),\
C(REQ_SMP_WAIT_RESP),\
C(REQ_SMP_WAIT_TC_COMP),\
C(REQ_COMPLETED),\
C(REQ_ABORTING),\
C(REQ_FINAL),\
}

enum sci_base_request_states - request state machine states

: Simply the initial state for the base request state machine.

: This state indicates that the request has been constructed. This state is entered from the INITIAL state.

: This state indicates that the request has been started. This state is entered from the CONSTRUCTED state.

: : : :

: While in this state the IO request object is waiting for the TC completion notification for the H2D Register FIS

: While in this state the IO request object is waiting for either a PIO Setup FIS or a D2H register FIS. The type of frame received is based on the result of the prior frame and line conditions.

: While in this state the IO request object is waiting for a DATA frame from the device.

: While in this state the IO request object is waiting to transmit the next data frame to the device.

: While in this state the IO request object is waiting for the TC completion notification for the H2D Register FIS

: While in this state the IO request object is waiting for either a PIO Setup.

: The non-data IO transit to this state in this state after receiving TC completion. While in this state IO request object is waiting for D2H status frame as UF.

: When transmitting raw frames hardware reports task context completion after every frame submission, so in the non-accelerated case we need to expect the completion for the "cdb" frame.

: The AWAIT_TC_COMPLETION sub-state indicates that the started raw task management request is waiting for the transmission of the initial frame (i.e. command, task, etc.).

: This sub-state indicates that the started task management request is waiting for the reception of an unsolicited frame (i.e. response IU).

: This sub-state indicates that the started task management request is waiting for the reception of an unsolicited frame (i.e. response IU).

: The AWAIT_TC_COMPLETION sub-state indicates that the started SMP request is waiting for the transmission of the initial frame (i.e. command, task, etc.).

: This state indicates that the request has completed. This state is entered from the STARTED state. This state is entered from the ABORTING state.

: This state indicates that the request is in the process of being terminated/aborted. This state is entered from the CONSTRUCTED state. This state is entered from the STARTED state.

: Simply the final state for the base request state machine.

Definition at line 227 of file request.h.

#define SCU_SGL_SIZE   ((SCI_MAX_SCATTER_GATHER_ELEMENTS + 1) / 2)

Definition at line 123 of file request.h.

Function Documentation

int isci_request_execute ( struct isci_host ihost,
struct isci_remote_device idev,
struct sas_task task,
u16  tag 
)

Definition at line 3445 of file request.c.

struct isci_request* isci_tmf_request_from_tag ( struct isci_host ihost,
struct isci_tmf isci_tmf,
u16  tag 
)
read

Definition at line 3432 of file request.c.

const char* req_state_name ( enum sci_base_request_states  state)

Definition at line 66 of file request.c.

enum sci_status sci_io_request_event_handler ( struct isci_request ireq,
u32  event_code 
)

Definition at line 938 of file request.c.

enum sci_status sci_io_request_frame_handler ( struct isci_request ireq,
u32  frame_index 
)

Definition at line 1706 of file request.c.

enum sci_status sci_io_request_tc_completion ( struct isci_request ireq,
u32  code 
)

Definition at line 2393 of file request.c.

enum sci_status sci_io_request_terminate ( struct isci_request ireq)

Definition at line 858 of file request.c.

enum sci_status sci_request_complete ( struct isci_request ireq)

Definition at line 918 of file request.c.

enum sci_status sci_request_start ( struct isci_request ireq)

Definition at line 808 of file request.c.

void sci_smp_request_copy_response ( struct isci_request ireq)
enum sci_status sci_task_request_construct ( struct isci_host ihost,
struct isci_remote_device idev,
u16  io_tag,
struct isci_request ireq 
)

Definition at line 3118 of file request.c.

enum sci_status sci_task_request_construct_ssp ( struct isci_request ireq)

Definition at line 746 of file request.c.

enum sci_status sci_task_request_terminate ( struct isci_request ireq)

Variable Documentation

enum sci_base_request_states REQUEST_STATES

Definition at line 253 of file request.h.