Bug 130722

Summary: Add/removing cdrom to ultra bay causes issues
Product: [openSUSE] SUSE LINUX 10.0 Reporter: JP Rosevear <jpr>
Component: HotplugAssignee: Stefan Behlert <behlert>
Status: RESOLVED WONTFIX QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None    
Version: Final   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: hwinfo output of my machine

Description JP Rosevear 2005-10-26 11:44:37 UTC
On a thinkpad T42p if I insert my cdrom into the ultra bay while linux is running, hal does not see it (hal-device-manager does not report it).

If I boot my machine with the cdrom inserted and then remove it, the machine locks up.

I'm inserting/removing in order to add my ultra bay battery, I'll file a separate report for that.
Comment 1 JP Rosevear 2005-10-26 11:45:21 UTC
Created attachment 55513 [details]
hwinfo output of my machine
Comment 2 Kay Sievers 2005-10-28 02:13:30 UTC
Do you know if that device works for anybody else with Linux?

Usually it's not fixable, cause of the broken ide subsystem in the kernel.
Only very few devices work, some devices work with with weird hdparm
settings sometimes, but most of them don't.
Comment 3 JP Rosevear 2005-10-31 16:02:29 UTC
I don't know for sure, but this link indicates it might be possible:

http://theorie.physik.uni-wuerzburg.de/~arwagner/computer/T41p/
Comment 4 Kay Sievers 2005-11-01 01:56:04 UTC
From the website: if you do:
  echo eject > /proc/acpi/ibm/bay

Can you remove the drive safely and does it work if you plug it back?
Comment 5 JP Rosevear 2005-11-01 15:41:55 UTC
No - the bay light goes off (not the dvd activity light, but a light on the machine for when something is inserted) but as soon as i yank it out.  After reboot in /var/log/messages I see from the time I pulled it out:

Nov  1 10:37:13 knight kernel: hdc: ATAPI reset complete
Nov  1 10:37:13 knight kernel: hdc: status error: status=0x00 { }
Nov  1 10:37:13 knight kernel: ide: failed opcode was: unknown
Nov  1 10:37:13 knight kernel: hdc: status error: status=0x00 { }
Nov  1 10:37:13 knight kernel: ide: failed opcode was: unknown
Nov  1 10:37:13 knight kernel: hdc: status error: status=0x00 { }
Nov  1 10:37:13 knight kernel: ide: failed opcode was: unknown
Nov  1 10:37:13 knight kernel: hdc: status error: status=0x00 { }

Comment 6 Kay Sievers 2005-11-08 15:28:27 UTC
As the hotswap tool seems to work, anything else we need, or can I close the bug?
Comment 7 JP Rosevear 2005-11-09 13:54:40 UTC
Hotswap is not in autobuild yet, and we'll need a UI method of triggering it.

Also, maybe this is simplistic, but if this utility can handle it the IDE hotswapping, why can't the kernel?  Is it the surprise factor?
Comment 8 Kay Sievers 2005-11-15 14:13:43 UTC
Cause the hotswap tool disables the ide controller _before_ the device is removed.
The kernel can't handle a physical remove of an active controller. There is no
solution currently. Windows probably gets an event for unlocking the latch to
remove the device, but we have no idea how that works or where to get such a event
from.
Comment 9 Kay Sievers 2005-12-04 02:47:56 UTC
I get these ACPI events on a ThinkPad T43p when I unlock the latch to remove the drive. Theorethically it should be possible to use these events to prepare the removal of the device in the slot.

This is a unlock/lock sequence, _without_ removing the drive:
  pim:~ # acpi_listen 
  ibm/bay MSTR 00000003 00000000
  ibm/bay MSTR 00000001 00000000

How does that look at your box?
Comment 10 JP Rosevear 2006-01-11 04:58:21 UTC
I don't seem to be getting these with 2.6.15, and the hotswap tool isn't working for re-insertion either.
Comment 11 Kay Sievers 2006-04-07 11:06:53 UTC
Stefan, care to put this bug in your magic queue. :) The current kernel can't handle this properly. I can't do anything at the moment.
Comment 12 Stefan Behlert 2006-04-07 11:20:11 UTC
Yes, I feared so.
JP: To handle this properly we need to rewrite the ide-system of the kernel.
A workaround might be for you to use the hotswap.rpm, but I don't think this will work for you.
I'll create a feature entry for that.
Comment 13 Stefan Behlert 2006-06-07 16:26:34 UTC
I don't think we can fix this currently. I've created FATE 300648: Support IDE Hotplug for Laptops