On Wed, Jul 31, 2013 at 04:21:44PM +0800, Haijun Zhang wrote: > When command with busy flags send and also data busy end interrupt > will be generate, the command will be finished when data transfer > complete or data busy state end, Sometimes this will expend more than > 10*Hz time to finish this command, so we should wait longer to detect > command complete timeout err. > > Signed-off-by: Haijun Zhang <Haijun.Zhang@xxxxxxxxxxxxx> > --- > drivers/mmc/host/sdhci.c | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > > diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c > index a78bd4f..7b89ed6 100644 > --- a/drivers/mmc/host/sdhci.c > +++ b/drivers/mmc/host/sdhci.c > @@ -986,6 +986,7 @@ static void sdhci_send_command(struct sdhci_host *host, struct mmc_command *cmd) > int flags; > u32 mask; > unsigned long timeout; > + u32 timer = 10; > > WARN_ON(host->cmd); > > @@ -1014,6 +1015,17 @@ static void sdhci_send_command(struct sdhci_host *host, struct mmc_command *cmd) > mdelay(1); > } > > + /* > + * When send a commmand with busy state and also the data busy end > + * interrupt can be generate, the command will be finished when date > + * transfer complete or busy state end. Sometimes this will expend > + * more than 10*HZ, In this case whe should wait longer to detect > + * command complete timeout err. > + */ > + if ((host->cmd->flags & MMC_RSP_BUSY) && > + !(host->quirks & SDHCI_QUIRK_NO_BUSY_IRQ)) > + timer = 1000; > + This code effectively does nothing... you never use the newly introduced 'timer' variable. > mod_timer(&host->timer, jiffies + 10 * HZ); > > host->cmd = cmd; > -- > 1.8.0 -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html