From 00988a3514bbc0cce781c067cf52559741d88b80 Mon Sep 17 00:00:00 2001 From: "Mike Miller (OS Dev)" Date: Sat, 30 Sep 2006 23:27:23 -0700 Subject: [PATCH] cciss: support for >2TB logical volumes Add support for logical volumes >2TB. All SAS/SATA controllers support large volumes. Signed-off-by: Mike Miller Cc: Jens Axboe Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/block/cciss_cmd.h | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) (limited to 'drivers/block/cciss_cmd.h') diff --git a/drivers/block/cciss_cmd.h b/drivers/block/cciss_cmd.h index 53fea549ba8..4af7c4c0c7a 100644 --- a/drivers/block/cciss_cmd.h +++ b/drivers/block/cciss_cmd.h @@ -118,11 +118,34 @@ typedef struct _ReadCapdata_struct BYTE block_size[4]; // Size of blocks in bytes } ReadCapdata_struct; -// 12 byte commands not implemented in firmware yet. -// #define CCISS_READ 0xa8 // Read(12) -// #define CCISS_WRITE 0xaa // Write(12) - #define CCISS_READ 0x28 // Read(10) - #define CCISS_WRITE 0x2a // Write(10) +#define CCISS_READ_CAPACITY_16 0x9e /* Read Capacity 16 */ + +/* service action to differentiate a 16 byte read capacity from + other commands that use the 0x9e SCSI op code */ + +#define CCISS_READ_CAPACITY_16_SERVICE_ACT 0x10 + +typedef struct _ReadCapdata_struct_16 +{ + BYTE total_size[8]; /* Total size in blocks */ + BYTE block_size[4]; /* Size of blocks in bytes */ + BYTE prot_en:1; /* protection enable bit */ + BYTE rto_en:1; /* reference tag own enable bit */ + BYTE reserved:6; /* reserved bits */ + BYTE reserved2[18]; /* reserved bytes per spec */ +} ReadCapdata_struct_16; + +/* Define the supported read/write commands for cciss based controllers */ + +#define CCISS_READ_10 0x28 /* Read(10) */ +#define CCISS_WRITE_10 0x2a /* Write(10) */ +#define CCISS_READ_16 0x88 /* Read(16) */ +#define CCISS_WRITE_16 0x8a /* Write(16) */ + +/* Define the CDB lengths supported by cciss based controllers */ + +#define CDB_LEN10 10 +#define CDB_LEN16 16 // BMIC commands #define BMIC_READ 0x26 -- cgit v1.2.3