mmc: core: Add TRANsfer state to non-HPI state
authorVenkatraman S <svenkatr@ti.com>
Tue, 7 Aug 2012 13:54:45 +0000 (19:24 +0530)
committerChris Ball <cjb@laptop.org>
Tue, 4 Sep 2012 17:58:20 +0000 (13:58 -0400)
HPI can be issued only in programming state to bring the card to
transfer state. If the card is already in transfer state, doing
a HPI is redundant.
Fix this by adding transfer state to the list of exceptions to
doing HPI and return without error.

Signed-off-by: Venkatraman S <svenkatr@ti.com>
Acked-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
drivers/mmc/core/core.c

index 8ac5246e2ab2bc85a6ba82ee0a0eab732130fdf6..835c9f001a10e0beea374a5f37bcc7ec1a369292 100644 (file)
@@ -424,8 +424,9 @@ int mmc_interrupt_hpi(struct mmc_card *card)
        case R1_STATE_IDLE:
        case R1_STATE_READY:
        case R1_STATE_STBY:
+       case R1_STATE_TRAN:
                /*
-                * In idle states, HPI is not needed and the caller
+                * In idle and transfer states, HPI is not needed and the caller
                 * can issue the next intended command immediately
                 */
                goto out;