Issue in WdfDeviceCreateDeviceInterface with reference strings

My smartcard reader driver registers 4 slots with smartcard reader GUID using WdfDeviceCreateDeviceInterface with reference strings in its EvtDevicePrepareHardware routine.
After the device is unplugged, when the smart card resource manager is stopped and started again, a system event log entry is created - " WDM Reader driver initialization cannot open reader device: The system cannot find the path specified." Source is scardsvr.
This issue is seen even after the driver is uninstalled.

This issue is not seen, if I had registered for smart card reader GUID with WdfDeviceCreateDeviceInterface , with a NULL reference string. However, I have to use named reference strings because we need to support four slots.
Please let me know, if this can be fixed, or it is a known limitation of the WDF framework.
Thanks in advance.

This has nothing to do with KMDF or reference strings. IIRC, scardsrv and smclib really expect one slot per device and that if you want to expose 4 slots, you will need to write a bus driver instead that enumerates each slot as a child stack. In your current design, do you have 4 SMCLIB contents (one for each slot)?

d

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@scmmicro.co.in
Sent: Monday, November 09, 2009 1:14 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Issue in WdfDeviceCreateDeviceInterface with reference strings

My smartcard reader driver registers 4 slots with smartcard reader GUID using WdfDeviceCreateDeviceInterface with reference strings in its EvtDevicePrepareHardware routine.
After the device is unplugged, when the smart card resource manager is stopped and started again, a system event log entry is created - " WDM Reader driver initialization cannot open reader device: The system cannot find the path specified." Source is scardsvr.
This issue is seen even after the driver is uninstalled.

This issue is not seen, if I had registered for smart card reader GUID with WdfDeviceCreateDeviceInterface , with a NULL reference string. However, I have to use named reference strings because we need to support four slots.
Please let me know, if this can be fixed, or it is a known limitation of the WDF framework.
Thanks in advance.


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Thanks for the response.

Yes we maintain 4 smart card extensions (one for each slot) in our driver.

We register 4 slots with the smart card reader GUID , i.e with reference strings “slot1”, “slot2”, “slot3” and “slot4”. On an Io_FileCreate, we check the reference string to associate the appropriate smart card extension and read/write requests are forwarded to the respective slots.
Hence, from the application it is possible to simultaneously communicate with more than one slot at a time.

More over this issue is seen only when the scardsvr is restarted without the device.
These error log entries are generated even across reboots.
When the device is present , no error log entries are generated.
This issue is seen with WDM drivers which register more than one slots too.

Is there any workaround possible for this issue?

Regards,
Sareena.

Dear Doron,

Do you have any updates on this?
Is there any work around possible?
This issue is seen when the driver registers with the smart card interface with a name. This is seen for a driver with a single slot too.

regards,
Sareena.

The smart card team investigated this and agreed that this is an issue with the current implementation. They are investigating further to see how this can be addressed in future versions of windows. If you need this fixed for a current OS, please contact Microsoft customer support and open an incident. You can refer them to this thread if needed

d

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@scmmicro.co.in
Sent: Tuesday, December 01, 2009 10:14 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Issue in WdfDeviceCreateDeviceInterface with reference strings

Dear Doron,

Do you have any updates on this?
Is there any work around possible?
This issue is seen when the driver registers with the smart card interface with a name. This is seen for a driver with a single slot too.

regards,
Sareena.


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer