linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* hotpluggable ide cd-rom drive?
@ 2003-03-17 12:56 Kari Karhi
  2003-03-17 17:50 ` Greg KH
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Kari Karhi @ 2003-03-17 12:56 UTC (permalink / raw)
  To: linux-hotplug

Hi,
I'm new to linux, but recently loaded RedHat 8.0 on my Dell Latitude CSx H
laptop.  The laptop comes with external floppy and cd-rom drives that
connect to an ide port on the laptop.  On Windows 2000 the drives are
hot-pluggable.

My problem is that while the floppy drive is hot-pluggable in RH 8.0, the
cd-rom drive is not.  If I boot with the cd-rom drive connected, everything
works, I see the /proc/ide/ide1 directory and the hdc device.  kudzu then
links it to /dev/cdrom and I can mount the drive.  If I boot without the
cd-rom drive connected, the /proc/ide/ide1 directory is NOT there and kudzu
can not find it, even after I plug the drive in.

Is there a user level command to kick the ide-probe module into probing the
ide bus again?  Or is work going on to get the kernel to support
hot-pluggable ide drives?  Or am I just missing some configuration
parameter?

If this is not the right list for this question, please direct me to a
better list.  I have already asked in redhat-install and linux-laptop lists
without an answer.
Thanks,
    Kari


-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open! 
Get cracking and register here for some mind boggling fun and 
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: hotpluggable ide cd-rom drive?
  2003-03-17 12:56 hotpluggable ide cd-rom drive? Kari Karhi
@ 2003-03-17 17:50 ` Greg KH
  2003-03-17 19:05 ` Oliver Neukum
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Greg KH @ 2003-03-17 17:50 UTC (permalink / raw)
  To: linux-hotplug

On Mon, Mar 17, 2003 at 06:56:28AM -0600, Kari Karhi wrote:
> 
> Is there a user level command to kick the ide-probe module into probing the
> ide bus again?  Or is work going on to get the kernel to support
> hot-pluggable ide drives?  Or am I just missing some configuration
> parameter?

Unfortunately this is usually done in a hardware specific way, and since
neither Dell, nor any other laptop manufacturer has provided the specs
for how to detect and do this kind of hot-swap, Linux does not support
it.

Sorry,

greg k-h


-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open! 
Get cracking and register here for some mind boggling fun and 
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: hotpluggable ide cd-rom drive?
  2003-03-17 12:56 hotpluggable ide cd-rom drive? Kari Karhi
  2003-03-17 17:50 ` Greg KH
@ 2003-03-17 19:05 ` Oliver Neukum
  2003-03-17 19:09 ` Greg KH
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Oliver Neukum @ 2003-03-17 19:05 UTC (permalink / raw)
  To: linux-hotplug

Am Montag, 17. März 2003 18:50 schrieb Greg KH:
> On Mon, Mar 17, 2003 at 06:56:28AM -0600, Kari Karhi wrote:
> > Is there a user level command to kick the ide-probe module into probing
> > the ide bus again?  Or is work going on to get the kernel to support
> > hot-pluggable ide drives?  Or am I just missing some configuration
> > parameter?
>
> Unfortunately this is usually done in a hardware specific way, and since
> neither Dell, nor any other laptop manufacturer has provided the specs
> for how to detect and do this kind of hot-swap, Linux does not support
> it.

Not entirely true. It's supported in Apple Powerbooks.
What happens if we suspend to disk and wake up with a changed drive ?

	Regards
		Oliver



-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open! 
Get cracking and register here for some mind boggling fun and 
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: hotpluggable ide cd-rom drive?
  2003-03-17 12:56 hotpluggable ide cd-rom drive? Kari Karhi
  2003-03-17 17:50 ` Greg KH
  2003-03-17 19:05 ` Oliver Neukum
@ 2003-03-17 19:09 ` Greg KH
  2003-03-17 20:44 ` Oliver Neukum
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Greg KH @ 2003-03-17 19:09 UTC (permalink / raw)
  To: linux-hotplug

