Re: WinUSB_Free() return error and cause WinUSB_Initialize() fail in next power cycle.
- From: "Don Miller[MS]" <donmil@xxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 20 Oct 2009 11:54:07 -0700
Hi YmHuang,
What is the return value on the CloseHandle() call leading up to the failing case? Also, what is the return value of the CreateFile() call in the failing case? As already mentioned, WinUSB_Free() will always return TRUE. Do you ever call WinUsb_GetAssociatedInterface()? if so, do you match it with a corresponding WinUSB_Free()?
Thanks,
-Don Miller [MS]
"ymhuang" <yaomin.huang@xxxxxxxxx> wrote in message news:c8759730-58a6-4bc4-847c-a4efeef2b3fd@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Dear Doron,.
Indeed, we'd check the error via GetLastError(), but it doesn't
indicate any useful information to explain why WinUSB_Initialize()
return error code 183(ERROR_ALREADY_EXISTS) in next power cycle.
We suspect something inside WinUSB.sys is not clean up, OR WinUSB.sys
keep something while receive S3 indication, and cause WinUSB_Initialize
() fail in next power cycle. And it'll continue to repeat same error
in any next power cycle unless we restart service appilcation.
There seems no way to dig into WinUSB.sys to understand what's going
on. Any way we can do to help ourselves?
Appreciate for your kindly answer.
The environment which we know have higher fail rate -
OS: Win7 RTM x86
CPU: ATOM N270
(Don't know why, but CULV, Montevina, Calpella never show this
problem, and N280 also have it, but in lower fail rate)
SB Chip: ICH9-M
Device: USB 1.1 supported.
Break down the testing procedure, the WinUSB API accessing as below:
1. Calling WinUSB_ReadPipe() & WinUSB_WritePipe()
2. Got S3 Event
3. Calling WinUSB_ResetPipe() for each pipe
4. Calling WinUSB_Free().
5. Calling CloseHandle() to release device
6. System go into S3.
7. Resume event coming.
8. Calling CreateFile() to create device.
9. Calling WinUSB_Initialize() to get interface, then back to step 1
to do pipe operation.
After several time, WinUSB_Initialize() will return error code 183.
Recently, we did more test with WinUSB. We found below things -
1. If turn off selective suspend, the symptom come out in higher fail
rate.
2. The flush pipe before calling WinUSB_Free() no help. Still
encounter same symptom.
3. Unload WinUSB.dll after WinUSB_Free() in same power cycle is
useless for next power cycle.
Thank again.
ymhuang.
On Oct 8, 5:43 am, "Doron Holan [MSFT]"
<doron.ho...@xxxxxxxxxxxxxxxxxxxx> wrote:
WinUsb_Free in its current form only returns TRUE, so your logs are not
correct in that it is returning error. note that the value of
GetLastError() is undefined if the function returns TRUE
d
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"ymhuang" <yaomin.hu...@xxxxxxxxx> wrote in message
news:31e59f00-9c74-4be6-bfa6-e8a003aa9e7b@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> All,
> Have any one get error in WinUSB_Free(), and never success to get
> success in WinUSB_Free() any more in same power cycle?
> Anyone can give a light about how to enable debug log inside WinUSB to
> understand why WinUSB_Free() always return error? Or any other thing/
> clue can follow?
> It'll be a great help to me. Thanks.
> The story is -
> Somehow, in a heavy test for S3 and its resume, WinUSB_Initialize()
> always return fail to my service application after several
> iterations.
> When putting more debug message inside service application, I found
> WinUSB_Free() somehow failed inside its process, and whether how many
> time I re-call WinUSB_Free(), it just only return error. And it cause
> WinUSB_Initialize() unable to work in next power cycle (it seems
> InterfaceHandle was locked).
> When symptom happen, I'd check the device still alive, and restart
> system can recovery it.
>ymhuang.
- Follow-Ups:
- References:
- WinUSB_Free() return error and cause WinUSB_Initialize() fail in next power cycle.
- From: ymhuang
- Re: WinUSB_Free() return error and cause WinUSB_Initialize() fail in next power cycle.
- From: Doron Holan [MSFT]
- Re: WinUSB_Free() return error and cause WinUSB_Initialize() fail in next power cycle.
- From: ymhuang
- WinUSB_Free() return error and cause WinUSB_Initialize() fail in next power cycle.
- Prev by Date: Microsoft PS printer driver rendering plug-in questions
- Next by Date: Link Data User-Mode <--> Kernel-Mode. Please Help !
- Previous by thread: Re: WinUSB_Free() return error and cause WinUSB_Initialize() fail in next power cycle.
- Next by thread: Re: WinUSB_Free() return error and cause WinUSB_Initialize() fail in next power cycle.
- Index(es):
Relevant Pages
|