diff options
author | Gabe Black <gabeblack@chromium.org> | 2012-03-13 16:03:33 -0700 |
---|---|---|
committer | Gerrit <chrome-bot@google.com> | 2012-03-13 19:21:27 -0700 |
commit | 1bd4fbf1cd120275c3f05425ac7273e7d0cb4a0a (patch) | |
tree | d74bdabf87a1b497adc2f67387ff0f48bb3764ca /include | |
parent | cf2aaf1a7d548fa575f3c6a8df0e16b918472d28 (diff) |
gen: Make the SCSI command aware of READ CAPACITY (16) and how to use it
The generic SCSI code in U-Boot was only aware of the READ CAPACITY (10) SCSI
command which can detect the size of disks up to 2TB in size. If that size is
exceeded, it should then try the READ CAPACITY (16) command which returns a
64 bit block count value.
BUG=chrome-os-partner:8180
TEST=In conjunction with the next change, built and booted into ChromeOS on
the Emerald Lake 2 CRB with a 250 GB SSD. Did the same but forced the READ
CAPACITY (10) command to saturate and the code to fall back to READ CAPACITY
(16). Note that this code has not be tested with a real SCSI disk, just the
AHCI code pretending to be a SCSI disk as it historically has.
Change-Id: Ia0ee3fa1264649f25065658d5d368101d39ce614
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/18060
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/scsi.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/scsi.h b/include/scsi.h index b00b517c4b7..cf7c7bc78ae 100644 --- a/include/scsi.h +++ b/include/scsi.h @@ -148,6 +148,8 @@ typedef struct SCSI_cmd_block{ #define SCSI_READ6 0x08 /* Read 6-byte (MANDATORY) */ #define SCSI_READ10 0x28 /* Read 10-byte (MANDATORY) */ #define SCSI_RD_CAPAC 0x25 /* Read Capacity (MANDATORY) */ +#define SCSI_RD_CAPAC10 SCSI_RD_CAPAC /* Read Capacity (10) */ +#define SCSI_RD_CAPAC16 0x9e /* Read Capacity (16) */ #define SCSI_RD_DEFECT 0x37 /* Read Defect Data (O) */ #define SCSI_READ_LONG 0x3E /* Read Long (O) */ #define SCSI_REASS_BLK 0x07 /* Reassign Blocks (O) */ |