diff options
author | Douglas Gilbert <dgilbert@interlog.com> | 2014-08-05 06:21:53 -0400 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2014-09-16 12:09:51 -0400 |
commit | e46b0344be9b50e8254ddd74e3c5b439d5fca3ce (patch) | |
tree | 76ade0c095546ee1da8bb98ce049899c5f741747 /drivers/scsi/scsi_debug.c | |
parent | cd62b7dae245dd3bb3a21eaadcf01d93ec4fcc7c (diff) |
scsi_debug: bump inquiry version to SPC-4, update version descriptors
Since a lot of functionality from SPC-4 is supported by this
driver (e.g. LBP and PI) then bump the default INQUIRY version
from SPC-3 to SPC-4. Also update the INQUIRY version
descriptors.
Signed-off-by: Douglas Gilbert <dgilbert@interlog.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/scsi/scsi_debug.c')
-rw-r--r-- | drivers/scsi/scsi_debug.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c index 693f2fa327ee..1c475e9a46ab 100644 --- a/drivers/scsi/scsi_debug.c +++ b/drivers/scsi/scsi_debug.c | |||
@@ -123,7 +123,7 @@ static const char *scsi_debug_version_date = "20140706"; | |||
123 | #define DEF_PHYSBLK_EXP 0 | 123 | #define DEF_PHYSBLK_EXP 0 |
124 | #define DEF_PTYPE 0 | 124 | #define DEF_PTYPE 0 |
125 | #define DEF_REMOVABLE false | 125 | #define DEF_REMOVABLE false |
126 | #define DEF_SCSI_LEVEL 5 /* INQUIRY, byte2 [5->SPC-3] */ | 126 | #define DEF_SCSI_LEVEL 6 /* INQUIRY, byte2 [6->SPC-4] */ |
127 | #define DEF_SECTOR_SIZE 512 | 127 | #define DEF_SECTOR_SIZE 512 |
128 | #define DEF_TAGGED_QUEUING 0 /* 0 | MSG_SIMPLE_TAG | MSG_ORDERED_TAG */ | 128 | #define DEF_TAGGED_QUEUING 0 /* 0 | MSG_SIMPLE_TAG | MSG_ORDERED_TAG */ |
129 | #define DEF_UNMAP_ALIGNMENT 0 | 129 | #define DEF_UNMAP_ALIGNMENT 0 |
@@ -1056,15 +1056,15 @@ static int resp_inquiry(struct scsi_cmnd *scp, int target, | |||
1056 | memcpy(&arr[16], inq_product_id, 16); | 1056 | memcpy(&arr[16], inq_product_id, 16); |
1057 | memcpy(&arr[32], inq_product_rev, 4); | 1057 | memcpy(&arr[32], inq_product_rev, 4); |
1058 | /* version descriptors (2 bytes each) follow */ | 1058 | /* version descriptors (2 bytes each) follow */ |
1059 | arr[58] = 0x0; arr[59] = 0x77; /* SAM-3 ANSI */ | 1059 | arr[58] = 0x0; arr[59] = 0xa2; /* SAM-5 rev 4 */ |
1060 | arr[60] = 0x3; arr[61] = 0x14; /* SPC-3 ANSI */ | 1060 | arr[60] = 0x4; arr[61] = 0x68; /* SPC-4 rev 37 */ |
1061 | n = 62; | 1061 | n = 62; |
1062 | if (scsi_debug_ptype == 0) { | 1062 | if (scsi_debug_ptype == 0) { |
1063 | arr[n++] = 0x3; arr[n++] = 0x3d; /* SBC-2 ANSI */ | 1063 | arr[n++] = 0x4; arr[n++] = 0xc5; /* SBC-4 rev 36 */ |
1064 | } else if (scsi_debug_ptype == 1) { | 1064 | } else if (scsi_debug_ptype == 1) { |
1065 | arr[n++] = 0x3; arr[n++] = 0x60; /* SSC-2 no version */ | 1065 | arr[n++] = 0x5; arr[n++] = 0x25; /* SSC-4 rev 3 */ |
1066 | } | 1066 | } |
1067 | arr[n++] = 0xc; arr[n++] = 0xf; /* SAS-1.1 rev 10 */ | 1067 | arr[n++] = 0x20; arr[n++] = 0xe6; /* SPL-3 rev 7 */ |
1068 | ret = fill_from_dev_buffer(scp, arr, | 1068 | ret = fill_from_dev_buffer(scp, arr, |
1069 | min(alloc_len, SDEBUG_LONG_INQ_SZ)); | 1069 | min(alloc_len, SDEBUG_LONG_INQ_SZ)); |
1070 | kfree(arr); | 1070 | kfree(arr); |
@@ -3205,7 +3205,7 @@ MODULE_PARM_DESC(opts, "1->noise, 2->medium_err, 4->timeout, 8->recovered_err... | |||
3205 | MODULE_PARM_DESC(physblk_exp, "physical block exponent (def=0)"); | 3205 | MODULE_PARM_DESC(physblk_exp, "physical block exponent (def=0)"); |
3206 | MODULE_PARM_DESC(ptype, "SCSI peripheral type(def=0[disk])"); | 3206 | MODULE_PARM_DESC(ptype, "SCSI peripheral type(def=0[disk])"); |
3207 | MODULE_PARM_DESC(removable, "claim to have removable media (def=0)"); | 3207 | MODULE_PARM_DESC(removable, "claim to have removable media (def=0)"); |
3208 | MODULE_PARM_DESC(scsi_level, "SCSI level to simulate(def=5[SPC-3])"); | 3208 | MODULE_PARM_DESC(scsi_level, "SCSI level to simulate(def=6[SPC-4])"); |
3209 | MODULE_PARM_DESC(sector_size, "logical block size in bytes (def=512)"); | 3209 | MODULE_PARM_DESC(sector_size, "logical block size in bytes (def=512)"); |
3210 | MODULE_PARM_DESC(unmap_alignment, "lowest aligned thin provisioning lba (def=0)"); | 3210 | MODULE_PARM_DESC(unmap_alignment, "lowest aligned thin provisioning lba (def=0)"); |
3211 | MODULE_PARM_DESC(unmap_granularity, "thin provisioning granularity in blocks (def=1)"); | 3211 | MODULE_PARM_DESC(unmap_granularity, "thin provisioning granularity in blocks (def=1)"); |