summaryrefslogtreecommitdiff
path: root/packages/linux/linux-2.6.24/cm-x270/0003-mmcsd_large_cards-r0.patch
blob: ed80fc1db11c0053263ef196827444b65eb9dfff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
From 549141e199a0ff0d2d6b12668da23581b4467aae Mon Sep 17 00:00:00 2001
From: Cliff Brake <cbrake@happy.dev.bec-systems.com>
Date: Fri, 20 Jul 2007 19:02:55 -0400
Subject: [PATCH] mmcsd_large_cards-r0

---
 drivers/mmc/card/block.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
index aeb32a9..d854b0c 100644
--- a/drivers/mmc/card/block.c
+++ b/drivers/mmc/card/block.c
@@ -423,6 +423,7 @@ static struct mmc_blk_data *mmc_blk_alloc(struct mmc_card *card)
 {
 	struct mmc_blk_data *md;
 	int devidx, ret;
+	unsigned long cap;
 
 	devidx = find_first_zero_bit(dev_use, MMC_NUM_MINORS);
 	if (devidx >= MMC_NUM_MINORS)
@@ -486,6 +487,11 @@ static struct mmc_blk_data *mmc_blk_alloc(struct mmc_card *card)
 
 	sprintf(md->disk->disk_name, "mmcblk%d", devidx);
 
+	if (card->csd.read_blkbits > 9)
+		md->block_bits = 9;
+	else
+		md->block_bits = card->csd.read_blkbits;
+
 	blk_queue_hardsect_size(md->queue.queue, 1 << md->block_bits);
 
 	if (!mmc_card_sd(card) && mmc_card_blockaddr(card)) {
-- 
1.5.4.rc4