All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pierre Ossman <drzeus-list@drzeus.cx>
To: Philip Langdale <philipl@overt.org>
Cc: Tobias Bengtsson <tobbe@tobbe.nu>,
	sdhci-devel@list.drzeus.cx, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] sdhci: Add quirk to support polling for card presence
Date: Mon, 14 May 2007 12:29:57 +0200	[thread overview]
Message-ID: <46483A25.8030301@drzeus.cx> (raw)
In-Reply-To: <46479D59.4020400@overt.org>

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


  reply	other threads:[~2007-05-14 10:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-13 23:20 [PATCH] sdhci: Add quirk to support polling for card presence Philip Langdale
2007-05-14 10:29 ` Pierre Ossman [this message]
2007-05-15  3:21   ` Philip Langdale
2007-05-17 23:01 ` Pierre Ossman
2007-05-18 10:58   ` Tobias Bengtsson

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=46483A25.8030301@drzeus.cx \
    --to=drzeus-list@drzeus.cx \
    --cc=linux-kernel@vger.kernel.org \
    --cc=philipl@overt.org \
    --cc=sdhci-devel@list.drzeus.cx \
    --cc=tobbe@tobbe.nu \
    /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.