/freebsd-13-stable/sys/dev/ocs_fc/ |
H A D | ocs_pci.c | 41 #include "ocs.h" 70 static int32_t ocs_init_dma_tag(struct ocs_softc *ocs); 72 static int32_t ocs_setup_fcports(ocs_t *ocs); 115 ocs_map_bars(device_t dev, struct ocs_softc *ocs) argument 122 ocs->reg[0].rid = PCIR_BAR(PCI_64BIT_BAR0); 123 ocs->reg[0].res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, 124 &ocs->reg[0].rid, RF_ACTIVE); 126 if (ocs->reg[0].res == NULL) { 128 ocs->reg[0].rid); 132 ocs 138 ocs_setup_params(struct ocs_softc *ocs) argument 318 ocs_setup_fcports(ocs_t *ocs) argument 364 ocs_device_attach(ocs_t *ocs) argument 461 struct ocs_softc *ocs; local 566 ocs_device_detach(ocs_t *ocs) argument 619 struct ocs_softc *ocs; local 681 ocs_release_bus(struct ocs_softc *ocs) argument 721 ocs_intr_alloc(struct ocs_softc *ocs) argument 762 ocs_intr_setup(struct ocs_softc *ocs) argument 788 ocs_intr_teardown(struct ocs_softc *ocs) argument 815 struct ocs_softc *ocs = NULL; local 851 struct ocs_softc *ocs = intr->softc; local 866 ocs_init_dma_tag(struct ocs_softc *ocs) argument 935 ocs_t *ocs = os; local [all...] |
H A D | ocs_xport.c | 40 #include "ocs.h" 61 * @param ocs Pointer to device instance. 66 ocs_xport_alloc(ocs_t *ocs) argument 70 ocs_assert(ocs, NULL); 71 xport = ocs_malloc(ocs, sizeof(*xport), OCS_M_ZERO); 73 xport->ocs = ocs; 91 ocs_t *ocs = xport->ocs; local 104 ocs_log_debug(ocs, "wai 132 ocs_t *ocs = xport->ocs; local 189 ocs_t *ocs = xport->ocs; local 309 ocs_t *ocs = xport->ocs; local 387 ocs_t *ocs = xport->ocs; local 598 ocs_t *ocs = xport->ocs; local 631 ocs_xport_domain_list_empty_cb(ocs_t *ocs, void *arg) argument 685 ocs_t *ocs = xport->ocs; local 719 ocs_t *ocs = NULL; local 802 ocs_t *ocs; local 913 ocs_t *ocs = NULL; local 1080 ocs_t *ocs; local [all...] |
H A D | ocs_drv_fc.h | 96 void (*domain_list_empty_cb)(ocs_t *ocs, void *arg); /*>> domain list empty callback */ 152 #define ocs_is_fc_initiator_enabled() (ocs->enable_ini) 153 #define ocs_is_fc_target_enabled() (ocs->enable_tgt) 156 ocs_device_lock_init(ocs_t *ocs) argument 158 ocs_rlock_init(ocs, &ocs->lock, "ocsdevicelock"); 161 ocs_device_lock_free(ocs_t *ocs) argument 163 ocs_rlock_free(&ocs->lock); 166 ocs_device_lock_try(ocs_t *ocs) argument 168 return ocs_rlock_try(&ocs 171 ocs_device_lock(ocs_t *ocs) argument 176 ocs_device_unlock(ocs_t *ocs) argument 185 ocs_io_alloc(ocs_t *ocs) argument 191 ocs_io_free(ocs_t *ocs, ocs_io_t *io) argument [all...] |
H A D | ocs_ioctl.c | 34 #include "ocs.h" 58 ocs_firmware_write(ocs_t *ocs, const uint8_t *buf, size_t buf_len, uint8_t *change_status); 64 struct ocs_softc *ocs = cdev->si_drv1; 66 device_printf(ocs->dev, "%s\n", __func__); 75 struct ocs_softc *ocs = cdev->si_drv1; 77 device_printf(ocs->dev, "%s\n", __func__); 85 struct ocs_softc *ocs = arg; local 88 mtx_lock(&ocs->dbg_lock); 90 mtx_unlock(&ocs->dbg_lock); 98 ocs_process_sli_config (ocs_t *ocs, ocs_ioctl_elxu_mbox_ argument 195 ocs_process_mbx_ioctl(ocs_t *ocs, ocs_ioctl_elxu_mbox_t *mcmd) argument 274 ocs_process_ecd_helper(ocs_t *ocs, ocs_ioctl_ecd_helper_t *req) argument 354 struct ocs_softc *ocs = cdev->si_drv1; local 667 ocs_firmware_write(ocs_t *ocs, const uint8_t *buf, size_t buf_len, uint8_t *change_status) argument 732 ocs_t *ocs = (ocs_t *)arg1; local 812 ocs_t *ocs = oidp->oid_arg1; local 851 ocs_t *ocs = oidp->oid_arg1; local 887 ocs_t *ocs = oidp->oid_arg1; local 898 ocs_t *ocs = oidp->oid_arg1; local 910 ocs_t *ocs = oidp->oid_arg1; local 940 ocs_t *ocs = oidp->oid_arg1; local 969 ocs_t *ocs = oidp->oid_arg1; local 988 ocs_t *ocs = (ocs_t *)arg1; local 1065 ocs_sysctl_init(ocs_t *ocs) argument 1198 struct ocs_softc *ocs = os; local 1229 struct ocs_softc *ocs = os; local [all...] |
H A D | ocs.h | 82 ocs_t *ocs; member in struct:ocs_fcport_s 98 #define FCPORT(ocs, chan) (&((ocs_fcport *)(ocs)->fcports)[(chan)]) 141 void (*domain_list_empty_cb)(ocs_t *ocs, void *arg); 226 ocs_device_lock_init(ocs_t *ocs) argument 228 ocs_rlock_init(ocs, &ocs->lock, "ocsdevicelock"); 232 ocs_device_lock_try(ocs_t *ocs) argument 234 return ocs_rlock_try(&ocs->lock); 238 ocs_device_lock(ocs_t *ocs) argument 244 ocs_device_unlock(ocs_t *ocs) argument 250 ocs_device_lock_free(ocs_t *ocs) argument 271 ocs_io_alloc(ocs_t *ocs) argument 277 ocs_io_free(ocs_t *ocs, ocs_io_t *io) argument [all...] |
H A D | ocs_mgmt.c | 43 #include "ocs.h" 51 static int ocs_mgmt_firmware_write(ocs_t *ocs, char *, void *buf, uint32_t buf_len, void*, uint32_t); 52 static int ocs_mgmt_firmware_reset(ocs_t *ocs, char *, void *buf, uint32_t buf_len, void*, uint32_t); 53 static int ocs_mgmt_function_reset(ocs_t *ocs, char *, void *buf, uint32_t buf_len, void*, uint32_t); 56 static int ocs_mgmt_force_assert(ocs_t *ocs, char *, void *buf, uint32_t buf_len, void*, uint32_t); 60 ocs_mgmt_read_phys(ocs_t *ocs, char *, void *, uint32_t , void *, uint32_t); 107 static void get_chip_type(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf); 108 static void get_tgt_rscn_delay(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf); 109 static void get_tgt_rscn_period(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf); 110 static void get_inject_drop_cmd(ocs_t *ocs, cha 233 ocs_mgmt_get_list(ocs_t *ocs, ocs_textbuf_t *textbuf) argument 305 ocs_mgmt_get(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) argument 388 ocs_mgmt_set(ocs_t *ocs, char *name, char *value) argument 469 ocs_mgmt_exec(ocs_t *ocs, char *action, void *arg_in, uint32_t arg_in_length, void *arg_out, uint32_t arg_out_length) argument 526 ocs_mgmt_get_all(ocs_t *ocs, ocs_textbuf_t *textbuf) argument 564 ocs_mgmt_read_phys(ocs_t *ocs, char *name, void *arg_in, uint32_t arg_in_length, void *arg_out, uint32_t arg_out_length) argument 694 ocs_mgmt_firmware_reset(ocs_t *ocs, char *name, void *buf, uint32_t buf_len, void *arg_out, uint32_t arg_out_length) argument 737 ocs_mgmt_function_reset(ocs_t *ocs, char *name, void *buf, uint32_t buf_len, void *arg_out, uint32_t arg_out_length) argument 748 ocs_mgmt_firmware_write(ocs_t *ocs, char *name, void *buf, uint32_t buf_len, void *arg_out, uint32_t arg_out_length) argument 865 ocs_t *ocs = os; local 885 ocs_mgmt_get_sfp(ocs_t *ocs, uint16_t page, void *buf, uint32_t buf_len) argument 928 ocs_mgmt_force_assert(ocs_t *ocs, char *name, void *buf, uint32_t buf_len, void *arg_out, uint32_t arg_out_length) argument 934 get_nodes_count(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) argument 942 get_driver_version(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) argument 948 get_desc(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) argument 954 get_fw_rev(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) argument 960 get_fw_rev2(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) argument 966 get_ipl(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) argument 972 get_hw_rev1(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) argument 982 get_hw_rev2(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) argument 992 get_hw_rev3(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) argument 1001 get_wwnn(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) argument 1011 get_wwpn(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) argument 1021 get_fcid(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) argument 1034 get_sn(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) argument 1050 get_pn(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) argument 1068 get_sli4_intf_reg(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) argument 1076 get_phy_port_num(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) argument 1088 get_asic_id(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) argument 1096 get_chip_type(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) argument 1192 get_pci_vendor(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) argument 1199 get_pci_device(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) argument 1206 get_pci_subsystem_vendor(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) argument 1213 get_pci_subsystem_device(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) argument 1220 get_tgt_rscn_delay(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) argument 1226 get_tgt_rscn_period(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) argument 1232 get_inject_drop_cmd(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) argument 1239 get_inject_free_drop_cmd(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) argument 1246 get_inject_drop_data(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) argument 1253 get_inject_drop_resp(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) argument 1260 get_cmd_err_inject(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) argument 1266 get_cmd_delay_value(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) argument 1272 get_businfo(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) argument 1278 get_sfp_a0(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) argument 1321 get_sfp_a2(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) argument 1364 get_debug_mq_dump(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) argument 1372 get_debug_cq_dump(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) argument 1380 get_debug_wq_dump(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) argument 1387 get_debug_eq_dump(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) argument 1394 get_logmask(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) argument 1402 get_loglevel(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) argument 1410 get_current_speed(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) argument 1420 get_configured_speed(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) argument 1434 get_current_topology(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) argument 1444 get_configured_topology(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) argument 1454 get_current_link_state(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) argument 1468 get_configured_link_state(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) argument 1561 get_linkcfg(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) argument 1582 get_req_wwnn(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) argument 1599 get_req_wwpn(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) argument 1616 get_nodedb_mask(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) argument 1632 set_req_wwnn(ocs_t *ocs, char *name, char *value) argument 1676 set_req_wwpn(ocs_t *ocs, char *name, char *value) argument 1719 set_nodedb_mask(ocs_t *ocs, char *name, char *value) argument 1735 set_linkcfg(ocs_t *ocs, char *name, char *value) argument 1787 set_debug_mq_dump(ocs_t *ocs, char *name, char *value) argument 1805 set_debug_cq_dump(ocs_t *ocs, char *name, char *value) argument 1823 set_debug_wq_dump(ocs_t *ocs, char *name, char *value) argument 1841 set_debug_eq_dump(ocs_t *ocs, char *name, char *value) argument 1859 set_logmask(ocs_t *ocs, char *name, char *value) argument 1868 set_loglevel(ocs_t *ocs, char *name, char *value) argument 1877 set_configured_speed(ocs_t *ocs, char *name, char *value) argument 1919 set_configured_topology(ocs_t *ocs, char *name, char *value) argument 1958 set_configured_link_state(ocs_t *ocs, char *name, char *value) argument 2005 get_port_protocol(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) argument 2073 set_port_protocol(ocs_t *ocs, char *name, char *value) argument 2149 get_profile_list(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) argument 2225 get_active_profile(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) argument 2277 set_active_profile(ocs_t *ocs, char *name, char *value) argument 2342 get_nv_wwpn(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) argument 2380 get_nv_wwnn(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) argument 2417 get_node_abort_cnt(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) argument 2489 set_nv_wwn(ocs_t *ocs, char *name, char *wwn_p) argument 2590 set_tgt_rscn_delay(ocs_t *ocs, char *name, char *value) argument 2598 set_tgt_rscn_period(ocs_t *ocs, char *name, char *value) argument 2606 set_inject_drop_cmd(ocs_t *ocs, char *name, char *value) argument 2614 set_inject_free_drop_cmd(ocs_t *ocs, char *name, char *value) argument 2622 set_inject_drop_data(ocs_t *ocs, char *name, char *value) argument 2630 set_inject_drop_resp(ocs_t *ocs, char *name, char *value) argument 2638 set_cmd_err_inject(ocs_t *ocs, char *name, char *value) argument 2646 set_cmd_delay_value(ocs_t *ocs, char *name, char *value) argument [all...] |
H A D | ocs_domain.c | 43 #include "ocs.h" 50 if (OCS_LOG_ENABLE_DOMAIN_SM_TRACE(domain->ocs)) \ 51 ocs_log_info(domain->ocs, "[domain] %-20s %-20s\n", __func__, ocs_sm_event_name(evt)); \ 56 if (OCS_LOG_ENABLE_DOMAIN_SM_TRACE(domain ? domain->ocs : NULL)) \ 57 ocs_log_info(domain ? domain->ocs : NULL, fmt, ##__VA_ARGS__); \ 62 ocs_log_info(domain ? domain->ocs : NULL, fmt, ##__VA_ARGS__); \ 96 ocs_t *ocs = arg; local 116 domain = ocs_domain_find(ocs, fcf_wwn); 118 domain = ocs_domain_alloc(ocs, fcf_wwn); 120 ocs_log_err(ocs, "ocs_domain_allo 188 ocs_domain_find(ocs_t *ocs, uint64_t fcf_wwn) argument 217 ocs_domain_alloc(ocs_t *ocs, uint64_t fcf_wwn) argument 274 ocs_t *ocs; local 355 ocs_register_domain_list_empty_cb(ocs_t *ocs, void (*callback)(ocs_t *ocs, void *arg), void *arg) argument 379 ocs_domain_get_instance(ocs_t *ocs, uint32_t index) argument [all...] |
H A D | ocs_io.c | 43 #include "ocs.h" 66 ocs_t *ocs; /* Pointer to device object */ member in struct:ocs_io_pool_s 94 * @param ocs Driver instance's software context. 103 ocs_io_pool_create(ocs_t *ocs, uint32_t num_io, uint32_t num_sgl) argument 110 io_pool = ocs_malloc(ocs, sizeof(*io_pool), OCS_M_ZERO | OCS_M_NOWAIT); 112 ocs_log_err(ocs, "allocate of IO pool failed\n"); 116 io_pool->ocs = ocs; 120 ocs_lock_init(ocs, &io_pool->lock, "io_pool lock[%d]", ocs 194 ocs_t *ocs; local 243 ocs_t *ocs; local 286 ocs_t *ocs; local 317 ocs_io_find_tgt_io(ocs_t *ocs, ocs_node_t *node, uint16_t ox_id, uint16_t rx_id) argument 344 ocs_io_get_instance(ocs_t *ocs, uint32_t index) argument [all...] |
H A D | ocs_unsol.c | 43 #include "ocs.h" 48 #define frame_printf(ocs, hdr, fmt, ...) \ 52 ocs_log_debug(ocs, "[%06x.%s] %02x/%04x/%04x: " fmt, fc_be24toh((hdr)->d_id), s_id_text, \ 56 static int32_t ocs_unsol_process(ocs_t *ocs, ocs_hw_sequence_t *seq); 66 static int32_t ocs_purge_pending(ocs_t *ocs, ocs_list_t *pend_list, ocs_lock_t *list_lock); 82 ocs_t *ocs = thread_data->ocs; local 86 ocs_log_debug(ocs, "%s running\n", mythread->name); 104 ocs_log_debug(ocs, "%s exiting\n", mythread->name); 119 ocs_t *ocs local 133 ocs_port_owned_abort(ocs_t *ocs, ocs_hw_io_t *hio) argument 163 ocs_t *ocs = arg; local 200 ocs_unsol_process(ocs_t *ocs, ocs_hw_sequence_t *seq) argument 277 ocs_t *ocs = node->ocs; local 335 ocs_t *ocs = domain->ocs; local 394 ocs_purge_pending(ocs_t *ocs, ocs_list_t *pend_list, ocs_lock_t *list_lock) argument 449 ocs_t *ocs = domain->ocs; local 492 ocs_t *ocs = domain->ocs; local 517 ocs_t *ocs = domain->ocs; local 545 ocs_t *ocs = domain->ocs; local 577 ocs_t *ocs = domain->ocs; local 790 ocs_validate_fcp_cmd(ocs_t *ocs, ocs_hw_sequence_t *seq) argument 884 ocs_t *ocs = node->ocs; local 982 ocs_t *ocs = node->ocs; local 1073 ocs_t *ocs = node->ocs; local 1232 ocs_t *ocs = node->ocs; local [all...] |
H A D | ocs_utils.h | 94 ocs_t *ocs; member in struct:__anon13877 102 extern int32_t ocs_textbuf_alloc(ocs_t *ocs, ocs_textbuf_t *textbuf, uint32_t length); 104 extern int32_t ocs_textbuf_init(ocs_t *ocs, ocs_textbuf_t *textbuf, void *buffer, uint32_t length); 105 extern void ocs_textbuf_free(ocs_t *ocs, ocs_textbuf_t *textbuf); 143 #define OCS_LOG_ENABLE_SM_TRACE(ocs) (((ocs) != NULL) ? (((ocs)->logmask & (1U << 0)) != 0) : 0) 144 #define OCS_LOG_ENABLE_ELS_TRACE(ocs) (((ocs) != NULL) ? (((ocs) 216 ocs_t *ocs; member in struct:__anon13880 [all...] |
H A D | ocs_domain.h | 41 extern int32_t ocs_domain_init(ocs_t *ocs, ocs_domain_t *domain); 42 extern ocs_domain_t *ocs_domain_find(ocs_t *ocs, uint64_t fcf_wwn); 43 extern ocs_domain_t *ocs_domain_alloc(ocs_t *ocs, uint64_t fcf_wwn); 46 extern void ocs_register_domain_list_empty_cb(ocs_t *ocs, void (*callback)(ocs_t *ocs, void *arg), void *arg); 58 return ocs_device_lock_try(domain->ocs); 65 ocs_device_lock(domain->ocs); 72 ocs_device_unlock(domain->ocs);
|
H A D | ocs_cam.c | 46 #include "ocs.h" 66 static uint32_t ocs_abort_initiator_io(struct ocs_softc *ocs, union ccb *accb); 67 static void ocs_abort_inot(struct ocs_softc *ocs, union ccb *ccb); 68 static void ocs_abort_atio(struct ocs_softc *ocs, union ccb *ccb); 75 ocs_fcp_change_role(struct ocs_softc *ocs, ocs_fcport *fcp, uint32_t new_role); 79 static void ocs_delete_target(ocs_t *ocs, ocs_fcport *fcp, int tgt); 85 static inline ocs_io_t *ocs_scsi_find_io(struct ocs_softc *ocs, uint32_t tag) argument 88 return ocs_io_get_instance(ocs, tag); 97 if(io->ocs->io_in_use != 0) 98 atomic_subtract_acq_32(&io->ocs 102 ocs_attach_port(ocs_t *ocs, int chan) argument 147 ocs_detach_port(ocs_t *ocs, int32_t chan) argument 179 ocs_cam_attach(ocs_t *ocs) argument 221 ocs_cam_detach(ocs_t *ocs) argument 252 ocs_scsi_tgt_new_device(ocs_t *ocs) argument 273 ocs_scsi_tgt_del_device(ocs_t *ocs) argument 351 ocs_t *ocs = sport->ocs; local 403 ocs_t *ocs = node->ocs; local 475 ocs_t *ocs = node->ocs; local 531 ocs_t *ocs = io->ocs; local 664 ocs_t *ocs = tmfio->ocs; local 792 ocs_scsi_ini_new_device(ocs_t *ocs) argument 810 ocs_scsi_ini_del_device(ocs_t *ocs) argument 887 ocs_t *ocs = sport->ocs; local 915 ocs_t *ocs = sport->ocs; local 926 ocs_t *ocs = sport->ocs; local 1015 struct ocs_softc *ocs = node->ocs; local 1065 ocs_delete_target(ocs_t *ocs, ocs_fcport *fcp, int tgt) argument 1104 ocs_t *ocs = fcp->ocs; local 1163 struct ocs_softc *ocs = node->ocs; local 1300 ocs_t *ocs = io->ocs; local 1356 struct ocs_softc *ocs = csio->ccb_h.ccb_ocs_ptr; local 1426 struct ocs_softc *ocs = NULL; local 1473 struct ocs_softc *ocs = csio->ccb_h.ccb_ocs_ptr; local 1603 ocs_build_scsi_sgl(struct ocs_softc *ocs, union ccb *ccb, ocs_io_t *io, ocs_scsi_sgl_t *sgl, uint32_t sgl_max) argument 1646 ocs_target_io(struct ocs_softc *ocs, union ccb *ccb) argument 1781 ocs_initiator_io(struct ocs_softc *ocs, union ccb *ccb) argument 1902 ocs_fcp_change_role(struct ocs_softc *ocs, ocs_fcport *fcp, uint32_t new_role) argument 1973 struct ocs_softc *ocs = (struct ocs_softc *)cam_sim_softc(sim); local 2549 ocs_tgt_resource_abort(struct ocs_softc *ocs, ocs_tgt_resource_t *trsrc) argument 2580 ocs_abort_atio(struct ocs_softc *ocs, union ccb *ccb) argument 2641 ocs_abort_inot(struct ocs_softc *ocs, union ccb *ccb) argument 2671 ocs_abort_initiator_io(struct ocs_softc *ocs, union ccb *accb) argument [all...] |
H A D | ocs_sport.c | 39 #include "ocs.h" 83 ocs_t *ocs = arg; local 88 ocs_log_debug(ocs, "OCS_HW_PORT_ALLOC_OK\n"); 92 ocs_log_debug(ocs, "OCS_HW_PORT_ALLOC_FAIL\n"); 96 ocs_log_debug(ocs, "OCS_HW_PORT_ATTACH_OK\n"); 100 ocs_log_debug(ocs, "OCS_HW_PORT_ATTACH_FAIL\n"); 104 ocs_log_debug(ocs, "OCS_HW_PORT_FREE_OK\n"); 108 ocs_log_debug(ocs, "OCS_HW_PORT_FREE_FAIL\n"); 112 ocs_log_test(ocs, "unknown event %#x\n", event); 141 if (domain->ocs 922 ocs_t *ocs = domain->ocs; local 970 ocs_t *ocs = sport->ocs; local 1094 ocs_sport_vport_del(ocs_t *ocs, ocs_domain_t *domain, uint64_t wwpn, uint64_t wwnn) argument 1154 ocs_vport_del_all(ocs_t *ocs) argument 1478 ocs_t *ocs = sport->ocs; local 1515 ocs_vport_create_spec(ocs_t *ocs, uint64_t wwnn, uint64_t wwpn, uint32_t fc_id, uint32_t enable_ini, uint32_t enable_tgt, void *tgt_data, void *ini_data) argument 1741 ocs_t *ocs; local 1840 ocs_t *ocs; local [all...] |
H A D | ocs_scsi.c | 43 #include "ocs.h" 53 #define SCSI_ITT_SIZE(ocs) ((ocs->ocs_xport == OCS_XPORT_FC) ? 4 : 8) 55 #define SCSI_IOFMT_ARGS(io) io->instance_index, SCSI_ITT_SIZE(io->ocs), io->init_task_tag, SCSI_ITT_SIZE(io->ocs), io->tgt_task_tag, io->hw_tag 57 #define enable_tsend_auto_resp(ocs) ((ocs->ctrlmask & OCS_CTRLMASK_XPORT_DISABLE_AUTORSP_TSEND) == 0) 58 #define enable_treceive_auto_resp(ocs) ((ocs->ctrlmask & OCS_CTRLMASK_XPORT_DISABLE_AUTORSP_TRECEIVE) == 0) 60 #define scsi_io_printf(io, fmt, ...) ocs_log_info(io->ocs, "[ 174 ocs_t *ocs; local 252 ocs_t *ocs = io->ocs; local 323 ocs_t *ocs; local 506 ocs_t *ocs = io->ocs; local 605 ocs_scsi_dif_check_app_tag(ocs_t *ocs, ocs_hw_dif_info_t *dif_info, uint16_t exp_app_tag, ocs_dif_t *dif) argument 631 ocs_scsi_dif_check_ref_tag(ocs_t *ocs, ocs_hw_dif_info_t *dif_info, uint32_t exp_ref_tag, ocs_dif_t *dif) argument 690 ocs_t *ocs = hw->os; local 798 ocs_scsi_convert_dif_info(ocs_t *ocs, ocs_scsi_dif_info_t *scsi_dif_info, ocs_hw_dif_info_t *hw_dif_info) argument 992 ocs_scsi_check_pending(ocs_t *ocs) argument 1124 ocs_t *ocs = io->ocs; local 1203 ocs_t *ocs = io->ocs; local 1249 ocs_t *ocs = io->ocs; local 1465 ocs_t *ocs; local 1634 ocs_t *ocs; local 1754 ocs_t *ocs = NULL; local 1852 ocs_t *ocs; local 1924 ocs_t *ocs; local 1998 ocs_t *ocs; local 2126 ocs_t *ocs; local 2487 ocs_t *ocs; local 2668 ocs_t *ocs; local 2729 ocs_scsi_get_property(ocs_t *ocs, ocs_scsi_property_e prop) argument 2793 ocs_scsi_get_property_ptr(ocs_t *ocs, ocs_scsi_property_e prop) argument 2943 ocs_scsi_register_bounce(ocs_t *ocs, void(*fctn)(void(*fctn)(void *arg), void *arg, uint32_t s_id, uint32_t d_id, uint32_t ox_id)) argument [all...] |
H A D | ocs_ddump.c | 40 #include "ocs.h" 405 ocs_t *ocs = hw->os; local 412 ocs_assert(ocs); 414 ocs_ddump_section(textbuf, "hw", ocs->instance_index); 483 ocs_ddump_section(textbuf, "workaround", ocs->instance_index); 485 ocs_ddump_endsection(textbuf, "workaround", ocs->instance_index); 488 ocs_ddump_section(textbuf, "io_inuse", ocs->instance_index); 492 ocs_ddump_endsection(textbuf, "io_inuse", ocs->instance_index); 494 ocs_ddump_section(textbuf, "io_wait_free", ocs->instance_index); 498 ocs_ddump_endsection(textbuf, "io_wait_free", ocs 637 ocs_ddump(ocs_t *ocs, ocs_textbuf_t *textbuf, uint32_t flags, uint32_t qentries) argument 800 ocs_save_ddump(ocs_t *ocs, uint32_t flags, uint32_t qentries) argument 834 ocs_t *ocs; local 865 ocs_clear_saved_ddump(ocs_t *ocs) argument [all...] |
H A D | ocs_node.c | 45 #include "ocs.h" 50 #define SCSI_ITT_SIZE(ocs) ((ocs->ocs_xport == OCS_XPORT_FC) ? 4 : 8) 52 #define SCSI_IOFMT_ARGS(io) io->instance_index, SCSI_ITT_SIZE(io->ocs), io->init_task_tag, SCSI_ITT_SIZE(io->ocs), io->tgt_task_tag, io->hw_tag 54 #define scsi_io_printf(io, fmt, ...) ocs_log_debug(io->ocs, "[%s]" SCSI_IOFMT fmt, \ 91 ocs_log_debug(node->ocs, "[%s] initiate ELS abort %s\n", node->display_name, els->display_name); 107 * @param arg pointer to ocs 116 ocs_t *ocs = arg; local 139 ocs_log_test(ocs, "unhandle 235 ocs_node_create_pool(ocs_t *ocs, uint32_t node_count) argument 306 ocs_node_free_pool(ocs_t *ocs) argument 345 ocs_node_get_instance(ocs_t *ocs, uint32_t index) argument 377 ocs_t *ocs = sport->ocs; local 468 ocs_t *ocs; local 629 ocs_t *ocs = node->ocs; local 734 ocs_t *ocs = node->ocs; local 924 ocs_t *ocs; local 1226 ocs_t *ocs = NULL; local 1614 ocs_t *ocs = NULL; local 1664 ocs_t *ocs = NULL; local 2101 ocs_t *ocs = node->ocs; local 2171 ocs_t *ocs = node->ocs; local 2249 ocs_t *ocs = node->ocs; local 2325 ocs_t *ocs = node->ocs; local [all...] |
H A D | ocs_ddump.h | 45 extern int ocs_ddump(ocs_t *ocs, ocs_textbuf_t *textbuf, uint32_t flags, uint32_t qentries); 54 extern int32_t ocs_save_ddump(ocs_t *ocs, uint32_t flags, uint32_t qentries); 55 extern int32_t ocs_get_saved_ddump(ocs_t *ocs, ocs_textbuf_t *textbuf); 57 extern int32_t ocs_clear_saved_ddump(ocs_t *ocs);
|
H A D | ocs_mgmt.h | 106 extern void ocs_mgmt_get_list(ocs_t *ocs, ocs_textbuf_t *textbuf); 107 extern void ocs_mgmt_get_all(ocs_t *ocs, ocs_textbuf_t *textbuf); 108 extern int ocs_mgmt_get(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf); 109 extern int ocs_mgmt_set(ocs_t *ocs, char *name, char *value); 110 extern int ocs_mgmt_exec(ocs_t *ocs, char *action, void *arg_in, uint32_t arg_in_length,
|
H A D | ocs_els.c | 43 #include "ocs.h" 53 if (OCS_LOG_ENABLE_ELS_TRACE(ocs)) \ 54 ocs_log_info(ocs, "[%s] %-20s\n", node->display_name, __func__); \ 58 ocs_log_debug(els->node->ocs, "[%s]" ELS_IOFMT " %-8s " fmt, els->node->display_name, ELS_IOFMT_ARGS(els), els->display_name, ##__VA_ARGS__); 167 ocs_t *ocs; local 171 ocs_assert(node->ocs, NULL); 172 ocs = node->ocs; 173 ocs_assert(ocs->xport, NULL); 174 xport = ocs 290 ocs_t *ocs; local 458 ocs_t *ocs; local 551 ocs_t *ocs; local 618 ocs_t *ocs = node->ocs; local 672 ocs_t *ocs; local 732 ocs_t *ocs; local 787 ocs_t *ocs = node->ocs; local 850 ocs_t *ocs = node->ocs; local 904 ocs_t *ocs; local 963 ocs_t *ocs; local 1026 ocs_t *ocs = node->ocs; local 1076 ocs_t *ocs = node->ocs; local 1125 ocs_t *ocs = node->ocs; local 1175 ocs_t *ocs = node->ocs; local 1234 ocs_t *ocs = node->ocs; local 1283 ocs_t *ocs = node->ocs; local 1345 ocs_t *ocs = node->ocs; local 1384 ocs_t *ocs = node->ocs; local 1449 ocs_t *ocs = node->ocs; local 1506 ocs_t *ocs = node->ocs; local 1558 ocs_t *ocs = node->ocs; local 1605 ocs_t *ocs = node->ocs; local 1656 ocs_t *ocs; local 1713 ocs_t *ocs = node->ocs; local 1765 ocs_t *ocs = node->ocs; local 1825 ocs_t *ocs = node->ocs; local 1903 ocs_t *ocs; local 1993 ocs_t *ocs; local 2043 ocs_t *ocs; local [all...] |
H A D | ocs_sport.h | 63 return ocs_device_lock_try(sport->ocs); 70 ocs_device_lock(sport->ocs); 77 ocs_device_unlock(sport->ocs); 95 extern int32_t ocs_sport_vport_del(ocs_t *ocs, ocs_domain_t *domain, uint64_t wwpn, uint64_t wwnn); 96 extern void ocs_vport_del_all(ocs_t *ocs); 97 extern int8_t ocs_vport_create_spec(ocs_t *ocs, uint64_t wwnn, uint64_t wwpn, uint32_t fc_id, uint32_t enable_ini, uint32_t enable_tgt, void *tgt_data, void *ini_data);
|
H A D | ocs_os.c | 39 #include "ocs.h" 94 * @param ocs Pointer to the driver's context 101 ocs_reg_read32(ocs_t *ocs, uint32_t rset, uint32_t off) argument 105 reg = &ocs->reg[rset]; 118 * @param ocs Pointer to the driver's context 125 ocs_reg_read16(ocs_t *ocs, uint32_t rset, uint32_t off) argument 129 reg = &ocs->reg[rset]; 142 * @param ocs Pointer to the driver's context 149 ocs_reg_read8(ocs_t *ocs, uint32_t rset, uint32_t off) argument 153 reg = &ocs 174 ocs_reg_write32(ocs_t *ocs, uint32_t rset, uint32_t off, uint32_t val) argument 199 ocs_reg_write16(ocs_t *ocs, uint32_t rset, uint32_t off, uint16_t val) argument 224 ocs_reg_write8(ocs_t *ocs, uint32_t rset, uint32_t off, uint8_t val) argument 321 struct ocs_softc *ocs = os; local 363 struct ocs_softc *ocs = os; local 568 _ocs_log(ocs_t *ocs, const char *func_name, int line, const char *fmt, ...) argument 887 ocs_get_bus_dev_func(ocs_t *ocs, uint8_t* bus, uint8_t* dev, uint8_t* func) argument [all...] |
H A D | ocs_node.h | 44 if (OCS_LOG_ENABLE_SM_TRACE(node->ocs)) \ 45 ocs_log_info(node->ocs, "[%s] %-20s\n", node->display_name, ocs_sm_event_name(evt)); \ 48 #define node_printf(node, fmt, ...) ocs_log_debug(node->ocs, "[%s] " fmt, node->display_name, ##__VA_ARGS__) 52 ocs_t *ocs = NULL; \ 55 ocs = node->ocs; \ 56 ocs_assert(ocs, NULL); \ 121 extern int32_t ocs_node_create_pool(ocs_t *ocs, uint32_t node_count); 122 extern void ocs_node_free_pool(ocs_t *ocs); 123 extern ocs_node_t *ocs_node_get_instance(ocs_t *ocs, uint32_ [all...] |
H A D | ocs_io.h | 44 if (OCS_LOG_ENABLE_IO_ERRORS(io->ocs)) \ 45 ocs_log_warn(io->ocs, fmt, ##__VA_ARGS__); \ 72 ocs_t *ocs; /**< pointer back to ocs */ member in struct:ocs_io_s 186 extern ocs_io_pool_t *ocs_io_pool_create(ocs_t *ocs, uint32_t num_io, uint32_t num_sgl); 192 extern ocs_io_t *ocs_io_find_tgt_io(ocs_t *ocs, ocs_node_t *node, uint16_t ox_id, uint16_t rx_id);
|
H A D | ocs_cam.h | 117 extern int32_t ocs_cam_attach(ocs_t *ocs); 118 extern int32_t ocs_cam_detach(ocs_t *ocs);
|
H A D | ocs_utils.c | 39 #include "ocs.h" 962 ocs_queue_history_init(ocs_t *ocs, ocs_hw_q_hist_t *q_hist) argument 964 q_hist->ocs = ocs; 967 ocs_log_debug(ocs, "q_hist not NULL, skipping init\n"); 971 q_hist->q_hist = ocs_malloc(ocs, sizeof(*q_hist->q_hist)*OCS_Q_HIST_SIZE, OCS_M_ZERO | OCS_M_NOWAIT); 974 ocs_log_err(ocs, "Could not allocate queue history buffer\n"); 976 ocs_lock_init(ocs, &q_hist->q_hist_lock, "queue history lock[%d]", ocs_instance(ocs)); 993 ocs_t *ocs local 1686 ocs_textbuf_alloc(ocs_t *ocs, ocs_textbuf_t *textbuf, uint32_t length) argument 1739 ocs_textbuf_segment_free(ocs_t *ocs, ocs_textbuf_segment_t *segment) argument 1768 ocs_textbuf_init(ocs_t *ocs, ocs_textbuf_t *textbuf, void *buffer, uint32_t length) argument 1791 ocs_textbuf_free(ocs_t *ocs, ocs_textbuf_t *textbuf) argument 2311 ocs_ramlog_init(ocs_t *ocs, uint32_t buffer_len, uint32_t buffer_count) argument 2361 ocs_ramlog_free(ocs_t *ocs, ocs_ramlog_t *ramlog) argument 2393 ocs_ramlog_clear(ocs_t *ocs, ocs_ramlog_t *ramlog, int clear_start_of_day, int clear_recent) argument 2426 ocs_t *ocs = os; local [all...] |