linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vignesh R <vigneshr@ti.com>
To: Andreas Fenkart <afenkart@gmail.com>
Cc: Ulf Hansson <ulf.hansson@linaro.org>,
	Tony Lindgren <tony@atomide.com>, NeilBrown <neilb@suse.de>,
	linux-mmc <linux-mmc@vger.kernel.org>,
	linux-omap <linux-omap@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 3/3] mmc: host: omap_hsmmc: Add custom card detect irq handler
Date: Wed, 22 Jul 2015 13:01:21 +0530	[thread overview]
Message-ID: <55AF46C9.9050308@ti.com> (raw)
In-Reply-To: <CALtMJEBnqzJsGgBoLDjkO+6iJ=67Cw1FXjQm0vfmcm1i3yZ5oA@mail.gmail.com>

Hi Andreas,

On 07/21/2015 01:46 PM, Andreas Fenkart wrote:
> Hi Vignesh,
> 
> Generally I don't like this patch, it will make it harder, not easier,
> to maintain the omap hsmmc driver. Also given that the bug occurs
> rarely, people will be reluctant to clean it up later or accept
> patches.
> 
> see also comments below
> 
[snip]
> 2015-06-22 15:18 GMT+02:00 Vignesh R <vigneshr@ti.com>:
>>
> 
>> But calls to omap_hsmmc_card_init or omap_hsmmc_get_cd are in the same
>> mmc_rescan thread. Hence, moving the recovery code to init_card does not
>> help.
> 
> what about clearing any pending transfer in
> - mmc_gpio_cd_irqt, or
> - mmc_detect_change
> 
> e.g. trigger the later mentioned .card_event callback from those
> functions, instead mmc_rescan? Then you can install your
> omap_hsmmc_request_clear as the card_event callback. This makes your
> custom isr handler redundant, actually your isr handler became
> standard.
> 

I looked  at the commit fa372a51cb5f93800f711473e5a36e0e0c9a8f00 which
moved .card_event out of mmc_gpio_cd_irqt. It points to two threads
where discussion to move .card_event to mmc_rescan happened[1][2]. The
concern there was this callback was being called from "atomic context"
but, I don't understand how threaded irq is "atomic context". (I am not
sure, if this is because those drivers have irqs disabled till threaded
irq is complete) But, I believe moving card_event callback back to
mmc_gpio_cd_irqt may break some drivers.
I will look into this further.
Do you have any insight on this commit? Thanks!

[1]https://lkml.org/lkml/2014/3/19/79
[2]https://lkml.org/lkml/2013/8/19/539

-- 
Regards
Vignesh

  reply	other threads:[~2015-07-22  7:31 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-16 10:37 [PATCH 0/3] omap_hsmmc: Fix card enumeration failure on Vignesh R
2015-06-16 10:37 ` [PATCH 1/3] mmc: host: omap_hsmmc: Fix DTO and DCRC handling Vignesh R
2015-06-20 22:21   ` Andreas Fenkart
2015-06-16 10:37 ` [PATCH 2/3] mmc: host: omap_hsmmc: Handle BADA, DEB and CEB interrupts Vignesh R
2015-06-20 22:22   ` Andreas Fenkart
2015-06-16 10:37 ` [PATCH 3/3] mmc: host: omap_hsmmc: Add custom card detect irq handler Vignesh R
2015-06-20 22:45   ` Andreas Fenkart
2015-06-22 13:18     ` Vignesh R
2015-07-21  8:16       ` Andreas Fenkart
2015-07-22  7:31         ` Vignesh R [this message]
2015-07-06  6:12 ` [PATCH 0/3] omap_hsmmc: Fix card enumeration failure on Vignesh R
2015-07-11 10:25 ` R, Vignesh
2015-07-20 14:20 ` Ulf Hansson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55AF46C9.9050308@ti.com \
    --to=vigneshr@ti.com \
    --cc=afenkart@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=neilb@suse.de \
    --cc=tony@atomide.com \
    --cc=ulf.hansson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).