ub: add sg_init_table for sense and read capacity commands
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
diff --git a/drivers/block/ub.c b/drivers/block/ub.c
index 5e740e1..08e909d 100644
--- a/drivers/block/ub.c
+++ b/drivers/block/ub.c
@@ -1428,6 +1428,7 @@
scmd->state = UB_CMDST_INIT;
scmd->nsg = 1;
sg = &scmd->sgv[0];
+ sg_init_table(sg, UB_MAX_REQ_SG);
sg_set_page(sg, virt_to_page(sc->top_sense), UB_SENSE_SIZE,
(unsigned long)sc->top_sense & (PAGE_SIZE-1));
scmd->len = UB_SENSE_SIZE;
@@ -1863,6 +1864,7 @@
cmd->state = UB_CMDST_INIT;
cmd->nsg = 1;
sg = &cmd->sgv[0];
+ sg_init_table(sg, UB_MAX_REQ_SG);
sg_set_page(sg, virt_to_page(p), 8, (unsigned long)p & (PAGE_SIZE-1));
cmd->len = 8;
cmd->lun = lun;