Re: [PATCH] usb: power off devices at shutdown

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2010/8/30 Alan Stern <stern@xxxxxxxxxxxxxxxxxxx>:
> 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
>
>

Hello,

I have motherboard Gigabyte GA-K8NF-9-RH with Nvidia nForce 4 chipset.
Here Is output from lspci:

00:00.0 Memory controller [0580]: nVidia Corporation CK804 Memory
Controller [10de:005e] (rev a3)
00:01.0 ISA bridge [0601]: nVidia Corporation CK804 ISA Bridge
[10de:0050] (rev a3)
00:01.1 SMBus [0c05]: nVidia Corporation CK804 SMBus [10de:0052] (rev a2)
00:02.0 USB Controller [0c03]: nVidia Corporation CK804 USB Controller
[10de:005a] (rev a2)
00:02.1 USB Controller [0c03]: nVidia Corporation CK804 USB Controller
[10de:005b] (rev a3)
00:04.0 Multimedia audio controller [0401]: nVidia Corporation CK804
AC'97 Audio Controller [10de:0059] (rev a2)
00:06.0 IDE interface [0101]: nVidia Corporation CK804 IDE [10de:0053] (rev f2)
00:07.0 IDE interface [0101]: nVidia Corporation CK804 Serial ATA
Controller [10de:0054] (rev f3)
00:08.0 IDE interface [0101]: nVidia Corporation CK804 Serial ATA
Controller [10de:0055] (rev f3)
00:09.0 PCI bridge [0604]: nVidia Corporation CK804 PCI Bridge
[10de:005c] (rev a2)
00:0a.0 Bridge [0680]: nVidia Corporation CK804 Ethernet Controller
[10de:0057] (rev a3)
00:0b.0 PCI bridge [0604]: nVidia Corporation CK804 PCIE Bridge
[10de:005d] (rev a3)
00:0c.0 PCI bridge [0604]: nVidia Corporation CK804 PCIE Bridge
[10de:005d] (rev a3)
00:0d.0 PCI bridge [0604]: nVidia Corporation CK804 PCIE Bridge
[10de:005d] (rev a3)
00:0e.0 PCI bridge [0604]: nVidia Corporation CK804 PCIE Bridge
[10de:005d] (rev a3)
00:18.0 Host bridge [0600]: Advanced Micro Devices [AMD] K8
[Athlon64/Opteron] HyperTransport Technology Configuration [1022:1100]
00:18.1 Host bridge [0600]: Advanced Micro Devices [AMD] K8
[Athlon64/Opteron] Address Map [1022:1101]
00:18.2 Host bridge [0600]: Advanced Micro Devices [AMD] K8
[Athlon64/Opteron] DRAM Controller [1022:1102]
00:18.3 Host bridge [0600]: Advanced Micro Devices [AMD] K8
[Athlon64/Opteron] Miscellaneous Control [1022:1103]
01:0a.0 FireWire (IEEE 1394) [0c00]: Texas Instruments TSB82AA2
IEEE-1394b Link Layer Controller [104c:8025] (rev 01)
05:00.0 VGA compatible controller [0300]: nVidia Corporation NV43
[GeForce 6600 GT] [10de:0140] (rev a2)


-- 
Pali Rohár
pali.rohar@xxxxxxxxx
--
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


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux