Home
last modified time | relevance | path

Searched refs:sg_count (Results 1 – 59 of 59) sorted by relevance

/linux-4.4.14/drivers/crypto/caam/
Dsg_sw_sec4.h32 sg_to_sec4_sg(struct scatterlist *sg, int sg_count, in sg_to_sec4_sg() argument
35 while (sg_count) { in sg_to_sec4_sg()
40 sg_count--; in sg_to_sec4_sg()
49 static inline void sg_to_sec4_sg_last(struct scatterlist *sg, int sg_count, in sg_to_sec4_sg_last() argument
53 sec4_sg_ptr = sg_to_sec4_sg(sg, sg_count, sec4_sg_ptr, offset); in sg_to_sec4_sg_last()
73 static inline int sg_count(struct scatterlist *sg_list, int nbytes) in sg_count() function
Dcaamalg.c2282 src_nents = sg_count(req->src, req->assoclen + req->cryptlen); in aead_edesc_alloc()
2283 dst_nents = sg_count(req->dst, in aead_edesc_alloc()
2287 src_nents = sg_count(req->src, in aead_edesc_alloc()
2572 src_nents = sg_count(req->src, req->nbytes); in ablkcipher_edesc_alloc()
2575 dst_nents = sg_count(req->dst, req->nbytes); in ablkcipher_edesc_alloc()
2748 src_nents = sg_count(req->src, req->nbytes); in ablkcipher_giv_edesc_alloc()
2751 dst_nents = sg_count(req->dst, req->nbytes); in ablkcipher_giv_edesc_alloc()
Dcaamhash.c1088 src_nents = sg_count(req->src, req->nbytes); in ahash_digest()
1432 src_nents = sg_count(req->src, req->nbytes - (*next_buflen)); in ahash_update_first()
/linux-4.4.14/drivers/spi/
Dspi-mxs.c181 int sg_count; in mxs_spi_txrx_dma() local
209 for (sg_count = 0; sg_count < sgs; sg_count++) { in mxs_spi_txrx_dma()
217 if ((sg_count + 1 == sgs) && (flags & TXRX_DEASSERT_CS)) in mxs_spi_txrx_dma()
225 dma_xfer[sg_count].pio[0] = ctrl0; in mxs_spi_txrx_dma()
226 dma_xfer[sg_count].pio[3] = min; in mxs_spi_txrx_dma()
235 sg_init_table(&dma_xfer[sg_count].sg, 1); in mxs_spi_txrx_dma()
236 sg_set_page(&dma_xfer[sg_count].sg, vm_page, in mxs_spi_txrx_dma()
239 sg_init_one(&dma_xfer[sg_count].sg, buf, min); in mxs_spi_txrx_dma()
242 ret = dma_map_sg(ssp->dev, &dma_xfer[sg_count].sg, 1, in mxs_spi_txrx_dma()
250 (struct scatterlist *)dma_xfer[sg_count].pio, in mxs_spi_txrx_dma()
[all …]
/linux-4.4.14/drivers/crypto/
Dtalitos.c1031 static int sg_to_link_tbl_offset(struct scatterlist *sg, int sg_count, in sg_to_link_tbl_offset() argument
1035 int n_sg = sg_count; in sg_to_link_tbl_offset()
1070 static inline int sg_to_link_tbl(struct scatterlist *sg, int sg_count, in sg_to_link_tbl() argument
1074 return sg_to_link_tbl_offset(sg, sg_count, 0, cryptlen, in sg_to_link_tbl()
1094 int sg_count, ret; in ipsec_esp() local
1101 sg_count = dma_map_sg(dev, areq->src, edesc->src_nents ?: 1, in ipsec_esp()
1106 if (sg_count > 1 && in ipsec_esp()
1107 (ret = sg_to_link_tbl_offset(areq->src, sg_count, 0, in ipsec_esp()
1146 if (sg_count == 1) { in ipsec_esp()
1149 } else if ((ret = sg_to_link_tbl_offset(areq->src, sg_count, in ipsec_esp()
[all …]
Dpicoxcell_crypto.c276 static inline int sg_count(struct scatterlist *sg_list, int nbytes) in sg_count() function
303 nents = sg_count(payload, nbytes); in spacc_sg_to_ddt()
339 src_nents = sg_count(areq->src, total); in spacc_aead_make_ddts()
345 dst_nents = sg_count(areq->dst, total); in spacc_aead_make_ddts()
425 unsigned nents = sg_count(areq->src, total); in spacc_aead_free_ddts()
430 sg_count(areq->dst, total), in spacc_aead_free_ddts()
443 unsigned nents = sg_count(payload, nbytes); in spacc_free_ddt()
/linux-4.4.14/drivers/scsi/arm/
Dscsi.h101 unsigned i, sg_count = scsi_sg_count(SCpnt); in init_SCp() local
103 scsi_for_each_sg(SCpnt, sg, sg_count, i) in init_SCp()
/linux-4.4.14/drivers/scsi/fnic/
Dfnic_scsi.c321 int sg_count) in fnic_queue_wq_copy_desc() argument
335 if (sg_count) { in fnic_queue_wq_copy_desc()
338 for_each_sg(scsi_sglist(sc), sg, sg_count, i) { in fnic_queue_wq_copy_desc()
348 sizeof(io_req->sgl_list[0]) * sg_count, in fnic_queue_wq_copy_desc()
366 sizeof(io_req->sgl_list[0]) * sg_count, in fnic_queue_wq_copy_desc()
439 int sg_count = 0; in fnic_queuecommand_lck() local
492 sg_count = scsi_dma_map(sc); in fnic_queuecommand_lck()
493 if (sg_count < 0) { in fnic_queuecommand_lck()
496 sg_count, CMD_STATE(sc)); in fnic_queuecommand_lck()
502 io_req->sgl_cnt = sg_count; in fnic_queuecommand_lck()
[all …]
/linux-4.4.14/drivers/scsi/
Dqlogicpti.c895 int sg_count; in load_cmd() local
898 sg_count = dma_map_sg(&qpti->op->dev, sg, in load_cmd()
903 cmd->segment_cnt = sg_count; in load_cmd()
906 n = sg_count; in load_cmd()
913 sg_count -= 4; in load_cmd()
915 while (sg_count > 0) { in load_cmd()
930 n = sg_count; in load_cmd()
937 sg_count -= n; in load_cmd()
Dstorvsc_drv.c1381 unsigned int sg_count = 0; in storvsc_queuecommand() local
1447 sg_count = scsi_sg_count(scmnd); in storvsc_queuecommand()
1453 if (sg_count) { in storvsc_queuecommand()
1454 if (sg_count > MAX_PAGE_BUFFER_COUNT) { in storvsc_queuecommand()
1456 payload_sz = (sg_count * sizeof(void *) + in storvsc_queuecommand()
1467 for (i = 0; i < sg_count; i++) { in storvsc_queuecommand()
Daha1542.c378 int mbo, sg_count; in aha1542_queuecommand() local
402 sg_count = scsi_sg_count(cmd); in aha1542_queuecommand()
403 cptr = kmalloc(sizeof(*cptr) * sg_count, GFP_KERNEL | GFP_DMA); in aha1542_queuecommand()
456 scsi_for_each_sg(cmd, sg, sg_count, i) { in aha1542_queuecommand()
461 any2scsi(ccb[mbo].datalen, sg_count * sizeof(struct chain)); in aha1542_queuecommand()
Dstex.c184 __le16 sg_count; member
287 int sg_count; member
418 ccb->sg_count = nseg; in stex_map_sg()
419 dst->sg_count = cpu_to_le16((u16)nseg); in stex_map_sg()
450 ccb->sg_count = nseg; in stex_ss_map_sg()
451 dst->sg_count = cpu_to_le16((u16)nseg); in stex_ss_map_sg()
527 addr += (hba->ccb[tag].sg_count+4)/11; in stex_ss_send_cmd()
668 hba->ccb[tag].sg_count = 0; in stex_queuecommand_lck()
1716 hba->ccb[tag].sg_count = 0; in stex_hba_stop()
Dips.h430 uint8_t sg_count; member
639 uint8_t sg_count; member
654 uint16_t sg_count; member
1105 int sg_count; member
Ddc395x.c236 u8 sg_count; /* No of HW sg entries for this request */ member
990 srb->sg_count = 0; in build_srb()
1019 srb->sg_count = nseg; in build_srb()
1024 srb->sg_count); in build_srb()
1026 scsi_for_each_sg(cmd, sg, srb->sg_count, i) { in build_srb()
1033 sgp += srb->sg_count - 1; in build_srb()
1212 srb->segment_x, srb->sg_count, srb->sg_index, in dump_register_info()
1939 for (; idx < srb->sg_count; psge++, idx++) in sg_verify_length()
1969 for (idx = srb->sg_index; idx < srb->sg_count; idx++) { in sg_update_list()
2284 srb->sg_count, &offset, &len); in data_in_phase0()
[all …]
Ddpt_i2o.c1715 u32 sg_count = 0; in adpt_i2o_passthru() local
1761 sg_count = (size - sg_offset*4) / sizeof(struct sg_simple_element); in adpt_i2o_passthru()
1762 if (sg_count > pHba->sg_tablesize){ in adpt_i2o_passthru()
1763 printk(KERN_DEBUG"%s:IOCTL SG List too large (%u)\n", pHba->name,sg_count); in adpt_i2o_passthru()
1768 for(i = 0; i < sg_count; i++) { in adpt_i2o_passthru()
1781 pHba->name,sg_size,i,sg_count); in adpt_i2o_passthru()
1848 sg_count = (size - sg_offset*4) / sizeof(struct sg_simple_element); in adpt_i2o_passthru()
1852 for (j = 0; j < sg_count; j++) { in adpt_i2o_passthru()
Dmvumi.c205 void *sgl_p, unsigned char *sg_count) in mvumi_make_sgl() argument
215 *sg_count = pci_map_sg(mhba->pdev, sg, sgnum, in mvumi_make_sgl()
217 if (*sg_count > mhba->max_sge) { in mvumi_make_sgl()
220 *sg_count, mhba->max_sge); in mvumi_make_sgl()
223 for (i = 0; i < *sg_count; i++) { in mvumi_make_sgl()
229 if ((i + 1) == *sg_count) in mvumi_make_sgl()
245 *sg_count = 1; in mvumi_make_sgl()
Dsr.c454 int i, size = 0, sg_count = scsi_sg_count(SCpnt); in sr_init_command() local
456 scsi_for_each_sg(SCpnt, sg, sg_count, i) in sr_init_command()
D3w-sas.c298 int i, sg_count; in twl_scsiop_execute_scsi() local
340 sg_count = scsi_dma_map(srb); in twl_scsiop_execute_scsi()
341 if (sg_count <= 0) in twl_scsiop_execute_scsi()
344 scsi_for_each_sg(srb, sg, sg_count, i) { in twl_scsiop_execute_scsi()
Dlibiscsi_tcp.c369 struct scatterlist *sg_list, unsigned int sg_count, in iscsi_segment_seek_sg() argument
377 for_each_sg(sg_list, sg, sg_count, i) { in iscsi_segment_seek_sg()
Dhptiop.c1011 int sg_count = 0; in hptiop_queuecommand_lck() local
1049 sg_count = hptiop_buildsgl(scp, req->sg_list); in hptiop_queuecommand_lck()
1050 if (!sg_count) in hptiop_queuecommand_lck()
1063 + sg_count * sizeof(struct hpt_iopsg)); in hptiop_queuecommand_lck()
D53c700.c1875 int sg_count; in NCR_700_queuecommand_lck() local
1880 sg_count = scsi_dma_map(SCp); in NCR_700_queuecommand_lck()
1881 BUG_ON(sg_count < 0); in NCR_700_queuecommand_lck()
1883 scsi_for_each_sg(SCp, sg, sg_count, i) { in NCR_700_queuecommand_lck()
Dips.c2676 scb->sg_count = scsi_dma_map(SC); in ips_next()
2677 BUG_ON(scb->sg_count < 0); in ips_next()
2678 if (scb->sg_count) { in ips_next()
2684 scsi_for_each_sg(SC, sg, scb->sg_count, i) { in ips_next()
3588 scb->cmd.basic_io.sg_count = scb->sg_len; in ips_send_cmd()
3634 scb->cmd.basic_io.sg_count = scb->sg_len; in ips_send_cmd()
3782 tapeDCDB->sg_count = scb->sg_len; in ips_send_cmd()
3821 scb->dcdb.sg_count = scb->sg_len; in ips_send_cmd()
5687 scb->cmd.basic_io.sg_count = 0; in ips_read_adapter_status()
5730 scb->cmd.basic_io.sg_count = 0; in ips_read_subsystem_parameters()
D3w-9xxx.c1806 int i, sg_count; in DEF_SCSI_QCMD() local
1858 sg_count = scsi_dma_map(srb); in DEF_SCSI_QCMD()
1859 if (sg_count < 0) in DEF_SCSI_QCMD()
1862 scsi_for_each_sg(srb, sg, sg_count, i) { in DEF_SCSI_QCMD()
Dscsi_lib.c3096 void *scsi_kmap_atomic_sg(struct scatterlist *sgl, int sg_count, in scsi_kmap_atomic_sg() argument
3106 for_each_sg(sgl, sg, sg_count, i) { in scsi_kmap_atomic_sg()
3113 if (unlikely(i == sg_count)) { in scsi_kmap_atomic_sg()
3116 __func__, sg_len, *offset, sg_count); in scsi_kmap_atomic_sg()
Dhpsa_cmd.h580 u8 sg_count; /* Number of sg elements */ member
DFlashPoint.c4953 unsigned char sg_count, i; in FPT_busMstrSGDataXferStart() local
4962 sg_count = 0; in FPT_busMstrSGDataXferStart()
4972 while ((sg_count < (unsigned char)SG_BUF_CNT) && in FPT_busMstrSGDataXferStart()
4982 if ((!sg_count) && (pcurrSCCB->Sccb_SGoffset)) { in FPT_busMstrSGDataXferStart()
4998 sg_count++; in FPT_busMstrSGDataXferStart()
5004 WR_HARPOON(p_port + hp_sg_addr, (sg_count << 4)); in FPT_busMstrSGDataXferStart()
Datp870u.c717 unsigned long sg_count; in DEF_SCSI_QCMD() local
848 sg_count = scsi_dma_map(workreq); in DEF_SCSI_QCMD()
904 scsi_for_each_sg(workreq, sgpnt, sg_count, j) { in DEF_SCSI_QCMD()
Dhpsa.c1052 c->busaddr |= (h->ioaccel2_blockFetchTable[cp->sg_count]); in set_ioaccel2_performant_mode()
4552 cp->sg_count = 1; in hpsa_scsi_ioaccel2_queue_command()
4560 cp->sg_count = (u8) use_sg; in hpsa_scsi_ioaccel2_queue_command()
9630 VERIFY_OFFSET(sg_count, 45); in verify_offsets()
Dadvansys.c1736 __le32 sg_count; /* SG element count. */ member
2569 (u32)le32_to_cpu(b->sg_list[i].sg_count)); in asc_prt_adv_sgblock()
7707 sg_block->sg_list[i].sg_count = in adv_get_sglist()
/linux-4.4.14/include/scsi/
Dlibiscsi_tcp.h117 struct scatterlist *sg_list, unsigned int sg_count,
Dscsi_cmnd.h162 extern void *scsi_kmap_atomic_sg(struct scatterlist *sg, int sg_count,
/linux-4.4.14/drivers/crypto/ccp/
Dccp-crypto-aes-cmac.c67 unsigned int need_pad, sg_count; in ccp_do_cmac_update() local
110 sg_count = (nbytes) ? sg_nents(req->src) + 2 : 2; in ccp_do_cmac_update()
113 ret = sg_alloc_table(&rctx->data_sg, sg_count, gfp); in ccp_do_cmac_update()
Dccp-crypto-sha.c66 unsigned int sg_count; in ccp_do_sha_update() local
103 sg_count = sg_nents(req->src) + 1; in ccp_do_sha_update()
104 ret = sg_alloc_table(&rctx->data_sg, sg_count, gfp); in ccp_do_sha_update()
/linux-4.4.14/drivers/mmc/host/
Drtsx_pci_sdmmc.c57 int sg_count; member
188 host->sg_count = count; in sd_pre_dma_transfer()
489 err = rtsx_pci_dma_transfer(pcr, data->sg, host->sg_count, 1, 10000); in sd_read_long_data()
547 err = rtsx_pci_dma_transfer(pcr, data->sg, host->sg_count, 0, 10000); in sd_write_long_data()
560 if (host->sg_count < 0) { in sd_rw_multi()
561 data->error = host->sg_count; in sd_rw_multi()
563 __func__, host->sg_count); in sd_rw_multi()
Dsdhci.c497 host->sg_count = sdhci_pre_dma_transfer(host, data); in sdhci_adma_table_pre()
498 if (host->sg_count < 0) in sdhci_adma_table_pre()
506 for_each_sg(data->sg, sg, host->sg_count, i) { in sdhci_adma_table_pre()
613 for_each_sg(data->sg, sg, host->sg_count, i) in sdhci_adma_table_post()
625 for_each_sg(data->sg, sg, host->sg_count, i) { in sdhci_adma_table_post()
2153 int sg_count; in sdhci_pre_dma_transfer() local
2157 return data->sg_count; in sdhci_pre_dma_transfer()
2162 sg_count = dma_map_sg(mmc_dev(host->mmc), data->sg, data->sg_len, in sdhci_pre_dma_transfer()
2166 if (sg_count == 0) in sdhci_pre_dma_transfer()
2169 data->sg_count = sg_count; in sdhci_pre_dma_transfer()
[all …]
Dsdhci.h474 int sg_count; /* Mapped sg entries */ member
Dmtk-sd.c421 for_each_sg(data->sg, sg, data->sg_count, j) { in msdc_dma_setup()
432 if (j == data->sg_count - 1) /* the last bd */ in msdc_dma_setup()
458 data->sg_count = dma_map_sg(host->dev, data->sg, data->sg_len, in msdc_prepare_data()
/linux-4.4.14/sound/soc/intel/atom/
Dsst-mfld-dsp.h384 __u16 sg_count; member
410 u8 sg_count; member
Dsst-mfld-platform-compress.c159 str_params.aparams.sg_count = 1; in sst_platform_compr_set_params()
Dsst-mfld-platform-pcm.c144 alloc_param->sg_count = 1; in sst_fill_alloc_params()
/linux-4.4.14/sound/soc/intel/atom/sst/
Dsst_stream.c54 alloc_param.sg_count = str_params->aparams.sg_count; in sst_alloc_stream_mrfld()
/linux-4.4.14/drivers/memstick/host/
Dr592.c280 int len, sg_count; in r592_transfer_fifo_dma() local
298 sg_count = dma_map_sg(&dev->pci_dev->dev, &dev->req->sg, 1, is_write ? in r592_transfer_fifo_dma()
301 if (sg_count != 1 || in r592_transfer_fifo_dma()
/linux-4.4.14/include/linux/mmc/
Dcore.h124 int sg_count; /* mapped sg entries */ member
/linux-4.4.14/drivers/infiniband/hw/qib/
Dqib_sdma.c555 if (tx->txreq.sg_count > qib_sdma_descq_freecnt(ppd)) { in qib_sdma_verbs_send()
651 ppd->sdma_descq_added += tx->txreq.sg_count; in qib_sdma_verbs_send()
Dqib_verbs.c1068 if (qp->s_tx->txreq.sg_count > avail) in qib_verbs_sdma_desc_avail()
1070 avail -= qp->s_tx->txreq.sg_count; in qib_verbs_sdma_desc_avail()
1209 tx->txreq.sg_count = ndesc; in qib_verbs_send_dma()
1233 tx->txreq.sg_count = 1; in qib_verbs_send_dma()
Dqib.h247 int sg_count; member
/linux-4.4.14/drivers/staging/rdma/ipath/
Dipath_sdma.c693 if (tx->txreq.sg_count > ipath_sdma_descq_freecnt(dd)) { in ipath_sdma_verbs_send()
798 dd->ipath_sdma_descq_added += tx->txreq.sg_count; in ipath_sdma_verbs_send()
Dipath_kernel.h207 int sg_count; member
Dipath_verbs.c1180 tx->txreq.sg_count = ndesc; in ipath_verbs_send_dma()
1204 tx->txreq.sg_count = 1; in ipath_verbs_send_dma()
/linux-4.4.14/drivers/scsi/aic7xxx/
Daic7xxx_osm.c475 if ((scb->sg_count + 1) > AHC_NSEG) in ahc_linux_map_seg()
1520 scb->sg_count = 0; in ahc_linux_run_command()
1543 scb->sg_count += consumed; in ahc_linux_run_command()
1564 scb->sg_count = 0; in ahc_linux_run_command()
Daic7xxx.h578 u_int sg_count;/* How full ahc_dma_seg is */ member
Daic7xxx_core.c413 if (scb->sg_count == 0) in ahc_sync_sglist()
419 /*len*/sizeof(struct ahc_dma_seg) * scb->sg_count, op); in ahc_sync_sglist()
1143 scb->sg_count = 1; in ahc_handle_seqint()
1405 ahc_get_transfer_length(scb), scb->sg_count); in ahc_handle_seqint()
1406 if (scb->sg_count > 0) { in ahc_handle_seqint()
1407 for (i = 0; i < scb->sg_count; i++) { in ahc_handle_seqint()
2121 if (scb->sg_count > 0) {
2122 for (i = 0; i < scb->sg_count; i++) {
Daic79xx.h621 u_int sg_count;/* How full ahd_dma_seg is */ member
Daic79xx_core.c417 scb->sg_count++; in ahd_sg_setup()
538 if (scb->sg_count == 0) in ahd_sync_sglist()
544 /*len*/ahd_sg_size(ahd) * scb->sg_count, op); in ahd_sync_sglist()
863 if (scb->sg_count != 0) in ahd_queue_scb()
1739 if (scb->sg_count > 0) { in ahd_dump_sglist()
1744 for (i = 0; i < scb->sg_count; i++) { in ahd_dump_sglist()
1762 for (i = 0; i < scb->sg_count; i++) { in ahd_dump_sglist()
2234 ahd_get_transfer_length(scb), scb->sg_count); in ahd_handle_seqint()
9067 scb->sg_count = 0; in ahd_handle_scsi_status()
Daic79xx_osm.c835 reset_scb->sg_count = 0; in ahd_linux_dev_reset()
1633 scb->sg_count = 0; in ahd_linux_run_command()
/linux-4.4.14/drivers/scsi/bnx2fc/
Dbnx2fc_io.c1589 int sg_count = 0; in bnx2fc_map_sg() local
1600 sg_count = dma_map_sg(&hba->pcidev->dev, scsi_sglist(sc), in bnx2fc_map_sg()
1602 scsi_for_each_sg(sc, sg, sg_count, i) { in bnx2fc_map_sg()
/linux-4.4.14/drivers/scsi/bnx2i/
Dbnx2i_iscsi.c150 int sg_count; in bnx2i_map_scsi_sg() local
157 sg_count = scsi_dma_map(sc); in bnx2i_map_scsi_sg()
159 scsi_for_each_sg(sc, sg, sg_count, i) { in bnx2i_map_scsi_sg()
/linux-4.4.14/drivers/block/
Dsx8.c322 u8 sg_count; member
905 msg->sg_count = n_elem; in carm_rq_fn()
/linux-4.4.14/drivers/vhost/
Dscsi.c703 struct scatterlist *sg, int sg_count) in vhost_scsi_iov_to_sgl() argument
714 for (i = 0; i < sg_count; i++) { in vhost_scsi_iov_to_sgl()