FreeBSD kernel CAM code
ctl_ha.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  ctl_ha_dt_req
 

Typedefs

typedef void(* ctl_ha_dt_cb) (struct ctl_ha_dt_req *)
 
typedef void(* ctl_evt_handler) (ctl_ha_channel channel, ctl_ha_event event, int param)
 

Enumerations

enum  ctl_ha_mode { CTL_HA_MODE_ACT_STBY , CTL_HA_MODE_SER_ONLY , CTL_HA_MODE_XFER }
 
enum  ctl_ha_channel { CTL_HA_CHAN_CTL , CTL_HA_CHAN_DATA , CTL_HA_CHAN_MAX }
 
enum  ctl_ha_event { CTL_HA_EVT_NONE , CTL_HA_EVT_MSG_RECV , CTL_HA_EVT_LINK_CHANGE , CTL_HA_EVT_MAX }
 
enum  ctl_ha_status {
  CTL_HA_STATUS_WAIT , CTL_HA_STATUS_SUCCESS , CTL_HA_STATUS_ERROR , CTL_HA_STATUS_INVALID ,
  CTL_HA_STATUS_DISCONNECT , CTL_HA_STATUS_BUSY , CTL_HA_STATUS_MAX
}
 
enum  ctl_ha_dt_cmd { CTL_HA_DT_CMD_READ , CTL_HA_DT_CMD_WRITE }
 
enum  ctl_ha_link_state { CTL_HA_LINK_OFFLINE = 0x00 , CTL_HA_LINK_UNKNOWN = 0x01 , CTL_HA_LINK_ONLINE = 0x02 }
 

Functions

ctl_ha_status ctl_ha_msg_init (struct ctl_softc *softc)
 
void ctl_ha_msg_shutdown (struct ctl_softc *softc)
 
ctl_ha_status ctl_ha_msg_destroy (struct ctl_softc *softc)
 
void ctl_ha_register_evthandler (ctl_ha_channel channel, ctl_evt_handler handler)
 
ctl_ha_status ctl_ha_msg_register (ctl_ha_channel channel, ctl_evt_handler handler)
 
ctl_ha_status ctl_ha_msg_recv (ctl_ha_channel channel, void *addr, size_t len, int wait)
 
ctl_ha_status ctl_ha_msg_send (ctl_ha_channel channel, const void *addr, size_t len, int wait)
 
ctl_ha_status ctl_ha_msg_send2 (ctl_ha_channel channel, const void *addr, size_t len, const void *addr2, size_t len2, int wait)
 
ctl_ha_status ctl_ha_msg_abort (ctl_ha_channel channel)
 
ctl_ha_status ctl_ha_msg_deregister (ctl_ha_channel channel)
 
struct ctl_ha_dt_reqctl_dt_req_alloc (void)
 
void ctl_dt_req_free (struct ctl_ha_dt_req *req)
 
ctl_ha_status ctl_dt_single (struct ctl_ha_dt_req *req)
 

Typedef Documentation

◆ ctl_evt_handler

typedef void(* ctl_evt_handler) (ctl_ha_channel channel, ctl_ha_event event, int param)

Definition at line 117 of file ctl_ha.h.

◆ ctl_ha_dt_cb

typedef void(* ctl_ha_dt_cb) (struct ctl_ha_dt_req *)

Definition at line 99 of file ctl_ha.h.

Enumeration Type Documentation

◆ ctl_ha_channel

Enumerator
CTL_HA_CHAN_CTL 
CTL_HA_CHAN_DATA 
CTL_HA_CHAN_MAX 

Definition at line 62 of file ctl_ha.h.

◆ ctl_ha_dt_cmd

Enumerator
CTL_HA_DT_CMD_READ 
CTL_HA_DT_CMD_WRITE 

Definition at line 92 of file ctl_ha.h.

◆ ctl_ha_event

Enumerator
CTL_HA_EVT_NONE 
CTL_HA_EVT_MSG_RECV 
CTL_HA_EVT_LINK_CHANGE 
CTL_HA_EVT_MAX 

Definition at line 75 of file ctl_ha.h.

◆ ctl_ha_link_state

