mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pierre Ossman <drzeus@drzeus.cx>
To: Manuel Lauss <mano@roarinelk.homelinux.net>
Cc: linux-mips@linux-mips.org, linux-kernel@vger.kernel.org,
	sshtylyov@ru.mvista.com
Subject: Re: [PATCH 8/9] au1xmmc: abort requests early if no card is present
Date: Thu, 5 Jun 2008 23:05:52 +0200	[thread overview]
Message-ID: <20080605230552.68c14b2d@mjolnir.drzeus.cx> (raw)
In-Reply-To: <20080519080804.GI21985@roarinelk.homelinux.net>

[-- Attachment #1: Type: text/plain, Size: 1240 bytes --]

On Mon, 19 May 2008 10:08:04 +0200
Manuel Lauss <mano@roarinelk.homelinux.net> wrote:

> From ec41439903048bf98e301dbd03426c63156ebc0e Mon Sep 17 00:00:00 2001
> From: Manuel Lauss <mlau@msc-ge.com>
> Date: Sun, 18 May 2008 15:52:43 +0200
> Subject: [PATCH] au1xmmc: abort requests early if no card is present
> 
> Don't process a request if no card is present.
> 
> Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net>
> ---
>  drivers/mmc/host/au1xmmc.c |    7 +++++++
>  1 files changed, 7 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/mmc/host/au1xmmc.c b/drivers/mmc/host/au1xmmc.c
> index be09a14..0b30582 100644
> --- a/drivers/mmc/host/au1xmmc.c
> +++ b/drivers/mmc/host/au1xmmc.c
> @@ -689,6 +689,13 @@ static void au1xmmc_request(struct mmc_host *mmc, struct mmc_request *mrq)
>  	host->mrq = mrq;
>  	host->status = HOST_S_CMD;
>  
> +	/* fail request immediately if no card is present */
> +	if (0 == au1xmmc_card_inserted(host)) {
> +		mrq->cmd->error = -ETIMEDOUT;
> +		au1xmmc_finish_request(host);
> +		return;
> +	}
> +
>  	if (mrq->data) {
>  		FLUSH_FIFO(host);
>  		ret = au1xmmc_prepare_data(host, mrq->data);

You should use -ENOMEDIUM for this case.

Rgds
Pierre

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

  reply	other threads:[~2008-06-05 21:06 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-19  8:03 [PATCH 0/9] au1xmmc updates #3 Manuel Lauss
2008-05-19  8:04 ` [PATCH 1/9] Alchemy: export get_au1x00_speed for modules Manuel Lauss
2008-05-19  9:35   ` Sergei Shtylyov
2008-05-19  9:49     ` Manuel Lauss
2008-06-05 21:03       ` Pierre Ossman
2008-06-06  7:16         ` Manuel Lauss
2008-06-06 11:45           ` Sergei Shtylyov
2008-05-19  8:04 ` [PATCH 2/9] Alchemy: dbdma: add API to delete custom DDMA device ids Manuel Lauss
2008-05-19  8:05 ` [PATCH 3/9] au1xmmc: remove pb1200 board-specific code from driver file Manuel Lauss
2008-05-19  8:17   ` Manuel Lauss
2008-05-19 10:07     ` Manuel Lauss
2008-05-19  8:06 ` [PATCH 4/9] Alchemy: register mmc platform device for db1200/pb1200 boards Manuel Lauss
2008-05-21 12:32   ` Sergei Shtylyov
2008-05-21 13:10     ` Manuel Lauss
2008-05-19  8:06 ` [PATCH 5/9] au1xmmc: enable 4 bit transfer mode Manuel Lauss
2008-05-19  8:06 ` [PATCH 6/9] au1xmmc: SDIO IRQ support Manuel Lauss
2008-05-19  8:07 ` [PATCH 7/9] au1xmmc: codingstyle tidying Manuel Lauss
2008-05-19  8:08 ` [PATCH 8/9] au1xmmc: abort requests early if no card is present Manuel Lauss
2008-06-05 21:05   ` Pierre Ossman [this message]
2008-06-06  7:17     ` Manuel Lauss
2008-05-19  8:08 ` [PATCH 9/9] au1xmmc: Add back PB1200/DB1200 MMC activity LED support Manuel Lauss
2008-05-19 13:27   ` Sergei Shtylyov
2008-06-05 21:08   ` Pierre Ossman
2008-06-06  7:45     ` Manuel Lauss
2008-06-05 21:09 ` [PATCH 0/9] au1xmmc updates #3 Pierre Ossman
2008-06-06  7:18   ` Manuel Lauss
2008-06-06 10:11     ` Pierre Ossman

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=20080605230552.68c14b2d@mjolnir.drzeus.cx \
    --to=drzeus@drzeus.cx \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=mano@roarinelk.homelinux.net \
    --cc=sshtylyov@ru.mvista.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome