diff options
author | Pierre Ossman <drzeus@drzeus.cx> | 2007-07-24 14:38:53 -0400 |
---|---|---|
committer | Pierre Ossman <drzeus@drzeus.cx> | 2007-09-23 03:15:05 -0400 |
commit | 255d01af9a990fd5166f04ed0cc0b30b7b67e81e (patch) | |
tree | 0e88bc62b3e988bb578cf7d2dea80270a6d0a4c1 /drivers/mmc/host | |
parent | b146d26a61e0feab2f12a98ae83fd352830899c0 (diff) |
mmc: remove BYTEBLOCK capability
Remove the BYTEBLOCK capability and let the broken hosts fail the
requests with -EINVAL instead.
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Diffstat (limited to 'drivers/mmc/host')
-rw-r--r-- | drivers/mmc/host/at91_mci.c | 1 | ||||
-rw-r--r-- | drivers/mmc/host/imxmmc.c | 2 | ||||
-rw-r--r-- | drivers/mmc/host/mmci.c | 8 | ||||
-rw-r--r-- | drivers/mmc/host/sdhci.c | 2 | ||||
-rw-r--r-- | drivers/mmc/host/tifm_sd.c | 13 | ||||
-rw-r--r-- | drivers/mmc/host/wbsd.c | 2 |
6 files changed, 21 insertions, 7 deletions
diff --git a/drivers/mmc/host/at91_mci.c b/drivers/mmc/host/at91_mci.c index 810a433ce532..576d7cb0b3ec 100644 --- a/drivers/mmc/host/at91_mci.c +++ b/drivers/mmc/host/at91_mci.c | |||
@@ -834,7 +834,6 @@ static int __init at91_mci_probe(struct platform_device *pdev) | |||
834 | mmc->f_min = 375000; | 834 | mmc->f_min = 375000; |
835 | mmc->f_max = 25000000; | 835 | mmc->f_max = 25000000; |
836 | mmc->ocr_avail = MMC_VDD_32_33 | MMC_VDD_33_34; | 836 | mmc->ocr_avail = MMC_VDD_32_33 | MMC_VDD_33_34; |
837 | mmc->caps = MMC_CAP_BYTEBLOCK; | ||
838 | 837 | ||
839 | mmc->max_blk_size = 4095; | 838 | mmc->max_blk_size = 4095; |
840 | mmc->max_blk_count = mmc->max_req_size; | 839 | mmc->max_blk_count = mmc->max_req_size; |
diff --git a/drivers/mmc/host/imxmmc.c b/drivers/mmc/host/imxmmc.c index 04458c342812..e33c123c7027 100644 --- a/drivers/mmc/host/imxmmc.c +++ b/drivers/mmc/host/imxmmc.c | |||
@@ -963,7 +963,7 @@ static int imxmci_probe(struct platform_device *pdev) | |||
963 | mmc->f_min = 150000; | 963 | mmc->f_min = 150000; |
964 | mmc->f_max = CLK_RATE/2; | 964 | mmc->f_max = CLK_RATE/2; |
965 | mmc->ocr_avail = MMC_VDD_32_33; | 965 | mmc->ocr_avail = MMC_VDD_32_33; |
966 | mmc->caps = MMC_CAP_4_BIT_DATA | MMC_CAP_BYTEBLOCK; | 966 | mmc->caps = MMC_CAP_4_BIT_DATA; |
967 | 967 | ||
968 | /* MMC core transfer sizes tunable parameters */ | 968 | /* MMC core transfer sizes tunable parameters */ |
969 | mmc->max_hw_segs = 64; | 969 | mmc->max_hw_segs = 64; |
diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c index d53e9a8bdaa2..4a72772f4fe4 100644 --- a/drivers/mmc/host/mmci.c +++ b/drivers/mmc/host/mmci.c | |||
@@ -391,6 +391,14 @@ static void mmci_request(struct mmc_host *mmc, struct mmc_request *mrq) | |||
391 | 391 | ||
392 | WARN_ON(host->mrq != NULL); | 392 | WARN_ON(host->mrq != NULL); |
393 | 393 | ||
394 | if (mrq->data && (hweight32(mrq->data->blksz) > 1)) { | ||
395 | printk(KERN_ERR "%s: Unsupported block size (%d bytes)\n", | ||
396 | mmc_hostname(mmc), mrq->data->blksz); | ||
397 | mrq->cmd->error = -EINVAL; | ||
398 | mmc_request_done(mmc, mrq); | ||
399 | return; | ||
400 | } | ||
401 | |||
394 | spin_lock_irq(&host->lock); | 402 | spin_lock_irq(&host->lock); |
395 | 403 | ||
396 | host->mrq = mrq; | 404 | host->mrq = mrq; |
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 479d6a265dd1..c63edc5c17e4 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c | |||
@@ -1309,7 +1309,7 @@ static int __devinit sdhci_probe_slot(struct pci_dev *pdev, int slot) | |||
1309 | mmc->ops = &sdhci_ops; | 1309 | mmc->ops = &sdhci_ops; |
1310 | mmc->f_min = host->max_clk / 256; | 1310 | mmc->f_min = host->max_clk / 256; |
1311 | mmc->f_max = host->max_clk; | 1311 | mmc->f_max = host->max_clk; |
1312 | mmc->caps = MMC_CAP_4_BIT_DATA | MMC_CAP_MULTIWRITE | MMC_CAP_BYTEBLOCK; | 1312 | mmc->caps = MMC_CAP_4_BIT_DATA | MMC_CAP_MULTIWRITE; |
1313 | 1313 | ||
1314 | if (caps & SDHCI_CAN_DO_HISPD) | 1314 | if (caps & SDHCI_CAN_DO_HISPD) |
1315 | mmc->caps |= MMC_CAP_SD_HIGHSPEED; | 1315 | mmc->caps |= MMC_CAP_SD_HIGHSPEED; |
diff --git a/drivers/mmc/host/tifm_sd.c b/drivers/mmc/host/tifm_sd.c index b4a56e5e5132..951392d2ce37 100644 --- a/drivers/mmc/host/tifm_sd.c +++ b/drivers/mmc/host/tifm_sd.c | |||
@@ -626,14 +626,21 @@ static void tifm_sd_request(struct mmc_host *mmc, struct mmc_request *mrq) | |||
626 | 626 | ||
627 | spin_lock_irqsave(&sock->lock, flags); | 627 | spin_lock_irqsave(&sock->lock, flags); |
628 | if (host->eject) { | 628 | if (host->eject) { |
629 | spin_unlock_irqrestore(&sock->lock, flags); | 629 | mrq->cmd->error = -ENOMEDIUM; |
630 | goto err_out; | 630 | goto err_out; |
631 | } | 631 | } |
632 | 632 | ||
633 | if (host->req) { | 633 | if (host->req) { |
634 | printk(KERN_ERR "%s : unfinished request detected\n", | 634 | printk(KERN_ERR "%s : unfinished request detected\n", |
635 | sock->dev.bus_id); | 635 | sock->dev.bus_id); |
636 | spin_unlock_irqrestore(&sock->lock, flags); | 636 | mrq->cmd->error = -ETIMEDOUT; |
637 | goto err_out; | ||
638 | } | ||
639 | |||
640 | if (mrq->data && (hweight32(mrq->data->blksz) > 1)) { | ||
641 | printk(KERN_ERR "%s: Unsupported block size (%d bytes)\n", | ||
642 | sock->dev.bus_id, mrq->data->blksz); | ||
643 | mrq->cmd->error = -EINVAL; | ||
637 | goto err_out; | 644 | goto err_out; |
638 | } | 645 | } |
639 | 646 | ||
@@ -722,7 +729,7 @@ static void tifm_sd_request(struct mmc_host *mmc, struct mmc_request *mrq) | |||
722 | return; | 729 | return; |
723 | 730 | ||
724 | err_out: | 731 | err_out: |
725 | mrq->cmd->error = -ETIMEDOUT; | 732 | spin_unlock_irqrestore(&sock->lock, flags); |
726 | mmc_request_done(mmc, mrq); | 733 | mmc_request_done(mmc, mrq); |
727 | } | 734 | } |
728 | 735 | ||
diff --git a/drivers/mmc/host/wbsd.c b/drivers/mmc/host/wbsd.c index 44968c2279e1..80db11c05f2a 100644 --- a/drivers/mmc/host/wbsd.c +++ b/drivers/mmc/host/wbsd.c | |||
@@ -1219,7 +1219,7 @@ static int __devinit wbsd_alloc_mmc(struct device *dev) | |||
1219 | mmc->f_min = 375000; | 1219 | mmc->f_min = 375000; |
1220 | mmc->f_max = 24000000; | 1220 | mmc->f_max = 24000000; |
1221 | mmc->ocr_avail = MMC_VDD_32_33 | MMC_VDD_33_34; | 1221 | mmc->ocr_avail = MMC_VDD_32_33 | MMC_VDD_33_34; |
1222 | mmc->caps = MMC_CAP_4_BIT_DATA | MMC_CAP_MULTIWRITE | MMC_CAP_BYTEBLOCK; | 1222 | mmc->caps = MMC_CAP_4_BIT_DATA | MMC_CAP_MULTIWRITE; |
1223 | 1223 | ||
1224 | spin_lock_init(&host->lock); | 1224 | spin_lock_init(&host->lock); |
1225 | 1225 | ||