LKML Archive on
help / color / mirror / Atom feed
From: Pierre Ossman <>
To: Alex Dubov <>
Subject: Re: mmc: correct semantics of the mmc_host_remove
Date: Fri, 19 Jan 2007 09:47:38 +0100	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

Alex Dubov wrote:
> Greetings.
> It appears to me that under certain circumstances mmc layer will issue requests to the host after
> mmc_host_remove returns. This happens, for example, in tifm_sd driver because mmc_host may be
> removed mid-transfer, as the socket shall be freed for possible reuse by different media type.
> Currently, the only solution is to sleep a little somewhere after mmc_remove_host but before
> mmc_free_host. I think the correct way to handle the situation is to ensure that mmc_host is never
> accessed by the mmc layer after mmc_remove_host returns.

That shouldn't be possible. Are you using the block queue fixes I wrote?
Otherwise you will get problems like this.

Basically, when you call mmc_host_remove(), it will remove all card
devices. That shouldn't complete until all card drivers have released
control of the card. At that point there is no one else accessing the
device. If you see something else, then we have a bug somewhere.


     -- Pierre Ossman

  Linux kernel, MMC maintainer
  PulseAudio, core developer
  rdesktop, core developer

  reply	other threads:[~2007-01-19  8:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-04 15:04 [PATCH 2.6.19] mmc: Fix handling of response types in imxmmc and tifm drivers Philip Langdale
2007-01-07 17:34 ` Pavel Pisa
2007-01-10 19:02   ` Pierre Ossman
2007-01-19  1:50     ` mmc: correct semantics of the mmc_host_remove Alex Dubov
2007-01-19  8:47       ` Pierre Ossman [this message]
2007-01-20  3:46         ` Alex Dubov
2007-01-20 10:21           ` 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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \
    --subject='Re: mmc: correct semantics of the mmc_host_remove' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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).