From: Andrew Morton Fix this: seclvl: Error during initialization: rc = [-22] Initializing Cryptographic API 0000:00:1f.2: uhci_check_and_reset_hc: legsup = 0x0070 0000:00:1f.2: Performing full reset pci_hotplug: PCI Hot Plug PCI Core version: 0.5 usbmon: debugfs is not available ehci_hcd: block sizes: qh 128 qtd 96 itd 192 sitd 96 ACPI: PCI Interrupt 0000:02:01.2[C] -> GSI 23 (level, low) -> IRQ 16 ehci_hcd 0000:02:01.2: EHCI Host Controller ehci_hcd 0000:02:01.2: reset hcs_params 0x2294 dbg=0 cc=2 pcc=2 ports=4 ehci_hcd 0000:02:01.2: reset portroute 1 0 1 0 ehci_hcd 0000:02:01.2: reset hcc_params 0002 thresh 0 uframes 256/512/1024 ehci_hcd 0000:02:01.2: ...powerdown ports... BUG: spinlock bad magic on CPU#1, swapper/1 lock: cfd69530, .magic: 00000000, .owner: /-1, .owner_cpu: 0 [] dump_stack+0x19/0x20 [] spin_bug+0x89/0x94 [] _raw_spin_lock+0x1c/0x78 [] _spin_lock_irqsave+0xd/0x18 [] ehci_hub_control+0x41/0x5a4 [] ehci_port_power+0x7f/0x98 [] ehci_pci_reset+0x32c/0x3c8 [] usb_add_hcd+0x4a/0x388 [] usb_hcd_pci_probe+0x2c5/0x360 [] pci_call_probe+0x13/0x18 [] __pci_device_probe+0x35/0x50 [] pci_device_probe+0x21/0x40 [] driver_probe_device+0x3e/0x98 [] __driver_attach+0x37/0x54 [] bus_for_each_dev+0x4a/0x74 [] driver_attach+0x17/0x1c [] bus_add_driver+0x68/0xb8 [] driver_register+0x52/0x5c [] __pci_register_driver+0xa5/0xbc [] ehci_hcd_pci_init+0x38/0x50 [] do_initcalls+0x70/0xd0 [] do_basic_setup+0x21/0x2c [] init+0xb4/0x1b4 [] kernel_thread_helper+0x5/0xc Badly. Initialising the spinlock in the pci reset function always seemed rather wrong. Cc: Greg KH Cc: David Brownell Signed-off-by: Andrew Morton --- drivers/usb/host/ehci-pci.c | 2 ++ 1 files changed, 2 insertions(+) diff -puN drivers/usb/host/ehci-pci.c~gregkh-usb-usb-pm-09-fix drivers/usb/host/ehci-pci.c --- devel/drivers/usb/host/ehci-pci.c~gregkh-usb-usb-pm-09-fix 2005-11-05 15:14:10.000000000 -0800 +++ devel-akpm/drivers/usb/host/ehci-pci.c 2005-11-05 15:14:10.000000000 -0800 @@ -65,6 +65,8 @@ static int ehci_pci_reset (struct usb_hc u32 temp; unsigned count = 256/4; + spin_lock_init(&ehci->lock); + ehci->caps = hcd->regs; ehci->regs = hcd->regs + HC_LENGTH (readl (&ehci->caps->hc_capbase)); dbg_hcs_params (ehci, "reset"); _