[Pcsclite-cvs-commit] r6631 - /trunk/Drivers/ccid/src/ccid_usb.c

rousseau at users.alioth.debian.org rousseau at users.alioth.debian.org
Thu May 16 07:40:23 UTC 2013


Author: rousseau
Date: Thu May 16 07:40:23 2013
New Revision: 6631

URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=6631
Log:
ReadUSB: Zero Length Packet (ZLP) support

The Gemalto IDBridge CT30 and IDBridge K30 readers may send
a ZLP after some commands when connected on a USB3 bus

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

Modified: trunk/Drivers/ccid/src/ccid_usb.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/Drivers/ccid/src/ccid_usb.c?rev=6631&op=diff
==============================================================================
--- trunk/Drivers/ccid/src/ccid_usb.c (original)
+++ trunk/Drivers/ccid/src/ccid_usb.c Thu May 16 07:40:23 2013
@@ -706,6 +706,15 @@
 		return STATUS_UNSUCCESSFUL;
 	}
 
+	if (0 == actual_length)
+	{
+		/* Zero Length Packet */
+		/* The Gemalto IDBridge CT30 and IDBridge K30 readers may send
+		 * a ZLP after some commands when connected on a USB3 bus */
+		DEBUG_INFO("ZLP detected. read again!");
+		goto read_again;
+	}
+
 	*length = actual_length;
 
 	DEBUG_XXD(debug_header, buffer, *length);




More information about the Pcsclite-cvs-commit mailing list