aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/storage/scsiglue.c
diff options
context:
space:
mode:
authorMartin K. Petersen <martin.petersen@oracle.com>2010-02-26 00:20:38 -0500
committerJens Axboe <jens.axboe@oracle.com>2010-02-26 07:58:08 -0500
commit086fa5ff0854c676ec333760f4c0154b3b242616 (patch)
treeee63fb3c7c7d964bd799355b7cde18ba95f91f07 /drivers/usb/storage/scsiglue.c
parenteb28d31bc97e6374d81f404da309401ffaed467b (diff)
block: Rename blk_queue_max_sectors to blk_queue_max_hw_sectors
The block layer calling convention is blk_queue_<limit name>. blk_queue_max_sectors predates this practice, leading to some confusion. Rename the function to appropriately reflect that its intended use is to set max_hw_sectors. Also introduce a temporary wrapper for backwards compability. This can be removed after the merge window is closed. Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'drivers/usb/storage/scsiglue.c')
-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;