diff options
Diffstat (limited to 'drivers/mmc/host')
-rw-r--r-- | drivers/mmc/host/wbsd.c | 41 |
1 files changed, 20 insertions, 21 deletions
diff --git a/drivers/mmc/host/wbsd.c b/drivers/mmc/host/wbsd.c index 9f7518b37c33..867ca6a69298 100644 --- a/drivers/mmc/host/wbsd.c +++ b/drivers/mmc/host/wbsd.c | |||
@@ -788,24 +788,7 @@ static void wbsd_request(struct mmc_host *mmc, struct mmc_request *mrq) | |||
788 | goto done; | 788 | goto done; |
789 | } | 789 | } |
790 | 790 | ||
791 | /* | ||
792 | * Does the request include data? | ||
793 | */ | ||
794 | if (cmd->data) { | 791 | if (cmd->data) { |
795 | wbsd_prepare_data(host, cmd->data); | ||
796 | |||
797 | if (cmd->data->error != MMC_ERR_NONE) | ||
798 | goto done; | ||
799 | } | ||
800 | |||
801 | wbsd_send_command(host, cmd); | ||
802 | |||
803 | /* | ||
804 | * If this is a data transfer the request | ||
805 | * will be finished after the data has | ||
806 | * transfered. | ||
807 | */ | ||
808 | if (cmd->data && (cmd->error == MMC_ERR_NONE)) { | ||
809 | /* | 792 | /* |
810 | * The hardware is so delightfully stupid that it has a list | 793 | * The hardware is so delightfully stupid that it has a list |
811 | * of "data" commands. If a command isn't on this list, it'll | 794 | * of "data" commands. If a command isn't on this list, it'll |
@@ -837,14 +820,30 @@ static void wbsd_request(struct mmc_host *mmc, struct mmc_request *mrq) | |||
837 | "supported by this controller.\n", | 820 | "supported by this controller.\n", |
838 | mmc_hostname(host->mmc), cmd->opcode); | 821 | mmc_hostname(host->mmc), cmd->opcode); |
839 | #endif | 822 | #endif |
840 | cmd->data->error = MMC_ERR_INVALID; | 823 | cmd->error = MMC_ERR_INVALID; |
841 | |||
842 | if (cmd->data->stop) | ||
843 | wbsd_send_command(host, cmd->data->stop); | ||
844 | 824 | ||
845 | goto done; | 825 | goto done; |
846 | }; | 826 | }; |
827 | } | ||
847 | 828 | ||
829 | /* | ||
830 | * Does the request include data? | ||
831 | */ | ||
832 | if (cmd->data) { | ||
833 | wbsd_prepare_data(host, cmd->data); | ||
834 | |||
835 | if (cmd->data->error != MMC_ERR_NONE) | ||
836 | goto done; | ||
837 | } | ||
838 | |||
839 | wbsd_send_command(host, cmd); | ||
840 | |||
841 | /* | ||
842 | * If this is a data transfer the request | ||
843 | * will be finished after the data has | ||
844 | * transfered. | ||
845 | */ | ||
846 | if (cmd->data && (cmd->error == MMC_ERR_NONE)) { | ||
848 | /* | 847 | /* |
849 | * Dirty fix for hardware bug. | 848 | * Dirty fix for hardware bug. |
850 | */ | 849 | */ |