Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 343727
b: refs/heads/master
c: 53ad570
h: refs/heads/master
i:
  343725: 4985791
  343723: 2204391
  343719: d7ac7e0
  343711: 3a92176
v: v3
  • Loading branch information
Jason J. Herne authored and James Bottomley committed Nov 27, 2012
1 parent b13009a commit 342cbc5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0b4334473d48aa18e8448f9f718f1dcd0398c550
refs/heads/master: 53ad570be625045aba3ae7de8d82401364c655e1
4 changes: 3 additions & 1 deletion trunk/drivers/scsi/sd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1011,7 +1011,7 @@ static int sd_prep_fn(struct request_queue *q, struct request *rq)
SCpnt->cmnd[29] = (unsigned char) (this_count >> 16) & 0xff;
SCpnt->cmnd[30] = (unsigned char) (this_count >> 8) & 0xff;
SCpnt->cmnd[31] = (unsigned char) this_count & 0xff;
} else if (block > 0xffffffff) {
} else if (sdp->use_16_for_rw) {
SCpnt->cmnd[0] += READ_16 - READ_6;
SCpnt->cmnd[1] = protect | ((rq->cmd_flags & REQ_FUA) ? 0x8 : 0);
SCpnt->cmnd[2] = sizeof(block) > 4 ? (unsigned char) (block >> 56) & 0xff : 0;
Expand Down Expand Up @@ -2203,6 +2203,8 @@ sd_read_capacity(struct scsi_disk *sdkp, unsigned char *buffer)
}
}

sdp->use_16_for_rw = (sdkp->capacity > 0xffffffff);

/* Rescale capacity to 512-byte units */
if (sector_size == 4096)
sdkp->capacity <<= 3;
Expand Down
1 change: 1 addition & 0 deletions trunk/include/scsi/scsi_device.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ struct scsi_device {
unsigned use_10_for_ms:1; /* first try 10-byte mode sense/select */
unsigned no_report_opcodes:1; /* no REPORT SUPPORTED OPERATION CODES */
unsigned no_write_same:1; /* no WRITE SAME command */
unsigned use_16_for_rw:1; /* Use read/write(16) over read/write(10) */
unsigned skip_ms_page_8:1; /* do not use MODE SENSE page 0x08 */
unsigned skip_ms_page_3f:1; /* do not use MODE SENSE page 0x3f */
unsigned skip_vpd_pages:1; /* do not read VPD pages */
Expand Down

0 comments on commit 342cbc5

Please sign in to comment.