USB stack issue?

Hi,

I am working on a driver for a cardbus card with a “PCI to USB open host
controller” and
a USB communication device attached to it. I experienced one issue that if I
ejected the
card while the OS doing USB device enumeration, my driver will keep waiting
for the
URB request to complete, but it never able to complete, so the driver will
wait there forever.

I guess the windows USB driver stack should able to detect the device
removal event and cancel or failed
that URB request, is that right?

Any ideas to get around this issue?

Thanks,