Go to the source code of this file.
Declare driver's domain handler exported interface
Definition in file ocs_domain.h.
Functions | |
| int32_t | ocs_domain_init (ocs_t *ocs, ocs_domain_t *domain) |
| ocs_domain_t * | ocs_domain_find (ocs_t *ocs, uint64_t fcf_wwn) |
| Find the domain, given its FCF_WWN. More... | |
| ocs_domain_t * | ocs_domain_alloc (ocs_t *ocs, uint64_t fcf_wwn) |
| Allocate a domain object. More... | |
| void | ocs_domain_free (ocs_domain_t *domain) |
| Free a domain object. More... | |
| void | ocs_domain_force_free (ocs_domain_t *domain) |
| Free memory resources of a domain object. More... | |
| void | ocs_register_domain_list_empty_cb (ocs_t *ocs) |
| Register a callback when the domain_list goes empty. More... | |
| void | ocs_unregister_domain_list_empty_cb (ocs_t *ocs) |
| Unregister a callback for the domain_list empty cb. More... | |
| void | ocs_xport_domain_list_empty_cb (ocs_t *ocs, void *arg) |
| domain list empty callback More... | |
| uint64_t | ocs_get_wwn (ocs_hal_t *hal, ocs_hal_property_e prop) |
| Return the WWN as a uint64_t. More... | |
| static void | ocs_domain_lock_init (ocs_domain_t *domain) |
| static int32_t | ocs_domain_lock_try (ocs_domain_t *domain) |
| static void | ocs_domain_lock (ocs_domain_t *domain) |
| static void | ocs_domain_unlock (ocs_domain_t *domain) |
| int32_t | ocs_domain_cb (void *arg, ocs_hal_domain_event_e event, void *data) |
| Accept domain callback events from the HAL. More... | |
| void * | __ocs_domain_init (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg) |
| Domain state machine: Initial state. More... | |
| void * | __ocs_domain_wait_alloc (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg) |
| Domain state machine: Wait for the domain allocation to complete. More... | |
| void * | __ocs_domain_allocated (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg) |
| Domain state machine: Wait for the domain attach request. More... | |
| void * | __ocs_domain_wait_attach (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg) |
| Domain state machine: Wait for the HAL domain attach to complete. More... | |
| void * | __ocs_domain_ready (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg) |
| Domain state machine: Ready state. More... | |
| void * | __ocs_domain_wait_sports_free (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg) |
| Domain state machine: Wait for nodes to free prior to the domain shutdown. More... | |
| void * | __ocs_domain_wait_shutdown (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg) |
| Domain state machine: Complete the domain shutdown. More... | |
| void * | __ocs_domain_wait_domain_lost (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg) |
| Domain state machine: Wait for the domain alloc/attach completion after receiving a domain lost. More... | |
| void | ocs_domain_save_sparms (ocs_domain_t *domain, void *payload) |
| Save the port's service parameters. More... | |
| void | ocs_domain_attach (ocs_domain_t *domain, uint32_t s_id) |
| Initiator domain attach. More... | |
| int | ocs_domain_post_event (ocs_domain_t *domain, ocs_sm_event_t, void *) |
| int | ocs_ddump_domain (ocs_textbuf_t *textbuf, ocs_domain_t *domain) |
| Generate a domain ddump. More... | |
| void | __ocs_domain_attach_internal (ocs_domain_t *domain, uint32_t s_id) |
| Initiator domain attach. (internal call only) More... | |
| void __ocs_domain_attach_internal | ( | ocs_domain_t * | domain, |
| uint32_t | s_id | ||
| ) |
Initiator domain attach. (internal call only)
Assumes that the domain SM lock is already locked
The HAL domain attach function is started.
| domain | Pointer to the domain object. |
| s_id | FC_ID of which to register this domain. |
Definition at line 1280 of file ocs_domain.c.
| int ocs_ddump_domain | ( | ocs_textbuf_t * | textbuf, |
| ocs_domain_t * | domain | ||
| ) |
Generate a domain ddump.
Generates a domain ddump.
| textbuf | Pointer to the text buffer. |
| domain | Pointer to the domain context. |
Definition at line 1376 of file ocs_domain.c.
| ocs_domain_t* ocs_domain_alloc | ( | ocs_t * | ocs, |
| uint64_t | fcf_wwn | ||
| ) |
Allocate a domain object.
A domain object is allocated and initialized. It is associated with the ocs argument.
| ocs | Pointer to the OCS device. |
| fcf_wwn | FCF WWN of the domain. |
Definition at line 218 of file ocs_domain.c.
| void ocs_domain_attach | ( | ocs_domain_t * | domain, |
| uint32_t | s_id | ||
| ) |
Initiator domain attach.
The HAL domain attach function is started.
| domain | Pointer to the domain object. |
| s_id | FC_ID of which to register this domain. |
Definition at line 1299 of file ocs_domain.c.
| int32_t ocs_domain_cb | ( | void * | arg, |
| ocs_hal_domain_event_e | event, | ||
| void * | data | ||
| ) |
Accept domain callback events from the HAL.
HAL calls this function with various domain-related events.
| arg | Application-specified argument. |
| event | Domain event. |
| data | Event specific data. |
Definition at line 94 of file ocs_domain.c.
| ocs_domain_t* ocs_domain_find | ( | ocs_t * | ocs, |
| uint64_t | fcf_wwn | ||
| ) |
Find the domain, given its FCF_WWN.
Search the domain_list to find a matching domain object.
| ocs | Pointer to the OCS device. |
| fcf_wwn | FCF WWN to find. |
Definition at line 189 of file ocs_domain.c.
| void ocs_domain_force_free | ( | ocs_domain_t * | domain | ) |
Free memory resources of a domain object.
After the domain object is freed, its child objects are also freed.
| domain | Pointer to a domain object. |
Definition at line 341 of file ocs_domain.c.
| void ocs_domain_free | ( | ocs_domain_t * | domain | ) |
Free a domain object.
The domain object is freed.
| domain | Domain object to free. |
Definition at line 279 of file ocs_domain.c.
| int32_t ocs_domain_init | ( | ocs_t * | ocs, |
| ocs_domain_t * | domain | ||
| ) |
|
inlinestatic |
Definition at line 63 of file ocs_domain.h.
|
inlinestatic |
Definition at line 51 of file ocs_domain.h.
|
inlinestatic |
Definition at line 56 of file ocs_domain.h.
| int ocs_domain_post_event | ( | ocs_domain_t * | domain, |
| ocs_sm_event_t | , | ||
| void * | |||
| ) |
Definition at line 1307 of file ocs_domain.c.
| void ocs_domain_save_sparms | ( | ocs_domain_t * | domain, |
| void * | payload | ||
| ) |
Save the port's service parameters.
Service parameters from the fabric FLOGI are saved in the domain's flogi_service_params array.
| domain | Pointer to the domain. |
| payload | Service parameters to save. |
Definition at line 1261 of file ocs_domain.c.
|
inlinestatic |
Definition at line 70 of file ocs_domain.h.
| uint64_t ocs_get_wwn | ( | ocs_hal_t * | hal, |
| ocs_hal_property_e | prop | ||
| ) |
Return the WWN as a uint64_t.
Calls the HAL property function for the WWNN or WWPN, and returns the value as a uint64_t.
| hal | Pointer to the HAL object. |
| prop | HAL property. |
Definition at line 1349 of file ocs_domain.c.
| void ocs_register_domain_list_empty_cb | ( | ocs_t * | ocs | ) |
Register a callback when the domain_list goes empty.
A function callback may be registered when the domain_list goes empty.
| ocs | Pointer to a device object. |
Definition at line 389 of file ocs_domain.c.
| void ocs_unregister_domain_list_empty_cb | ( | ocs_t * | ocs | ) |
Unregister a callback for the domain_list empty cb.
A function callback may be unregistered when the domain_list goes empty.
| ocs | Pointer to a device object. |
Definition at line 370 of file ocs_domain.c.
| void ocs_xport_domain_list_empty_cb | ( | ocs_t * | ocs, |
| void * | arg | ||
| ) |
domain list empty callback
arg points to an ocs_sem_t instance, that is incremented.| ocs | Pointer to device object. |
| arg | Pointer to semaphore instance. |
Definition at line 771 of file ocs_xport.c.