[Pcsclite-cvs-commit] r2602 - trunk/Drivers/ccid/src
rousseau at alioth.debian.org
rousseau at alioth.debian.org
Thu Aug 2 20:04:12 UTC 2007
Author: rousseau
Date: 2007-08-02 20:04:12 +0000 (Thu, 02 Aug 2007)
New Revision: 2602
Modified:
trunk/Drivers/ccid/src/ccid.h
trunk/Drivers/ccid/src/ccid_usb.c
trunk/Drivers/ccid/src/commands.c
Log:
add support of the O2Micro oz776 (ProductID 0x7772)
Modified: trunk/Drivers/ccid/src/ccid.h
===================================================================
--- trunk/Drivers/ccid/src/ccid.h 2007-08-02 11:38:15 UTC (rev 2601)
+++ trunk/Drivers/ccid/src/ccid.h 2007-08-02 20:04:12 UTC (rev 2602)
@@ -142,6 +142,7 @@
#define CHERRYXX33 0x046A0005
#define CHERRYST2000 0x046A003E
#define OZ776 0x0B977762
+#define OZ776_7772 0x0B977772
#define SPR532 0x04E6E003
#define MYSMARTPAD 0x09BE0002
#define CHERRYXX44 0x046a0010
Modified: trunk/Drivers/ccid/src/ccid_usb.c
===================================================================
--- trunk/Drivers/ccid/src/ccid_usb.c 2007-08-02 11:38:15 UTC (rev 2601)
+++ trunk/Drivers/ccid/src/ccid_usb.c 2007-08-02 20:04:12 UTC (rev 2602)
@@ -633,6 +633,9 @@
{
struct usb_interface *usb_interface = NULL;
int i;
+#ifdef O2MICRO_OZ776_PATCH
+ int readerID;
+#endif
/* if multiple interfaces use the first one with CCID class type */
for (i=0; i<dev->config->bNumInterfaces; i++)
@@ -650,9 +653,9 @@
}
#ifdef O2MICRO_OZ776_PATCH
+ readerID = (dev->descriptor.idVendor << 16) + dev->descriptor.idProduct;
if (usb_interface != NULL
- && (OZ776 == (dev->descriptor.idVendor << 16)
- + dev->descriptor.idProduct)
+ && ((OZ776 == readerID) || (OZ776_7772 == readerID))
&& (0 == usb_interface->altsetting->extralen)) /* this is the bug */
{
for (i=0; i<usb_interface->altsetting->bNumEndpoints; i++)
Modified: trunk/Drivers/ccid/src/commands.c
===================================================================
--- trunk/Drivers/ccid/src/commands.c 2007-08-02 11:38:15 UTC (rev 2601)
+++ trunk/Drivers/ccid/src/commands.c 2007-08-02 20:04:12 UTC (rev 2602)
@@ -931,7 +931,8 @@
#ifdef O2MICRO_OZ776_PATCH
/* the O2MICRO OZ 776 reader sends card absent or mute errors
* when no card is inserted */
- if (! ((OZ776 == ccid_descriptor->readerID)
+ if (! (((OZ776 == ccid_descriptor->readerID)
+ || (OZ776_7772 == ccid_descriptor->readerID))
&& (buffer[ERROR_OFFSET] == 0xFE)))
#endif
ccid_error(buffer[ERROR_OFFSET], __FILE__, __LINE__, __FUNCTION__); /* bError */
More information about the Pcsclite-cvs-commit
mailing list