static int isa_dma_allochdl(dev_info_t *dip, dev_info_t *rdip, ddi_dma_attr_t *dma_attr, int (*waitfp)(caddr_t), caddr_t arg, ddi_dma_handle_t *handlep) { ddi_dma_attr_merge(dma_attr, &ISA_dma_attr); return (ddi_dma_allochdl(dip, rdip, dma_attr, waitfp, arg, handlep)); }
/* * nx1394_dma_allochdl() * Merges the ddi_dma_attr_t passed in by the target (using * ddi_dma_alloc_handle() call) with that of the hal and passes the alloc * handle request up the device by calling ddi_dma_allochdl(). */ static int nx1394_dma_allochdl(dev_info_t *dip, dev_info_t *rdip, ddi_dma_attr_t *attr, int (*waitfnp)(caddr_t), caddr_t arg, ddi_dma_handle_t *handlep) { s1394_hal_t *hal; ddi_dma_attr_t *hal_attr; int status; _NOTE(SCHEME_PROTECTS_DATA("unique (per thread)", ddi_dma_attr_t)) TNF_PROBE_0_DEBUG(nx1394_dma_allochdl_enter, S1394_TNF_SL_NEXUS_STACK, ""); /* * If hal calls ddi_dma_alloc_handle, dip == rdip == hal dip. * Unfortunately, we cannot verify this (by way of looking up for hal * dip) here because h1394_attach() may happen much later. */ if (dip != rdip) { hal = s1394_dip_to_hal(ddi_get_parent(rdip)); ASSERT(hal); hal_attr = &hal->halinfo.dma_attr; ASSERT(hal_attr); ddi_dma_attr_merge(attr, hal_attr); } status = ddi_dma_allochdl(dip, rdip, attr, waitfnp, arg, handlep); TNF_PROBE_1_DEBUG(nx1394_dma_allochdl_exit, S1394_TNF_SL_NEXUS_STACK, "", tnf_int, status, status); return (status); }