Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=be0192aae1aed3fbf172e3f9a22ec75392c1b175
Commit:     be0192aae1aed3fbf172e3f9a22ec75392c1b175
Parent:     255d01af9a990fd5166f04ed0cc0b30b7b67e81e
Author:     Pierre Ossman <[EMAIL PROTECTED]>
AuthorDate: Tue Jul 24 21:11:47 2007 +0200
Committer:  Pierre Ossman <[EMAIL PROTECTED]>
CommitDate: Sun Sep 23 09:15:12 2007 +0200

    mmc: remove confusing flag
    
    The MMC_DATA_MULTI flag never had a proper definition of what it
    means, so remove it and let the drivers check the block count in
    the request.
    
    Signed-off-by: Pierre Ossman <[EMAIL PROTECTED]>
---
 drivers/mmc/card/block.c    |    1 -
 drivers/mmc/host/at91_mci.c |    4 ++--
 drivers/mmc/host/au1xmmc.c  |   26 ++++++++++++++------------
 include/linux/mmc/core.h    |    1 -
 4 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
index 9abf29f..ab51068 100644
--- a/drivers/mmc/card/block.c
+++ b/drivers/mmc/card/block.c
@@ -241,7 +241,6 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct 
request *req)
                        brq.data.blocks = 1;
 
                if (brq.data.blocks > 1) {
-                       brq.data.flags |= MMC_DATA_MULTI;
                        brq.mrq.stop = &brq.stop;
                        readcmd = MMC_READ_MULTIPLE_BLOCK;
                        writecmd = MMC_WRITE_MULTIPLE_BLOCK;
diff --git a/drivers/mmc/host/at91_mci.c b/drivers/mmc/host/at91_mci.c
index 576d7cb..8ec3178 100644
--- a/drivers/mmc/host/at91_mci.c
+++ b/drivers/mmc/host/at91_mci.c
@@ -328,7 +328,7 @@ static void at91_mci_handle_transmitted(struct at91mci_host 
*host)
        data = cmd->data;
        if (!data) return;
 
-       if (cmd->data->flags & MMC_DATA_MULTI) {
+       if (cmd->data->blocks > 1) {
                pr_debug("multiple write : wait for BLKE...\n");
                at91_mci_write(host, AT91_MCI_IER, AT91_MCI_BLKE);
        } else
@@ -439,7 +439,7 @@ static void at91_mci_send_command(struct at91mci_host 
*host, struct mmc_command
 
                if (data->flags & MMC_DATA_STREAM)
                        cmdr |= AT91_MCI_TRTYP_STREAM;
-               if (data->flags & MMC_DATA_MULTI)
+               if (data->blocks > 1)
                        cmdr |= AT91_MCI_TRTYP_MULTIPLE;
        }
        else {
diff --git a/drivers/mmc/host/au1xmmc.c b/drivers/mmc/host/au1xmmc.c
index 49b0367..92c4d0d 100644
--- a/drivers/mmc/host/au1xmmc.c
+++ b/drivers/mmc/host/au1xmmc.c
@@ -186,7 +186,7 @@ static void au1xmmc_tasklet_finish(unsigned long param)
 }
 
 static int au1xmmc_send_command(struct au1xmmc_host *host, int wait,
-                               struct mmc_command *cmd, unsigned int flags)
+                               struct mmc_command *cmd, struct mmc_data *data)
 {
        u32 mmccmd = (cmd->opcode << SD_CMD_CI_SHIFT);
 
@@ -211,16 +211,18 @@ static int au1xmmc_send_command(struct au1xmmc_host 
*host, int wait,
                return -EINVAL;
        }
 
-       if (flags & MMC_DATA_READ) {
-               if (flags & MMC_DATA_MULTI)
-                       mmccmd |= SD_CMD_CT_4;
-               else
-                       mmccmd |= SD_CMD_CT_2;
-       } else if (flags & MMC_DATA_WRITE) {
-               if (flags & MMC_DATA_MULTI)
-                       mmccmd |= SD_CMD_CT_3;
-               else
-                       mmccmd |= SD_CMD_CT_1;
+       if (data) {
+               if (flags & MMC_DATA_READ) {
+                       if (data->blocks > 1)
+                               mmccmd |= SD_CMD_CT_4;
+                       else
+                               mmccmd |= SD_CMD_CT_2;
+               } else if (flags & MMC_DATA_WRITE) {
+                       if (data->blocks > 1)
+                               mmccmd |= SD_CMD_CT_3;
+                       else
+                               mmccmd |= SD_CMD_CT_1;
+               }
        }
 
        au_writel(cmd->arg, HOST_CMDARG(host));
@@ -673,7 +675,7 @@ static void au1xmmc_request(struct mmc_host* mmc, struct 
mmc_request* mrq)
        }
 
        if (!ret)
-               ret = au1xmmc_send_command(host, 0, mrq->cmd, flags);
+               ret = au1xmmc_send_command(host, 0, mrq->cmd, mrq->data);
 
        if (ret) {
                mrq->cmd->error = ret;
diff --git a/include/linux/mmc/core.h b/include/linux/mmc/core.h
index 2a03f8b..29c98ae 100644
--- a/include/linux/mmc/core.h
+++ b/include/linux/mmc/core.h
@@ -83,7 +83,6 @@ struct mmc_data {
 #define MMC_DATA_WRITE (1 << 8)
 #define MMC_DATA_READ  (1 << 9)
 #define MMC_DATA_STREAM        (1 << 10)
-#define MMC_DATA_MULTI (1 << 11)
 
        unsigned int            bytes_xfered;
 
-
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