浏览代码

[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 <j.w.r.degoede@hhs.nl>
Acked-by: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Hans de Goede 18 年之前
父节点
当前提交
23c3e290fb
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      drivers/usb/storage/scsiglue.c

+ 4 - 0
drivers/usb/storage/scsiglue.c

@@ -187,6 +187,10 @@ static int slave_configure(struct scsi_device *sdev)
 		 * automatically, requiring a START-STOP UNIT command. */
 		 * automatically, requiring a START-STOP UNIT command. */
 		sdev->allow_restart = 1;
 		sdev->allow_restart = 1;
 
 
+		/* Some USB cardreaders have trouble reading an sdcard's last
+		 * sector in a larger then 1 sector read, since the performance
+		 * impact is negible we set this flag for all USB disks */
+		sdev->last_sector_bug = 1;
 	} else {
 	} else {
 
 
 		/* Non-disk-type devices don't need to blacklist any pages
 		/* Non-disk-type devices don't need to blacklist any pages