[Pcsclite-git-commit] [CCID] 02/02: Patch for Microchip SEC1110 on Mac OS X

Ludovic Rousseau rousseau at moszumanska.debian.org
Mon Jan 4 19:33:13 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 f2abd7954b50ed741d98d78270f7a863f9e18e4a
Author: Ludovic Rousseau <ludovic.rousseau at free.fr>
Date:   Mon Jan 4 20:25:10 2016 +0100

    Patch for Microchip SEC1110 on Mac OS X
    
    The Microchip SEC1110 is bogus and does not report card status correctly
    with PC_to_RDR_GetSlotStatus if the Interrupt pipe is not read.
    
    The problem is that Mac OS X still does not use the
    TAG_IFD_POLLING_THREAD_WITH_TIMEOUT and then the Interrupt pipe to
    detect card events. Only IFDHICCPresence(), and then GetSlotStatus, is
    used.
    
    The solution is to empty the interrupt pipe by doing a very short read
    (10 ms) before each call to PC_to_RDR_GetSlotStatus.
---
 src/ccid.h     | 1 +
 src/commands.c | 5 +++++
 2 files changed, 6 insertions(+)

diff --git a/src/ccid.h b/src/ccid.h
index 40304e6..0ce2e9e 100644
--- a/src/ccid.h
+++ b/src/ccid.h
@@ -207,6 +207,7 @@ typedef struct
 #define KOBIL_IDTOKEN 0x0D46301D
 #define FUJITSUSMARTKEYB 0x0BF81017
 #define FEITIANR502DUAL 0x096E060D
+#define MICROCHIP_SEC1100 0x04241104
 
 #define VENDOR_GEMALTO 0x08E6
 #define GET_VENDOR(readerID) ((readerID >> 16) & 0xFFFF)
diff --git a/src/commands.c b/src/commands.c
index 58a233c..7e42cf5 100644
--- a/src/commands.c
+++ b/src/commands.c
@@ -1188,6 +1188,11 @@ again_status:
 	}
 #endif
 
+#ifdef __APPLE__
+	if (MICROCHIP_SEC1100 == ccid_descriptor->readerID)
+		InterruptRead(reader_index, 10);
+#endif
+
 	cmd[0] = 0x65; /* GetSlotStatus */
 	cmd[1] = cmd[2] = cmd[3] = cmd[4] = 0;	/* dwLength */
 	cmd[5] = ccid_descriptor->bCurrentSlotIndex;	/* slot number */

-- 
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