From 33abc04f0420dceed0ebc2d1094019d3bb2b5c29 Mon Sep 17 00:00:00 2001 From: Doug Maxey Date: Wed, 5 Dec 2007 23:36:45 -0600 Subject: 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 Cc: Alan Stern Cc: Pete Zaitcev Signed-off-by: Doug Maxey Signed-off-by: Greg Kroah-Hartman --- include/linux/usb_usual.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/linux/usb_usual.h b/include/linux/usb_usual.h index 1b792b9..a417b09 100644 --- a/include/linux/usb_usual.h +++ b/include/linux/usb_usual.h @@ -48,7 +48,10 @@ US_FLAG(IGNORE_DEVICE, 0x00000800) \ /* Don't claim device */ \ US_FLAG(CAPACITY_HEURISTICS, 0x00001000) \ - /* sometimes sizes is too big */ + /* sometimes sizes is too big */ \ + US_FLAG(MAX_SECTORS_MIN,0x00002000) \ + /* Sets max_sectors to arch min */ + #define US_FLAG(name, value) US_FL_##name = value , enum { US_DO_ALL_FLAGS }; -- cgit v1.1 From f88ed90d8627d0d3d93b330d6d2012c2934fb54e Mon Sep 17 00:00:00 2001 From: Randy Dunlap Date: Mon, 3 Dec 2007 14:14:16 -0800 Subject: usb.h: fix kernel-doc warning Fix kernel-doc warning in usb.h: Warning(linux-2.6.24-rc3-git7//include/linux/usb.h:166): No description found for parameter 'sysfs_files_created' Signed-off-by: Randy Dunlap Signed-off-by: Greg Kroah-Hartman --- include/linux/usb.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/linux/usb.h b/include/linux/usb.h index 416ee76..5fc8ff7 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h @@ -107,6 +107,7 @@ enum usb_interface_condition { * @condition: binding state of the interface: not bound, binding * (in probe()), bound to a driver, or unbinding (in disconnect()) * @is_active: flag set when the interface is bound and not suspended. + * @sysfs_files_created: sysfs attributes exist * @needs_remote_wakeup: flag set when the driver requires remote-wakeup * capability during autosuspend. * @dev: driver model's view of this device -- cgit v1.1