mmc: Fix mmc_send_status()
authorMarek Vasut <marek.vasut@gmail.com>
Wed, 10 Aug 2011 07:24:48 +0000 (09:24 +0200)
committerAndy Fleming <afleming@freescale.com>
Sun, 4 Sep 2011 23:03:02 +0000 (18:03 -0500)
The mmc_send_status() function sets cmd.arg = 0. That's incorrect, so fix it.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Acked-by: Andy Fleming <afleming@freescale.com>
Tested-by: Lei Wen <adrian.wenl@gmail.com>
drivers/mmc/mmc.c

index 7e703c0ec6e293bc7ee5e19fcfe622161a7ee934..391bc2bafa0f3393d377425d995ac9939fc1831b 100644 (file)
@@ -115,7 +115,8 @@ int mmc_send_status(struct mmc *mmc, int timeout)
 
        cmd.cmdidx = MMC_CMD_SEND_STATUS;
        cmd.resp_type = MMC_RSP_R1;
-       cmd.cmdarg = 0;
+       if (!mmc_host_is_spi(mmc))
+               cmd.cmdarg = mmc->rca << 16;
        cmd.flags = 0;
 
        do {