From df92bbefe77f12413e30974cc584d5bf635c7d02 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Tue, 1 May 2007 13:35:19 +0200 Subject: [PATCH] --- yaml --- r: 53581 b: refs/heads/master c: b2670b1c6ddd54be4a0f72f853122510ea5ef285 h: refs/heads/master i: 53579: 6fd6efbc7446cac6f12bb2faac8d8161fccbd30c v: v3 --- [refs] | 2 +- trunk/drivers/mmc/host/wbsd.c | 41 +++++++++++++++++------------------ 2 files changed, 21 insertions(+), 22 deletions(-) diff --git a/[refs] b/[refs] index 56664af9b355..a4fbb104716b 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: da7fbe58d2d347e95af699ddf04d885be6362bbe +refs/heads/master: b2670b1c6ddd54be4a0f72f853122510ea5ef285 diff --git a/trunk/drivers/mmc/host/wbsd.c b/trunk/drivers/mmc/host/wbsd.c index 9f7518b37c33..867ca6a69298 100644 --- a/trunk/drivers/mmc/host/wbsd.c +++ b/trunk/drivers/mmc/host/wbsd.c @@ -788,24 +788,7 @@ static void wbsd_request(struct mmc_host *mmc, struct mmc_request *mrq) goto done; } - /* - * Does the request include data? - */ if (cmd->data) { - wbsd_prepare_data(host, cmd->data); - - if (cmd->data->error != MMC_ERR_NONE) - goto done; - } - - wbsd_send_command(host, cmd); - - /* - * If this is a data transfer the request - * will be finished after the data has - * transfered. - */ - if (cmd->data && (cmd->error == MMC_ERR_NONE)) { /* * The hardware is so delightfully stupid that it has a list * 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) "supported by this controller.\n", mmc_hostname(host->mmc), cmd->opcode); #endif - cmd->data->error = MMC_ERR_INVALID; - - if (cmd->data->stop) - wbsd_send_command(host, cmd->data->stop); + cmd->error = MMC_ERR_INVALID; goto done; }; + } + /* + * Does the request include data? + */ + if (cmd->data) { + wbsd_prepare_data(host, cmd->data); + + if (cmd->data->error != MMC_ERR_NONE) + goto done; + } + + wbsd_send_command(host, cmd); + + /* + * If this is a data transfer the request + * will be finished after the data has + * transfered. + */ + if (cmd->data && (cmd->error == MMC_ERR_NONE)) { /* * Dirty fix for hardware bug. */