aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/usb/storage/scsiglue.c12
-rw-r--r--drivers/usb/storage/unusual_devs.h7
-rw-r--r--include/linux/usb_usual.h5
3 files changed, 20 insertions, 4 deletions
diff --git a/drivers/usb/storage/scsiglue.c b/drivers/usb/storage/scsiglue.c
index 836a34ae6ec6..7c9593b7b04e 100644
--- a/drivers/usb/storage/scsiglue.c
+++ b/drivers/usb/storage/scsiglue.c
@@ -114,9 +114,15 @@ static int slave_configure(struct scsi_device *sdev)
114 * while others have trouble with more than 64K. At this time we 114 * while others have trouble with more than 64K. At this time we
115 * are limiting both to 32K (64 sectores). 115 * are limiting both to 32K (64 sectores).
116 */ 116 */
117 if ((us->flags & US_FL_MAX_SECTORS_64) && 117 if (us->flags & (US_FL_MAX_SECTORS_64 | US_FL_MAX_SECTORS_MIN)) {
118 sdev->request_queue->max_sectors > 64) 118 unsigned int max_sectors = 64;
119 blk_queue_max_sectors(sdev->request_queue, 64); 119
120 if (us->flags & US_FL_MAX_SECTORS_MIN)
121 max_sectors = PAGE_CACHE_SIZE >> 9;
122 if (sdev->request_queue->max_sectors > max_sectors)
123 blk_queue_max_sectors(sdev->request_queue,
124 max_sectors);
125 }
120 126
121 /* We can't put these settings in slave_alloc() because that gets 127 /* We can't put these settings in slave_alloc() because that gets
122 * called before the device type is known. Consequently these 128 * called before the device type is known. Consequently these
diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h
index 2c27721bd259..7bbfd31a9645 100644
--- a/drivers/usb/storage/unusual_devs.h
+++ b/drivers/usb/storage/unusual_devs.h
@@ -376,6 +376,13 @@ UNUSUAL_DEV( 0x04b0, 0x0417, 0x0100, 0x0100,
376 US_SC_DEVICE, US_PR_DEVICE, NULL, 376 US_SC_DEVICE, US_PR_DEVICE, NULL,
377 US_FL_FIX_CAPACITY), 377 US_FL_FIX_CAPACITY),
378 378
379/* Reported by Doug Maxey (dwm@austin.ibm.com) */
380UNUSUAL_DEV( 0x04b3, 0x4001, 0x0110, 0x0110,
381 "IBM",
382 "IBM RSA2",
383 US_SC_DEVICE, US_PR_CB, NULL,
384 US_FL_MAX_SECTORS_MIN),
385
379/* BENQ DC5330 386/* BENQ DC5330
380 * Reported by Manuel Fombuena <mfombuena@ya.com> and 387 * Reported by Manuel Fombuena <mfombuena@ya.com> and
381 * Frank Copeland <fjc@thingy.apana.org.au> */ 388 * Frank Copeland <fjc@thingy.apana.org.au> */
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 };