On Fri, 27 Aug 2010, [UTF-8] Pali Rohár wrote: > Hello, > > For 4 years of using linux I have problem with my USB devices on my > desktop PC. When was mouse (SD card reader, ...) plugged, still lights > (and after shutdown too). Finally some days ago I found solution of my > problem on page https://bugzilla.kernel.org/show_bug.cgi?id=5410 . > Here is also defined this problem. > > I write new patch file > https://bugs.launchpad.net/ubuntu/+source/linux/+bug/42149/+attachment/1484850/+files/usb-new.patch > and this solve my problem. When I rmmod module ohci-hcd (or shutdown > PC) all USB devices power off too. > > Without this patch, I tried echo suspend > > /sys/bus/usb/devices/$USB/power/level . When module ohci-hcd was > loaded, $USB power off. But when I rmmod ohci-hcd, all USB devices > immediately power on (same after shutdown PC), it ignore power/level > settings. > > With this patch I dont change power/level, it automatically power off > USB devices when ohci-hcd is unloaded. > > Sorry, but I dont understand what this usb modules in kernel doing, > I'm only linux kernel user. The problem is that your patch leaves the controller running and able to write to memory after that memory has been released. This is not safe. What the USB devices do when you rmmod ohci-hcd doesn't matter very much. After all, ohci-hcd will be loaded when your machine is running normally. What happens when you shut down the system _does_ matter. In this situation it should be okay to leave the controller running, since the memory won't be released before the system turns off. But for maximum safety, we shouldn't do this unless it is really needed. Since all the affected systems seem to have nVidia controllers, that's what we should test for. Can you send the "lspci -nn" output for your USB controllers? Alan Stern -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html