Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 311336
b: refs/heads/master
c: 6a0bdff
h: refs/heads/master
v: v3
  • Loading branch information
Alan Stern authored and Greg Kroah-Hartman committed Jun 23, 2012
1 parent 60620eb commit c8f6128
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1e2c4e59d2b8797973471b4a287a43eac12a0f40
refs/heads/master: 6a0bdffa0073857870a4ed1b4489762146359eb4
2 changes: 2 additions & 0 deletions trunk/drivers/scsi/sd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1899,6 +1899,8 @@ static int sd_try_rc16_first(struct scsi_device *sdp)
{
if (sdp->host->max_cmd_len < 16)
return 0;
if (sdp->try_rc_10_first)
return 0;
if (sdp->scsi_level > SCSI_SPC_2)
return 1;
if (scsi_device_protection(sdp))
Expand Down
6 changes: 6 additions & 0 deletions trunk/drivers/usb/storage/scsiglue.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,12 @@ static int slave_configure(struct scsi_device *sdev)
if (us->fflags & US_FL_NO_READ_CAPACITY_16)
sdev->no_read_capacity_16 = 1;

/*
* Many devices do not respond properly to READ_CAPACITY_16.
* Tell the SCSI layer to try READ_CAPACITY_10 first.
*/
sdev->try_rc_10_first = 1;

/* assume SPC3 or latter devices support sense size > 18 */
if (sdev->scsi_level > SCSI_SPC_2)
us->fflags |= US_FL_SANE_SENSE;
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 @@ -151,6 +151,7 @@ struct scsi_device {
SD_LAST_BUGGY_SECTORS */
unsigned no_read_disc_info:1; /* Avoid READ_DISC_INFO cmds */
unsigned no_read_capacity_16:1; /* Avoid READ_CAPACITY_16 cmds */
unsigned try_rc_10_first:1; /* Try READ_CAPACACITY_10 first */
unsigned is_visible:1; /* is the device visible in sysfs */

DECLARE_BITMAP(supported_events, SDEV_EVT_MAXBITS); /* supported events */
Expand Down

0 comments on commit c8f6128

Please sign in to comment.