Skip to content

Commit

Permalink
[SCSI] usbstorage: use last_sector_bug flag universally
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Hans de Goede authored and James Bottomley committed Jan 25, 2008
1 parent 366ca51 commit 23c3e29
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/usb/storage/scsiglue.c
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,10 @@ static int slave_configure(struct scsi_device *sdev)
* automatically, requiring a START-STOP UNIT command. */
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 {

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

0 comments on commit 23c3e29

Please sign in to comment.