Re: USB host memory leak at Suspend/Resume
- From: Jojje <Jojje@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 22 Nov 2006 00:09:01 -0800
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
- References:
- Re: USB host memory leak at Suspend/Resume
- From: David Liao \(MS\)
- Re: USB host memory leak at Suspend/Resume
- Prev by Date: Re: audio driver
- Next by Date: Re: About SD interface in WinCE 5.0
- Previous by thread: Re: USB host memory leak at Suspend/Resume
- Next by thread: Re: USB host memory leak at Suspend/Resume
- Index(es):
Relevant Pages
|