mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
To: linux-kernel@vger.kernel.org
Cc: linux-acpi@vger.kernel.org, len.brown@intel.com
Subject: patch [0/2]: acpi: add generic removable drive bay support
Date: Thu, 7 Sep 2006 16:13:05 -0700	[thread overview]
Message-ID: <20060907161305.67804d14.kristen.c.accardi@intel.com> (raw)

Hello,
Ever since I put out the docking station patches people have been asking me
if I could get removable drive bays to work as well.  These are devices such
as the IBM/Lenovo Ultrabay, or the Dell Module Bay - basically removable disk
drives.  There is an IBM platform specific solution that works with some IBM
laptops, but nothing generic.  In addition, the ibm_acpi driver had the
limitation that it would not correctly identify ultrabay devices that had
been inserted after the OS booted.  This driver implements bay handling 
using ACPI to safely power off the drive.  It works similarly
to the ibm_acpi driver, in that it will simply generate an acpi event which
can then be used by udev to unmount or rescan depending on the event.  It will
create a proc entry under /proc/acpi/bay for "eject" and for "status".  Writing 
a 1 to the eject call will cause the drive bays acpi eject method to be called, 
and should be done prior to removing the device.  Reading the "status" entry
will tell you either "present" or "removed" depending on the state of the
device.  User space scripts can use the status entry to determine if a device
has been either inserted or removed in the case of some laptops who generate
the exact same event for either insertion or removal (i.e. the Dell M65 for
example).  Same scripts for using these events and udev can be found on the
thinkwiki website:

http://www.thinkwiki.org/wiki/How_to_hotswap_UltraBay_devices#When_using_the_ata
_piix_driver

Note that due to the lack of hotplug PATA, this driver will only work with 
SATA devices, or with ata_piix driver.  Hopefully if/when hotplug PATA support
gets into libata, we can support that as well.

Note that this driver does not have the same limitations that the ibm_acpi
driver had with regard to device insertion after booting.  i.e. - if you boot
the laptop without a drive bay inserted, and then insert the drive bay later
on, this driver will still detect the insertion and send an event to user
space.  The bay driver will also register with the dock station driver so that
if the removeable drive bay is on a dock station, an event will be sent to
userspace upon dock/undock that will allow any udev scripts specifically for
bay handling to still be executed.

The driver still needs more testing, and I still have a little bit of funkiness
to sort out with the Lenovo X60 with the SATA controller in compatibility
mode - but I think it is ready for you to experiment with if you like and
I hope that you will give it a try and send me any feedback you have.

patch 1 is just a bug fix to the dock driver that will allow devices who's 
parents are listed as being on the dock to also be recognized as being on
a dock station.  patch 2 is the driver.

Thanks,
Kristen

             reply	other threads:[~2006-09-07 23:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-07 23:13 Kristen Carlson Accardi [this message]
2006-09-08  1:34 ` Nigel Cunningham
2006-09-08 17:48   ` Kristen Carlson Accardi
2006-09-08 19:59   ` Matthew Garrett
2006-09-08 19:58 ` Matthew Garrett
2006-09-08 20:21   ` Kristen Carlson Accardi
2006-09-08 20:33     ` Dave Jones
2006-10-14  5:13       ` Len Brown
2006-09-08 20:42     ` Matthew Garrett
2006-09-09 15:15 ` 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=20060907161305.67804d14.kristen.c.accardi@intel.com \
    --to=kristen.c.accardi@intel.com \
    --cc=len.brown@intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®