[Pcsclite-cvs-commit] r2849 - /trunk/Drivers/ccid/src/ifdhandler.c

rousseau at users.alioth.debian.org rousseau at users.alioth.debian.org
Fri Mar 14 08:29:04 UTC 2008


Author: rousseau
Date: Fri Mar 14 08:29:04 2008
New Revision: 2849

URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=2849
Log:
IFDHSetProtocolParameters(): O2Micro OZ776 does not support a protocol
change to T=1 for dual protocol cards

https://www.opensc-project.org/opensc/ticket/172
https://bugs.launchpad.net/ubuntu/+bug/163072

Modified:
    trunk/Drivers/ccid/src/ifdhandler.c

Modified: trunk/Drivers/ccid/src/ifdhandler.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/Drivers/ccid/src/ifdhandler.c?rev=2849&op=diff
==============================================================================
--- trunk/Drivers/ccid/src/ifdhandler.c (original)
+++ trunk/Drivers/ccid/src/ifdhandler.c Fri Mar 14 08:29:04 2008
@@ -693,12 +693,24 @@
 		/* if the requested protocol is not the default one
 		 * or a TA1/PPS1 is present */
 		if (((pps[1] & 0x0F) != default_protocol) || (PPS_HAS_PPS1(pps)))
+		{
+#ifdef O2MICRO_OZ776_PATCH
+			if ((OZ776 == ccid_desc->readerID)
+				|| (OZ776_7772 == ccid_desc->readerID))
+			{
+				Protocol = default_protocol;
+				DEBUG_INFO2("PPS not supported on O2Micro readers. Using T=%d",
+					Protocol);
+			}
+			else
+#endif
 			if (PPS_Exchange(reader_index, pps, &len, &pps[2]) != PPS_OK)
 			{
 				DEBUG_INFO("PPS_Exchange Failed");
 
 				return IFD_ERROR_PTS_FAILURE;
 			}
+		}
 	}
 
 	/* Now we must set the reader parameters */




More information about the Pcsclite-cvs-commit mailing list