Lines Matching refs:n_elem
243 int n_elem; member
625 crq->n_elem = 0; in carm_get_request()
645 assert(host->hw_sg_used >= crq->n_elem); in carm_put_request()
648 host->hw_sg_used -= crq->n_elem; in carm_put_request()
1058 crq->n_elem = 0; in carm_oob_tasklet()
1076 int n_elem = 0; in blk_rq_map_sg() local
1082 sg[n_elem - 1].length += bh->b_size; in blk_rq_map_sg()
1085 if (unlikely(n_elem == CARM_MAX_REQ_SG)) in blk_rq_map_sg()
1087 sg[n_elem].page = bh->b_page; in blk_rq_map_sg()
1088 sg[n_elem].length = bh->b_size; in blk_rq_map_sg()
1089 sg[n_elem].offset = bh_offset(bh); in blk_rq_map_sg()
1091 n_elem++; in blk_rq_map_sg()
1097 return n_elem; in blk_rq_map_sg()
1109 int writing = 0, pci_dir, i, n_elem, rc, have_work = 1; in carm_rw_tasklet() local
1146 n_elem = blk_rq_map_sg(q, rq, sg); in carm_rw_tasklet()
1147 if (n_elem <= 0) { in carm_rw_tasklet()
1153 n_elem = pci_map_sg(host->pdev, sg, n_elem, pci_dir); in carm_rw_tasklet()
1154 if (n_elem <= 0) { in carm_rw_tasklet()
1158 crq->n_elem = n_elem; in carm_rw_tasklet()
1160 host->hw_sg_used += n_elem; in carm_rw_tasklet()
1181 msg->sg_count = n_elem; in carm_rw_tasklet()
1190 for (i = 0; i < n_elem; i++) { in carm_rw_tasklet()
1340 pci_unmap_sg(host->pdev, &crq->sg[0], crq->n_elem, pci_dir); in carm_handle_rw()