Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b2670b1c6ddd54be4a0f72f853122510ea5ef285
Commit:     b2670b1c6ddd54be4a0f72f853122510ea5ef285
Parent:     da7fbe58d2d347e95af699ddf04d885be6362bbe
Author:     Pierre Ossman <[EMAIL PROTECTED]>
AuthorDate: Tue May 1 13:35:19 2007 +0200
Committer:  Pierre Ossman <[EMAIL PROTECTED]>
CommitDate: Tue May 1 13:35:19 2007 +0200

    wbsd: check for data opcode earlier
    
    Move the check for supported data opcodes to the beginning of the
    request function to avoid wedging the card.
    
    Signed-off-by: Pierre Ossman <[EMAIL PROTECTED]>
---
 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 9f7518b..867ca6a 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)
                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.
                 */
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to