aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/storage/scsiglue.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/storage/scsiglue.c')
-rw-r--r--drivers/usb/storage/scsiglue.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/usb/storage/scsiglue.c b/drivers/usb/storage/scsiglue.c
index e9d6c196a7ab..8d78084abf9f 100644
--- a/drivers/usb/storage/scsiglue.c
+++ b/drivers/usb/storage/scsiglue.c
@@ -208,6 +208,14 @@ static int slave_configure(struct scsi_device *sdev)
208 * sector in a larger then 1 sector read, since the performance 208 * sector in a larger then 1 sector read, since the performance
209 * impact is negible we set this flag for all USB disks */ 209 * impact is negible we set this flag for all USB disks */
210 sdev->last_sector_bug = 1; 210 sdev->last_sector_bug = 1;
211
212 /* Enable last-sector hacks for single-target devices using
213 * the Bulk-only transport, unless we already know the
214 * capacity will be decremented or is correct. */
215 if (!(us->fflags & (US_FL_FIX_CAPACITY | US_FL_CAPACITY_OK |
216 US_FL_SCM_MULT_TARG)) &&
217 us->protocol == US_PR_BULK)
218 us->use_last_sector_hacks = 1;
211 } else { 219 } else {
212 220
213 /* Non-disk-type devices don't need to blacklist any pages 221 /* Non-disk-type devices don't need to blacklist any pages