|
|
8b1478 |
From eb91002f4fb6ed6ae36034b178c5480caa5dccae Mon Sep 17 00:00:00 2001
|
|
|
8b1478 |
From: Maxim Levitsky <mlevitsk@redhat.com>
|
|
|
8b1478 |
Date: Tue, 25 Jun 2019 13:30:12 +0200
|
|
|
8b1478 |
Subject: [PATCH 19/23] ccid: Fix dwProtocols advertisement of T=0
|
|
|
8b1478 |
MIME-Version: 1.0
|
|
|
8b1478 |
Content-Type: text/plain; charset=UTF-8
|
|
|
8b1478 |
Content-Transfer-Encoding: 8bit
|
|
|
8b1478 |
|
|
|
8b1478 |
RH-Author: Maxim Levitsky <mlevitsk@redhat.com>
|
|
|
8b1478 |
Message-id: <20190625133012.8221-2-mlevitsk@redhat.com>
|
|
|
8b1478 |
Patchwork-id: 88926
|
|
|
8b1478 |
O-Subject: [RHEL-7.7 qemu-kvm-rhev PATCH 1/1] ccid: Fix dwProtocols advertisement of T=0
|
|
|
8b1478 |
Bugzilla: 1721522
|
|
|
8b1478 |
RH-Acked-by: John Snow <jsnow@redhat.com>
|
|
|
8b1478 |
RH-Acked-by: Philippe Mathieu-Daudé <philmd@redhat.com>
|
|
|
8b1478 |
RH-Acked-by: Markus Armbruster <armbru@redhat.com>
|
|
|
8b1478 |
|
|
|
8b1478 |
From: Jason Andryuk <jandryuk@gmail.com>
|
|
|
8b1478 |
|
|
|
8b1478 |
Commit d7d218ef02d87c637d20d64da8f575d434ff6f78 attempted to change
|
|
|
8b1478 |
dwProtocols to only advertise support for T=0 and not T=1. The change
|
|
|
8b1478 |
was incorrect as it changed 0x00000003 to 0x00010000.
|
|
|
8b1478 |
|
|
|
8b1478 |
lsusb -v in a linux guest shows:
|
|
|
8b1478 |
"dwProtocols 65536 (Invalid values detected)", though the
|
|
|
8b1478 |
smart card could still be accessed. Windows 7 does not detect inserted
|
|
|
8b1478 |
smart cards and logs the the following Error in the Event Logs:
|
|
|
8b1478 |
|
|
|
8b1478 |
Source: Smart Card Service
|
|
|
8b1478 |
Event ID: 610
|
|
|
8b1478 |
Smart Card Reader 'QEMU QEMU USB CCID 0' rejected IOCTL SET_PROTOCOL:
|
|
|
8b1478 |
Incorrect function. If this error persists, your smart card or reader
|
|
|
8b1478 |
may not be functioning correctly
|
|
|
8b1478 |
|
|
|
8b1478 |
Command Header: 03 00 00 00
|
|
|
8b1478 |
|
|
|
8b1478 |
Setting to 0x00000001 fixes the Windows issue.
|
|
|
8b1478 |
|
|
|
8b1478 |
Signed-off-by: Jason Andryuk <jandryuk@gmail.com>
|
|
|
8b1478 |
Message-id: 20180420183219.20722-1-jandryuk@gmail.com
|
|
|
8b1478 |
Cc: qemu-stable@nongnu.org
|
|
|
8b1478 |
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
|
8b1478 |
(cherry picked from commit 0ee86bb6c5beb6498488850104f7557c376d0bef)
|
|
|
8b1478 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
8b1478 |
---
|
|
|
8b1478 |
hw/usb/dev-smartcard-reader.c | 4 ++--
|
|
|
8b1478 |
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
8b1478 |
|
|
|
8b1478 |
diff --git a/hw/usb/dev-smartcard-reader.c b/hw/usb/dev-smartcard-reader.c
|
|
|
8b1478 |
index 214d3e9..f745192 100644
|
|
|
8b1478 |
--- a/hw/usb/dev-smartcard-reader.c
|
|
|
8b1478 |
+++ b/hw/usb/dev-smartcard-reader.c
|
|
|
8b1478 |
@@ -329,8 +329,8 @@ static const uint8_t qemu_ccid_descriptor[] = {
|
|
|
8b1478 |
*/
|
|
|
8b1478 |
0x07, /* u8 bVoltageSupport; 01h - 5.0v, 02h - 3.0, 03 - 1.8 */
|
|
|
8b1478 |
|
|
|
8b1478 |
- 0x00, 0x00, /* u32 dwProtocols; RRRR PPPP. RRRR = 0000h.*/
|
|
|
8b1478 |
- 0x01, 0x00, /* PPPP: 0001h = Protocol T=0, 0002h = Protocol T=1 */
|
|
|
8b1478 |
+ 0x01, 0x00, /* u32 dwProtocols; RRRR PPPP. RRRR = 0000h.*/
|
|
|
8b1478 |
+ 0x00, 0x00, /* PPPP: 0001h = Protocol T=0, 0002h = Protocol T=1 */
|
|
|
8b1478 |
/* u32 dwDefaultClock; in kHZ (0x0fa0 is 4 MHz) */
|
|
|
8b1478 |
0xa0, 0x0f, 0x00, 0x00,
|
|
|
8b1478 |
/* u32 dwMaximumClock; */
|
|
|
8b1478 |
--
|
|
|
8b1478 |
1.8.3.1
|
|
|
8b1478 |
|