[Pcsclite-git-commit] [CCID] 01/01: SCM SCL011: use a 400 ms timeout instead of 100 ms

Ludovic Rousseau rousseau at moszumanska.debian.org
Sat May 7 10:16:21 UTC 2016


This is an automated email from the git hooks/post-receive script.

rousseau pushed a commit to branch master
in repository CCID.

commit 5c9dbb25abb9fed9882b7c28b65fe55d4d7924fb
Author: Ludovic Rousseau <ludovic.rousseau at free.fr>
Date:   Sat May 7 12:12:28 2016 +0200

    SCM SCL011: use a 400 ms timeout instead of 100 ms
    
    The SCM SCL011 reader is a contactless reader that needs 350 ms to
    answer to the PC_to_RDR_GetSlotStatus CCID command when no card is in
    the field.
    
    We use the same patch as for the ElatecTWN4.
    
    Thanks to Chris Calvesbert for the bug report.
---
 src/ccid.c | 3 +++
 src/ccid.h | 1 +
 2 files changed, 4 insertions(+)

diff --git a/src/ccid.c b/src/ccid.c
index 3e42be5..a004269 100644
--- a/src/ccid.c
+++ b/src/ccid.c
@@ -76,6 +76,8 @@ int ccid_open_hack_pre(unsigned int reader_index)
 			/* use a timeout of 400 ms instead of 100 ms in CmdGetSlotStatus()
 			 * used by CreateChannelByNameOrChannel()
 			 * The reader answers after 280 ms if no tag is present */
+		case SCM_SCL011:
+			/* The SCM SCL011 reader needs 350 ms to answer */
 			ccid_descriptor->readTimeout = DEFAULT_COM_READ_TIMEOUT * 4;
 			break;
 	}
@@ -520,6 +522,7 @@ int ccid_open_hack_post(unsigned int reader_index)
 			break;
 
 		case ElatecTWN4:
+		case SCM_SCL011:
 			/* restore default timeout (modified in ccid_open_hack_pre()) */
 			ccid_descriptor->readTimeout = DEFAULT_COM_READ_TIMEOUT;
 			break;
diff --git a/src/ccid.h b/src/ccid.h
index 59a14aa..8518df3 100644
--- a/src/ccid.h
+++ b/src/ccid.h
@@ -210,6 +210,7 @@ typedef struct
 #define MICROCHIP_SEC1100 0x04241104
 #define CHERRY_KC1000SC 0x046A00A1
 #define ElatecTWN4	0x09D80427
+#define SCM_SCL011 0x04E65293
 
 #define VENDOR_GEMALTO 0x08E6
 #define GET_VENDOR(readerID) ((readerID >> 16) & 0xFFFF)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pcsclite/CCID.git



More information about the Pcsclite-cvs-commit mailing list