Lines Matching refs:n_elem
2409 assert(qc->n_elem == 1); in ata_sg_clean()
2411 VPRINTK("unmapping %u sg elements\n", qc->n_elem); in ata_sg_clean()
2421 if (qc->n_elem) in ata_sg_clean()
2422 dma_unmap_sg(ap->host_set->dev, sg, qc->n_elem, dir); in ata_sg_clean()
2465 assert(qc->n_elem > 0); in ata_fill_sg()
2560 qc->n_elem = 1; in ata_sg_init_one()
2583 unsigned int n_elem) in ata_sg_init() argument
2587 qc->n_elem = n_elem; in ata_sg_init()
2588 qc->orig_n_elem = n_elem; in ata_sg_init()
2675 struct scatterlist *lsg = &sg[qc->n_elem - 1]; in ata_sg_setup()
2676 int n_elem, pre_n_elem, dir, trim_sg = 0; in ata_sg_setup() local
2714 qc->n_elem - 1, lsg->length, qc->pad_len); in ata_sg_setup()
2717 pre_n_elem = qc->n_elem; in ata_sg_setup()
2722 n_elem = 0; in ata_sg_setup()
2727 n_elem = dma_map_sg(ap->host_set->dev, sg, pre_n_elem, dir); in ata_sg_setup()
2728 if (n_elem < 1) { in ata_sg_setup()
2734 DPRINTK("%d sg elements mapped\n", n_elem); in ata_sg_setup()
2737 qc->n_elem = n_elem; in ata_sg_setup()
3064 if (unlikely(qc->cursg >= qc->n_elem)) { in __atapi_pio_bytes()