System requests smart card reader power up and down continuously.

Hello guys,

I’ve developed a virtual smart card reader driver. My driver can interaction with applications but if I let the driver alone(no application connect to), It has weird behaviours.
Since my driver tell the system that there is a card inserted to the reader, the system send IOCTL_SMARTCARD_POWER(SCARD_COLD_RESET) and IOCTL_SMARTCARD_POWER(SCARD_POWER_DOWN) continuously.

That put my driver run into the loop and consume the system’s resource. I just don’t want that.
I describe it’s behaviour as bellow diagram.

After step #21, The system send IOCTL_SMARTCARD_IS_PRESENT again, the driver continue the loop at step #4.

Is there any wrong here?