Home
last modified time | relevance | path

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

123

/drivers/scsi/aacraid/
Dcommctrl.c494 u32 sg_count[HBA_MAX_SG_EMBEDDED]; in aac_send_raw_srb() local
660 sg_count[i] = (actual_fibsize64 == fibsize) ? in aac_send_raw_srb()
662 if (sg_count[i] > in aac_send_raw_srb()
665 i, sg_count[i], in aac_send_raw_srb()
671 p = kmalloc(sg_count[i], GFP_KERNEL); in aac_send_raw_srb()
690 sg_count[i])) { in aac_send_raw_srb()
695 addr = pci_map_single(dev->pdev, p, sg_count[i], in aac_send_raw_srb()
700 hbacmd->sge[i].len = cpu_to_le32(sg_count[i]); in aac_send_raw_srb()
702 byte_count += sg_count[i]; in aac_send_raw_srb()
726 sg_count[i] = upsg->sg[i].count; in aac_send_raw_srb()
[all …]
/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 …]
/drivers/crypto/caam/
Dsg_sw_qm2.h56 sg_to_qm_sg(struct scatterlist *sg, int sg_count, in sg_to_qm_sg() argument
59 while (sg_count && sg) { in sg_to_qm_sg()
64 sg_count--; in sg_to_qm_sg()
73 static inline void sg_to_qm_sg_last(struct scatterlist *sg, int sg_count, in sg_to_qm_sg_last() argument
77 qm_sg_ptr = sg_to_qm_sg(sg, sg_count, qm_sg_ptr, offset); in sg_to_qm_sg_last()
Dsg_sw_sec4.h50 sg_to_sec4_sg(struct scatterlist *sg, int sg_count, in sg_to_sec4_sg() argument
53 while (sg_count) { in sg_to_sec4_sg()
58 sg_count--; in sg_to_sec4_sg()
75 static inline void sg_to_sec4_sg_last(struct scatterlist *sg, int sg_count, in sg_to_sec4_sg_last() argument
79 sec4_sg_ptr = sg_to_sec4_sg(sg, sg_count, sec4_sg_ptr, offset); in sg_to_sec4_sg_last()
Dsg_sw_qm.h84 sg_to_qm_sg(struct scatterlist *sg, int sg_count, in sg_to_qm_sg() argument
87 while (sg_count && sg) { in sg_to_qm_sg()
92 sg_count--; in sg_to_qm_sg()
101 static inline void sg_to_qm_sg_last(struct scatterlist *sg, int sg_count, in sg_to_qm_sg_last() argument
104 qm_sg_ptr = sg_to_qm_sg(sg, sg_count, qm_sg_ptr, offset); in sg_to_qm_sg_last()
/drivers/firmware/efi/
Dcapsule.c221 unsigned int count, sg_count; in efi_capsule_update() local
232 sg_count = sg_pages_num(count); in efi_capsule_update()
234 sg_pages = kzalloc(sg_count * sizeof(*sg_pages), GFP_KERNEL); in efi_capsule_update()
238 for (i = 0; i < sg_count; i++) { in efi_capsule_update()
246 for (i = 0; i < sg_count; i++) { in efi_capsule_update()
265 if (i + 1 == sg_count) in efi_capsule_update()
278 for (i = 0; rv && i < sg_count; i++) { in efi_capsule_update()
/drivers/crypto/
Dtalitos.c1087 static int sg_to_link_tbl_offset(struct scatterlist *sg, int sg_count, in sg_to_link_tbl_offset() argument
1091 int n_sg = sg_count; in sg_to_link_tbl_offset()
1129 struct talitos_ptr *ptr, int sg_count, in talitos_sg_map_ext() argument
1143 if (sg_count == 1) { in talitos_sg_map_ext()
1145 return sg_count; in talitos_sg_map_ext()
1149 return sg_count; in talitos_sg_map_ext()
1151 sg_count = sg_to_link_tbl_offset(src, sg_count, offset, len + elen, in talitos_sg_map_ext()
1153 if (sg_count == 1) { in talitos_sg_map_ext()
1156 return sg_count; in talitos_sg_map_ext()
1162 return sg_count; in talitos_sg_map_ext()
[all …]
/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()
/drivers/scsi/
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()
407 sg_count = 0; in aha1542_queuecommand()
459 scsi_for_each_sg(cmd, sg, sg_count, i) { in aha1542_queuecommand()
464 any2scsi(ccb[mbo].datalen, sg_count * sizeof(struct chain)); in aha1542_queuecommand()
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.c1545 unsigned int sg_count = 0; in storvsc_queuecommand() local
1618 sg_count = scsi_sg_count(scmnd); in storvsc_queuecommand()
1624 if (sg_count) { in storvsc_queuecommand()
1625 if (sg_count > MAX_PAGE_BUFFER_COUNT) { in storvsc_queuecommand()
1627 payload_sz = (sg_count * sizeof(u64) + in storvsc_queuecommand()
1638 for (i = 0; i < sg_count; i++) { in storvsc_queuecommand()
Dstex.c203 __le16 sg_count; member
306 int sg_count; member
445 ccb->sg_count = nseg; in stex_map_sg()
446 dst->sg_count = cpu_to_le16((u16)nseg); in stex_map_sg()
477 ccb->sg_count = nseg; in stex_ss_map_sg()
478 dst->sg_count = cpu_to_le16((u16)nseg); in stex_ss_map_sg()
554 addr += (hba->ccb[tag].sg_count+4)/11; in stex_ss_send_cmd()
724 hba->ccb[tag].sg_count = 0; in stex_queuecommand_lck()
1911 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()
2289 srb->sg_count, &offset, &len); in data_in_phase0()
[all …]
Ddpt_i2o.c1712 u32 sg_count = 0; in adpt_i2o_passthru() local
1760 sg_count = (size - sg_offset*4) / sizeof(struct sg_simple_element); in adpt_i2o_passthru()
1761 if (sg_count > pHba->sg_tablesize){ in adpt_i2o_passthru()
1762 printk(KERN_DEBUG"%s:IOCTL SG List too large (%u)\n", pHba->name,sg_count); in adpt_i2o_passthru()
1767 for(i = 0; i < sg_count; i++) { in adpt_i2o_passthru()
1780 pHba->name,sg_size,i,sg_count); in adpt_i2o_passthru()
1847 sg_count = (size - sg_offset*4) / sizeof(struct sg_simple_element); in adpt_i2o_passthru()
1851 for (j = 0; j < sg_count; j++) { in adpt_i2o_passthru()
/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
517 sg_count = scsi_dma_map(sc); in fnic_queuecommand_lck()
518 if (sg_count < 0) { in fnic_queuecommand_lck()
521 sg_count, CMD_STATE(sc)); in fnic_queuecommand_lck()
527 io_req->sgl_cnt = sg_count; in fnic_queuecommand_lck()
[all …]
/drivers/mmc/host/
Drtsx_pci_sdmmc.c56 int sg_count; member
187 host->sg_count = count; in sd_pre_dma_transfer()
487 err = rtsx_pci_dma_transfer(pcr, data->sg, host->sg_count, 1, 10000); in sd_read_long_data()
545 err = rtsx_pci_dma_transfer(pcr, data->sg, host->sg_count, 0, 10000); in sd_write_long_data()
558 if (host->sg_count < 0) { in sd_rw_multi()
559 data->error = host->sg_count; in sd_rw_multi()
561 __func__, host->sg_count); in sd_rw_multi()
Dsdhci.c501 int sg_count; in sdhci_pre_dma_transfer() local
508 return data->sg_count; in sdhci_pre_dma_transfer()
532 sg_count = 1; in sdhci_pre_dma_transfer()
535 sg_count = dma_map_sg(mmc_dev(host->mmc), in sdhci_pre_dma_transfer()
540 if (sg_count == 0) in sdhci_pre_dma_transfer()
543 data->sg_count = sg_count; in sdhci_pre_dma_transfer()
546 return sg_count; in sdhci_pre_dma_transfer()
584 struct mmc_data *data, int sg_count) in sdhci_adma_table_pre() argument
598 host->sg_count = sg_count; in sdhci_adma_table_pre()
605 for_each_sg(data->sg, sg, host->sg_count, i) { in sdhci_adma_table_pre()
[all …]
Dmeson-gx-mmc.c343 data->sg_count = dma_map_sg(mmc_dev(mmc), data->sg, data->sg_len, in meson_mmc_pre_req()
345 if (!data->sg_count) in meson_mmc_pre_req()
354 if (data && meson_mmc_desc_chain_mode(data) && data->sg_count) in meson_mmc_post_req()
876 for_each_sg(data->sg, sg, data->sg_count, i) { in meson_mmc_desc_chain_transfer()
890 desc[data->sg_count - 1].cmd_cfg |= CMD_CFG_END_OF_CHAIN; in meson_mmc_desc_chain_transfer()
/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.c68 unsigned int sg_count; in ccp_do_sha_update() local
105 sg_count = sg_nents(req->src) + 1; in ccp_do_sha_update()
106 ret = sg_alloc_table(&rctx->data_sg, sg_count, gfp); in ccp_do_sha_update()
/drivers/scsi/qedf/
Dqedf_io.c444 int sg_count = 0; in qedf_map_sg() local
451 sg_count = dma_map_sg(&qedf->pdev->dev, scsi_sglist(sc), in qedf_map_sg()
460 if ((sg_count == 1) && (sg_dma_len(sg) <= in qedf_map_sg()
472 scsi_for_each_sg(sc, sg, sg_count, i) { in qedf_map_sg()
482 if ((i == 0) && (sg_count > 1) && in qedf_map_sg()
490 else if ((i == (sg_count - 1)) && (sg_count > 1) && in qedf_map_sg()
497 else if ((i != 0) && (i != (sg_count - 1)) && in qedf_map_sg()
816 io_log->sg_count = scsi_sg_count(sc_cmd); in qedf_trace_io()
/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 || sg_dma_len(&dev->req->sg) < R592_LFIFO_SIZE) { in r592_transfer_fifo_dma()
/drivers/scsi/qedi/
Dqedi_fw.c1867 int sg_count; in qedi_map_scsi_sg() local
1875 sg_count = dma_map_sg(&qedi->pdev->dev, scsi_sglist(sc), in qedi_map_scsi_sg()
1883 if ((sg_count == 1) && (sg_dma_len(sg) <= MAX_SGLEN_FOR_CACHESGL)) { in qedi_map_scsi_sg()
1893 sg_count, addr, sg_len); in qedi_map_scsi_sg()
1898 scsi_for_each_sg(sc, sg, sg_count, i) { in qedi_map_scsi_sg()
1907 if ((i == 0) && (sg_count > 1) && (end_addr % QEDI_PAGE_SIZE)) in qedi_map_scsi_sg()
1914 else if ((i == (sg_count - 1)) && in qedi_map_scsi_sg()
1915 (sg_count > 1) && (addr % QEDI_PAGE_SIZE)) in qedi_map_scsi_sg()
1922 else if ((i != 0) && (i != (sg_count - 1)) && in qedi_map_scsi_sg()
2019 io_log->sg_count = scsi_sg_count(sc_cmd); in qedi_trace_io()
Dqedi_debugfs.c213 seq_printf(s, "sgcnt-%d:", io_log->sg_count); in qedi_io_trace_show()

123