All of lore.kernel.org
 help / color / mirror / Atom feed
* Telling Linux that a SATA device has gone away
@ 2005-08-26 14:42 Matthew Garrett
  2005-08-26 15:42 ` Alan Cox
  0 siblings, 1 reply; 4+ messages in thread
From: Matthew Garrett @ 2005-08-26 14:42 UTC (permalink / raw)
  To: linux-kernel

I have a laptop (Dell Latitude D610) that has a removable DVD drive.  It
appears to be a PATA device, but is presented under ata_piix so behaves
like a SCSI drive. With the ACPI generic hotkey driver, I can get events
when it's removed and reinserted. Is there any way I can tell Linux that 
the device has been removed? hdparm's bus registration support 
(unsurprisingly) doesn't seem to work too well on sr0, but echoing 
"remove-single-device 1 0 0 0" to /proc/scsi/scsi doesn't seem to do 
anything either.
-- 
Matthew Garrett | mjg59@srcf.ucam.org

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

* Re: Telling Linux that a SATA device has gone away
  2005-08-26 14:42 Telling Linux that a SATA device has gone away Matthew Garrett
@ 2005-08-26 15:42 ` Alan Cox
  2005-08-28 19:54   ` Matthew Garrett
  0 siblings, 1 reply; 4+ messages in thread
From: Alan Cox @ 2005-08-26 15:42 UTC (permalink / raw)
  To: Matthew Garrett; +Cc: linux-kernel

On Gwe, 2005-08-26 at 15:42 +0100, Matthew Garrett wrote:
> the device has been removed? hdparm's bus registration support 
> (unsurprisingly) doesn't seem to work too well on sr0

It won't work on hd* either. 2.4-ac supports drive plugging but nothing
else ever did. For the SATA case see Jeff's sata status page 8) and join
in the fun. Most of what is needed is already there. 

Alan

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

* Re: Telling Linux that a SATA device has gone away
  2005-08-26 15:42 ` Alan Cox
@ 2005-08-28 19:54   ` Matthew Garrett
  2005-08-28 20:51     ` Alan Cox
  0 siblings, 1 reply; 4+ messages in thread
From: Matthew Garrett @ 2005-08-28 19:54 UTC (permalink / raw)
  To: Alan Cox; +Cc: linux-kernel

Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:

> It won't work on hd* either. 2.4-ac supports drive plugging but nothing
> else ever did. For the SATA case see Jeff's sata status page 8) and join
> in the fun. Most of what is needed is already there. 

Ok. The machine in question has an ICH6 controller, which is in theory
capable of hotplugging. However, the ahci driver fails to load with
ENOMEM and so I end up with ata_piix. According to
http://linux.yyz.us/sata/software-status.html#hotplug , this /doesn't/
support hotplug. Now, Windows seems to be dealing somehow - it's
entirely happy with the drive vanishing without warning. This confuses
me a little.

Is there any hope of 2.6 gaining IDE hotswap? Given how easy it is to
capture removal events with ACPI, it would be nice to be able to do
something useful with it (rather than just tending to crash the machine)

-- 
Matthew Garrett | mjg59-chiark.mail.linux-rutgers.kernel@srcf.ucam.org

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

* Re: Telling Linux that a SATA device has gone away
  2005-08-28 19:54   ` Matthew Garrett
@ 2005-08-28 20:51     ` Alan Cox
  0 siblings, 0 replies; 4+ messages in thread
From: Alan Cox @ 2005-08-28 20:51 UTC (permalink / raw)
  To: Matthew Garrett; +Cc: linux-kernel

> Is there any hope of 2.6 gaining IDE hotswap? Given how easy it is to
> capture removal events with ACPI, it would be nice to be able to do
> something useful with it (rather than just tending to crash the machine)

For the SATA layer I see no real barriers. The core scsi code/block code
can handle it all now without the trickery 2.4-ac IDE had to do. The
scsi layer itself is happy with drive hot unplug (witness just how much
better 2.6 USB storage is than 2.4).

Handling drive removal is essetially a case of not issuing more commands
to it and cleaning up the others as they error out, something the layer
handles ok.

New drive attachment means running the entire probe state machine for
the drive and the essential commands (figure out the modes, clipping,
power management, set up modes etc). Thats more complex for PATA where
adding one drive can require reprogramming the other.

Porting the 2.4 old IDE code is probably 2-3 weeks work and I doubt
worth it long term.


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

end of thread, other threads:[~2005-08-28 20:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-26 14:42 Telling Linux that a SATA device has gone away Matthew Garrett
2005-08-26 15:42 ` Alan Cox
2005-08-28 19:54   ` Matthew Garrett
2005-08-28 20:51     ` Alan Cox

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.