Functions | |
| int32_t | ocs_scsi_ini_new_device (ocs_t *ocs) |
| Initializes any initiator fields on the ocs structure. More... | |
| int32_t | ocs_scsi_ini_del_device (ocs_t *ocs) |
| Tears down initiator members of ocs structure. More... | |
| int32_t | ocs_scsi_ini_new_domain (ocs_domain_t *domain) |
| Accept new domain notification. More... | |
| void | ocs_scsi_ini_del_domain (ocs_domain_t *domain) |
| Accept domain lost notification. More... | |
| int32_t | ocs_scsi_ini_new_sport (ocs_sport_t *sport) |
| Process creation of a new SPORT. More... | |
| void | ocs_scsi_ini_del_sport (ocs_sport_t *sport) |
| Process deletion of a SPORT. More... | |
| int32_t | ocs_scsi_new_target (ocs_node_t *node) |
| Receive notification of a new SCSI target node. More... | |
| int32_t | ocs_scsi_del_target (ocs_node_t *node, ocs_scsi_del_target_reason_e reason) |
| Delete a SCSI target node. More... | |
| void | ocs_scsi_ini_ddump (ocs_textbuf_t *textbuf, ocs_scsi_ddump_type_e type, void *obj) |
| Generate driver dump data for debugging. More... | |
| static int32_t | ocs_lnx_xport_unsol_cb (void *arg, ocs_cxn_t *cxn, ocs_hal_rq_buffer_t *bhs, uint32_t hdr_len, ocs_hal_rq_buffer_t *data, uint32_t data_len, uint8_t code) |
| Unsolicited event handler. More... | |
| static void | ocs_lnx_xport_fail_session (struct iscsi_cls_session *cls_session) |
| Helper function for marking sessions as failed. More... | |
| static void | ocs_lnx_xport_link_state (ocs_t *ocs, ocs_link_state_e link_state) |
| Called when the link changes state. More... | |
| static int32_t | ocs_lnx_xport_io_cb (ocs_io_t *io, ocs_scsi_io_status_e status, ocs_scsi_cmd_resp_t *rsp, uint32_t flags, void *arg) |
| IO completion handler for iSCSI initiator. More... | |
| struct iscsi_cls_session * | ocs_session_create (struct iscsi_endpoint *ep, u16 cmds_max, u16 qdepth, u32 initial_cmdsn) |
| Create a new iscsi session. More... | |
| void | ocs_session_destroy (struct iscsi_cls_session *cls_session) |
| Destroy an iSCSI session. More... | |
| struct iscsi_cls_conn * | ocs_conn_create (struct iscsi_cls_session *cls_session, u32 cid) |
| Create an instance of iSCSI connection. More... | |
| int | ocs_conn_bind (struct iscsi_cls_session *cls_session, struct iscsi_cls_conn *cls_conn, u64 transport_fd, int is_leading) |
| Binds an iSCSI connection to an endpoint. More... | |
| int | ocs_iface_set_param (struct Scsi_Host *shost, void *data, uint32_t dt_len) |
| int | ocs_iface_get_param (struct iscsi_iface *iface, enum iscsi_param_type param_type, int param, char *buf) |
| int | ocs_ep_get_param (struct iscsi_endpoint *ep, enum iscsi_param param, char *buf) |
| int | ocs_conn_get_param (struct iscsi_cls_conn *cls_conn, enum iscsi_param param, char *buf) |
| int | ocs_session_get_param (struct iscsi_cls_session *cls_session, enum iscsi_param param, char *buf) |
| int | ocs_set_param (struct iscsi_cls_conn *cls_conn, enum iscsi_param param, char *buf, int buflen) |
| int | ocs_set_host_param (struct Scsi_Host *shost, enum iscsi_host_param param, char *buf, int buflen) |
| int | ocs_get_host_param (struct Scsi_Host *shost, enum iscsi_host_param param, char *buf) |
| void | ocs_conn_get_stats (struct iscsi_cls_conn *cls_conn, struct iscsi_stats *stats) |
| void | ocs_set_update_ctx_options (ocs_hal_io_param_t *iparam, struct iscsi_conn *conn) |
| Set UPDATE CONTEXT options. More... | |
| int | ocs_conn_start (struct iscsi_cls_conn *cls_conn) |
| Offload of session to chip. More... | |
| static int | ocs_conn_update_context (struct iscsi_conn *conn) |
| static int | ocs_sockaddr_to_hal_ip (struct sockaddr *addr, ocs_hal_ip_address_t *hal_ip, uint16_t *port) |
| struct iscsi_endpoint * | ocs_ep_connect (struct Scsi_Host *shost, struct sockaddr *dst_addr, int non_blocking) |
| Ask the chip to create TCP connection. More... | |
| int | ocs_ep_poll (struct iscsi_endpoint *ep, int timeout_ms) |
| Poll to see if a connection is established. More... | |
| void | ocs_ep_disconnect (struct iscsi_endpoint *ep) |
| Tears down the TCP connection. More... | |
| int32_t | ocs_iscsi_mtask_cb_tcp_ack_wait_rsp (ocs_io_t *io, uint32_t exp_cmdsn, uint32_t max_cmdsn, uint8_t response) |
| Completion handler for non-SCSI initiator tasks that complete on TCP ACK. More... | |
| int32_t | ocs_iscsi_mtask_cb_tcp_ack_no_rsp (ocs_io_t *io, uint32_t exp_cmdsn, uint32_t max_cmdsn, uint8_t response) |
| Completion handler for non-SCSI initiator tasks that complete on TCP ACK. More... | |
| int32_t | ocs_iscsi_mtask_cb_with_rsp (ocs_io_t *io, uint32_t exp_cmdsn, uint32_t max_cmdsn, uint8_t response) |
| Completion handler for non-SCSI initiator tasks. More... | |
| static int | ocs_xmit_mtask (struct iscsi_task *task) |
| Transmit a management task. More... | |
| static void | ocs_task_cleanup (struct iscsi_task *task) |
| Clean up an iSCSI task. More... | |
| static int | ocs_task_xmit (struct iscsi_task *task) |
| Transmit an iSCSI task. More... | |
| void | ocs_cleanup_task (struct iscsi_task *task) |
| static int | ocs_alloc_pdu (struct iscsi_task *task, uint8_t opcode) |
| Allocate a new PDU. More... | |
| umode_t | ocs_attr_is_visible (int param_type, int param) |
| Return sysfs visibility for a parameter. More... | |
Variables | |
| struct scsi_host_template | host_template |
| Host Template. More... | |
| struct iscsi_transport | ocs_lnx_xport_iscsi |
| iSCSI transport entry points. More... | |
|
static |
Allocate a new PDU.
| task | iSCSI task to which the new PDU belongs. |
| opcode | Opcode of the new PDU. |
Definition at line 2239 of file ocs_openiscsi_ini.c.
| umode_t ocs_attr_is_visible | ( | int | param_type, |
| int | param | ||
| ) |
Return sysfs visibility for a parameter.
| param_type | Type of parameter to query. |
| param | Parameter to query. |
Definition at line 2323 of file ocs_openiscsi_ini.c.
| void ocs_cleanup_task | ( | struct iscsi_task * | task | ) |
| task | The iSCSI task to be cleaned up. |
Definition at line 2201 of file ocs_openiscsi_ini.c.
| int ocs_conn_bind | ( | struct iscsi_cls_session * | cls_session, |
| struct iscsi_cls_conn * | cls_conn, | ||
| u64 | transport_fd, | ||
| int | is_leading | ||
| ) |
Binds an iSCSI connection to an endpoint.
| cls_session | Pointer to iSCSI session. |
| cls_conn | Pointer to iSCSI connection. |
| transport_fd | File descriptor for the endpoint (not used) |
| is_leading | Not used. |
Definition at line 1040 of file ocs_openiscsi_ini.c.
| struct iscsi_cls_conn* ocs_conn_create | ( | struct iscsi_cls_session * | cls_session, |
| u32 | cid | ||
| ) |
Create an instance of iSCSI connection.
| cls_session | TBD. |
| cid | TBD. |
Definition at line 984 of file ocs_openiscsi_ini.c.
| int ocs_conn_get_param | ( | struct iscsi_cls_conn * | cls_conn, |
| enum iscsi_param | param, | ||
| char * | buf | ||
| ) |
| cls_conn | |
| param | |
| buf |
Definition at line 1147 of file ocs_openiscsi_ini.c.
| void ocs_conn_get_stats | ( | struct iscsi_cls_conn * | cls_conn, |
| struct iscsi_stats * | stats | ||
| ) |
| int ocs_conn_start | ( | struct iscsi_cls_conn * | cls_conn | ) |
Offload of session to chip.
| cls_conn |
Definition at line 1427 of file ocs_openiscsi_ini.c.
|
static |
| struct iscsi_endpoint* ocs_ep_connect | ( | struct Scsi_Host * | shost, |
| struct sockaddr * | dst_addr, | ||
| int | non_blocking | ||
| ) |
Ask the chip to create TCP connection.
| shost | Pointer to Scsi_Host structure. |
| dst_addr | The IP address of the target. |
| non_blocking | Blocking or non-blocking call. |
Definition at line 1558 of file ocs_openiscsi_ini.c.
| void ocs_ep_disconnect | ( | struct iscsi_endpoint * | ep | ) |
Tears down the TCP connection.
| ep | The endpoint to be disconnected. |
Definition at line 1677 of file ocs_openiscsi_ini.c.
| int ocs_ep_get_param | ( | struct iscsi_endpoint * | ep, |
| enum iscsi_param | param, | ||
| char * | buf | ||
| ) |
| int ocs_ep_poll | ( | struct iscsi_endpoint * | ep, |
| int | timeout_ms | ||
| ) |
Poll to see if a connection is established.
| ep | The endpoint to be polled. |
| timeout_ms | Maximum time to wait (not used). |
Definition at line 1649 of file ocs_openiscsi_ini.c.
| int ocs_get_host_param | ( | struct Scsi_Host * | shost, |
| enum iscsi_host_param | param, | ||
| char * | buf | ||
| ) |
| int ocs_iface_get_param | ( | struct iscsi_iface * | iface, |
| enum iscsi_param_type | param_type, | ||
| int | param, | ||
| char * | buf | ||
| ) |
| iface | TBD. |
| param_type | TBD. |
| param | TBD. |
| buf | TBD. |
Definition at line 1109 of file ocs_openiscsi_ini.c.
| int ocs_iface_set_param | ( | struct Scsi_Host * | shost, |
| void * | data, | ||
| uint32_t | dt_len | ||
| ) |
| shost | TBD. |
| data | TBD. |
| dt_len | TBD. |
Definition at line 1090 of file ocs_openiscsi_ini.c.
| int32_t ocs_iscsi_mtask_cb_tcp_ack_no_rsp | ( | ocs_io_t * | io, |
| uint32_t | exp_cmdsn, | ||
| uint32_t | max_cmdsn, | ||
| uint8_t | response | ||
| ) |
Completion handler for non-SCSI initiator tasks that complete on TCP ACK.
| io | Pointer to the io that completed. |
| exp_cmdsn | TBD. |
| max_cmdsn | TBD. |
| response | TBD. |
Definition at line 1806 of file ocs_openiscsi_ini.c.
| int32_t ocs_iscsi_mtask_cb_tcp_ack_wait_rsp | ( | ocs_io_t * | io, |
| uint32_t | exp_cmdsn, | ||
| uint32_t | max_cmdsn, | ||
| uint8_t | response | ||
| ) |
Completion handler for non-SCSI initiator tasks that complete on TCP ACK.
| io | Pointer to the io that completed. |
| exp_cmdsn | TBD. |
| max_cmdsn | TBD. |
| response | TBD. |
Definition at line 1747 of file ocs_openiscsi_ini.c.
| int32_t ocs_iscsi_mtask_cb_with_rsp | ( | ocs_io_t * | io, |
| uint32_t | exp_cmdsn, | ||
| uint32_t | max_cmdsn, | ||
| uint8_t | response | ||
| ) |
Completion handler for non-SCSI initiator tasks.
| io | Pointer to the io that completed. |
| exp_cmdsn | TBD. |
| max_cmdsn | TBD. |
| response | TBD. |
Definition at line 1882 of file ocs_openiscsi_ini.c.
|
static |
Helper function for marking sessions as failed.
| cls_session | TBD. |
Definition at line 764 of file ocs_openiscsi_ini.c.
|
static |
IO completion handler for iSCSI initiator.
| io | Pointer to the io that completed. |
| status | OCS_SCSI status. |
| rsp | SCSI response, including SCSI status. |
| flags | Flags (currently unused). |
| arg | Argument from the upper layer (currently unused). |
Definition at line 819 of file ocs_openiscsi_ini.c.
|
static |
Called when the link changes state.
| ocs | Pointer to the ocs structure. |
| link_state | Provides the status of the link. |
Definition at line 778 of file ocs_openiscsi_ini.c.
|
static |
Unsolicited event handler.
| arg | TBD. |
| cxn | TBD. |
| bhs | TBD. |
| hdr_len | TBD. |
| data | TBD. |
| data_len | TBD. |
| code | TBD. |
Definition at line 667 of file ocs_openiscsi_ini.c.
| int32_t ocs_scsi_del_target | ( | ocs_node_t * | node, |
| ocs_scsi_del_target_reason_e | reason | ||
| ) |
Delete a SCSI target node.
| node | Pointer node being deleted. |
| reason | Reason for deleting the target. |
Definition at line 485 of file ocs_openiscsi_ini.c.
| void ocs_scsi_ini_ddump | ( | ocs_textbuf_t * | textbuf, |
| ocs_scsi_ddump_type_e | type, | ||
| void * | obj | ||
| ) |
Generate driver dump data for debugging.
| textbuf | The structure into which the data is dumped. |
| type | The type of data to dump. |
| obj | TBD |
Definition at line 505 of file ocs_openiscsi_ini.c.
| int32_t ocs_scsi_ini_del_device | ( | ocs_t * | ocs | ) |
Tears down initiator members of ocs structure.
| ocs | Pointer to ocs. |
Definition at line 322 of file ocs_openiscsi_ini.c.
| void ocs_scsi_ini_del_domain | ( | ocs_domain_t * | domain | ) |
Accept domain lost notification.
| domain | Pointer to domain. |
Definition at line 391 of file ocs_openiscsi_ini.c.
| void ocs_scsi_ini_del_sport | ( | ocs_sport_t * | sport | ) |
Process deletion of a SPORT.
| sport | The SPORT that has been deleted. |
Definition at line 435 of file ocs_openiscsi_ini.c.
| int32_t ocs_scsi_ini_new_device | ( | ocs_t * | ocs | ) |
Initializes any initiator fields on the ocs structure.
| ocs | Pointer to ocs. |
Definition at line 234 of file ocs_openiscsi_ini.c.
| int32_t ocs_scsi_ini_new_domain | ( | ocs_domain_t * | domain | ) |
Accept new domain notification.
| domain | Pointer to domain. |
Definition at line 363 of file ocs_openiscsi_ini.c.
| int32_t ocs_scsi_ini_new_sport | ( | ocs_sport_t * | sport | ) |
Process creation of a new SPORT.
| sport | The SPORT that has been created. |
Definition at line 413 of file ocs_openiscsi_ini.c.
| int32_t ocs_scsi_new_target | ( | ocs_node_t * | node | ) |
Receive notification of a new SCSI target node.
| node | Pointer to new remote initiator node. |
Definition at line 457 of file ocs_openiscsi_ini.c.
| struct iscsi_cls_session* ocs_session_create | ( | struct iscsi_endpoint * | ep, |
| u16 | cmds_max, | ||
| u16 | qdepth, | ||
| u32 | initial_cmdsn | ||
| ) |
Create a new iscsi session.
| ep | TBD. |
| cmds_max | Maximum commands supported. |
| qdepth | Maximum queue depth. |
| initial_cmdsn | Initial iSCSI CMDSN. |
Definition at line 916 of file ocs_openiscsi_ini.c.
| void ocs_session_destroy | ( | struct iscsi_cls_session * | cls_session | ) |
Destroy an iSCSI session.
| cls_session | Pointer to the iSCSI session to destroy. |
Definition at line 968 of file ocs_openiscsi_ini.c.
| int ocs_session_get_param | ( | struct iscsi_cls_session * | cls_session, |
| enum iscsi_param | param, | ||
| char * | buf | ||
| ) |
| cls_session | |
| param | |
| buf |
Definition at line 1190 of file ocs_openiscsi_ini.c.
| int ocs_set_host_param | ( | struct Scsi_Host * | shost, |
| enum iscsi_host_param | param, | ||
| char * | buf, | ||
| int | buflen | ||
| ) |
| shost | |
| param | |
| buf | |
| buflen |
Definition at line 1322 of file ocs_openiscsi_ini.c.
| int ocs_set_param | ( | struct iscsi_cls_conn * | cls_conn, |
| enum iscsi_param | param, | ||
| char * | buf, | ||
| int | buflen | ||
| ) |
| cls_conn | |
| param | |
| buf | |
| buflen |
Definition at line 1219 of file ocs_openiscsi_ini.c.
| void ocs_set_update_ctx_options | ( | ocs_hal_io_param_t * | iparam, |
| struct iscsi_conn * | conn | ||
| ) |
Set UPDATE CONTEXT options.
| iparam | |
| conn |
Definition at line 1398 of file ocs_openiscsi_ini.c.
|
static |
| addr | |
| hal_ip | |
| port |
Definition at line 1519 of file ocs_openiscsi_ini.c.
|
static |
Clean up an iSCSI task.
| task | The iSCSI task to transmit. |
Definition at line 2067 of file ocs_openiscsi_ini.c.
|
static |
Transmit an iSCSI task.
| task | The iSCSI task to transmit. |
Definition at line 2103 of file ocs_openiscsi_ini.c.
|
static |
Transmit a management task.
| task | Task to be transmitted. |
Definition at line 1968 of file ocs_openiscsi_ini.c.
| struct scsi_host_template host_template |
Host Template.
Definition at line 103 of file ocs_openiscsi_ini.c.
| struct iscsi_transport ocs_lnx_xport_iscsi |
iSCSI transport entry points.
Definition at line 2407 of file ocs_openiscsi_ini.c.