I am developing vendor specific USB host controller driver.
I have problems with USB composite device[Keyboard+Mouse].
It turns out a Microsoft bug,
May I know how to notify Microsoft to fix it?
The case is here:
In HID code, there are two functions,
CHid::HidThread()
{
...
SetIdle();
...
CHid::HidNewDevice()Quote:}
{
GetReport();
Since these two calles issue usb control transfer to theQuote:}
control endpoint from different Task.
There is no serialization to prevent them from get called
the same time.
for the USB composite devie with Kby+Mouse, the racing
condition is raised up.
normally,
HidNewDevice will call GetReport for Keyboard,
and try to call GetReport for Mouse right away,
after a while GetReport for Keyboard is completed,
SetIDLE will be called. so it's naturally serialized.
HidNewDevice will call GetReport for Keyboard,
and suspended by high prority task,
GetReport for Keyboard will be completed, then signal
HidThread, so SetIDLE will be called before calling
GetReport for Mouse,
since now on, HID class driver just hang.
my current workaround is just remove that "SetIDLE"
function. it has no impact on functioning but has impact
on power saving