[ltp] DMA hotswap 0.2.0

Jim Duchek linux-thinkpad@linux-thinkpad.org
Wed, 22 Feb 2006 08:11:44 -0600


------=_Part_8481_12082173.1140617504735
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Hrm.  Is the acpi battery module already loaded before you load lt_hotswap?

If not, make sure that all the acpi modules you're planning to ever use are
loaded before lt_hotswap goes in -- I dig around in acpi internal structure=
s
:)

Still, not sure what a lot of those errors even are...

And:



On 22/02/06, Pezhman Givy <phg@snafu.de> wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Cool! It works here on T42p.
> Kernel version is 2.6.15.
>
> Ejecting and inserting DVD-ROM works perfectly:
>
> Feb 22 14:38:16 localhost kernel: lt_hotswap: Requesting IDE eject!
> Feb 22 14:38:16 localhost kernel: lt_hotswap: Attempting to eject
> Feb 22 14:38:48 localhost kernel: Mate c0408fa0 channel 1
> Feb 22 14:38:48 localhost kernel:     ide1: BM-DMA at 0x1868-0x186f,
> BIOS settings: hdc:DMA, hdd:pio
> Feb 22 14:38:48 localhost kernel: hdc: MATSHITADVD-RAM UJ-822S, ATAPI
> CD/DVD-ROM drive
> Feb 22 14:38:49 localhost kernel: ide1 at 0x170-0x177,0x376 on irq 15
> Feb 22 14:38:49 localhost kernel: hdc: ATAPI 24X DVD-ROM DVD-R-RAM
> CD-R/RW drive, 2048kB Cache, UDMA(33)
>
>
> But inserting an Ultra-Bay Battery results in following messages:
>
> Feb 22 14:44:17 localhost kernel: lt_hotswap: Requesting IDE eject!
> Feb 22 14:44:17 localhost kernel: lt_hotswap: Attempting to eject
> Feb 22 14:44:34 localhost kernel: acpi_bus-0073 [340374] bus_get_device
>        : No context for object [c20d8e68]
> Feb 22 14:44:34 localhost kernel: acpi_bus-0073 [340373] bus_get_device
>        : No context for object [c20d8e68]
> Feb 22 14:44:34 localhost kernel: acpi_bus-0073 [340373] bus_get_device
>        : No context for object [c20d8e68]
> Feb 22 14:44:34 localhost kernel:  dswload-0292: *** Error: Looking up
> [SERN] in namespace, AE_ALREADY_EXISTS
> Feb 22 14:44:34 localhost kernel:   psloop-0287 [340389] ps_parse_loop
>        : During name lookup/catalog, AE_ALREADY_EXISTS
> Feb 22 14:44:34 localhost kernel:  psparse-0508: *** Error: Method
> execution failed [\_SB_.PCI0.LPC_.EC__.GBIF] (Node c20d92e8),
> AE_ALREADY_EXISTS
> Feb 22 14:44:34 localhost kernel:      osl-0854 [340393]
> os_wait_semaphore     : Failed to acquire semaphore[dfffe5e0|1|0], AE_TIM=
E
> Feb 22 14:44:34 localhost kernel: ACPI: Battery Slot [BAT1] (battery
> present)
> Feb 22 14:44:34 localhost kernel: lt_hotswap: Old handler found!
> 00000002 00000000 c213cdbc
> Feb 22 14:44:34 localhost kernel: lt_hotswap: Calling old handler,
> c02182f9 f5dd2260
> Feb 22 14:44:37 localhost kernel: dsmethod-0213: *** Error: Method
> reached maximum reentrancy limit (255)
> Feb 22 14:44:37 localhost kernel:  psparse-0508: *** Error: Method
> execution failed [\_SB_.PCI0.LPC_.EC__.BAT0._BIF] (Node c20d8f28),
> AE_AML_METHOD_LIMIT
> Feb 22 14:44:37 localhost kernel: acpi_battery-0144 [340367]
> battery_get_info      : Error evaluating _BIF
> Feb 22 14:44:39 localhost kernel: lt_hotswap: Calling old handler,
> c02182f9 f5dd2260
> Feb 22 14:44:40 localhost kernel: dsmethod-0213: *** Error: Method
> reached maximum reentrancy limit (255)
> Feb 22 14:44:40 localhost kernel:  psparse-0508: *** Error: Method
> execution failed [\_SB_.PCI0.LPC_.EC__.BAT0._BIF] (Node c20d8f28),
> AE_AML_METHOD_LIMIT
> Feb 22 14:44:40 localhost kernel: acpi_battery-0144 [340374]
> battery_get_info      : Error evaluating _BIF
> Feb 22 14:44:44 localhost kernel: dsmethod-0213: *** Error: Method
> reached maximum reentrancy limit (255)
> Feb 22 14:44:44 localhost kernel:  psparse-0508: *** Error: Method
> execution failed [\_SB_.PCI0.LPC_.EC__.BAT0._BIF] (Node c20d8f28),
> AE_AML_METHOD_LIMIT
> Feb 22 14:44:44 localhost kernel: acpi_battery-0144 [340379]
> battery_get_info      : Error evaluating _BIF
> Feb 22 14:44:47 localhost kernel: dsmethod-0213: *** Error: Method
> reached maximum reentrancy limit (255)
> Feb 22 14:44:47 localhost kernel:  psparse-0508: *** Error: Method
> execution failed [\_SB_.PCI0.LPC_.EC__.BAT0._BIF] (Node c20d8f28),
> AE_AML_METHOD_LIMIT
>
> And so on. And
>
> cat /proc/acpi/battery/BAT?/info
>
> results in
>
> present:                 yes
> ERROR: Unable to read battery information
> present:                 yes
> ERROR: Unable to read battery information
>
> Greetings
>
> Pezhman
>
>
> Jim Duchek wrote:
> > http://churchofjim.org/sources/lt_hotswap-0.2.0.tar.gz
> >
> > There were some issues with DMA setup.  It's much, much better now,
> > although it's a pretty kludgy solution.
> >
> > Use the auto_eject=3D1 command-line option until you think you're getti=
ng
> > clean ide1 un/reregisters.  Then switch to the userspace acpid  stuff -=
-
> > trust me, it's a better idea and you're less likely to dick up your
> > system.  Remember that with auto_eject=3D1, you _must_ have everything
> > umounted and make sure you're not using it, or your system is going to
> > get really confused.
> >
> > See configs/lths.sh (it gets installed in /usr/local/sbin) for 'what
> > userspace stuff it should do upon insertion/removal'.  You probably wan=
t
> > to customize it.
> >
> > If you do 'make install' it'll put the module and acpi scripts in
> > (probably, anyway ;) the right places.  Restart acpid, load the kernel
> > module, and you should be in business.
> >
> > Oh, when you load the module at boot, make sure it loads AFTER
> > everything else ACPI.  I dig around in some internal ACPI stuff and
> > things need to already be in place.
> >
> > Jim
> >
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.2 (GNU/Linux)
> Comment: Using GnuPG with Debian - http://enigmail.mozdev.org
>
> iD8DBQFD/G1yz6aJiiMTCIwRAlHcAKCu7oDSbi8UlDZlsVBc4BRxZmUjlgCaAw+v
> LpTIoyscKOJw1/1KLe6+tHw=3D
> =3DORlX
> -----END PGP SIGNATURE-----
> --
> The linux-thinkpad mailing list home page is at:
> http://mailman.linux-thinkpad.org/mailman/listinfo/linux-thinkpad
>

