[ltp] ultrabay hotswap

Reed Gregory linux-thinkpad@linux-thinkpad.org
Sun, 15 Feb 2004 20:24:08 -0500


--Boundary-02=_4uBMADex0NqFSMy
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

On Saturday 14 February 2004 1:20 pm, Bernd Zeimetz wrote:
> Hi,
>
> > experimental, but it appears to work for some people.  I haven't
> > tried it out myself because I only have one Ultrabay device.  HTH,
>
> Removing and inserting back the device works with the newest 2.6 mm
> Kernel with enables ACPI hotplug support. But I couldn't try out
> other devices because I don't own them....

With the newest thinkpad kernel modules (5.0), the lastest tpctl (4.8)=20
and the 2 scripts in the hdparm package mentioned earlier, I now have=20
full ultrabay hotswap support.  I had to modify on of the scripts so=20
that it pointed to the right thinkpad character device=20
(/dev/misc/thinkpad/thinkpad).  Now I can swap my cd-rw/dvd combo=20
drive, floppy, and ultrabay battery and they all work nicely.  The only=20
thing is when you take out the cd drive the kernel doesn't really like=20
it.  It works but it spits out the following:

=46eb 14 21:44:01 reedo smapi: SMAPI BIOS return codes differ!
=46eb 14 22:05:08 reedo Debug: sleeping function called from invalid=20
context at mm/slab.c:1856
=46eb 14 22:05:08 reedo in_atomic():1, irqs_disabled():1
=46eb 14 22:05:08 reedo Call Trace:
=46eb 14 22:05:08 reedo [<c011d35b>] __might_sleep+0xab/0xd0
=46eb 14 22:05:08 reedo [<c0141c1d>] kmem_cache_alloc+0x6d/0x70
=46eb 14 22:05:08 reedo [<c01bcaab>] devfsd_notify_de+0x4b/0xf0
=46eb 14 22:05:08 reedo [<c01bcb9a>] devfsd_notify+0x4a/0x60
=46eb 14 22:05:08 reedo [<c01bcef9>] _devfs_unregister+0x69/0xc0
=46eb 14 22:05:08 reedo [<c01bd2fd>] devfs_remove+0x7d/0xb0
=46eb 14 22:05:08 reedo [<c024de4b>] ide_hwif_release_regions+0x6b/0x100
=46eb 14 22:05:08 reedo [<c024e80e>] ide_unregister+0x92e/0x9b0
=46eb 14 22:05:08 reedo [<c013d019>] mempool_alloc+0x79/0x160
=46eb 14 22:05:08 reedo [<c011d770>] autoremove_wake_function+0x0/0x50
=46eb 14 22:05:08 reedo [<c013d019>] mempool_alloc+0x79/0x160
=46eb 14 22:05:08 reedo [<c023cece>] as_update_arq+0x2e/0x80
=46eb 14 22:05:08 reedo [<c01de910>] __copy_to_user_ll+0x70/0x80
=46eb 14 22:05:08 reedo [<c011b4a9>] scheduler_tick+0x69/0x4e0
=46eb 14 22:05:08 reedo [<c01280d4>] update_process_times+0x44/0x50
=46eb 14 22:05:08 reedo [<c011b4a9>] scheduler_tick+0x69/0x4e0
=46eb 14 22:05:08 reedo [<c012076b>] profile_hook+0x2b/0x49
=46eb 14 22:05:08 reedo [<c011863b>] smp_apic_timer_interrupt+0x2b/0xf0
=46eb 14 22:05:08 reedo [<c010962a>] apic_timer_interrupt+0x1a/0x20
=46eb 14 22:05:08 reedo [<c01de910>] __copy_to_user_ll+0x70/0x80
=46eb 14 22:05:08 reedo [<c013aba9>] file_read_actor+0xf9/0x110
=46eb 14 22:05:08 reedo [<c013e1df>] buffered_rmqueue+0xcf/0x170
=46eb 14 22:05:08 reedo [<c013e32f>] __alloc_pages+0xaf/0x370
=46eb 14 22:05:08 reedo [<c014824d>] do_no_page+0x1bd/0x340
=46eb 14 22:05:08 reedo [<c01198ed>] pte_alloc_one+0x1d/0x60
=46eb 14 22:05:08 reedo [<c01485d0>] handle_mm_fault+0xe0/0x180
=46eb 14 22:05:08 reedo [<c011a0bc>] do_page_fault+0x34c/0x550
=46eb 14 22:05:08 reedo [<c01dc632>] rb_insert_color+0xd2/0xf0
=46eb 14 22:05:08 reedo [<c01493da>] __vma_link+0x3a/0xa0
=46eb 14 22:05:08 reedo [<c01494be>] vma_link+0x7e/0xb0
=46eb 14 22:05:08 reedo [<c0149ccc>] do_mmap_pgoff+0x38c/0x6c0
=46eb 14 22:05:08 reedo [<c020c437>] SHATransform+0x27/0x150
=46eb 14 22:05:08 reedo [<c020c845>] extract_entropy+0x2e5/0x370
=46eb 14 22:05:08 reedo [<c013e1df>] buffered_rmqueue+0xcf/0x170
=46eb 14 22:05:08 reedo [<c013e32f>] __alloc_pages+0xaf/0x370
=46eb 14 22:05:08 reedo [<c013a30c>] find_get_page+0x2c/0x60
=46eb 14 22:05:08 reedo [<c013b4e8>] filemap_nopage+0x2c8/0x360
=46eb 14 22:05:08 reedo [<c014cea3>] pte_chain_alloc+0x83/0x90
=46eb 14 22:05:08 reedo [<c014824d>] do_no_page+0x1bd/0x340
=46eb 14 22:05:08 reedo [<c02502db>] generic_ide_ioctl+0x7db/0x820
=46eb 14 22:05:08 reedo [<c011a0bc>] do_page_fault+0x34c/0x550
=46eb 14 22:05:08 reedo [<c0149ef3>] do_mmap_pgoff+0x5b3/0x6c0
=46eb 14 22:05:08 reedo [<c0239a00>] blkdev_ioctl+0xa0/0x43a
=46eb 14 22:05:08 reedo [<c0169180>] sys_ioctl+0x100/0x2a0
=46eb 14 22:05:08 reedo [<c010949b>] syscall_call+0x7/0xb


Any ideas?  This would just be icing on the cake, since it works fine,=20
just this message in my logs every time I want to remove the drive.

Thanks
Reed

=2D-=20
Reed Gregory
reed@progoth.com



--Boundary-02=_4uBMADex0NqFSMy
Content-Type: application/pgp-signature
Content-Description: signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQBAMBu4fFAOxUmysXgRAqJIAKCFvG7sTBLsmjifLyXchSbqYdEKGACaAn/1
3oAcl0vrhdJxRg8WzEmu1aI=
=P6pB
-----END PGP SIGNATURE-----

--Boundary-02=_4uBMADex0NqFSMy--