aboutsummaryrefslogtreecommitdiff
path: root/drivers/mmc/core/queue.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2019-07-24 17:00:06 +0100
committerMark Brown <broonie@kernel.org>2019-07-24 17:00:06 +0100
commit27988c96687667e74df1a9a3b8662519bc1c29c9 (patch)
tree0aa67d365e8d544bf48a4de9ae94d7f8536de073 /drivers/mmc/core/queue.c
parent8f46e22b5ac692b48d04bb722547ca17b66dda02 (diff)
parent5f9e832c137075045d15cd6899ab0505cfb2ca4b (diff)
Merge tag 'v5.3-rc1' into regulator-5.3
Linus 5.3-rc1
Diffstat (limited to 'drivers/mmc/core/queue.c')
-rw-r--r--drivers/mmc/core/queue.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/drivers/mmc/core/queue.c b/drivers/mmc/core/queue.c
index 92900a095796..e327f80ebe70 100644
--- a/drivers/mmc/core/queue.c
+++ b/drivers/mmc/core/queue.c
@@ -1,11 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (C) 2003 Russell King, All Rights Reserved.
* Copyright 2006-2007 Pierre Ossman
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
*/
#include <linux/slab.h>
#include <linux/module.h>
@@ -354,18 +350,15 @@ static const struct blk_mq_ops mmc_mq_ops = {
static void mmc_setup_queue(struct mmc_queue *mq, struct mmc_card *card)
{
struct mmc_host *host = card->host;
- u64 limit = BLK_BOUNCE_HIGH;
unsigned block_size = 512;
- if (mmc_dev(host)->dma_mask && *mmc_dev(host)->dma_mask)
- limit = (u64)dma_max_pfn(mmc_dev(host)) << PAGE_SHIFT;
-
blk_queue_flag_set(QUEUE_FLAG_NONROT, mq->queue);
blk_queue_flag_clear(QUEUE_FLAG_ADD_RANDOM, mq->queue);
if (mmc_can_erase(card))
mmc_queue_setup_discard(mq->queue, card);
- blk_queue_bounce_limit(mq->queue, limit);
+ if (!mmc_dev(host)->dma_mask || !*mmc_dev(host)->dma_mask)
+ blk_queue_bounce_limit(mq->queue, BLK_BOUNCE_HIGH);
blk_queue_max_hw_sectors(mq->queue,
min(host->max_blk_count, host->max_req_size / 512));
blk_queue_max_segments(mq->queue, host->max_segs);