diff options
| -rw-r--r-- | drivers/scsi/sd.c | 2 | ||||
| -rw-r--r-- | drivers/usb/storage/scsiglue.c | 6 | ||||
| -rw-r--r-- | include/scsi/scsi_device.h | 1 |
3 files changed, 9 insertions, 0 deletions
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 6f0a4c612b3b..6f72b80121a0 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c | |||
| @@ -1899,6 +1899,8 @@ static int sd_try_rc16_first(struct scsi_device *sdp) | |||
| 1899 | { | 1899 | { |
| 1900 | if (sdp->host->max_cmd_len < 16) | 1900 | if (sdp->host->max_cmd_len < 16) |
| 1901 | return 0; | 1901 | return 0; |
| 1902 | if (sdp->try_rc_10_first) | ||
| 1903 | return 0; | ||
| 1902 | if (sdp->scsi_level > SCSI_SPC_2) | 1904 | if (sdp->scsi_level > SCSI_SPC_2) |
| 1903 | return 1; | 1905 | return 1; |
| 1904 | if (scsi_device_protection(sdp)) | 1906 | if (scsi_device_protection(sdp)) |
diff --git a/drivers/usb/storage/scsiglue.c b/drivers/usb/storage/scsiglue.c index a324a5d21e99..11418da9bc09 100644 --- a/drivers/usb/storage/scsiglue.c +++ b/drivers/usb/storage/scsiglue.c | |||
| @@ -202,6 +202,12 @@ static int slave_configure(struct scsi_device *sdev) | |||
| 202 | if (us->fflags & US_FL_NO_READ_CAPACITY_16) | 202 | if (us->fflags & US_FL_NO_READ_CAPACITY_16) |
| 203 | sdev->no_read_capacity_16 = 1; | 203 | sdev->no_read_capacity_16 = 1; |
| 204 | 204 | ||
| 205 | /* | ||
| 206 | * Many devices do not respond properly to READ_CAPACITY_16. | ||
| 207 | * Tell the SCSI layer to try READ_CAPACITY_10 first. | ||
| 208 | */ | ||
| 209 | sdev->try_rc_10_first = 1; | ||
| 210 | |||
| 205 | /* assume SPC3 or latter devices support sense size > 18 */ | 211 | /* assume SPC3 or latter devices support sense size > 18 */ |
| 206 | if (sdev->scsi_level > SCSI_SPC_2) | 212 | if (sdev->scsi_level > SCSI_SPC_2) |
| 207 | us->fflags |= US_FL_SANE_SENSE; | 213 | us->fflags |= US_FL_SANE_SENSE; |
diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index 6efb2e1416e0..ba9698852321 100644 --- a/include/scsi/scsi_device.h +++ b/include/scsi/scsi_device.h | |||
| @@ -151,6 +151,7 @@ struct scsi_device { | |||
| 151 | SD_LAST_BUGGY_SECTORS */ | 151 | SD_LAST_BUGGY_SECTORS */ |
| 152 | unsigned no_read_disc_info:1; /* Avoid READ_DISC_INFO cmds */ | 152 | unsigned no_read_disc_info:1; /* Avoid READ_DISC_INFO cmds */ |
| 153 | unsigned no_read_capacity_16:1; /* Avoid READ_CAPACITY_16 cmds */ | 153 | unsigned no_read_capacity_16:1; /* Avoid READ_CAPACITY_16 cmds */ |
| 154 | unsigned try_rc_10_first:1; /* Try READ_CAPACACITY_10 first */ | ||
| 154 | unsigned is_visible:1; /* is the device visible in sysfs */ | 155 | unsigned is_visible:1; /* is the device visible in sysfs */ |
| 155 | 156 | ||
| 156 | DECLARE_BITMAP(supported_events, SDEV_EVT_MAXBITS); /* supported events */ | 157 | DECLARE_BITMAP(supported_events, SDEV_EVT_MAXBITS); /* supported events */ |
