diff options
Diffstat (limited to 'drivers/mmc/card/queue.c')
-rw-r--r-- | drivers/mmc/card/queue.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/mmc/card/queue.c b/drivers/mmc/card/queue.c index c07322c2658..6413afa318d 100644 --- a/drivers/mmc/card/queue.c +++ b/drivers/mmc/card/queue.c | |||
@@ -106,10 +106,12 @@ static void mmc_request(struct request_queue *q) | |||
106 | * @mq: mmc queue | 106 | * @mq: mmc queue |
107 | * @card: mmc card to attach this queue | 107 | * @card: mmc card to attach this queue |
108 | * @lock: queue lock | 108 | * @lock: queue lock |
109 | * @subname: partition subname | ||
109 | * | 110 | * |
110 | * Initialise a MMC card request queue. | 111 | * Initialise a MMC card request queue. |
111 | */ | 112 | */ |
112 | int mmc_init_queue(struct mmc_queue *mq, struct mmc_card *card, spinlock_t *lock) | 113 | int mmc_init_queue(struct mmc_queue *mq, struct mmc_card *card, |
114 | spinlock_t *lock, const char *subname) | ||
113 | { | 115 | { |
114 | struct mmc_host *host = card->host; | 116 | struct mmc_host *host = card->host; |
115 | u64 limit = BLK_BOUNCE_HIGH; | 117 | u64 limit = BLK_BOUNCE_HIGH; |
@@ -133,12 +135,7 @@ int mmc_init_queue(struct mmc_queue *mq, struct mmc_card *card, spinlock_t *lock | |||
133 | mq->queue->limits.max_discard_sectors = UINT_MAX; | 135 | mq->queue->limits.max_discard_sectors = UINT_MAX; |
134 | if (card->erased_byte == 0) | 136 | if (card->erased_byte == 0) |
135 | mq->queue->limits.discard_zeroes_data = 1; | 137 | mq->queue->limits.discard_zeroes_data = 1; |
136 | if (!mmc_can_trim(card) && is_power_of_2(card->erase_size)) { | 138 | mq->queue->limits.discard_granularity = card->pref_erase << 9; |
137 | mq->queue->limits.discard_granularity = | ||
138 | card->erase_size << 9; | ||
139 | mq->queue->limits.discard_alignment = | ||
140 | card->erase_size << 9; | ||
141 | } | ||
142 | if (mmc_can_secure_erase_trim(card)) | 139 | if (mmc_can_secure_erase_trim(card)) |
143 | queue_flag_set_unlocked(QUEUE_FLAG_SECDISCARD, | 140 | queue_flag_set_unlocked(QUEUE_FLAG_SECDISCARD, |
144 | mq->queue); | 141 | mq->queue); |
@@ -209,8 +206,8 @@ int mmc_init_queue(struct mmc_queue *mq, struct mmc_card *card, spinlock_t *lock | |||
209 | 206 | ||
210 | sema_init(&mq->thread_sem, 1); | 207 | sema_init(&mq->thread_sem, 1); |
211 | 208 | ||
212 | mq->thread = kthread_run(mmc_queue_thread, mq, "mmcqd/%d", | 209 | mq->thread = kthread_run(mmc_queue_thread, mq, "mmcqd/%d%s", |
213 | host->index); | 210 | host->index, subname ? subname : ""); |
214 | 211 | ||
215 | if (IS_ERR(mq->thread)) { | 212 | if (IS_ERR(mq->thread)) { |
216 | ret = PTR_ERR(mq->thread); | 213 | ret = PTR_ERR(mq->thread); |