[ibm-acpi-devel] [ltp] /proc/acpi/ibm/bay gone with ThinkPad ACPI Extras v0.19-20080107/2.6.24

Marc MERLIN linux-thinkpad@linux-thinkpad.org
Fri, 1 Feb 2008 14:16:27 +1100


On Thu, Jan 31, 2008 at 11:26:45PM -0200, Henrique de Moraes Holschuh wrote:
> On Thu, 31 Jan 2008, Henrique de Moraes Holschuh wrote:
> > > I had a similar problem with 2.6.23 and thinkpad_acpi before I loaded 
> > > thinkpad_acpi before most other modules (including libata). Is it possible 
> > > that libata, which now has been extended to make use of ACPI, causes this?
> > 
> > Sounds very strange, it shouldn't.
> 
> I stand corrected.  I guess that's it.  We may have finally hit a case where
> the linux ACPI model of only one "notify handler"/driver per node fails, and
> fails so bad it is not funny.
> 
> But better to be sure about it first.  Here's how to test it for people with
> the new libata ACPI support:
> 
> Please boot the kernel with "libata.noacpi=1".  If either bay or
> thinkpad-acpi bay handling starts working *for disks insterted in the
> ultrabay, NOT for batteries*, then we have pinpointed the problem.

Sure enough, it worked:

> thinkpad_acpi: ThinkPad ACPI Extras v0.19-20080107
> thinkpad_acpi: http://ibm-acpi.sf.net/
> thinkpad_acpi: ThinkPad BIOS 7FETA4WW (2.22 ), EC 7FHT26WW-1.08
> thinkpad_acpi: Lenovo ThinkPad Z61p
> thinkpad_acpi: radio switch found; radios are enabled
> thinkpad_acpi: standard ACPI backlight interface available, not loading
> native one...
> input: ThinkPad Extra Buttons as /devices/virtual/input/input8
> ACPI: ACPI Dock Station Driver 
> ACPI: \_SB_.PCI0.IDE0.PRIM.MSTR: found ejectable bay
> ACPI: \_SB_.PCI0.IDE0.PRIM.MSTR: Adding notify handler
> ACPI: Error installing bay notify handler
> ACPI: Bay [\_SB_.PCI0.IDE0.PRIM.MSTR] Added
> gandalf:~# uname -r
> 2.6.24-slab-tpacpi0.19-p4core2smp-preempt-1khz-noticks-marc8
> gandalf:~# cat /proc/cmdline 
> resume=/dev/sda8 ro nosplash vga=1 acpi_sleep=s3_bios root=/dev/sda2 libata.noacpi=1
> gandalf:~# cat /proc/acpi/ibm/bay      
> status:         occupied
> commands:       eject
> gandalf:~# rmmod thinkpad_acpi
> gandalf:~# modprobe bay
> ACPI: \_SB_.PCI0.IDE0.PRIM.MSTR: found ejectable bay
> ACPI: \_SB_.PCI0.IDE0.PRIM.MSTR: Adding notify handler
> ACPI: Bay [\_SB_.PCI0.IDE0.PRIM.MSTR] Added

Then, I tried to eject my bay:
gandalf:~# udevmonitor
udevmonitor will print the received events for:
UDEV the event which udev sends out after rule processing
UEVENT the kernel uevent

UEVENT[1201835705.008037] change   /devices/platform/bay.0 (platform)
UDEV  [1201835705.009688] change   /devices/platform/bay.0 (platform)
Feb  1 14:15:05 gandalf kernel: ACPI: \_SB_.PCI0.IDE0.PRIM.MSTR: Bay event
UEVENT[1201835705.547646] remove   /class/scsi_generic/sg1 (scsi_generic)
UEVENT[1201835705.547682] remove   /class/scsi_device/4:0:0:0 (scsi_device)
UEVENT[1201835705.548041] remove   /class/scsi_disk/4:0:0:0 (scsi_disk)
UEVENT[1201835705.548063] remove   /block/sdb/sdb1 (block)
UEVENT[1201835705.548078] remove   /block/sdb (block)
UDEV  [1201835705.550048] remove   /class/scsi_generic/sg1 (scsi_generic)
UDEV  [1201835705.552639] remove   /class/scsi_device/4:0:0:0 (scsi_device)
UDEV  [1201835705.553772] remove   /class/scsi_disk/4:0:0:0 (scsi_disk)
UDEV  [1201835705.556085] remove   /block/sdb/sdb1 (block)
UDEV  [1201835705.557985] remove   /block/sdb (block)
kernel: sd 4:0:0:0: [sdb] Synchronizing SCSI cache
kernel: sd 4:0:0:0: [sdb] Stopping disk
UEVENT[1201835707.602057] remove   /devices/pci0000:00/0000:00:1f.1/host4/target4:0:0/4:0:0:0 (scsi)
UDEV  [1201835707.603319] remove   /devices/pci0000:00/0000:00:1f.1/host4/target4:0:0/4:0:0:0 (scsi)
kernel: ata5.00: disabled
kernel: ACPI: \_SB_.PCI0.IDE0.PRIM.MSTR: Ejecting device

Success! 

Thanks :)
Marc
-- 
"A mouse is a device used to point at the xterm you want to type in" - A.S.R.
Microsoft is to operating systems & security ....
                                      .... what McDonalds is to gourmet cooking
Home page: http://marc.merlins.org/