Message ID | CAPDyKFr56_8chuuva0dgA5uD3z-366R4wVoy9uvoim1CFiiRwA@mail.gmail.com |
---|---|
State | New |
Headers | show |
On 23 December 2014 at 10:49, Jaehoon Chung <jh80.chung@samsung.com> wrote: > Hi. Ulf. > > Your patch has bug.. > If last sample value is failed, then it's returned with error. > > I will recommend this. how about? > > drivers/mmc/host/dw_mmc-exynos.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/mmc/host/dw_mmc-exynos.c b/drivers/mmc/host/dw_mmc-exynos.c > index d0d7aec..d6b8846 100644 > --- a/drivers/mmc/host/dw_mmc-exynos.c > +++ b/drivers/mmc/host/dw_mmc-exynos.c > @@ -381,7 +381,7 @@ static int dw_mci_exynos_execute_tuning(struct dw_mci_slot *slot) > struct mmc_host *mmc = slot->mmc; > u8 start_smpl, smpl, candiates = 0; > s8 found = -1; > - int ret = 0; > + int ret = 0, success; > > start_smpl = dw_mci_exynos_get_clksmpl(host); > > @@ -389,8 +389,8 @@ static int dw_mci_exynos_execute_tuning(struct dw_mci_slot *slot) > mci_writel(host, TMOUT, ~0); > smpl = dw_mci_exynos_move_next_clksmpl(host); > > - ret = mmc_send_tuning(mmc); > - if (!ret) > + success = mmc_send_tuning(mmc); > + if (!success) > candiates |= (1 << smpl); > > } while (start_smpl != smpl); > -- > 1.9.1 > Urgh! Thanks a lot for spotting this Jaehoon! I will update my patch according to your proposal. Sorry for all the noise I caused around this. Kind regards Uffe -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index a1b80e5..976382db 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c @@ -314,7 +314,9 @@ static u32 dw_mci_prep_stop_abort(struct dw_mci *host, struct mmc_command *cmd) if (cmdr == MMC_READ_SINGLE_BLOCK || cmdr == MMC_READ_MULTIPLE_BLOCK || cmdr == MMC_WRITE_BLOCK || - cmdr == MMC_WRITE_MULTIPLE_BLOCK) { + cmdr == MMC_WRITE_MULTIPLE_BLOCK || + cmdr == MMC_SEND_TUNING_BLOCK || + cmdr == MMC_SEND_TUNING_BLOCK_HS200) { stop->opcode = MMC_STOP_TRANSMISSION; stop->arg = 0;