[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090221165821.1239aa5a@mjolnir.ossman.eu>
Date: Sat, 21 Feb 2009 16:58:21 +0100
From: Pierre Ossman <drzeus@...eus.cx>
To: Anton Vorontsov <avorontsov@...mvista.com>
Cc: Pierre Ossman <drzeus-sdhci@...eus.cx>,
Ben Dooks <ben-linux@...ff.org>, Arnd Bergmann <arnd@...db.de>,
Kumar Gala <galak@...nel.crashing.org>,
Liu Dave <DaveLiu@...escale.com>, sdhci-devel@...t.drzeus.cx,
linux-kernel@...r.kernel.org, linuxppc-dev@...abs.org
Subject: Re: [PATCH 05/13] sdhci: Add support for card-detection polling
On Fri, 13 Feb 2009 17:47:18 +0300
Anton Vorontsov <avorontsov@...mvista.com> wrote:
> @@ -1110,13 +1113,18 @@ static void sdhci_request(struct mmc_host *mmc, struct mmc_request *mrq)
>
> host->mrq = mrq;
>
> + if (host->quirks & SDHCI_QUIRK_BROKEN_CARD_DETECTION)
> + goto send;
> +
> if (!(sdhci_readl(host, SDHCI_PRESENT_STATE) & SDHCI_CARD_PRESENT)
> || (host->flags & SDHCI_DEVICE_DEAD)) {
> host->mrq->cmd->error = -ENOMEDIUM;
> tasklet_schedule(&host->finish_tasklet);
> - } else
> - sdhci_send_command(host, mrq->cmd);
> -
> + goto out;
> + }
> +send:
> + sdhci_send_command(host, mrq->cmd);
> +out:
> mmiowb();
> spin_unlock_irqrestore(&host->lock, flags);
> }
goto:s seem unnecessary here, and your patch is even incorrect as it
ignores the SDHCI_DEVICE_DEAD flag. Just modify the if-clause and
things will work.
Might want to add a comment also to make it more obvious what the
if-clause does.
Rgds
--
-- Pierre Ossman
WARNING: This correspondence is being monitored by the
Swedish government. Make sure your server uses encryption
for SMTP traffic and consider using PGP for end-to-end
encryption.
Download attachment "signature.asc" of type "application/pgp-signature" (199 bytes)
Powered by blists - more mailing lists