Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1464970
| From | Adrian Hunter <adrian.hunter@intel.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] mmc: core: need retune if error value is -EIO |
| Date | 2016-08-18 09:30 +0200 |
| Message-ID | <s7pW1-4X1-9@gated-at.bofh.it> (permalink) |
| References | <s2mm5-6tE-9@gated-at.bofh.it> |
| Organization | Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki |
On 04/08/16 11:30, Shawn Lin wrote: > We need to do retune if receiving -EIO, otherwise we > could see debug dump like: > > [ 89.057226] bcmsdh_sdmmc: Failed to Read byte F1:@0x1001f=ff, Err: -5 > [ 89.058811] bcmsdh_sdmmc: Failed to Read byte F1:@0x1001f=ff, Err: -5 > [ 89.059415] bcmsdh_sdmmc: Failed to Read byte F1:@0x1000e=ff, Err: -84 > [ 89.254248] dwmmc_rockchip fe310000.dwmmc: Successfully tuned phase to 199 > [ 89.273912] dhd_set_suspend: Remove extra suspend setting > [ 89.274478] dhd_enable_packet_filter: enter, value = 0 > 64 bytes from 112.90.83.112: icmp_seq=24 ttl=53 time=1321 ms > 64 bytes from 112.90.83.112: icmp_seq=25 ttl=53 time=319 ms > 64 bytes from 112.90.83.112: icmp_seq=26 ttl=53 time=69.8 ms > 64 bytes from 112.90.83.112: icmp_seq=27 ttl=53 time=37.5 ms > ... > > In this case we see dw_mmc finally enter retune process, but > if this patch is applied, we could save more time to make it > work. Also many host drivers will generate -EIO, so this patch > can also prevent them from failing to enter retune process. The current logic is re-tune on CRC errors. -EIO isn't informative and drivers can use it for cases that clearly are not related to tuning. A driver can call mmc_retune_needed() itself in other cases. > > Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> > --- > > drivers/mmc/core/core.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c > index e55cde6..18d0af5 100644 > --- a/drivers/mmc/core/core.c > +++ b/drivers/mmc/core/core.c > @@ -133,7 +133,8 @@ void mmc_request_done(struct mmc_host *host, struct mmc_request *mrq) > /* Flag re-tuning needed on CRC errors */ > if ((cmd->opcode != MMC_SEND_TUNING_BLOCK && > cmd->opcode != MMC_SEND_TUNING_BLOCK_HS200) && > - (err == -EILSEQ || (mrq->sbc && mrq->sbc->error == -EILSEQ) || > + (err == -EILSEQ || err == -EIO || > + (mrq->sbc && mrq->sbc->error == -EILSEQ) || > (mrq->data && mrq->data->error == -EILSEQ) || > (mrq->stop && mrq->stop->error == -EILSEQ))) > mmc_retune_needed(host); >
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
Re: [PATCH] mmc: core: need retune if error value is -EIO Adrian Hunter <adrian.hunter@intel.com> - 2016-08-18 09:30 +0200
Re: [PATCH] mmc: core: need retune if error value is -EIO Shawn Lin <shawn.lin@rock-chips.com> - 2016-08-18 10:20 +0200
Re: [PATCH] mmc: core: need retune if error value is -EIO Adrian Hunter <adrian.hunter@intel.com> - 2016-08-18 10:50 +0200
csiph-web