* [PATCH/RFC] tmio_mmc: keep card-detect interrupts enabled
@ 2009-11-06 10:45 Guennadi Liakhovetski
[not found] ` <c09aa50a0911090242l35d0dfb2vec0cdeff8b86d33e@mail.gmail.com>
0 siblings, 1 reply; 7+ messages in thread
From: Guennadi Liakhovetski @ 2009-11-06 10:45 UTC (permalink / raw)
To: linux-mmc; +Cc: ian
On SuperH platforms the SDHI controller does not produce any command IRQs
after a completed IO. This leads to card-detect interrupts staying
disabled. Do not disable card-detect interrupts on DATA IRQs.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---
Marked as RFC because I'm not really sure this is a correct approach to
fix this problem, and whether this will have negative effect on other
tmio_mmc MFD users.
diff --git a/drivers/mmc/host/tmio_mmc.h b/drivers/mmc/host/tmio_mmc.h
index c676767..0b31d44 100644
--- a/drivers/mmc/host/tmio_mmc.h
+++ b/drivers/mmc/host/tmio_mmc.h
@@ -55,10 +55,8 @@
/* Define some IRQ masks */
/* This is the mask used at reset by the chip */
#define TMIO_MASK_ALL 0x837f031d
-#define TMIO_MASK_READOP (TMIO_STAT_RXRDY | TMIO_STAT_DATAEND | \
- TMIO_STAT_CARD_REMOVE | TMIO_STAT_CARD_INSERT)
-#define TMIO_MASK_WRITEOP (TMIO_STAT_TXRQ | TMIO_STAT_DATAEND | \
- TMIO_STAT_CARD_REMOVE | TMIO_STAT_CARD_INSERT)
+#define TMIO_MASK_READOP (TMIO_STAT_RXRDY | TMIO_STAT_DATAEND)
+#define TMIO_MASK_WRITEOP (TMIO_STAT_TXRQ | TMIO_STAT_DATAEND)
#define TMIO_MASK_CMD (TMIO_STAT_CMDRESPEND | TMIO_STAT_CMDTIMEOUT | \
TMIO_STAT_CARD_REMOVE | TMIO_STAT_CARD_INSERT)
#define TMIO_MASK_IRQ (TMIO_MASK_READOP | TMIO_MASK_WRITEOP | TMIO_MASK_CMD)
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH/RFC] tmio_mmc: keep card-detect interrupts enabled
[not found] ` <Pine.LNX.4.64.0912162223170.5283@axis700.grange>
@ 2009-12-17 20:25 ` Guennadi Liakhovetski
2009-12-17 21:12 ` Andrew Morton
0 siblings, 1 reply; 7+ messages in thread
From: Guennadi Liakhovetski @ 2009-12-17 20:25 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel, linux-mmc, Ian Molton
Hi Andrew
I originally submitted this [1] patch on the 6th of November, then
accidentally the MMC list got dropped from CC and the discussion moved to
another irrelevant list, Ian's last reply is at [2]. Unfortunately, Ian
hasn't replied to my reminders since then, and I don't see this patch
anywhere upstream. Is there any way we could get it into 2.6.33?
Thanks
Guennadi
[1] http://thread.gmane.org/gmane.linux.kernel.mmc/704
[2] http://thread.gmane.org/gmane.linux.drivers.video-input-infrastructure/11981/focus=11995
On Wed, 16 Dec 2009, Guennadi Liakhovetski wrote:
> On Sat, 28 Nov 2009, Guennadi Liakhovetski wrote:
>
> > On Tue, 10 Nov 2009, Ian Molton wrote:
> >
> > > Well if they are only masked they shouldnt stop being asserted. But we
> > > should unmask them again.
> > >
> > > Im not really sure we should mask them anyway, with the card possibly
> > > being gone... Will need to look into it further.
> >
> > Hi Ian
> >
> > What's the status of this patch? Are you going to queue it for 2.6.33?
>
> Ian, ping? I still don't see this patch in any (Linus' / next) upstream
> tree and the merge window will be closing soon. Any update?
>
> Thanks
> Guennadi
>
> >
> > Thanks
> > Guennadi
> >
> > >
> > > 2009/11/9 Guennadi Liakhovetski <g.liakhovetski@gmx.de>:
> > > > (re-adding accidentally dropped ML)
> > > >
> > > > On Mon, 9 Nov 2009, Ian Molton wrote:
> > > >
> > > >> Well, I presume we want to know when the card gets removed :)
> > > >
> > > > Sure, that's why we shouldn't mask those interrupts:-) If they do get
> > > > masked and missed, I do not know, if the interrupt remains pending in this
> > > > case, because they never get detected then:)
> > > >
> > > >>
> > > >> 2009/11/9 Guennadi Liakhovetski <g.liakhovetski@gmx.de>:
> > > >> > Hi Ian
> > > >> >
> > > >> > Why did you drop all CCs?
> > > >> >
> > > >> > On Mon, 9 Nov 2009, Ian Molton wrote:
> > > >> >
> > > >> >> I havent looked at the consequences for the driver if a insert IRQ
> > > >> >> occurs during IO, however it seems logical that we should not
> > > >> >> permanently mask the IRQ.
> > > >> >>
> > > >> >> I presume that the IRQ remains pending?
> > > >> >
> > > >> > Don't know, never checked. Is this important to know?
> > > >> >
> > > >> > Thanks
> > > >> > Guennadi
> > > >> >
> > > >> >>
> > > >> >> 2009/11/6 Guennadi Liakhovetski <g.liakhovetski@gmx.de>:
> > > >> >> > On SuperH platforms the SDHI controller does not produce any command IRQs
> > > >> >> > after a completed IO. This leads to card-detect interrupts staying
> > > >> >> > disabled. Do not disable card-detect interrupts on DATA IRQs.
> > > >> >> >
> > > >> >> > Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> > > >> >> > ---
> > > >> >> >
> > > >> >> > Marked as RFC because I'm not really sure this is a correct approach to
> > > >> >> > fix this problem, and whether this will have negative effect on other
> > > >> >> > tmio_mmc MFD users.
> > > >> >> >
> > > >> >> > diff --git a/drivers/mmc/host/tmio_mmc.h b/drivers/mmc/host/tmio_mmc.h
> > > >> >> > index c676767..0b31d44 100644
> > > >> >> > --- a/drivers/mmc/host/tmio_mmc.h
> > > >> >> > +++ b/drivers/mmc/host/tmio_mmc.h
> > > >> >> > @@ -55,10 +55,8 @@
> > > >> >> > ═/* Define some IRQ masks */
> > > >> >> > ═/* This is the mask used at reset by the chip */
> > > >> >> > ═#define TMIO_MASK_ALL ═ ═ ═ ═ ═ 0x837f031d
> > > >> >> > -#define TMIO_MASK_READOP ═(TMIO_STAT_RXRDY | TMIO_STAT_DATAEND | \
> > > >> >> > - ═ ═ ═ ═ ═ ═ ═ TMIO_STAT_CARD_REMOVE | TMIO_STAT_CARD_INSERT)
> > > >> >> > -#define TMIO_MASK_WRITEOP (TMIO_STAT_TXRQ | TMIO_STAT_DATAEND | \
> > > >> >> > - ═ ═ ═ ═ ═ ═ ═ TMIO_STAT_CARD_REMOVE | TMIO_STAT_CARD_INSERT)
> > > >> >> > +#define TMIO_MASK_READOP ═(TMIO_STAT_RXRDY | TMIO_STAT_DATAEND)
> > > >> >> > +#define TMIO_MASK_WRITEOP (TMIO_STAT_TXRQ | TMIO_STAT_DATAEND)
> > > >> >> > ═#define TMIO_MASK_CMD ═ ═ (TMIO_STAT_CMDRESPEND | TMIO_STAT_CMDTIMEOUT | \
> > > >> >> > ═ ═ ═ ═ ═ ═ ═ ═TMIO_STAT_CARD_REMOVE | TMIO_STAT_CARD_INSERT)
> > > >> >> > ═#define TMIO_MASK_IRQ ═ ═ (TMIO_MASK_READOP | TMIO_MASK_WRITEOP | TMIO_MASK_CMD)
> > > >
> > > > Thanks
> > > > Guennadi
> > > > ---
> > > > Guennadi Liakhovetski, Ph.D.
> > > > Freelance Open-Source Software Developer
> > > > http://www.open-technology.de/
> > > >
> > >
> > >
> > >
> > > --
> > > Ian Molton
> > > Linux, Automotive, and other hacking:
> > > http://www.mnementh.co.uk/
> > >
> >
> > ---
> > Guennadi Liakhovetski
> >
>
> ---
> Guennadi Liakhovetski, Ph.D.
> Freelance Open-Source Software Developer
> http://www.open-technology.de/
>
---
Guennadi Liakhovetski
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH/RFC] tmio_mmc: keep card-detect interrupts enabled
2009-12-17 20:25 ` Guennadi Liakhovetski
@ 2009-12-17 21:12 ` Andrew Morton
2009-12-20 17:20 ` Guennadi Liakhovetski
2010-02-16 9:34 ` [PATCH] " Guennadi Liakhovetski
0 siblings, 2 replies; 7+ messages in thread
From: Andrew Morton @ 2009-12-17 21:12 UTC (permalink / raw)
To: Guennadi Liakhovetski; +Cc: linux-kernel, linux-mmc, Ian Molton
On Thu, 17 Dec 2009 21:25:52 +0100 (CET)
Guennadi Liakhovetski <g.liakhovetski@gmx.de> wrote:
> I originally submitted this [1] patch on the 6th of November, then
> accidentally the MMC list got dropped from CC and the discussion moved to
> another irrelevant list, Ian's last reply is at [2]. Unfortunately, Ian
> hasn't replied to my reminders since then, and I don't see this patch
> anywhere upstream. Is there any way we could get it into 2.6.33?
Please redo and retest it against curent mainline and do a full resend.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH/RFC] tmio_mmc: keep card-detect interrupts enabled
2009-12-17 21:12 ` Andrew Morton
@ 2009-12-20 17:20 ` Guennadi Liakhovetski
2010-02-16 9:34 ` [PATCH] " Guennadi Liakhovetski
1 sibling, 0 replies; 7+ messages in thread
From: Guennadi Liakhovetski @ 2009-12-20 17:20 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel, linux-mmc, Ian Molton
Hi Andrew
On Thu, 17 Dec 2009, Andrew Morton wrote:
> On Thu, 17 Dec 2009 21:25:52 +0100 (CET)
> Guennadi Liakhovetski <g.liakhovetski@gmx.de> wrote:
>
> > I originally submitted this [1] patch on the 6th of November, then
> > accidentally the MMC list got dropped from CC and the discussion moved to
> > another irrelevant list, Ian's last reply is at [2]. Unfortunately, Ian
> > hasn't replied to my reminders since then, and I don't see this patch
> > anywhere upstream. Is there any way we could get it into 2.6.33?
>
> Please redo and retest it against curent mainline and do a full resend.
As I tried to re-test, I found out, that some other patches from Ian are
currently missing in the mainline, so, even though this my specific patch
doesn't depend on those changes, unfortunately, I currently cannot test
tmio_mmc on sh. Will resubmit as soon as those patches hit mainline.
Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] tmio_mmc: keep card-detect interrupts enabled
2009-12-17 21:12 ` Andrew Morton
2009-12-20 17:20 ` Guennadi Liakhovetski
@ 2010-02-16 9:34 ` Guennadi Liakhovetski
2010-02-16 21:51 ` Andrew Morton
1 sibling, 1 reply; 7+ messages in thread
From: Guennadi Liakhovetski @ 2010-02-16 9:34 UTC (permalink / raw)
To: Andrew Morton
Cc: linux-kernel, linux-mmc, Ian Molton, Magnus Damm,
linux-sh@vger.kernel.org
On SuperH platforms the SDHI controller does not produce any command IRQs after
a completed IO. This leads to card-detect interrupts staying disabled. Do not
disable card-detect interrupts on DATA IRQs.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---
On Thu, 17 Dec 2009, Andrew Morton wrote:
> On Thu, 17 Dec 2009 21:25:52 +0100 (CET)
> Guennadi Liakhovetski <g.liakhovetski@gmx.de> wrote:
>
> > I originally submitted this [1] patch on the 6th of November, then
> > accidentally the MMC list got dropped from CC and the discussion moved to
> > another irrelevant list, Ian's last reply is at [2]. Unfortunately, Ian
> > hasn't replied to my reminders since then, and I don't see this patch
> > anywhere upstream. Is there any way we could get it into 2.6.33?
>
> Please redo and retest it against curent mainline and do a full resend.
Re-testing this patch has again become possible now, after Magnus has
posted his INTC and the "tmio_mmc: use 100ms mmc_detect_change() delay"
patches. Successfully tested on Migo-R (sh7722) and MS7724SE (sh7724).
Andrew, please apply.
drivers/mmc/host/tmio_mmc.h | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/mmc/host/tmio_mmc.h b/drivers/mmc/host/tmio_mmc.h
index 692dc23..dafecfb 100644
--- a/drivers/mmc/host/tmio_mmc.h
+++ b/drivers/mmc/host/tmio_mmc.h
@@ -55,10 +55,8 @@
/* Define some IRQ masks */
/* This is the mask used at reset by the chip */
#define TMIO_MASK_ALL 0x837f031d
-#define TMIO_MASK_READOP (TMIO_STAT_RXRDY | TMIO_STAT_DATAEND | \
- TMIO_STAT_CARD_REMOVE | TMIO_STAT_CARD_INSERT)
-#define TMIO_MASK_WRITEOP (TMIO_STAT_TXRQ | TMIO_STAT_DATAEND | \
- TMIO_STAT_CARD_REMOVE | TMIO_STAT_CARD_INSERT)
+#define TMIO_MASK_READOP (TMIO_STAT_RXRDY | TMIO_STAT_DATAEND)
+#define TMIO_MASK_WRITEOP (TMIO_STAT_TXRQ | TMIO_STAT_DATAEND)
#define TMIO_MASK_CMD (TMIO_STAT_CMDRESPEND | TMIO_STAT_CMDTIMEOUT | \
TMIO_STAT_CARD_REMOVE | TMIO_STAT_CARD_INSERT)
#define TMIO_MASK_IRQ (TMIO_MASK_READOP | TMIO_MASK_WRITEOP | TMIO_MASK_CMD)
--
1.6.2.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] tmio_mmc: keep card-detect interrupts enabled
2010-02-16 9:34 ` [PATCH] " Guennadi Liakhovetski
@ 2010-02-16 21:51 ` Andrew Morton
2010-02-16 22:44 ` Guennadi Liakhovetski
0 siblings, 1 reply; 7+ messages in thread
From: Andrew Morton @ 2010-02-16 21:51 UTC (permalink / raw)
To: Guennadi Liakhovetski
Cc: linux-kernel, linux-mmc, Ian Molton, Magnus Damm,
linux-sh@vger.kernel.org
On Tue, 16 Feb 2010 10:34:55 +0100 (CET)
Guennadi Liakhovetski <g.liakhovetski@gmx.de> wrote:
> On SuperH platforms the SDHI controller does not produce any command IRQs after
> a completed IO. This leads to card-detect interrupts staying disabled. Do not
> disable card-detect interrupts on DATA IRQs.
>
Why is the current code disabling card-detect interrupts on DATA IRQs?
Was that just a bug?
What effect will this change have for current users of this driver?
> ---
> On Thu, 17 Dec 2009, Andrew Morton wrote:
>
> > On Thu, 17 Dec 2009 21:25:52 +0100 (CET)
> > Guennadi Liakhovetski <g.liakhovetski@gmx.de> wrote:
> >
> > > I originally submitted this [1] patch on the 6th of November, then
> > > accidentally the MMC list got dropped from CC and the discussion moved to
> > > another irrelevant list, Ian's last reply is at [2]. Unfortunately, Ian
> > > hasn't replied to my reminders since then, and I don't see this patch
> > > anywhere upstream. Is there any way we could get it into 2.6.33?
> >
> > Please redo and retest it against curent mainline and do a full resend.
>
> Re-testing this patch has again become possible now, after Magnus has
> posted his INTC and the "tmio_mmc: use 100ms mmc_detect_change() delay"
> patches. Successfully tested on Migo-R (sh7722) and MS7724SE (sh7724).
> Andrew, please apply.
>
> drivers/mmc/host/tmio_mmc.h | 6 ++----
> 1 files changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/mmc/host/tmio_mmc.h b/drivers/mmc/host/tmio_mmc.h
> index 692dc23..dafecfb 100644
> --- a/drivers/mmc/host/tmio_mmc.h
> +++ b/drivers/mmc/host/tmio_mmc.h
> @@ -55,10 +55,8 @@
> /* Define some IRQ masks */
> /* This is the mask used at reset by the chip */
> #define TMIO_MASK_ALL 0x837f031d
> -#define TMIO_MASK_READOP (TMIO_STAT_RXRDY | TMIO_STAT_DATAEND | \
> - TMIO_STAT_CARD_REMOVE | TMIO_STAT_CARD_INSERT)
> -#define TMIO_MASK_WRITEOP (TMIO_STAT_TXRQ | TMIO_STAT_DATAEND | \
> - TMIO_STAT_CARD_REMOVE | TMIO_STAT_CARD_INSERT)
> +#define TMIO_MASK_READOP (TMIO_STAT_RXRDY | TMIO_STAT_DATAEND)
> +#define TMIO_MASK_WRITEOP (TMIO_STAT_TXRQ | TMIO_STAT_DATAEND)
> #define TMIO_MASK_CMD (TMIO_STAT_CMDRESPEND | TMIO_STAT_CMDTIMEOUT | \
> TMIO_STAT_CARD_REMOVE | TMIO_STAT_CARD_INSERT)
> #define TMIO_MASK_IRQ (TMIO_MASK_READOP | TMIO_MASK_WRITEOP | TMIO_MASK_CMD)
> --
> 1.6.2.4
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] tmio_mmc: keep card-detect interrupts enabled
2010-02-16 21:51 ` Andrew Morton
@ 2010-02-16 22:44 ` Guennadi Liakhovetski
0 siblings, 0 replies; 7+ messages in thread
From: Guennadi Liakhovetski @ 2010-02-16 22:44 UTC (permalink / raw)
To: Andrew Morton
Cc: linux-kernel, linux-mmc, Ian Molton, Magnus Damm,
linux-sh@vger.kernel.org
On Tue, 16 Feb 2010, Andrew Morton wrote:
> On Tue, 16 Feb 2010 10:34:55 +0100 (CET)
> Guennadi Liakhovetski <g.liakhovetski@gmx.de> wrote:
>
> > On SuperH platforms the SDHI controller does not produce any command IRQs after
> > a completed IO. This leads to card-detect interrupts staying disabled. Do not
> > disable card-detect interrupts on DATA IRQs.
> >
>
> Why is the current code disabling card-detect interrupts on DATA IRQs?
> Was that just a bug?
>
> What effect will this change have for current users of this driver?
Unfortunately, I cannot answer these questions, best I can do is refer you
to this reply from Ian:
http://article.gmane.org/gmane.linux.drivers.video-input-infrastructure/11995
Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2010-02-16 22:44 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-06 10:45 [PATCH/RFC] tmio_mmc: keep card-detect interrupts enabled Guennadi Liakhovetski
[not found] ` <c09aa50a0911090242l35d0dfb2vec0cdeff8b86d33e@mail.gmail.com>
[not found] ` <Pine.LNX.4.64.0911091530030.4289@axis700.grange>
[not found] ` <c09aa50a0911091218i681449e0r5cb96b9db3e0def6@mail.gmail.com>
[not found] ` <Pine.LNX.4.64.0911092134440.4289@axis700.grange>
[not found] ` <c09aa50a0911091736k27d66483t9012e296bfbf578a@mail.gmail.com>
[not found] ` <Pine.LNX.4.64.0911282002490.3696@axis700.grange>
[not found] ` <Pine.LNX.4.64.0912162223170.5283@axis700.grange>
2009-12-17 20:25 ` Guennadi Liakhovetski
2009-12-17 21:12 ` Andrew Morton
2009-12-20 17:20 ` Guennadi Liakhovetski
2010-02-16 9:34 ` [PATCH] " Guennadi Liakhovetski
2010-02-16 21:51 ` Andrew Morton
2010-02-16 22:44 ` Guennadi Liakhovetski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox