Package: initramfs-tools
Version: 0.48
Severity: normal

On my laptop, a Fujutsu P-2110 lifebook, if I use softwre suspend
(version 1; to disk), when resuming the initramfs loads ohci_hcd before
starting the resume process. When the hibernate program then tries to
load ohci_hcd (which does not show as loaded in lsmod anymore due to the
software suspend resume having happened), it fails to load like this:

ohci_hcd: 2005 April 22 USB 1.1 'Open' Host Controller (OHCI) Driver (PCI)
ACPI: PCI Interrupt 0000:00:02.0[A] -> Link [LNKU] -> GSI 11 (level, low) -> 
IRQ 11
ohci_hcd 0000:00:02.0: OHCI Host Controller
ohci_hcd 0000:00:02.0: USB HC takeover failed!  (BIOS/SMM bug)
ohci_hcd 0000:00:02.0: can't reset
ACPI: PCI interrupt for device 0000:00:02.0 disabled
ohci_hcd 0000:00:02.0: init 0000:00:02.0 fail, -16
ohci_hcd: probe of 0000:00:02.0 failed with error -16

And usb stops working.

I discovered a simple workaround for this; I modified hook-functions to not
include the ohci_hcd module in my initramfs, so it is not loaded before the
reume. Then the module loads ok. So I suppose that the kernel is getting
confused with this module being loaded essentially twice in a row w/o
being unloaded.

At a minimum, there should be some way to drop the usb modules from the
initramfs, if they're not needed to mount the root filesystem, so I don't
need to edit files in /usr to work around this problem.

A slightly better fix is to modify local-premount/suspend to 
rmmod all unused kernel modules before resuming the system. Here's
something I came up with that works for me:

        for module in $(cat /proc/modules |awk '{ print $1}'); do
                rmmod $module 2>/dev/null || true
        done
        echo $major_minor >/sys/power/resume                    

[Even more optimal would be for the initramfs to avoid loading any kernel
modules when doing a resume, since none of the modules really need to be
loaded and loading unnecessary modules leads to unnecessry delay during
resume. For example, on my latop, loading the ethernet module takes 3
seconds and this happens unneccessarily before every resume. Of course,
this is difficult given the current code since it relys on udev to make
the devide node that is then examined to get the major and minor numbers
to use when resuming.]

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.15-1-686
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)

Versions of packages initramfs-tools depends on:
ii  busybox                       1:1.01-4   Tiny utilities for small and embed
ii  cpio                          2.6-10     GNU cpio -- a program to manage ar
ii  klibc-utils                   1.1.16-1   small statically-linked utilities 
ii  udev                          0.079-1    /dev/ and hotplug management daemo

initramfs-tools recommends no packages.

-- no debconf information

-- 
see shy jo

Attachment: signature.asc
Description: Digital signature

Reply via email to