------=_Part_8481_12082173.1140617504735
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Hrm.&nbsp; Is the acpi battery module already loaded before you load lt_hot=
swap?<br><br>If not, make sure that all the acpi modules you're planning to=
 ever use are loaded before lt_hotswap goes in -- I dig around in acpi inte=
rnal structures :)
<br><br>Still, not sure what a lot of those errors even are...<br><br>And:<=
br><br><br><br><div><span class=3D"gmail_quote">On 22/02/06, <b class=3D"gm=
ail_sendername">Pezhman Givy</b> &lt;<a href=3D"mailto:phg@snafu.de">phg@sn=
afu.de
</a>&gt; wrote:</span><blockquote class=3D"gmail_quote" style=3D"border-lef=
t: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1=
ex;">-----BEGIN PGP SIGNED MESSAGE-----<br>Hash: SHA1<br><br>Cool! It works=
 here on T42p.
<br>Kernel version is 2.6.15.<br><br>Ejecting and inserting DVD-ROM works p=
erfectly:<br><br>Feb 22 14:38:16 localhost kernel: lt_hotswap: Requesting I=
DE eject!<br>Feb 22 14:38:16 localhost kernel: lt_hotswap: Attempting to ej=
ect
<br>Feb 22 14:38:48 localhost kernel: Mate c0408fa0 channel 1<br>Feb 22 14:=
38:48 localhost kernel:&nbsp;&nbsp;&nbsp;&nbsp; ide1: BM-DMA at 0x1868-0x18=
6f,<br>BIOS settings: hdc:DMA, hdd:pio<br>Feb 22 14:38:48 localhost kernel:=
 hdc: MATSHITADVD-RAM UJ-822S, ATAPI