On Mon, Mar 17, 2003 at 08:05:21PM +0100, Oliver Neukum wrote:
> Am Montag, 17. März 2003 18:50 schrieb Greg KH:
> > On Mon, Mar 17, 2003 at 06:56:28AM -0600, Kari Karhi wrote:
> > > Is there a user level command to kick the ide-probe module into probing
> > > the ide bus again?  Or is work going on to get the kernel to support
> > > hot-pluggable ide drives?  Or am I just missing some configuration
> > > parameter?
> >
> > Unfortunately this is usually done in a hardware specific way, and since
> > neither Dell, nor any other laptop manufacturer has provided the specs
> > for how to detect and do this kind of hot-swap, Linux does not support
> > it.
> 
> Not entirely true. It's supported in Apple Powerbooks.

Oh, forgot, some laptops support this if you suspend to ram, swap out
the drive, and then resume.  Works for some APM based laptops, don't
know about ACPI based ones.

> What happens if we suspend to disk and wake up with a changed drive ?

Heh, I don't want to think about that :)

greg k-h


-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open! 
Get cracking and register here for some mind boggling fun and 
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: hotpluggable ide cd-rom drive?
  2003-03-17 12:56 hotpluggable ide cd-rom drive? Kari Karhi
                   ` (2 preceding siblings ...)
  2003-03-17 19:09 ` Greg KH
@ 2003-03-17 20:44 ` Oliver Neukum
  2003-03-18 13:17 ` Kari Karhi
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Oliver Neukum @ 2003-03-17 20:44 UTC (permalink / raw)
  To: linux-hotplug

Am Montag, 17. März 2003 20:09 schrieb Greg KH:
> On Mon, Mar 17, 2003 at 08:05:21PM +0100, Oliver Neukum wrote:
> > Am Montag, 17. März 2003 18:50 schrieb Greg KH:
> > > On Mon, Mar 17, 2003 at 06:56:28AM -0600, Kari Karhi wrote:
> > > > Is there a user level command to kick the ide-probe module into
> > > > probing the ide bus again?  Or is work going on to get the kernel to
> > > > support hot-pluggable ide drives?  Or am I just missing some
> > > > configuration parameter?
> > >
> > > Unfortunately this is usually done in a hardware specific way, and
> > > since neither Dell, nor any other laptop manufacturer has provided the
> > > specs for how to detect and do this kind of hot-swap, Linux does not
> > > support it.
> >
> > Not entirely true. It's supported in Apple Powerbooks.
>
> Oh, forgot, some laptops support this if you suspend to ram, swap out
> the drive, and then resume.  Works for some APM based laptops, don't
> know about ACPI based ones.

Powerbooks do it on a live system. Look at drivers/macintosh/mediabay.c.

> > What happens if we suspend to disk and wake up with a changed drive ?
>
> Heh, I don't want to think about that :)

Let me guess, you have an aversion against horror movies? ;-)

Seriously, looking power.c::device_resume()  the code assumes that resumption
is always successful. That is bad. Error codes need to be returned and 
evaluated.

	Regards
		Oliver



-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open! 
Get cracking and register here for some mind boggling fun and 
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: hotpluggable ide cd-rom drive?
  2003-03-17 12:56 hotpluggable ide cd-rom drive? Kari Karhi
                   ` (3 preceding siblings ...)
  2003-03-17 20:44 ` Oliver Neukum
@ 2003-03-18 13:17 ` Kari Karhi
  2003-03-18 17:56 ` Greg KH
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Kari Karhi @ 2003-03-18 13:17 UTC (permalink / raw)
  To: linux-hotplug

Hi,
so let me try to summarize for my own understanding.  Comments are welcome.

1. The mechanism used to probe the hardware for new devices during boot can
not be used later during normal operation of the os.  This prevents linux
from running the ide-probe again and updating the device maps.  Therefore
there can be no user level commands one could run after plugging in a
hot-pluggable device, that would find the device and add it to the device
maps.

2. The hot-plug mechanism is specific to the system hardware and is not
standardised.  This prevents linux from finding out that new hardware has
been added, and automagically adding the hot-plugged devices.

3. It is not possible to guess the device map and to build it from some
static file at boot time (e.g. boot hdc=hotplug fd0=hotplug).  This would
allow the device to always be there, but if you try to access it before it
is plugged in, you would get failures and time-outs.

So none of the above mechanisms would work?
Cheers,
    Kari