Enumerator
CTL_HA_LINK_OFFLINE 
CTL_HA_LINK_UNKNOWN 
CTL_HA_LINK_ONLINE 

Definition at line 137 of file ctl_ha.h.

◆ ctl_ha_mode

Enumerator
CTL_HA_MODE_ACT_STBY 
CTL_HA_MODE_SER_ONLY 
CTL_HA_MODE_XFER 

Definition at line 51 of file ctl_ha.h.

◆ ctl_ha_status

Enumerator
CTL_HA_STATUS_WAIT 
CTL_HA_STATUS_SUCCESS 
CTL_HA_STATUS_ERROR 
CTL_HA_STATUS_INVALID 
CTL_HA_STATUS_DISCONNECT 
CTL_HA_STATUS_BUSY 
CTL_HA_STATUS_MAX 

Definition at line 82 of file ctl_ha.h.

Function Documentation

◆ ctl_dt_req_alloc()

struct ctl_ha_dt_req * ctl_dt_req_alloc ( void  )

Definition at line 765 of file ctl_ha.c.

Referenced by ctl_datamove_remote_xfer().

Here is the caller graph for this function:

◆ ctl_dt_req_free()

void ctl_dt_req_free ( struct ctl_ha_dt_req req)

Definition at line 775 of file ctl_ha.c.

Referenced by ctl_datamove_remote_read_cb(), ctl_datamove_remote_write_cb(), and ctl_datamove_remote_xfer().

Here is the caller graph for this function:

◆ ctl_dt_single()

◆ ctl_ha_msg_abort()

◆ ctl_ha_msg_deregister()

ctl_ha_status ctl_ha_msg_deregister ( ctl_ha_channel  channel)

Definition at line 622 of file ctl_ha.c.

References CTL_HA_CHAN_MAX, CTL_HA_STATUS_SUCCESS, ha_softc::ha_handler, and ha_softc.

Referenced by ctl_ha_msg_destroy(), and ctl_ha_shutdown().

Here is the caller graph for this function:

◆ ctl_ha_msg_destroy()

ctl_ha_status ctl_ha_msg_destroy ( struct ctl_softc softc)

Definition at line 930 of file ctl_ha.c.

References CTL_HA_CHAN_DATA, ctl_ha_msg_deregister(), ctl_ha_msg_shutdown(), CTL_HA_STATUS_SUCCESS, ha_softc::ha_lock, ha_softc::ha_shutdown_eh, and ha_softc.

Referenced by ctl_ha_init(), and ctl_ha_shutdown().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ctl_ha_msg_init()

◆ ctl_ha_msg_recv()

ctl_ha_status ctl_ha_msg_recv ( ctl_ha_channel  channel,
void *  addr,
size_t  len,
int  wait 
)

◆ ctl_ha_msg_register()

ctl_ha_status ctl_ha_msg_register ( ctl_ha_channel  channel,
ctl_evt_handler  handler 
)

Definition at line 611 of file ctl_ha.c.

References CTL_HA_CHAN_MAX, CTL_HA_STATUS_SUCCESS, ha_softc::ha_handler, and ha_softc.

Referenced by ctl_ha_init(), and ctl_ha_msg_init().

Here is the caller graph for this function:

◆ ctl_ha_msg_send()

◆ ctl_ha_msg_send2()

ctl_ha_status ctl_ha_msg_send2 ( ctl_ha_channel  channel,
const void *  addr,
size_t  len,
const void *  addr2,
size_t  len2,
int  wait 
)

◆ ctl_ha_msg_shutdown()

void ctl_ha_msg_shutdown ( struct ctl_softc softc)

Definition at line 911 of file ctl_ha.c.

References ha_softc::ha_lock, ha_softc::ha_shutdown, ha_softc, and ha_softc::ha_wakeup.

Referenced by ctl_ha_msg_destroy(), ctl_ha_msg_init(), and ctl_ha_shutdown().

Here is the caller graph for this function:

◆ ctl_ha_register_evthandler()

void ctl_ha_register_evthandler ( ctl_ha_channel  channel,
ctl_evt_handler  handler 
)