diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2007-10-25 03:17:03 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2007-10-25 03:17:03 -0400 |
commit | 4f33a9d9a416313f0ecf6e6953d205385a431cd5 (patch) | |
tree | ba9999e0250b756fdfb8639d416590573f947086 | |
parent | e88a39dee10d3a506ed8c4ba78cde0dd76a6fc83 (diff) |
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>
-rw-r--r-- | drivers/block/ub.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/block/ub.c b/drivers/block/ub.c index 5e740e14ab35..08e909dc7944 100644 --- a/drivers/block/ub.c +++ b/drivers/block/ub.c | |||
@@ -1428,6 +1428,7 @@ static void ub_state_sense(struct ub_dev *sc, struct ub_scsi_cmd *cmd) | |||
1428 | scmd->state = UB_CMDST_INIT; | 1428 | scmd->state = UB_CMDST_INIT; |
1429 | scmd->nsg = 1; | 1429 | scmd->nsg = 1; |
1430 | sg = &scmd->sgv[0]; | 1430 | sg = &scmd->sgv[0]; |
1431 | sg_init_table(sg, UB_MAX_REQ_SG); | ||
1431 | sg_set_page(sg, virt_to_page(sc->top_sense), UB_SENSE_SIZE, | 1432 | sg_set_page(sg, virt_to_page(sc->top_sense), UB_SENSE_SIZE, |
1432 | (unsigned long)sc->top_sense & (PAGE_SIZE-1)); | 1433 | (unsigned long)sc->top_sense & (PAGE_SIZE-1)); |
1433 | scmd->len = UB_SENSE_SIZE; | 1434 | scmd->len = UB_SENSE_SIZE; |
@@ -1863,6 +1864,7 @@ static int ub_sync_read_cap(struct ub_dev *sc, struct ub_lun *lun, | |||
1863 | cmd->state = UB_CMDST_INIT; | 1864 | cmd->state = UB_CMDST_INIT; |
1864 | cmd->nsg = 1; | 1865 | cmd->nsg = 1; |
1865 | sg = &cmd->sgv[0]; | 1866 | sg = &cmd->sgv[0]; |
1867 | sg_init_table(sg, UB_MAX_REQ_SG); | ||
1866 | sg_set_page(sg, virt_to_page(p), 8, (unsigned long)p & (PAGE_SIZE-1)); | 1868 | sg_set_page(sg, virt_to_page(p), 8, (unsigned long)p & (PAGE_SIZE-1)); |
1867 | cmd->len = 8; | 1869 | cmd->len = 8; |
1868 | cmd->lun = lun; | 1870 | cmd->lun = lun; |