Starting with Linux 2.5.43 (and still present in 2.5.48-bk1), when I
unplug my USB mouse, and reboot the system, the kernel oops/freezes in
device_shutdown. After hacking on the device_shutdown function, I can
confirm that it really is the USB system doing this.

For some reason, some USB code appears to not be cleaning up after
itself properly on unplugging the mouse.

In drivers/base/power.c:80, the code looks like this:

void device_shutdown(void)
{
        struct list_head * entry;

        printk(KERN_EMERG "Shutting down devices\n");

        down(&device_sem);
        list_for_each(entry,&global_device_list) {
                struct device * dev = to_dev(entry);
                if (device_present(dev) && dev->driver && dev->driver->shutdown) {
                        pr_debug("shutting down %s\n",dev->name);
                        dev->driver->shutdown(dev);
                }
        }
        up(&device_sem);
}

Something USB-related manages to fail the device_present(dev) test, but
causes oopses when the dev->driver call is made. I have confirmed this
with many printks, and can email my changes to power.c as well as the
output.

# CONFIG_SMP is not set
CONFIG_PREEMPT=y
CONFIG_USB=y
CONFIG_USB_DEVICEFS=y
CONFIG_USB_UHCI_HCD=y
CONFIG_USB_HID=y
CONFIG_USB_HIDINPUT=y
CONFIG_DEBUG_KERNEL=y
CONFIG_DEBUG_STACKOVERFLOW=y
CONFIG_DEBUG_SLAB=y
CONFIG_DEBUG_IOVIRT=y
CONFIG_MAGIC_SYSRQ=y
CONFIG_DEBUG_SPINLOCK=y
CONFIG_KALLSYMS=y


00:00.0 Host bridge: Intel Corp. 440LX/EX - 82443LX/EX Host bridge (rev 03)
00:01.0 PCI bridge: Intel Corp. 440LX/EX - 82443LX/EX AGP bridge (rev 03)
00:07.0 ISA bridge: Intel Corp. 82371AB/EB/MB PIIX4 ISA (rev 01)
00:07.1 IDE interface: Intel Corp. 82371AB/EB/MB PIIX4 IDE (rev 01)
00:07.2 USB Controller: Intel Corp. 82371AB/EB/MB PIIX4 USB (rev 01)
00:07.3 Bridge: Intel Corp. 82371AB/EB/MB PIIX4 ACPI (rev 01)
00:0f.0 PCI bridge: Digital Equipment Corporation DECchip 21152 (rev 03)


--
Burton Windle                           [EMAIL PROTECTED]
Linux: the "grim reaper of innocent orphaned children."
          from /usr/src/linux-2.4.18/init/main.c:461





-------------------------------------------------------
This sf.net email is sponsored by: To learn the basics of securing 
your web site with SSL, click here to get a FREE TRIAL of a Thawte 
Server Certificate: http://www.gothawte.com/rd524.html
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to