Commit c01545da authored by Federico Vaga's avatar Federico Vaga Committed by Federico Vaga

test kmalloc 1 transfer

Signed-off-by: 's avatarFederico Vaga <federico.vaga@gmail.com>
parent 086c0547
......@@ -83,7 +83,7 @@ static int zio_calculate_nents(struct zio_blocks_sg *sg_blocks,
nents += sg_blocks[i].block->datalen / PAGE_SIZE + 1;
}
return nents;
return 1;//nents;
}
static void zio_dma_setup_scatter(struct zio_dma_sgt *zdma)
......@@ -95,6 +95,7 @@ static void zio_dma_setup_scatter(struct zio_dma_sgt *zdma)
int i, i_blk;
i_blk = 0;
#if 0
for_each_sg(zdma->sgt.sgl, sg, zdma->sgt.nents, i) {
if (i_blk < zdma->n_blocks && i == zdma->sg_blocks[i_blk].first_nent) {
WARN(bytesleft, "unmapped byte in block %i\n",
......@@ -134,6 +135,11 @@ static void zio_dma_setup_scatter(struct zio_dma_sgt *zdma)
virt_to_page(bufp), offset_in_page(bufp),
mapbytes, bytesleft);
}
#endif
for_each_sg(zdma->sgt.sgl, sg, zdma->sgt.nents, i) {
sg_set_page(sg, virt_to_page(bufp), zdma->sg_blocks[i_blk].block->datalen,
offset_in_page(bufp));
}
}
/*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment