Functions | |
| int32_t | ocs_port_cb (void *arg, ocs_hal_port_event_e event, void *data) |
| SLI port HAL callback. More... | |
| ocs_sport_t * | ocs_sport_alloc (ocs_domain_t *domain, uint64_t wwpn, uint64_t wwnn, uint32_t fc_id, uint8_t enable_ini, uint8_t enable_tgt) |
| Allocate a SLI port object. More... | |
| static void | _ocs_sport_free (void *arg) |
| Free a SLI port object. More... | |
| void | ocs_sport_force_free (ocs_sport_t *sport) |
| Free memory resources of a SLI port object. More... | |
| ocs_sport_t * | ocs_sport_get_instance (ocs_domain_t *domain, uint32_t index) |
| Return a SLI port object, given an instance index. More... | |
| ocs_sport_t * | ocs_sport_find (ocs_domain_t *domain, uint32_t d_id) |
| Find a SLI port object, given an FC_ID. More... | |
| ocs_sport_t * | ocs_sport_find_wwn (ocs_domain_t *domain, uint64_t wwnn, uint64_t wwpn) |
| Find a SLI port, given the WWNN and WWPN. More... | |
| int32_t | ocs_sport_attach (ocs_sport_t *sport, uint32_t fc_id) |
| Request a SLI port attach. More... | |
| void * | __ocs_sport_allocated (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg) |
| SLI port state machine: Physical sport allocated. More... | |
| void * | __ocs_sport_vport_init (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg) |
| SLI port state machine: Handle initial virtual port events. More... | |
| void * | __ocs_sport_vport_wait_alloc (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg) |
| SLI port state machine: Wait for the HAL SLI port allocation to complete. More... | |
| void * | __ocs_sport_vport_allocated (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg) |
| SLI port state machine: virtual sport allocated. More... | |
| void * | __ocs_sport_attached (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg) |
| SLI port state machine: Attached. More... | |
| void * | __ocs_sport_wait_shutdown (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg) |
| SLI port state machine: Wait for the node shutdowns to complete. More... | |
| void * | __ocs_sport_wait_port_free (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg) |
| SLI port state machine: Wait for the HAL's port free to complete. More... | |
| int32_t | ocs_vport_start (ocs_domain_t *domain) |
| Start the vports on a domain. More... | |
| static void | ocs_vport_link_down (ocs_sport_t *sport) |
| Clear the sport reference in the vport specification. More... | |
| int32_t | ocs_sport_vport_new (ocs_domain_t *domain, uint64_t wwpn, uint64_t wwnn, uint32_t fc_id, uint8_t ini, uint8_t tgt, void *tgt_data, void *ini_data, uint8_t restore_vport) |
| Allocate a new virtual SLI port. More... | |
| int32_t | ocs_sport_vport_del (ocs_t *ocs, ocs_domain_t *domain, uint64_t wwpn, uint64_t wwnn) |
| Remove a previously-allocated virtual port. More... | |
| int | ocs_ddump_sport (ocs_textbuf_t *textbuf, ocs_sli_port_t *sport) |
| Generate a SLI port ddump. More... | |
| void* __ocs_sport_allocated | ( | ocs_sm_ctx_t * | ctx, |
| ocs_sm_event_t | evt, | ||
| void * | arg | ||
| ) |
SLI port state machine: Physical sport allocated.
| ctx | Remote node state machine context. |
| evt | Event to process. |
| arg | Per event optional argument. |
Definition at line 607 of file ocs_sport.c.
| void* __ocs_sport_attached | ( | ocs_sm_ctx_t * | ctx, |
| ocs_sm_event_t | evt, | ||
| void * | arg | ||
| ) |
SLI port state machine: Attached.
| ctx | Remote node state machine context. |
| evt | Event to process. |
| arg | Per event optional argument. |
Definition at line 807 of file ocs_sport.c.
| void* __ocs_sport_vport_allocated | ( | ocs_sm_ctx_t * | ctx, |
| ocs_sm_event_t | evt, | ||
| void * | arg | ||
| ) |
SLI port state machine: virtual sport allocated.
| ctx | Remote node state machine context. |
| evt | Event to process. |
| arg | Per event optional argument. |
Definition at line 762 of file ocs_sport.c.
| void* __ocs_sport_vport_init | ( | ocs_sm_ctx_t * | ctx, |
| ocs_sm_event_t | evt, | ||
| void * | arg | ||
| ) |
SLI port state machine: Handle initial virtual port events.
| ctx | Remote node state machine context. |
| evt | Event to process. |
| arg | Per event optional argument. |
Definition at line 645 of file ocs_sport.c.
| void* __ocs_sport_vport_wait_alloc | ( | ocs_sm_ctx_t * | ctx, |
| ocs_sm_event_t | evt, | ||
| void * | arg | ||
| ) |
SLI port state machine: Wait for the HAL SLI port allocation to complete.
| ctx | Remote node state machine context. |
| evt | Event to process. |
| arg | Per event optional argument. |
Definition at line 696 of file ocs_sport.c.
| void* __ocs_sport_wait_port_free | ( | ocs_sm_ctx_t * | ctx, |
| ocs_sm_event_t | evt, | ||
| void * | arg | ||
| ) |
SLI port state machine: Wait for the HAL's port free to complete.
| ctx | Remote node state machine context. |
| evt | Event to process. |
| arg | Per event optional argument. |
Definition at line 934 of file ocs_sport.c.
| void* __ocs_sport_wait_shutdown | ( | ocs_sm_ctx_t * | ctx, |
| ocs_sm_event_t | evt, | ||
| void * | arg | ||
| ) |
SLI port state machine: Wait for the node shutdowns to complete.
| ctx | Remote node state machine context. |
| evt | Event to process. |
| arg | Per event optional argument. |
Definition at line 886 of file ocs_sport.c.
|
static |
Free a SLI port object.
| sport | Pointer to the SLI port object. |
Definition at line 222 of file ocs_sport.c.
| int ocs_ddump_sport | ( | ocs_textbuf_t * | textbuf, |
| ocs_sli_port_t * | sport | ||
| ) |
Generate a SLI port ddump.
| textbuf | Pointer to the text buffer. |
| sport | Pointer to the SLI-4 port. |
Definition at line 1203 of file ocs_sport.c.
| int32_t ocs_port_cb | ( | void * | arg, |
| ocs_hal_port_event_e | event, | ||
| void * | data | ||
| ) |
SLI port HAL callback.
| arg | Pointer to the OCS context. |
| event | HAL sport event. |
| data | Application-specific event (pointer to the sport). |
Definition at line 88 of file ocs_sport.c.
| ocs_sport_t* ocs_sport_alloc | ( | ocs_domain_t * | domain, |
| uint64_t | wwpn, | ||
| uint64_t | wwnn, | ||
| uint32_t | fc_id, | ||
| uint8_t | enable_ini, | ||
| uint8_t | enable_tgt | ||
| ) |
Allocate a SLI port object.
| domain | Pointer to the domain structure. |
| wwpn | World wide port name in host endian. |
| wwnn | World wide node name in host endian. |
| fc_id | Port ID of sport may be specified, use UINT32_MAX to fabric choose |
| enable_ini | Enables initiator capability on this port using a non-zero value. |
| enable_tgt | Enables target capability on this port using a non-zero value. |
Definition at line 144 of file ocs_sport.c.
| int32_t ocs_sport_attach | ( | ocs_sport_t * | sport, |
| uint32_t | fc_id | ||
| ) |
Request a SLI port attach.
| sport | Pointer to the sport context. |
| fc_id | FC_ID of which to attach. |
Definition at line 426 of file ocs_sport.c.
| ocs_sport_t* ocs_sport_find | ( | ocs_domain_t * | domain, |
| uint32_t | d_id | ||
| ) |
Find a SLI port object, given an FC_ID.
| domain | Pointer to the domain. |
| d_id | FC_ID to find. |
Definition at line 365 of file ocs_sport.c.
| ocs_sport_t* ocs_sport_find_wwn | ( | ocs_domain_t * | domain, |
| uint64_t | wwnn, | ||
| uint64_t | wwpn | ||
| ) |
Find a SLI port, given the WWNN and WWPN.
| domain | Pointer to the domain. |
| wwnn | World wide node name. |
| wwpn | World wide port name. |
Definition at line 397 of file ocs_sport.c.
| void ocs_sport_force_free | ( | ocs_sport_t * | sport | ) |
Free memory resources of a SLI port object.
| sport | Pointer to the SLI port object. |
Definition at line 299 of file ocs_sport.c.
| ocs_sport_t* ocs_sport_get_instance | ( | ocs_domain_t * | domain, |
| uint32_t | index | ||
| ) |
Return a SLI port object, given an instance index.
index.| domain | Pointer to the domain. |
| index | Instance index value to find. |
Definition at line 336 of file ocs_sport.c.
| int32_t ocs_sport_vport_del | ( | ocs_t * | ocs, |
| ocs_domain_t * | domain, | ||
| uint64_t | wwpn, | ||
| uint64_t | wwnn | ||
| ) |
Remove a previously-allocated virtual port.
| ocs | Pointer to the device object. |
| domain | Pointer to the domain structure (may be NULL). |
| wwpn | World wide port name of the port to delete (host endian). |
| wwnn | World wide node name of the port to delete (host endian). |
Definition at line 1115 of file ocs_sport.c.
| int32_t ocs_sport_vport_new | ( | ocs_domain_t * | domain, |
| uint64_t | wwpn, | ||
| uint64_t | wwnn, | ||
| uint32_t | fc_id, | ||
| uint8_t | ini, | ||
| uint8_t | tgt, | ||
| void * | tgt_data, | ||
| void * | ini_data, | ||
| uint8_t | restore_vport | ||
| ) |
Allocate a new virtual SLI port.
Note: If the WWPN is zero, the firmware will assign the WWNs.
| domain | Pointer to the domain context. |
| wwpn | World wide port name. |
| wwnn | World wide node name |
| fc_id | Requested port ID (used in fabric emulation mode). |
| ini | TRUE, if port is created as an initiator node. |
| tgt | TRUE, if port is created as a target node. |
| tgt_data | Pointer to target specific data |
| ini_data | Pointer to initiator specific data |
| restore_vport | If TRUE, then the vport will be re-created automatically on link disruption. |
Definition at line 1057 of file ocs_sport.c.
|
static |
Clear the sport reference in the vport specification.
| sport | Pointer to the sport context. |
Definition at line 1017 of file ocs_sport.c.
| int32_t ocs_vport_start | ( | ocs_domain_t * | domain | ) |
Start the vports on a domain.
| domain | Pointer to the domain context. |
Definition at line 969 of file ocs_sport.c.