|
@@ -114,9 +114,15 @@ static int slave_configure(struct scsi_device *sdev)
|
|
|
* while others have trouble with more than 64K. At this time we
|
|
|
* are limiting both to 32K (64 sectores).
|
|
|
*/
|
|
|
- if ((us->flags & US_FL_MAX_SECTORS_64) &&
|
|
|
- sdev->request_queue->max_sectors > 64)
|
|
|
- blk_queue_max_sectors(sdev->request_queue, 64);
|
|
|
+ if (us->flags & (US_FL_MAX_SECTORS_64 | US_FL_MAX_SECTORS_MIN)) {
|
|
|
+ unsigned int max_sectors = 64;
|
|
|
+
|
|
|
+ if (us->flags & US_FL_MAX_SECTORS_MIN)
|
|
|
+ max_sectors = PAGE_CACHE_SIZE >> 9;
|
|
|
+ if (sdev->request_queue->max_sectors > max_sectors)
|
|
|
+ blk_queue_max_sectors(sdev->request_queue,
|
|
|
+ max_sectors);
|
|
|
+ }
|
|
|
|
|
|
/* We can't put these settings in slave_alloc() because that gets
|
|
|
* called before the device type is known. Consequently these
|