----- Original Message -----
From: "Oliver Neukum" <oliver@neukum.name>
To: "Greg KH" <greg@kroah.com>
Cc: "Kari Karhi" <karhi@hotmail.com>;
<linux-hotplug-devel@lists.sourceforge.net>
Sent: Monday, March 17, 2003 2:44 PM
Subject: Re: hotpluggable ide cd-rom drive?


Am Montag, 17. März 2003 20:09 schrieb Greg KH:
> On Mon, Mar 17, 2003 at 08:05:21PM +0100, Oliver Neukum wrote:
> > Am Montag, 17. März 2003 18:50 schrieb Greg KH:
> > > On Mon, Mar 17, 2003 at 06:56:28AM -0600, Kari Karhi wrote:
> > > > Is there a user level command to kick the ide-probe module into
> > > > probing the ide bus again?  Or is work going on to get the kernel to
> > > > support hot-pluggable ide drives?  Or am I just missing some
> > > > configuration parameter?
> > >
> > > Unfortunately this is usually done in a hardware specific way, and
> > > since neither Dell, nor any other laptop manufacturer has provided the
> > > specs for how to detect and do this kind of hot-swap, Linux does not
> > > support it.
> >
> > Not entirely true. It's supported in Apple Powerbooks.
>
> Oh, forgot, some laptops support this if you suspend to ram, swap out
> the drive, and then resume.  Works for some APM based laptops, don't
> know about ACPI based ones.

Powerbooks do it on a live system. Look at drivers/macintosh/mediabay.c.

> > What happens if we suspend to disk and wake up with a changed drive ?
>
> Heh, I don't want to think about that :)

Let me guess, you have an aversion against horror movies? ;-)

Seriously, looking power.c::device_resume()  the code assumes that
resumption
is always successful. That is bad. Error codes need to be returned and
evaluated.

Regards
Oliver




-------------------------------------------------------
This SF.net email is sponsored by: Does your code think in ink? 
You could win a Tablet PC. Get a free Tablet PC hat just for playing. 
What are you waiting for?
http://ads.sourceforge.net/cgi-bin/redirect.pl?micr5043en
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: hotpluggable ide cd-rom drive?
  2003-03-17 12:56 hotpluggable ide cd-rom drive? Kari Karhi
                   ` (4 preceding siblings ...)
  2003-03-18 13:17 ` Kari Karhi
@ 2003-03-18 17:56 ` Greg KH
  2003-03-19 10:30 ` Paul Hedderly
  2003-03-19 10:47 ` Paul Hedderly
  7 siblings, 0 replies; 9+ messages in thread
From: Greg KH @ 2003-03-18 17:56 UTC (permalink / raw)
  To: linux-hotplug

On Tue, Mar 18, 2003 at 07:17:33AM -0600, Kari Karhi wrote:
> Hi,
> so let me try to summarize for my own understanding.  Comments are welcome.
> 
> 1. The mechanism used to probe the hardware for new devices during boot can
> not be used later during normal operation of the os.  This prevents linux
> from running the ide-probe again and updating the device maps.  Therefore
> there can be no user level commands one could run after plugging in a
> hot-pluggable device, that would find the device and add it to the device
> maps.

Not necessarily true.  I think that the ide code does not support this
kind of behavior right now, this is not held back by the rest of the
kernel.  See the many queries about hotplug ide drives in the
linux-kernel mailing list archives for a better answer to this.

> 2. The hot-plug mechanism is specific to the system hardware and is not
> standardised.  This prevents linux from finding out that new hardware has
> been added, and automagically adding the hot-plugged devices.

Not true.  The hotplug mechanism is specific to the individual bus
types, but from a user's point of view, the mechanism is standardized to
always interact through the same interface (/sbin/hotplug).

> 3. It is not possible to guess the device map and to build it from some
> static file at boot time (e.g. boot hdc=hotplug fd0=hotplug).  This would
> allow the device to always be there, but if you try to access it before it
> is plugged in, you would get failures and time-outs.

That is a ide specific question, I do not know.  But the current kernel
code does not support such a "hcd=hotplug" mechanism, yes.

> So none of the above mechanisms would work?

They could, if someone implemented them :)

thanks,

greg k-h


-------------------------------------------------------
This SF.net email is sponsored by: Does your code think in ink? 
You could win a Tablet PC. Get a free Tablet PC hat just for playing. 
What are you waiting for?
http://ads.sourceforge.net/cgi-bin/redirect.pl?micr5043en
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: hotpluggable ide cd-rom drive?
  2003-03-17 12:56 hotpluggable ide cd-rom drive? Kari Karhi
                   ` (5 preceding siblings ...)
  2003-03-18 17:56 ` Greg KH
@ 2003-03-19 10:30 ` Paul Hedderly
  2003-03-19 10:47 ` Paul Hedderly
  7 siblings, 0 replies; 9+ messages in thread
From: Paul Hedderly @ 2003-03-19 10:30 UTC (permalink / raw)
  To: linux-hotplug

On Mon, Mar 17, 2003 at 11:09:32AM -0800, Greg KH wrote:
> On Mon, Mar 17, 2003 at 08:05:21PM +0100, Oliver Neukum wrote:
> > Am Montag, 17. März 2003 18:50 schrieb Greg KH:
> 
> Oh, forgot, some laptops support this if you suspend to ram, swap out
> the drive, and then resume.  Works for some APM based laptops, don't
> know about ACPI based ones.

With my thinkpad, I find a utility called "idectl" usefull. The
expansion tray can take an extra ide device which is helpfully on the
second IDE channel - idectl can turn that channel on off (ie force
detection or drop a detected drive) allowing me to suspend and
change/add/remove the tray or drive.

> > What happens if we suspend to disk and wake up with a changed drive ?
> 
> Heh, I don't want to think about that :)

Can of worms that. I just make sure nothing is mounted and that ide-scsi
/ ide-cd are not loaded when I do 'idectl 1 off' and suspend.

--
Paul


-------------------------------------------------------
This SF.net email is sponsored by: Does your code think in ink? 
You could win a Tablet PC. Get a free Tablet PC hat just for playing. 
What are you waiting for?
http://ads.sourceforge.net/cgi-bin/redirect.pl?micr5043en
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: hotpluggable ide cd-rom drive?
  2003-03-17 12:56 hotpluggable ide cd-rom drive? Kari Karhi
                   ` (6 preceding siblings ...)
  2003-03-19 10:30 ` Paul Hedderly
@ 2003-03-19 10:47 ` Paul Hedderly
  7 siblings, 0 replies; 9+ messages in thread
From: Paul Hedderly @ 2003-03-19 10:47 UTC (permalink / raw)
  To: linux-hotplug

On Tue, Mar 18, 2003 at 07:17:33AM -0600, Kari Karhi wrote:
> Hi,
> so let me try to summarize for my own understanding.  Comments are welcome.
> 
> 1. The mechanism used to probe the hardware for new devices during boot can
> not be used later during normal operation of the os.  This prevents linux
> from running the ide-probe again and updating the device maps.  Therefore
> there can be no user level commands one could run after plugging in a
> hot-pluggable device, that would find the device and add it to the device
> maps.

No. I'm sure that isn't true. See the idectl command.

Also see 'hdparm -U' and 'hdparm -R' which allow to un/register devices
on specific IDE channels. I suspect idectl is doing much the same thing.

Ahh. idectl is supplied as source in
/usr/share/doc/hdparm/examples/idectl...

Should be what you want :O)


--
Paul


-------------------------------------------------------
This SF.net email is sponsored by: Does your code think in ink? 
You could win a Tablet PC. Get a free Tablet PC hat just for playing. 
What are you waiting for?
http://ads.sourceforge.net/cgi-bin/redirect.pl?micr5043en
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2003-03-19 10:47 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-03-17 12:56 hotpluggable ide cd-rom drive? Kari Karhi
2003-03-17 17:50 ` Greg KH
2003-03-17 19:05 ` Oliver Neukum
2003-03-17 19:09 ` Greg KH
2003-03-17 20:44 ` Oliver Neukum
2003-03-18 13:17 ` Kari Karhi
2003-03-18 17:56 ` Greg KH
2003-03-19 10:30 ` Paul Hedderly
2003-03-19 10:47 ` Paul Hedderly

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