RE: [PATCH] mmc: renesas_sdhi: Fix internal cd irq miss with hard reset

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

 



Hi Wolfram,

Thanks for the patch.

> -----Original Message-----
> From: Wolfram Sang <wsa+renesas@xxxxxxxxxxxxxxxxxxxx>
> Sent: 22 October 2021 14:22
> To: Biju Das <biju.das.jz@xxxxxxxxxxxxxx>
> Cc: Ulf Hansson <ulf.hansson@xxxxxxxxxx>; Yoshihiro Shimoda
> <yoshihiro.shimoda.uh@xxxxxxxxxxx>; linux-mmc@xxxxxxxxxxxxxxx; Geert
> Uytterhoeven <geert+renesas@xxxxxxxxx>; Chris Paterson
> <Chris.Paterson2@xxxxxxxxxxx>; Biju Das <biju.das@xxxxxxxxxxxxxx>;
> Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@xxxxxxxxxxxxxx>; linux-
> renesas-soc@xxxxxxxxxxxxxxx
> Subject: Re: [PATCH] mmc: renesas_sdhi: Fix internal cd irq miss with hard
> reset
> 
> On Wed, Oct 06, 2021 at 06:16:05PM +0100, Biju Das wrote:
> >
> > This patch fixes internal cd irq miss after hard reset by enabling
> > internal card insertion/removal interrupts.
> >
> > Fixes: b4d86f37eacb ("mmc: renesas_sdhi: do hard reset if possible")
> > Signed-off-by: Biju Das <biju.das.jz@xxxxxxxxxxxxxx>
> 
> IIUC, the following should be the apropriate fix. Can you please test it?
> If it works, then I'll make a proper patch out of it.

It is much better. I will test and let you know the results.

Regards,
Biju

> 
> diff --git a/drivers/mmc/host/tmio_mmc_core.c
> b/drivers/mmc/host/tmio_mmc_core.c
> index 7dfc26f48c18..9416245a7b56 100644
> --- a/drivers/mmc/host/tmio_mmc_core.c
> +++ b/drivers/mmc/host/tmio_mmc_core.c
> @@ -195,6 +195,10 @@ static void tmio_mmc_reset(struct tmio_mmc_host
> *host)
>  	sd_ctrl_write32_as_16_and_16(host, CTL_IRQ_MASK, host-
> >sdcard_irq_mask_all);
>  	host->sdcard_irq_mask = host->sdcard_irq_mask_all;
> 
> +	if (host->native_hotplug)
> +		tmio_mmc_enable_mmc_irqs(host,
> +				TMIO_STAT_CARD_REMOVE | TMIO_STAT_CARD_INSERT);
> +
>  	tmio_mmc_set_bus_width(host, host->mmc->ios.bus_width);
> 
>  	if (host->pdata->flags & TMIO_MMC_SDIO_IRQ) { @@ -1185,10 +1189,6 @@
> int tmio_mmc_host_probe(struct tmio_mmc_host *_host)
>  	_host->set_clock(_host, 0);
>  	tmio_mmc_reset(_host);
> 
> -	if (_host->native_hotplug)
> -		tmio_mmc_enable_mmc_irqs(_host,
> -				TMIO_STAT_CARD_REMOVE | TMIO_STAT_CARD_INSERT);
> -
>  	spin_lock_init(&_host->lock);
>  	mutex_init(&_host->ios_lock);
> 





[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