/drivers/scsi/aacraid/ |
D | commctrl.c | 495 u32 sg_count[HBA_MAX_SG_EMBEDDED]; in aac_send_raw_srb() local 656 sg_count[i] = (actual_fibsize64 == fibsize) ? in aac_send_raw_srb() 658 if (sg_count[i] > in aac_send_raw_srb() 661 i, sg_count[i], in aac_send_raw_srb() 667 p = kmalloc(sg_count[i], GFP_KERNEL); in aac_send_raw_srb() 686 sg_count[i])) { in aac_send_raw_srb() 691 addr = dma_map_single(&dev->pdev->dev, p, sg_count[i], in aac_send_raw_srb() 696 hbacmd->sge[i].len = cpu_to_le32(sg_count[i]); in aac_send_raw_srb() 698 byte_count += sg_count[i]; in aac_send_raw_srb() 722 sg_count[i] = upsg->sg[i].count; in aac_send_raw_srb() [all …]
|
/drivers/firmware/efi/ |
D | capsule.c | 220 unsigned int count, sg_count; in efi_capsule_update() local 231 sg_count = sg_pages_num(count); in efi_capsule_update() 233 sg_pages = kcalloc(sg_count, sizeof(*sg_pages), GFP_KERNEL); in efi_capsule_update() 237 for (i = 0; i < sg_count; i++) { in efi_capsule_update() 245 for (i = 0; i < sg_count; i++) { in efi_capsule_update() 264 if (i + 1 == sg_count) in efi_capsule_update() 288 for (i = 0; rv && i < sg_count; i++) { in efi_capsule_update()
|
/drivers/spi/ |
D | spi-mxs.c | 172 int sg_count; in mxs_spi_txrx_dma() local 200 for (sg_count = 0; sg_count < sgs; sg_count++) { in mxs_spi_txrx_dma() 208 if ((sg_count + 1 == sgs) && (flags & TXRX_DEASSERT_CS)) in mxs_spi_txrx_dma() 216 dma_xfer[sg_count].pio[0] = ctrl0; in mxs_spi_txrx_dma() 217 dma_xfer[sg_count].pio[3] = min; in mxs_spi_txrx_dma() 226 sg_init_table(&dma_xfer[sg_count].sg, 1); in mxs_spi_txrx_dma() 227 sg_set_page(&dma_xfer[sg_count].sg, vm_page, in mxs_spi_txrx_dma() 230 sg_init_one(&dma_xfer[sg_count].sg, buf, min); in mxs_spi_txrx_dma() 233 ret = dma_map_sg(ssp->dev, &dma_xfer[sg_count].sg, 1, in mxs_spi_txrx_dma() 241 (struct scatterlist *)dma_xfer[sg_count].pio, in mxs_spi_txrx_dma() [all …]
|
/drivers/crypto/ |
D | talitos.c | 1094 static int sg_to_link_tbl_offset(struct scatterlist *sg, int sg_count, in sg_to_link_tbl_offset() argument 1098 int n_sg = elen ? sg_count + 1 : sg_count; in sg_to_link_tbl_offset() 1146 struct talitos_ptr *ptr, int sg_count, in talitos_sg_map_ext() argument 1159 if (sg_count == 1 && !force) { in talitos_sg_map_ext() 1161 return sg_count; in talitos_sg_map_ext() 1165 return sg_count; in talitos_sg_map_ext() 1167 sg_count = sg_to_link_tbl_offset(src, sg_count, offset, len, elen, in talitos_sg_map_ext() 1169 if (sg_count == 1 && !force) { in talitos_sg_map_ext() 1172 return sg_count; in talitos_sg_map_ext() 1178 return sg_count; in talitos_sg_map_ext() [all …]
|
/drivers/mmc/host/ |
D | jz4740_mmc.c | 286 int sg_count; in jz4740_mmc_prepare_dma_data() local 289 return data->sg_count; in jz4740_mmc_prepare_dma_data() 291 sg_count = dma_map_sg(chan->device->dev, in jz4740_mmc_prepare_dma_data() 296 if (sg_count <= 0) { in jz4740_mmc_prepare_dma_data() 302 data->sg_count = sg_count; in jz4740_mmc_prepare_dma_data() 305 return data->sg_count; in jz4740_mmc_prepare_dma_data() 319 int sg_count; in jz4740_mmc_start_dma_transfer() local 329 sg_count = jz4740_mmc_prepare_dma_data(host, data, COOKIE_MAPPED); in jz4740_mmc_start_dma_transfer() 330 if (sg_count < 0) in jz4740_mmc_start_dma_transfer() 331 return sg_count; in jz4740_mmc_start_dma_transfer() [all …]
|
D | alcor.c | 58 int sg_count; member 127 if (!host->sg_count) in alcor_data_set_dma() 145 host->sg_count--; in alcor_data_set_dma() 169 alcor_write32(priv, data->sg_count * 0x1000, in alcor_trigger_data_transfer() 252 host->sg_count = data->sg_count; in alcor_prepare_data() 254 host->sg_count, host->blocks); in alcor_prepare_data() 503 if (!host->sg_count) in alcor_data_irq_done() 543 (host->dma_on && !host->sg_count)) in alcor_data_irq_thread() 822 data->sg_count = sg_len; in alcor_pre_req()
|
D | cqhci-core.c | 459 int sg_count; in cqhci_dma_map() local 465 sg_count = dma_map_sg(mmc_dev(host), data->sg, in cqhci_dma_map() 469 if (!sg_count) { in cqhci_dma_map() 474 return sg_count; in cqhci_dma_map() 503 int i, sg_count, len; in cqhci_prep_tran_desc() local 510 sg_count = cqhci_dma_map(mrq->host, mrq); in cqhci_prep_tran_desc() 511 if (sg_count < 0) { in cqhci_prep_tran_desc() 513 mmc_hostname(mrq->host), __func__, sg_count); in cqhci_prep_tran_desc() 514 return sg_count; in cqhci_prep_tran_desc() 519 for_each_sg(data->sg, sg, sg_count, i) { in cqhci_prep_tran_desc() [all …]
|
D | rtsx_pci_sdmmc.c | 42 int sg_count; member 175 host->sg_count = count; in sd_pre_dma_transfer() 475 err = rtsx_pci_dma_transfer(pcr, data->sg, host->sg_count, 1, 10000); in sd_read_long_data() 533 err = rtsx_pci_dma_transfer(pcr, data->sg, host->sg_count, 0, 10000); in sd_write_long_data() 559 if (host->sg_count < 0) { in sd_rw_multi() 560 data->error = host->sg_count; in sd_rw_multi() 562 __func__, host->sg_count); in sd_rw_multi()
|
D | meson-gx-mmc.c | 299 data->sg_count = dma_map_sg(mmc_dev(mmc), data->sg, data->sg_len, in meson_mmc_pre_req() 301 if (!data->sg_count) in meson_mmc_pre_req() 310 if (data && meson_mmc_desc_chain_mode(data) && data->sg_count) in meson_mmc_post_req() 732 for_each_sg(data->sg, sg, data->sg_count, i) { in meson_mmc_desc_chain_transfer() 746 desc[data->sg_count - 1].cmd_cfg |= CMD_CFG_END_OF_CHAIN; in meson_mmc_desc_chain_transfer()
|
D | sdhci.c | 625 int sg_count; in sdhci_pre_dma_transfer() local 632 return data->sg_count; in sdhci_pre_dma_transfer() 660 sg_count = 1; in sdhci_pre_dma_transfer() 663 sg_count = dma_map_sg(mmc_dev(host->mmc), in sdhci_pre_dma_transfer() 668 if (sg_count == 0) in sdhci_pre_dma_transfer() 671 data->sg_count = sg_count; in sdhci_pre_dma_transfer() 674 return sg_count; in sdhci_pre_dma_transfer() 725 struct mmc_data *data, int sg_count) in sdhci_adma_table_pre() argument 739 host->sg_count = sg_count; in sdhci_adma_table_pre() 746 for_each_sg(data->sg, sg, host->sg_count, i) { in sdhci_adma_table_pre() [all …]
|
/drivers/scsi/arm/ |
D | scsi.h | 98 unsigned i, sg_count = scsi_sg_count(SCpnt); in init_SCp() local 100 scsi_for_each_sg(SCpnt, sg, sg_count, i) in init_SCp()
|
/drivers/scsi/ |
D | qlogicpti.c | 906 int sg_count; in load_cmd() local 909 sg_count = dma_map_sg(&qpti->op->dev, sg, in load_cmd() 914 cmd->segment_cnt = sg_count; in load_cmd() 917 n = sg_count; in load_cmd() 924 sg_count -= 4; in load_cmd() 926 while (sg_count > 0) { in load_cmd() 941 n = sg_count; in load_cmd() 948 sg_count -= n; in load_cmd()
|
D | stex.c | 202 __le16 sg_count; member 305 int sg_count; member 441 ccb->sg_count = nseg; in stex_map_sg() 442 dst->sg_count = cpu_to_le16((u16)nseg); in stex_map_sg() 473 ccb->sg_count = nseg; in stex_ss_map_sg() 474 dst->sg_count = cpu_to_le16((u16)nseg); in stex_ss_map_sg() 550 addr += (hba->ccb[tag].sg_count+4)/11; in stex_ss_send_cmd() 723 hba->ccb[tag].sg_count = 0; in stex_queuecommand_lck() 1900 hba->ccb[tag].sg_count = 0; in stex_hba_stop()
|
D | dc395x.c | 220 u8 sg_count; /* No of HW sg entries for this request */ member 872 srb->sg_count = 0; in build_srb() 901 srb->sg_count = nseg; in build_srb() 906 srb->sg_count); in build_srb() 908 scsi_for_each_sg(cmd, sg, srb->sg_count, i) { in build_srb() 915 sgp += srb->sg_count - 1; in build_srb() 1062 srb->segment_x, srb->sg_count, srb->sg_index, in DEF_SCSI_QCMD() 1782 for (; idx < srb->sg_count; psge++, idx++) in sg_verify_length() 1812 for (idx = srb->sg_index; idx < srb->sg_count; idx++) { in sg_update_list() 2128 srb->sg_count, &offset, &len); in data_in_phase0() [all …]
|
D | ips.h | 412 uint8_t sg_count; member 621 uint8_t sg_count; member 636 uint16_t sg_count; member 1087 int sg_count; member
|
D | 3w-sas.c | 296 int i, sg_count; in twl_scsiop_execute_scsi() local 335 sg_count = scsi_dma_map(srb); in twl_scsiop_execute_scsi() 336 if (sg_count <= 0) in twl_scsiop_execute_scsi() 339 scsi_for_each_sg(srb, sg, sg_count, i) { in twl_scsiop_execute_scsi()
|
/drivers/scsi/fnic/ |
D | fnic_scsi.c | 321 int sg_count) in fnic_queue_wq_copy_desc() argument 334 if (sg_count) { in fnic_queue_wq_copy_desc() 337 for_each_sg(scsi_sglist(sc), sg, sg_count, i) { in fnic_queue_wq_copy_desc() 346 sizeof(io_req->sgl_list[0]) * sg_count, in fnic_queue_wq_copy_desc() 360 sizeof(io_req->sgl_list[0]) * sg_count, in fnic_queue_wq_copy_desc() 434 int sg_count = 0; in fnic_queuecommand_lck() local 512 sg_count = scsi_dma_map(sc); in fnic_queuecommand_lck() 513 if (sg_count < 0) { in fnic_queuecommand_lck() 515 tag, sc, 0, sc->cmnd[0], sg_count, CMD_STATE(sc)); in fnic_queuecommand_lck() 521 io_req->sgl_cnt = sg_count; in fnic_queuecommand_lck() [all …]
|
/drivers/crypto/ccp/ |
D | ccp-crypto-aes-cmac.c | 64 unsigned int need_pad, sg_count; in ccp_do_cmac_update() local 107 sg_count = (nbytes) ? sg_nents(req->src) + 2 : 2; in ccp_do_cmac_update() 110 ret = sg_alloc_table(&rctx->data_sg, sg_count, gfp); in ccp_do_cmac_update()
|
D | ccp-crypto-sha.c | 67 unsigned int sg_count; in ccp_do_sha_update() local 104 sg_count = sg_nents(req->src) + 1; in ccp_do_sha_update() 105 ret = sg_alloc_table(&rctx->data_sg, sg_count, gfp); in ccp_do_sha_update()
|
/drivers/scsi/smartpqi/ |
D | smartpqi_init.c | 5069 struct scatterlist *sg, int sg_count, struct pqi_io_request *io_request, in pqi_build_sg_list() argument 5085 if (i == sg_count) in pqi_build_sg_list() 5091 put_unaligned_le32((sg_count - num_sg_in_iu) * sizeof(*sg_descriptor), in pqi_build_sg_list() 5111 int sg_count; in pqi_build_raid_sg_list() local 5117 sg_count = scsi_dma_map(scmd); in pqi_build_raid_sg_list() 5118 if (sg_count < 0) in pqi_build_raid_sg_list() 5119 return sg_count; in pqi_build_raid_sg_list() 5124 if (sg_count == 0) in pqi_build_raid_sg_list() 5130 num_sg_in_iu = pqi_build_sg_list(sg_descriptor, sg, sg_count, io_request, in pqi_build_raid_sg_list() 5147 int sg_count; in pqi_build_aio_r1_sg_list() local [all …]
|
/drivers/memstick/host/ |
D | r592.c | 275 int len, sg_count; in r592_transfer_fifo_dma() local 293 sg_count = dma_map_sg(&dev->pci_dev->dev, &dev->req->sg, 1, is_write ? in r592_transfer_fifo_dma() 296 if (sg_count != 1 || sg_dma_len(&dev->req->sg) < R592_LFIFO_SIZE) { in r592_transfer_fifo_dma()
|
/drivers/scsi/qedi/ |
D | qedi_fw.c | 1792 int sg_count; in qedi_map_scsi_sg() local 1800 sg_count = dma_map_sg(&qedi->pdev->dev, scsi_sglist(sc), in qedi_map_scsi_sg() 1808 if ((sg_count == 1) && (sg_dma_len(sg) <= MAX_SGLEN_FOR_CACHESGL)) { in qedi_map_scsi_sg() 1818 sg_count, addr, sg_len); in qedi_map_scsi_sg() 1823 scsi_for_each_sg(sc, sg, sg_count, i) { in qedi_map_scsi_sg() 1832 if ((i == 0) && (sg_count > 1) && (end_addr % QEDI_PAGE_SIZE)) in qedi_map_scsi_sg() 1839 else if ((i == (sg_count - 1)) && in qedi_map_scsi_sg() 1840 (sg_count > 1) && (addr % QEDI_PAGE_SIZE)) in qedi_map_scsi_sg() 1847 else if ((i != 0) && (i != (sg_count - 1)) && in qedi_map_scsi_sg() 1942 io_log->sg_count = scsi_sg_count(sc_cmd); in qedi_trace_io()
|
D | qedi_debugfs.c | 197 seq_printf(s, "sgcnt-%d:", io_log->sg_count); in qedi_io_trace_show()
|
D | qedi.h | 231 unsigned int sg_count; /* Number of SG elements */ member
|
/drivers/scsi/qedf/ |
D | qedf_io.c | 480 int sg_count = 0; in qedf_map_sg() local 486 sg_count = dma_map_sg(&qedf->pdev->dev, scsi_sglist(sc), in qedf_map_sg() 492 if (sg_count <= 8 || io_req->io_req_flags == QEDF_READ) in qedf_map_sg() 495 scsi_for_each_sg(sc, sg, sg_count, i) { in qedf_map_sg() 505 (i != (sg_count - 1)) && sg_len < QEDF_PAGE_SIZE) in qedf_map_sg() 822 io_log->sg_count = scsi_sg_count(sc_cmd); in qedf_trace_io()
|