FreeBSD kernel CAM code
|
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_req * | ctl_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 void(* ctl_evt_handler) (ctl_ha_channel channel, ctl_ha_event event, int param) |
typedef void(* ctl_ha_dt_cb) (struct ctl_ha_dt_req *) |
enum ctl_ha_channel |
enum ctl_ha_dt_cmd |
enum ctl_ha_event |
enum ctl_ha_link_state |
enum ctl_ha_mode |
enum ctl_ha_status |
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().
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().
ctl_ha_status ctl_dt_single | ( | struct ctl_ha_dt_req * | req | ) |
Definition at line 785 of file ctl_ha.c.
References ctl_ha_dt_req::callback, ha_dt_msg_wire::command, ctl_ha_dt_req::command, CTL_HA_CHAN_DATA, CTL_HA_DT_CMD_READ, ctl_ha_msg_send(), ctl_ha_msg_send2(), CTL_HA_STATUS_WAIT, ha_softc::ha_lock, ha_softc, ha_dt_msg_wire::local, ctl_ha_dt_req::local, ha_dt_msg_wire::remote, ctl_ha_dt_req::remote, ha_dt_msg_wire::size, and ctl_ha_dt_req::size.
Referenced by ctl_datamove_remote_xfer().
ctl_ha_status ctl_ha_msg_abort | ( | ctl_ha_channel | channel | ) |
Definition at line 749 of file ctl_ha.c.
References CTL_HA_STATUS_SUCCESS, ha_softc::ha_disconnect, ha_softc::ha_lock, ha_softc, and ha_softc::ha_wakeup.
Referenced by ctl_isc_event_handler(), ctl_isc_iid_sync(), ctl_isc_login(), ctl_isc_lun_sync(), ctl_isc_mode_sync(), ctl_isc_port_sync(), and ctl_isc_ua().
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().
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().
ctl_ha_status ctl_ha_msg_init | ( | struct ctl_softc * | softc | ) |
Definition at line 878 of file ctl_ha.c.
References ctl_dt_event_handler(), CTL_HA_CHAN_DATA, ctl_ha_conn_thread(), ctl_ha_msg_register(), ctl_ha_msg_shutdown(), ctl_ha_peer_sysctl(), CTL_HA_STATUS_ERROR, CTL_HA_STATUS_SUCCESS, ctl_softc::ctl_proc, ha_softc::ha_ctl_softc, ha_softc::ha_lock, ha_softc::ha_sendq, ha_softc::ha_shutdown_eh, ha_softc, ctl_softc::sysctl_ctx, and ctl_softc::sysctl_tree.
Referenced by ctl_ha_init().
ctl_ha_status ctl_ha_msg_recv | ( | ctl_ha_channel | channel, |
void * | addr, | ||
size_t | len, | ||
int | wait | ||
) |
Definition at line 636 of file ctl_ha.c.
References CTL_HA_STATUS_DISCONNECT, CTL_HA_STATUS_ERROR, CTL_HA_STATUS_SUCCESS, ha_softc::ha_connected, ha_softc::ha_disconnect, ha_softc::ha_lock, ha_softc::ha_so, ha_softc, and ha_softc::ha_wakeup.
Referenced by ctl_dt_event_handler(), and ctl_isc_event_handler().
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().
ctl_ha_status ctl_ha_msg_send | ( | ctl_ha_channel | channel, |
const void * | addr, | ||
size_t | len, | ||
int | wait | ||
) |
Definition at line 741 of file ctl_ha.c.
References ha_msg_wire::channel, and ctl_ha_msg_send2().
Referenced by ctl_abort_task(), ctl_abort_tasks_lun(), ctl_dt_single(), ctl_ha_datamove(), ctl_ha_done(), ctl_i_t_nexus_reset(), ctl_isc_announce_iid(), ctl_isc_announce_lun(), ctl_isc_announce_mode(), ctl_isc_announce_port(), ctl_isc_ha_link_up(), ctl_lun_capacity_changed(), ctl_lun_has_media(), ctl_lun_reset(), ctl_persistent_reserve_out(), ctl_pro_preempt(), ctl_process_done(), ctl_scsiio_precheck(), ctl_send_datamove_done(), ctl_serialize_other_sc_cmd(), ctl_target_reset(), ctl_thresh_thread(), and ctl_try_unblock_io().
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 | ||
) |
Definition at line 675 of file ctl_ha.c.
References ha_msg_wire::channel, CTL_HA_STATUS_DISCONNECT, CTL_HA_STATUS_ERROR, CTL_HA_STATUS_SUCCESS, ha_softc::ha_connected, ha_softc::ha_disconnect, ha_softc::ha_lock, ha_softc::ha_sendq, ha_softc, ha_softc::ha_wakeup, and ha_msg_wire::length.
Referenced by ctl_dt_event_handler(), ctl_dt_single(), and ctl_ha_msg_send().
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().
void ctl_ha_register_evthandler | ( | ctl_ha_channel | channel, |
ctl_evt_handler | handler | ||
) |