mod_timer(&host->timer, timeout);
host->cmd = cmd;
- host->busy_handle = 0;
if (cmd->data || cmd->flags & MMC_RSP_BUSY) {
WARN_ON(host->data_cmd);
host->data_cmd = cmd;
if (cmd->data) {
DBG("Cannot wait for busy signal when also doing a data transfer");
} else if (!(host->quirks & SDHCI_QUIRK_NO_BUSY_IRQ) &&
- !host->busy_handle) {
- /* Mark that command complete before busy is ended */
- host->busy_handle = 1;
+ cmd == host->data_cmd) {
+ /* Command complete before busy is ended */
return;
}
}
* before the command completed, so make
* sure we do things in the proper order.
*/
- if (host->busy_handle)
- tasklet_schedule(&host->finish_tasklet);
- else
- host->busy_handle = 1;
+ if (host->cmd == data_cmd)
+ return;
+
+ tasklet_schedule(&host->finish_tasklet);
return;
}
}
struct mmc_command *data_cmd; /* Current data command */
struct mmc_data *data; /* Current data request */
unsigned int data_early:1; /* Data finished before cmd */
- unsigned int busy_handle:1; /* Handling the order of Busy-end */
struct sg_mapping_iter sg_miter; /* SG state for PIO */
unsigned int blocks; /* remaining PIO blocks */