[Pcsclite-cvs-commit] r5740 - in /trunk/Drivers/ccid/src: ccid.h ccid_usb.c

rousseau at users.alioth.debian.org rousseau at users.alioth.debian.org
Thu May 12 14:17:22 UTC 2011


Author: rousseau
Date: Thu May 12 14:17:17 2011
New Revision: 5740

URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=5740
Log:
OpenUSBByName(): Some early Gemalto Ezio CB+ readers have bDeviceClass,
bDeviceSubClass and bDeviceProtocol set to 0xFF (proprietary) instead of
0x00.

So on Mac OS X the reader configuration is not done by the OS/kernel and
we do it ourself.

Modified:
    trunk/Drivers/ccid/src/ccid.h
    trunk/Drivers/ccid/src/ccid_usb.c

Modified: trunk/Drivers/ccid/src/ccid.h
URL: http://svn.debian.org/wsvn/pcsclite/trunk/Drivers/ccid/src/ccid.h?rev=5740&op=diff
==============================================================================
--- trunk/Drivers/ccid/src/ccid.h (original)
+++ trunk/Drivers/ccid/src/ccid.h Thu May 12 14:17:17 2011
@@ -168,6 +168,7 @@
 #define GEMCOREPOSPRO 0x08E63479
 #define GEMALTOPROXDU 0x08E65503
 #define GEMALTOPROXSU 0x08E65504
+#define GEMALTO_EZIO_CBP 0x08E634C3
 #define CARDMAN3121	0x076B3021
 #define LTC31		0x07830003
 #define SCR331DI	0x04E65111

Modified: trunk/Drivers/ccid/src/ccid_usb.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/Drivers/ccid/src/ccid_usb.c?rev=5740&op=diff
==============================================================================
--- trunk/Drivers/ccid/src/ccid_usb.c (original)
+++ trunk/Drivers/ccid/src/ccid_usb.c Thu May 12 14:17:17 2011
@@ -425,6 +425,27 @@
 				}
 
 again:
+#ifdef __APPLE__
+				/* Some early Gemalto Ezio CB+ readers have
+				 * bDeviceClass, bDeviceSubClass and bDeviceProtocol set
+				 * to 0xFF (proprietary) instead of 0x00.
+				 *
+				 * So on Mac OS X the reader configuration is not done
+				 * by the OS/kernel and we do it ourself.
+				 */
+				if (GEMALTO_EZIO_CBP == readerID)
+				{
+					r = libusb_set_configuration(dev_handle, 1);
+					if (r < 0)
+					{
+						(void)libusb_close(dev_handle);
+						DEBUG_CRITICAL4("Can't set configuration on %d/%d: %d",
+							bus_number, device_address, r);
+						continue;
+					}
+				}
+#endif
+
 				r = libusb_get_active_config_descriptor(dev, &config_desc);
 				if (r < 0)
 				{




More information about the Pcsclite-cvs-commit mailing list