Home
last modified time | relevance | path

Searched refs:nseg (Results 1 – 25 of 33) sorted by relevance

12

/Linux-v5.10/drivers/scsi/
Dscsi_lib_dma.c25 int nseg = 0; in scsi_dma_map() local
30 nseg = dma_map_sg(dev, scsi_sglist(cmd), scsi_sg_count(cmd), in scsi_dma_map()
32 if (unlikely(!nseg)) in scsi_dma_map()
35 return nseg; in scsi_dma_map()
Daha1740.c324 int ecbno, nseg; in aha1740_queuecommand_lck() local
395 nseg = scsi_dma_map(SCpnt); in aha1740_queuecommand_lck()
396 BUG_ON(nseg < 0); in aha1740_queuecommand_lck()
397 if (nseg) { in aha1740_queuecommand_lck()
406 scsi_for_each_sg(SCpnt, sg, nseg, i) { in aha1740_queuecommand_lck()
410 host->ecb[ecbno].datalen = nseg * sizeof(struct aha1740_chain); in aha1740_queuecommand_lck()
Dstex.c432 int i, nseg; in stex_map_sg() local
435 nseg = scsi_dma_map(cmd); in stex_map_sg()
436 BUG_ON(nseg < 0); in stex_map_sg()
437 if (nseg) { in stex_map_sg()
440 ccb->sg_count = nseg; in stex_map_sg()
441 dst->sg_count = cpu_to_le16((u16)nseg); in stex_map_sg()
446 scsi_for_each_sg(cmd, sg, nseg, i) { in stex_map_sg()
454 return nseg; in stex_map_sg()
464 int i, nseg; in stex_ss_map_sg() local
467 nseg = scsi_dma_map(cmd); in stex_ss_map_sg()
[all …]
Dmac53c94.c364 int i, dma_cmd, total, nseg; in set_dma_cmds() local
370 nseg = scsi_dma_map(cmd); in set_dma_cmds()
371 BUG_ON(nseg < 0); in set_dma_cmds()
372 if (!nseg) in set_dma_cmds()
380 scsi_for_each_sg(cmd, scl, nseg, i) { in set_dma_cmds()
Dhptiop.c852 int idx, nseg; in hptiop_buildsgl() local
854 nseg = scsi_dma_map(scp); in hptiop_buildsgl()
855 BUG_ON(nseg < 0); in hptiop_buildsgl()
856 if (!nseg) in hptiop_buildsgl()
859 HPT_SCP(scp)->sgcnt = nseg; in hptiop_buildsgl()
Dmesh.c1271 int nseg; in set_dma_cmds() local
1275 nseg = scsi_dma_map(cmd); in set_dma_cmds()
1276 BUG_ON(nseg < 0); in set_dma_cmds()
1278 if (nseg) { in set_dma_cmds()
1282 scsi_for_each_sg(cmd, scl, nseg, i) { in set_dma_cmds()
Ddpt_i2o.c2194 int nseg; in adpt_scsi_to_i2o() local
2266 nseg = scsi_dma_map(cmd); in adpt_scsi_to_i2o()
2267 BUG_ON(nseg < 0); in adpt_scsi_to_i2o()
2268 if (nseg) { in adpt_scsi_to_i2o()
2272 scsi_for_each_sg(cmd, sg, nseg, i) { in adpt_scsi_to_i2o()
2281 if (i == nseg - 1) in adpt_scsi_to_i2o()
Dinitio.c2536 int i, nseg; in initio_build_scb() local
2573 nseg = scsi_dma_map(cmnd); in initio_build_scb()
2574 BUG_ON(nseg < 0); in initio_build_scb()
2575 if (nseg) { in initio_build_scb()
2582 cblk->sglen = nseg; in initio_build_scb()
Dpmcraid.c3147 int i, nseg; in pmcraid_build_ioadl() local
3159 nseg = scsi_dma_map(scsi_cmd); in pmcraid_build_ioadl()
3161 if (nseg < 0) { in pmcraid_build_ioadl()
3164 } else if (nseg > PMCRAID_MAX_IOADLS) { in pmcraid_build_ioadl()
3167 "sg count is (%d) more than allowed!\n", nseg); in pmcraid_build_ioadl()
3177 ioadl = pmcraid_init_ioadls(cmd, nseg); in pmcraid_build_ioadl()
3180 scsi_for_each_sg(scsi_cmd, sglist, nseg, i) { in pmcraid_build_ioadl()
/Linux-v5.10/include/scsi/
Dscsi_cmnd.h204 #define scsi_for_each_sg(cmd, sg, nseg, __i) \ argument
205 for_each_sg(scsi_sglist(cmd), sg, nseg, __i)
308 #define scsi_for_each_prot_sg(cmd, sg, nseg, __i) \ argument
309 for_each_sg(scsi_prot_sglist(cmd), sg, nseg, __i)
/Linux-v5.10/drivers/block/xen-blkback/
Dblkback.c916 int indirect_grefs, rc, n, nseg, i; in xen_blkbk_parse_indirect() local
919 nseg = pending_req->nr_segs; in xen_blkbk_parse_indirect()
920 indirect_grefs = INDIRECT_PAGES(nseg); in xen_blkbk_parse_indirect()
930 for (n = 0, i = 0; n < nseg; n++) { in xen_blkbk_parse_indirect()
1187 unsigned int nseg; in dispatch_rw_block_io() local
1233 nseg = req->operation == BLKIF_OP_INDIRECT ? in dispatch_rw_block_io()
1236 if (unlikely(nseg == 0 && operation_flags != REQ_PREFLUSH) || in dispatch_rw_block_io()
1238 (nseg > BLKIF_MAX_SEGMENTS_PER_REQUEST)) || in dispatch_rw_block_io()
1240 (nseg > MAX_INDIRECT_SEGMENTS))) { in dispatch_rw_block_io()
1241 pr_debug("Bad number of segments in request (%d)\n", nseg); in dispatch_rw_block_io()
[all …]
/Linux-v5.10/drivers/scsi/qla2xxx/
Dqla_iocb.c323 int nseg; in qla2x00_start_scsi() local
366 nseg = dma_map_sg(&ha->pdev->dev, scsi_sglist(cmd), in qla2x00_start_scsi()
368 if (unlikely(!nseg)) in qla2x00_start_scsi()
371 nseg = 0; in qla2x00_start_scsi()
373 tot_dsds = nseg; in qla2x00_start_scsi()
1594 int nseg; in qla24xx_start_scsi() local
1630 nseg = dma_map_sg(&ha->pdev->dev, scsi_sglist(cmd), in qla24xx_start_scsi()
1632 if (unlikely(!nseg)) in qla24xx_start_scsi()
1635 nseg = 0; in qla24xx_start_scsi()
1637 tot_dsds = nseg; in qla24xx_start_scsi()
[all …]
Dqla_mr.c3071 int nseg; in qlafx00_start_scsi() local
3102 nseg = dma_map_sg(&ha->pdev->dev, scsi_sglist(cmd), in qlafx00_start_scsi()
3104 if (unlikely(!nseg)) in qlafx00_start_scsi()
3107 nseg = 0; in qlafx00_start_scsi()
3109 tot_dsds = nseg; in qlafx00_start_scsi()
/Linux-v5.10/drivers/scsi/aacraid/
Daachba.c226 int pages, int nseg, int nseg_new);
3833 int nseg; in aac_build_sg() local
3842 nseg = scsi_dma_map(scsicmd); in aac_build_sg()
3843 if (nseg <= 0) in aac_build_sg()
3844 return nseg; in aac_build_sg()
3846 psg->count = cpu_to_le32(nseg); in aac_build_sg()
3848 scsi_for_each_sg(scsicmd, sg, nseg, i) { in aac_build_sg()
3874 int nseg; in aac_build_sg64() local
3884 nseg = scsi_dma_map(scsicmd); in aac_build_sg64()
3885 if (nseg <= 0) in aac_build_sg64()
[all …]
/Linux-v5.10/drivers/net/ethernet/netronome/nfp/nfpcore/
Dnfp_nsp.c509 int i, ret, nseg; in nfp_nsp_command_buf_dma_sg() local
514 nseg = DIV_ROUND_UP(max_size, chunk_size); in nfp_nsp_command_buf_dma_sg()
516 chunks = kzalloc(array_size(sizeof(*chunks), nseg), GFP_KERNEL); in nfp_nsp_command_buf_dma_sg()
522 for (i = 0; i < nseg; i++) { in nfp_nsp_command_buf_dma_sg()
544 for (i = 0; i < nseg; i++) { in nfp_nsp_command_buf_dma_sg()
565 desc_sz = struct_size(desc, descs, nseg); in nfp_nsp_command_buf_dma_sg()
572 desc->chunk_cnt = cpu_to_le32(nseg); in nfp_nsp_command_buf_dma_sg()
573 for (i = 0; i < nseg; i++) { in nfp_nsp_command_buf_dma_sg()
605 i = nseg; in nfp_nsp_command_buf_dma_sg()
610 i = nseg; in nfp_nsp_command_buf_dma_sg()
/Linux-v5.10/drivers/scsi/qla4xxx/
Dql4_iocb.c277 int nseg; in qla4xxx_send_command_to_isp() local
307 nseg = scsi_dma_map(cmd); in qla4xxx_send_command_to_isp()
308 if (nseg < 0) in qla4xxx_send_command_to_isp()
310 tot_dsds = nseg; in qla4xxx_send_command_to_isp()
/Linux-v5.10/drivers/scsi/lpfc/
Dlpfc_nvme.c1429 int nseg, i, j; in lpfc_nvme_prep_io_dma() local
1465 nseg = nCmd->sg_cnt; in lpfc_nvme_prep_io_dma()
1470 for (i = 0; i < nseg; i++) { in lpfc_nvme_prep_io_dma()
1474 i, nseg); in lpfc_nvme_prep_io_dma()
1480 if ((num_bde + 1) == nseg) { in lpfc_nvme_prep_io_dma()
1490 ((nseg - 1) != i)) { in lpfc_nvme_prep_io_dma()
1515 if ((nseg - 1) == i) in lpfc_nvme_prep_io_dma()
Dlpfc_scsi.c846 int nseg, datadir = scsi_cmnd->sc_data_direction; in lpfc_scsi_prep_dma_buf_s3() local
863 nseg = dma_map_sg(&phba->pcidev->dev, scsi_sglist(scsi_cmnd), in lpfc_scsi_prep_dma_buf_s3()
865 if (unlikely(!nseg)) in lpfc_scsi_prep_dma_buf_s3()
868 lpfc_cmd->seg_cnt = nseg; in lpfc_scsi_prep_dma_buf_s3()
890 scsi_for_each_sg(scsi_cmnd, sgel, nseg, num_bde) { in lpfc_scsi_prep_dma_buf_s3()
895 nseg <= LPFC_EXT_DATA_BDE_COUNT) { in lpfc_scsi_prep_dma_buf_s3()
3058 int nseg, i, j; in lpfc_scsi_prep_dma_buf_s4() local
3077 nseg = scsi_dma_map(scsi_cmnd); in lpfc_scsi_prep_dma_buf_s4()
3078 if (unlikely(nseg <= 0)) in lpfc_scsi_prep_dma_buf_s4()
3087 lpfc_cmd->seg_cnt = nseg; in lpfc_scsi_prep_dma_buf_s4()
[all …]
/Linux-v5.10/drivers/atm/
Dfore200e.h114 u32 nseg : 8, /* number of transmit segments */
163 u32 nseg; /* number of receive segments */ member
Dfore200e.c990 for (i = 0; i < rpd->nseg; i++) in fore200e_push_rpd()
1010 for (i = 0; i < rpd->nseg; i++) { in fore200e_push_rpd()
1060 for (i = 0; i < rpd->nseg; i++) { in fore200e_collect_rpd()
1651 tpd->spec.nseg = 1; in fore200e_send()
/Linux-v5.10/drivers/scsi/aic7xxx/
Daic7xxx_osm.c1412 int nseg; in ahc_linux_run_command() local
1439 nseg = scsi_dma_map(cmd); in ahc_linux_run_command()
1440 if (nseg < 0) in ahc_linux_run_command()
1503 if (nseg > 0) { in ahc_linux_run_command()
1514 scsi_for_each_sg(cmd, cur_seg, nseg, i) { in ahc_linux_run_command()
Daic79xx_osm.c1550 int nseg; in ahd_linux_run_command() local
1552 nseg = scsi_dma_map(cmd); in ahd_linux_run_command()
1553 if (nseg < 0) in ahd_linux_run_command()
1620 if (nseg > 0) { in ahd_linux_run_command()
1627 scsi_for_each_sg(cmd, cur_seg, nseg, i) { in ahd_linux_run_command()
1635 i == (nseg - 1)); in ahd_linux_run_command()
/Linux-v5.10/drivers/scsi/megaraid/
Dmegaraid_sas_fusion.h105 u8 nseg:4; member
109 u8 nseg:4;
/Linux-v5.10/drivers/net/ethernet/atheros/atlx/
Datl1.c2221 int i, nseg; in atl1_tx_map() local
2224 nseg = (data_len + ATL1_MAX_TX_BUF_LEN - 1) / in atl1_tx_map()
2226 for (i = 0; i < nseg; i++) { in atl1_tx_map()
2260 u16 i, nseg; in atl1_tx_map() local
2264 nseg = (buf_len + ATL1_MAX_TX_BUF_LEN - 1) / in atl1_tx_map()
2266 for (i = 0; i < nseg; i++) { in atl1_tx_map()
/Linux-v5.10/drivers/scsi/arcmsr/
Darcmsr_hba.c1801 int nseg; in arcmsr_build_ccb() local
1810 nseg = scsi_dma_map(pcmd); in arcmsr_build_ccb()
1811 if (unlikely(nseg > acb->host->sg_tablesize || nseg < 0)) in arcmsr_build_ccb()
1813 scsi_for_each_sg(pcmd, sg, nseg, i) { in arcmsr_build_ccb()
1835 arcmsr_cdb->sgcount = (uint8_t)nseg; in arcmsr_build_ccb()

12