mmc: au1xmmc: return errors for unknown response types
authorManuel Lauss <mano@roarinelk.homelinux.net>
Thu, 25 Jan 2007 09:27:41 +0000 (10:27 +0100)
committerPierre Ossman <drzeus@drzeus.cx>
Sun, 4 Feb 2007 19:54:06 +0000 (20:54 +0100)
au1xmmc: return error when encountering unhandled/unknown response type.

Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
drivers/mmc/au1xmmc.c

index 212e41f78df490f3d8848c46d1d8fab75e8cef7c..6d6fe6e6d4151fb0e111a87865ecb5e8ebefe53e 100644 (file)
@@ -194,6 +194,8 @@ static int au1xmmc_send_command(struct au1xmmc_host *host, int wait,
        u32 mmccmd = (cmd->opcode << SD_CMD_CI_SHIFT);
 
        switch (mmc_resp_type(cmd)) {
+       case MMC_RSP_NONE:
+               break;
        case MMC_RSP_R1:
                mmccmd |= SD_CMD_RT_1;
                break;
@@ -206,6 +208,10 @@ static int au1xmmc_send_command(struct au1xmmc_host *host, int wait,
        case MMC_RSP_R3:
                mmccmd |= SD_CMD_RT_3;
                break;
+       default:
+               printk(KERN_INFO "au1xmmc: unhandled response type %02x\n",
+                       mmc_resp_type(cmd));
+               return MMC_ERR_INVALID;
        }
 
        switch(cmd->opcode) {