linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: mad_soft@inbox.ru (Dmitry Artamonow)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] pxa/hx4700: Fix basic suspend/resume
Date: Sun, 15 May 2011 17:14:16 +0400	[thread overview]
Message-ID: <20110515131416.GA3954@rainbow> (raw)
In-Reply-To: <319615.71439.qm@web29015.mail.ird.yahoo.com>

On 23:32 Sat 14 May     , Paul Parsons wrote:
> Today I found what causes the spurious interrupts. It's a race condition caused by the interrupt handler looping in a while loop.
> 
> At the end of a multiple read operation the handler clears the final RXRDY status bit in one iteration and then clears the DATAEND status bit in the next iteration. However the DATAEND interrupt is still queued in the system somewhere and can't be delivered until the handler has returned. So whether the handler detects spurious interrupts depends on how quickly the DATAEND follows the final RXRDY. Similarly for multiple writes.
> 
> Try this quick hack:
> 
> --- clean-2.6.39-rc7/drivers/mmc/host/tmio_mmc_pio.c	2011-05-11 00:54:17.651289833 +0100
> +++ linux-2.6.39-rc7/drivers/mmc/host/tmio_mmc_pio.c	2011-05-14 22:51:30.661074153 +0100
> @@ -603,7 +603,7 @@ static irqreturn_t tmio_mmc_irq(int irq,
>  		goto out;
>  	}
>  
> -	while (ireg) {
> +	if (ireg) {
>  		/* Card insert / remove attempts */
>  		if (ireg & (TMIO_STAT_CARD_INSERT | TMIO_STAT_CARD_REMOVE)) {
>  			tmio_mmc_ack_mmc_irqs(host, TMIO_STAT_CARD_INSERT |
> 

Well, it really seems to make all those "Spurious IRQ" messages disappear.
(and btw, MMC magically started to work for me in -rc7. Probably that were
some earlier -rc's that didn't work and issue was fixed in -rc7. Or maybe
I'm just lucky today)

I think it's worth to submit it to tmio_mmc maintainers along with the
description of this situation on ASIC3. Even if it won't be accepted,
it'll make them aware of the problem and maybe some clean solution could
be worked out then.

-- 
Best regards,
Dmitry "MAD" Artamonow

  reply	other threads:[~2011-05-15 13:14 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-11 19:49 [PATCH] pxa/hx4700: Fix basic suspend/resume Paul Parsons
2011-05-13 10:32 ` Dmitry Artamonow
2011-05-13 19:18   ` Paul Parsons
2011-05-14 20:18     ` Dmitry Artamonow
2011-05-14 22:32       ` Paul Parsons
2011-05-15 13:14         ` Dmitry Artamonow [this message]
2011-05-15 13:27           ` Paul Parsons
2012-02-26 10:54 ` Philipp Zabel
2012-02-27  2:12   ` Haojian Zhuang
2012-02-27  2:32     ` Paul Parsons
2012-02-27  3:15       ` Haojian Zhuang
2012-02-27  9:04   ` Russell King - ARM Linux
2012-02-27  9:54     ` Haojian Zhuang
2012-02-27 14:31     ` Paul Parsons

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=20110515131416.GA3954@rainbow \
    --to=mad_soft@inbox.ru \
    --cc=linux-arm-kernel@lists.infradead.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).