39 #if !defined(__OCS_DRV_FC_H__)
40 #define __OCS_DRV_FC_H__
42 #define OCS_INCLUDE_FC
46 #include "ocs_fc_config.h"
52 #if defined(ENABLE_FABRIC_EMULATION)
53 #include "ocs_femul.h"
93 char businfo[OCS_DISPLAY_BUS_INFO_LENGTH];
178 #ifdef OCS_USPACE_SPDK
183 #define ocs_is_fc_initiator_enabled() (ocs->enable_ini)
184 #define ocs_is_fc_target_enabled() (ocs->enable_tgt)
189 ocs_rlock_init(ocs, &ocs->lock,
"ocsdevicelock");
194 ocs_rlock_free(&ocs->lock);
196 static inline int32_t
199 return ocs_rlock_try(&ocs->lock);
201 static inline int32_t
205 bool lock_acquired = FALSE;
207 for (i = 0; i < retries; i++) {
208 if (ocs_rlock_try_timeout(&ocs->lock, timeout_ms)) {
209 lock_acquired = TRUE;
212 ocs_log_info(ocs,
"device lock timeout. Retrying(%d) attempts\n", (i + 1));
215 return lock_acquired;
220 ocs_rlock_acquire(&ocs->lock);
225 ocs_rlock_release(&ocs->lock);
231 static inline ocs_io_t *
247 return (ocs->hal.sli.config.enable_bbcr && ocs->enable_bbcr);
255 #include "ocs_node.h"
257 #include "ocs_unsol.h"
264 #endif // __OCS_DRV_FC_H__
void(* domain_list_empty_cb)(ocs_t *ocs, void *arg)
ocs_mgmt_functions_t * ini_mgmt_functions
ocs_lock_t domain_list_empty_cb_lock
target private ocs structure
ocs_t * ocs_get_instance(uint32_t index)
Returns a pointer to the ocs structure given the instance index.
ocs_io_t * ocs_io_pool_io_alloc(ocs_io_pool_t *io_pool)
Allocate an object used to track an IO.
void * domain_list_empty_cb_arg
uint8_t enable_auto_recovery
char businfo[OCS_DISPLAY_BUS_INFO_LENGTH]
ocs_err_injection_e err_injection
uint32_t max_isr_time_msec
static void ocs_device_lock_init(ocs_t *ocs)
uint16_t pci_subsystem_device
ocs_pm_context_t pm_context
ocs_textbuf_t ddump_saved
static void ocs_device_lock(ocs_t *ocs)
static void ocs_device_lock_free(ocs_t *ocs)
uint32_t target_io_timer_sec
uint8_t sliport_healthcheck
ocs_mgmt_functions_t * tgt_mgmt_functions
void ocs_io_pool_io_free(ocs_io_pool_t *io_pool, ocs_io_t *io)
Free an object used to track an IO.
uint32_t max_remote_nodes
int32_t ocs_start_event_processing(ocs_os_t *ocs_os)
static void ocs_device_unlock(ocs_t *ocs)
uint32_t rq_selection_policy
uint8_t domain_shutdown_timedout
uint16_t watchdog_timeout
struct ocs_fw_dump fw_dump
static int32_t ocs_device_lock_try(ocs_t *ocs)
A structure used to contain all data related to an adapter for this driver.
time_t tgt_rscn_period_msec
const char * driver_version
char display_name[OCS_DISPLAY_NAME_LENGTH]
uint32_t cq_process_limit
int32_t holdoff_link_online
static bool ocs_bbcr_enabled(ocs_t *ocs)
uint32_t domain_instance_count
void ocs_stop_event_processing(ocs_os_t *ocs_os)
time_t tgt_rscn_delay_msec
int32_t ocs_get_bus_dev_func(ocs_t *ocs, uint8_t *bus, uint8_t *dev, uint8_t *func)
ocs_sem_t domain_list_empty_cb_sem
uint16_t pci_subsystem_vendor
uint8_t ocs_req_fw_upgrade
static void ocs_io_free(ocs_t *ocs, ocs_io_t *io)
static int32_t ocs_device_lock_try_timeout(ocs_t *ocs, uint32_t timeout_ms, uint8_t retries)
bool explicit_buffer_list
static ocs_io_t * ocs_io_alloc(ocs_t *ocs)
ocs_mgmt_functions_t * mgmt_functions
#define OCS_DISPLAY_NAME_LENGTH
const char * sliport_pause_errors