ATM driver problems

Hi All:
ATM driver problems:
In our driver, we create a polling thread for reading,.the Miniport halt
dispatch routine 's priority is 0xc, the created thread priority is 0x8.
when pulling out the device, the Halt routine should be activate.
However the polling thread still ocuppy nearly 100% CPU
When add sleep in polling thread, the polling thread can not terminated
timely,after 4 or 5 round, can the Halt routine is entered.
2 Using NdisSetTimer,a timer function is called. In the time function,
KeWaitForSingleObject is called. Can this KeWaitforxxxx cause problem? It
seems that ATTEMPTED_SWITCH_FROM_DPC error is happened.
Thanks a lot!
K.Y

b???.???????&?v?'?ׯj?.n?Qyȩf??]?:.?˛???m??֛???zf???%y?ޞ?^?˛??^r*Lzfެ?…???l??ܢ