From: Pierre Ossman <drzeus-list@drzeus.cx>
To: Anderson Briglia <anderson.briglia@indt.org.br>
Cc: linux-kernel@vger.kernel.org,
Russell King - ARM Linux <linux@arm.linux.org.uk>,
Tony Lindgren <tony@atomide.com>
Subject: Re: [patch 4/5] MMC OMAP driver
Date: Tue, 31 Jan 2006 16:10:57 +0100 [thread overview]
Message-ID: <43DF7E01.9030204@drzeus.cx> (raw)
In-Reply-To: <43DF683C.4080301@indt.org.br>
Anderson Briglia wrote:
> Some MMC cards don't set the R1_READY_FOR_DATA bit if EOFB
> interrupt comes first. In this case we need to mask R1_READY_FOR_DATA
> to avoid polling card status forever.
> This patch needs to be discussed as it requires interface change.
> This interface change is done here only for omap for now.
>
> Signed-off-by: Tony Lindgren <tony@atomide.com>
>
> @@ -336,6 +342,7 @@ static struct mmc_blk_data *mmc_blk_allo
>
> card_ready:
>
> +card_ready:
> /*
> * As discussed on lkml, GENHD_FL_REMOVABLE should:
> *
This chunk seems incorrect.
> @@ -542,10 +547,19 @@ static irqreturn_t mmc_omap_irq(int irq,
> (!(status & OMAP_MMC_STAT_A_EMPTY))) {
> end_command = 1;
> }
> + /* Some cards produce EOFB interrupt and never
> + * raise R1_READY_FOR_DATA bit after that.
> + * To avoid infinite card status polling loop,
> + * we must fake that bit to MMC layer.
> + */
> + if ((status & OMAP_MMC_STAT_END_OF_CMD) &&
> + (status & OMAP_MMC_STAT_END_BUSY)) {
> + card_ready = 1;
> + }
> }
>
> if (end_command) {
> - mmc_omap_cmd_done(host, host->cmd);
> + mmc_omap_cmd_done(host, host->cmd, card_ready);
> }
> if (transfer_error)
> mmc_omap_xfer_done(host, host->data);
This sounds highly suspicious. Have you tried the card on another
controller? I do not like this mix of fixing it both in the driver and
in the MMC layer. Either it's a hardware issue and should be fixed in
the driver, or it's a generic problem and should be fixed in the MMC layer.
Rgds
Pierre
prev parent reply other threads:[~2006-01-31 15:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-31 13:38 [patch 4/5] MMC OMAP driver Anderson Briglia
2006-01-31 15:10 ` Pierre Ossman [this message]
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=43DF7E01.9030204@drzeus.cx \
--to=drzeus-list@drzeus.cx \
--cc=anderson.briglia@indt.org.br \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=tony@atomide.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.