qemu/0230-libcacard-change-default-ATR.patch
Cole Robinson 18389bf646 Fix crash with -M isapc -cpu Haswell (bz #986790)
Fix crash in lsi_soft_reset (bz #1000947)
Fix crash in scsi_dma_complete (bz #1001617)
Fix initial /dev/kvm permissions (bz #993491)
2013-09-03 15:01:17 -04:00

40 lines
1.2 KiB
Diff

From b6c0f55dee51c131fc2e4154aae30693b88b4595 Mon Sep 17 00:00:00 2001
From: Alon Levy <alevy@redhat.com>
Date: Tue, 5 Mar 2013 15:35:24 +0200
Subject: [PATCH] libcacard: change default ATR
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Alon Levy <alevy@redhat.com>
Reviewed-by: Marc-André Lureau <mlureau@redhat.com>
(cherry picked from commit a26dfd95d33d650f9f9f93b6ee6f03be925db1a8)
---
libcacard/vcardt.h | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/libcacard/vcardt.h b/libcacard/vcardt.h
index 538bdde..3b9a619 100644
--- a/libcacard/vcardt.h
+++ b/libcacard/vcardt.h
@@ -26,9 +26,17 @@ typedef struct VCardEmulStruct VCardEmul;
#define MAX_CHANNEL 4
/* create an ATR with appropriate historical bytes */
-#define VCARD_ATR_PREFIX(size) 0x3b, 0x66+(size), 0x00, 0xff, \
- 'V', 'C', 'A', 'R', 'D', '_'
+#define TS_DIRECT_CONVENTION 0x3b
+#define TA_PRESENT 0x10
+#define TB_PRESENT 0x20
+#define TC_PRESENT 0x40
+#define TD_PRESENT 0x80
+#define VCARD_ATR_PREFIX(size) \
+ TS_DIRECT_CONVENTION, \
+ TD_PRESENT + (6 + size), \
+ 0x00, \
+ 'V', 'C', 'A', 'R', 'D', '_'
typedef enum {
VCARD_DONE,