<br>CD/DVD-ROM drive<br>Feb 22 14:38:49 localhost kernel: ide1 at 0x170-0x1=
77,0x376 on irq 15<br>Feb 22 14:38:49 localhost kernel: hdc: ATAPI 24X DVD-=
ROM DVD-R-RAM<br>CD-R/RW drive, 2048kB Cache, UDMA(33)<br><br><br>But inser=
ting an Ultra-Bay Battery results in following messages:
<br><br>Feb 22 14:44:17 localhost kernel: lt_hotswap: Requesting IDE eject!=
<br>Feb 22 14:44:17 localhost kernel: lt_hotswap: Attempting to eject<br>Fe=
b 22 14:44:34 localhost kernel: acpi_bus-0073 [340374] bus_get_device<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : No context for object [c20d8e68]<br>=
Feb 22 14:44:34 localhost kernel: acpi_bus-0073 [340373] bus_get_device<br>=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : No context for object [c20d8e68]<br>=
Feb 22 14:44:34 localhost kernel: acpi_bus-0073 [340373] bus_get_device
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : No context for object [c20d8e68]=
<br>Feb 22 14:44:34 localhost kernel:&nbsp;&nbsp;dswload-0292: *** Error: L=
ooking up<br>[SERN] in namespace, AE_ALREADY_EXISTS<br>Feb 22 14:44:34 loca=
lhost kernel:&nbsp;&nbsp; psloop-0287 [340389] ps_parse_loop
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : During name lookup/catalog, AE_A=
LREADY_EXISTS<br>Feb 22 14:44:34 localhost kernel:&nbsp;&nbsp;psparse-0508:=
 *** Error: Method<br>execution failed [\_SB_.PCI0.LPC_.EC__.GBIF] (Node c2=
0d92e8),<br>AE_ALREADY_EXISTS<br>Feb 22 14:44:34 localhost kernel:&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;osl-0854 [340393]
<br>os_wait_semaphore&nbsp;&nbsp;&nbsp;&nbsp; : Failed to acquire semaphore=
[dfffe5e0|1|0], AE_TIME<br>Feb 22 14:44:34 localhost kernel: ACPI: Battery =
Slot [BAT1] (battery<br>present)<br>Feb 22 14:44:34 localhost kernel: lt_ho=
tswap: Old handler found!
<br>00000002 00000000 c213cdbc<br>Feb 22 14:44:34 localhost kernel: lt_hots=
wap: Calling old handler,<br>c02182f9 f5dd2260<br>Feb 22 14:44:37 localhost=
 kernel: dsmethod-0213: *** Error: Method<br>reached maximum reentrancy lim=
