Loading drivers/mmc/host/sdhci.c +31 −29 Original line number Diff line number Diff line Loading @@ -2833,6 +2833,37 @@ static bool sdhci_request_done(struct sdhci_host *host) return true; } /* * The controller needs a reset of internal state machines * upon error conditions. */ if (sdhci_needs_reset(host, mrq)) { /* * Do not finish until command and data lines are available for * reset. Note there can only be one other mrq, so it cannot * also be in mrqs_done, otherwise host->cmd and host->data_cmd * would both be null. */ if (host->cmd || host->data_cmd) { spin_unlock_irqrestore(&host->lock, flags); return true; } /* Some controllers need this kick or reset won't work here */ if (host->quirks & SDHCI_QUIRK_CLOCK_BEFORE_RESET) /* This is to force an update */ host->ops->set_clock(host, host->clock); /* * Spec says we should do both at the same time, but Ricoh * controllers do not like that. */ sdhci_do_reset(host, SDHCI_RESET_CMD); sdhci_do_reset(host, SDHCI_RESET_DATA); host->pending_reset = false; } /* * Always unmap the data buffers if they were mapped by * sdhci_prepare_data() whenever we finish with a request. Loading Loading @@ -2885,35 +2916,6 @@ static bool sdhci_request_done(struct sdhci_host *host) } } /* * The controller needs a reset of internal state machines * upon error conditions. */ if (sdhci_needs_reset(host, mrq)) { /* * Do not finish until command and data lines are available for * reset. Note there can only be one other mrq, so it cannot * also be in mrqs_done, otherwise host->cmd and host->data_cmd * would both be null. */ if (host->cmd || host->data_cmd) { spin_unlock_irqrestore(&host->lock, flags); return true; } /* Some controllers need this kick or reset won't work here */ if (host->quirks & SDHCI_QUIRK_CLOCK_BEFORE_RESET) /* This is to force an update */ host->ops->set_clock(host, host->clock); /* Spec says we should do both at the same time, but Ricoh controllers do not like that. */ sdhci_do_reset(host, SDHCI_RESET_CMD); sdhci_do_reset(host, SDHCI_RESET_DATA); host->pending_reset = false; } host->mrqs_done[i] = NULL; spin_unlock_irqrestore(&host->lock, flags); Loading Loading
drivers/mmc/host/sdhci.c +31 −29 Original line number Diff line number Diff line Loading @@ -2833,6 +2833,37 @@ static bool sdhci_request_done(struct sdhci_host *host) return true; } /* * The controller needs a reset of internal state machines * upon error conditions. */ if (sdhci_needs_reset(host, mrq)) { /* * Do not finish until command and data lines are available for * reset. Note there can only be one other mrq, so it cannot * also be in mrqs_done, otherwise host->cmd and host->data_cmd * would both be null. */ if (host->cmd || host->data_cmd) { spin_unlock_irqrestore(&host->lock, flags); return true; } /* Some controllers need this kick or reset won't work here */ if (host->quirks & SDHCI_QUIRK_CLOCK_BEFORE_RESET) /* This is to force an update */ host->ops->set_clock(host, host->clock); /* * Spec says we should do both at the same time, but Ricoh * controllers do not like that. */ sdhci_do_reset(host, SDHCI_RESET_CMD); sdhci_do_reset(host, SDHCI_RESET_DATA); host->pending_reset = false; } /* * Always unmap the data buffers if they were mapped by * sdhci_prepare_data() whenever we finish with a request. Loading Loading @@ -2885,35 +2916,6 @@ static bool sdhci_request_done(struct sdhci_host *host) } } /* * The controller needs a reset of internal state machines * upon error conditions. */ if (sdhci_needs_reset(host, mrq)) { /* * Do not finish until command and data lines are available for * reset. Note there can only be one other mrq, so it cannot * also be in mrqs_done, otherwise host->cmd and host->data_cmd * would both be null. */ if (host->cmd || host->data_cmd) { spin_unlock_irqrestore(&host->lock, flags); return true; } /* Some controllers need this kick or reset won't work here */ if (host->quirks & SDHCI_QUIRK_CLOCK_BEFORE_RESET) /* This is to force an update */ host->ops->set_clock(host, host->clock); /* Spec says we should do both at the same time, but Ricoh controllers do not like that. */ sdhci_do_reset(host, SDHCI_RESET_CMD); sdhci_do_reset(host, SDHCI_RESET_DATA); host->pending_reset = false; } host->mrqs_done[i] = NULL; spin_unlock_irqrestore(&host->lock, flags); Loading