aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/storage/scsiglue.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/storage/scsiglue.c b/drivers/usb/storage/scsiglue.c
index e5e6df39e737..aadc16b5eed7 100644
--- a/drivers/usb/storage/scsiglue.c
+++ b/drivers/usb/storage/scsiglue.c
@@ -134,14 +134,14 @@ static int slave_configure(struct scsi_device *sdev)
134 if (us->fflags & US_FL_MAX_SECTORS_MIN) 134 if (us->fflags & US_FL_MAX_SECTORS_MIN)
135 max_sectors = PAGE_CACHE_SIZE >> 9; 135 max_sectors = PAGE_CACHE_SIZE >> 9;
136 if (queue_max_sectors(sdev->request_queue) > max_sectors) 136 if (queue_max_sectors(sdev->request_queue) > max_sectors)
137 blk_queue_max_sectors(sdev->request_queue, 137 blk_queue_max_hw_sectors(sdev->request_queue,
138 max_sectors); 138 max_sectors);
139 } else if (sdev->type == TYPE_TAPE) { 139 } else if (sdev->type == TYPE_TAPE) {
140 /* Tapes need much higher max_sector limits, so just 140 /* Tapes need much higher max_sector limits, so just
141 * raise it to the maximum possible (4 GB / 512) and 141 * raise it to the maximum possible (4 GB / 512) and
142 * let the queue segment size sort out the real limit. 142 * let the queue segment size sort out the real limit.
143 */ 143 */
144 blk_queue_max_sectors(sdev->request_queue, 0x7FFFFF); 144 blk_queue_max_hw_sectors(sdev->request_queue, 0x7FFFFF);
145 } 145 }
146 146
147 /* Some USB host controllers can't do DMA; they have to use PIO. 147 /* Some USB host controllers can't do DMA; they have to use PIO.
@@ -495,7 +495,7 @@ static ssize_t store_max_sectors(struct device *dev, struct device_attribute *at
495 unsigned short ms; 495 unsigned short ms;
496 496
497 if (sscanf(buf, "%hu", &ms) > 0 && ms <= SCSI_DEFAULT_MAX_SECTORS) { 497 if (sscanf(buf, "%hu", &ms) > 0 && ms <= SCSI_DEFAULT_MAX_SECTORS) {
498 blk_queue_max_sectors(sdev->request_queue, ms); 498 blk_queue_max_hw_sectors(sdev->request_queue, ms);
499 return strlen(buf); 499 return strlen(buf);
500 } 500 }
501 return -EINVAL; 501 return -EINVAL;