From d2799ea8fa4e7727e3dbed0d19d9bd864190f755 Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Mon, 24 Sep 2007 16:07:04 +0000 Subject: [PATCH] Fix from Jianxi Chen , which fixes problem with devices >2TB in size git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@190 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/README | 3 +++ scst/src/dev_handlers/scst_vdisk.c | 7 ++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/scst/README b/scst/README index 32e66aa17..6a87e55ab 100644 --- a/scst/README +++ b/scst/README @@ -660,4 +660,7 @@ Thanks to: * Terry Greeniaus for fixes. + * Jianxi Chen for fixing problems with + devices >2TB in size + Vladislav Bolkhovitin , http://scst.sourceforge.net diff --git a/scst/src/dev_handlers/scst_vdisk.c b/scst/src/dev_handlers/scst_vdisk.c index 0469d1ea5..879db6a0e 100644 --- a/scst/src/dev_handlers/scst_vdisk.c +++ b/scst/src/dev_handlers/scst_vdisk.c @@ -713,9 +713,10 @@ static int vdisk_do_job(struct scst_cmd *cmd) lba_start |= ((u64)cdb[3]) << 48; lba_start |= ((u64)cdb[4]) << 40; lba_start |= ((u64)cdb[5]) << 32; - lba_start |= ((u64)cdb[6]) << 16; - lba_start |= ((u64)cdb[7]) << 8; - lba_start |= ((u64)cdb[8]); + lba_start |= ((u64)cdb[6]) << 24; + lba_start |= ((u64)cdb[7]) << 16; + lba_start |= ((u64)cdb[8]) << 8; + lba_start |= ((u64)cdb[9]); data_len = cmd->bufflen; break; }