Lines Matching refs:sg
85 struct scatterlist *sg; member
211 struct mmc_request *mrq, struct scatterlist *sg, unsigned sg_len, in mmc_test_prepare_mrq() argument
242 mrq->data->sg = sg; in mmc_test_prepare_mrq()
298 struct scatterlist sg; in mmc_test_buffer_transfer() local
304 sg_init_one(&sg, buffer, blksz); in mmc_test_buffer_transfer()
306 mmc_test_prepare_mrq(test, &mrq, &sg, 1, addr, 1, blksz, write); in mmc_test_buffer_transfer()
414 struct scatterlist *sg = NULL; in mmc_test_map_sg() local
433 if (sg) in mmc_test_map_sg()
434 sg = sg_next(sg); in mmc_test_map_sg()
436 sg = sglist; in mmc_test_map_sg()
437 if (!sg) in mmc_test_map_sg()
439 sg_set_page(sg, mem->arr[i].page, len, 0); in mmc_test_map_sg()
450 if (sg) in mmc_test_map_sg()
451 sg_mark_end(sg); in mmc_test_map_sg()
467 struct scatterlist *sg = NULL; in mmc_test_map_sg_max_scatter() local
488 if (sg) in mmc_test_map_sg_max_scatter()
489 sg = sg_next(sg); in mmc_test_map_sg_max_scatter()
491 sg = sglist; in mmc_test_map_sg_max_scatter()
492 if (!sg) in mmc_test_map_sg_max_scatter()
494 sg_set_page(sg, virt_to_page(addr), len, 0); in mmc_test_map_sg_max_scatter()
502 if (sg) in mmc_test_map_sg_max_scatter()
503 sg_mark_end(sg); in mmc_test_map_sg_max_scatter()
835 struct scatterlist *sg = t->sg; in mmc_test_nonblock_transfer() local
850 mmc_test_prepare_mrq(test, mrq, sg, t->sg_len, dev_addr, in mmc_test_nonblock_transfer()
860 swap(sg, sg_areq); in mmc_test_nonblock_transfer()
875 struct scatterlist *sg, unsigned sg_len, unsigned dev_addr, in mmc_test_simple_transfer() argument
887 mmc_test_prepare_mrq(test, &mrq, sg, sg_len, dev_addr, in mmc_test_simple_transfer()
908 struct scatterlist sg; in mmc_test_broken_transfer() local
914 sg_init_one(&sg, test->buffer, blocks * blksz); in mmc_test_broken_transfer()
916 mmc_test_prepare_mrq(test, &mrq, &sg, 1, 0, blocks, blksz, write); in mmc_test_broken_transfer()
932 struct scatterlist *sg, unsigned sg_len, unsigned dev_addr, in mmc_test_transfer() argument
945 sg_copy_from_buffer(sg, sg_len, test->scratch, BUFFER_SIZE); in mmc_test_transfer()
952 ret = mmc_test_simple_transfer(test, sg, sg_len, dev_addr, in mmc_test_transfer()
992 sg_copy_to_buffer(sg, sg_len, test->scratch, BUFFER_SIZE); in mmc_test_transfer()
1018 struct scatterlist sg; in mmc_test_basic_write() local
1024 sg_init_one(&sg, test->buffer, 512); in mmc_test_basic_write()
1026 return mmc_test_simple_transfer(test, &sg, 1, 0, 1, 512, 1); in mmc_test_basic_write()
1032 struct scatterlist sg; in mmc_test_basic_read() local
1038 sg_init_one(&sg, test->buffer, 512); in mmc_test_basic_read()
1040 return mmc_test_simple_transfer(test, &sg, 1, 0, 1, 512, 0); in mmc_test_basic_read()
1045 struct scatterlist sg; in mmc_test_verify_write() local
1047 sg_init_one(&sg, test->buffer, 512); in mmc_test_verify_write()
1049 return mmc_test_transfer(test, &sg, 1, 0, 1, 512, 1); in mmc_test_verify_write()
1054 struct scatterlist sg; in mmc_test_verify_read() local
1056 sg_init_one(&sg, test->buffer, 512); in mmc_test_verify_read()
1058 return mmc_test_transfer(test, &sg, 1, 0, 1, 512, 0); in mmc_test_verify_read()
1064 struct scatterlist sg; in mmc_test_multi_write() local
1077 sg_init_one(&sg, test->buffer, size); in mmc_test_multi_write()
1079 return mmc_test_transfer(test, &sg, 1, 0, size / 512, 512, 1); in mmc_test_multi_write()
1085 struct scatterlist sg; in mmc_test_multi_read() local
1098 sg_init_one(&sg, test->buffer, size); in mmc_test_multi_read()
1100 return mmc_test_transfer(test, &sg, 1, 0, size / 512, 512, 0); in mmc_test_multi_read()
1106 struct scatterlist sg; in mmc_test_pow2_write() local
1112 sg_init_one(&sg, test->buffer, i); in mmc_test_pow2_write()
1113 ret = mmc_test_transfer(test, &sg, 1, 0, 1, i, 1); in mmc_test_pow2_write()
1124 struct scatterlist sg; in mmc_test_pow2_read() local
1130 sg_init_one(&sg, test->buffer, i); in mmc_test_pow2_read()
1131 ret = mmc_test_transfer(test, &sg, 1, 0, 1, i, 0); in mmc_test_pow2_read()
1142 struct scatterlist sg; in mmc_test_weird_write() local
1148 sg_init_one(&sg, test->buffer, i); in mmc_test_weird_write()
1149 ret = mmc_test_transfer(test, &sg, 1, 0, 1, i, 1); in mmc_test_weird_write()
1160 struct scatterlist sg; in mmc_test_weird_read() local
1166 sg_init_one(&sg, test->buffer, i); in mmc_test_weird_read()
1167 ret = mmc_test_transfer(test, &sg, 1, 0, 1, i, 0); in mmc_test_weird_read()
1178 struct scatterlist sg; in mmc_test_align_write() local
1181 sg_init_one(&sg, test->buffer + i, 512); in mmc_test_align_write()
1182 ret = mmc_test_transfer(test, &sg, 1, 0, 1, 512, 1); in mmc_test_align_write()
1193 struct scatterlist sg; in mmc_test_align_read() local
1196 sg_init_one(&sg, test->buffer + i, 512); in mmc_test_align_read()
1197 ret = mmc_test_transfer(test, &sg, 1, 0, 1, 512, 0); in mmc_test_align_read()
1209 struct scatterlist sg; in mmc_test_align_multi_write() local
1223 sg_init_one(&sg, test->buffer + i, size); in mmc_test_align_multi_write()
1224 ret = mmc_test_transfer(test, &sg, 1, 0, size / 512, 512, 1); in mmc_test_align_multi_write()
1236 struct scatterlist sg; in mmc_test_align_multi_read() local
1250 sg_init_one(&sg, test->buffer + i, size); in mmc_test_align_multi_read()
1251 ret = mmc_test_transfer(test, &sg, 1, 0, size / 512, 512, 0); in mmc_test_align_multi_read()
1313 struct scatterlist sg; in mmc_test_write_high() local
1315 sg_init_table(&sg, 1); in mmc_test_write_high()
1316 sg_set_page(&sg, test->highmem, 512, 0); in mmc_test_write_high()
1318 return mmc_test_transfer(test, &sg, 1, 0, 1, 512, 1); in mmc_test_write_high()
1323 struct scatterlist sg; in mmc_test_read_high() local
1325 sg_init_table(&sg, 1); in mmc_test_read_high()
1326 sg_set_page(&sg, test->highmem, 512, 0); in mmc_test_read_high()
1328 return mmc_test_transfer(test, &sg, 1, 0, 1, 512, 0); in mmc_test_read_high()
1334 struct scatterlist sg; in mmc_test_multi_write_high() local
1347 sg_init_table(&sg, 1); in mmc_test_multi_write_high()
1348 sg_set_page(&sg, test->highmem, size, 0); in mmc_test_multi_write_high()
1350 return mmc_test_transfer(test, &sg, 1, 0, size / 512, 512, 1); in mmc_test_multi_write_high()
1356 struct scatterlist sg; in mmc_test_multi_read_high() local
1369 sg_init_table(&sg, 1); in mmc_test_multi_read_high()
1370 sg_set_page(&sg, test->highmem, size, 0); in mmc_test_multi_read_high()
1372 return mmc_test_transfer(test, &sg, 1, 0, size / 512, 512, 0); in mmc_test_multi_read_high()
1399 err = mmc_test_map_sg_max_scatter(t->mem, sz, t->sg, in mmc_test_area_map()
1403 err = mmc_test_map_sg(t->mem, sz, t->sg, 1, t->max_segs, in mmc_test_area_map()
1436 return mmc_test_simple_transfer(test, t->sg, t->sg_len, dev_addr, in mmc_test_area_transfer()
1533 kfree(t->sg); in mmc_test_area_cleanup()
1588 t->sg = kmalloc_array(t->max_segs, sizeof(*t->sg), GFP_KERNEL); in mmc_test_area_init()
1589 if (!t->sg) { in mmc_test_area_init()
2383 mmc_test_prepare_mrq(test, mrq, t->sg, t->sg_len, dev_addr, t->blocks, in mmc_test_ongoing_transfer()