<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.thinkwiki.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Kili9r</id>
	<title>ThinkWiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://www.thinkwiki.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Kili9r"/>
	<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/wiki/Special:Contributions/Kili9r"/>
	<updated>2026-04-05T13:19:20Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.31.12</generator>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Lt_hotswap&amp;diff=23936</id>
		<title>Lt hotswap</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Lt_hotswap&amp;diff=23936"/>
		<updated>2006-08-01T16:27:36Z</updated>

		<summary type="html">&lt;p&gt;Kili9r: /* Supported models */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=&amp;quot;100%&amp;quot;&lt;br /&gt;
|style=&amp;quot;vertical-align:top;padding-right:20px;width:10px;white-space:nowrap;&amp;quot; | __TOC__&lt;br /&gt;
|style=&amp;quot;vertical-align:top&amp;quot; |&lt;br /&gt;
=== lt_hotswap ===&lt;br /&gt;
The &amp;lt;tt&amp;gt;lt_hotswap&amp;lt;/tt&amp;gt; kernel module enables hot-swapping of UltraBay disk drives under Linux, with DMA support.&lt;br /&gt;
|}&lt;br /&gt;
===Features===&lt;br /&gt;
*enable hotswapping of [[UltraBay]] drives&lt;br /&gt;
*automatic IDE unregistering on [[ibm-acpi]] eject event&lt;br /&gt;
*leaves DMA support intact&lt;br /&gt;
&lt;br /&gt;
===Limitations===&lt;br /&gt;
* Requires [[ibm-acpi]] to be running (does not work with [[APM]]).&lt;br /&gt;
* Works only in conjunction with the &amp;lt;tt&amp;gt;ide-disk&amp;lt;/tt&amp;gt; driver (recent ThinkPad models use &amp;lt;tt&amp;gt;ata_piix&amp;lt;/tt&amp;gt; instead). &lt;br /&gt;
* Does '''not''' get on well with idectl. Use one, or the other, or crash.&lt;br /&gt;
&lt;br /&gt;
===Project Homepage / Availability===&lt;br /&gt;
*Project page: http://www.sourceforge.net/projects/lths&lt;br /&gt;
*Latest version: http://prdownloads.sourceforge.net/lths/lt_hotswap-0.3.6.tar.gz?download&lt;br /&gt;
&lt;br /&gt;
Development and discussion of lt_hotswap is currently being held in &lt;br /&gt;
[[Mailinglists#Linux-ThinkPad Mailinglist|Linux-ThinkPad Mailinglist]].&lt;br /&gt;
&lt;br /&gt;
===Installation===&lt;br /&gt;
In order to use the driver you must use ACPI and also have the [[ibm-acpi]] driver linked to your kernel (module or compiled).  &lt;br /&gt;
&lt;br /&gt;
When loading the hotswap module, you can use the module parameter: {{bootparm|auto_eject|1}} to automatically unregister the drives IDE interface.  This will happen upon popping out the [[UltraBay]] lever.&lt;br /&gt;
&lt;br /&gt;
===Supported models===&lt;br /&gt;
The driver has been explicitly reported to work on the following models. It should work on many others as well:&lt;br /&gt;
*ThinkPad {{A31p}} (warmswap), {{X22}}, {{X24}}, {{T30}}, {{T22}}, {{T23}}, {{T40}}, {{T42}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;lt_hotswap&amp;lt;/tt&amp;gt; does '''not''' work well on models that require  the &amp;lt;tt&amp;gt;ata_piix&amp;lt;/tt&amp;gt; driver rather than the generic &amp;lt;tt&amp;gt;ide-disk&amp;lt;/tt&amp;gt; IDE driver. See [[problems with SATA and Linux]] for a list, and [[How to hotswap UltraBay devices]] for an alternative solution on these models.&lt;br /&gt;
&lt;br /&gt;
At least for a thinkpad T41p with a 2.6.15 kernel I recommend to use version 0.2 of lt_hotswap - the latest version reproducable produces oopses and kernel crashes for me.&lt;br /&gt;
&lt;br /&gt;
===Script to eject an optical ultrabay drive===&lt;br /&gt;
I configured my system to automatically eject my optical drive in battery mode, because it saves about 500mW which is about 5% when my system is idle.&lt;br /&gt;
But when the drive is in use, issuing an eject will result in a kernel ooops/crash.&lt;br /&gt;
So the problem is: How do I check if the device is still in use, either by the kernel or by some other process? &lt;br /&gt;
The trick is to compile &amp;quot;cdrom and ide_cd&amp;quot; as modules. If the unload of ide_cd failes some other process is still using the device.&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 # disable bay if possible&lt;br /&gt;
 # saves about 500mW&lt;br /&gt;
 &lt;br /&gt;
 if modprobe -r ide_cd; then&lt;br /&gt;
   modprobe -r cdrom&lt;br /&gt;
   echo &amp;quot;MSTR eject&amp;quot; &amp;gt; /proc/acpi/lths&lt;br /&gt;
   modprobe ide-cd&lt;br /&gt;
   modprobe cdrom&lt;br /&gt;
 else&lt;br /&gt;
   echo &amp;quot;&amp;quot;&lt;br /&gt;
   echo &amp;quot;$(fuser -vm /dev/hdc)&amp;quot;&lt;br /&gt;
 fi&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Drivers]] [[Category:Patches]]&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [[How to hotswap UltraBay devices]]&lt;br /&gt;
* [[How_to_hotswap_the_UltraBase]]&lt;/div&gt;</summary>
		<author><name>Kili9r</name></author>
		
	</entry>
</feed>