aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorDoug Maxey <dwm@enoyolf.org>2007-12-06 00:36:45 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2007-12-17 13:47:14 -0500
commit33abc04f0420dceed0ebc2d1094019d3bb2b5c29 (patch)
tree87d8e2c7cf41d6afed4d75c2e3ef113b506541ab /include/linux
parentb9e13ac30f850313be9232497ff98e90c43bc6b6 (diff)
usb-storage: Fix devices that cannot handle 32k transfers
When a device cannot handle the smallest previously limited transfer size (64 blocks) without stalling, limit the device to the amount of packets that fit in a platform native page. The lowest possible limit is PAGE_CACHE_SIZE, so if the device is ever used on a platform that has larger than 8K pages, you lose unless you can convince the device firmware folks to fix the issue. Cc: Mathew Dharm <mdharm-scsi@one-eyed-alien.net> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Pete Zaitcev <zaitcev@redhat.com> Signed-off-by: Doug Maxey <dwm@austin.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/usb_usual.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/usb_usual.h b/include/linux/usb_usual.h
index 1b792b9286ba..a417b09b8b3d 100644
--- a/include/linux/usb_usual.h
+++ b/include/linux/usb_usual.h
@@ -48,7 +48,10 @@
48 US_FLAG(IGNORE_DEVICE, 0x00000800) \ 48 US_FLAG(IGNORE_DEVICE, 0x00000800) \
49 /* Don't claim device */ \ 49 /* Don't claim device */ \
50 US_FLAG(CAPACITY_HEURISTICS, 0x00001000) \ 50 US_FLAG(CAPACITY_HEURISTICS, 0x00001000) \
51 /* sometimes sizes is too big */ 51 /* sometimes sizes is too big */ \
52 US_FLAG(MAX_SECTORS_MIN,0x00002000) \
53 /* Sets max_sectors to arch min */
54
52 55
53#define US_FLAG(name, value) US_FL_##name = value , 56#define US_FLAG(name, value) US_FL_##name = value ,
54enum { US_DO_ALL_FLAGS }; 57enum { US_DO_ALL_FLAGS };