linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@alien8.de>
To: wei_wang@realsil.com.cn
Cc: gregkh@linuxfoundation.org, devel@linuxdriverproject.org,
	linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org,
	cjb@laptop.org, arnd@arndb.de, aaron.lu@amd.come
Subject: Re: [PATCH 3/3] drivers/mmc/host: Add realtek sdmmc interface driver
Date: Tue, 31 Jul 2012 20:11:39 +0200	[thread overview]
Message-ID: <20120731181138.GA5825@x1.osrc.amd.com> (raw)
In-Reply-To: <1343720576-22181-1-git-send-email-wei_wang@realsil.com.cn>

On Tue, Jul 31, 2012 at 03:42:56PM +0800, wei_wang@realsil.com.cn wrote:
> From: Wei WANG <wei_wang@realsil.com.cn>
> 
> Realtek SD/MMC card interface driver is used to access
> SD/MMC card, with the help of Realtek card reader adapter driver.
> 
> Signed-off-by: Wei WANG <wei_wang@realsil.com.cn>
> ---

[ … ]

> +static void __devexit realtek_sdmmc_remove(struct rtsx_dev *sock)
> +{
> +	struct mmc_host *mmc = rtsx_get_drvdata(sock);
> +	struct realtek_sdmmc *host;
> +
> +	host = mmc_priv(mmc);
> +	host->eject = 1;
> +
> +	mutex_lock(&host->host_mutex);
> +	if (host->mrq) {
> +		dev_dbg(&(sock->dev),
> +			"%s: Controller removed during transfer\n",
> +			mmc_hostname(mmc));
> +
> +		rtsx_complete_unfinished_transfer(sock);
> +
> +		host->mrq->cmd->error = -ENOMEDIUM;
> +		if (host->mrq->stop)
> +			host->mrq->stop->error = -ENOMEDIUM;
> +		mmc_request_done(mmc, host->mrq);
> +	}
> +	mutex_unlock(&host->host_mutex);
> +
> +	mmc_remove_host(mmc);
> +	mmc_free_host(mmc);
> +
> +	pr_info(DRV_NAME
> +		": Realtek SDMMC controller has been removed\n");

Oh and this appears in the logs when I remove the card:

[11721.313471] rtsx_sdmmc: Realtek SDMMC controller has been removed

but it is simply polluting the logs with useless info that a card has
been removed.

If you really need those printk (same with the PCI-E driver) you could
try to use dev_dbg() like you do above.

Same for the probe function.

But, more importantly and while playing with this, I replugged the card
and it said:

[12072.632332] rtsx_core: MMC/SD card detected in socket 0:0
[12072.642855] rtsx_sdmmc: Realtek SDMMC controller found
[12073.839561] mmc0: error -110 whilst initialising SD card
[12075.138833] mmc0: error -110 whilst initialising SD card
[12076.438158] mmc0: error -110 whilst initialising SD card

and now I can't mount the card anymore:

$ mount /dev/mmcblk0 /mnt/tmp/
mount: /dev/mmcblk0 is not a valid block device

$ mount /dev/mmcblk0p1 /mnt/tmp/
mount: /dev/mmcblk0p1 is not a valid block device

Hmm..

-- 
Regards/Gruss,
Boris.

      parent reply	other threads:[~2012-07-31 18:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-31  7:42 [PATCH 3/3] drivers/mmc/host: Add realtek sdmmc interface driver wei_wang
2012-07-31 15:22 ` Borislav Petkov
2012-07-31 18:11 ` Borislav Petkov [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=20120731181138.GA5825@x1.osrc.amd.com \
    --to=bp@alien8.de \
    --cc=aaron.lu@amd.come \
    --cc=arnd@arndb.de \
    --cc=cjb@laptop.org \
    --cc=devel@linuxdriverproject.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=wei_wang@realsil.com.cn \
    /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;
as well as URLs for NNTP newsgroup(s).