diff options
author | Martin K. Petersen <martin.petersen@oracle.com> | 2009-06-03 03:33:18 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2009-06-03 03:33:18 -0400 |
commit | a05c0205ba031c01bba33a21bf0a35920eb64833 (patch) | |
tree | 517c7682fc415cdb122ee7fcfc75eff674cc7b78 /block | |
parent | dbdc9dd342f0a7e32f40f0d4ade662bdfe057484 (diff) |
block: Fix bounce limit setting in DM
blk_queue_bounce_limit() is more than a wrapper about the request queue
limits.bounce_pfn variable. Introduce blk_queue_bounce_pfn() which can
be called by stacking drivers that wish to set the bounce limit
explicitly.
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'block')
-rw-r--r-- | block/blk-settings.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/block/blk-settings.c b/block/blk-settings.c index 8d3393492891..9acd0b7e802a 100644 --- a/block/blk-settings.c +++ b/block/blk-settings.c | |||
@@ -194,6 +194,23 @@ void blk_queue_bounce_limit(struct request_queue *q, u64 dma_mask) | |||
194 | EXPORT_SYMBOL(blk_queue_bounce_limit); | 194 | EXPORT_SYMBOL(blk_queue_bounce_limit); |
195 | 195 | ||
196 | /** | 196 | /** |
197 | * blk_queue_bounce_pfn - set the bounce buffer limit for queue | ||
198 | * @q: the request queue for the device | ||
199 | * @pfn: max address | ||
200 | * | ||
201 | * Description: | ||
202 | * This function is similar to blk_queue_bounce_limit except it | ||
203 | * neither changes allocation flags, nor does it set up the ISA DMA | ||
204 | * pool. This function should only be used by stacking drivers. | ||
205 | * Hardware drivers should use blk_queue_bounce_limit instead. | ||
206 | */ | ||
207 | void blk_queue_bounce_pfn(struct request_queue *q, u64 pfn) | ||
208 | { | ||
209 | q->limits.bounce_pfn = pfn; | ||
210 | } | ||
211 | EXPORT_SYMBOL(blk_queue_bounce_pfn); | ||
212 | |||
213 | /** | ||
197 | * blk_queue_max_sectors - set max sectors for a request for this queue | 214 | * blk_queue_max_sectors - set max sectors for a request for this queue |
198 | * @q: the request queue for the device | 215 | * @q: the request queue for the device |
199 | * @max_sectors: max sectors in the usual 512b unit | 216 | * @max_sectors: max sectors in the usual 512b unit |