linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Richard Purdie <rpurdie@rpsys.net>
Cc: Mark Lord <liml@rtr.ca>, 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: Thu, 22 Sep 2005 01:18:09 +0100	[thread overview]
Message-ID: <1127348289.18840.62.camel@localhost.localdomain> (raw)
In-Reply-To: <1127328385.20660.45.camel@localhost.localdomain>

On Mer, 2005-09-21 at 19:46 +0100, Richard Purdie wrote:
> CF slots have card detection and ide-cs will see a card removal event.
> Have a look at ide_event() in ide-cs.c: CS_EVENT_CARD_INSERTION and
> CS_EVENT_CARD_REMOVAL are what they say...

Not implemented on large numbers of adapters. Been there tried that,
been 2.4 IDE maintainer.

> This along with your comments about the IDE layer having no hotplug
> support suggest the code in question can be removed pending a better
> replacement when hotplug is implemented.

That attitude is why there is not hotplug code. Its the "delete anything
that gets in my way" approach. Its why 2.4 is the last kernel thats
useful on a thinkpad with removable drive bay.

The kernel isn't perfect so lets delete it and use DOS. Same argument,
same logical fallacy.

Also every other hotplug environment gets it right today, so GNOME and
KDE are doing things differently and it works. You can therefore do the
same.

The right approach is to ask

1.	Do you need to fix it, everyone elses userspace works maybe your user
space is inadequate and you need to use GNOME or KDE userspace
implementations (or steal the relevant algorithms)

2.	If it does need fixing (which I think you have a case for) then how
do I fix it properly

IDE CF cards have serial numbers. I believe the CF standard requires
they all do but I need to go re-read that to check. If so then you don't
want to remove the correct drive->removable handling (and break cache
flush etc too) but make the hotplug handler smarter. 

What does ->removable mean, "can go away without warning and detection".
That is true in this case. The problem you have is that the correctly
performed partition rescan generates events and you respond to them in a
way that gets you looping. That means either kernel or user space should
be asking "is this event for the same disk" and either not generating it
(because its not a change) or ignoring it in the user case.

But first of all you need to explain why GNOME and KDE work and your
code doesn't.

Alan


  reply	other threads:[~2005-09-22  9:40 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
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 [this message]
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=1127348289.18840.62.camel@localhost.localdomain \
    --to=alan@lxorguk.ukuu.org.uk \
    --cc=bzolnier@gmail.com \
    --cc=liml@rtr.ca \
    --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 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).