Lines Matching full:ocs

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()
135 ocs->reg[r].bhandle = rman_get_bushandle(ocs->reg[r].res); in ocs_map_g7_bars()
139 ocs->reg[r].rid); in ocs_map_g7_bars()
140 ocs_release_bus(ocs); in ocs_map_g7_bars()
158 ocs_map_bars(device_t dev, struct ocs_softc *ocs) in ocs_map_bars() argument
164 ocs->reg[0].rid = PCIR_BAR(PCI_64BIT_BAR0); in ocs_map_bars()
165 ocs->reg[0].res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, in ocs_map_bars()
166 &ocs->reg[0].rid, RF_ACTIVE); in ocs_map_bars()
168 if (ocs->reg[0].res == NULL) { in ocs_map_bars()
170 ocs->reg[0].rid); in ocs_map_bars()
174 ocs->reg[0].btag = rman_get_bustag(ocs->reg[0].res); in ocs_map_bars()
175 ocs->reg[0].bhandle = rman_get_bushandle(ocs->reg[0].res); in ocs_map_bars()
180 ocs_setup_params(struct ocs_softc *ocs) in ocs_setup_params() argument
185 ocs->ctrlmask = ctrlmask; in ocs_setup_params()
186 ocs->speed = 0; in ocs_setup_params()
187 ocs->topology = 0; in ocs_setup_params()
188 ocs->ethernet_license = 0; in ocs_setup_params()
189 ocs->num_scsi_ios = 8192; in ocs_setup_params()
190 ocs->enable_hlm = 0; in ocs_setup_params()
191 ocs->hlm_group_size = 8; in ocs_setup_params()
192 ocs->logmask = logmask; in ocs_setup_params()
194 ocs->config_tgt = FALSE; in ocs_setup_params()
195 if (0 == resource_int_value(device_get_name(ocs->dev), device_get_unit(ocs->dev), in ocs_setup_params()
198 ocs->config_tgt = TRUE; in ocs_setup_params()
199 device_printf(ocs->dev, "Enabling target\n"); in ocs_setup_params()
203 ocs->config_ini = TRUE; in ocs_setup_params()
204 if (0 == resource_int_value(device_get_name(ocs->dev), device_get_unit(ocs->dev), in ocs_setup_params()
207 ocs->config_ini = FALSE; in ocs_setup_params()
208 device_printf(ocs->dev, "Disabling initiator\n"); in ocs_setup_params()
211 ocs->enable_ini = ocs->config_ini; in ocs_setup_params()
213 if (!ocs->config_ini && !ocs->config_tgt) { in ocs_setup_params()
214 device_printf(ocs->dev, "Unsupported, both initiator and target mode disabled.\n"); in ocs_setup_params()
218 if (0 == resource_int_value(device_get_name(ocs->dev), device_get_unit(ocs->dev), in ocs_setup_params()
220 device_printf(ocs->dev, "logmask = %#x\n", logmask); in ocs_setup_params()
223 if (0 == resource_int_value(device_get_name(ocs->dev), device_get_unit(ocs->dev), in ocs_setup_params()
225 device_printf(ocs->dev, "logdest = %#x\n", logdest); in ocs_setup_params()
228 if (0 == resource_int_value(device_get_name(ocs->dev), device_get_unit(ocs->dev), in ocs_setup_params()
230 device_printf(ocs->dev, "loglevel = %#x\n", loglevel); in ocs_setup_params()
233 if (0 == resource_int_value(device_get_name(ocs->dev), device_get_unit(ocs->dev), in ocs_setup_params()
235 device_printf(ocs->dev, "ramlog_size = %#x\n", ramlog_size); in ocs_setup_params()
238 if (0 == resource_int_value(device_get_name(ocs->dev), device_get_unit(ocs->dev), in ocs_setup_params()
240 device_printf(ocs->dev, "ddump_saved_size= %#x\n", ddump_saved_size); in ocs_setup_params()
245 ocs->ramlog = ocs_ramlog_init(ocs, ramlog_size/OCS_RAMLOG_DEFAULT_BUFFERS, in ocs_setup_params()
249 if (ocs->ramlog == NULL) { in ocs_setup_params()
256 if (ocs_textbuf_alloc(ocs, &ocs->ddump_saved, ddump_saved_size)) { in ocs_setup_params()
257 ocs_log_err(ocs, "failed to allocate memory for saved ddump\n"); in ocs_setup_params()
261 if (0 == resource_string_value(device_get_name(ocs->dev), device_get_unit(ocs->dev), in ocs_setup_params()
263 device_printf(ocs->dev, "hw_war_version = %s\n", hw_war_version); in ocs_setup_params()
264 ocs->hw_war_version = strdup(hw_war_version, M_OCS); in ocs_setup_params()
267 if (0 == resource_int_value(device_get_name(ocs->dev), device_get_unit(ocs->dev), in ocs_setup_params()
269 ocs->explicit_buffer_list = i; in ocs_setup_params()
272 if (0 == resource_int_value(device_get_name(ocs->dev), device_get_unit(ocs->dev), in ocs_setup_params()
274 ocs->ethernet_license = i; in ocs_setup_params()
277 if (0 == resource_int_value(device_get_name(ocs->dev), device_get_unit(ocs->dev), in ocs_setup_params()
279 device_printf(ocs->dev, "speed = %d Mbps\n", i); in ocs_setup_params()
280 ocs->speed = i; in ocs_setup_params()
282 ocs->desc = device_get_desc(ocs->dev); in ocs_setup_params()
284 ocs_device_lock_init(ocs); in ocs_setup_params()
285 ocs->driver_version = STR_BE_MAJOR "." STR_BE_MINOR "." STR_BE_BUILD "." STR_BE_BRANCH; in ocs_setup_params()
286 ocs->model = ocs_pci_model(ocs->pci_vendor, ocs->pci_device); in ocs_setup_params()
288 if (0 == resource_int_value(device_get_name(ocs->dev), device_get_unit(ocs->dev), in ocs_setup_params()
290 device_printf(ocs->dev, "enable_hlm = %d\n", i); in ocs_setup_params()
291 ocs->enable_hlm = i; in ocs_setup_params()
292 if (ocs->enable_hlm) { in ocs_setup_params()
293 ocs->hlm_group_size = 8; in ocs_setup_params()
295 if (0 == resource_int_value(device_get_name(ocs->dev), device_get_unit(ocs->dev), in ocs_setup_params()
297 ocs->hlm_group_size = i; in ocs_setup_params()
299 device_printf(ocs->dev, "hlm_group_size = %d\n", i); in ocs_setup_params()
303 if (0 == resource_int_value(device_get_name(ocs->dev), device_get_unit(ocs->dev), in ocs_setup_params()
305 ocs->num_scsi_ios = i; in ocs_setup_params()
306 device_printf(ocs->dev, "num_scsi_ios = %d\n", ocs->num_scsi_ios); in ocs_setup_params()
308 ocs->num_scsi_ios = 8192; in ocs_setup_params()
311 if (0 == resource_int_value(device_get_name(ocs->dev), device_get_unit(ocs->dev), in ocs_setup_params()
313 ocs->topology = i; in ocs_setup_params()
314 device_printf(ocs->dev, "Setting topology=%#x\n", i); in ocs_setup_params()
317 if (0 == resource_int_value(device_get_name(ocs->dev), device_get_unit(ocs->dev), in ocs_setup_params()
320 device_printf(ocs->dev, "num_vports = %d\n", i); in ocs_setup_params()
321 ocs->num_vports = i; in ocs_setup_params()
323 device_printf(ocs->dev, "num_vports: %d not supported \n", i); in ocs_setup_params()
327 if (0 == resource_int_value(device_get_name(ocs->dev), device_get_unit(ocs->dev), in ocs_setup_params()
329 device_printf(ocs->dev, "external_loopback = %d\n", i); in ocs_setup_params()
330 ocs->external_loopback = i; in ocs_setup_params()
333 if (0 == resource_int_value(device_get_name(ocs->dev), device_get_unit(ocs->dev), in ocs_setup_params()
335 device_printf(ocs->dev, "tgt_rscn_delay = %d\n", i); in ocs_setup_params()
336 ocs->tgt_rscn_delay_msec = i * 1000; in ocs_setup_params()
339 if (0 == resource_int_value(device_get_name(ocs->dev), device_get_unit(ocs->dev), in ocs_setup_params()
341 device_printf(ocs->dev, "tgt_rscn_period = %d\n", i); in ocs_setup_params()
342 ocs->tgt_rscn_period_msec = i * 1000; in ocs_setup_params()
345 if (0 == resource_int_value(device_get_name(ocs->dev), device_get_unit(ocs->dev), in ocs_setup_params()
347 device_printf(ocs->dev, "target_io_timer = %d\n", i); in ocs_setup_params()
348 ocs->target_io_timer_sec = i; in ocs_setup_params()
352 ocs->rq_selection_policy = 0; in ocs_setup_params()
353 ocs->rr_quanta = 1; in ocs_setup_params()
354 ocs->filter_def = "0,0,0,0"; in ocs_setup_params()
360 ocs_setup_fcports(ocs_t *ocs) in ocs_setup_fcports() argument
365 ocs_xport_t *xport = ocs->xport; in ocs_setup_fcports()
369 size = sizeof(ocs_fcport) * (ocs->num_vports + 1); in ocs_setup_fcports()
371 ocs->fcports = ocs_malloc(ocs, size, M_ZERO|M_NOWAIT); in ocs_setup_fcports()
372 if (ocs->fcports == NULL) { in ocs_setup_fcports()
373 device_printf(ocs->dev, "Can't allocate fcport \n"); in ocs_setup_fcports()
377 role = (ocs->enable_ini)? KNOB_ROLE_INITIATOR: 0 | in ocs_setup_fcports()
378 (ocs->enable_tgt)? KNOB_ROLE_TARGET: 0; in ocs_setup_fcports()
380 fcp = FCPORT(ocs, i); in ocs_setup_fcports()
385 fcp = FCPORT(ocs, i); in ocs_setup_fcports()
390 if (ocs_hw_get_def_wwn(ocs, i, &sli_wwpn, &sli_wwnn)) { in ocs_setup_fcports()
391 ocs_log_err(ocs, "Get default wwn failed \n"); in ocs_setup_fcports()
399 ocs_log_debug(ocs, "VPort wwpn: %lx wwnn: %lx \n", vport->wwpn, vport->wwnn); in ocs_setup_fcports()
406 ocs_device_attach(ocs_t *ocs) in ocs_device_attach() argument
411 if (ocs->attached) { in ocs_device_attach()
412 ocs_log_warn(ocs, "%s: Device is already attached\n", __func__); in ocs_device_attach()
417 ocs->xport = ocs_xport_alloc(ocs); in ocs_device_attach()
418 if (ocs->xport == NULL) { in ocs_device_attach()
419 device_printf(ocs->dev, "failed to allocate transport object\n"); in ocs_device_attach()
421 } else if (ocs_xport_attach(ocs->xport) != 0) { in ocs_device_attach()
422 device_printf(ocs->dev, "%s: failed to attach transport object\n", __func__); in ocs_device_attach()
424 } else if (ocs_xport_initialize(ocs->xport) != 0) { in ocs_device_attach()
425 device_printf(ocs->dev, "%s: failed to initialize transport object\n", __func__); in ocs_device_attach()
429 if (ocs_init_dma_tag(ocs)) { in ocs_device_attach()
433 for (i = 0; (io = ocs_io_get_instance(ocs, i)); i++) { in ocs_device_attach()
434 if (bus_dmamap_create(ocs->buf_dmat, 0, &io->tgt_io.dmap)) { in ocs_device_attach()
435 device_printf(ocs->dev, "%s: bad dma map create\n", __func__); in ocs_device_attach()
441 if (ocs_setup_fcports(ocs)) { in ocs_device_attach()
442 device_printf(ocs->dev, "FCports creation failed\n"); in ocs_device_attach()
446 if (ocs_cam_attach(ocs)) { in ocs_device_attach()
447 device_printf(ocs->dev, "cam attach failed \n"); in ocs_device_attach()
451 if (ocs_intr_setup(ocs)) { in ocs_device_attach()
452 device_printf(ocs->dev, "Interrupt setup failed\n"); in ocs_device_attach()
456 if (ocs->enable_ini || ocs->enable_tgt) { in ocs_device_attach()
457 if (ocs_xport_control(ocs->xport, OCS_XPORT_PORT_ONLINE)) { in ocs_device_attach()
458 device_printf(ocs->dev, "Can't init port\n"); in ocs_device_attach()
463 ocs->attached = true; in ocs_device_attach()
468 if (ocs_xport_control(ocs->xport, OCS_XPORT_SHUTDOWN)) { in ocs_device_attach()
469 device_printf(ocs->dev, "Transport Shutdown timed out\n"); in ocs_device_attach()
471 ocs_intr_teardown(ocs); in ocs_device_attach()
474 ocs_xport_detach(ocs->xport); in ocs_device_attach()
475 if (ocs->config_tgt) in ocs_device_attach()
476 ocs_scsi_tgt_del_device(ocs); in ocs_device_attach()
478 ocs_xport_free(ocs->xport); in ocs_device_attach()
479 ocs->xport = NULL; in ocs_device_attach()
481 if (ocs->xport) in ocs_device_attach()
482 ocs_free(ocs, ocs->xport, sizeof(*(ocs->xport))); in ocs_device_attach()
483 ocs->xport = NULL; in ocs_device_attach()
503 struct ocs_softc *ocs; in ocs_pci_attach() local
508 ocs = (struct ocs_softc *)device_get_softc(dev); in ocs_pci_attach()
509 if (NULL == ocs) { in ocs_pci_attach()
513 memset(ocs, 0, sizeof(struct ocs_softc)); in ocs_pci_attach()
516 ocs_devices[instance] = ocs; in ocs_pci_attach()
518 device_printf(dev, "got unexpected ocs instance number %d\n", instance); in ocs_pci_attach()
521 ocs->instance_index = instance; in ocs_pci_attach()
523 ocs->dev = dev; in ocs_pci_attach()
528 ocs->pci_vendor = pci_get_vendor(dev); in ocs_pci_attach()
529 ocs->pci_device = pci_get_device(dev); in ocs_pci_attach()
530 ocs->pci_subsystem_vendor = pci_get_subvendor(dev); in ocs_pci_attach()
531 ocs->pci_subsystem_device = pci_get_subdevice(dev); in ocs_pci_attach()
533 snprintf(ocs->businfo, sizeof(ocs->businfo), "%02X:%02X:%02X", in ocs_pci_attach()
537 if (ocs->pci_device == PCI_PRODUCT_EMULEX_LANCER_G7) { in ocs_pci_attach()
538 if(ocs_map_g7_bars(dev,ocs)) { in ocs_pci_attach()
543 if (ocs_map_bars(dev, ocs)) { in ocs_pci_attach()
563 &ocs->dmat)) { in ocs_pci_attach()
568 if (ocs_intr_alloc(ocs)) { in ocs_pci_attach()
575 ocs->ocs_xport = OCS_XPORT_FC; in ocs_pci_attach()
584 if (ocs_setup_params(ocs)) { in ocs_pci_attach()
585 device_printf(ocs->dev, "failed to setup params\n"); in ocs_pci_attach()
589 if (ocs_device_attach(ocs)) { in ocs_pci_attach()
590 device_printf(ocs->dev, "failed to attach device\n"); in ocs_pci_attach()
594 ocs->fc_type = FC_TYPE_FCP; in ocs_pci_attach()
596 ocs_debug_attach(ocs); in ocs_pci_attach()
601 ocs_ramlog_free(ocs, ocs->ramlog); in ocs_pci_attach()
602 ocs_device_lock_free(ocs); in ocs_pci_attach()
603 free(ocs->hw_war_version, M_OCS); in ocs_pci_attach()
605 ocs_release_bus(ocs); in ocs_pci_attach()
612 * @param ocs pointer to ocs structure
618 ocs_device_detach(ocs_t *ocs) in ocs_device_detach() argument
623 if (ocs != NULL) { in ocs_device_detach()
624 if (!ocs->attached) { in ocs_device_detach()
625 ocs_log_warn(ocs, "%s: Device is not attached\n", __func__); in ocs_device_detach()
629 ocs->attached = FALSE; in ocs_device_detach()
631 rc = ocs_xport_control(ocs->xport, OCS_XPORT_SHUTDOWN); in ocs_device_detach()
633 ocs_log_err(ocs, "%s: Transport Shutdown timed out\n", __func__); in ocs_device_detach()
636 ocs_intr_teardown(ocs); in ocs_device_detach()
638 if (ocs_xport_detach(ocs->xport) != 0) { in ocs_device_detach()
639 ocs_log_err(ocs, "%s: Transport detach failed\n", __func__); in ocs_device_detach()
642 ocs_cam_detach(ocs); in ocs_device_detach()
643 ocs_free(ocs, ocs->fcports, sizeof(*(ocs->fcports))); in ocs_device_detach()
645 for (i = 0; (io = ocs_io_get_instance(ocs, i)); i++) { in ocs_device_detach()
646 if (bus_dmamap_destroy(ocs->buf_dmat, io->tgt_io.dmap)) { in ocs_device_detach()
647 device_printf(ocs->dev, "%s: bad dma map destroy\n", __func__); in ocs_device_detach()
650 bus_dma_tag_destroy(ocs->dmat); in ocs_device_detach()
651 ocs_xport_free(ocs->xport); in ocs_device_detach()
652 ocs->xport = NULL; in ocs_device_detach()
671 struct ocs_softc *ocs; in ocs_pci_detach() local
673 ocs = (struct ocs_softc *)device_get_softc(dev); in ocs_pci_detach()
674 if (!ocs) { in ocs_pci_detach()
679 if (ocs->config_tgt && ocs->enable_tgt) { in ocs_pci_detach()
684 ocs_device_detach(ocs); in ocs_pci_detach()
687 * Workaround for OCS SCSI Transport quirk. in ocs_pci_detach()
690 * driver (ie ocs->enable_tgt = FALSE), but once the target is disabled, in ocs_pci_detach()
694 if (ocs->config_tgt) in ocs_pci_detach()
695 ocs_scsi_tgt_del_device(ocs); in ocs_pci_detach()
698 free(ocs->hw_war_version, M_OCS); in ocs_pci_detach()
700 ocs_device_lock_free(ocs); in ocs_pci_detach()
702 ocs_debug_detach(ocs); in ocs_pci_detach()
704 ocs_ramlog_free(ocs, ocs->ramlog); in ocs_pci_detach()
706 ocs_release_bus(ocs); in ocs_pci_detach()
728 * @param ocs Pointer to the driver's context
733 ocs_release_bus(struct ocs_softc *ocs) in ocs_release_bus() argument
736 if (NULL != ocs) { in ocs_release_bus()
739 ocs_intr_teardown(ocs); in ocs_release_bus()
741 if (ocs->irq) { in ocs_release_bus()
742 bus_release_resource(ocs->dev, SYS_RES_IRQ, in ocs_release_bus()
743 rman_get_rid(ocs->irq), ocs->irq); in ocs_release_bus()
745 if (ocs->n_vec) { in ocs_release_bus()
746 pci_release_msi(ocs->dev); in ocs_release_bus()
747 ocs->n_vec = 0; in ocs_release_bus()
750 ocs->irq = NULL; in ocs_release_bus()
753 bus_dma_tag_destroy(ocs->dmat); in ocs_release_bus()
756 if (ocs->reg[i].res) { in ocs_release_bus()
757 bus_release_resource(ocs->dev, SYS_RES_MEMORY, in ocs_release_bus()
758 ocs->reg[i].rid, in ocs_release_bus()
759 ocs->reg[i].res); in ocs_release_bus()
768 * @param ocs Pointer to the driver's context
773 ocs_intr_alloc(struct ocs_softc *ocs) in ocs_intr_alloc() argument
776 ocs->n_vec = 1; in ocs_intr_alloc()
777 if (pci_alloc_msix(ocs->dev, &ocs->n_vec)) { in ocs_intr_alloc()
778 device_printf(ocs->dev, "MSI-X allocation failed\n"); in ocs_intr_alloc()
779 if (pci_alloc_msi(ocs->dev, &ocs->n_vec)) { in ocs_intr_alloc()
780 device_printf(ocs->dev, "MSI allocation failed \n"); in ocs_intr_alloc()
781 ocs->irqid = 0; in ocs_intr_alloc()
782 ocs->n_vec = 0; in ocs_intr_alloc()
784 ocs->irqid = 1; in ocs_intr_alloc()
786 ocs->irqid = 1; in ocs_intr_alloc()
789 ocs->irq = bus_alloc_resource_any(ocs->dev, SYS_RES_IRQ, &ocs->irqid, in ocs_intr_alloc()
791 if (NULL == ocs->irq) { in ocs_intr_alloc()
792 device_printf(ocs->dev, "could not allocate interrupt\n"); in ocs_intr_alloc()
796 ocs->intr_ctx.vec = 0; in ocs_intr_alloc()
797 ocs->intr_ctx.softc = ocs; in ocs_intr_alloc()
798 snprintf(ocs->intr_ctx.name, sizeof(ocs->intr_ctx.name), in ocs_intr_alloc()
800 device_get_nameunit(ocs->dev), in ocs_intr_alloc()
801 ocs->intr_ctx.vec); in ocs_intr_alloc()
809 * @param ocs Pointer to the driver's context
814 ocs_intr_setup(struct ocs_softc *ocs) in ocs_intr_setup() argument
818 if (0 == ocs->n_vec) { in ocs_intr_setup()
822 if (bus_setup_intr(ocs->dev, ocs->irq, INTR_MPSAFE | INTR_TYPE_CAM, in ocs_intr_setup()
823 filter, ocs_pci_intr, &ocs->intr_ctx, in ocs_intr_setup()
824 &ocs->tag)) { in ocs_intr_setup()
825 device_printf(ocs->dev, "could not initialize interrupt\n"); in ocs_intr_setup()
835 * @param ocs Pointer to the driver's context
840 ocs_intr_teardown(struct ocs_softc *ocs) in ocs_intr_teardown() argument
843 if (!ocs) { in ocs_intr_teardown()
848 if (ocs->tag) { in ocs_intr_teardown()
849 bus_teardown_intr(ocs->dev, ocs->irq, ocs->tag); in ocs_intr_teardown()
850 ocs->tag = NULL; in ocs_intr_teardown()
867 struct ocs_softc *ocs = NULL; in ocs_pci_intx_filter() local
874 ocs = intr->softc; in ocs_pci_intx_filter()
878 val = pci_read_config(ocs->dev, PCIR_STATUS, 2); in ocs_pci_intx_filter()
880 device_printf(ocs->dev, "%s: pci_read_config(PCIR_STATUS) failed\n", __func__); in ocs_pci_intx_filter()
887 val = pci_read_config(ocs->dev, PCIR_COMMAND, 2); in ocs_pci_intx_filter()
889 pci_write_config(ocs->dev, PCIR_COMMAND, val, 2); in ocs_pci_intx_filter()
903 struct ocs_softc *ocs = intr->softc; in ocs_pci_intr() local
905 mtx_lock(&ocs->sim_lock); in ocs_pci_intr()
906 ocs_hw_process(&ocs->hw, intr->vec, OCS_OS_MAX_ISR_TIME_MSEC); in ocs_pci_intr()
907 mtx_unlock(&ocs->sim_lock); in ocs_pci_intr()
913 * @param ocs the driver instance's software context
918 ocs_init_dma_tag(struct ocs_softc *ocs) in ocs_init_dma_tag() argument
928 ocs_hw_get(&ocs->hw, OCS_HW_N_SGL, &max_sgl); in ocs_init_dma_tag()
929 ocs_hw_get(&ocs->hw, OCS_HW_MAX_SGE, &max_sge); in ocs_init_dma_tag()
931 if (bus_dma_tag_create(ocs->dmat, in ocs_init_dma_tag()
944 &ocs->buf_dmat)) { in ocs_init_dma_tag()
945 device_printf(ocs->dev, "%s: bad bus_dma_tag_create(buf_dmat)\n", __func__); in ocs_init_dma_tag()
958 * @brief return pointer to ocs structure given instance index
960 * A pointer to an ocs structure is returned given an instance index.
964 * @return ocs pointer
976 * @brief Return instance index of an opaque ocs structure
978 * Returns the ocs instance index
980 * @param os pointer to ocs instance
982 * @return pointer to ocs instance index
987 ocs_t *ocs = os; in ocs_instance() local
988 return ocs->instance_index; in ocs_instance()