From 497d588551be7fe0acfbb2db11e1b3ea6be06f82 Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Sat, 8 Jun 2013 03:55:31 +0000 Subject: [PATCH] READ CAPACITY(10): LBA is 32 bits, not 64 git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4901 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/dev_handlers/scst_vdisk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scst/src/dev_handlers/scst_vdisk.c b/scst/src/dev_handlers/scst_vdisk.c index 8808b08b4..0bc294631 100644 --- a/scst/src/dev_handlers/scst_vdisk.c +++ b/scst/src/dev_handlers/scst_vdisk.c @@ -3067,7 +3067,7 @@ static enum compl_status_e vdisk_exec_read_capacity16(struct vdisk_cmd_params *p nblocks = virt_dev->nblocks - 1; if ((cmd->cdb[14] & 1) == 0) { - uint64_t lba = get_unaligned_be64(&cmd->cdb[2]); + uint32_t lba = get_unaligned_be32(&cmd->cdb[2]); if (lba != 0) { TRACE_DBG("PMI zero and LBA not zero (cmd %p)", cmd); scst_set_cmd_error(cmd,