Home
last modified time | relevance | path

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

12

/Linux-v5.15/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.c328 int ecbno, nseg; in aha1740_queuecommand_lck() local
399 nseg = scsi_dma_map(SCpnt); in aha1740_queuecommand_lck()
400 BUG_ON(nseg < 0); in aha1740_queuecommand_lck()
401 if (nseg) { in aha1740_queuecommand_lck()
410 scsi_for_each_sg(SCpnt, sg, nseg, i) { in aha1740_queuecommand_lck()
414 host->ecb[ecbno].datalen = nseg * sizeof(struct aha1740_chain); in aha1740_queuecommand_lck()
Dstex.c429 int i, nseg; in stex_map_sg() local
432 nseg = scsi_dma_map(cmd); in stex_map_sg()
433 BUG_ON(nseg < 0); in stex_map_sg()
434 if (nseg) { in stex_map_sg()
437 ccb->sg_count = nseg; in stex_map_sg()
438 dst->sg_count = cpu_to_le16((u16)nseg); in stex_map_sg()
443 scsi_for_each_sg(cmd, sg, nseg, i) { in stex_map_sg()
451 return nseg; in stex_map_sg()
461 int i, nseg; in stex_ss_map_sg() local
464 nseg = scsi_dma_map(cmd); in stex_ss_map_sg()
[all …]
Dmac53c94.c363 int i, dma_cmd, total, nseg; in set_dma_cmds() local
369 nseg = scsi_dma_map(cmd); in set_dma_cmds()
370 BUG_ON(nseg < 0); in set_dma_cmds()
371 if (!nseg) in set_dma_cmds()
379 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.c1272 int nseg; in set_dma_cmds() local
1276 nseg = scsi_dma_map(cmd); in set_dma_cmds()
1277 BUG_ON(nseg < 0); in set_dma_cmds()
1279 if (nseg) { in set_dma_cmds()
1283 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.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()
/Linux-v5.15/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, i = 0; n < nseg; n++) { in xen_blkbk_parse_indirect()
1191 unsigned int nseg; in dispatch_rw_block_io() local
1237 nseg = req->operation == BLKIF_OP_INDIRECT ? in dispatch_rw_block_io()
1240 if (unlikely(nseg == 0 && operation_flags != REQ_PREFLUSH) || in dispatch_rw_block_io()
1242 (nseg > BLKIF_MAX_SEGMENTS_PER_REQUEST)) || in dispatch_rw_block_io()
1244 (nseg > MAX_INDIRECT_SEGMENTS))) { in dispatch_rw_block_io()
1245 pr_debug("Bad number of segments in request (%d)\n", nseg); in dispatch_rw_block_io()
[all …]
/Linux-v5.15/include/scsi/
Dscsi_cmnd.h210 #define scsi_for_each_sg(cmd, sg, nseg, __i) \ argument
211 for_each_sg(scsi_sglist(cmd), sg, nseg, __i)
335 #define scsi_for_each_prot_sg(cmd, sg, nseg, __i) \ argument
336 for_each_sg(scsi_prot_sglist(cmd), sg, nseg, __i)
/Linux-v5.15/drivers/scsi/qla2xxx/
Dqla_iocb.c325 int nseg; in qla2x00_start_scsi() local
368 nseg = dma_map_sg(&ha->pdev->dev, scsi_sglist(cmd), in qla2x00_start_scsi()
370 if (unlikely(!nseg)) in qla2x00_start_scsi()
373 nseg = 0; in qla2x00_start_scsi()
375 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.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()
Dqla_edif.c2743 int nseg; in qla28xx_start_scsi_edif() local
2798 nseg = dma_map_sg(&ha->pdev->dev, scsi_sglist(cmd), in qla28xx_start_scsi_edif()
2800 if (unlikely(!nseg)) in qla28xx_start_scsi_edif()
2803 nseg = 0; in qla28xx_start_scsi_edif()
2806 tot_dsds = nseg; in qla28xx_start_scsi_edif()
/Linux-v5.15/drivers/scsi/aacraid/
Daachba.c225 int pages, int nseg, int nseg_new);
3782 int nseg; in aac_build_sg() local
3791 nseg = scsi_dma_map(scsicmd); in aac_build_sg()
3792 if (nseg <= 0) in aac_build_sg()
3793 return nseg; in aac_build_sg()
3795 psg->count = cpu_to_le32(nseg); in aac_build_sg()
3797 scsi_for_each_sg(scsicmd, sg, nseg, i) { in aac_build_sg()
3823 int nseg; in aac_build_sg64() local
3833 nseg = scsi_dma_map(scsicmd); in aac_build_sg64()
3834 if (nseg <= 0) in aac_build_sg64()
[all …]
/Linux-v5.15/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.15/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.15/drivers/scsi/lpfc/
Dlpfc_nvme.c1302 int nseg, i, j; in lpfc_nvme_prep_io_dma() local
1338 nseg = nCmd->sg_cnt; in lpfc_nvme_prep_io_dma()
1343 for (i = 0; i < nseg; i++) { in lpfc_nvme_prep_io_dma()
1347 i, nseg); in lpfc_nvme_prep_io_dma()
1353 if ((num_bde + 1) == nseg) { in lpfc_nvme_prep_io_dma()
1363 ((nseg - 1) != i)) { in lpfc_nvme_prep_io_dma()
1388 if ((nseg - 1) == i) in lpfc_nvme_prep_io_dma()
Dlpfc_scsi.c867 int nseg, datadir = scsi_cmnd->sc_data_direction; in lpfc_scsi_prep_dma_buf_s3() local
884 nseg = dma_map_sg(&phba->pcidev->dev, scsi_sglist(scsi_cmnd), in lpfc_scsi_prep_dma_buf_s3()
886 if (unlikely(!nseg)) in lpfc_scsi_prep_dma_buf_s3()
889 lpfc_cmd->seg_cnt = nseg; in lpfc_scsi_prep_dma_buf_s3()
911 scsi_for_each_sg(scsi_cmnd, sgel, nseg, num_bde) { in lpfc_scsi_prep_dma_buf_s3()
916 nseg <= LPFC_EXT_DATA_BDE_COUNT) { in lpfc_scsi_prep_dma_buf_s3()
3221 int nseg, i, j; in lpfc_scsi_prep_dma_buf_s4() local
3240 nseg = scsi_dma_map(scsi_cmnd); in lpfc_scsi_prep_dma_buf_s4()
3241 if (unlikely(nseg <= 0)) in lpfc_scsi_prep_dma_buf_s4()
3250 lpfc_cmd->seg_cnt = nseg; in lpfc_scsi_prep_dma_buf_s4()
[all …]
/Linux-v5.15/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-v5.15/drivers/scsi/aic7xxx/
Daic7xxx_osm.c1413 int nseg; in ahc_linux_run_command() local
1440 nseg = scsi_dma_map(cmd); in ahc_linux_run_command()
1441 if (nseg < 0) in ahc_linux_run_command()
1504 if (nseg > 0) { in ahc_linux_run_command()
1515 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.15/drivers/scsi/megaraid/
Dmegaraid_sas_fusion.h105 u8 nseg:4; member
109 u8 nseg:4;
/Linux-v5.15/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()

12