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/tifm_sd.c | |
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/tifm_sd.c')
-rw-r--r-- | drivers/mmc/host/tifm_sd.c | 13 |
1 files changed, 10 insertions, 3 deletions
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 | ||