it (255)
<br>Feb 22 14:44:37 localhost kernel:&nbsp;&nbsp;psparse-0508: *** Error: M=
ethod<br>execution failed [\_SB_.PCI0.LPC_.EC__.BAT0._BIF] (Node c20d8f28),=
<br>AE_AML_METHOD_LIMIT<br>Feb 22 14:44:37 localhost kernel: acpi_battery-0=
144 [340367]
<br>battery_get_info&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: Error evaluating =
_BIF<br>Feb 22 14:44:39 localhost kernel: lt_hotswap: Calling old handler,<=
br>c02182f9 f5dd2260<br>Feb 22 14:44:40 localhost kernel: dsmethod-0213: **=
* Error: Method<br>reached maximum reentrancy limit (255)
<br>Feb 22 14:44:40 localhost kernel:&nbsp;&nbsp;psparse-0508: *** Error: M=
ethod<br>execution failed [\_SB_.PCI0.LPC_.EC__.BAT0._BIF] (Node c20d8f28),=
<br>AE_AML_METHOD_LIMIT<br>Feb 22 14:44:40 localhost kernel: acpi_battery-0=
144 [340374]
<br>battery_get_info&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: Error evaluating =
_BIF<br>Feb 22 14:44:44 localhost kernel: dsmethod-0213: *** Error: Method<=
br>reached maximum reentrancy limit (255)<br>Feb 22 14:44:44 localhost kern=
el:&nbsp;&nbsp;psparse-0508: *** Error: Method
<br>execution failed [\_SB_.PCI0.LPC_.EC__.BAT0._BIF] (Node c20d8f28),<br>A=
E_AML_METHOD_LIMIT<br>Feb 22 14:44:44 localhost kernel: acpi_battery-0144 [=
340379]<br>battery_get_info&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: Error eval=
uating _BIF<br>Feb 22 14:44:47 localhost kernel: dsmethod-0213: *** Error: =
Method
<br>reached maximum reentrancy limit (255)<br>Feb 22 14:44:47 localhost ker=
nel:&nbsp;&nbsp;psparse-0508: *** Error: Method<br>execution failed [\_SB_.=
PCI0.LPC_.EC__.BAT0._BIF] (Node c20d8f28),<br>AE_AML_METHOD_LIMIT<br><br>An=
d so on. And
<br><br>cat /proc/acpi/battery/BAT?/info<br><br>results in<br><br>present:&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp; yes<br>ERROR: Unable to read battery information<br>pr=
esent:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp; yes<br>ERROR: Unable to read battery informatio=
n<br><br>
Greetings<br><br>Pezhman<br><br><br>Jim Duchek wrote:<br>&gt; <a href=3D"ht=
tp://churchofjim.org/sources/lt_hotswap-0.2.0.tar.gz">http://churchofjim.or=
g/sources/lt_hotswap-0.2.0.tar.gz</a><br>&gt;<br>&gt; There were some issue=
s with DMA setup.&nbsp;&nbsp;It's much, much better now,
<br>&gt; although it's a pretty kludgy solution.<br>&gt;<br>&gt; Use the au=
to_eject=3D1 command-line option until you think you're getting<br>&gt; cle=
an ide1 un/reregisters.&nbsp;&nbsp;Then switch to the userspace acpid&nbsp;=
&nbsp;stuff --<br>
&gt; trust me, it's a better idea and you're less likely to dick up your<br=
>&gt; system.&nbsp;&nbsp;Remember that with auto_eject=3D1, you _must_ have=
 everything<br>&gt; umounted and make sure you're not using it, or your sys=
tem is going to
<br>&gt; get really confused.<br>&gt;<br>&gt; See configs/lths.sh (it gets =
installed in /usr/local/sbin) for 'what<br>&gt; userspace stuff it should d=
o upon insertion/removal'.&nbsp;&nbsp;You probably want<br>&gt; to customiz=
e it.<br>
&gt;<br>&gt; If you do 'make install' it'll put the module and acpi scripts=
 in<br>&gt; (probably, anyway ;) the right places.&nbsp;&nbsp;Restart acpid=
, load the kernel<br>&gt; module, and you should be in business.<br>&gt;<br=
>&gt; Oh, when you load the module at boot, make sure it loads AFTER
<br>&gt; everything else ACPI.&nbsp;&nbsp;I dig around in some internal ACP=
I stuff and<br>&gt; things need to already be in place.<br>&gt;<br>&gt; Jim=
<br>&gt;<br><br>-----BEGIN PGP SIGNATURE-----<br>Version: GnuPG v1.4.2 (GNU=
/Linux)
<br>Comment: Using GnuPG with Debian - <a href=3D"http://enigmail.mozdev.or=
g">http://enigmail.mozdev.org</a><br><br>iD8DBQFD/G1yz6aJiiMTCIwRAlHcAKCu7o=
DSbi8UlDZlsVBc4BRxZmUjlgCaAw+v<br>LpTIoyscKOJw1/1KLe6+tHw=3D<br>=3DORlX<br>=
-----END PGP SIGNATURE-----
<br>--<br>The linux-thinkpad mailing list home page is at:<br><a href=3D"ht=
tp://mailman.linux-thinkpad.org/mailman/listinfo/linux-thinkpad">http://mai=
lman.linux-thinkpad.org/mailman/listinfo/linux-thinkpad</a><br></blockquote=
>
</div><br>

------=_Part_8481_12082173.1140617504735--