Re: USB host memory leak at Suspend/Resume

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Thanks for your answer David,

Ok, so what you're saying is that being able to put the host controller in
suspend is determined by the capabilities of the host controller in the
s3c2410? And no matter what I do (like restoring the s3c2410 usb host
controller registers after resuming) it will never work? If so, my best shot
is trying to fix the memory leak.

The memory leak on re-initialization occurs eventhough I don't have any usb
device connected. Perhaps every third or fourth suspend/resume the used
memory increases by 4KB. If I don't include usb host in the image I don't get
any leak.

I'll do some more research to give you some more detailed info on what's
happening.

Regards,
Jojje

"David Liao (MS)" wrote:

If you do not turn on HCD_SUSPEND_RESUME, the HCD is reintialized and all
its client driver is unloaded and reloaded again.
When you said, there is memory leak on re-intialization, did you have any
USB Device attached? If yes, what kinds (I need to know which client driver
is loaded)?

If you set HCD_SUSPEND_RESUME, the Host can not be power off, HCD hold all
the structure internally. if you shut it down, it lost everything. It has to
re-initialized on this condition (Do not set HCD_SUSPEND_RESUME). You only
should set HCD_SUSPEND_RESUME, when you can put HCD into the SUSPEND
Mode(instead of power off).

David Liao

"Jojje" <Jojje@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:EAB549EF-F994-4D68-9981-308701B6E3AF@xxxxxxxxxxxxxxxx
Hi,

I've implemented suspend/resume for a Samsung S3C2410 platform (CE 5.0,
aug
06 patch). A USB hub (tusb2046b) is connected to the host port. To that
hub I
connect a usb mouse/keyb, for example. I have a problem with memory leaks
when doing suspend/resume. It seems that this is caused by the USB host
drivers (either in ohci2.dll or usbd.dll?). If I remove USB host drivers
(sets BSP_NOUSB=1) I don't see any leaks.

When having "HcdCapability"=dword:4 (HCD_SUSPEND_ON_REQUEST) in the USB
host
registry settings ([HKEY_LOCAL_MACHINE\Drivers\BuiltIn\OHCI]) OHCI is
reinitialized (usbd detached/attached at resume). This way there are
leaks.

If I set "HcdCapability"=dword:1 (HCD_SUSPEND_RESUME) the USB host doesn't
work after resume. I've tried restoring the usb host controller registers
in
S3C2410, but probably something more needed?

If I have "HcdCapability"=dword:1 (HCD_SUSPEND_RESUME) and do a
suspend/resume without actually setting the CPU in a power-off state I
have
no memory leaks and the usb host works ok.

Any ideas?

Thanks,
Jojje



.



Relevant Pages

  • USB 2.0 Host controller chip for Linux
    ... I have some confusion over the degree of SW/HW interaction in USB Host ... I have an FPGA design which runs Windriver Linux. ... to the PCB a USB 2.0 host controller chip whose sole purpose in life ...
    (comp.arch.embedded)
  • Re: Simple, embedded USB host for digital camera control
    ... In my case, it's a one host to multiple device setup, but because the ... exact devices are known, I was able to use a static configuration table ... more general purpose controller. ... Does Atmel provide a sample USB host stack ...
    (comp.arch.embedded)
  • Re: To test the USB Client and Host
    ... You are being asked to supply the class driver for the usb host interface, ... CE does not know anything about the host side of activesync so do not expect that to work. ... In actual testing both ports(USB client and Host) are working fine separately. ... Now we want to test the USB Host and Client. ...
    (microsoft.public.windowsce.platbuilder)
  • Re: USB Host Overcurrent Protection
    ... the USB host to supplier voltage through USB port. ... supervise and protect the VBUS for overcurrent? ... Well if you aren't supplying VBUS then clearly you can't detect over current! ... So you should add over-current protection if you are making a USB host. ...
    (comp.arch.embedded)
  • Re: USB host memory leak at Suspend/Resume
    ... "David Liao " wrote: ... info on memory leak, please let us know. ... I've implemented suspend/resume for a Samsung S3C2410 platform (CE 5.0, ... It seems that this is caused by the USB host ...
    (microsoft.public.windowsce.platbuilder)