/freebsd/sys/dev/ocs_fc/ |
H A D | ocs_pci.c | 39 #include "ocs.h" 44 static MALLOC_DEFINE(M_OCS, "OCS", "OneCore Storage data"); 68 static int32_t ocs_init_dma_tag(struct ocs_softc *ocs); 70 static int32_t ocs_setup_fcports(ocs_t *ocs); 116 ocs_map_g7_bars(device_t dev, struct ocs_softc *ocs) in ocs_map_g7_bars() argument 130 ocs->reg[r].rid = PCIR_BAR(i); in ocs_map_g7_bars() 131 ocs->reg[r].res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, in ocs_map_g7_bars() 132 &ocs->reg[r].rid, RF_ACTIVE); in ocs_map_g7_bars() 133 if (ocs->reg[r].res) { in ocs_map_g7_bars() 134 ocs->reg[r].btag = rman_get_bustag(ocs->reg[r].res); in ocs_map_g7_bars() [all …]
|
H A D | ocs_xport.c | 38 #include "ocs.h" 59 * @param ocs Pointer to device instance. 64 ocs_xport_alloc(ocs_t *ocs) in ocs_xport_alloc() argument 68 ocs_assert(ocs, NULL); in ocs_xport_alloc() 69 xport = ocs_malloc(ocs, sizeof(*xport), OCS_M_ZERO); in ocs_xport_alloc() 71 xport->ocs = ocs; in ocs_xport_alloc() 89 ocs_t *ocs = xport->ocs; in ocs_xport_rq_threads_teardown() local 102 ocs_log_debug(ocs, "wait for thread %d to exit\n", i); in ocs_xport_rq_threads_teardown() 106 ocs_log_debug(ocs, "thread %d to exited\n", i); in ocs_xport_rq_threads_teardown() 130 ocs_t *ocs = xport->ocs; in ocs_xport_rq_threads_create() local [all …]
|
H A D | ocs_ioctl.c | 32 #include "ocs.h" 56 ocs_firmware_write(ocs_t *ocs, const uint8_t *buf, size_t buf_len, uint8_t *change_status); 73 struct ocs_softc *ocs = arg; in __ocs_ioctl_mbox_cb() local 76 mtx_lock(&ocs->dbg_lock); in __ocs_ioctl_mbox_cb() 78 mtx_unlock(&ocs->dbg_lock); in __ocs_ioctl_mbox_cb() 86 ocs_process_sli_config (ocs_t *ocs, ocs_ioctl_elxu_mbox_t *mcmd, ocs_dma_t *dma) in ocs_process_sli_config() argument 100 if (ocs_dma_alloc(ocs, dma, mcmd->out_bytes, 4096)) { in ocs_process_sli_config() 101 device_printf(ocs->dev, "%s: COMMON_READ_OBJECT - %lld allocation failed\n", in ocs_process_sli_config() 119 if (ocs_dma_alloc(ocs, dma, wrobj->desired_write_length, 4096)) { in ocs_process_sli_config() 120 device_printf(ocs->dev, "%s: COMMON_WRITE_OBJECT - %d allocation failed\n", in ocs_process_sli_config() [all …]
|
H A D | ocs_mgmt.c | 41 #include "ocs.h" 50 static int ocs_mgmt_firmware_write(ocs_t *ocs, char *, void *buf, uint32_t buf_len, void*, uint32_t… 51 static int ocs_mgmt_firmware_reset(ocs_t *ocs, char *, void *buf, uint32_t buf_len, void*, uint32_t… 52 static int ocs_mgmt_function_reset(ocs_t *ocs, char *, void *buf, uint32_t buf_len, void*, uint32_t… 55 static int ocs_mgmt_force_assert(ocs_t *ocs, char *, void *buf, uint32_t buf_len, void*, uint32_t); 101 static void get_chip_type(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf); 102 static void get_tgt_rscn_delay(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf); 103 static void get_tgt_rscn_period(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf); 104 static void get_inject_drop_cmd(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf); 105 static void get_inject_free_drop_cmd(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf); [all …]
|
H A D | ocs_gendump.c | 33 #include "ocs.h" 41 ocs_t *ocs; in ocs_gen_dump_reset() local 44 while ((ocs = ocs_get_instance(index++)) != NULL) { in ocs_gen_dump_reset() 48 ocs_get_bus_dev_func(ocs, &ocs_bus, &ocs_dev, &ocs_func); in ocs_gen_dump_reset() 53 if (ocs_hw_reset(&ocs->hw, OCS_HW_RESET_FUNCTION)) { in ocs_gen_dump_reset() 54 ocs_log_test(ocs, "failed to reset port\n"); in ocs_gen_dump_reset() 59 ocs_log_debug(ocs, "successfully reset port\n"); in ocs_gen_dump_reset() 60 while ((domain = ocs_list_get_head(&ocs->domain_list)) != NULL) { in ocs_gen_dump_reset() 61 ocs_log_debug(ocs, "free domain %p\n", domain); in ocs_gen_dump_reset() 65 if (ocs_hw_init(&ocs->hw)) { in ocs_gen_dump_reset() [all …]
|
H A D | ocs_cam.c | 44 #include "ocs.h" 86 static uint32_t ocs_abort_initiator_io(struct ocs_softc *ocs, union ccb *accb); 87 static void ocs_abort_inot(struct ocs_softc *ocs, union ccb *ccb); 88 static void ocs_abort_atio(struct ocs_softc *ocs, union ccb *ccb); 95 ocs_fcp_change_role(struct ocs_softc *ocs, ocs_fcport *fcp, uint32_t new_role); 99 static void ocs_delete_target(ocs_t *ocs, ocs_fcport *fcp, int tgt); 105 static inline ocs_io_t *ocs_scsi_find_io(struct ocs_softc *ocs, uint32_t tag) in ocs_scsi_find_io() argument 108 return ocs_io_get_instance(ocs, tag); in ocs_scsi_find_io() 117 if(io->ocs->io_in_use != 0) in ocs_target_io_free() 118 atomic_subtract_acq_32(&io->ocs->io_in_use, 1); in ocs_target_io_free() [all …]
|
H A D | ocs_domain.c | 41 #include "ocs.h" 48 if (OCS_LOG_ENABLE_DOMAIN_SM_TRACE(domain->ocs)) \ 49 ocs_log_info(domain->ocs, "[domain] %-20s %-20s\n", __func__, ocs_sm_event_name(evt)); \ 54 if (OCS_LOG_ENABLE_DOMAIN_SM_TRACE(domain ? domain->ocs : NULL)) \ 55 ocs_log_info(domain ? domain->ocs : NULL, fmt, ##__VA_ARGS__); \ 60 ocs_log_info(domain ? domain->ocs : NULL, fmt, ##__VA_ARGS__); \ 94 ocs_t *ocs = arg; in ocs_domain_cb() local 114 domain = ocs_domain_find(ocs, fcf_wwn); in ocs_domain_cb() 116 domain = ocs_domain_alloc(ocs, fcf_wwn); in ocs_domain_cb() 118 ocs_log_err(ocs, "ocs_domain_alloc() failed\n"); in ocs_domain_cb() [all …]
|
H A D | ocs_unsol.c | 41 #include "ocs.h" 46 #define frame_printf(ocs, hdr, fmt, ...) \ argument 50 ocs_log_debug(ocs, "[%06x.%s] %02x/%04x/%04x: " fmt, fc_be24toh((hdr)->d_id), s_id_text, \ 54 static int32_t ocs_unsol_process(ocs_t *ocs, ocs_hw_sequence_t *seq); 64 static int32_t ocs_purge_pending(ocs_t *ocs, ocs_list_t *pend_list, ocs_lock_t *list_lock); 80 ocs_t *ocs = thread_data->ocs; in ocs_unsol_rq_thread() local 84 ocs_log_debug(ocs, "%s running\n", mythread->name); in ocs_unsol_rq_thread() 102 ocs_log_debug(ocs, "%s exiting\n", mythread->name); in ocs_unsol_rq_thread() 117 ocs_t *ocs = arg; in ocs_unsol_abort_cb() local 120 ocs_log_debug(ocs, "xri=0x%x tag=0x%x\n", hio->indicator, hio->reqtag); in ocs_unsol_abort_cb() [all …]
|
H A D | ocs_io.c | 41 #include "ocs.h" 64 ocs_t *ocs; /* Pointer to device object */ member 92 * @param ocs Driver instance's software context. 101 ocs_io_pool_create(ocs_t *ocs, uint32_t num_io, uint32_t num_sgl) in ocs_io_pool_create() argument 108 io_pool = ocs_malloc(ocs, sizeof(*io_pool), OCS_M_ZERO | OCS_M_NOWAIT); in ocs_io_pool_create() 110 ocs_log_err(ocs, "allocate of IO pool failed\n"); in ocs_io_pool_create() 114 io_pool->ocs = ocs; in ocs_io_pool_create() 118 ocs_lock_init(ocs, &io_pool->lock, "io_pool lock[%d]", ocs->instance_index); in ocs_io_pool_create() 120 io_pool->pool = ocs_pool_alloc(ocs, sizeof(ocs_io_t), io_pool->io_num_ios, FALSE); in ocs_io_pool_create() 127 io->ocs = ocs; in ocs_io_pool_create() [all …]
|
H A D | ocs.h | 34 * OCS bsd driver common include file 76 ocs_t *ocs; member 92 #define FCPORT(ocs, chan) (&((ocs_fcport *)(ocs)->fcports)[(chan)]) argument 135 void (*domain_list_empty_cb)(ocs_t *ocs, void *arg); 220 ocs_device_lock_init(ocs_t *ocs) in ocs_device_lock_init() argument 222 ocs_rlock_init(ocs, &ocs->lock, "ocsdevicelock"); in ocs_device_lock_init() 226 ocs_device_lock_try(ocs_t *ocs) in ocs_device_lock_try() argument 228 return ocs_rlock_try(&ocs->lock); in ocs_device_lock_try() 232 ocs_device_lock(ocs_t *ocs) in ocs_device_lock() argument 234 ocs_rlock_acquire(&ocs->lock); in ocs_device_lock() [all …]
|
H A D | ocs_scsi.c | 34 * OCS Linux SCSI API base driver implementation. 41 #include "ocs.h" 49 #define SCSI_ITT_SIZE(ocs) ((ocs->ocs_xport == OCS_XPORT_FC) ? 4 : 8) argument 51 …IOFMT_ARGS(io) io->instance_index, SCSI_ITT_SIZE(io->ocs), io->init_task_tag, SCSI_ITT_SIZE(io->oc… 53 #define enable_tsend_auto_resp(ocs) ((ocs->ctrlmask & OCS_CTRLMASK_XPORT_DISABLE_AUTORSP_TSEND) ==… argument 54 #define enable_treceive_auto_resp(ocs) ((ocs->ctrlmask & OCS_CTRLMASK_XPORT_DISABLE_AUTORSP_TRECEIV… argument 56 #define scsi_io_printf(io, fmt, ...) ocs_log_info(io->ocs, "[%s]" SCSI_IOFMT fmt, \ 61 if (OCS_LOG_ENABLE_SCSI_TRACE(io->ocs)) \ 65 #define scsi_log(ocs, fmt, ...) \ argument 67 if (OCS_LOG_ENABLE_SCSI_TRACE(ocs)) \ [all …]
|
H A D | ocs_utils.h | 92 ocs_t *ocs; member 100 extern int32_t ocs_textbuf_alloc(ocs_t *ocs, ocs_textbuf_t *textbuf, uint32_t length); 102 extern int32_t ocs_textbuf_init(ocs_t *ocs, ocs_textbuf_t *textbuf, void *buffer, uint32_t length); 103 extern void ocs_textbuf_free(ocs_t *ocs, ocs_textbuf_t *textbuf); 141 #define OCS_LOG_ENABLE_SM_TRACE(ocs) (((ocs) != NULL) ? (((ocs)->logmask & (1U << 0)) != 0) : 0) argument 142 #define OCS_LOG_ENABLE_ELS_TRACE(ocs) (((ocs) != NULL) ? (((ocs)->logmask & (1U << 1)) != 0) : 0) argument 143 #define OCS_LOG_ENABLE_SCSI_TRACE(ocs) (((ocs) != NULL) ? (((ocs)->logmask & (1U << 2)) != 0) : 0) argument 144 #define OCS_LOG_ENABLE_SCSI_TGT_TRACE(ocs) (((ocs) != NULL) ? (((ocs)->logmask & (1U << 3)) != 0) :… argument 145 #define OCS_LOG_ENABLE_DOMAIN_SM_TRACE(ocs) (((ocs) != NULL) ? (((ocs)->logmask & (1U << 4)) != 0) … argument 146 #define OCS_LOG_ENABLE_Q_FULL_BUSY_MSG(ocs) (((ocs) != NULL) ? (((ocs)->logmask & (1U << 5)) != 0) … argument [all …]
|
H A D | ocs_ddump.c | 38 #include "ocs.h" 403 ocs_t *ocs = hw->os; in ocs_ddump_hw() local 410 ocs_assert(ocs); in ocs_ddump_hw() 412 ocs_ddump_section(textbuf, "hw", ocs->instance_index); in ocs_ddump_hw() 481 ocs_ddump_section(textbuf, "workaround", ocs->instance_index); in ocs_ddump_hw() 483 ocs_ddump_endsection(textbuf, "workaround", ocs->instance_index); in ocs_ddump_hw() 486 ocs_ddump_section(textbuf, "io_inuse", ocs->instance_index); in ocs_ddump_hw() 490 ocs_ddump_endsection(textbuf, "io_inuse", ocs->instance_index); in ocs_ddump_hw() 492 ocs_ddump_section(textbuf, "io_wait_free", ocs->instance_index); in ocs_ddump_hw() 496 ocs_ddump_endsection(textbuf, "io_wait_free", ocs->instance_index); in ocs_ddump_hw() [all …]
|
H A D | ocs_drv_fc.h | 34 * OCS linux driver common include file 94 void (*domain_list_empty_cb)(ocs_t *ocs, void *arg); /*>> domain list empty callback */ 150 #define ocs_is_fc_initiator_enabled() (ocs->enable_ini) 151 #define ocs_is_fc_target_enabled() (ocs->enable_tgt) 154 ocs_device_lock_init(ocs_t *ocs) in ocs_device_lock_init() argument 156 ocs_rlock_init(ocs, &ocs->lock, "ocsdevicelock"); in ocs_device_lock_init() 159 ocs_device_lock_free(ocs_t *ocs) in ocs_device_lock_free() argument 161 ocs_rlock_free(&ocs->lock); in ocs_device_lock_free() 164 ocs_device_lock_try(ocs_t *ocs) in ocs_device_lock_try() argument 166 return ocs_rlock_try(&ocs->lock); in ocs_device_lock_try() [all …]
|
H A D | ocs_sport.c | 37 #include "ocs.h" 71 * @param arg Pointer to the OCS context. 81 ocs_t *ocs = arg; in ocs_port_cb() local 86 ocs_log_debug(ocs, "OCS_HW_PORT_ALLOC_OK\n"); in ocs_port_cb() 90 ocs_log_debug(ocs, "OCS_HW_PORT_ALLOC_FAIL\n"); in ocs_port_cb() 94 ocs_log_debug(ocs, "OCS_HW_PORT_ATTACH_OK\n"); in ocs_port_cb() 98 ocs_log_debug(ocs, "OCS_HW_PORT_ATTACH_FAIL\n"); in ocs_port_cb() 102 ocs_log_debug(ocs, "OCS_HW_PORT_FREE_OK\n"); in ocs_port_cb() 106 ocs_log_debug(ocs, "OCS_HW_PORT_FREE_FAIL\n"); in ocs_port_cb() 110 ocs_log_test(ocs, "unknown event %#x\n", event); in ocs_port_cb() [all …]
|
H A D | ocs_els.c | 41 #include "ocs.h" 51 if (OCS_LOG_ENABLE_ELS_TRACE(ocs)) \ 52 ocs_log_info(ocs, "[%s] %-20s\n", node->display_name, __func__); \ 56 …ocs_log_debug(els->node->ocs, "[%s]" ELS_IOFMT " %-8s " fmt, els->node->display_name, ELS_IOFMT_AR… 165 ocs_t *ocs; in ocs_els_io_alloc_size() local 169 ocs_assert(node->ocs, NULL); in ocs_els_io_alloc_size() 170 ocs = node->ocs; in ocs_els_io_alloc_size() 171 ocs_assert(ocs->xport, NULL); in ocs_els_io_alloc_size() 172 xport = ocs->xport; in ocs_els_io_alloc_size() 176 ocs_log_debug(ocs, "called with io_alloc_enabled = FALSE\n"); in ocs_els_io_alloc_size() [all …]
|
H A D | ocs_node.c | 34 * OCS driver remote node handler. This file contains code that is shared 43 #include "ocs.h" 48 #define SCSI_ITT_SIZE(ocs) ((ocs->ocs_xport == OCS_XPORT_FC) ? 4 : 8) argument 50 …IOFMT_ARGS(io) io->instance_index, SCSI_ITT_SIZE(io->ocs), io->init_task_tag, SCSI_ITT_SIZE(io->oc… 52 #define scsi_io_printf(io, fmt, ...) ocs_log_debug(io->ocs, "[%s]" SCSI_IOFMT fmt, \ 89 ocs_log_debug(node->ocs, "[%s] initiate ELS abort %s\n", node->display_name, els->display_name); in ocs_node_abort_all_els() 105 * @param arg pointer to ocs 114 ocs_t *ocs = arg; in ocs_remote_node_cb() local 137 ocs_log_test(ocs, "unhandled event %#x\n", event); in ocs_remote_node_cb() 226 * @param ocs pointer to driver instance context [all …]
|
H A D | ocs_os.c | 37 #include "ocs.h" 39 static MALLOC_DEFINE(M_OCS, "OCS", "OneCore Storage data"); 92 * @param ocs Pointer to the driver's context 99 ocs_reg_read32(ocs_t *ocs, uint32_t rset, uint32_t off) in ocs_reg_read32() argument 103 reg = &ocs->reg[rset]; in ocs_reg_read32() 116 * @param ocs Pointer to the driver's context 123 ocs_reg_read16(ocs_t *ocs, uint32_t rset, uint32_t off) in ocs_reg_read16() argument 127 reg = &ocs->reg[rset]; in ocs_reg_read16() 140 * @param ocs Pointer to the driver's context 147 ocs_reg_read8(ocs_t *ocs, uint32_t rset, uint32_t off) in ocs_reg_read8() argument [all …]
|
H A D | ocs_node.h | 34 * OCS linux driver remote node callback declarations 42 if (OCS_LOG_ENABLE_SM_TRACE(node->ocs)) \ 43 ocs_log_info(node->ocs, "[%s] %-20s\n", node->display_name, ocs_sm_event_name(evt)); \ 46 #define node_printf(node, fmt, ...) ocs_log_debug(node->ocs, "[%s] " fmt, node->display_name, ##__V… 50 ocs_t *ocs = NULL; \ 53 ocs = node->ocs; \ 54 ocs_assert(ocs, NULL); \ 119 extern int32_t ocs_node_create_pool(ocs_t *ocs, uint32_t node_count); 120 extern void ocs_node_free_pool(ocs_t *ocs); 121 extern ocs_node_t *ocs_node_get_instance(ocs_t *ocs, uint32_t index); [all …]
|
H A D | ocs_domain.h | 39 extern int32_t ocs_domain_init(ocs_t *ocs, ocs_domain_t *domain); 40 extern ocs_domain_t *ocs_domain_find(ocs_t *ocs, uint64_t fcf_wwn); 41 extern ocs_domain_t *ocs_domain_alloc(ocs_t *ocs, uint64_t fcf_wwn); 44 extern void ocs_register_domain_list_empty_cb(ocs_t *ocs, void (*callback)(ocs_t *ocs, void *arg), … 56 return ocs_device_lock_try(domain->ocs); in ocs_domain_lock_try() 63 ocs_device_lock(domain->ocs); in ocs_domain_lock() 70 ocs_device_unlock(domain->ocs); in ocs_domain_unlock()
|
H A D | ocs_sport.h | 34 * OCS FC SLI port (SPORT) exported declarations 61 return ocs_device_lock_try(sport->ocs); in ocs_sport_lock_try() 68 ocs_device_lock(sport->ocs); in ocs_sport_lock() 75 ocs_device_unlock(sport->ocs); in ocs_sport_unlock() 93 extern int32_t ocs_sport_vport_del(ocs_t *ocs, ocs_domain_t *domain, uint64_t wwpn, uint64_t wwnn); 94 extern void ocs_vport_del_all(ocs_t *ocs); 95 extern int8_t ocs_vport_create_spec(ocs_t *ocs, uint64_t wwnn, uint64_t wwpn, uint32_t fc_id, uint3…
|
H A D | ocs_utils.c | 37 #include "ocs.h" 960 ocs_queue_history_init(ocs_t *ocs, ocs_hw_q_hist_t *q_hist) in ocs_queue_history_init() argument 962 q_hist->ocs = ocs; in ocs_queue_history_init() 965 ocs_log_debug(ocs, "q_hist not NULL, skipping init\n"); in ocs_queue_history_init() 969 …q_hist->q_hist = ocs_malloc(ocs, sizeof(*q_hist->q_hist)*OCS_Q_HIST_SIZE, OCS_M_ZERO | OCS_M_NOWAI… in ocs_queue_history_init() 972 ocs_log_err(ocs, "Could not allocate queue history buffer\n"); in ocs_queue_history_init() 974 ocs_lock_init(ocs, &q_hist->q_hist_lock, "queue history lock[%d]", ocs_instance(ocs)); in ocs_queue_history_init() 991 ocs_t *ocs = q_hist->ocs; in ocs_queue_history_free() local 994 ocs_free(ocs, q_hist->q_hist, sizeof(*q_hist->q_hist)*OCS_Q_HIST_SIZE); in ocs_queue_history_free() 1622 static void ocs_textbuf_segment_free(ocs_t *ocs, ocs_textbuf_segment_t *segment); [all …]
|
/freebsd/sys/contrib/device-tree/Bindings/crypto/ |
H A D | intel,keembay-ocs-aes.yaml | 4 $id: http://devicetree.org/schemas/crypto/intel,keembay-ocs-aes.yaml# 7 title: Intel Keem Bay OCS AES 13 The Intel Keem Bay Offload and Crypto Subsystem (OCS) AES engine provides 18 const: intel,keembay-ocs-aes 41 compatible = "intel,keembay-ocs-aes";
|
H A D | intel,keembay-ocs-ecc.yaml | 4 $id: http://devicetree.org/schemas/crypto/intel,keembay-ocs-ecc.yaml# 7 title: Intel Keem Bay OCS ECC 14 The Intel Keem Bay Offload and Crypto Subsystem (OCS) Elliptic Curve 20 const: intel,keembay-ocs-ecc 43 compatible = "intel,keembay-ocs-ecc";
|
H A D | intel,keembay-ocs-hcu.yaml | 4 $id: http://devicetree.org/schemas/crypto/intel,keembay-ocs-hcu.yaml# 7 title: Intel Keem Bay OCS HCU 14 The Intel Keem Bay Offload and Crypto Subsystem (OCS) Hash Control Unit (HCU) 19 const: intel,keembay-ocs-hcu 42 compatible = "intel,keembay-ocs-hcu";
|