RE: [PATCH] mmc: core: sdio: hold retuning if sdio in 1-bit mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: Adrian Hunter <adrian.hunter@xxxxxxxxx>
> Sent: 2023年9月4日 16:12
> To: Bough Chen <haibo.chen@xxxxxxx>; ulf.hansson@xxxxxxxxxx;
> linux-mmc@xxxxxxxxxxxxxxx
> Cc: dl-linux-imx <linux-imx@xxxxxxx>; hkallweit1@xxxxxxxxx
> Subject: Re: [PATCH] mmc: core: sdio: hold retuning if sdio in 1-bit mode
> 
> On 30/08/23 12:39, haibo.chen@xxxxxxx wrote:
> > From: Haibo Chen <haibo.chen@xxxxxxx>
> >
> > tuning only support in 4-bit mode or 8 bit mode, so in 1-bit mode,
> > need to hold retuning.
> >
> > Find this issue when use manual tuning method on imx93. When system
> > resume back, SDIO WIFI try to switch back to 4 bit mode, first will
> > trigger retuning, and all tuning command failed.
> >
> > Signed-off-by: Haibo Chen <haibo.chen@xxxxxxx>
> 
> UHS-I is also not meant for 1-bit mode, but I guess switching modes in this case
> is also risky.
> 
> Acked-by: Adrian Hunter <adrian.hunter@xxxxxxxxx>
> 
> Fixes tag?

Fixes: 6b5eda369ac3 ("sdio: put active devices into 1-bit mode during suspend")

Not sure whether this is the correct fix tag, since this commit come from year 2010, at that time, re-tuning do not exist.

mmc_retune_hold_now() involve in 2017, from this commit: bf517d6fec71 ("mmc: core: Add mmc_retune_hold_now()),
mmc_retune logic involve in 2015, from this commit: dfa13ebbe334 ("mmc: host: Add facility to support re-tuning")

maybe use this: Fixes: dfa13ebbe334 ("mmc: host: Add facility to support re-tuning") ?

Best Regards
Haibo Chen

> 
> > ---
> >  drivers/mmc/core/sdio.c | 8 +++++++-
> >  1 file changed, 7 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c index
> > f64b9ac76a5c..5914516df2f7 100644
> > --- a/drivers/mmc/core/sdio.c
> > +++ b/drivers/mmc/core/sdio.c
> > @@ -1089,8 +1089,14 @@ static int mmc_sdio_resume(struct mmc_host
> *host)
> >  		}
> >  		err = mmc_sdio_reinit_card(host);
> >  	} else if (mmc_card_wake_sdio_irq(host)) {
> > -		/* We may have switched to 1-bit mode during suspend */
> > +		/*
> > +		 * We may have switched to 1-bit mode during suspend,
> > +		 * need to hold retuning, because tuning only supprt
> > +		 * 4-bit mode or 8 bit mode.
> > +		 */
> > +		mmc_retune_hold_now(host);
> >  		err = sdio_enable_4bit_bus(host->card);
> > +		mmc_retune_release(host);
> >  	}
> >
> >  	if (err)





[Index of Archives]     [Linux Memonry Technology]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux