mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-11-01 02:21:16 +00:00
Merge "mmc: sdhci: Fix issue with SDHCI_NEEDS_RETUNING"
This commit is contained in:
commit
8630a48bb7
1 changed files with 9 additions and 2 deletions
|
@ -1735,6 +1735,7 @@ static void sdhci_request(struct mmc_host *mmc, struct mmc_request *mrq)
|
|||
MMC_SEND_TUNING_BLOCK_HS200 :
|
||||
MMC_SEND_TUNING_BLOCK;
|
||||
host->mrq = NULL;
|
||||
host->flags &= ~SDHCI_NEEDS_RETUNING;
|
||||
spin_unlock_irqrestore(&host->lock, flags);
|
||||
sdhci_execute_tuning(mmc, tuning_opcode);
|
||||
spin_lock_irqsave(&host->lock, flags);
|
||||
|
@ -2774,6 +2775,7 @@ static void sdhci_tuning_timer(unsigned long data)
|
|||
static void sdhci_cmd_irq(struct sdhci_host *host, u32 intmask)
|
||||
{
|
||||
u16 auto_cmd_status;
|
||||
u32 command;
|
||||
BUG_ON(intmask == 0);
|
||||
|
||||
if (!host->cmd) {
|
||||
|
@ -2805,8 +2807,13 @@ static void sdhci_cmd_irq(struct sdhci_host *host, u32 intmask)
|
|||
}
|
||||
|
||||
if (host->cmd->error) {
|
||||
if (host->cmd->error == -EILSEQ)
|
||||
host->flags |= SDHCI_NEEDS_RETUNING;
|
||||
command = SDHCI_GET_CMD(sdhci_readw(host,
|
||||
SDHCI_COMMAND));
|
||||
if (host->cmd->error == -EILSEQ &&
|
||||
(command != MMC_SEND_TUNING_BLOCK_HS400) &&
|
||||
(command != MMC_SEND_TUNING_BLOCK_HS200) &&
|
||||
(command != MMC_SEND_TUNING_BLOCK))
|
||||
host->flags |= SDHCI_NEEDS_RETUNING;
|
||||
tasklet_schedule(&host->finish_tasklet);
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue