linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* PATCH: usb-storage-set-last-sector-bug-flag.patch
@ 2008-01-20 10:27 Hans de Goede
  2008-01-20 20:56 ` Greg KH
       [not found] ` <47932211.90105-fbo2DhPpy/Q@public.gmane.org>
  0 siblings, 2 replies; 15+ messages in thread
From: Hans de Goede @ 2008-01-20 10:27 UTC (permalink / raw)
  To: Matthew Dharm
  Cc: James Bottomley, Boaz Harrosh, USB Storage list,
	USB development list, David Brown,
	linux-scsi-u79uwXL29TY76Z2rM5mHXA,
	linux-usb-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 491 bytes --]

Hi all,

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.

Note that this patch depends on:
PATCH: scsi-sd-last-sector-bug-flag.patch

Which actually adds this flag to the scsi subsystem.

Signed-off-by: Hans de Goede <j.w.r.degoede-fbo2DhPpy/Q@public.gmane.org>

Regards,

Hans

[-- Attachment #2: usb-storage-set-last-sector-bug-flag.patch --]
[-- Type: text/x-patch, Size: 1106 bytes --]

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.

Note that this patch depends on:
PATCH: scsi-sd-last-sector-bug-flag.patch

Which actually adds this flag to the scsi subsystem.

Signed-off-by: Hans de Goede <j.w.r.degoede-fbo2DhPpy/Q@public.gmane.org>
--- vanilla-2.6.24-rc7/drivers/usb/storage/scsiglue.c.psc1350	2008-01-11 19:40:31.000000000 +0100
+++ vanilla-2.6.24-rc7/drivers/usb/storage/scsiglue.c	2008-01-20 11:18:38.000000000 +0100
@@ -187,6 +187,10 @@ static int slave_configure(struct scsi_d
 		 * 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

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2008-01-25 19:23 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-20 10:27 PATCH: usb-storage-set-last-sector-bug-flag.patch Hans de Goede
2008-01-20 20:56 ` Greg KH
     [not found]   ` <20080120205625.GB28842-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2008-01-20 21:03     ` James Bottomley
     [not found]       ` <1200863008.3105.30.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2008-01-20 21:25         ` Hans de Goede
2008-01-20 21:39         ` [usb-storage] " Guillaume Bedot
2008-01-20 21:45     ` Alan Stern
2008-01-23 18:12       ` Greg KH
     [not found]         ` <20080123181239.GA21836-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2008-01-23 18:39           ` James Bottomley
2008-01-23 18:50             ` Greg KH
2008-01-24 17:07         ` Stefan Richter
2008-01-24 17:21           ` Greg KH
2008-01-25 17:12             ` James Bottomley
2008-01-25 19:23               ` Matthew Dharm
     [not found]           ` <4798C5B4.1000208-MtYdepGKPcBMYopoZt5u/LNAH6kLmebB@public.gmane.org>
2008-01-24 17:22             ` Stefan Richter
     [not found] ` <47932211.90105-fbo2DhPpy/Q@public.gmane.org>
2008-01-22  8:26   ` [usb-storage] " Guillaume Bedot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).