[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <46483A25.8030301@drzeus.cx>
Date: Mon, 14 May 2007 12:29:57 +0200
From: Pierre Ossman <drzeus-list@...eus.cx>
To: Philip Langdale <philipl@...rt.org>
CC: Tobias Bengtsson <tobbe@...be.nu>, sdhci-devel@...t.drzeus.cx,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] sdhci: Add quirk to support polling for card presence
Philip Langdale wrote:
> @@ -806,11 +819,18 @@ static void sdhci_tasklet_card(unsigned long param)
> host->mrq->cmd->error = MMC_ERR_FAILED;
> tasklet_schedule(&host->finish_tasklet);
> }
> - }
>
> - spin_unlock_irqrestore(&host->lock, flags);
> + spin_unlock_irqrestore(&host->lock, flags);
> +
>
Where's the unlock for the other branch?
> + host->present = present;
>
>
And this should be protected by the lock :)
> + mmc_detect_change(host->mmc, msecs_to_jiffies(500));
> + }
>
Perhaps we should have a different delay here. After all, we're no
longer delaying against an interrupt.
> - mmc_detect_change(host->mmc, msecs_to_jiffies(500));
> + if (host->chip->quirks & SDHCI_QUIRK_NO_CARD_DETECT_INT) {
> + host->detect_timer.expires = jiffies + 3 * HZ;
> + add_timer(&host->detect_timer);
> + }
> }
>
> static void sdhci_tasklet_finish(unsigned long param)
>
I wonder if three seconds is a bit much. You might give up and yank the
card in that time.
Keep up the good work. :)
Rgds
--
-- Pierre Ossman
Linux kernel, MMC maintainer http://www.kernel.org
PulseAudio, core developer http://pulseaudio.org
rdesktop, core developer http://www.rdesktop.org
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists