[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#416490: acpi-support: IBM Ultrabase X4 DVD/CDOM Undetected On Dock

On Tue, 03 Apr 2007, Raphael Hertzog wrote:
> > Debian should be able to handle automatically detecting IDE 
> > CDROM's after docking by now, it is 2007 after all!
> I would like this too. Unfortunately, I have no clue on how to detect
> that we're plugged into a dock. And it's not even clear that acpi-support

Well, since this has "thinkpad" near it, let me make it pretty clear:
whatever you guys do, DO NOT hook into thinkpad-acpi/ibm-acpi bay ejection
and undocking functionality as it stands on anything that will be shipped by
Debian.  I have deprecated it for a long time now, and it *will* be removed
or completely changed (to match generic bay and dock interface) before Lenny
is out.

Back to the problem at hand:  there are Linux generic ACPI "dock" and "bay"
drivers, they are supposed to notify userspace of any ejections and
reconnections.  Only, they don't do everything that is needed yet, and they
don't handle many of the real ejectable devices in a laptop (e.g. ThinkPad
batteries, floppies, and anything else that is not a SATA/ATA/ATAPI device).

As for automated bus rescanning, sincerely, it is up to the kernel to do it.
Anything else will be just an ugly hack or highly specific to a particular
machine model.  You really need to do ACPI/platform specific node -> kernel
device -> device bus mapping to do it properly, and the kernel is the place
to do it.

Userspace should be getting the usual udev messages for device hot-insertion
and hot-removal, and not need to care about anything else.

> is really the package that should take care of that. After all,
> acpi-support is only a set of hacks so that supend/resume works
> with as many laptops as possible.

Frankly, a package should deal with anything and everything to do with ACPI
support if it is going to be named "acpi-support".  If it is a
suspend/resume helper, it should have been named differently, IMO.

> > Furthermore, ideally, I should be able to boot up my laptop out of the 
> > dock, hibernate it (which works), plug it into the dock, wake it up from 
> > its torpid state, and have a working IDE CDROM on /dev/hdc and 
> > /dev/dvd

Err... that's likely to just work in 2.6.22+, as long as you are using the
new disk device drivers (libata/libpata ones), which will make ATA/SATA
drives show up as SCSI devices.  I don't think the old IDE drivers can
handle it half as well as the new ones.   Granted, the new drivers are not
as friendly to some PATA hardware as the older IDE drivers, yet.

  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh

Reply to: