Skip to content

Commit 23c3e29

Browse files
Hans de GoedeJames Bottomley
authored andcommitted
[SCSI] usbstorage: use last_sector_bug flag universally
This patch sets the last_sector_bug flag to 1 for all USB disks. This is needed to makes the cardreader on various HP multifunction printers work. Since the performance impact is negible we set this flag for all USB disks to avoid an unusual_devs.h nightmare. Signed-off-by: Hans de Goede <[email protected]> Acked-by: Matthew Dharm <[email protected]> Signed-off-by: James Bottomley <[email protected]>
1 parent 366ca51 commit 23c3e29

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/usb/storage/scsiglue.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,10 @@ static int slave_configure(struct scsi_device *sdev)
187187
* automatically, requiring a START-STOP UNIT command. */
188188
sdev->allow_restart = 1;
189189

190+
/* Some USB cardreaders have trouble reading an sdcard's last
191+
* sector in a larger then 1 sector read, since the performance
192+
* impact is negible we set this flag for all USB disks */
193+
sdev->last_sector_bug = 1;
190194
} else {
191195

192196
/* Non-disk-type devices don't need to blacklist any pages

0 commit comments

Comments
 (0)