Home
last modified time | relevance | path

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

12

/linux-6.6.21/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.c332 int ecbno, nseg; in aha1740_queuecommand_lck() local
403 nseg = scsi_dma_map(SCpnt); in aha1740_queuecommand_lck()
404 BUG_ON(nseg < 0); in aha1740_queuecommand_lck()
405 if (nseg) { in aha1740_queuecommand_lck()
414 scsi_for_each_sg(SCpnt, sg, nseg, i) { in aha1740_queuecommand_lck()
418 host->ecb[ecbno].datalen = nseg * sizeof(struct aha1740_chain); in aha1740_queuecommand_lck()
Dstex.c433 int i, nseg; in stex_map_sg() local
436 nseg = scsi_dma_map(cmd); in stex_map_sg()
437 BUG_ON(nseg < 0); in stex_map_sg()
438 if (nseg) { in stex_map_sg()
441 ccb->sg_count = nseg; in stex_map_sg()
442 dst->sg_count = cpu_to_le16((u16)nseg); in stex_map_sg()
447 scsi_for_each_sg(cmd, sg, nseg, i) { in stex_map_sg()
455 return nseg; in stex_map_sg()
465 int i, nseg; in stex_ss_map_sg() local
468 nseg = scsi_dma_map(cmd); in stex_ss_map_sg()
[all …]
Dmac53c94.c360 int i, dma_cmd, total, nseg; in set_dma_cmds() local
366 nseg = scsi_dma_map(cmd); in set_dma_cmds()
367 BUG_ON(nseg < 0); in set_dma_cmds()
368 if (!nseg) in set_dma_cmds()
376 scsi_for_each_sg(cmd, scl, nseg, i) { in set_dma_cmds()
Dhptiop.c851 int idx, nseg; in hptiop_buildsgl() local
853 nseg = scsi_dma_map(scp); in hptiop_buildsgl()
854 BUG_ON(nseg < 0); in hptiop_buildsgl()
855 if (!nseg) in hptiop_buildsgl()
858 HPT_SCP(scp)->sgcnt = nseg; in hptiop_buildsgl()
Dmesh.c1265 int nseg; in set_dma_cmds() local
1269 nseg = scsi_dma_map(cmd); in set_dma_cmds()
1270 BUG_ON(nseg < 0); in set_dma_cmds()
1272 if (nseg) { in set_dma_cmds()
1276 scsi_for_each_sg(cmd, scl, nseg, i) { in set_dma_cmds()
Dpmcraid.c3140 int i, nseg; in pmcraid_build_ioadl() local
3152 nseg = scsi_dma_map(scsi_cmd); in pmcraid_build_ioadl()
3154 if (nseg < 0) { in pmcraid_build_ioadl()
3157 } else if (nseg > PMCRAID_MAX_IOADLS) { in pmcraid_build_ioadl()
3160 "sg count is (%d) more than allowed!\n", nseg); in pmcraid_build_ioadl()
3170 ioadl = pmcraid_init_ioadls(cmd, nseg); in pmcraid_build_ioadl()
3173 scsi_for_each_sg(scsi_cmd, sglist, nseg, i) { in pmcraid_build_ioadl()
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()
Ddc395x.c865 int nseg; in build_srb() local
887 nseg = scsi_dma_map(cmd); in build_srb()
888 BUG_ON(nseg < 0); in build_srb()
890 if (dir == DMA_NONE || !nseg) { in build_srb()
901 srb->sg_count = nseg; in build_srb()
/linux-6.6.21/include/scsi/
Dscsi_cmnd.h206 #define scsi_for_each_sg(cmd, sg, nseg, __i) \ argument
207 for_each_sg(scsi_sglist(cmd), sg, nseg, __i)
331 #define scsi_for_each_prot_sg(cmd, sg, nseg, __i) \ argument
332 for_each_sg(scsi_prot_sglist(cmd), sg, nseg, __i)
/linux-6.6.21/drivers/scsi/qla2xxx/
Dqla_iocb.c326 int nseg; in qla2x00_start_scsi() local
369 nseg = dma_map_sg(&ha->pdev->dev, scsi_sglist(cmd), in qla2x00_start_scsi()
371 if (unlikely(!nseg)) in qla2x00_start_scsi()
374 nseg = 0; in qla2x00_start_scsi()
376 tot_dsds = nseg; in qla2x00_start_scsi()
1541 int nseg; in qla24xx_start_scsi() local
1582 nseg = dma_map_sg(&ha->pdev->dev, scsi_sglist(cmd), in qla24xx_start_scsi()
1584 if (unlikely(!nseg)) in qla24xx_start_scsi()
1587 nseg = 0; in qla24xx_start_scsi()
1589 tot_dsds = nseg; in qla24xx_start_scsi()
[all …]
Dqla_mr.c3049 int nseg; in qlafx00_start_scsi() local
3080 nseg = dma_map_sg(&ha->pdev->dev, scsi_sglist(cmd), in qlafx00_start_scsi()
3082 if (unlikely(!nseg)) in qlafx00_start_scsi()
3085 nseg = 0; in qlafx00_start_scsi()
3087 tot_dsds = nseg; in qlafx00_start_scsi()
Dqla_edif.c2970 int nseg; in qla28xx_start_scsi_edif() local
3025 nseg = dma_map_sg(&ha->pdev->dev, scsi_sglist(cmd), in qla28xx_start_scsi_edif()
3027 if (unlikely(!nseg)) in qla28xx_start_scsi_edif()
3030 nseg = 0; in qla28xx_start_scsi_edif()
3033 tot_dsds = nseg; in qla28xx_start_scsi_edif()
/linux-6.6.21/drivers/scsi/aacraid/
Daachba.c225 int pages, int nseg, int nseg_new);
3797 int nseg; in aac_build_sg() local
3806 nseg = scsi_dma_map(scsicmd); in aac_build_sg()
3807 if (nseg <= 0) in aac_build_sg()
3808 return nseg; in aac_build_sg()
3810 psg->count = cpu_to_le32(nseg); in aac_build_sg()
3812 scsi_for_each_sg(scsicmd, sg, nseg, i) { in aac_build_sg()
3838 int nseg; in aac_build_sg64() local
3848 nseg = scsi_dma_map(scsicmd); in aac_build_sg64()
3849 if (nseg <= 0) in aac_build_sg64()
[all …]
/linux-6.6.21/drivers/block/xen-blkback/
Dblkback.c920 int indirect_grefs, rc, n, nseg, i; in xen_blkbk_parse_indirect() local
923 nseg = pending_req->nr_segs; in xen_blkbk_parse_indirect()
924 indirect_grefs = INDIRECT_PAGES(nseg); in xen_blkbk_parse_indirect()
934 for (n = 0; n < nseg; n++) { in xen_blkbk_parse_indirect()
1296 unsigned int nseg; in dispatch_rw_block_io() local
1342 nseg = req->operation == BLKIF_OP_INDIRECT ? in dispatch_rw_block_io()
1345 if (unlikely(nseg == 0 && operation_flags != REQ_PREFLUSH) || in dispatch_rw_block_io()
1347 (nseg > BLKIF_MAX_SEGMENTS_PER_REQUEST)) || in dispatch_rw_block_io()
1349 (nseg > MAX_INDIRECT_SEGMENTS))) { in dispatch_rw_block_io()
1350 pr_debug("Bad number of segments in request (%d)\n", nseg); in dispatch_rw_block_io()
[all …]
/linux-6.6.21/drivers/net/ethernet/netronome/nfp/nfpcore/
Dnfp_nsp.c510 int i, ret, nseg; in nfp_nsp_command_buf_dma_sg() local
515 nseg = DIV_ROUND_UP(max_size, chunk_size); in nfp_nsp_command_buf_dma_sg()
517 chunks = kcalloc(nseg, sizeof(*chunks), GFP_KERNEL); in nfp_nsp_command_buf_dma_sg()
523 for (i = 0; i < nseg; i++) { in nfp_nsp_command_buf_dma_sg()
545 for (i = 0; i < nseg; i++) { in nfp_nsp_command_buf_dma_sg()
566 desc_sz = struct_size(desc, descs, nseg); in nfp_nsp_command_buf_dma_sg()
573 desc->chunk_cnt = cpu_to_le32(nseg); in nfp_nsp_command_buf_dma_sg()
574 for (i = 0; i < nseg; i++) { in nfp_nsp_command_buf_dma_sg()
606 i = nseg; in nfp_nsp_command_buf_dma_sg()
611 i = nseg; in nfp_nsp_command_buf_dma_sg()
/linux-6.6.21/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-6.6.21/drivers/scsi/lpfc/
Dlpfc_nvme.c1349 int nseg, i, j; in lpfc_nvme_prep_io_dma() local
1385 nseg = nCmd->sg_cnt; in lpfc_nvme_prep_io_dma()
1390 for (i = 0; i < nseg; i++) { in lpfc_nvme_prep_io_dma()
1394 i, nseg); in lpfc_nvme_prep_io_dma()
1400 if (nseg == 1) { in lpfc_nvme_prep_io_dma()
1410 ((nseg - 1) != i)) { in lpfc_nvme_prep_io_dma()
1435 if ((nseg - 1) == i) in lpfc_nvme_prep_io_dma()
1471 if (nseg == 1 && phba->cfg_enable_pbde) { in lpfc_nvme_prep_io_dma()
Dlpfc_scsi.c820 int nseg, datadir = scsi_cmnd->sc_data_direction; in lpfc_scsi_prep_dma_buf_s3() local
837 nseg = dma_map_sg(&phba->pcidev->dev, scsi_sglist(scsi_cmnd), in lpfc_scsi_prep_dma_buf_s3()
839 if (unlikely(!nseg)) in lpfc_scsi_prep_dma_buf_s3()
842 lpfc_cmd->seg_cnt = nseg; in lpfc_scsi_prep_dma_buf_s3()
864 scsi_for_each_sg(scsi_cmnd, sgel, nseg, num_bde) { in lpfc_scsi_prep_dma_buf_s3()
869 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-6.6.21/drivers/atm/
Dfore200e.h114 u32 nseg : 8, /* number of transmit segments */
163 u32 nseg; /* number of receive segments */ member
Dfore200e.c988 for (i = 0; i < rpd->nseg; i++) in fore200e_push_rpd()
1008 for (i = 0; i < rpd->nseg; i++) { in fore200e_push_rpd()
1058 for (i = 0; i < rpd->nseg; i++) { in fore200e_collect_rpd()
1649 tpd->spec.nseg = 1; in fore200e_send()
/linux-6.6.21/drivers/scsi/aic7xxx/
Daic7xxx_osm.c1411 int nseg; in ahc_linux_run_command() local
1438 nseg = scsi_dma_map(cmd); in ahc_linux_run_command()
1439 if (nseg < 0) in ahc_linux_run_command()
1502 if (nseg > 0) { in ahc_linux_run_command()
1513 scsi_for_each_sg(cmd, cur_seg, nseg, i) { in ahc_linux_run_command()
Daic79xx_osm.c1544 int nseg; in ahd_linux_run_command() local
1546 nseg = scsi_dma_map(cmd); in ahd_linux_run_command()
1547 if (nseg < 0) in ahd_linux_run_command()
1614 if (nseg > 0) { in ahd_linux_run_command()
1621 scsi_for_each_sg(cmd, cur_seg, nseg, i) { in ahd_linux_run_command()
1629 i == (nseg - 1)); in ahd_linux_run_command()
/linux-6.6.21/drivers/scsi/megaraid/
Dmegaraid_sas_fusion.h105 u8 nseg:4; member
109 u8 nseg:4;
/linux-6.6.21/drivers/net/ethernet/atheros/atlx/
Datl1.c2224 int i, nseg; in atl1_tx_map() local
2227 nseg = (data_len + ATL1_MAX_TX_BUF_LEN - 1) / in atl1_tx_map()
2229 for (i = 0; i < nseg; i++) { in atl1_tx_map()
2263 u16 i, nseg; in atl1_tx_map() local
2267 nseg = (buf_len + ATL1_MAX_TX_BUF_LEN - 1) / in atl1_tx_map()
2269 for (i = 0; i < nseg; i++) { in atl1_tx_map()

12