All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Richard Purdie <rpurdie@rpsys.net>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Dominik Brodowski <linux@dominikbrodowski.net>,
	bzolnier@gmail.com, linux-ide@vger.kernel.org
Subject: Re: [RFC/BUG?] ide_cs's removable status
Date: Wed, 21 Sep 2005 17:57:08 +0100	[thread overview]
Message-ID: <1127321829.18840.18.camel@localhost.localdomain> (raw)
In-Reply-To: <1127319328.8542.57.camel@localhost.localdomain>

On Mer, 2005-09-21 at 17:15 +0100, Richard Purdie wrote:
> As ide_cs only creates the block devices when a card is present, I think
> it shouldn't be set as removable. As a point of reference, the MMC
> system does not set the removable flag for exactly this reason (There is
> an email from Russell King explaining this -
> http://lkml.org/lkml/2005/1/8/165).

I can't comment on the MMC layer or its core requirements as I don't
know them well. IDE PCMCIA does however encompass removal devices. The
removable flag is set so that we get removable media behaviour - that is
the media can change under us and we must not cache partition data. The
current behavioiur in that sense is correct.

> 
> It is worth noting the MMC subsystem works with my evil udev script. If
> I apply the patch below (which removes the removable flag for flash
> devices), I don't see this loop.

But does MMC have a media change detect, and if not does the right thing
occur if you swap cards with partition tables ?

> 1. Can anyone provide details on what the bits in id->config really
> mean?  

ATA standards are all available for download.

> 2. Which other drivers exploit the "if (id->config & (1<<7))
> drive->removable = 1;" code? Is it just ide_cs?

It might be currently because the old IDE layer has no hotplug support
(not even for PCMCIA - it happens to work some days) but that wasn't
true in 2.4-ac or some 2.6-ac.

It sounds like something needs to be smarter about whether the media has
changed - could be kernel but it seems like a user space problem. I note
that the standard Gnome tools "just work" in this case so perhaps you
can see how they do it.

Alan


  reply	other threads:[~2005-09-21 16:31 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-21 16:15 [RFC/BUG?] ide_cs's removable status Richard Purdie
2005-09-21 16:57 ` Alan Cox [this message]
2005-09-21 17:21   ` Mark Lord
2005-09-21 18:27     ` Alan Cox
2005-09-21 18:46       ` Richard Purdie
2005-09-22  0:18         ` Alan Cox
2002-01-01  5:18           ` Pavel Machek
2005-09-21 19:29       ` Russell King
2005-09-21 21:52         ` Richard Purdie
2005-09-22  0:06           ` Alan Cox
2005-09-22  0:10         ` Alan Cox
2005-09-22 10:22           ` Russell King
2005-09-22 13:39             ` Alan Cox
2005-09-22 13:29               ` Russell King
2005-09-22 14:41                 ` Alan Cox
2005-09-22 14:21               ` Richard Purdie
2005-09-22 14:36                 ` Russell King
2005-09-22 15:08                 ` Alan Cox

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=1127321829.18840.18.camel@localhost.localdomain \
    --to=alan@lxorguk.ukuu.org.uk \
    --cc=bzolnier@gmail.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@dominikbrodowski.net \
    --cc=rpurdie@rpsys.net \
    /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.