aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/scsi/sd.c4
-rw-r--r--include/scsi/scsi_device.h1
2 files changed, 4 insertions, 1 deletions
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index a45e12ac7e28..c5a189c50286 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -1011,7 +1011,7 @@ static int sd_prep_fn(struct request_queue *q, struct request *rq)
1011 SCpnt->cmnd[29] = (unsigned char) (this_count >> 16) & 0xff; 1011 SCpnt->cmnd[29] = (unsigned char) (this_count >> 16) & 0xff;
1012 SCpnt->cmnd[30] = (unsigned char) (this_count >> 8) & 0xff; 1012 SCpnt->cmnd[30] = (unsigned char) (this_count >> 8) & 0xff;
1013 SCpnt->cmnd[31] = (unsigned char) this_count & 0xff; 1013 SCpnt->cmnd[31] = (unsigned char) this_count & 0xff;
1014 } else if (block > 0xffffffff) { 1014 } else if (sdp->use_16_for_rw) {
1015 SCpnt->cmnd[0] += READ_16 - READ_6; 1015 SCpnt->cmnd[0] += READ_16 - READ_6;
1016 SCpnt->cmnd[1] = protect | ((rq->cmd_flags & REQ_FUA) ? 0x8 : 0); 1016 SCpnt->cmnd[1] = protect | ((rq->cmd_flags & REQ_FUA) ? 0x8 : 0);
1017 SCpnt->cmnd[2] = sizeof(block) > 4 ? (unsigned char) (block >> 56) & 0xff : 0; 1017 SCpnt->cmnd[2] = sizeof(block) > 4 ? (unsigned char) (block >> 56) & 0xff : 0;
@@ -2203,6 +2203,8 @@ got_data:
2203 } 2203 }
2204 } 2204 }
2205 2205
2206 sdp->use_16_for_rw = (sdkp->capacity > 0xffffffff);
2207
2206 /* Rescale capacity to 512-byte units */ 2208 /* Rescale capacity to 512-byte units */
2207 if (sector_size == 4096) 2209 if (sector_size == 4096)
2208 sdkp->capacity <<= 3; 2210 sdkp->capacity <<= 3;
diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h
index 55367b04dc94..e65c62e82c5a 100644
--- a/include/scsi/scsi_device.h
+++ b/include/scsi/scsi_device.h
@@ -137,6 +137,7 @@ struct scsi_device {
137 unsigned use_10_for_ms:1; /* first try 10-byte mode sense/select */ 137 unsigned use_10_for_ms:1; /* first try 10-byte mode sense/select */
138 unsigned no_report_opcodes:1; /* no REPORT SUPPORTED OPERATION CODES */ 138 unsigned no_report_opcodes:1; /* no REPORT SUPPORTED OPERATION CODES */
139 unsigned no_write_same:1; /* no WRITE SAME command */ 139 unsigned no_write_same:1; /* no WRITE SAME command */
140 unsigned use_16_for_rw:1; /* Use read/write(16) over read/write(10) */
140 unsigned skip_ms_page_8:1; /* do not use MODE SENSE page 0x08 */ 141 unsigned skip_ms_page_8:1; /* do not use MODE SENSE page 0x08 */
141 unsigned skip_ms_page_3f:1; /* do not use MODE SENSE page 0x3f */ 142 unsigned skip_ms_page_3f:1; /* do not use MODE SENSE page 0x3f */
142 unsigned skip_vpd_pages:1; /* do not read VPD pages */ 143 unsigned skip_vpd_pages:1; /* do not read VPD pages */