/linux-6.1.9/drivers/dma/sh/ |
D | usb-dmac.c | 55 unsigned int sg_len; member 263 static int usb_dmac_desc_alloc(struct usb_dmac_chan *chan, unsigned int sg_len, in usb_dmac_desc_alloc() argument 269 desc = kzalloc(struct_size(desc, sg, sg_len), gfp); in usb_dmac_desc_alloc() 273 desc->sg_allocated_len = sg_len; in usb_dmac_desc_alloc() 299 unsigned int sg_len, gfp_t gfp) in usb_dmac_desc_get() argument 307 if (sg_len <= desc->sg_allocated_len) { in usb_dmac_desc_get() 316 if (!usb_dmac_desc_alloc(chan, sg_len, gfp)) { in usb_dmac_desc_get() 417 unsigned int sg_len, enum dma_transfer_direction dir, in usb_dmac_prep_slave_sg() argument 425 if (!sg_len) { in usb_dmac_prep_slave_sg() 427 "%s: bad parameter: len=%d\n", __func__, sg_len); in usb_dmac_prep_slave_sg() [all …]
|
D | shdma-base.c | 561 struct scatterlist *sgl, unsigned int sg_len, dma_addr_t *addr, in shdma_prep_sg() argument 571 for_each_sg(sgl, sg, sg_len, i) in shdma_prep_sg() 588 for_each_sg(sgl, sg, sg_len, i) { in shdma_prep_sg() 662 struct dma_chan *chan, struct scatterlist *sgl, unsigned int sg_len, in shdma_prep_slave_sg() argument 677 if (slave_id < 0 || !sg_len) { in shdma_prep_slave_sg() 679 __func__, sg_len, slave_id); in shdma_prep_slave_sg() 685 return shdma_prep_sg(schan, sgl, sg_len, &slave_addr, in shdma_prep_slave_sg() 700 unsigned int sg_len = buf_len / period_len; in shdma_prep_dma_cyclic() local 711 if (sg_len > SHDMA_MAX_SG_LEN) { in shdma_prep_dma_cyclic() 713 sg_len, SHDMA_MAX_SG_LEN); in shdma_prep_dma_cyclic() [all …]
|
D | rcar-dmac.c | 929 unsigned int sg_len, dma_addr_t dev_addr, in rcar_dmac_chan_prep_sg() argument 964 for_each_sg(sgl, sg, sg_len, i) { in rcar_dmac_chan_prep_sg() 1201 unsigned int sg_len, enum dma_transfer_direction dir, in rcar_dmac_prep_slave_sg() argument 1207 if (rchan->mid_rid < 0 || !sg_len || !sg_dma_len(sgl)) { in rcar_dmac_prep_slave_sg() 1210 __func__, sg_len, rchan->mid_rid); in rcar_dmac_prep_slave_sg() 1217 return rcar_dmac_chan_prep_sg(rchan, sgl, sg_len, rchan->map.addr, in rcar_dmac_prep_slave_sg() 1231 unsigned int sg_len; in rcar_dmac_prep_dma_cyclic() local 1245 sg_len = buf_len / period_len; in rcar_dmac_prep_dma_cyclic() 1246 if (sg_len > RCAR_DMAC_MAX_SG_LEN) { in rcar_dmac_prep_dma_cyclic() 1249 rchan->index, sg_len, RCAR_DMAC_MAX_SG_LEN); in rcar_dmac_prep_dma_cyclic() [all …]
|
/linux-6.1.9/drivers/mmc/core/ |
D | mmc_test.c | 82 unsigned int sg_len; member 162 unsigned int *sg_len; member 210 struct mmc_request *mrq, struct scatterlist *sg, unsigned sg_len, in mmc_test_prepare_mrq() argument 242 mrq->data->sg_len = sg_len; in mmc_test_prepare_mrq() 411 unsigned int *sg_len, int min_sg_len) in mmc_test_map_sg() argument 421 *sg_len = 0; in mmc_test_map_sg() 440 *sg_len += 1; in mmc_test_map_sg() 464 unsigned int *sg_len) in mmc_test_map_sg_max_scatter() argument 473 *sg_len = 0; in mmc_test_map_sg_max_scatter() 495 *sg_len += 1; in mmc_test_map_sg_max_scatter() [all …]
|
D | sdio_ops.c | 158 data.sg_len = nents; in mmc_io_rw_extended() 160 for_each_sg(data.sg, sg_ptr, data.sg_len, i) { in mmc_io_rw_extended() 167 data.sg_len = 1; in mmc_io_rw_extended()
|
/linux-6.1.9/drivers/mmc/host/ |
D | uniphier-sd.c | 100 dma_unmap_sg(mmc_dev(host->mmc), host->sg_ptr, host->sg_len, in uniphier_sd_external_dma_callback() 129 int sg_len; in uniphier_sd_external_dma_start() local 142 sg_len = dma_map_sg(mmc_dev(host->mmc), host->sg_ptr, host->sg_len, in uniphier_sd_external_dma_start() 144 if (sg_len == 0) in uniphier_sd_external_dma_start() 147 desc = dmaengine_prep_slave_sg(priv->chan, host->sg_ptr, sg_len, in uniphier_sd_external_dma_start() 164 dma_unmap_sg(mmc_dev(host->mmc), host->sg_ptr, host->sg_len, in uniphier_sd_external_dma_start() 251 int sg_len; in uniphier_sd_internal_dma_start() local 256 if (WARN_ON(host->sg_len != 1)) in uniphier_sd_internal_dma_start() 270 sg_len = dma_map_sg(mmc_dev(host->mmc), sg, 1, priv->dma_dir); in uniphier_sd_internal_dma_start() 271 if (sg_len == 0) in uniphier_sd_internal_dma_start()
|
D | renesas_sdhi_sys_dmac.c | 137 host->sg_ptr, host->sg_len, in renesas_sdhi_sys_dmac_dma_callback() 141 host->sg_ptr, host->sg_len, in renesas_sdhi_sys_dmac_dma_callback() 165 for_each_sg(sg, sg_tmp, host->sg_len, i) { in renesas_sdhi_sys_dmac_start_dma_rx() 174 if ((!aligned && (host->sg_len > 1 || sg->length > PAGE_SIZE || in renesas_sdhi_sys_dmac_start_dma_rx() 190 ret = dma_map_sg(chan->device->dev, sg, host->sg_len, DMA_FROM_DEVICE); in renesas_sdhi_sys_dmac_start_dma_rx() 237 for_each_sg(sg, sg_tmp, host->sg_len, i) { in renesas_sdhi_sys_dmac_start_dma_tx() 246 if ((!aligned && (host->sg_len > 1 || sg->length > PAGE_SIZE || in renesas_sdhi_sys_dmac_start_dma_tx() 267 ret = dma_map_sg(chan->device->dev, sg, host->sg_len, DMA_TO_DEVICE); in renesas_sdhi_sys_dmac_start_dma_tx()
|
D | mxs-mmc.c | 148 data->sg_len, ssp->dma_dir); in mxs_mmc_request_done() 221 unsigned int sg_len; in mxs_mmc_prep_dma() local 226 data->sg_len, ssp->dma_dir); in mxs_mmc_prep_dma() 228 sg_len = data->sg_len; in mxs_mmc_prep_dma() 232 sg_len = SSP_PIO_NUM; in mxs_mmc_prep_dma() 236 sgl, sg_len, ssp->slave_dirn, flags); in mxs_mmc_prep_dma() 243 data->sg_len, ssp->dma_dir); in mxs_mmc_prep_dma() 350 unsigned int sg_len = data->sg_len; in mxs_mmc_adtc() local 395 for_each_sg(sgl, sg, sg_len, i) in mxs_mmc_adtc()
|
D | au1xmmc.c | 336 dma_unmap_sg(mmc_dev(host->mmc), data->sg, data->sg_len, host->dma.dir); in au1xmmc_data_complete() 379 int sg_len, max, count; in au1xmmc_send_pio() local 394 sg_len = data->sg[host->pio.index].length - host->pio.offset; in au1xmmc_send_pio() 397 max = (sg_len > host->pio.len) ? host->pio.len : sg_len; in au1xmmc_send_pio() 417 if (count == sg_len) { in au1xmmc_send_pio() 435 int max, count, sg_len = 0; in au1xmmc_receive_pio() local 452 sg_len = sg_dma_len(&data->sg[host->pio.index]) - host->pio.offset; in au1xmmc_receive_pio() 455 if (sg_len < max) in au1xmmc_receive_pio() 456 max = sg_len; in au1xmmc_receive_pio() 496 if (sg_len && count == sg_len) { in au1xmmc_receive_pio() [all …]
|
D | mmci_stm32_sdmmc.c | 70 for_each_sg(data->sg, sg, data->sg_len - 1, i) { in sdmmc_idma_validate_data() 115 sg_copy_to_buffer(data->sg, data->sg_len, in _sdmmc_idma_prep_data() 124 data->sg_len, in _sdmmc_idma_prep_data() 154 sg_copy_from_buffer(data->sg, data->sg_len, in sdmmc_idma_unprep_data() 158 dma_unmap_sg(mmc_dev(host->mmc), data->sg, data->sg_len, in sdmmc_idma_unprep_data() 203 if (!host->variant->dma_lli || data->sg_len == 1 || in sdmmc_idma_start() 219 for_each_sg(data->sg, sg, data->sg_len, i) { in sdmmc_idma_start() 228 desc[data->sg_len - 1].idmalar &= ~MMCI_STM32_ULA; in sdmmc_idma_start()
|
D | tifm_sd.c | 104 int sg_len; member 173 if (host->sg_pos == host->sg_len) in tifm_sd_transfer_data() 180 if (host->sg_pos == host->sg_len) { in tifm_sd_transfer_data() 236 if (host->sg_pos == host->sg_len) in tifm_sd_bounce_block() 269 if (host->sg_pos == host->sg_len) in tifm_sd_set_dma_data() 277 if (host->sg_pos == host->sg_len) in tifm_sd_set_dma_data() 285 if (host->sg_pos == host->sg_len) in tifm_sd_set_dma_data() 665 host->sg_len = r_data->sg_len; in tifm_sd_request() 679 host->sg_len = tifm_map_sg(sock, r_data->sg, in tifm_sd_request() 680 r_data->sg_len, in tifm_sd_request() [all …]
|
D | omap.c | 146 unsigned int sg_len; member 424 dma_unmap_sg(dev, data->sg, host->sg_len, dma_data_dir); in mmc_omap_release_dma() 448 host->sg_len = 0; in mmc_omap_xfer_done() 505 host->sg_len = 0; in mmc_omap_abort_xfer() 670 BUG_ON(host->sg_idx == host->sg_len); in mmc_omap_xfer_data() 949 unsigned sg_len; in mmc_omap_prepare_data() local 970 sg_len = (data->blocks == 1) ? 1 : data->sg_len; in mmc_omap_prepare_data() 973 for_each_sg(data->sg, sg, sg_len, i) { in mmc_omap_prepare_data() 1034 host->sg_len = dma_map_sg(c->device->dev, data->sg, sg_len, in mmc_omap_prepare_data() 1036 if (host->sg_len == 0) in mmc_omap_prepare_data() [all …]
|
D | cavium.c | 377 dma_unmap_sg(host->dev, data->sg, data->sg_len, get_dma_dir(data)); in finish_dma_single() 397 dma_unmap_sg(host->dev, data->sg, data->sg_len, get_dma_dir(data)); in finish_dma_sg() 403 if (host->use_sg && data->sg_len > 1) in finish_dma() 521 count = dma_map_sg(host->dev, data->sg, data->sg_len, in prepare_dma_single() 558 count = dma_map_sg(host->dev, data->sg, data->sg_len, in prepare_dma_sg() 611 dma_unmap_sg(host->dev, data->sg, data->sg_len, get_dma_dir(data)); in prepare_dma_sg() 619 if (host->use_sg && data->sg_len > 1) in prepare_dma() 657 if (!mrq->data || !mrq->data->sg || !mrq->data->sg_len || in cvm_mmc_dma_request() 709 sg_miter_start(&host->smi, mrq->data->sg, mrq->data->sg_len, in do_read_request() 722 sg_miter_start(smi, mrq->data->sg, mrq->data->sg_len, SG_MITER_FROM_SG); in do_write_request()
|
D | dw_mmc.c | 444 data->sg_len, in dw_mci_dma_cleanup() 487 data->sg_len, in dw_mci_dmac_complete_dma() 582 unsigned int sg_len) in dw_mci_prepare_desc64() argument 591 for (i = 0; i < sg_len; i++) { in dw_mci_prepare_desc64() 654 unsigned int sg_len) in dw_mci_prepare_desc32() argument 663 for (i = 0; i < sg_len; i++) { in dw_mci_prepare_desc32() 725 static int dw_mci_idmac_start_dma(struct dw_mci *host, unsigned int sg_len) in dw_mci_idmac_start_dma() argument 731 ret = dw_mci_prepare_desc64(host, host->data, sg_len); in dw_mci_idmac_start_dma() 733 ret = dw_mci_prepare_desc32(host, host->data, sg_len); in dw_mci_idmac_start_dma() 779 unsigned int sg_len) in dw_mci_edmac_start_dma() argument [all …]
|
/linux-6.1.9/drivers/dma/ |
D | st_fdma.c | 238 int sg_len) in st_fdma_alloc_desc() argument 243 fdesc = kzalloc(struct_size(fdesc, node, sg_len), GFP_NOWAIT); in st_fdma_alloc_desc() 248 fdesc->n_nodes = sg_len; in st_fdma_alloc_desc() 249 for (i = 0; i < sg_len; i++) { in st_fdma_alloc_desc() 454 int sg_len, i; in st_fdma_prep_dma_cyclic() local 474 sg_len = len / period_len; in st_fdma_prep_dma_cyclic() 475 fdesc = st_fdma_alloc_desc(fchan, sg_len); in st_fdma_prep_dma_cyclic() 483 for (i = 0; i < sg_len; i++) { in st_fdma_prep_dma_cyclic() 486 hw_node->next = fdesc->node[(i + 1) % sg_len].pdesc; in st_fdma_prep_dma_cyclic() 508 unsigned int sg_len, enum dma_transfer_direction direction, in st_fdma_prep_slave_sg() argument [all …]
|
D | fsl-edma-common.c | 429 int sg_len) in fsl_edma_alloc_desc() argument 434 fsl_desc = kzalloc(struct_size(fsl_desc, tcd, sg_len), GFP_NOWAIT); in fsl_edma_alloc_desc() 439 fsl_desc->n_tcds = sg_len; in fsl_edma_alloc_desc() 440 for (i = 0; i < sg_len; i++) { in fsl_edma_alloc_desc() 464 int sg_len, i; in fsl_edma_prep_dma_cyclic() local 474 sg_len = buf_len / period_len; in fsl_edma_prep_dma_cyclic() 475 fsl_desc = fsl_edma_alloc_desc(fsl_chan, sg_len); in fsl_edma_prep_dma_cyclic() 496 for (i = 0; i < sg_len; i++) { in fsl_edma_prep_dma_cyclic() 501 last_sg = fsl_desc->tcd[(i + 1) % sg_len].ptcd; in fsl_edma_prep_dma_cyclic() 527 unsigned int sg_len, enum dma_transfer_direction direction, in fsl_edma_prep_slave_sg() argument [all …]
|
D | milbeaut-hdmac.c | 62 unsigned int sg_len; member 193 if (md->sg_cur >= md->sg_len) { in milbeaut_hdmac_interrupt() 257 unsigned int sg_len, in milbeaut_hdmac_prep_slave_sg() argument 272 md->sgl = kcalloc(sg_len, sizeof(*sgl), GFP_NOWAIT); in milbeaut_hdmac_prep_slave_sg() 278 for (i = 0; i < sg_len; i++) in milbeaut_hdmac_prep_slave_sg() 281 md->sg_len = sg_len; in milbeaut_hdmac_prep_slave_sg() 371 for (i = md->sg_cur; i < md->sg_len; i++) in milbeaut_hdmac_tx_status()
|
D | uniphier-mdmac.c | 54 unsigned int sg_len; member 209 if (md->sg_cur >= md->sg_len) { in uniphier_mdmac_interrupt() 231 unsigned int sg_len, in uniphier_mdmac_prep_slave_sg() argument 246 md->sg_len = sg_len; in uniphier_mdmac_prep_slave_sg() 319 for (i = md->sg_cur; i < md->sg_len; i++) in uniphier_mdmac_tx_status()
|
D | ste_dma40_ll.c | 266 int sg_len, in d40_phy_sg_to_lli() argument 284 for_each_sg(sg, current_sg, sg_len, i) { in d40_phy_sg_to_lli() 291 if (i == sg_len - 1) in d40_phy_sg_to_lli() 418 int sg_len, in d40_log_sg_to_lli() argument 433 for_each_sg(sg, current_sg, sg_len, i) { in d40_log_sg_to_lli()
|
D | mxs-dma.c | 477 unsigned int sg_len, enum dma_transfer_direction direction, in mxs_dma_prep_slave_sg() argument 491 if (sg_len + idx > NUM_CCW) { in mxs_dma_prep_slave_sg() 494 sg_len, NUM_CCW); in mxs_dma_prep_slave_sg() 520 for (j = 0; j < sg_len;) in mxs_dma_prep_slave_sg() 530 ccw->bits |= BF_CCW(sg_len, PIO_NUM); in mxs_dma_prep_slave_sg() 535 for_each_sg(sgl, sg, sg_len, i) { in mxs_dma_prep_slave_sg() 556 if (i + 1 == sg_len) { in mxs_dma_prep_slave_sg()
|
/linux-6.1.9/net/rds/ |
D | ib_frmr.c | 114 atomic_add(ibmr->sg_len, &pool->free_pinned); in rds_ib_free_frmr() 190 struct scatterlist *sg, unsigned int sg_len) in rds_ib_map_frmr() argument 204 ibmr->sg_len = sg_len; in rds_ib_map_frmr() 208 ibmr->sg_dma_len = ib_dma_map_sg(dev, ibmr->sg, ibmr->sg_len, in rds_ib_map_frmr() 260 ib_dma_unmap_sg(rds_ibdev->dev, ibmr->sg, ibmr->sg_len, in rds_ib_map_frmr() 379 *unpinned += ibmr->sg_len; in rds_ib_unreg_frmr()
|
D | ib_rdma.c | 244 ibmr->sg, ibmr->sg_len, in __rds_ib_teardown_mr() 250 if (ibmr->sg_len) { in __rds_ib_teardown_mr() 253 for (i = 0; i < ibmr->sg_len; ++i) { in __rds_ib_teardown_mr() 265 ibmr->sg_len = 0; in __rds_ib_teardown_mr() 271 unsigned int pinned = ibmr->sg_len; in rds_ib_teardown_mr() 490 rdsdebug("RDS/IB: free_mr nents %u\n", ibmr->sg_len); in rds_ib_free_mr() 505 atomic_add(ibmr->sg_len, &pool->free_pinned); in rds_ib_free_mr()
|
/linux-6.1.9/drivers/crypto/nx/ |
D | nx.c | 83 unsigned int sg_len = 0; in nx_build_sg_list() local 108 for (sg = sg_head; sg_len < *len; sg++) { in nx_build_sg_list() 117 sg_len += sg->len; in nx_build_sg_list() 120 is_vmalloc_addr(start_addr + sg_len)) { in nx_build_sg_list() 122 start_addr + sg_len)); in nx_build_sg_list() 123 end_addr = sg_addr + *len - sg_len; in nx_build_sg_list() 133 *len = sg_len; in nx_build_sg_list()
|
/linux-6.1.9/drivers/crypto/chelsio/ |
D | chcr_algo.c | 1582 param->sg_len) <= SGE_MAX_WR_LEN; in create_hash_wr() 1583 nents = sg_nents_xlen(req_ctx->hctx_wr.srcsg, param->sg_len, in create_hash_wr() 1587 param->sg_len, 16) : (sgl_len(nents) * 8); in create_hash_wr() 1598 chcr_req->sec_cpl.pldlen = htonl(param->bfr_len + param->sg_len); in create_hash_wr() 1644 (param->sg_len + param->bfr_len) : 0); in create_hash_wr() 1707 params.sg_len = chcr_hash_ent_in_wr(req->src, !!req_ctx->reqlen, in chcr_ahash_update() 1709 if (params.sg_len > req->nbytes) in chcr_ahash_update() 1710 params.sg_len = req->nbytes; in chcr_ahash_update() 1711 params.sg_len = rounddown(params.sg_len + req_ctx->reqlen, bs) - in chcr_ahash_update() 1721 req_ctx->data_len += params.sg_len + params.bfr_len; in chcr_ahash_update() [all …]
|
/linux-6.1.9/drivers/rapidio/devices/ |
D | tsi721_dma.c | 453 for_each_sg(desc->sg, sg, desc->sg_len, i) { in tsi721_submit_sg() 456 bdma_chan->id, i, desc->sg_len, in tsi721_submit_sg() 489 desc->sg_len -= i; in tsi721_submit_sg() 519 desc->sg_len = 0; in tsi721_submit_sg() 662 if (desc->sg_len == 0) { in tsi721_dma_tasklet() 825 struct scatterlist *sgl, unsigned int sg_len, in tsi721_prep_rio_sg() argument 835 if (!sgl || !sg_len) { in tsi721_prep_rio_sg() 876 desc->sg_len = sg_len; in tsi721_prep_rio_sg()
|